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

pytest-timeout release 2.0.0 breaks pytest-timeout installation on python 2 #104

Closed
exarkun opened this issue Oct 11, 2021 · 2 comments
Closed

Comments

@exarkun
Copy link

exarkun commented Oct 11, 2021

Collecting pytest-timeout
  Downloading pytest-timeout-2.0.0.tar.gz (16 kB)
    ERROR: Command errored out with exit status 1:
     command: /tmp/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-Xl8UN2/pytest-timeout/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-Xl8UN2/pytest-timeout/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-KMLkn5
         cwd: /tmp/pip-wheel-Xl8UN2/pytest-timeout/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-wheel-Xl8UN2/pytest-timeout/setup.py", line 4, in <module>
        with open("README.rst", encoding="utf-8") as f:
    TypeError: 'encoding' is an invalid keyword argument for this function

Compare with installation log from prior to 2.0.0 release:

Collecting pytest-timeout
  Downloading pytest_timeout-1.4.2-py2.py3-none-any.whl (10 kB)

I don't know if pytest-timeout cares to continue supporting Python 2 in new releases (from the metadata, I guess not) but it would be considerate if the project set its metadata correctly so that Python 2 installations could find the last Python 2-supporting release automatically instead of trying to use a Python 3-only release.

@Nicusor97
Copy link
Contributor

@exarkun See this PR: #103
It should fix the issue that you spotted.

@henryiii
Copy link

Same thing hit on pybind11 - I'd rather not have to mess with our Python 2 CI, hoping to leave it alone until we drop it at the end of the year. Thanks for the PR and looking forward to the yank! ❤️

@flub flub closed this as completed Oct 11, 2021
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

No branches or pull requests

4 participants