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 #553

Merged
merged 1 commit into from
Aug 9, 2023
Merged

Add support for Python 3.12 #553

merged 1 commit into from
Aug 9, 2023

Conversation

cdce8p
Copy link
Contributor

@cdce8p cdce8p commented Aug 6, 2023

Proposed change

  • Add Python 3.12 as test environment for Github Actions
  • Add classifier for Python 3.12
  • Fix deprecations
    • Replace pkg_resources with importlib.metadata / importlib_metadata (for < 3.8)
    • Replace datetime.utcnow() with datetime.now(tz=timezone.utc)
    • Replace datetime.utcfromtimestamp(...) with datetime.fromtimestamp(..., tz=timezone.utc)

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to this library)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Checklist

  • The code change is tested and works locally.
  • Tests have been added to verify that the new code works.

@codecov
Copy link

codecov bot commented Aug 6, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (95cd1de) 100.00% compared to head (44001bc) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #553   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           18        18           
  Lines         1504      1504           
=========================================
  Hits          1504      1504           
Flag Coverage Δ
3.10 100.00% <100.00%> (ø)
3.11 100.00% <100.00%> (ø)
3.12 100.00% <100.00%> (?)
3.7 100.00% <100.00%> (ø)
3.8 100.00% <100.00%> (ø)
3.9 100.00% <100.00%> (ø)

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

Files Changed Coverage Δ
bimmer_connected/api/authentication.py 100.00% <100.00%> (ø)
bimmer_connected/api/utils.py 100.00% <100.00%> (ø)
bimmer_connected/vehicle/location.py 100.00% <100.00%> (ø)

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

Copy link
Member

@rikroe rikroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Python 3.12 RC 1 is not even a day old and we already got a PR to support it, many thanks 🎉

Looks all good to me, but I'll keep it open for a short while. I was just yesterday thinking about removing official Python 3.7 support and all the deprecation warnings we have in our code.

Removal of Python 3.7 would require the separate importlib-metadata anymore, however I'll proably won't make it until the next weekend.

@cdce8p
Copy link
Contributor Author

cdce8p commented Aug 6, 2023

I was just yesterday thinking about removing official Python 3.7 support and all the deprecation warnings we have in our code.

Removal of Python 3.7 would require the separate importlib-metadata anymore, however I'll proably won't make it until the next weekend.

Should I update the PR to remove importlib-metadata? I think it should be easy enough to do even after this PR is merged.

@rikroe
Copy link
Member

rikroe commented Aug 6, 2023

No need - I'll merge your PR first and then remove Python 3.7. Just want to make sure I've got some time and can do all at once.

@rikroe rikroe merged commit b036c25 into bimmerconnected:master Aug 9, 2023
14 checks passed
@cdce8p cdce8p deleted the python-312 branch August 9, 2023 20:45
@rikroe rikroe mentioned this pull request Aug 9, 2023
6 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Aug 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants