moin icon indicating copy to clipboard operation
moin copied to clipboard

tox tests fail without internet connection

Open RogerHaase opened this issue 4 years ago • 2 comments

Not sure if this is a windows only issue.

GLOB sdist-make: C:\git\moin\setup.py
py35 create: C:\GIT\moin\.tox\py35
ERROR: InterpreterNotFound: python3.5
py36 create: C:\GIT\moin\.tox\py36
ERROR: InterpreterNotFound: python3.6
py37 create: C:\GIT\moin\.tox\py37
ERROR: InterpreterNotFound: python3.7
py38 create: C:\GIT\moin\.tox\py38
ERROR: InterpreterNotFound: python3.8
py39 inst-nodeps: C:\GIT\moin\.tox\.tmp\package\25\moin-2.0.0a9.dev1+g6d950b4e.d20210524.zip
ERROR: invocation failed (exit code 1), logfile: C:\GIT\moin\.tox\py39\log\py39-4.log
================================== log start ==================================
Processing c:\git\moin\.tox\.tmp\package\25\moin-2.0.0a9.dev1+g6d950b4e.d20210524.zip
    ERROR: Command errored out with exit status 1:
     command: 'C:\GIT\moin\.tox\py39\Scripts\python.EXE' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\haase\\AppData\\Local\\Temp\\pip-req-build-47ye3a_a\\setup.py'"'"'; __file__='"'"'C:\\Users\\haase\\AppData\\Local\\Temp\\pip-req-build-47ye3a_a\\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 'C:\Users\haase\AppData\Local\Temp\pip-pip-egg-info-vlayujb6'
         cwd: C:\Users\haase\AppData\Local\Temp\pip-req-build-47ye3a_a\
    Complete output (37 lines):
    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000002110770DEE0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools-scm/
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000021107732130>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools-scm/
    WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000211077322E0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools-scm/
    WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000021107732490>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools-scm/
    WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000021107732640>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools-scm/
    ERROR: Could not find a version that satisfies the requirement setuptools_scm
    ERROR: No matching distribution found for setuptools_scm
    Traceback (most recent call last):
      File "C:\GIT\moin\.tox\py39\lib\site-packages\setuptools\installer.py", line 75, in fetch_build_egg
        subprocess.check_call(cmd)
      File "C:\Users\haase\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['C:\\GIT\\moin\\.tox\\py39\\Scripts\\python.EXE', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\haase\\AppData\\Local\\Temp\\tmpe28tm_t0', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\haase\AppData\Local\Temp\pip-req-build-47ye3a_a\setup.py", line 142, in <module>
        setup(**setup_args)
      File "C:\GIT\moin\.tox\py39\lib\site-packages\setuptools\__init__.py", line 152, in setup
        _install_setup_requires(attrs)
      File "C:\GIT\moin\.tox\py39\lib\site-packages\setuptools\__init__.py", line 147, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "C:\GIT\moin\.tox\py39\lib\site-packages\setuptools\dist.py", line 721, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "C:\GIT\moin\.tox\py39\lib\site-packages\pkg_resources\__init__.py", line 766, in resolve
        dist = best[req.key] = env.best_match(
      File "C:\GIT\moin\.tox\py39\lib\site-packages\pkg_resources\__init__.py", line 1051, in best_match
        return self.obtain(req, installer)
      File "C:\GIT\moin\.tox\py39\lib\site-packages\pkg_resources\__init__.py", line 1063, in obtain
        return installer(requirement)
      File "C:\GIT\moin\.tox\py39\lib\site-packages\setuptools\dist.py", line 780, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "C:\GIT\moin\.tox\py39\lib\site-packages\setuptools\installer.py", line 77, in fetch_build_egg
        raise DistutilsError(str(e)) from e
    distutils.errors.DistutilsError: Command '['C:\\GIT\\moin\\.tox\\py39\\Scripts\\python.EXE', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\haase\\AppData\\Local\\Temp\\tmpe28tm_t0', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.
    ----------------------------------------
WARNING: Discarding file:///C:/git/moin/.tox/.tmp/package/25/moin-2.0.0a9.dev1%2Bg6d950b4e.d20210524.zip. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 21.0.1; however, version 21.1.1 is available.
You should consider upgrading via the 'C:\GIT\moin\.tox\py39\Scripts\python.EXE -m pip install --upgrade pip' command.

=================================== log end ===================================
pypy3 create: C:\GIT\moin\.tox\pypy3
ERROR: InterpreterNotFound: pypy3
flake8 inst-nodeps: C:\GIT\moin\.tox\.tmp\package\25\moin-2.0.0a9.dev1+g6d950b4e.d20210524.zip
ERROR: invocation failed (exit code 1), logfile: C:\GIT\moin\.tox\flake8\log\flake8-6.log
================================== log start ==================================
Processing c:\git\moin\.tox\.tmp\package\25\moin-2.0.0a9.dev1+g6d950b4e.d20210524.zip
    ERROR: Command errored out with exit status 1:
     command: 'C:\GIT\moin\.tox\flake8\Scripts\python.EXE' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\haase\\AppData\\Local\\Temp\\pip-req-build-ojcu4yvq\\setup.py'"'"'; __file__='"'"'C:\\Users\\haase\\AppData\\Local\\Temp\\pip-req-build-ojcu4yvq\\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 'C:\Users\haase\AppData\Local\Temp\pip-pip-egg-info-ls9qshss'
         cwd: C:\Users\haase\AppData\Local\Temp\pip-req-build-ojcu4yvq\
    Complete output (37 lines):
    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000216BD0E88B0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools-scm/
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000216BD0E8AC0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools-scm/
    WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000216BD0E8C70>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools-scm/
    WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000216BD0E8E20>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools-scm/
    WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x00000216BD0E8FD0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools-scm/
    ERROR: Could not find a version that satisfies the requirement setuptools_scm
    ERROR: No matching distribution found for setuptools_scm
    Traceback (most recent call last):
      File "C:\GIT\moin\.tox\flake8\lib\site-packages\setuptools\installer.py", line 75, in fetch_build_egg
        subprocess.check_call(cmd)
      File "C:\Users\haase\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['C:\\GIT\\moin\\.tox\\flake8\\Scripts\\python.EXE', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\haase\\AppData\\Local\\Temp\\tmpkebd9t6d', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\haase\AppData\Local\Temp\pip-req-build-ojcu4yvq\setup.py", line 142, in <module>
        setup(**setup_args)
      File "C:\GIT\moin\.tox\flake8\lib\site-packages\setuptools\__init__.py", line 152, in setup
        _install_setup_requires(attrs)
      File "C:\GIT\moin\.tox\flake8\lib\site-packages\setuptools\__init__.py", line 147, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "C:\GIT\moin\.tox\flake8\lib\site-packages\setuptools\dist.py", line 721, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "C:\GIT\moin\.tox\flake8\lib\site-packages\pkg_resources\__init__.py", line 766, in resolve
        dist = best[req.key] = env.best_match(
      File "C:\GIT\moin\.tox\flake8\lib\site-packages\pkg_resources\__init__.py", line 1051, in best_match
        return self.obtain(req, installer)
      File "C:\GIT\moin\.tox\flake8\lib\site-packages\pkg_resources\__init__.py", line 1063, in obtain
        return installer(requirement)
      File "C:\GIT\moin\.tox\flake8\lib\site-packages\setuptools\dist.py", line 780, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "C:\GIT\moin\.tox\flake8\lib\site-packages\setuptools\installer.py", line 77, in fetch_build_egg
        raise DistutilsError(str(e)) from e
    distutils.errors.DistutilsError: Command '['C:\\GIT\\moin\\.tox\\flake8\\Scripts\\python.EXE', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\haase\\AppData\\Local\\Temp\\tmpkebd9t6d', '--quiet', 'setuptools_scm']' returned non-zero exit status 1.
    ----------------------------------------
WARNING: Discarding file:///C:/git/moin/.tox/.tmp/package/25/moin-2.0.0a9.dev1%2Bg6d950b4e.d20210524.zip. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 21.0.1; however, version 21.1.1 is available.
You should consider upgrading via the 'C:\GIT\moin\.tox\flake8\Scripts\python.EXE -m pip install --upgrade pip' command.

=================================== log end ===================================
___________________________________ summary ___________________________________
ERROR:  py35: InterpreterNotFound: python3.5
ERROR:  py36: InterpreterNotFound: python3.6
ERROR:  py37: InterpreterNotFound: python3.7
ERROR:  py38: InterpreterNotFound: python3.8
ERROR:   py39: InvocationError for command 'C:\GIT\moin\.tox\py39\Scripts\python.EXE' -m pip install --no-deps -U '.tox\.tmp\package\25\moin-2.0.0a9.dev1+g6d950b4e.d20210524.zip' (exited with code 1)
ERROR:  pypy3: InterpreterNotFound: pypy3
ERROR:   flake8: InvocationError for command 'C:\GIT\moin\.tox\flake8\Scripts\python.EXE' -m pip install --no-deps -U '.tox\.tmp\package\25\moin-2.0.0a9.dev1+g6d950b4e.d20210524.zip' (exited with code 1)

RogerHaase avatar May 24 '21 14:05 RogerHaase

The reason seems to be pip because it wants to check installed versions. I found this old issue: https://github.com/tox-dev/tox/issues/1151.

The recommendation is to set PIP_DISABLE_PIP_VERSION_CHECK=1 in tox.ini. This needs to be tested with pyproject.toml.

IMO we should not set it permanently, but we can add comment lines in the config to easily enable it if needed.

UlrichB22 avatar Jun 17 '25 20:06 UlrichB22

agree

RogerHaase avatar Jun 18 '25 14:06 RogerHaase