Pin setuptools<82 for pkg_resources compatibility#6273
Pin setuptools<82 for pkg_resources compatibility#6273richtja merged 1 commit intoavocado-framework:masterfrom
Conversation
Summary of ChangesHello @harvey0100, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue preventing the documentation build on Read the Docs. It achieves this by introducing a specific version constraint for the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request correctly identifies the need to pin setuptools due to the removal of pkg_resources in recent versions. However, the breaking change actually occurred in setuptools version 72.0.0, not 82.0.0. The current pin of <82 will not prevent the installation of version 72 or later, which will cause the build to fail. Additionally, since avocado.core depends on pkg_resources, this pin should be applied to setup.py to ensure the library remains functional for all users, not just during documentation builds.
requirements-doc.txt
Outdated
| # Pin <82: setuptools 82+ removed pkg_resources (avocado still uses it at doc build time) | ||
| setuptools>=45.0.0,<82 |
There was a problem hiding this comment.
The removal of pkg_resources occurred in setuptools version 72.0.0, not 82.0.0. Using <82 as a constraint will still allow the installation of version 72 and later, which will result in the same build failure. This should be updated to <72. Additionally, since avocado.core depends on pkg_resources, this pin should ideally be added to install_requires in setup.py to ensure the library remains functional for all users.
# Pin <72: setuptools 72+ removed pkg_resources (avocado still uses it at doc build time)
setuptools>=45.0.0,<72
There was a problem hiding this comment.
https://setuptools.pypa.io/en/stable/history.html - Website states deprecated in 82.00 still available in version 81.0.0 will use that version to provide latest we can to core.
8c585e3 to
ae874a5
Compare
setuptools 82.0.0 removed pkg_resources; avocado.core uses it (e.g. the doc build imports it via conf.py). Pin setuptools>=45.0.0,<82 in requirements-doc.txt and in setup.py install_requires so doc builds and all installs get a compatible setuptools. Reference: Assisted-By: Cursor-Claude-4-Sonnet Signed-off-by: Harvey Lynden <hlynden@redhat.com>
ae874a5 to
b931fda
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6273 +/- ##
==========================================
- Coverage 73.84% 73.80% -0.04%
==========================================
Files 206 206
Lines 22565 22565
==========================================
- Hits 16663 16654 -9
- Misses 5902 5911 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
clebergnu
left a comment
There was a problem hiding this comment.
Tested locally and the CI job is now passing! Thanks!
setuptools 82.0.0 removed pkg_resources; avocado.core uses it (e.g. the
doc build imports it via conf.py). Pin setuptools>=45.0.0,<82 in
requirements-doc.txt and in setup.py install_requires so doc builds and
all installs get a compatible setuptools.
Temporary fix until Avocado is updated to new methods.