-
Notifications
You must be signed in to change notification settings - Fork 217
Vendor a copy of tomli in easybuild.tools.tomllib
#5063
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
Conversation
36df64c to
921dc88
Compare
|
@Flamefire Can you clarify why this requires switching to |
tomli in easybuild.tools.tomllib
|
Without setuptools you'd need to list all "packages" in the What were those issues and are they still relevant? Our usage here might have changed enough that we are "standard" enough not to run into them (anymore). Especially if those issues were from the Python 2 days. Seems most advise using setuptools unconditionally (if not even pyproject.toml) for non-ancient Pythons An alternative if you really want to play it safe:
But I'd really like to avoid error-prone adding (more) things to a hard-coded list if possible. |
Can be imported as `easybuild.tools.tomllib` and will use the official `tomllib` package on Python 3.11.
boegel
left a comment
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.
lgtm
Include https://github.com/hukkin/tomli/tree/2.3.0 in easybuild as
easybuild.tools.tomllibwhich will be replace bytomllibin Python 3.11+Slightly patched to make it compatible with Python 3.6:
tuple[int, int] -> tuple)/, *in function params (end of positional args)I copied the example from toml.io which (hopefully) triggers most code parts of the library to shake out any issues.
I decided for
tomliinstead of extractingtomllibfrom CPython because of its goal:It currently doesn't support Python 3.6 but 3.8 so we can use it when dropping Python < 3.9
Requires:
Switch to setuptools andfind_packages#5065 (simplify withfind_packagesto avoid listing the new ones)pyenv#5064 (test with Python 3.6 to ensure compatibility)