-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
[BUG] "'extras_require' must be a dictionary..." regression #3801
Comments
Hi @rt121212121 , The requirement |
I see this problem even with:
From what I can see, this is unexpected as per https://peps.python.org/pep-0508/#extras. This will be a problem with the packaging library, if it is indeed a problem. UPDATE: I have found the underlying issue pypa/packaging#645, which is causing this for my case (though not the case for the original question). In my case, it is by design (even if it is confusing/unexpected). |
Hi @pelson, yes, I believe that is a separated problem and it is related to one of setuptools dependencies ( |
…ypa/setuptools#3801 PiperOrigin-RevId: 505712842 Change-Id: I8997f3f09712110e992bde56d5376de8a0a3bfeb
Yes, this is a regression (apparently in the packaging library). Either the breakage we are now seeing is ordained as the right path forward and packages that used to work, will no longer work and will have to be updated. A packages I do not maintain that I have been using for a decade is affected by this :-) Or we restore those packages to working and fix the regression. |
Hi @rt121212121, I am afraid this is not a regression but an intentional change that has been planned in the ecosystem for a while. You can have a look on this comment for a reference: From issue tracking management point of view, I believe that the best is to close this issue for now since this is a direct consequence of issue |
At the end of the day, you have to do what is right for you. But please keep in mind that as a Python developer I am continually finding things are breaking and then spending a day looking into it, then filing bugs and being told it is "by design". This happens for the Python 3.11 release where there are unadvertised breaking changes that look like bugs, and it happens for other things including Setuptools now. These decisions cost me as a developer, they cost my employer, and they make it much much more unlikely to ever bother submitting bugs as the bugs are indistinguishable from features ... by design. |
Thank you very much for the comprehension @rt121212121. To help with this problem in the future (avoid loosing time with breaking changes) you can try running your test suite with all warnings turned into errors by default 1 and selectively allowing minor warnings as needed2 (or at least with Python development mode activated). This should help you identify upcoming breakages and be prepared before they happen. In setuptools we have been trying to communicate changes before hand and minimize the cost for the users as much as we can (and as much as it is viable for the project), using warnings and the changelog. Sometimes we will fail and I apologize for that, but Setuptools is an old code base and we have limited amount of time to work on it. Footnotes
|
…ypa/setuptools#3801 PiperOrigin-RevId: 505712842 Change-Id: I8997f3f09712110e992bde56d5376de8a0a3bfeb
For those who just need to get their project working |
The version specification is invalid with recent setuptools and also the package name is `pyscard`. See pypa/setuptools#3801 fixes LedgerHQ#53
The version specification is invalid with recent setuptools and also the package name is `pyscard`. See pypa/setuptools#3801 fixes LedgerHQ#53
@rt121212121 if you hit this in your own library and you're defining
Looks like by default, trying to get this field when it is missing results in a return type of (@abravalheri so there might actually be a bug here, the default value of trying to fetch
|
setuptools version
setuptools==67.0.0
Python version
Python 3.10
OS
Linux / Ubuntu
Additional environment information
No response
Description
With latest setuptools I am unable to use a package (btchip-python) as input to pip-compile requirements for hash generation. It errors with:
If I downgrade setuptools to a version I know works, 65.5.0, the package works again.
The problem part of the project's setup.py file is:
It is triggered in the following command pip-compile does:
Expected behavior
Unless there is an obvious reason that setuptools is rejecting values it accepted before, I expect it to continue to accept them and no do breaking changes.
How to Reproduce
The simplest reproduction case is taking the erroring command from pip-compile and running it in a local copy of the package.
extras_require
complaint.Then with the older setuptools.
Output
The text was updated successfully, but these errors were encountered: