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

Regenerate all Python tool lock-files (updating many) and update to pip_version = 24.0, for Py 3.12 support #20365

Merged
merged 3 commits into from
Feb 29, 2024

Conversation

huonw
Copy link
Contributor

@huonw huonw commented Jan 4, 2024

This does three things to fix #20354 and give Pants Python 3.12 support by default:

  • update the default [python].pip_version value to 24.0 (from 23.1.2), which is the current latest and is after 23.2, which is the first that supports Python 3.12
  • run pants run build-support/bin/generate_builtin_lockfiles.py -- --all-python to update all tool lockfiles... this involves updating many tools, as a Big Bang, which is potentially unhelpful.
  • to make this work, docformatter has to be restricted to the current version 1.4: 1.5.1 (the newest version that satisfies the old constraints) crashes on Pants itself (IndexError: list index out of range on pre-commit PyCQA/docformatter#151), while 1.7.5 (the newest version) also doesn't work on Pants (Update builtin docformatter to 1.7.5 #20498)

Here's a list of (as best I can tell), the changes in versions for the "main" requirement for each subsystem:

subsystem options scope main requirement old version new version
helm-k8s-parser hikaru 0.11.0b0 0.16.0b0
helm-post-renderer yamlpath 3.7.0 3.8.1
autoflake autoflake 2.0.1 2.1.1
bandit bandit 1.7.4 1.7.5
black black 23.1.0 23.3.0
pyupgrade pyupgrade 3.3.1 3.3.2
ruff ruff 0.2.1 0.2.2
yapf yapf 0.32.0 0.40.2
coverage-py coverage 7.2.1 7.2.7
debugpy debugpy 1.6.6 1.6.7.post1
mypy mypy 1.1.1 1.4.1
terraform-hcl2-parser python-hcl2 4.3.0 4.3.2
yamllint yamllint 1.29.0 1.32.0

There's numerous other transitive dependencies updated too, including in subsystems for which the main requirement hasn't changed and aren't listed above.

I haven't checked changelogs for any of these.

I've confirmed that running the reproducer from #20354 with this code now works. The commits are 'sensible'.

@huonw

This comment was marked as resolved.

@huonw

This comment was marked as resolved.

@cburroughs
Copy link
Contributor

this involves updating many tools, as a Big Bang, which is potentially unhelpful.

In that it pulls in more updates than are strictly needed just for 3.12 compatibility?

@huonw
Copy link
Contributor Author

huonw commented Jan 4, 2024

Yeah, exactly.

@huonw

This comment was marked as resolved.

@huonw

This comment was marked as resolved.

@huonw huonw changed the title Regenerate all Python tool lock-files (updating many) and update to pip_version = 23.2, for Py 3.12 support Regenerate all Python tool lock-files (updating many) and update to pip_version = 24.0, for Py 3.12 support Feb 28, 2024
@huonw huonw marked this pull request as ready for review February 28, 2024 05:55
Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you ❤️

@purajit
Copy link
Contributor

purajit commented Aug 27, 2024

I just noticed this because I was changing some settings and accidentally used the pants-provided lockfile instead of my own.

python-hcl2 should be pinned to <=4.3.0, since there's a huge host of parsing issues with 4.3.2. Basically everything here.

@huonw
Copy link
Contributor Author

huonw commented Aug 27, 2024

@purajit are you in a position to submit a fix along those lines? Thanks

@purajit
Copy link
Contributor

purajit commented Aug 28, 2024

@purajit are you in a position to submit a fix along those lines? Thanks

On it! Just wanted to be sure there wasn't an explicit reason to go to 4.3.2 besides just being newer. I also see there was a new version a couple weeks ago - going to check that out.

@purajit
Copy link
Contributor

purajit commented Aug 29, 2024

Made a PR ^

huonw pushed a commit that referenced this pull request Aug 29, 2024
…arsing issues (#21361)

`python-hcl2` 4.3.1+ has some serious issues with parsing certain kinds
of expressions, like multi-line
ternaries. The issues opened can be seen
[here](https://github.com/amplify-education/python-hcl2/issues?q=is%3Aissue+is%3Aopen+%22unexpected+token%22).

It looks like 4.3.5 has fixed a bunch of the issues, but I'm still
seeing some errors on our repo, and I think
it's better to keep to 4.3.0 until the authors of the issues close them
and we're sure there are no regressions.

Also, 4.3.0 is still compatible with py3.12, so it doesn't undo the
efforts of #20365.

Generated with `pants run
build-support/bin/generate_builtin_lockfiles.py --
terraform-hcl2-parser`.
WorkerPants pushed a commit that referenced this pull request Aug 29, 2024
…arsing issues (#21361)

`python-hcl2` 4.3.1+ has some serious issues with parsing certain kinds
of expressions, like multi-line
ternaries. The issues opened can be seen
[here](https://github.com/amplify-education/python-hcl2/issues?q=is%3Aissue+is%3Aopen+%22unexpected+token%22).

It looks like 4.3.5 has fixed a bunch of the issues, but I'm still
seeing some errors on our repo, and I think
it's better to keep to 4.3.0 until the authors of the issues close them
and we're sure there are no regressions.

Also, 4.3.0 is still compatible with py3.12, so it doesn't undo the
efforts of #20365.

Generated with `pants run
build-support/bin/generate_builtin_lockfiles.py --
terraform-hcl2-parser`.
WorkerPants pushed a commit that referenced this pull request Aug 29, 2024
…arsing issues (#21361)

`python-hcl2` 4.3.1+ has some serious issues with parsing certain kinds
of expressions, like multi-line
ternaries. The issues opened can be seen
[here](https://github.com/amplify-education/python-hcl2/issues?q=is%3Aissue+is%3Aopen+%22unexpected+token%22).

It looks like 4.3.5 has fixed a bunch of the issues, but I'm still
seeing some errors on our repo, and I think
it's better to keep to 4.3.0 until the authors of the issues close them
and we're sure there are no regressions.

Also, 4.3.0 is still compatible with py3.12, so it doesn't undo the
efforts of #20365.

Generated with `pants run
build-support/bin/generate_builtin_lockfiles.py --
terraform-hcl2-parser`.
huonw pushed a commit that referenced this pull request Aug 29, 2024
…arsing issues (Cherry-pick of #21361) (#21364)

`python-hcl2` 4.3.1+ has some serious issues with parsing certain kinds
of expressions, like multi-line
ternaries. The issues opened can be seen
[here](https://github.com/amplify-education/python-hcl2/issues?q=is%3Aissue+is%3Aopen+%22unexpected+token%22).

It looks like 4.3.5 has fixed a bunch of the issues, but I'm still
seeing some errors on our repo, and I think
it's better to keep to 4.3.0 until the authors of the issues close them
and we're sure there are no regressions.

Also, 4.3.0 is still compatible with py3.12, so it doesn't undo the
efforts of #20365.

Generated with `pants run
build-support/bin/generate_builtin_lockfiles.py --
terraform-hcl2-parser`.

Co-authored-by: purajit <[email protected]>
huonw pushed a commit that referenced this pull request Sep 9, 2024
…arsing issues (Cherry-pick of #21361) (#21365)

`python-hcl2` 4.3.1+ has some serious issues with parsing certain kinds
of expressions, like multi-line
ternaries. The issues opened can be seen
[here](https://github.com/amplify-education/python-hcl2/issues?q=is%3Aissue+is%3Aopen+%22unexpected+token%22).

It looks like 4.3.5 has fixed a bunch of the issues, but I'm still
seeing some errors on our repo, and I think
it's better to keep to 4.3.0 until the authors of the issues close them
and we're sure there are no regressions.

Also, 4.3.0 is still compatible with py3.12, so it doesn't undo the
efforts of #20365.

Generated with `pants run
build-support/bin/generate_builtin_lockfiles.py --
terraform-hcl2-parser`.

Co-authored-by: purajit <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Most built-in tool lockfiles do not work with Python 3.12
4 participants