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

[python-requirements] Pin setuptools version to < 66.0.0 #17098

Merged
merged 1 commit into from
Jan 17, 2023

Conversation

vogelpi
Copy link
Contributor

@vogelpi vogelpi commented Jan 17, 2023

Starting with setuptools version 66.0.0, legacy package version names such as 0.23ubuntu1 are no longer supported. Since some of our Python dependencies use this format, we pin the setuptools version to the last version before this change. This unblocks CI and gives us time to upgrade/rebase our dependencies.

@vogelpi vogelpi added the Priority:P0 Priority: critical label Jan 17, 2023
@vogelpi
Copy link
Contributor Author

vogelpi commented Jan 17, 2023

CI currently fails with

Installing collected packages: pip, setuptools
Successfully installed pip-22.3.1 setuptools-66.0.0
Collecting git+https://github.com/lowRISC/[email protected] (from -r python-requirements.txt (line 49))
  Cloning https://github.com/lowRISC/fusesoc.git (to revision ot-0.3) to /tmp/pip-req-build-0p5iy1ej
  Running command git clone --filter=blob:none --quiet https://github.com/lowRISC/fusesoc.git /tmp/pip-req-build-0p5iy1ej
  Running command git checkout -q cf222fa5c9351d09cec13cdaea4602905fa696d0
  Resolved https://github.com/lowRISC/fusesoc.git to commit cf222fa5c9351d09cec13cdaea4602905fa696d0
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [28 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-req-build-0p5iy1ej/setup.py", line 14, in <module>
          setup(
        File "/home/vsts/.local/lib/python3.8/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/home/vsts/.local/lib/python3.8/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/home/vsts/.local/lib/python3.8/site-packages/setuptools/dist.py", line 874, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/home/vsts/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 815, in resolve
          dist = self._resolve_dist(
        File "/home/vsts/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 844, in _resolve_dist
          env = Environment(self.entries)
        File "/home/vsts/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1044, in __init__
          self.scan(search_path)
        File "/home/vsts/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1077, in scan
          self.add(dist)
        File "/home/vsts/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1096, in add
          dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
        File "/home/vsts/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2631, in hashcmp
          self.parsed_version,
        File "/home/vsts/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2678, in parsed_version
          self._parsed_version = parse_version(self.version)
        File "/home/vsts/.local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/version.py", line 266, in __init__
          raise InvalidVersion(f"Invalid version: '{version}'")
      pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: '0.23ubuntu1'

This PR should unblock CI for the moment and give us time to update/rebase our Python dependencies. For further information, see pypa/setuptools#3772 (comment)

@vogelpi
Copy link
Contributor Author

vogelpi commented Jan 17, 2023

I've created #17099 to track the updating of our Python dependencies.

@vogelpi vogelpi changed the title [python-requirements] Pin setuptools to version 65.5.07 [python-requirements] Pin setuptools to version 65.7.0 Jan 17, 2023
Starting with setuptools version 66.0.0, legacy package version names
such as 0.23ubuntu1 are no longer supported. Since some of our
Python dependencies use this format, we pin the setuptools version to
the last version before this change. This unblocks CI and gives us time
to upgrade/rebase our dependencies.

Signed-off-by: Pirmin Vogel <[email protected]>
@vogelpi vogelpi force-pushed the pin-setuptools-version branch from 8a7e649 to 33195e9 Compare January 17, 2023 12:41
@vogelpi vogelpi changed the title [python-requirements] Pin setuptools to version 65.7.0 [python-requirements] Pin setuptools version to < 66.0.0 Jan 17, 2023
Copy link
Contributor

@jprendes jprendes left a comment

Choose a reason for hiding this comment

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

LGTM

@vogelpi vogelpi merged commit d1f1f9c into lowRISC:master Jan 17, 2023
@alphan
Copy link
Contributor

alphan commented Jan 17, 2023

Thanks @vogelpi! I hit the same thing when I was trying something yesterday and used this workaround. I'm glad that I checked before creating a PR :)

@vogelpi vogelpi deleted the pin-setuptools-version branch March 21, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:P0 Priority: critical
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants