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

generate_builtin_lockfiles.py does not work with lockfile diff #21388

Closed
cburroughs opened this issue Sep 10, 2024 · 0 comments · Fixed by #21407
Closed

generate_builtin_lockfiles.py does not work with lockfile diff #21388

cburroughs opened this issue Sep 10, 2024 · 0 comments · Fixed by #21407
Labels

Comments

@cburroughs
Copy link
Contributor

Describe the bug

When using the generate_builtin_lockfiles.py script, all dependencies appear as 'Added' instead of the nice Upgraded diff.

pants run build-support/bin/generate_builtin_lockfiles.py --  --all-python

Yields a very long set of output along the lines of:

Lockfile diff: ipython.lock [ipython]
                                                                  
==                      Added dependencies                      ==

  appnope                        0.1.4
  asttokens                      2.4.1
  backcall                       0.2.0
  decorator                      5.1.1
  executing                      2.1.0
  ipython                        8.12.3
  jedi                           0.19.1
  matplotlib-inline              0.1.7
  parso                          0.8.4
  pexpect                        4.9.0
  pickleshare                    0.7.5
  prompt-toolkit                 3.0.47
  ptyprocess                     0.7.0
  pure-eval                      0.2.3
  pygments                       2.18.0
  six                            1.16.0
  stack-data                     0.6.3
  traitlets                      5.14.3
  typing-extensions              4.12.2
  wcwidth                        0.2.13

Pants version
HEAD

@cburroughs cburroughs added the bug label Sep 10, 2024
cburroughs added a commit to cburroughs/pants that referenced this issue Sep 10, 2024
As a consequence, most tests no longer work with 3.7 since -- for
example -- the lockfile with pytest does not support 3.7.  This
downgrades 3.7 to "probably works but not well tested", which
is the same state as 3.6.  Since 3.7 has been EoL for over a year I
think this is reasonable.  This opens up the way for Python 3.13
support in lockfiles among other benefits.

As another consequence, lockfiles are regenerated which means we have
some new versions coming along for the ride.  The pretty lockfile diff
does not seem to work with the generation script though --> pantsbuild#21388

Uses of Pants can still use 3.7 by generating their own
lockfiles. Deprecation plan annouced at
https://www.pantsbuild.org/blog/2024/08/24/venerable-pythons

Based off work started in pantsbuild#21314

ref pantsbuild#21184, pantsbuild#21103, pantsbuild#20852
cburroughs added a commit that referenced this issue Sep 12, 2024
As a consequence, most tests no longer work with 3.7 since -- for
example -- the lockfile with pytest does not support 3.7. This
downgrades 3.7 to "probably works but not well tested", which is the
same state as 3.6. Since 3.7 has been EoL for over a year I think this
is reasonable. This opens up the way for Python 3.13 support in
lockfiles among other benefits.

As another consequence, lockfiles are regenerated which means we have
some new versions coming along for the ride. The pretty lockfile diff
does not seem to work with the generation script though --> #21388

Uses of Pants can still use 3.7 by generating their own lockfiles.
Deprecation plan announced at
https://www.pantsbuild.org/blog/2024/08/24/venerable-pythons

Based off work started in #21314

ref #21184, #21103, #20852
cburroughs added a commit to cburroughs/pants that referenced this issue Sep 13, 2024
By copying the prior version, we get the same Lockfile diff as one
would for a "regular" lockfile.

Demo:
```
$ pants run build-support/bin/generate_builtin_lockfiles.py -- semgrep
Lockfile diff: semgrep.lock [semgrep]

==                    Upgraded dependencies                     ==

  semgrep                        1.86.0       -->   1.87.0
  zipp                           3.20.1       -->   3.20.2

==                !! Downgraded dependencies !!                 ==

  rich                           13.8.1       -->   13.5.3

==                     Removed dependencies                     ==

  annotated-types                0.7.0
  pydantic                       2.8.2
  pydantic-core                  2.20.1
```

fixes pantsbuild#21388
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 a pull request may close this issue.

1 participant