-
Notifications
You must be signed in to change notification settings - Fork 308
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
twine<=3.1.1 bug: AttributeError: 'NoneType' object has no attribute 'group'
#612
Comments
Oh, here's the root cause: So the reproducer must be something like |
Thanks @webknjaz. I missed the change in Lines 19 to 25 in da8d62f
Looks like that ultimately ends up in the package metadata: Lines 112 to 120 in da8d62f
@sigmavirus24 or @di any insight? Is sending |
I think the action item here is to document the desired behavior by adding a regression test. |
I don't think so. I'm not confident that's allowed per the Wheel PEP |
I made that change, to reflect what was done in Lines 40 to 43 in da8d62f
Both the implementation and the test can be modified according to the accepted value if the |
@deveshks that doesn't answer the question of whether the Wheel PEP allows for "pyversion" to be "any" or if this is inventing things for the sake of testing |
I mentioned the test since there was a comment in the issue about a test not being added for the change, and I wanted to outline the test. I also think that setting |
In order to move this issue forward towards a fix, may I know what would be an allowed value instead of |
This field is basically a freeform text field. Here's all the current unique values that exist for it on PyPI: https://gist.github.com/di/93019b51582899c294cfd76ee2d0a4a3 The only requirement that PyPI enforces is that this is I think in this case we should just pick some default value. In my opinion, "any" is acceptable. |
Thanks, @di. So, is there any action to take? Is it okay to close this? |
I'm saying that if twine can't infer this value from the filename we should use some sane default and not raise an exception. I'm proposing we use "any". |
I think that's already done on |
Sorry, I had missed that. Yes, I would consider this fixed in #607 (although it probably shouldn't have been, since that PR was just adding type annotations). |
I think the action item would be to add a test case to document such a decision before closing this issue. |
There is a test added for it as described in a comment above (#612 (comment)). Should this be enough? |
Yes. |
Your Environment
GitHub Actions workflow
Your operating system: macOS-latest
Version of python you are running:
python.org-provided
dmg
s for Python 3.8, 3.7, 3.6, 3.5, 2.7pip install
and via tox (b/c I tried many ways during debugging)v3.1.1
PyPI/TestPyPI but it doesn't matter in the context of this issue because it's about
twine check
, not uploading the dists.The Issue
So I'm in progress of packaging platform-specific dists. I was building them
using
pip wheel
in a tox env and then runningdelocate
outside.Then I started moving
delocate
into a toxenv (separate) and after thattwine check
started spitting out this traceback:(here's that line in src: https://github.com/pypa/twine/blob/3.1.1/twine/wheel.py#L47)
Now, I understand that it looks like a bug in
delocate
(or/and maybe the isolation that tox creates for it) but still twine should error out more gracefully.Imagine my surprise when I discovered that this has been "fixed" in master just a day before I started seeing it: 7111240#diff-c533b522e297bb77ebe6ed9089c754beR48-R51.
I'm not sure if it counts as a fix because it's a commit that adds annotations and the change looks like a side-effect, plus no tests for this were added. Should it return
any
when the regex doesn't match? This is still to be identified.Steps to Reproduce
This is all I have atm: https://github.com/ansible/pylibssh/runs/625207843?check_suite_focus=true#step:15:68
The text was updated successfully, but these errors were encountered: