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

failure on packages dependency change #3294

Open
AdrianCert opened this issue Jun 14, 2024 · 0 comments
Open

failure on packages dependency change #3294

AdrianCert opened this issue Jun 14, 2024 · 0 comments

Comments

@AdrianCert
Copy link

Issue

I have tox configuration that I notice every time I change the package dependency I face up this issue. This is happen only for the first time running the same cli. My assumption is that the logic relay of some staff to be there and it's not.

Environment

Provide at least:

  • OS: windows10
Output of pip list of the host Python, where tox is installed
Package                     Version     Editable project location
--------------------------- ----------- ------------------------------------------------
aiosqlite                   0.20.0
alembic                     1.13.1
annotated-types             0.6.0
anyio                       3.7.1
apprise                     1.7.6
asgi-lifespan               2.1.0
async-timeout               4.0.3
asyncpg                     0.29.0
atlassian-python-api        3.35.0
attrs                       23.2.0
Babel                       2.15.0
backports.tarfile           1.1.1
beartype                    0.18.5
black                       24.4.2
boolean.py                  4.0
bracex                      2.4
build                       1.2.1
cachetools                  5.3.3
certifi                     2024.2.2
cffi                        1.16.0
cfgv                        3.4.0
chardet                     5.2.0
charset-normalizer          3.3.2
click                       8.1.7
cloudpickle                 3.0.0
colorama                    0.4.6
coolname                    2.2.0
coverage                    7.5.1
croniter                    2.0.5
cryptography                42.0.7
dateparser                  1.2.0
Deprecated                  1.2.14
distlib                     0.3.8
dnspython                   2.6.1
docker                      6.1.3
docutils                    0.21.2
dohq-artifactory            0.9.2
email_validator             2.1.1
et-xmlfile                  1.1.0
exceptiongroup              1.2.1
filelock                    3.14.0
fsspec                      2024.3.1
ghp-import                  2.1.0
gitdb                       4.0.11
GitPython                   3.1.43
google-auth                 2.29.0
graphviz                    0.20.3
greenlet                    3.0.3
griffe                      0.44.0
h11                         0.14.0
h2                          4.1.0
hpack                       4.0.0
httpcore                    1.0.5
httpx                       0.27.0
humanize                    4.9.0
hyperframe                  6.0.1
identify                    2.5.36
idna                        3.7
importlib_metadata          7.1.0
importlib_resources         6.1.3
isodate                     0.6.1
itsdangerous                2.2.0
jaraco.classes              3.4.0
jaraco.context              5.3.0
jaraco.functools            4.0.1
Jinja2                      3.1.4
jinja2-humanize-extension   0.4.0
jsonpatch                   1.33
jsonpointer                 2.4
jsonschema                  4.22.0
jsonschema-specifications   2023.12.1
keyring                     25.2.0
kubernetes                  29.0.0
lark                        1.1.9
license-expression          30.3.0
Mako                        1.3.3
Markdown                    3.6
markdown-it-py              3.0.0
MarkupSafe                  2.1.5
mdurl                       0.1.2
mergedeep                   1.3.4
mkdocs                      1.6.0
mkdocs-awesome-pages-plugin 2.9.2
mkdocs-get-deps             0.2.0
mkdocs-kroki-plugin         0.7.0
mkdocs-material             9.5.21
mkdocs-material-extensions  1.3.1
mock                        5.1.0
more-itertools              10.2.0
mypy-extensions             1.0.0
natsort                     8.4.0
nh3                         0.2.17
nodeenv                     1.8.0
numpy                       1.26.4
oauthlib                    3.2.2
openpyxl                    3.1.2
orjson                      3.10.3
packaging                   24.0
paginate                    0.5.6
pandas                      2.2.2
pathlib                     1.0.1
pathspec                    0.12.1
pendulum                    2.1.2
pip                         24.0
pkginfo                     1.10.0
platformdirs                4.2.1
pluggy                      1.5.0
ply                         3.11
pre-commit                  3.7.0
prefect                     2.18.3
pyasn1                      0.6.0
pyasn1_modules              0.4.0
pycparser                   2.22
pydantic                    2.7.1
pydantic_core               2.18.2
Pygments                    2.18.0
PyJWT                       2.8.0
pymdown-extensions          10.8.1
pyparsing                   3.1.2
pyproject-api               1.6.1
pyproject_hooks             1.1.0
python-dateutil             2.9.0.post0
python-multipart            0.0.9
python-slugify              8.0.4
pytz                        2024.1
pytzdata                    2020.1
pywin32                     306
pywin32-ctypes              0.2.2
PyYAML                      6.0.1
pyyaml_env_tag              0.1
rdflib                      7.0.0
readchar                    4.0.6
readme_renderer             43.0
referencing                 0.35.1
regex                       2024.4.28
requests                    2.31.0
requests-oauthlib           2.0.0
requests-toolbelt           1.0.0
rfc3339-validator           0.1.4
rfc3986                     2.0.0
rich                        13.7.1
rpds-py                     0.18.1
rsa                         4.9
ruamel.yaml                 0.18.6
ruamel.yaml.clib            0.2.8
ruff                        0.4.4
sdc                         2.0.0a4     C:\Users\pan7clj\Desktop\git\auto-spdx-generator
semantic-version            2.10.0
setuptools                  69.2.0
shellingham                 1.5.4
six                         1.16.0
smmap                       5.0.1
sniffio                     1.3.1
spdx-tools                  0.8.2
SQLAlchemy                  2.0.30
text-unidecode              1.3
toml                        0.10.2
tomli                       2.0.1
tox                         4.15.0
twine                       5.0.0
typer                       0.12.3
typing                      3.7.4.3
typing_extensions           4.11.0
tzdata                      2024.1
tzlocal                     5.2
ujson                       5.9.0
uritools                    4.0.2
urllib3                     2.2.1
uvicorn                     0.28.1
virtualenv                  20.26.1
watchdog                    4.0.0
wcmatch                     8.5.1
websocket-client            1.8.0
websockets                  12.0
wheel                       0.43.0
wrapt                       1.16.0
XlsxWriter                  3.2.0
xmltodict                   0.13.0
zipp                        3.18.1

Output of running tox

Output of tox -v -p
```console
py39: recreate env because dependencies removed: Jinja2, XlsxWriter, openpyxl
py39: remove tox env folder C:\Users\Public\.tox\sdc\py39
py39: create virtual environment via CPython3Windows(dest=C:\Users\Public\.tox\sdc\py39, clear=False, no_vcs_ignore=False, global=False)
py39: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\me\AppData\Local\pypa\virtualenv)
py39: add activators for Bash, Batch, Fish, Nushell, PowerShell, Python
py39: internal error
Traceback (most recent call last):
  File "C:\Users\me\Desktop\git\auto-spdx-generator\.venv\lib\site-packages\tox\tox_env\api.py", line 249, in setup
    self._setup_with_env()
  File "C:\Users\me\Desktop\git\auto-spdx-generator\.venv\lib\site-packages\tox\tox_env\runner.py", line 145, in _setup_with_env
    self._setup_pkg()
  File "C:\Users\me\Desktop\git\auto-spdx-generator\.venv\lib\site-packages\tox\tox_env\runner.py", line 170, in _setup_pkg
    self._install(self._packages, RunToxEnv.__name__, "package")
  File "C:\Users\me\Desktop\git\auto-spdx-generator\.venv\lib\site-packages\tox\tox_env\api.py", line 94, in _install
    self.installer.install(arguments, section, of_type)
  File "C:\Users\me\Desktop\git\auto-spdx-generator\.venv\lib\site-packages\tox\tox_env\python\pip\pip_install.py", line 95, in install
    self._install_list_of_deps(arguments, section, of_type)
  File "C:\Users\me\Desktop\git\auto-spdx-generator\.venv\lib\site-packages\tox\tox_env\python\pip\pip_install.py", line 202, in _install_list_of_deps
    raise Recreate(msg)  # pragma: no branch
tox.tox_env.errors.Recreate: dependencies removed: Jinja2, XlsxWriter, openpyxl

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\me\Desktop\git\auto-spdx-generator\.venv\lib\site-packages\tox\session\cmd\run\single.py", line 47, in _evaluate
    tox_env.setup()
  File "C:\Users\me\Desktop\git\auto-spdx-generator\.venv\lib\site-packages\tox\tox_env\api.py", line 255, in setup
    self._setup_with_env()
  File "C:\Users\me\Desktop\git\auto-spdx-generator\.venv\lib\site-packages\tox\tox_env\runner.py", line 145, in _setup_with_env
    self._setup_pkg()
  File "C:\Users\me\Desktop\git\auto-spdx-generator\.venv\lib\site-packages\tox\tox_env\runner.py", line 168, in _setup_pkg
    self._packages = self._build_packages()
  File "C:\Users\me\Desktop\git\auto-spdx-generator\.venv\lib\site-packages\tox\tox_env\python\runner.py", line 120, in _build_packages
    packages = package_env.perform_packaging(self.conf)
  File "C:\Users\me\Desktop\git\auto-spdx-generator\.venv\lib\site-packages\tox\tox_env\package.py", line 46, in _func
    return meth(*args, **kwargs)
  File "C:\Users\me\Desktop\git\auto-spdx-generator\.venv\lib\site-packages\tox\tox_env\python\virtual_env\package\pyproject.py", line 260, in perform_packaging
    sdist = create_session_view(sdist, self._package_temp_path)
  File "C:\Users\me\Desktop\git\auto-spdx-generator\.venv\lib\site-packages\tox\util\file_view.py", line 35, in create_session_view
    shutil.copyfile(package, session_package)
  File "C:\Users\me\.pyenv\pyenv-win\versions\3.9.13\lib\shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Public\\.tox\\sdc\\.pkg\\dist\\sdc-2.0.0a4.tar.gz'

Minimal example

This is the configuration that I used! To be mention that it's stored in pyproject.toml

[tool.tox]
legacy_tox_ini = """
[tox]
envlist =
    cheking-{black,ruff}
    py{38,39}
    coverage
work_dir = {env:public}/.tox/{env:TOX_PROJECT_NAME:sdc}

[testenv:py]
recreate=True
extras = test
package=editable
commands =
    python -m unittest discover tests
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

1 participant