HAP-python icon indicating copy to clipboard operation
HAP-python copied to clipboard

Modernize packaging + drop support for 3.7 and 3.8

Open cdce8p opened this issue 6 months ago • 4 comments

  • Move metadata from setup.py to pyproject.toml
  • Drop support for outdated Python versions: 3.7 and 3.8
  • Remove REQUIRED_PYTHON_VER from pyhap.const. It's only stored in the project metadata now.
  • Update workflow files + add recent Python releases to test matrix (up to 3.13)
  • Adjust tests for recent changes in pytest-asyncio and resolve test warnings
  • Update formatting with black 25.1.0
  • Replace async_timeout with asyncio.timeout on Python 3.11+

Metadata diff

 ...
-License: Apache-2.0
+License-Expression: Apache-2.0
+Author: Ivan Kalchev
-Home-page: https://github.com/ikalchev/HAP-python
-Project-URL: Source, https://github.com/ikalchev/HAP-python/tree/master
+Project-URL: Source, https://github.com/ikalchev/HAP-python
 Project-URL: Bug Reports, https://github.com/ikalchev/HAP-python/issues
 Project-URL: Documentation, http://hap-python.readthedocs.io/en/latest/
 ...
-Classifier: License :: OSI Approved :: Apache Software License
 ...
-Classifier: Programming Language :: Python :: 3.5
-Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.7
-Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
+Classifier: Programming Language :: Python :: 3.11
+Classifier: Programming Language :: Python :: 3.12
+Classifier: Programming Language :: Python :: 3.13
 ...
-Requires-Python: >=3.7
+Requires-Python: >=3.9
 ...
 License-File: LICENSE
+License-File: AUTHORS
-Requires-Dist: async_timeout
+Requires-Dist: async_timeout; python_version < "3.11"
 ...

cdce8p avatar Jun 16 '25 14:06 cdce8p

This should unblock most of the CI jobs. Only the coverage job is still failing. @bdraco Would you mind taking a look at this?

cdce8p avatar Jun 16 '25 14:06 cdce8p

Sorry, I don't have merge rights on this repo.

bdraco avatar Jun 16 '25 14:06 bdraco

Sorry, I don't have merge rights on this repo.

Just remember that you approved one of my PRs but checking looking back at #484 it was indeed merged by Ivan. Sorry for the confusion.

cdce8p avatar Jun 16 '25 15:06 cdce8p

Hi all, will review and merge soon

ikalchev avatar Jun 16 '25 16:06 ikalchev

@ikalchev Did you have time to take a look at this yet?

cdce8p avatar Aug 05 '25 18:08 cdce8p

@cdce8p I really apologise, I totally forgot. Let me spend time on it till end of the week and will keep you posted.

ikalchev avatar Aug 07 '25 19:08 ikalchev

@cdce8p change is splendid, thanks for the good work and again apologies for the long delay.

I will try to make a release over the weekend so these can be consumed upstream.

ikalchev avatar Aug 15 '25 18:08 ikalchev

@cdce8p just released (under 5.0.0). It has been awhile, I should probably give someone "release" rights so I don't slow things down. Let me know if there are issues.

ikalchev avatar Aug 25 '25 12:08 ikalchev

@cdce8p just released (under 5.0.0). It has been awhile, I should probably give someone "release" rights so I don't slow things down. Let me know if there are issues.

Awesome thanks! Would you mind creating a tag (and maybe a release) for it? That will make it easier to compare the releases and link to it (for the Home Assistant PR).

cdce8p avatar Aug 25 '25 15:08 cdce8p