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

Tox fails (cannot access file because it is being used by another process (path) ) on 2th test with --installpkg provided #3165

Closed
Stefanhg opened this issue Dec 1, 2023 · 11 comments

Comments

@Stefanhg
Copy link
Contributor

Stefanhg commented Dec 1, 2023

Issue

Hello,

I have found a case where running devpi on Windows-only it canfail.
I managerd to narrow it down to tox with --installpkg argument causes Tox to fail. I managed to reproduce it with Tox alone by just writing the bare minimum commands.

It fails between ToxEnv._setup_env and ToxEnv._setup_with_env on the 2th run so if only having one env in Tox then it works.

Environment

Provide at least:

  • OS: Tested on Windows and WSL Ubuntu (passes on WSL)
Output of pip list of the host Python, where tox is installed
cachetools    5.3.2
chardet       5.2.0
colorama      0.4.6
distlib       0.3.7
filelock      3.13.1
packaging     23.2
pip           22.3.1
platformdirs  4.0.0
pluggy        1.3.0
pyproject-api 1.6.1
setuptools    65.5.0
tomli         2.0.1
tox           4.11.4
virtualenv    20.24.7

Output of running tox

Output of tox -rvv
D:\temp\test_tox>tox -rvv --installpkg dist\my_package-0.0.0.tar.gz
[12/01/23 13:30:48] WARNING  pyproject.toml does not contain a tool.setuptools_scm section                                                                                                                                                                               setuptools.py:119
base: 407 W remove tox env folder D:\temp\test_tox\.tox\base [tox\tox_env\api.py:322]
.pkg_external: 469 W remove tox env folder D:\temp\test_tox\.tox\.pkg_external [tox\tox_env\api.py:322]
.pkg_external_sdist_meta: 507 W remove tox env folder D:\temp\test_tox\.tox\.pkg_external_sdist_meta [tox\tox_env\api.py:322]
base: 585 I find interpreter for spec PythonSpec(path=C:\Python310\python.exe) [virtualenv\discovery\builtin.py:58]
base: 585 I proposed PythonInfo(spec=CPython3.10.10.final.0-64, exe=C:\Python310\python.exe, platform=win32, version='3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]', encoding_fs_io=utf-8-utf-8) [virtualenv\discovery\builtin.py:65]
base: 585 D accepted PythonInfo(spec=CPython3.10.10.final.0-64, exe=C:\Python310\python.exe, platform=win32, version='3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]', encoding_fs_io=utf-8-utf-8) [virtualenv\discovery\builtin.py:67]
base: 585 D symlink on filesystem does not work [virtualenv\info.py:45]
base: 585 D filesystem is not case-sensitive [virtualenv\info.py:26]
base: 601 I create virtual environment via CPython3Windows(dest=D:\temp\test_tox\.tox\base, clear=False, no_vcs_ignore=False, global=False) [virtualenv\run\session.py:50]
base: 601 D create folder D:\temp\test_tox\.tox\base\Lib\site-packages [virtualenv\util\path\_sync.py:12]
base: 601 D create folder D:\temp\test_tox\.tox\base\Scripts [virtualenv\util\path\_sync.py:12]
base: 601 D write D:\temp\test_tox\.tox\base\pyvenv.cfg [virtualenv\create\pyenv_cfg.py:32]
base: 601 D     home = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
base: 601 D     implementation = CPython [virtualenv\create\pyenv_cfg.py:36]
base: 601 D     version_info = 3.10.10.final.0 [virtualenv\create\pyenv_cfg.py:36]
base: 601 D     virtualenv = 20.24.5 [virtualenv\create\pyenv_cfg.py:36]
base: 601 D     include-system-site-packages = false [virtualenv\create\pyenv_cfg.py:36]
base: 601 D     base-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
base: 601 D     base-exec-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
base: 601 D     base-executable = C:\Python310\python.exe [virtualenv\create\pyenv_cfg.py:36]
base: 601 D copy C:\Python310\Lib\venv\scripts\nt\python.exe to D:\temp\test_tox\.tox\base\Scripts\python.exe [virtualenv\util\path\_sync.py:40]
base: 601 D copy C:\Python310\Lib\venv\scripts\nt\pythonw.exe to D:\temp\test_tox\.tox\base\Scripts\pythonw.exe [virtualenv\util\path\_sync.py:40]
base: 607 D create virtualenv import hook file D:\temp\test_tox\.tox\base\Lib\site-packages\_virtualenv.pth [virtualenv\create\via_global_ref\api.py:91]
base: 607 D create D:\temp\test_tox\.tox\base\Lib\site-packages\_virtualenv.py [virtualenv\create\via_global_ref\api.py:94]
base: 607 D ============================== target debug ============================== [virtualenv\run\session.py:52]
base: 607 D debug via 'D:\temp\test_tox\.tox\base\Scripts\python.exe' 'C:\Python310\lib\site-packages\virtualenv\create\debug.py' [virtualenv\create\creator.py:200]
base: 607 D {
  "sys": {
    "executable": "D:\\temp\\test_tox\\.tox\\base\\Scripts\\python.exe",
    "_base_executable": "C:\\Python310\\python.exe",
    "prefix": "D:\\temp\\test_tox\\.tox\\base",
    "base_prefix": "C:\\Python310",
    "real_prefix": null,
    "exec_prefix": "D:\\temp\\test_tox\\.tox\\base",
    "base_exec_prefix": "C:\\Python310",
    "path": [
      "C:\\Python310\\python310.zip",
      "C:\\Python310\\DLLs",
      "C:\\Python310\\lib",
      "C:\\Python310",
      "D:\\temp\\test_tox\\.tox\\base",
      "D:\\temp\\test_tox\\.tox\\base\\lib\\site-packages"
    ],
    "meta_path": [
      "<class '_virtualenv._Finder'>",
      "<class '_frozen_importlib.BuiltinImporter'>",
      "<class '_frozen_importlib.FrozenImporter'>",
      "<class '_frozen_importlib_external.PathFinder'>"
    ],
    "fs_encoding": "utf-8",
    "io_encoding": "cp1252"
  },
  "version": "3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]",
  "makefile_filename": "C:\\Python310\\Lib\\config\\Makefile",
  "os": "<module 'os' from 'C:\\\\Python310\\\\lib\\\\os.py'>",
  "site": "<module 'site' from 'C:\\\\Python310\\\\lib\\\\site.py'>",
  "datetime": "<module 'datetime' from 'C:\\\\Python310\\\\lib\\\\datetime.py'>",
  "math": "<module 'math' (built-in)>",
  "json": "<module 'json' from 'C:\\\\Python310\\\\lib\\\\json\\\\__init__.py'>"
} [virtualenv\run\session.py:53]
base: 639 I add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\shg\AppData\Local\pypa\virtualenv) [virtualenv\run\session.py:57]
base: 639 D got embed update of distribution %s from ('pip', WindowsPath('C:/Users/shg/AppData/Local/pypa/virtualenv/wheel/3.10/embed/3/pip.json')) [virtualenv\app_data\via_disk_folder.py:131]
base: 639 D got embed update of distribution %s from ('setuptools', WindowsPath('C:/Users/shg/AppData/Local/pypa/virtualenv/wheel/3.10/embed/3/setuptools.json')) [virtualenv\app_data\via_disk_folder.py:131]
base: 639 D got embed update of distribution %s from ('wheel', WindowsPath('C:/Users/shg/AppData/Local/pypa/virtualenv/wheel/3.10/embed/3/wheel.json')) [virtualenv\app_data\via_disk_folder.py:131]
base: 639 D using periodically updated wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\pip-23.3.1-py3-none-any.whl [virtualenv\seed\wheels\periodic_update.py:49]
base: 639 D using periodically updated wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\wheel-0.41.3-py3-none-any.whl [virtualenv\seed\wheels\periodic_update.py:49]
base: 639 D using periodically updated wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\setuptools-68.2.2-py3-none-any.whl [virtualenv\seed\wheels\periodic_update.py:49]
base: 639 D install pip from wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\pip-23.3.1-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:49]
base: 639 D install wheel from wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\wheel-0.41.3-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:49]
base: 639 D install setuptools from wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\setuptools-68.2.2-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:49]
base: 639 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\wheel-0.41.3-py3-none-any\wheel to D:\temp\test_tox\.tox\base\Lib\site-packages\wheel [virtualenv\util\path\_sync.py:40]
base: 639 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\pip-23.3.1-py3-none-any\pip to D:\temp\test_tox\.tox\base\Lib\site-packages\pip [virtualenv\util\path\_sync.py:40]
base: 639 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\distutils-precedence.pth to D:\temp\test_tox\.tox\base\Lib\site-packages\distutils-precedence.pth [virtualenv\util\path\_sync.py:40]
base: 639 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\pkg_resources to D:\temp\test_tox\.tox\base\Lib\site-packages\pkg_resources [virtualenv\util\path\_sync.py:40]
base: 654 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\wheel-0.41.3-py3-none-any\wheel-0.41.3.dist-info to D:\temp\test_tox\.tox\base\Lib\site-packages\wheel-0.41.3.dist-info [virtualenv\util\path\_sync.py:40]
base: 670 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\wheel-0.41.3-py3-none-any\wheel-0.41.3.virtualenv to D:\temp\test_tox\.tox\base\Lib\site-packages\wheel-0.41.3.virtualenv [virtualenv\util\path\_sync.py:40]
base: 670 D generated console scripts wheel-3.10.exe wheel3.10.exe wheel3.exe wheel.exe [virtualenv\seed\embed\via_app_data\pip_install\base.py:43]
base: 670 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\setuptools to D:\temp\test_tox\.tox\base\Lib\site-packages\setuptools [virtualenv\util\path\_sync.py:40]
base: 739 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\setuptools-68.2.2.dist-info to D:\temp\test_tox\.tox\base\Lib\site-packages\setuptools-68.2.2.dist-info [virtualenv\util\path\_sync.py:40]
base: 739 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\setuptools-68.2.2.virtualenv to D:\temp\test_tox\.tox\base\Lib\site-packages\setuptools-68.2.2.virtualenv [virtualenv\util\path\_sync.py:40]
base: 739 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\_distutils_hack to D:\temp\test_tox\.tox\base\Lib\site-packages\_distutils_hack [virtualenv\util\path\_sync.py:40]
base: 755 D generated console scripts  [virtualenv\seed\embed\via_app_data\pip_install\base.py:43]
base: 824 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\pip-23.3.1-py3-none-any\pip-23.3.1.dist-info to D:\temp\test_tox\.tox\base\Lib\site-packages\pip-23.3.1.dist-info [virtualenv\util\path\_sync.py:40]
base: 824 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\pip-23.3.1-py3-none-any\pip-23.3.1.virtualenv to D:\temp\test_tox\.tox\base\Lib\site-packages\pip-23.3.1.virtualenv [virtualenv\util\path\_sync.py:40]
base: 824 D generated console scripts pip3.10.exe pip-3.10.exe pip3.exe pip.exe [virtualenv\seed\embed\via_app_data\pip_install\base.py:43]
base: 824 I add activators for Bash, Batch, Fish, Nushell, PowerShell, Python [virtualenv\run\session.py:63]
base: 824 D write D:\temp\test_tox\.tox\base\pyvenv.cfg [virtualenv\create\pyenv_cfg.py:32]
base: 824 D     home = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
base: 824 D     implementation = CPython [virtualenv\create\pyenv_cfg.py:36]
base: 839 D     version_info = 3.10.10.final.0 [virtualenv\create\pyenv_cfg.py:36]
base: 839 D     virtualenv = 20.24.5 [virtualenv\create\pyenv_cfg.py:36]
base: 839 D     include-system-site-packages = false [virtualenv\create\pyenv_cfg.py:36]
base: 839 D     base-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
base: 839 D     base-exec-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
base: 839 D     base-executable = C:\Python310\python.exe [virtualenv\create\pyenv_cfg.py:36]
HERERRRRRRRRRRRRRRRRRRRRRRRRRRR
base: 839 W install_deps> python -I -m pip install pytest [tox\tox_env\api.py:427]
Looking in indexes: https://pypi.local.net/main/stable/+simple/
Collecting pytest
  Using cached https://pypi.local.net/root/pypi/%2Bf/0d0/09c083ea859a7/pytest-7.4.3-py3-none-any.whl (325 kB)
Collecting iniconfig (from pytest)
  Using cached https://pypi.local.net/root/pypi/%2Bf/b6a/85871a79d2e3b/iniconfig-2.0.0-py3-none-any.whl (5.9 kB)
Collecting packaging (from pytest)
  Using cached https://pypi.local.net/root/pypi/%2Bf/8c4/91190033a9af7/packaging-23.2-py3-none-any.whl (53 kB)
Collecting pluggy<2.0,>=0.12 (from pytest)
  Using cached https://pypi.local.net/root/pypi/%2Bf/d89/c696a773f8bd3/pluggy-1.3.0-py3-none-any.whl (18 kB)
Collecting exceptiongroup>=1.0.0rc8 (from pytest)
  Using cached https://pypi.local.net/root/pypi/%2Bf/4bf/d3996ac73b41e/exceptiongroup-1.2.0-py3-none-any.whl (16 kB)
Collecting tomli>=1.0.0 (from pytest)
  Using cached https://pypi.local.net/root/pypi/%2Bf/939/de3e7a6161af0/tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting colorama (from pytest)
  Using cached https://pypi.local.net/root/pypi/%2Bf/4f1/d9991f5acc0ca/colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Installing collected packages: tomli, pluggy, packaging, iniconfig, exceptiongroup, colorama, pytest
Successfully installed colorama-0.4.6 exceptiongroup-1.2.0 iniconfig-2.0.0 packaging-23.2 pluggy-1.3.0 pytest-7.4.3 tomli-2.0.1
base: 3029 I exit 0 (2.19 seconds) D:\temp\test_tox> python -I -m pip install pytest pid=17524 [tox\execute\api.py:279]
HERERRRRRRRRRRRRRRRRRRRRRRRRRRR
.pkg_external: 3029 I find interpreter for spec PythonSpec(path=C:\Python310\python.exe) [virtualenv\discovery\builtin.py:58]
.pkg_external: 3029 I proposed PythonInfo(spec=CPython3.10.10.final.0-64, exe=C:\Python310\python.exe, platform=win32, version='3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]', encoding_fs_io=utf-8-utf-8) [virtualenv\discovery\builtin.py:65]
.pkg_external: 3029 D accepted PythonInfo(spec=CPython3.10.10.final.0-64, exe=C:\Python310\python.exe, platform=win32, version='3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]', encoding_fs_io=utf-8-utf-8) [virtualenv\discovery\builtin.py:67]
.pkg_external: 3029 I create virtual environment via CPython3Windows(dest=D:\temp\test_tox\.tox\.pkg_external, clear=False, no_vcs_ignore=False, global=False) [virtualenv\run\session.py:50]
.pkg_external: 3029 D create folder D:\temp\test_tox\.tox\.pkg_external\Lib\site-packages [virtualenv\util\path\_sync.py:12]
.pkg_external: 3029 D create folder D:\temp\test_tox\.tox\.pkg_external\Scripts [virtualenv\util\path\_sync.py:12]
.pkg_external: 3029 D write D:\temp\test_tox\.tox\.pkg_external\pyvenv.cfg [virtualenv\create\pyenv_cfg.py:32]
.pkg_external: 3029 D   home = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external: 3029 D   implementation = CPython [virtualenv\create\pyenv_cfg.py:36]
.pkg_external: 3029 D   version_info = 3.10.10.final.0 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external: 3029 D   virtualenv = 20.24.5 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external: 3029 D   include-system-site-packages = false [virtualenv\create\pyenv_cfg.py:36]
.pkg_external: 3029 D   base-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external: 3029 D   base-exec-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external: 3044 D   base-executable = C:\Python310\python.exe [virtualenv\create\pyenv_cfg.py:36]
.pkg_external: 3044 D copy C:\Python310\Lib\venv\scripts\nt\python.exe to D:\temp\test_tox\.tox\.pkg_external\Scripts\python.exe [virtualenv\util\path\_sync.py:40]
.pkg_external: 3044 D copy C:\Python310\Lib\venv\scripts\nt\pythonw.exe to D:\temp\test_tox\.tox\.pkg_external\Scripts\pythonw.exe [virtualenv\util\path\_sync.py:40]
.pkg_external: 3044 D create virtualenv import hook file D:\temp\test_tox\.tox\.pkg_external\Lib\site-packages\_virtualenv.pth [virtualenv\create\via_global_ref\api.py:91]
.pkg_external: 3044 D create D:\temp\test_tox\.tox\.pkg_external\Lib\site-packages\_virtualenv.py [virtualenv\create\via_global_ref\api.py:94]
.pkg_external: 3044 D ============================== target debug ============================== [virtualenv\run\session.py:52]
.pkg_external: 3044 D debug via 'D:\temp\test_tox\.tox\.pkg_external\Scripts\python.exe' 'C:\Python310\lib\site-packages\virtualenv\create\debug.py' [virtualenv\create\creator.py:200]
.pkg_external: 3044 D {
  "sys": {
    "executable": "D:\\temp\\test_tox\\.tox\\.pkg_external\\Scripts\\python.exe",
    "_base_executable": "C:\\Python310\\python.exe",
    "prefix": "D:\\temp\\test_tox\\.tox\\.pkg_external",
    "base_prefix": "C:\\Python310",
    "real_prefix": null,
    "exec_prefix": "D:\\temp\\test_tox\\.tox\\.pkg_external",
    "base_exec_prefix": "C:\\Python310",
    "path": [
      "C:\\Python310\\python310.zip",
      "C:\\Python310\\DLLs",
      "C:\\Python310\\lib",
      "C:\\Python310",
      "D:\\temp\\test_tox\\.tox\\.pkg_external",
      "D:\\temp\\test_tox\\.tox\\.pkg_external\\lib\\site-packages"
    ],
    "meta_path": [
      "<class '_virtualenv._Finder'>",
      "<class '_frozen_importlib.BuiltinImporter'>",
      "<class '_frozen_importlib.FrozenImporter'>",
      "<class '_frozen_importlib_external.PathFinder'>"
    ],
    "fs_encoding": "utf-8",
    "io_encoding": "cp1252"
  },
  "version": "3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]",
  "makefile_filename": "C:\\Python310\\Lib\\config\\Makefile",
  "os": "<module 'os' from 'C:\\\\Python310\\\\lib\\\\os.py'>",
  "site": "<module 'site' from 'C:\\\\Python310\\\\lib\\\\site.py'>",
  "datetime": "<module 'datetime' from 'C:\\\\Python310\\\\lib\\\\datetime.py'>",
  "math": "<module 'math' (built-in)>",
  "json": "<module 'json' from 'C:\\\\Python310\\\\lib\\\\json\\\\__init__.py'>"
} [virtualenv\run\session.py:53]
.pkg_external: 3091 I add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\shg\AppData\Local\pypa\virtualenv) [virtualenv\run\session.py:57]
.pkg_external: 3091 D got embed update of distribution %s from ('pip', WindowsPath('C:/Users/shg/AppData/Local/pypa/virtualenv/wheel/3.10/embed/3/pip.json')) [virtualenv\app_data\via_disk_folder.py:131]
.pkg_external: 3091 D got embed update of distribution %s from ('setuptools', WindowsPath('C:/Users/shg/AppData/Local/pypa/virtualenv/wheel/3.10/embed/3/setuptools.json')) [virtualenv\app_data\via_disk_folder.py:131]
.pkg_external: 3091 D using periodically updated wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\pip-23.3.1-py3-none-any.whl [virtualenv\seed\wheels\periodic_update.py:49]
.pkg_external: 3091 D using periodically updated wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\setuptools-68.2.2-py3-none-any.whl [virtualenv\seed\wheels\periodic_update.py:49]
.pkg_external: 3091 D got embed update of distribution %s from ('wheel', WindowsPath('C:/Users/shg/AppData/Local/pypa/virtualenv/wheel/3.10/embed/3/wheel.json')) [virtualenv\app_data\via_disk_folder.py:131]
.pkg_external: 3091 D using periodically updated wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\wheel-0.41.3-py3-none-any.whl [virtualenv\seed\wheels\periodic_update.py:49]
.pkg_external: 3091 D install pip from wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\pip-23.3.1-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:49]
.pkg_external: 3091 D install setuptools from wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\setuptools-68.2.2-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:49]
.pkg_external: 3091 D install wheel from wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\wheel-0.41.3-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:49]
.pkg_external: 3107 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\pip-23.3.1-py3-none-any\pip to D:\temp\test_tox\.tox\.pkg_external\Lib\site-packages\pip [virtualenv\util\path\_sync.py:40]
.pkg_external: 3107 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\distutils-precedence.pth to D:\temp\test_tox\.tox\.pkg_external\Lib\site-packages\distutils-precedence.pth [virtualenv\util\path\_sync.py:40]
.pkg_external: 3107 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\wheel-0.41.3-py3-none-any\wheel to D:\temp\test_tox\.tox\.pkg_external\Lib\site-packages\wheel [virtualenv\util\path\_sync.py:40]
.pkg_external: 3113 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\pkg_resources to D:\temp\test_tox\.tox\.pkg_external\Lib\site-packages\pkg_resources [virtualenv\util\path\_sync.py:40]
.pkg_external: 3129 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\wheel-0.41.3-py3-none-any\wheel-0.41.3.dist-info to D:\temp\test_tox\.tox\.pkg_external\Lib\site-packages\wheel-0.41.3.dist-info [virtualenv\util\path\_sync.py:40]
.pkg_external: 3129 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\wheel-0.41.3-py3-none-any\wheel-0.41.3.virtualenv to D:\temp\test_tox\.tox\.pkg_external\Lib\site-packages\wheel-0.41.3.virtualenv [virtualenv\util\path\_sync.py:40]
.pkg_external: 3129 D generated console scripts wheel.exe wheel3.exe wheel-3.10.exe wheel3.10.exe [virtualenv\seed\embed\via_app_data\pip_install\base.py:43]
.pkg_external: 3129 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\setuptools to D:\temp\test_tox\.tox\.pkg_external\Lib\site-packages\setuptools [virtualenv\util\path\_sync.py:40]
.pkg_external: 3192 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\setuptools-68.2.2.dist-info to D:\temp\test_tox\.tox\.pkg_external\Lib\site-packages\setuptools-68.2.2.dist-info [virtualenv\util\path\_sync.py:40]
.pkg_external: 3207 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\setuptools-68.2.2.virtualenv to D:\temp\test_tox\.tox\.pkg_external\Lib\site-packages\setuptools-68.2.2.virtualenv [virtualenv\util\path\_sync.py:40]
.pkg_external: 3207 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\_distutils_hack to D:\temp\test_tox\.tox\.pkg_external\Lib\site-packages\_distutils_hack [virtualenv\util\path\_sync.py:40]
.pkg_external: 3214 D generated console scripts  [virtualenv\seed\embed\via_app_data\pip_install\base.py:43]
.pkg_external: 3276 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\pip-23.3.1-py3-none-any\pip-23.3.1.dist-info to D:\temp\test_tox\.tox\.pkg_external\Lib\site-packages\pip-23.3.1.dist-info [virtualenv\util\path\_sync.py:40]
.pkg_external: 3276 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\pip-23.3.1-py3-none-any\pip-23.3.1.virtualenv to D:\temp\test_tox\.tox\.pkg_external\Lib\site-packages\pip-23.3.1.virtualenv [virtualenv\util\path\_sync.py:40]
.pkg_external: 3276 D generated console scripts pip3.exe pip.exe pip3.10.exe pip-3.10.exe [virtualenv\seed\embed\via_app_data\pip_install\base.py:43]
.pkg_external: 3276 I add activators for Bash, Batch, Fish, Nushell, PowerShell, Python [virtualenv\run\session.py:63]
.pkg_external: 3292 D write D:\temp\test_tox\.tox\.pkg_external\pyvenv.cfg [virtualenv\create\pyenv_cfg.py:32]
.pkg_external: 3292 D   home = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external: 3292 D   implementation = CPython [virtualenv\create\pyenv_cfg.py:36]
.pkg_external: 3292 D   version_info = 3.10.10.final.0 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external: 3292 D   virtualenv = 20.24.5 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external: 3292 D   include-system-site-packages = false [virtualenv\create\pyenv_cfg.py:36]
.pkg_external: 3292 D   base-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external: 3292 D   base-exec-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external: 3292 D   base-executable = C:\Python310\python.exe [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3514 I find interpreter for spec PythonSpec(path=C:\Python310\python.exe) [virtualenv\discovery\builtin.py:58]
.pkg_external_sdist_meta: 3514 I proposed PythonInfo(spec=CPython3.10.10.final.0-64, exe=C:\Python310\python.exe, platform=win32, version='3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]', encoding_fs_io=utf-8-utf-8) [virtualenv\discovery\builtin.py:65]
.pkg_external_sdist_meta: 3514 D accepted PythonInfo(spec=CPython3.10.10.final.0-64, exe=C:\Python310\python.exe, platform=win32, version='3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]', encoding_fs_io=utf-8-utf-8) [virtualenv\discovery\builtin.py:67]
.pkg_external_sdist_meta: 3530 I create virtual environment via CPython3Windows(dest=D:\temp\test_tox\.tox\.pkg_external_sdist_meta, clear=False, no_vcs_ignore=False, global=False) [virtualenv\run\session.py:50]
.pkg_external_sdist_meta: 3530 D create folder D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Lib\site-packages [virtualenv\util\path\_sync.py:12]
.pkg_external_sdist_meta: 3530 D create folder D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Scripts [virtualenv\util\path\_sync.py:12]
.pkg_external_sdist_meta: 3530 D write D:\temp\test_tox\.tox\.pkg_external_sdist_meta\pyvenv.cfg [virtualenv\create\pyenv_cfg.py:32]
.pkg_external_sdist_meta: 3530 D        home = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3530 D        implementation = CPython [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3530 D        version_info = 3.10.10.final.0 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3530 D        virtualenv = 20.24.5 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3530 D        include-system-site-packages = false [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3530 D        base-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3530 D        base-exec-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3530 D        base-executable = C:\Python310\python.exe [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3530 D copy C:\Python310\Lib\venv\scripts\nt\python.exe to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Scripts\python.exe [virtualenv\util\path\_sync.py:40]
.pkg_external_sdist_meta: 3530 D copy C:\Python310\Lib\venv\scripts\nt\pythonw.exe to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Scripts\pythonw.exe [virtualenv\util\path\_sync.py:40]
.pkg_external_sdist_meta: 3545 D create virtualenv import hook file D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Lib\site-packages\_virtualenv.pth [virtualenv\create\via_global_ref\api.py:91]
.pkg_external_sdist_meta: 3545 D create D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Lib\site-packages\_virtualenv.py [virtualenv\create\via_global_ref\api.py:94]
.pkg_external_sdist_meta: 3545 D ============================== target debug ============================== [virtualenv\run\session.py:52]
.pkg_external_sdist_meta: 3545 D debug via 'D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Scripts\python.exe' 'C:\Python310\lib\site-packages\virtualenv\create\debug.py' [virtualenv\create\creator.py:200]
.pkg_external_sdist_meta: 3545 D {
  "sys": {
    "executable": "D:\\temp\\test_tox\\.tox\\.pkg_external_sdist_meta\\Scripts\\python.exe",
    "_base_executable": "C:\\Python310\\python.exe",
    "prefix": "D:\\temp\\test_tox\\.tox\\.pkg_external_sdist_meta",
    "base_prefix": "C:\\Python310",
    "real_prefix": null,
    "exec_prefix": "D:\\temp\\test_tox\\.tox\\.pkg_external_sdist_meta",
    "base_exec_prefix": "C:\\Python310",
    "path": [
      "C:\\Python310\\python310.zip",
      "C:\\Python310\\DLLs",
      "C:\\Python310\\lib",
      "C:\\Python310",
      "D:\\temp\\test_tox\\.tox\\.pkg_external_sdist_meta",
      "D:\\temp\\test_tox\\.tox\\.pkg_external_sdist_meta\\lib\\site-packages"
    ],
    "meta_path": [
      "<class '_virtualenv._Finder'>",
      "<class '_frozen_importlib.BuiltinImporter'>",
      "<class '_frozen_importlib.FrozenImporter'>",
      "<class '_frozen_importlib_external.PathFinder'>"
    ],
    "fs_encoding": "utf-8",
    "io_encoding": "cp1252"
  },
  "version": "3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]",
  "makefile_filename": "C:\\Python310\\Lib\\config\\Makefile",
  "os": "<module 'os' from 'C:\\\\Python310\\\\lib\\\\os.py'>",
  "site": "<module 'site' from 'C:\\\\Python310\\\\lib\\\\site.py'>",
  "datetime": "<module 'datetime' from 'C:\\\\Python310\\\\lib\\\\datetime.py'>",
  "math": "<module 'math' (built-in)>",
  "json": "<module 'json' from 'C:\\\\Python310\\\\lib\\\\json\\\\__init__.py'>"
} [virtualenv\run\session.py:53]
.pkg_external_sdist_meta: 3614 I add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\shg\AppData\Local\pypa\virtualenv) [virtualenv\run\session.py:57]
.pkg_external_sdist_meta: 3614 D got embed update of distribution %s from ('pip', WindowsPath('C:/Users/shg/AppData/Local/pypa/virtualenv/wheel/3.10/embed/3/pip.json')) [virtualenv\app_data\via_disk_folder.py:131]
.pkg_external_sdist_meta: 3614 D got embed update of distribution %s from ('setuptools', WindowsPath('C:/Users/shg/AppData/Local/pypa/virtualenv/wheel/3.10/embed/3/setuptools.json')) [virtualenv\app_data\via_disk_folder.py:131]
.pkg_external_sdist_meta: 3614 D using periodically updated wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\pip-23.3.1-py3-none-any.whl [virtualenv\seed\wheels\periodic_update.py:49]
.pkg_external_sdist_meta: 3614 D got embed update of distribution %s from ('wheel', WindowsPath('C:/Users/shg/AppData/Local/pypa/virtualenv/wheel/3.10/embed/3/wheel.json')) [virtualenv\app_data\via_disk_folder.py:131]
.pkg_external_sdist_meta: 3614 D using periodically updated wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\setuptools-68.2.2-py3-none-any.whl [virtualenv\seed\wheels\periodic_update.py:49]
.pkg_external_sdist_meta: 3614 D using periodically updated wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\wheel-0.41.3-py3-none-any.whl [virtualenv\seed\wheels\periodic_update.py:49]
.pkg_external_sdist_meta: 3614 D install pip from wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\pip-23.3.1-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:49]
.pkg_external_sdist_meta: 3614 D install setuptools from wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\setuptools-68.2.2-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:49]
.pkg_external_sdist_meta: 3614 D install wheel from wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\wheel-0.41.3-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:49]
.pkg_external_sdist_meta: 3614 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\pip-23.3.1-py3-none-any\pip to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Lib\site-packages\pip [virtualenv\util\path\_sync.py:40]
.pkg_external_sdist_meta: 3614 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\distutils-precedence.pth to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Lib\site-packages\distutils-precedence.pth [virtualenv\util\path\_sync.py:40]
.pkg_external_sdist_meta: 3614 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\wheel-0.41.3-py3-none-any\wheel to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Lib\site-packages\wheel [virtualenv\util\path\_sync.py:40]
.pkg_external_sdist_meta: 3614 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\pkg_resources to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Lib\site-packages\pkg_resources [virtualenv\util\path\_sync.py:40]
.pkg_external_sdist_meta: 3645 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\wheel-0.41.3-py3-none-any\wheel-0.41.3.dist-info to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Lib\site-packages\wheel-0.41.3.dist-info [virtualenv\util\path\_sync.py:40]
.pkg_external_sdist_meta: 3645 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\wheel-0.41.3-py3-none-any\wheel-0.41.3.virtualenv to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Lib\site-packages\wheel-0.41.3.virtualenv [virtualenv\util\path\_sync.py:40]
.pkg_external_sdist_meta: 3645 D generated console scripts wheel.exe wheel-3.10.exe wheel3.10.exe wheel3.exe [virtualenv\seed\embed\via_app_data\pip_install\base.py:43]
.pkg_external_sdist_meta: 3661 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\setuptools to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Lib\site-packages\setuptools [virtualenv\util\path\_sync.py:40]
.pkg_external_sdist_meta: 3730 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\setuptools-68.2.2.dist-info to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Lib\site-packages\setuptools-68.2.2.dist-info [virtualenv\util\path\_sync.py:40]
.pkg_external_sdist_meta: 3730 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\setuptools-68.2.2.virtualenv to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Lib\site-packages\setuptools-68.2.2.virtualenv [virtualenv\util\path\_sync.py:40]
.pkg_external_sdist_meta: 3730 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\_distutils_hack to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Lib\site-packages\_distutils_hack [virtualenv\util\path\_sync.py:40]
.pkg_external_sdist_meta: 3730 D generated console scripts  [virtualenv\seed\embed\via_app_data\pip_install\base.py:43]
.pkg_external_sdist_meta: 3808 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\pip-23.3.1-py3-none-any\pip-23.3.1.dist-info to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Lib\site-packages\pip-23.3.1.dist-info [virtualenv\util\path\_sync.py:40]
.pkg_external_sdist_meta: 3808 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\pip-23.3.1-py3-none-any\pip-23.3.1.virtualenv to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\Lib\site-packages\pip-23.3.1.virtualenv [virtualenv\util\path\_sync.py:40]
.pkg_external_sdist_meta: 3814 D generated console scripts pip3.exe pip.exe pip3.10.exe pip-3.10.exe [virtualenv\seed\embed\via_app_data\pip_install\base.py:43]
.pkg_external_sdist_meta: 3814 I add activators for Bash, Batch, Fish, Nushell, PowerShell, Python [virtualenv\run\session.py:63]
.pkg_external_sdist_meta: 3814 D write D:\temp\test_tox\.tox\.pkg_external_sdist_meta\pyvenv.cfg [virtualenv\create\pyenv_cfg.py:32]
.pkg_external_sdist_meta: 3814 D        home = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3814 D        implementation = CPython [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3814 D        version_info = 3.10.10.final.0 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3814 D        virtualenv = 20.24.5 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3814 D        include-system-site-packages = false [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3814 D        base-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3814 D        base-exec-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3814 D        base-executable = C:\Python310\python.exe [virtualenv\create\pyenv_cfg.py:36]
.pkg_external_sdist_meta: 3814 W install_requires> python -I -m pip install setuptools>=40.8.0 wheel [tox\tox_env\api.py:427]
Looking in indexes: https://pypi.local.net/main/stable/+simple/
Requirement already satisfied: setuptools>=40.8.0 in d:\temp\test_tox\.tox\.pkg_external_sdist_meta\lib\site-packages (68.2.2)
Requirement already satisfied: wheel in d:\temp\test_tox\.tox\.pkg_external_sdist_meta\lib\site-packages (0.41.3)
.pkg_external_sdist_meta: 4764 I exit 0 (0.94 seconds) D:\temp\test_tox> python -I -m pip install setuptools>=40.8.0 wheel pid=12040 [tox\execute\api.py:279]
.pkg_external_sdist_meta: 4764 W _optional_hooks D:\temp\test_tox\.tox\.pkg_external\tmp\sdist-extract\my_package-0.0.0> python C:\Python310\lib\site-packages\pyproject_api\_backend.py True setuptools.build_meta __legacy__ [tox\tox_env\api.py:427]
Backend: run command _optional_hooks with args {}
Backend: Wrote response {'return': {'get_requires_for_build_sdist': True, 'prepare_metadata_for_build_wheel': True, 'get_requires_for_build_wheel': True, 'build_editable': True, 'get_requires_for_build_editable': True, 'prepare_metadata_for_build_editable': True}} to C:\Users\shg\AppData\Local\Temp\pep517__optional_hooks-58wqs5tp.json
.pkg_external_sdist_meta: 5033 I exit None (0.27 seconds) D:\temp\test_tox\.tox\.pkg_external\tmp\sdist-extract\my_package-0.0.0> python C:\Python310\lib\site-packages\pyproject_api\_backend.py True setuptools.build_meta __legacy__ pid=25984 [tox\execute\api.py:279]
.pkg_external_sdist_meta: 5037 W get_requires_for_build_sdist D:\temp\test_tox\.tox\.pkg_external\tmp\sdist-extract\my_package-0.0.0> python C:\Python310\lib\site-packages\pyproject_api\_backend.py True setuptools.build_meta __legacy__ [tox\tox_env\api.py:427]
Backend: run command get_requires_for_build_sdist with args {'config_settings': None}
running egg_info
writing my_package.egg-info\PKG-INFO
writing dependency_links to my_package.egg-info\dependency_links.txt
writing requirements to my_package.egg-info\requires.txt
writing top-level names to my_package.egg-info\top_level.txt
reading manifest file 'my_package.egg-info\SOURCES.txt'
writing manifest file 'my_package.egg-info\SOURCES.txt'
Backend: Wrote response {'return': []} to C:\Users\shg\AppData\Local\Temp\pep517_get_requires_for_build_sdist-nlt0rcpu.json
.pkg_external_sdist_meta: 5316 I exit None (0.28 seconds) D:\temp\test_tox\.tox\.pkg_external\tmp\sdist-extract\my_package-0.0.0> python C:\Python310\lib\site-packages\pyproject_api\_backend.py True setuptools.build_meta __legacy__ pid=25984 [tox\execute\api.py:279]
.pkg_external_sdist_meta: 5319 W get_requires_for_build_wheel D:\temp\test_tox\.tox\.pkg_external\tmp\sdist-extract\my_package-0.0.0> python C:\Python310\lib\site-packages\pyproject_api\_backend.py True setuptools.build_meta __legacy__ [tox\tox_env\api.py:427]
Backend: run command get_requires_for_build_wheel with args {'config_settings': None}
running egg_info
writing my_package.egg-info\PKG-INFO
writing dependency_links to my_package.egg-info\dependency_links.txt
writing requirements to my_package.egg-info\requires.txt
writing top-level names to my_package.egg-info\top_level.txt
reading manifest file 'my_package.egg-info\SOURCES.txt'
writing manifest file 'my_package.egg-info\SOURCES.txt'
Backend: Wrote response {'return': ['wheel']} to C:\Users\shg\AppData\Local\Temp\pep517_get_requires_for_build_wheel-n9re1mec.json
.pkg_external_sdist_meta: 5369 I exit None (0.05 seconds) D:\temp\test_tox\.tox\.pkg_external\tmp\sdist-extract\my_package-0.0.0> python C:\Python310\lib\site-packages\pyproject_api\_backend.py True setuptools.build_meta __legacy__ pid=25984 [tox\execute\api.py:279]
.pkg_external_sdist_meta: 5369 W install_requires_for_build_wheel> python -I -m pip install wheel [tox\tox_env\api.py:427]
Looking in indexes: https://pypi.local.net/main/stable/+simple/
Requirement already satisfied: wheel in d:\temp\test_tox\.tox\.pkg_external_sdist_meta\lib\site-packages (0.41.3)
.pkg_external_sdist_meta: 5793 I exit 0 (0.42 seconds) D:\temp\test_tox> python -I -m pip install wheel pid=20880 [tox\execute\api.py:279]
.pkg_external_sdist_meta: 5794 W prepare_metadata_for_build_wheel D:\temp\test_tox\.tox\.pkg_external\tmp\sdist-extract\my_package-0.0.0> python C:\Python310\lib\site-packages\pyproject_api\_backend.py True setuptools.build_meta __legacy__ [tox\tox_env\api.py:427]
Backend: run command prepare_metadata_for_build_wheel with args {'metadata_directory': 'D:\\temp\\test_tox\\.tox\\.pkg_external_sdist_meta\\.meta', 'config_settings': None}
running dist_info
creating D:\temp\test_tox\.tox\.pkg_external_sdist_meta\.meta\my_package.egg-info
writing D:\temp\test_tox\.tox\.pkg_external_sdist_meta\.meta\my_package.egg-info\PKG-INFO
writing dependency_links to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\.meta\my_package.egg-info\dependency_links.txt
writing requirements to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\.meta\my_package.egg-info\requires.txt
writing top-level names to D:\temp\test_tox\.tox\.pkg_external_sdist_meta\.meta\my_package.egg-info\top_level.txt
writing manifest file 'D:\temp\test_tox\.tox\.pkg_external_sdist_meta\.meta\my_package.egg-info\SOURCES.txt'
reading manifest file 'D:\temp\test_tox\.tox\.pkg_external_sdist_meta\.meta\my_package.egg-info\SOURCES.txt'
writing manifest file 'D:\temp\test_tox\.tox\.pkg_external_sdist_meta\.meta\my_package.egg-info\SOURCES.txt'
creating 'D:\temp\test_tox\.tox\.pkg_external_sdist_meta\.meta\my_package-0.0.0.dist-info'
Backend: Wrote response {'return': 'my_package-0.0.0.dist-info'} to C:\Users\shg\AppData\Local\Temp\pep517_prepare_metadata_for_build_wheel-fufcyn7q.json
.pkg_external_sdist_meta: 5827 I exit None (0.03 seconds) D:\temp\test_tox\.tox\.pkg_external\tmp\sdist-extract\my_package-0.0.0> python C:\Python310\lib\site-packages\pyproject_api\_backend.py True setuptools.build_meta __legacy__ pid=25984 [tox\execute\api.py:279]
base: 5831 W install_package_deps> python -I -m pip install pytest==7.4.3 [tox\tox_env\api.py:427]
Looking in indexes: https://pypi.local.net/main/stable/+simple/
Requirement already satisfied: pytest==7.4.3 in d:\temp\test_tox\.tox\base\lib\site-packages (7.4.3)
Requirement already satisfied: iniconfig in d:\temp\test_tox\.tox\base\lib\site-packages (from pytest==7.4.3) (2.0.0)
Requirement already satisfied: packaging in d:\temp\test_tox\.tox\base\lib\site-packages (from pytest==7.4.3) (23.2)
Requirement already satisfied: pluggy<2.0,>=0.12 in d:\temp\test_tox\.tox\base\lib\site-packages (from pytest==7.4.3) (1.3.0)
Requirement already satisfied: exceptiongroup>=1.0.0rc8 in d:\temp\test_tox\.tox\base\lib\site-packages (from pytest==7.4.3) (1.2.0)
Requirement already satisfied: tomli>=1.0.0 in d:\temp\test_tox\.tox\base\lib\site-packages (from pytest==7.4.3) (2.0.1)
Requirement already satisfied: colorama in d:\temp\test_tox\.tox\base\lib\site-packages (from pytest==7.4.3) (0.4.6)
base: 6268 I exit 0 (0.44 seconds) D:\temp\test_tox> python -I -m pip install pytest==7.4.3 pid=13060 [tox\execute\api.py:279]
base: 6269 W install_package> python -I -m pip install --force-reinstall --no-deps D:\temp\test_tox\dist\my_package-0.0.0.tar.gz [tox\tox_env\api.py:427]
Looking in indexes: https://pypi.local.net/main/stable/+simple/
Processing d:\temp\test_tox\dist\my_package-0.0.0.tar.gz
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: my-package
  Building wheel for my-package (pyproject.toml): started
  Building wheel for my-package (pyproject.toml): finished with status 'done'
  Created wheel for my-package: filename=my_package-0.0.0-py3-none-any.whl size=1245 sha256=cb3b6affbe298075cf6a3fc27ec1f30b665a345847b1d2c04cdce489ef9a3074
  Stored in directory: c:\users\shg\appdata\local\pip\cache\wheels\01\fa\fc\5f0fda0b398876b925d94bb49c81d28a20a171ed417f9fcab8
Successfully built my-package
Installing collected packages: my-package
Successfully installed my-package-0.0.0
base: 9073 I exit 0 (2.80 seconds) D:\temp\test_tox> python -I -m pip install --force-reinstall --no-deps D:\temp\test_tox\dist\my_package-0.0.0.tar.gz pid=23936 [tox\execute\api.py:279]
base: 9073 W commands[0]> pytest [tox\tox_env\api.py:427]
================================================================================================================================== test session starts ==================================================================================================================================
platform win32 -- Python 3.10.10, pytest-7.4.3, pluggy-1.3.0
cachedir: .tox\base\.pytest_cache
rootdir: D:\temp\test_tox
collected 1 item

tests\test_tox.py .                                                                                                                                                                                                                                                                [100%]

=================================================================================================================================== 1 passed in 0.00s ===================================================================================================================================
base: 9273 I exit 0 (0.20 seconds) D:\temp\test_tox> pytest pid=13360 [tox\execute\api.py:279]
base: OK ✔ in 8.86 seconds
flake8: 9273 W remove tox env folder D:\temp\test_tox\.tox\flake8 [tox\tox_env\api.py:322]
flake8: 9345 I find interpreter for spec PythonSpec(path=C:\Python310\python.exe) [virtualenv\discovery\builtin.py:58]
flake8: 9346 I proposed PythonInfo(spec=CPython3.10.10.final.0-64, exe=C:\Python310\python.exe, platform=win32, version='3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]', encoding_fs_io=utf-8-utf-8) [virtualenv\discovery\builtin.py:65]
flake8: 9346 D accepted PythonInfo(spec=CPython3.10.10.final.0-64, exe=C:\Python310\python.exe, platform=win32, version='3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]', encoding_fs_io=utf-8-utf-8) [virtualenv\discovery\builtin.py:67]
flake8: 9349 I create virtual environment via CPython3Windows(dest=D:\temp\test_tox\.tox\flake8, clear=False, no_vcs_ignore=False, global=False) [virtualenv\run\session.py:50]
flake8: 9355 D create folder D:\temp\test_tox\.tox\flake8\Lib\site-packages [virtualenv\util\path\_sync.py:12]
flake8: 9356 D create folder D:\temp\test_tox\.tox\flake8\Scripts [virtualenv\util\path\_sync.py:12]
flake8: 9356 D write D:\temp\test_tox\.tox\flake8\pyvenv.cfg [virtualenv\create\pyenv_cfg.py:32]
flake8: 9356 D  home = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
flake8: 9356 D  implementation = CPython [virtualenv\create\pyenv_cfg.py:36]
flake8: 9356 D  version_info = 3.10.10.final.0 [virtualenv\create\pyenv_cfg.py:36]
flake8: 9356 D  virtualenv = 20.24.5 [virtualenv\create\pyenv_cfg.py:36]
flake8: 9356 D  include-system-site-packages = false [virtualenv\create\pyenv_cfg.py:36]
flake8: 9356 D  base-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
flake8: 9356 D  base-exec-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
flake8: 9356 D  base-executable = C:\Python310\python.exe [virtualenv\create\pyenv_cfg.py:36]
flake8: 9356 D copy C:\Python310\Lib\venv\scripts\nt\python.exe to D:\temp\test_tox\.tox\flake8\Scripts\python.exe [virtualenv\util\path\_sync.py:40]
flake8: 9356 D copy C:\Python310\Lib\venv\scripts\nt\pythonw.exe to D:\temp\test_tox\.tox\flake8\Scripts\pythonw.exe [virtualenv\util\path\_sync.py:40]
flake8: 9356 D create virtualenv import hook file D:\temp\test_tox\.tox\flake8\Lib\site-packages\_virtualenv.pth [virtualenv\create\via_global_ref\api.py:91]
flake8: 9356 D create D:\temp\test_tox\.tox\flake8\Lib\site-packages\_virtualenv.py [virtualenv\create\via_global_ref\api.py:94]
flake8: 9356 D ============================== target debug ============================== [virtualenv\run\session.py:52]
flake8: 9356 D debug via 'D:\temp\test_tox\.tox\flake8\Scripts\python.exe' 'C:\Python310\lib\site-packages\virtualenv\create\debug.py' [virtualenv\create\creator.py:200]
flake8: 9356 D {
  "sys": {
    "executable": "D:\\temp\\test_tox\\.tox\\flake8\\Scripts\\python.exe",
    "_base_executable": "C:\\Python310\\python.exe",
    "prefix": "D:\\temp\\test_tox\\.tox\\flake8",
    "base_prefix": "C:\\Python310",
    "real_prefix": null,
    "exec_prefix": "D:\\temp\\test_tox\\.tox\\flake8",
    "base_exec_prefix": "C:\\Python310",
    "path": [
      "C:\\Python310\\python310.zip",
      "C:\\Python310\\DLLs",
      "C:\\Python310\\lib",
      "C:\\Python310",
      "D:\\temp\\test_tox\\.tox\\flake8",
      "D:\\temp\\test_tox\\.tox\\flake8\\lib\\site-packages"
    ],
    "meta_path": [
      "<class '_virtualenv._Finder'>",
      "<class '_frozen_importlib.BuiltinImporter'>",
      "<class '_frozen_importlib.FrozenImporter'>",
      "<class '_frozen_importlib_external.PathFinder'>"
    ],
    "fs_encoding": "utf-8",
    "io_encoding": "cp1252"
  },
  "version": "3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]",
  "makefile_filename": "C:\\Python310\\Lib\\config\\Makefile",
  "os": "<module 'os' from 'C:\\\\Python310\\\\lib\\\\os.py'>",
  "site": "<module 'site' from 'C:\\\\Python310\\\\lib\\\\site.py'>",
  "datetime": "<module 'datetime' from 'C:\\\\Python310\\\\lib\\\\datetime.py'>",
  "math": "<module 'math' (built-in)>",
  "json": "<module 'json' from 'C:\\\\Python310\\\\lib\\\\json\\\\__init__.py'>"
} [virtualenv\run\session.py:53]
flake8: 9387 I add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\shg\AppData\Local\pypa\virtualenv) [virtualenv\run\session.py:57]
flake8: 9403 D got embed update of distribution %s from ('setuptools', WindowsPath('C:/Users/shg/AppData/Local/pypa/virtualenv/wheel/3.10/embed/3/setuptools.json')) [virtualenv\app_data\via_disk_folder.py:131]
flake8: 9403 D got embed update of distribution %s from ('pip', WindowsPath('C:/Users/shg/AppData/Local/pypa/virtualenv/wheel/3.10/embed/3/pip.json')) [virtualenv\app_data\via_disk_folder.py:131]
flake8: 9403 D using periodically updated wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\setuptools-68.2.2-py3-none-any.whl [virtualenv\seed\wheels\periodic_update.py:49]
flake8: 9403 D using periodically updated wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\pip-23.3.1-py3-none-any.whl [virtualenv\seed\wheels\periodic_update.py:49]
flake8: 9403 D got embed update of distribution %s from ('wheel', WindowsPath('C:/Users/shg/AppData/Local/pypa/virtualenv/wheel/3.10/embed/3/wheel.json')) [virtualenv\app_data\via_disk_folder.py:131]
flake8: 9403 D using periodically updated wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\wheel-0.41.3-py3-none-any.whl [virtualenv\seed\wheels\periodic_update.py:49]
flake8: 9403 D install setuptools from wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\setuptools-68.2.2-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:49]
flake8: 9403 D install pip from wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\pip-23.3.1-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:49]
flake8: 9403 D install wheel from wheel C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\house\wheel-0.41.3-py3-none-any.whl via CopyPipInstall [virtualenv\seed\embed\via_app_data\via_app_data.py:49]
flake8: 9403 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\distutils-precedence.pth to D:\temp\test_tox\.tox\flake8\Lib\site-packages\distutils-precedence.pth [virtualenv\util\path\_sync.py:40]
flake8: 9403 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\pip-23.3.1-py3-none-any\pip to D:\temp\test_tox\.tox\flake8\Lib\site-packages\pip [virtualenv\util\path\_sync.py:40]
flake8: 9403 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\wheel-0.41.3-py3-none-any\wheel to D:\temp\test_tox\.tox\flake8\Lib\site-packages\wheel [virtualenv\util\path\_sync.py:40]
flake8: 9403 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\pkg_resources to D:\temp\test_tox\.tox\flake8\Lib\site-packages\pkg_resources [virtualenv\util\path\_sync.py:40]
flake8: 9427 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\wheel-0.41.3-py3-none-any\wheel-0.41.3.dist-info to D:\temp\test_tox\.tox\flake8\Lib\site-packages\wheel-0.41.3.dist-info [virtualenv\util\path\_sync.py:40]
flake8: 9427 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\wheel-0.41.3-py3-none-any\wheel-0.41.3.virtualenv to D:\temp\test_tox\.tox\flake8\Lib\site-packages\wheel-0.41.3.virtualenv [virtualenv\util\path\_sync.py:40]
flake8: 9438 D generated console scripts wheel.exe wheel3.exe wheel-3.10.exe wheel3.10.exe [virtualenv\seed\embed\via_app_data\pip_install\base.py:43]
flake8: 9443 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\setuptools to D:\temp\test_tox\.tox\flake8\Lib\site-packages\setuptools [virtualenv\util\path\_sync.py:40]
flake8: 9504 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\setuptools-68.2.2.dist-info to D:\temp\test_tox\.tox\flake8\Lib\site-packages\setuptools-68.2.2.dist-info [virtualenv\util\path\_sync.py:40]
flake8: 9519 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\setuptools-68.2.2.virtualenv to D:\temp\test_tox\.tox\flake8\Lib\site-packages\setuptools-68.2.2.virtualenv [virtualenv\util\path\_sync.py:40]
flake8: 9519 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\setuptools-68.2.2-py3-none-any\_distutils_hack to D:\temp\test_tox\.tox\flake8\Lib\site-packages\_distutils_hack [virtualenv\util\path\_sync.py:40]
flake8: 9527 D generated console scripts  [virtualenv\seed\embed\via_app_data\pip_install\base.py:43]
flake8: 9588 D copy directory C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\pip-23.3.1-py3-none-any\pip-23.3.1.dist-info to D:\temp\test_tox\.tox\flake8\Lib\site-packages\pip-23.3.1.dist-info [virtualenv\util\path\_sync.py:40]
flake8: 9604 D copy C:\Users\shg\AppData\Local\pypa\virtualenv\wheel\3.10\image\1\CopyPipInstall\pip-23.3.1-py3-none-any\pip-23.3.1.virtualenv to D:\temp\test_tox\.tox\flake8\Lib\site-packages\pip-23.3.1.virtualenv [virtualenv\util\path\_sync.py:40]
flake8: 9604 D generated console scripts pip-3.10.exe pip3.exe pip.exe pip3.10.exe [virtualenv\seed\embed\via_app_data\pip_install\base.py:43]
flake8: 9604 I add activators for Bash, Batch, Fish, Nushell, PowerShell, Python [virtualenv\run\session.py:63]
flake8: 9604 D write D:\temp\test_tox\.tox\flake8\pyvenv.cfg [virtualenv\create\pyenv_cfg.py:32]
flake8: 9604 D  home = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
flake8: 9604 D  implementation = CPython [virtualenv\create\pyenv_cfg.py:36]
flake8: 9604 D  version_info = 3.10.10.final.0 [virtualenv\create\pyenv_cfg.py:36]
flake8: 9604 D  virtualenv = 20.24.5 [virtualenv\create\pyenv_cfg.py:36]
flake8: 9604 D  include-system-site-packages = false [virtualenv\create\pyenv_cfg.py:36]
flake8: 9604 D  base-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
flake8: 9620 D  base-exec-prefix = C:\Python310 [virtualenv\create\pyenv_cfg.py:36]
flake8: 9627 D  base-executable = C:\Python310\python.exe [virtualenv\create\pyenv_cfg.py:36]
flake8: 9627 W install_deps> python -I -m pip install flake8 [tox\tox_env\api.py:427]
Looking in indexes: https://pypi.local.net/main/stable/+simple/
Collecting flake8
  Using cached https://pypi.local.net/root/pypi/%2Bf/ffd/fce58ea94c658/flake8-6.1.0-py2.py3-none-any.whl (58 kB)
Collecting mccabe<0.8.0,>=0.7.0 (from flake8)
  Using cached https://pypi.local.net/root/pypi/%2Bf/6c2/d30ab6be0e4a4/mccabe-0.7.0-py2.py3-none-any.whl (7.3 kB)
Collecting pycodestyle<2.12.0,>=2.11.0 (from flake8)
  Using cached https://pypi.local.net/root/pypi/%2Bf/44f/e31000b2d866f/pycodestyle-2.11.1-py2.py3-none-any.whl (31 kB)
Collecting pyflakes<3.2.0,>=3.1.0 (from flake8)
  Using cached https://pypi.local.net/root/pypi/%2Bf/413/2f6d49cb4dae6/pyflakes-3.1.0-py2.py3-none-any.whl (62 kB)
Installing collected packages: pyflakes, pycodestyle, mccabe, flake8
Successfully installed flake8-6.1.0 mccabe-0.7.0 pycodestyle-2.11.1 pyflakes-3.1.0
flake8: 11209 I exit 0 (1.58 seconds) D:\temp\test_tox> python -I -m pip install flake8 pid=22176 [tox\execute\api.py:279]
flake8: 11425 E internal error [tox\session\cmd\run\single.py:59]
Traceback (most recent call last):
  File "C:\Python310\lib\site-packages\tox\session\cmd\run\single.py", line 46, in _evaluate
    tox_env.setup()
  File "C:\Python310\lib\site-packages\tox\tox_env\api.py", line 248, in setup
    self._setup_with_env()
  File "C:\Python310\lib\site-packages\tox\tox_env\runner.py", line 145, in _setup_with_env
    self._setup_pkg()
  File "C:\Python310\lib\site-packages\tox\tox_env\runner.py", line 168, in _setup_pkg
    self._packages = self._build_packages()
  File "C:\Python310\lib\site-packages\tox\tox_env\python\runner.py", line 121, in _build_packages
    packages = package_env.perform_packaging(self.conf)
  File "C:\Python310\lib\site-packages\tox\tox_env\package.py", line 45, in _func
    return meth(*args, **kwargs)
  File "C:\Python310\lib\site-packages\tox\tox_env\python\virtual_env\package\cmd_builder.py", line 100, in perform_packaging
    return self.extract_install_info(for_env, path)
  File "C:\Python310\lib\site-packages\tox\tox_env\package.py", line 45, in _func
    return meth(*args, **kwargs)
  File "C:\Python310\lib\site-packages\tox\tox_env\python\virtual_env\package\cmd_builder.py", line 114, in extract_install_info
    shutil.rmtree(work_dir)  # pragma: no cover
  File "C:\Python310\lib\shutil.py", line 750, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\Python310\lib\shutil.py", line 615, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "C:\Python310\lib\shutil.py", line 624, in _rmtree_unsafe
    onerror(os.rmdir, path, sys.exc_info())
  File "C:\Python310\lib\shutil.py", line 622, in _rmtree_unsafe
    os.rmdir(path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\temp\\test_tox\\.tox\\.pkg_external\\tmp\\sdist-extract\\my_package-0.0.0'
.pkg_external_sdist_meta: 11431 W _exit D:\temp\test_tox\.tox\.pkg_external\tmp\sdist-extract\my_package-0.0.0> python C:\Python310\lib\site-packages\pyproject_api\_backend.py True setuptools.build_meta __legacy__ [tox\tox_env\api.py:427]
Backend: run command _exit with args {}
Backend: Wrote response {'return': 0} to C:\Users\shg\AppData\Local\Temp\pep517__exit-c2hnidx7.json
.pkg_external_sdist_meta: 11447 I exit None (0.02 seconds) D:\temp\test_tox\.tox\.pkg_external\tmp\sdist-extract\my_package-0.0.0> python C:\Python310\lib\site-packages\pyproject_api\_backend.py True setuptools.build_meta __legacy__ pid=25984 [tox\execute\api.py:279]
  base: OK (8.86=setup[8.66]+cmd[0.20] seconds)
  flake8: FAIL code 2 (2.19 seconds)
  evaluation failed :( (11.36 seconds)

Minimal example

files:
test_tox.zip

Download files from issue
open command console and enter folder
run tox --installpkg dist\my_package-0.0.0.tar.gz -c ./tox.ini

See output added above (tox --rvv)
@Stefanhg Stefanhg changed the title Tox fails (cannot access file because it is being used by another process (path) ) Tox fails (cannot access file because it is being used by another process (path) ) on 2th test with --installpkg provided Dec 1, 2023
@Stefanhg
Copy link
Contributor Author

Stefanhg commented Dec 1, 2023

It is the folder inside of .tox\.pkg_external\tmp\sdist-extract\ that is kept locked.
I can remove all contents of \sdist-extract\XXXX but not the XXXX folder
Anyone have an idea what could cause this? This seems to be down in how Tox handles environments

@Stefanhg
Copy link
Contributor Author

Stefanhg commented Dec 1, 2023

Reproduced on my home computer. I even reduced the needed tox file to bare minimum:

[tox]
envlist = base, flake8
[testenv:base]
[testenv:flake8]

I also just spend a good amount of time digging though the testcases and figuring out how i could reproduce it using PyTest.
Note that pkg_with_sdist also needs to get modified as for some reason it built the wrong type:

@pytest.fixture(scope="session")
def pkg_with_sdist(
    pkg_with_extras_project: Path,
    pkg_builder: Callable[[Path, Path, list[str], bool], Path],
) -> Path:
    dist = pkg_with_extras_project / "dist"
    pkg_builder(dist, pkg_with_extras_project, ["sdist"], False)
    return next(dist.iterdir())

Actual testcase:

def test_run_installpkg_targz(tox_project: ToxProjectCreator,
                              pkg_with_sdist: Path,
                              tmp_path: Path) -> None:
    project = tox_project({"tox.ini": """
    [tox]
    envlist = base, flake8
    [testenv]
    package = sdist
    [testenv:base]
    [testenv:flake8]
    """})
    outcome = project.run(f"--installpkg={pkg_with_sdist}")
    outcome.assert_success()

@Stefanhg
Copy link
Contributor Author

@gaborbernat Do you have any idea what could be causing this?
I tried to look into it myself but I have no idea what causes the issue.
I assumed that It may be caused by the package still being installed when it cleans up after running the test but if i set a breakpoint in the test, enter the PyTest folder, activate the environment and do pip list demo-1.0.0 is not installed. So I am unsure how Tox handles a package when it is not a part of the pip list.

@gaborbernat
Copy link
Member

No idea.

@Stefanhg
Copy link
Contributor Author

Stefanhg commented Dec 22, 2023

I did some hacking which allowed the test to pass. First I just deactivated the removal of the work_dir in extract_install_info
But that was not enough for the tests to pass so after also uninstalling the demo project by adding:

cmd = ['python', '-I', '-m', 'pip', 'uninstall', 'demo-1.0.0', "-y"]
self._env.execute(cmd, stdin=StdinSource.OFF, run_id=f"install_{of_type}")

It passes the testcase I mentioned in this Issue.
Now it is just about figuring out a way for Tox to handle this properly.

From what I can see there are a few options:

  1. The sdist directory is stored within each Tox env and not outside of it.
  2. Ensuring that Pip always uninstall the pkg_external it between each test.
  3. No delete of the pkg_external/tmp folder doing testing and create it once per run of Tox

For some reason only the tmp folder in .pkg_external is removed which I don't understand so at that point I see both options to be reasonable but I think the correct handling of this would be to move .pkg_external to the env folder.

I don't know what is the most correct way of handling this.
Any thoughts about this @gaborbernat? I really need this resolved so my tests at work will start passing.

@fschulze
Copy link

With devpi we have seen similar problems. It seems like subprocesses might still be around for a short time on Windows, even after the subprocess call in Python has returned. We added a retry with a short wait to work directory removal: https://github.com/devpi/devpi/blob/034aa0b21b4b1b00e1bdd6cba5927ef4dbd02347/client/devpi/main.py#L226

Also see devpi/devpi#913

@Stefanhg
Copy link
Contributor Author

@fschulze Thanks for leaving your comment.
I tried implementing your hack for Tox but it is sadly not the fix here. It is something that actually keeps .pkg_external folder busy while running multiple env's in combination with --installpkg parameter.
I do think the solution is that .pkg_external should be within each env and not global for each env.

@gaborbernat
Copy link
Member

PR to fix it welcome.

@fschulze
Copy link

I think creating the folder once and not removing after test run of an env sounds like the correct solution when compared to everything else tox does in other cases. I don't see how removing it helps with test isolation or anything like it and duplicating it also seems wasteful.

I still wonder what is still accessing it though.

@Stefanhg
Copy link
Contributor Author

@fschulze Noted.
I will try and get my commit into an PR then. I am having a bit of trouble with reducing my commit tree of GitHub to only include the relevant information.

Stefanhg added a commit to Stefanhg/tox that referenced this issue Jan 16, 2024
Disabled cleaning of .sdist-extract folder and added testcase to catch issue caused by feature.
gaborbernat pushed a commit that referenced this issue Jan 16, 2024
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@Stefanhg
Copy link
Contributor Author

Tested and now works!
Closing issue.

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

3 participants