-
Notifications
You must be signed in to change notification settings - Fork 257
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
Some sort of race condition in packaging.requirement #104
Comments
Oh, where are my manners, here's the traceback: Exception in thread Thread-3:
Traceback (most recent call last):
File "/Users/alex_gaynor/.pyenv/versions/2.7.13/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/Users/alex_gaynor/.pyenv/versions/2.7.13/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "t.py", line 10, in target
Requirement("x[]")
File "/Users/alex_gaynor/.virtualenvs/tempenv-420c1556839f5/lib/python2.7/site-packages/packaging/requirements.py", line 94, in __init__
requirement_string[e.loc:e.loc + 8]))
InvalidRequirement: Invalid requirement, parse error at "''" |
Alex - many thanks for closing this -- I was able to use your code to replicate and test that this is indeed fixed. One followup question -- will this be part of an official release soon (so that I can get it with pip upgrade instead of doing a manual compile/install?) Thanks again! |
packaging 16.8 had a latent race-condition that is fixed in later versions: pypa/packaging#104
packaging 16.8 had a latent race-condition that is fixed in later versions: pypa/packaging#104
This is still biting me with packaging==21.3. I understand that the PR (#105) tried two fixes (and went with the second):
I also understand that packaging 22.0 will have a tailor-made parser instead of depending on pyparsing. Will this parser have global state which must be protected by a lock, or can I assume that calling Thanks! |
We no longer use pyparsing in |
I'll assume the race conditions are no longer an issue? Thanks! |
Indeed, typo fixed. :) |
This fails every once in a while. Put in a loop in your terminal for best results.
The text was updated successfully, but these errors were encountered: