Skip to content

Commit

Permalink
Release v1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
aiantsen authored Mar 6, 2024
2 parents f13d799 + 2813f46 commit e4e9e28
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 22 deletions.
1 change: 0 additions & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
13 changes: 4 additions & 9 deletions zabbix_utils/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
9 changes: 2 additions & 7 deletions zabbix_utils/sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion zabbix_utils/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e4e9e28

Please sign in to comment.