Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.12 #685

Merged
merged 11 commits into from
Oct 14, 2023
Merged

Add support for Python 3.12 #685

merged 11 commits into from
Oct 14, 2023

Conversation

amotl
Copy link
Member

@amotl amotl commented Oct 14, 2023

About

Python 3.12 has been released recently. This patch attempts to add corresponding support.

Details

  • For loading code at runtime, use importlib instead of imp.
    The imp module was deprecated and got removed from Python 3.12.
  • Use importlib.resources instead of deprecated pkg_resources.
  • Remove dependency on future package, for http and pushsafer service plugins.
  • Upgrade to pyfakefs<6.
  • Skip installing and testing twilio on Python 3.12.

Trivia

Start omitting intermediate Python versions on CI, to save resources.

@amotl
Copy link
Member Author

amotl commented Oct 14, 2023

aiohttp needs to be made compatible with Python 3.12. It is pulled in by the twilio package.

Failed to build aiohttp

@codecov
Copy link

codecov bot commented Oct 14, 2023

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (ebad591) 49.54% compared to head (01f9a57) 49.75%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #685      +/-   ##
==========================================
+ Coverage   49.54%   49.75%   +0.20%     
==========================================
  Files          81       81              
  Lines        3996     4034      +38     
==========================================
+ Hits         1980     2007      +27     
- Misses       2016     2027      +11     
Flag Coverage Δ
unittests 49.75% <80.68%> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
mqttwarn/core.py 99.55% <100.00%> (+<0.01%) ⬆️
mqttwarn/services/amqp.py 100.00% <100.00%> (ø)
mqttwarn/util.py 98.10% <94.00%> (-1.90%) ⬇️
mqttwarn/services/pushsafer.py 97.24% <66.66%> (-2.76%) ⬇️
mqttwarn/services/http_urllib.py 13.97% <28.57%> (+0.34%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@amotl amotl force-pushed the python312 branch 2 times, most recently from 2b67c1b to dcd8163 Compare October 14, 2023 19:29
@amotl amotl force-pushed the python312 branch 4 times, most recently from c8f19a0 to 948f526 Compare October 14, 2023 21:37
@amotl amotl requested review from jpmens and sumnerboy12 October 14, 2023 21:56
@amotl amotl marked this pull request as ready for review October 14, 2023 22:24
@amotl amotl merged commit f82b86b into main Oct 14, 2023
@amotl amotl deleted the python312 branch October 14, 2023 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant