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
pipenv install
add spurious "markers": "python_version == '3'"
for a specific library since v2023.12.1, how to fix the library?
#6115
Comments
I ended up investigating this in some detail. I isolated the problem away from my specific scenario. Now I'm just trying to
This gives me:
The FAIL cases all give me an error like this:
Probably needless to say a library like requests installs fine against any of these versions. So pipenv's handling of something funky about better-profanity changed in 2023.8.19 to the point of crashing I updated the first comment here for a clearer/simpler repro case as a result. |
"markers": "python_version == '3'"
added when running pipenv update
or installing any library"markers": "python_version == '3'"
for a specific library since v2023.12.1, how to fix the library?
"markers": "python_version == '3'"
for a specific library since v2023.12.1, how to fix the library?pipenv install
add spurious "markers": "python_version == '3'"
for a specific library since v2023.12.1, how to fix the library?
My guess is in 6ac1451 by @matteius exposed an issue in whatever faulty metadata better-profanity is issuing. Before it was being swallowed/ignored in some way. That change caused it to instead crash pipenv. And then some change in v2023.12.1 stopped the crash, but now causes the bad line to be added to Pipefile.lock. What might be the cause on the better-profanity side? I'm not sure as I don't really understand how pipenv works. I am guessing that something in the setup.py is not right:
https://github.com/snguyenthanh/better_profanity/blob/master/setup.py Maybe the wildcard isn't allowed. Or maybe a bare "3" with no minor version is causing the issue. Maybe @matteius would be kind enough to take a quick look at this and help out an ignoramus :) |
@bakert I greatly appreciate the amount of detail you have put into your analysis. Here is what I can recall:
I wish I could put a bit more time into now, but keep probing and I may be able to provide additional details. There are other issues as it relates to those marker evaluations and dev dependency versions, so it could use more TLC. I think my priorities are wrapping up the install refactor and some other things and getting the first pipenv 3000 semver release finalized; and if I had even more time I'd like to look at the pythonfinder bug reports/regressions I helped cause (but a proper solution). Sorry to steal this post a minute for a general update, but I feel that the code base is finally to a point where we can support more Individual Contributions towards improving things -- there were a lot of hurdle to get over with pip-shims, requirementslib being its own repo that had ballooned into a mess, and not deterministic behavior from referencing the system pip prior--all of that has been resolved, and it should be easier than ever to contribute to pipenv, but I don't have a ton of time as of late to take on "everything". |
I guess the "good" cases mean something else might have been happening in requirementslib, so looking back on that code base may provide more clues on possible improvements to pipenv. I will say that we abandoned the circular classes hierarchy of requirementslib in favor of a more functional utils approach that tries to fulfill this vision: #5818 I think its easier to work with now and fix things, but does still require some mental overhead of understanding the different InstallRequirements and how/why they are handled differently (vcs vs file, vs pypi, etc), which largely relates to the internal libraries we pull from. |
Thanks for your comments @matteius . I think the one question I have now is … "is I am coming around to the idea that this might be a pipenv bug rather than an issue with better-profanity's metadata.
I've been debugging with a local copy of pipenv today and I've found that in more than one place during resolving of dependencies we take version specifiers and strip off any trailing
I guess it's much more normal to specify something like If we decide that |
Issue description
pipenv install better-profanity
adds"markers": "python_version == '3'",
to Pipfile.lock. This started happening with pipenv v2023.12.1. The library has not changed, so this comes from a pipenv change. I would like to understand what to fix in better-profanity to avoid this behavior.Expected result
pipenv install better-profanity
makes an entry in Pipfile.lock that is usableActual result
appears in Pipfile.lock
Steps to replicate
The text was updated successfully, but these errors were encountered: