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
Deprecate [python].lockfile_generator
#16418
Deprecate [python].lockfile_generator
#16418
Conversation
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
removal_hint=softwrap( | ||
f""" | ||
Pants will soon only support generating lockfiles via the Pex format, given the several | ||
limitations of Poetry listed in this option. |
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.
This might be read as insulting to Poetry. Maybe some softer phrasing such as "as Poetry is not a good a fit for Pants's needs."
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.
Thanks, good point! PTAL
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
{doc_url("python-third-party-dependencies#manually-generating-lockfiles")} for more | ||
information. | ||
|
||
While Pex generates locks in a proprietary JSON format, you can use the |
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.
How is this relevant? The relevant bit is that Pants uses a proprietary header. If it didn't you could use pex ...
to interact with the lock file directly. This is the same as if Pants used proprietary Poetry lockfiles, etc.
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.
I was thinking about @asherf's experience migrating from Poetry to Pex. His main issue was how to integrate w/ pip-audit, and he had no idea how to approach it. So I want to mention integrations like this.
I could add a sentence mentioning this?
Alternatively, you can temporarily remove Pants's comment header and run
pex3 lock export path/to/lock_file.lock
.
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.
I have no string opinion on what you write, I just am fairly insistent its true / relevant and the bit you have was not.
Poetry lockfile generation via Pants has several issues, including: * transitive deps often have bad environment markers * `[python-repos]` is not hooked up * `[GLOBAL].ca_certs_path` is not hooked up * VCS and local requirements don't work * Poetry writes to a cache not controlled by Pants, due to their bug * pantsbuild#15315 * pantsbuild#15171 * pantsbuild#14020 Some of these are fixable, whether by the upcoming Poetry 1.2 or by us investing more time. However—given the project's limited resources—it is not beneficial enough to lean into Poetry lockfile generation. Poetry was always seen as a bridge technology while we developed Pex lockfiles, which now meet all of Pantsbuild's requirements. ## Keeps manually generated lockfiles Users can still manually generate requirements.txt-style lockfiles. This is an important escape hatch if Pex lockfiles don't work for someone, and it eases migration from e.g. Poetry projects still using poetry.lock. We may want to revisit this decision and require Pex lockfiles in the future, but that is a later decision. [ci skip-rust]
Poetry lockfile generation via Pants has several issues, including:
[python-repos]
is not hooked up[GLOBAL].ca_certs_path
is not hooked uppoetry<=1.2.0b1
does not distinguish betweenalpha
anddev
releases #15315Requires-Python
(ICs), which can fail. #15171Some of these are fixable, whether by the upcoming Poetry 1.2 or by us investing more time. However—given the project's limited resources—it is not beneficial enough to lean into Poetry lockfile generation. Poetry was always seen as a bridge technology while we developed Pex lockfiles, which now meet all of Pantsbuild's requirements.
Keeps manually generated lockfiles
Users can still manually generate requirements.txt-style lockfiles. This is an important escape hatch if Pex lockfiles don't work for someone, and it eases migration from e.g. Poetry projects still using poetry.lock.
We may want to revisit this decision and require Pex lockfiles in the future, but that is a later decision.
[ci skip-rust]