From 1a3c73e42fa441a67b0e86a83cd01c27d124fbc5 Mon Sep 17 00:00:00 2001 From: Teemu R Date: Mon, 27 Sep 2021 19:10:05 +0200 Subject: [PATCH] Release 0.4.0 (#221) This is the first proper python-kasa release since forking from pyhs100. * Improved I/O handling, including asyncio interface, request merging & connection sharing * API improvements throughout the whole package * Support for LED strips * Improved bulb support (transitions, support for more models) * Onboarding is now possible without a mobile app * Improved documentation * And various other improvements, see the full changelog for details! Thanks to all contributors, from testers, and issue reporters to those who have submitted pull requests! Thanks also to those who donated test devices to help to make this release happen! Special thanks for this release go to @basnijholt (initial asyncio port, push to make this fork happen) and @bdraco (fixing the last release blocker, emeter support for powerstrips). If you are using python-kasa in your projects, we would be happy to hear about it. Feel free to post a note on Github discussions! If it is a project that could be interesting for other users and/or developers, feel also free to create a PR to add a short note to the README file. --- CHANGELOG.md | 24 +++++++++++++++++++++++- README.md | 4 ++-- RELEASING.md | 16 ++-------------- pyproject.toml | 3 ++- 4 files changed, 29 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18e0289c..61860716 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,35 @@ # Changelog +## [0.4.0](https://github.com/python-kasa/python-kasa/tree/0.4.0) (2021-09-26) + +[Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.4.0.dev5...0.4.0) + +**Implemented enhancements:** + +- Fix lock being unexpectedly reset on close [\#218](https://github.com/python-kasa/python-kasa/pull/218) ([bdraco](https://github.com/bdraco)) +- Avoid calling pformat unless debug logging is enabled [\#217](https://github.com/python-kasa/python-kasa/pull/217) ([bdraco](https://github.com/bdraco)) + +**Closed issues:** + +- Debug logging in protocol.py is the majority of the execution time [\#216](https://github.com/python-kasa/python-kasa/issues/216) + +**Merged pull requests:** + +- Add github workflow for pypi publishing [\#220](https://github.com/python-kasa/python-kasa/pull/220) ([rytilahti](https://github.com/rytilahti)) +- Add host information to protocol debug logs [\#219](https://github.com/python-kasa/python-kasa/pull/219) ([rytilahti](https://github.com/rytilahti)) + ## [0.4.0.dev5](https://github.com/python-kasa/python-kasa/tree/0.4.0.dev5) (2021-09-24) [Full Changelog](https://github.com/python-kasa/python-kasa/compare/0.4.0.dev4...0.4.0.dev5) +**Implemented enhancements:** + +- Keep connection open and lock to prevent duplicate requests [\#213](https://github.com/python-kasa/python-kasa/pull/213) ([bdraco](https://github.com/bdraco)) + **Merged pull requests:** +- Release 0.4.0.dev5 [\#215](https://github.com/python-kasa/python-kasa/pull/215) ([rytilahti](https://github.com/rytilahti)) - Add KL130 fixture, initial lightstrip tests [\#214](https://github.com/python-kasa/python-kasa/pull/214) ([rytilahti](https://github.com/rytilahti)) -- Keep connection open and lock to prevent duplicate requests [\#213](https://github.com/python-kasa/python-kasa/pull/213) ([bdraco](https://github.com/bdraco)) - Cleanup discovery & add tests [\#212](https://github.com/python-kasa/python-kasa/pull/212) ([rytilahti](https://github.com/rytilahti)) ## [0.4.0.dev4](https://github.com/python-kasa/python-kasa/tree/0.4.0.dev4) (2021-09-23) diff --git a/README.md b/README.md index e1136d1f..89e4f630 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ This project is a maintainer-made fork of [pyHS100](https://github.com/GadgetRea ## Getting started -You can install the most recent release using pip. Until +You can install the most recent release using pip: ``` -pip install python-kasa --pre +pip install python-kasa ``` Alternatively, you can clone this repository and use poetry to install the development version: diff --git a/RELEASING.md b/RELEASING.md index fc01a87d..adc8a05e 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -39,25 +39,13 @@ git fetch upstream git rebase upstream/master ``` -5. Tag the release (add short changelog as a tag commit message), push the tag to git +7. Tag the release (add short changelog as a tag commit message), push the tag to git ```bash git tag -a $NEW_RELEASE git push upstream $NEW_RELEASE ``` -7. Upload new version to pypi - -If not done already, create an API key for pypi (https://pypi.org/manage/account/token/) and configure it: -``` -poetry config pypi-token.pypi -``` - -To build & release: - -```bash -poetry build -poetry publish -``` +All tags on master branch will trigger a new release on pypi. 8. Click the "Draft a new release" button on github, select the new tag and copy & paste the changelog into the description. diff --git a/pyproject.toml b/pyproject.toml index efcf92bd..37542906 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "python-kasa" -version = "0.4.0.dev5" +version = "0.4.0" description = "Python API for TP-Link Kasa Smarthome devices" license = "GPL-3.0-or-later" authors = ["Your Name "] @@ -9,6 +9,7 @@ readme = "README.md" packages = [ { include = "kasa" } ] +include = ["CHANGELOG.md"] [tool.poetry.scripts] kasa = "kasa.cli:cli"