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

Remove support for Python 3.9 #2158

Merged
merged 4 commits into from
Oct 14, 2024
Merged

Remove support for Python 3.9 #2158

merged 4 commits into from
Oct 14, 2024

Conversation

ml-evs
Copy link
Member

@ml-evs ml-evs commented Oct 11, 2024

Closes #2149

  • Changes default Python version to 3.10
  • Updates all annotations to use "T | T'" syntax, especially "T | None" replacing Optional[T]
  • Modifies type adapter to correctly resolve new optional syntax for OPTIMADE schema types

Note that the JSON schema rep was unchanged here, so it might be beneficial to rewrite the type inference stuff to target the JSON schema directly in future (i.e., parsing the various anyOf bits when dealing with union types/optional fields).

EDIT: I'm going to merge this once the tests pass, but not sure if you'd want to give a cursory look at e814cd26305f8cd7e1f604e5b2462e1dc1328d55 @CasperWA -- essentially, switching all the model annotations to T | None-style caused the match with your custom UnionType to fail. I fiddled around a bit with the other types you defined, but seems like the constructs like the official types.UnionType don't exist in those cases.

@ml-evs ml-evs mentioned this pull request Oct 14, 2024
Copy link

codecov bot commented Oct 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.80%. Comparing base (4aaf1ff) to head (e814cd2).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2158      +/-   ##
==========================================
+ Coverage   90.79%   90.80%   +0.01%     
==========================================
  Files          75       75              
  Lines        4824     4819       -5     
==========================================
- Hits         4380     4376       -4     
+ Misses        444      443       -1     
Flag Coverage Δ
project 90.80% <100.00%> (+0.01%) ⬆️
validator 90.80% <100.00%> (+0.01%) ⬆️

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

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

@ml-evs ml-evs merged commit f02f8c8 into main Oct 14, 2024
12 checks passed
@ml-evs ml-evs deleted the ml-evs/deprecate-py39 branch October 14, 2024 11:10
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.

Deprecate Python 3.9
1 participant