-
Notifications
You must be signed in to change notification settings - Fork 29
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
Update generator to work with python 3.12 #242
Conversation
`imp` has been removed in python 3.12. I switched to the replacement suggested in the release notes. See: https://docs.python.org/3.12/whatsnew/3.12.html#imp While I did not test previous python versions, the replacement function `types.ModuleType` is available since at least python 3.4 Signed-off-by: Eike S R <eike.roehrs@gmail.com>
Signed-off-by: Eike S R <eike.roehrs@gmail.com>
`flatdata::generate` (see: `lib/src/generator.rs`) uses `pip` to install the flatdata generator. Concurrent calls to build it from source cause it to fail. Signed-off-by: Eike S R <eike.roehrs@gmail.com>
Confirmed the pip parallel local build issue: pypa/pip#8168 |
Changing the build system backend for the flatdata-generator to hatchling seems to allow parallel builds from source again. See: https://pip.pypa.io/en/stable/topics/local-project-installs/#build-artifacts on why it doesn't work with setuptools. TODO: Still needs some cleanup before being ready Signed-off-by: Eike S R <eike.roehrs@gmail.com>
Signed-off-by: Eike S R <eike.roehrs@gmail.com>
Now worked around the new setuptools+pip limitation (https://pip.pypa.io/en/stable/topics/local-project-installs/#build-artifacts) by switching to hatchling. Verified that the generated package is good (all files are present, seems to be usable). One of you needs to upload the new version, once this is in |
95bd3a6
to
7d80162
Compare
As for the other python package(s?) under I will, however, file a follow-up MR for upgrading the generator version used in the other packages. And maybe in that one change the build backend for them to hatchling, too, so that it is not a wild mix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGT
imp
has been removed in python 3.12. I switched to the replacement suggested in the release notes. See: https://docs.python.org/3.12/whatsnew/3.12.html#impWhile I did not test previous python versions, the replacement function
types.ModuleType
is available since at least python 3.4.Please have a look