Skip to content

Pin setuptools to a known working version #3007

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

Merged
merged 1 commit into from
Jul 18, 2024
Merged

Conversation

JCGoran
Copy link
Collaborator

@JCGoran JCGoran commented Jul 18, 2024

Same as #3006 but for master.
The problem happens when we build the docs (see for example here), with the strange stack trace:

  File "/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/setuptools/_core_metadata.py", line 284, in _distribution_fullname
    canonicalize_version(version, strip_trailing_zero=False),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'

I think the problem is this setuptools commit, in which they start using from packaging.utils import canonicalize_version, and since we install packaging==21.2 (see #2706 for the explanation), which doesn't have the argument strip_trailing_zero, we get the error above. Using an older version of setuptools fixes the issue.

Copy link

Copy link

✔️ 773adc7 -> Azure artifacts URL

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.28%. Comparing base (2c90971) to head (773adc7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3007      +/-   ##
==========================================
- Coverage   67.28%   67.28%   -0.01%     
==========================================
  Files         572      572              
  Lines      104965   104968       +3     
==========================================
  Hits        70627    70627              
- Misses      34338    34341       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JCGoran JCGoran marked this pull request as ready for review July 18, 2024 11:16
@JCGoran JCGoran requested review from pramodk, heerener and nrnhines July 18, 2024 11:17
@alkino
Copy link
Member

alkino commented Jul 18, 2024

Why do we install packaging seems to be part of setuptools.

@JCGoran
Copy link
Collaborator Author

JCGoran commented Jul 18, 2024

Why do we install packaging seems to be part of setuptools.

See #2706 for why we need a specific version of packaging.

@alkino
Copy link
Member

alkino commented Jul 18, 2024

Sad but ok.

@alkino alkino merged commit b925999 into master Jul 18, 2024
38 checks passed
@alkino alkino deleted the jelic/pin_setuptools branch July 18, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants