Skip to content
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

Bypass encoding warnings in execnet #3965

Merged
merged 3 commits into from
Jun 30, 2023
Merged

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Jun 27, 2023

Originally, I just pushed this commit to main before I realized it causes failures on Python 3.8 when something attempts to construct a requirement, but creates the wrong syntax:

  File "/home/runner/work/setuptools/setuptools/.tox/py/lib/python3.8/site-packages/packaging/requirements.py", line 37, in __init__
    raise InvalidRequirement(str(e)) from e
packaging.requirements.InvalidRequirement: Expected end or semicolon (after URL and whitespace)
    execnet@ git+https://github.com/jaraco/execnet@bugfix/195-encodingwarning; extra == "testing"
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

The error message is misleading. The problem is that PEP 508 specifies url_req as

url_req       = name wsp* extras? wsp* urlspec wsp+ quoted_marker?

Where the urlspec needs to be separated from the quoted marker (the semicolon) with whitespace.

@jaraco
Copy link
Member Author

jaraco commented Jun 27, 2023

I can see that importlib_metadata fixed this issue in 4.8.3, so there must be some other code that's generating the invalid req.

@jaraco
Copy link
Member Author

jaraco commented Jun 27, 2023

The problem exists in build when it relies on the old, unfixed importlib.metadata found in Python 3.8 (fix was added to CPython 3.9 in python/cpython#90263).

@jaraco jaraco force-pushed the bugfix/pytest-dev-execnet-195 branch from bc00212 to 1d664fd Compare June 27, 2023 09:19
@jaraco
Copy link
Member Author

jaraco commented Jun 27, 2023

Although tests are passing, I don't believe PyPI would accept this package. Probably the overrides need to be in tox instead.

@jaraco jaraco changed the title Grab workaround for pytest-dev/execnet#195. Bypass encoding warnings in execnet Jun 28, 2023
@jaraco jaraco merged commit d58fb55 into main Jun 30, 2023
@jaraco jaraco deleted the bugfix/pytest-dev-execnet-195 branch June 30, 2023 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant