mirror of
https://github.com/python-kasa/python-kasa.git
synced 2024-12-22 19:23:34 +00:00
331baf6bc4
## [0.7.7](https://github.com/python-kasa/python-kasa/tree/0.7.7) (2024-11-04) [Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.7.6...0.7.7) **Release summary:** - Bugfix for child device device creation error with credentials_hash - PIR support for iot dimmers and wall switches. - Various small enhancements and project improvements. **Implemented enhancements:** - Add PIR&LAS for wall switches mentioning PIR support [\#1227](https://github.com/python-kasa/python-kasa/pull/1227) (@rytilahti) - Expose ambient light setting for iot dimmers [\#1210](https://github.com/python-kasa/python-kasa/pull/1210) (@rytilahti) - Expose PIR enabled setting for iot dimmers [\#1174](https://github.com/python-kasa/python-kasa/pull/1174) (@rytilahti) - Add childprotection module [\#1141](https://github.com/python-kasa/python-kasa/pull/1141) (@rytilahti) - Initial trigger logs implementation [\#900](https://github.com/python-kasa/python-kasa/pull/900) (@rytilahti) **Fixed bugs:** - Fix AES child device creation error [\#1220](https://github.com/python-kasa/python-kasa/pull/1220) (@sdb9696) **Project maintenance:** - Update TC65 fixture [\#1225](https://github.com/python-kasa/python-kasa/pull/1225) (@rytilahti) - Update smartcamera fixtures from latest dump\_devinfo [\#1224](https://github.com/python-kasa/python-kasa/pull/1224) (@sdb9696) - Add component queries to smartcamera devices [\#1223](https://github.com/python-kasa/python-kasa/pull/1223) (@sdb9696) - Update try\_connect\_all to be more efficient and report attempts [\#1222](https://github.com/python-kasa/python-kasa/pull/1222) (@sdb9696) - Use stacklevel=2 for warnings to report on callsites [\#1219](https://github.com/python-kasa/python-kasa/pull/1219) (@rytilahti) - parse\_pcap\_klap: various code cleanups [\#1138](https://github.com/python-kasa/python-kasa/pull/1138) (@rytilahti)
182 lines
4.1 KiB
TOML
182 lines
4.1 KiB
TOML
[project]
|
|
name = "python-kasa"
|
|
version = "0.7.7"
|
|
description = "Python API for TP-Link Kasa and Tapo devices"
|
|
license = {text = "GPL-3.0-or-later"}
|
|
authors = [ { name = "python-kasa developers" }]
|
|
readme = "README.md"
|
|
requires-python = ">=3.9,<4.0"
|
|
dependencies = [
|
|
"asyncclick>=8.1.7",
|
|
"pydantic>=1.10.15",
|
|
"cryptography>=1.9",
|
|
"async-timeout>=3.0.0",
|
|
"aiohttp>=3",
|
|
"typing-extensions>=4.12.2,<5.0",
|
|
"tzdata>=2024.2 ; platform_system == 'Windows'",
|
|
]
|
|
|
|
classifiers = [
|
|
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
speedups = ["orjson>=3.9.1", "kasa-crypt>=0.2.0"]
|
|
docs = ["sphinx~=5.0", "sphinx_rtd_theme~=2.0", "sphinxcontrib-programoutput~=0.0", "myst-parser", "docutils>=0.17"]
|
|
shell = ["ptpython", "rich"]
|
|
|
|
[project.urls]
|
|
"Homepage" = "https://github.com/python-kasa/python-kasa"
|
|
"Bug Tracker" = "https://github.com/python-kasa/python-kasa/issues"
|
|
"Documentation" = "https://python-kasa.readthedocs.io"
|
|
"Repository" = "https://github.com/python-kasa/python-kasa"
|
|
|
|
[project.scripts]
|
|
kasa = "kasa.cli.__main__:cli"
|
|
|
|
[tool.uv]
|
|
dev-dependencies = [
|
|
"pytest",
|
|
"pytest-cov",
|
|
"pytest-asyncio",
|
|
"pytest-sugar",
|
|
"pre-commit",
|
|
"voluptuous",
|
|
"toml",
|
|
"pytest-mock",
|
|
"codecov",
|
|
"xdoctest>=1.2.0",
|
|
"coverage[toml]",
|
|
"pytest-timeout~=2.0",
|
|
"pytest-freezer~=0.4",
|
|
"mypy~=1.0",
|
|
"pytest-xdist>=3.6.1",
|
|
"pytest-socket>=0.7.0",
|
|
]
|
|
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
include = [
|
|
"/kasa",
|
|
"/devtools",
|
|
"/docs",
|
|
"/CHANGELOG.md",
|
|
]
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
include = [
|
|
"/kasa",
|
|
]
|
|
exclude = [
|
|
"/kasa/tests",
|
|
]
|
|
|
|
[tool.coverage.run]
|
|
source = ["kasa"]
|
|
branch = true
|
|
omit = [
|
|
"kasa/tests/*",
|
|
"kasa/experimental/*"
|
|
]
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
# ignore debug logging
|
|
"if debug_enabled:",
|
|
# Don't complain if tests don't hit defensive assertion code:
|
|
"raise AssertionError",
|
|
"raise NotImplementedError",
|
|
# Don't complain about missing debug-only code:
|
|
"def __repr__",
|
|
# Have to re-enable the standard pragma
|
|
"pragma: no cover",
|
|
# TYPE_CHECKING and @overload blocks are never executed during pytest run
|
|
"if TYPE_CHECKING:",
|
|
"@overload"
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
markers = [
|
|
"requires_dummy: test requires dummy data to pass, skipped on real devices",
|
|
]
|
|
asyncio_mode = "auto"
|
|
asyncio_default_fixture_loop_scope = "function"
|
|
timeout = 10
|
|
addopts = "--disable-socket --allow-unix-socket"
|
|
|
|
[tool.doc8]
|
|
paths = ["docs"]
|
|
ignore = ["D001"]
|
|
ignore-path-errors = ["docs/source/index.rst;D000"]
|
|
|
|
|
|
[tool.ruff]
|
|
target-version = "py38"
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"D", # pydocstyle
|
|
"F", # pyflakes
|
|
"UP", # pyupgrade
|
|
"B", # flake8-bugbear
|
|
"SIM", # flake8-simplify
|
|
"FA", # flake8-future-annotations
|
|
"I", # isort
|
|
"S", # bandit
|
|
"PT", # flake8-pytest-style
|
|
"LOG", # flake8-logging
|
|
"G", # flake8-logging-format
|
|
]
|
|
ignore = [
|
|
"D105", # Missing docstring in magic method
|
|
"D107", # Missing docstring in `__init__`
|
|
]
|
|
|
|
[tool.ruff.lint.pydocstyle]
|
|
convention = "pep257"
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"kasa/tests/*.py" = [
|
|
"D100",
|
|
"D101",
|
|
"D102",
|
|
"D103",
|
|
"D104",
|
|
"S101", # allow asserts
|
|
"E501", # ignore line-too-longs
|
|
]
|
|
"docs/source/conf.py" = [
|
|
"D100",
|
|
"D103",
|
|
]
|
|
|
|
[tool.mypy]
|
|
warn_unused_configs = true # warns if overrides sections unused/mis-spelled
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = [ "kasa.tests.*", "devtools.*" ]
|
|
disable_error_code = "annotation-unchecked"
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = [
|
|
"devtools.bench.benchmark",
|
|
"devtools.parse_pcap",
|
|
"devtools.parse_pcap_klap",
|
|
"devtools.perftest",
|
|
"devtools.create_module_fixtures"
|
|
]
|
|
disable_error_code = "import-not-found,import-untyped"
|