ENH: drop python 3.8, 3.9 and support 3.13#368
Conversation
|
@evvaaaa any suggestions? Apparently some fields have been changed from |
evvaaaa
left a comment
There was a problem hiding this comment.
This would be nice, however, bluesky supports 3.9 still, and event-model is a required dependency. I wouldn't be happy updating this without also dropping 3.9 from bluesky.
There's a PR open for that. Once that's merged, this can be merged as well safely I believe |
evvaaaa
left a comment
There was a problem hiding this comment.
To be merged alongside the bluesky update.
Happy new year to you too 🥳 Cool, happy for this to be merged. Can you rebase and squash it? |
|
@evvaaaa it seems the latest release of datamodel-code-generator is switching entirely to ruff for formatting; is it ok for me to adapt that change to this PR? EDIT: according to the error message the warning can be suppressed by explicitly setting the formatters in the generate function. Since event-model is already using ruff, I can simply add it in the API call |
|
Ah, nevermind, the test actually fails because |
|
Some of our changes to datamodel-code-generator have also been merged. I can make an issue, will let us cut down on custom jinja. For now we just fix it by doing what they suggest. |
|
@evvaaaa I applied their suggestion locally; trouble is that it produces a series of exceptions. Copy-pasting the local output of my The specific exception of the exception group is raised 10 times in total (a.k.a. for each JSON schema document currently generated, except for the |
|
I suppressed the warning on the |
|
The failing type checking test is caused by the fact that the latest version of What's your reccomendation? Can this be added as an ignore for mypy? Although the more I progress with this PR the more troublesome it becomes... EDIT: maybe it could be solved via editing the ninja template |
|
I opened #2951 to see how to suppress this. Most probably it will involve adapting the template. |
|
@evvaaaa I can vendor the original I get the impression that |
|
@evvaaaa #2951 has been resolved with |
evvaaaa
left a comment
There was a problem hiding this comment.
Thanks for this, turned into a much larger PR than anticipated :)
|
Maybe do the rebase an push here before merging, I'm not sure what is out of sync 🤔 |
- Remove support for Python 3.8 and 3.9 - Add support for Python 3.13 - Update CI workflows - Remove importlib-resources dependency - Pin datamodel version - Don't generate closed=True for TypedDict (unsupported by mypy) - Remove unused templates - Use | instead of typing.Union in base models - Fix string template for better clarity
|
Done; last update was 5 months ago anyway... :U |
|
Will do a minor release as soon as bluesky does. |
Description
Closes #367 and #354
Motivation and Context
Python 3.9 reaches EOL end of this month; this is an attempt to mirror bluesky repo.
Currently blocked by #1959How Has This Been Tested?
Tested locally but some changes due to autogenerating typed dictionary models are fishy.