diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 3578c60..5b97c68 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -20,7 +20,6 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r ./requirements.txt pip install coverage - name: Test with coverage run: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 406fab1..714ea90 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,7 +28,6 @@ jobs: run: | python -m pip install --upgrade pip pip install setuptools wheel - pip install -r ./requirements.txt - name: Set version env run: | echo "LIBRARY_VERSION=$(python -c "import sys; sys.path.append('.'); from zabbix_utils.version import __version__; print(__version__)")" >> $GITHUB_ENV diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 19fbfb8..b4b085d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -32,7 +32,6 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r ./requirements.txt pip install -r ./requirements-dev.txt pip install coverage - name: Lint with flake8 diff --git a/CHANGELOG.md b/CHANGELOG.md index 6810e9a..42874fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [1.1.1](https://github.com/zabbix/python-zabbix-utils/compare/v1.1.0...v1.1.1) (2024-03-06) + +### Changes: + +- removed external requirements + ## [1.1.0](https://github.com/zabbix/python-zabbix-utils/compare/v1.0.3...v1.1.0) (2024-01-23) ### Breaking Changes: diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index ec23086..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -typing_extensions>=4.0.0;python_version<"3.11" \ No newline at end of file diff --git a/setup.py b/setup.py index 27cd3bc..48cb667 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ test_suite='tests', packages=["zabbix_utils"], tests_require=["unittest"], - install_requires=["typing_extensions>=4.0.0;python_version<'3.11'"], + install_requires=[], python_requires='>=3.8', project_urls={ 'Zabbix': 'https://www.zabbix.com/documentation/current', diff --git a/zabbix_utils/api.py b/zabbix_utils/api.py index a20a3f8..7f7a6ee 100644 --- a/zabbix_utils/api.py +++ b/zabbix_utils/api.py @@ -35,11 +35,6 @@ from urllib.error import URLError from typing import Callable, Union, Any, List -# For Python less 3.11 compatibility -try: - from typing import Self # type: ignore -except ImportError: - from typing_extensions import Self from .common import ModuleUtils from .logger import EmptyHandler, SensitiveFilter @@ -74,7 +69,7 @@ def __getattr__(self, name: str) -> Callable: TypeError: Raises if gets unexpected arguments. Returns: - Self: Zabbix API method. + Callable: Zabbix API method. """ # For compatibility with Python less 3.9 versions @@ -256,13 +251,13 @@ def __getattr__(self, name: str) -> Callable: return APIObject(name, self) - def __enter__(self) -> Self: + def __enter__(self) -> Callable: return self def __exit__(self, *args) -> None: self.logout() - def __basic_auth(self, user: str, password: str) -> Self: + def __basic_auth(self, user: str, password: str) -> None: """Enable Basic Authentication using. Args: @@ -302,7 +297,7 @@ def version(self) -> APIVersion: return self.api_version() def login(self, token: Union[str, None] = None, user: Union[str, None] = None, - password: Union[str, None] = None) -> Self: + password: Union[str, None] = None) -> None: """Login to Zabbix API. Args: diff --git a/zabbix_utils/sender.py b/zabbix_utils/sender.py index b3ac67f..a9cc668 100644 --- a/zabbix_utils/sender.py +++ b/zabbix_utils/sender.py @@ -30,11 +30,6 @@ from decimal import Decimal from typing import Callable, Union -# For Python less 3.11 compatibility -try: - from typing import Self # type: ignore -except ImportError: - from typing_extensions import Self from .logger import EmptyHandler from .common import ZabbixProtocol @@ -100,7 +95,7 @@ def parse(self, response: dict) -> dict: return res - def add(self, response: dict, chunk: Union[int, None] = None) -> Self: + def add(self, response: dict, chunk: Union[int, None] = None): """Add and merge response data from Zabbix. Args: @@ -285,7 +280,7 @@ def nodes(self) -> list: """Returns list of Node objects. Returns: - list List of Node objects + list: List of Node objects """ return self.__nodes diff --git a/zabbix_utils/version.py b/zabbix_utils/version.py index 56ac25d..4d17b80 100644 --- a/zabbix_utils/version.py +++ b/zabbix_utils/version.py @@ -22,7 +22,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. -__version__ = "1.1.0" +__version__ = "1.1.1" __min_supported__ = 5.0 __max_supported__ = 7.0