Vendor a copy of tomli in easybuild.tools.tomllib#5063
Vendor a copy of tomli in easybuild.tools.tomllib#5063boegel merged 5 commits intoeasybuilders:developfrom
tomli in easybuild.tools.tomllib#5063Conversation
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.
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)