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

Update Python v3.10.4 to add hatchling build backend #16402

Conversation

SebastianAchilles
Copy link
Member

(created using eb --new-pr)

This MR is in draft, because it is meant as a proposal which we would need to discuss.

Currently the hatchling build backend is not supported in Python. It is not possible to add hatchling as PythonBundle, because hatchling and Poetry 1.1.13 will exclude each other.

Since a few python packages are switching to hatchling as build backend, not supporting hatchling would mean that we can not use the latesst version of these packages.

Changes:

  • pathspec 0.9.0 -> 0.10.1
  • packaging 20.9 -> 21.3
  • platformdirs 2.4.1 -> 2.5.0
  • tomlkit 0.10.2 -> 0.11.4
  • shellingham 1.4.0 -> 1.5.0
  • jsonschema 4.4.0 -> 4.16.0
  • poetry-core 1.0.8 -> 1.1.0
  • cleo 0.8.1 -> 1.0.0a5
  • poetry 1.1.13 -> 1.2.0

Additional new extensions:

  • hatchling 1.9.0
  • hatch_vcs 0.2.0
  • hatch_fancy_pypi_readme 22.7.0
  • dulwich 0.20.46
  • poetry-plugin-export 1.0.6

@SebastianAchilles
Copy link
Member Author

Test report by @SebastianAchilles
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
zen2-ubuntu-eb - Linux Ubuntu 22.04, x86_64, AMD EPYC 7452 32-Core Processor (zen2), Python 3.10.6
See https://gist.github.com/bda2c7882b348b139a71735dbdd62143 for a full test report.

@SebastianAchilles
Copy link
Member Author

Test report by @SebastianAchilles
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
bdw-opensuse-154 - Linux openSUSE Leap 15.4, x86_64, Intel(R) Core(TM) i7-6900K CPU @ 3.20GHz (broadwell), Python 3.6.15
See https://gist.github.com/65574b9e67100130955e192f379a4028 for a full test report.

@SebastianAchilles
Copy link
Member Author

@boegelbot please test @ jsc-zen2
EB_ARGS="--installpath /tmp/pr16402"

@boegelbot
Copy link
Collaborator

@SebastianAchilles: Request for testing this PR well received on jsczen2l1.int.jsc-zen2.easybuild-test.cluster

PR test command 'EB_PR=16402 EB_ARGS="--installpath /tmp/pr16402" /opt/software/slurm/bin/sbatch --job-name test_PR_16402 --ntasks=8 ~/boegelbot/eb_from_pr_upload_jsc-zen2.sh' executed!

  • exit code: 0
  • output:
Submitted batch job 1693

Test results coming soon (I hope)...

- notification for comment with ID 1277875015 processed

Message to humans: this is just bookkeeping information for me,
it is of no use to you (unless you think I have a bug, which I don't).

@boegelbot
Copy link
Collaborator

Test report by @boegelbot
SUCCESS
Build succeeded for 1 out of 1 (1 easyconfigs in total)
jsczen2c1.int.jsc-zen2.easybuild-test.cluster - Linux Rocky Linux 8.5, x86_64, AMD EPYC 7742 64-Core Processor (zen2), Python 3.6.8
See https://gist.github.com/5497077310bde29d1235148602afcaa1 for a full test report.

@boegel
Copy link
Member

boegel commented Oct 13, 2022

@SebastianAchilles This is a pretty painful change to make at this point (especially because rebuilding on existing installation of Python 3.10.4 will have a big impact).

Can you elaborate on this remark?

hatchling and Poetry 1.1.13 will exclude each other

@SebastianAchilles
Copy link
Member Author

@SebastianAchilles This is a pretty painful change to make at this point (especially because rebuilding on existing installation of Python 3.10.4 will have a big impact).

Yes, I understand. My idea was to open this MR to be able to have a discussion. If we decide to close this MR, it could still be helpful for Python in a future toolchain version.

Can you elaborate on this remark?

hatchling and Poetry 1.1.13 will exclude each other

Poetry 1.1.13 has requirement packaging<21.0,>=20.4 (https://github.com/easybuilders/easybuild-easyconfigs/blob/develop/easybuild/easyconfigs/p/Python/Python-3.10.4-GCCcore-11.3.0.eb#L200) while hatchling has the requirement packaging>=21.3.

@ofek
Copy link

ofek commented Oct 17, 2022

Hatchling will soon require 22.0 when released pypa/packaging#569 (comment)

@SebastianAchilles
Copy link
Member Author

Short update: At JSC we decided to use this patched Python easyconfig to support hatchling, c.f. https://github.com/easybuilders/JSC/blob/2023/Golden_Repo/p/Python/Python-3.10.4-GCCcore-11.3.0.eb

@boegel
Copy link
Member

boegel commented Nov 23, 2022

@SebastianAchilles hatchling is included in the Python 3.10.8 easyconfig that was merged in #16632, so we'll have it going forward.
For the older Python easyconfigs, it's probably to painful to introduce it there, so I think this PR should be closed.

For software built on top of a toolchain that uses a Python that doesn't provide hatchling yet, it looks like you can relatively easily opt-out of using hatchling by patching the pyproject.toml to use setuptools as a backend instead, see for example https://github.com/easybuilders/easybuild-easyconfigs/pull/16712/files

@ofek
Copy link

ofek commented Nov 23, 2022

Note that file inclusion logic/options are backend-specific

@SebastianAchilles
Copy link
Member Author

Closing, because Python in the 2022b toolchain generation includes hatchling: https://github.com/easybuilders/easybuild-easyconfigs/blob/develop/easybuild/easyconfigs/p/Python/Python-3.10.8-GCCcore-12.2.0.eb#L205

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants