-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Set the minimum required setuptools
to v46.4.0
#6205
Conversation
c7c0f39
to
b3ef236
Compare
63bf00e
to
6a34b79
Compare
Codecov Report
@@ Coverage Diff @@
## master #6205 +/- ##
=======================================
Coverage 93.29% 93.30%
=======================================
Files 103 103
Lines 30360 30360
Branches 2729 2729
=======================================
+ Hits 28324 28326 +2
+ Misses 1858 1857 -1
+ Partials 178 177 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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 believe we should specify setuptools version in pyproject.toml
, not setup.py
.
Please add something like:
[build-system]
requires = [
"setuptools>=46.4.0",
]
build-backend = "setuptools.build_meta"
@webknjaz please check the required minimal setuptools version. |
Yeah, I wasn't sure if something like that worked properly, I thought checking there required a fairly recent setuptools version or something as well or something. |
FYI for 3.8 it appears this is the change that bumped the setuptools requirement: |
From my understanding, a relatively modern Did I miss something? |
Would that work for installs that don't use pip? |
6a34b79
to
f093ca3
Compare
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.
TL;DR I don't see how this patch improves anything we specifically care about, it only seems to make the maintenance burden worse if anything. So I'm strongly opposed to adding the check but updates to pyproject.toml
are fine.
PEP 517 build front-end uses pyproject.toml
to populate the build env. When setuptools
can be specified uncapped, in practice, the front-ends (like pip) will pull in the very latest version of it. So we are covered here.
Invoking setuptools
directly is deprecated. Here's why https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html.
And also distutils
has been deprecated for quite a while now so importing it is rather discouraged.
So here's my request:
- Drop the changes from
setup.py
- Move the
[build-system]
to the top ofpyproject.toml
- Update the change note to reflect this and use the past tense there (you may find a more comprehensive guide in
CHANGES/README.rst
The ecosystem is standardized around PEP 517 now. We won't support weird installs and it's up to the users to abuse this in unsupported ways. This standard brings a lot of convenience and even distro packagers follow it (for example, Fedora has their own PEP 517 helper macros, some of the others invoke pip). There is no point for us to support non-standardized things. |
2e53373
to
96a590a
Compare
@jameshilliard please fill out the PR template, it seems you've deleted it so here's where you can recover it from https://github.com/aio-libs/aiohttp/blob/master/.github/PULL_REQUEST_TEMPLATE.md. |
Hmm, I wonder what the recommended way for handling cross compilation without direct invocation would be.
We're still using
Oh, I assumed supporting those was why there was an explicit python version check in |
96a590a
to
7e07dbc
Compare
In order to avoid a recursive dependency issue when parsing the aiohttp version during install setuptools needs: pypa/setuptools@c457e68 This implies we need setuptools 46.4.0 or newer.
7e07dbc
to
4883107
Compare
Ok, re-added, figured it was a bit verbose since most sections didn't seem applicable here for a trivial fix like this. |
When it's missing, we still need to ask clarification questions which is basically extracting the same info from you but slower. |
Yeah, it's def not an in-tree backend that we need. We're basically just cross compiling python packages from source and installing them into a target rootfs, we've def had to carry a good number of downstream patches/hacks to the python infrastructure to make this work though. We use existing buildroot infrastructure for downloading and dependency resolution(needed for system package dependency resolution that python packages often depend on) so pip I think kinda gets in the way there. |
@webknjaz I agree with the current PR changes. Please feel free to merge when PR is ready from your perspective. |
Co-authored-by: Sviatoslav Sydorenko <[email protected]>
So maybe you need to be a front-end, then, in terms of PEP 517. It's pretty well-documented how to call the hooks. You could start by exploring how the Fedora's macros work, as an example: https://src.fedoraproject.org/rpms/pyproject-rpm-macros/blob/rawhide/f/pyproject_buildrequires.py. |
Co-authored-by: Sviatoslav Sydorenko <[email protected]>
setuptools
to v46.4.0
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 for your contribution! I've set this PR to auto-merge
meaning that it'll get merged as soon as the CI passes. After that, the backporting bot will pick up the change and create PRs against branches 3.8
and 3.9
so it'll get released with the next v3.8.x.
Backport to 3.8: 💚 backport PR created✅ Backport PR branch: Backported as #6225 🤖 @patchback |
Backport to 3.9: 💚 backport PR created✅ Backport PR branch: Backported as #6226 🤖 @patchback |
In order to avoid a recursive dependency issue when parsing the aiohttp version during install setuptools needs:
pypa/setuptools@c457e68
This implies we need setuptools 46.4.0 or newer.
This should probably also be back-ported as this setuptools version requirement was introduced in
3.8
.What do these changes do?
Adds
setuptools >= 46.4.0
requirement to pyproject.toml and readme.Are there changes in behavior for the user?
Should ensure setuptools version is correct instead of cryptic build dependency errors.
Related issue number
N/A
Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bugfix)issue_id
change it to the pr id after creating the pr.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.