Skip to content

Commit

Permalink
Merge branch 'async' into tapo-500
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Dec 3, 2024
2 parents 4ea62e8 + f9cb6fa commit 65630b0
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: "CHANGELOG.md|.copier-answers.yml|.all-contributorsrc"
default_stages: [commit]
default_stages: [pre-commit]

ci:
autofix_commit_msg: "chore(pre-commit.ci): auto fixes"
Expand Down Expand Up @@ -32,10 +32,10 @@ repos:
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py36-plus]
args: [--py310-plus]
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.11.2
# hooks:
Expand Down
3 changes: 2 additions & 1 deletion onvif/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import datetime as dt
import logging
import os.path
from typing import Any, Callable
from typing import Any
from collections.abc import Callable

import httpx
from httpx import AsyncClient, BasicAuth, DigestAuth
Expand Down
3 changes: 2 additions & 1 deletion onvif/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import asyncio
import datetime as dt
import logging
from typing import TYPE_CHECKING, Any, Callable
from typing import TYPE_CHECKING, Any
from collections.abc import Callable

import httpx
from httpx import TransportError
Expand Down
3 changes: 2 additions & 1 deletion onvif/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import asyncio
from collections.abc import Awaitable
import logging
from typing import Callable, ParamSpec, TypeVar
from typing import ParamSpec, TypeVar
from collections.abc import Callable

import httpx

Expand Down
9 changes: 4 additions & 5 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
-r requirements.txt

# Dev
pytest
pytest-cov
pytest-asyncio
pylint
pytest==8.3.4
pytest-cov==6.0.0
pytest-asyncio==0.24.0

# pre-commit
pre-commit==2.7.1
pre-commit==4.0.1
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
"Topic :: Utilities",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]

setup(
Expand All @@ -41,7 +44,7 @@
keywords=["ONVIF", "Camera", "IPC"],
url="http://github.com/hunterjm/python-onvif-zeep-async",
zip_safe=False,
python_requires=">=3.9",
python_requires=">=3.10",
packages=find_packages(exclude=["docs", "examples", "tests"]),
install_requires=requires,
package_data={
Expand Down
4 changes: 2 additions & 2 deletions tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
def test_normalize_url():
assert normalize_url("http://1.2.3.4:80") == "http://1.2.3.4:80"
assert normalize_url("http://1.2.3.4:80:80") == "http://1.2.3.4:80"
assert normalize_url("http://[:dead:beef::1]:80") == "http://[:dead:beef::1]:80"
assert normalize_url("http://[dead:beef::1]:80") == "http://[dead:beef::1]:80"
assert normalize_url(None) is None
assert normalize_url(b"http://[:dead:beef::1]:80") is None
assert normalize_url(b"http://[dead:beef::1]:80") is None


@pytest.mark.asyncio
Expand Down

0 comments on commit 65630b0

Please sign in to comment.