(to hopefully spearhead these issues from being created, I'm creating an intentionally invalid issue with the common failure modes)
if pip is installing pytest>=5 on these versions, it likely means your pip is outdated. please upgrade to pip>=9 which understands the python_requires directive.
These are the (current) stacktraces that'll be seen when running in the following versions:
$ pytest --help
Traceback (most recent call last):
File "/home/asottile/workspace/pytest/venv2/bin/pytest", line 11, in <module>
load_entry_point('pytest==4.6.1.dev198+ge6ffa78e5', 'console_scripts', 'pytest')()
File "/home/asottile/workspace/pytest/venv2/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/asottile/workspace/pytest/venv2/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
return ep.load()
File "/home/asottile/workspace/pytest/venv2/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2434, in load
return self.resolve()
File "/home/asottile/workspace/pytest/venv2/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2440, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/asottile/workspace/pytest/venv2/local/lib/python2.7/site-packages/pytest.py", line 6, in <module>
from _pytest.assertion import register_assert_rewrite
File "/home/asottile/workspace/pytest/venv2/local/lib/python2.7/site-packages/_pytest/assertion/__init__.py", line 6, in <module>
from _pytest.assertion import rewrite
File "/home/asottile/workspace/pytest/venv2/local/lib/python2.7/site-packages/_pytest/assertion/rewrite.py", line 462
def _get_assertion_exprs(src: bytes): # -> Dict[int, str]
^
SyntaxError: invalid syntax
$ pytest --help
Traceback (most recent call last):
File "/home/asottile/workspace/pytest/venv34/bin/pytest", line 11, in <module>
load_entry_point('pytest==4.6.1.dev198+ge6ffa78e5', 'console_scripts', 'pytest')()
File "/home/asottile/workspace/pytest/venv34/lib/python3.4/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/home/asottile/workspace/pytest/venv34/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
return ep.load()
File "/home/asottile/workspace/pytest/venv34/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2434, in load
return self.resolve()
File "/home/asottile/workspace/pytest/venv34/lib/python3.4/site-packages/pkg_resources/__init__.py", line 2440, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/home/asottile/workspace/pytest/venv34/lib/python3.4/site-packages/pytest.py", line 6, in <module>
from _pytest.assertion import register_assert_rewrite
File "/home/asottile/workspace/pytest/venv34/lib/python3.4/site-packages/_pytest/assertion/__init__.py", line 6, in <module>
from _pytest.assertion import rewrite
File "/home/asottile/workspace/pytest/venv34/lib/python3.4/site-packages/_pytest/assertion/rewrite.py", line 443, in <module>
ast.MatMult: "@",
AttributeError: 'module' object has no attribute 'MatMult'
Great idea!
I'm going to unpin this -- at this point it shouldn't really be a surprise (6+ months since we did this)
Most helpful comment
I'm going to unpin this -- at this point it shouldn't really be a surprise (6+ months since we did this)