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

Python 3.5.1 and Pytest 5.1.0 fails to start running tests with the error RuntimeError: Overloading is only supported in library stubs #5761

Closed
4 tasks done
smtakeda opened this issue Aug 18, 2019 · 1 comment

Comments

@smtakeda
Copy link

smtakeda commented Aug 18, 2019

  • a detailed description of the bug or suggestion
  • output of pip list from the virtual environment you are using
  • pytest and operating system versions
  • minimal example if possible

Running pytest 5.1.0 fails to start in importing main. 5.0.1 and older version works fine.

>py.test -s -vvv test
Traceback (most recent call last):
  File "/tmp/ocsp/bin/py.test", line 6, in <module>
    from pytest import main
  File "/tmp/ocsp/lib64/python3.5/site-packages/pytest.py", line 34, in <module>
    from _pytest.python_api import approx
  File "/tmp/ocsp/lib64/python3.5/site-packages/_pytest/python_api.py", line 551, in <module>
    ) -> "RaisesContext[_E]":
  File "/opt/rh/rh-python35/root/usr/lib64/python3.5/typing.py", line 1184, in overload
    raise RuntimeError("Overloading is only supported in library stubs")
RuntimeError: Overloading is only supported in library stubs

pip list

>pip list
Package                    Version     
-------------------------- ------------
asn1crypto                 0.24.0      
atomicwrites               1.3.0       
attrs                      19.1.0      
azure-common               1.1.23      
azure-storage-blob         2.1.0       
azure-storage-common       2.1.0       
boto3                      1.9.210     
botocore                   1.12.210    
certifi                    2019.6.16   
cffi                       1.12.3      
chardet                    3.0.4       
cryptography               2.7         
docutils                   0.15.2      
future                     0.17.1      
idna                       2.8         
ijson                      2.4         
importlib-metadata         0.19        
jmespath                   0.9.4       
more-itertools             7.2.0       
packaging                  19.1        
pathlib2                   2.3.4       
pip                        19.2.2      
pluggy                     0.12.0      
py                         1.8.0       
pycparser                  2.19        
pycryptodomex              3.8.2       
PyJWT                      1.7.1       
pyOpenSSL                  19.0.0      
pyparsing                  2.4.2       
pytest                     5.1.0       
python-dateutil            2.8.0       
pytz                       2019.2      
requests                   2.22.0      
s3transfer                 0.2.1       
setuptools                 41.1.0      
six                        1.12.0      
snowflake-connector-python 1.8.7.150951
urllib3                    1.25.3      
wcwidth                    0.1.7       
zipp                       0.5.2       

My environment:

>more /etc/redhat-release 
CentOS release 6.7 (Final)
>python3.5
Python 3.5.1 (default, Oct 22 2016, 08:10:47) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux
@smtakeda smtakeda changed the title Pythop 3.5.1 Python 3.5.1 and Pytest 5.1.0 fails to start running tests with the error RuntimeError: Overloading is only supported in library stubs Aug 18, 2019
@bluetech
Copy link
Member

This is a duplicate of #5751, will be fixed in the next pytest release.

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

2 participants