Giter VIP home page Giter VIP logo

tox-pdm's Introduction

tox-pdm

A plugin for tox that utilizes PDM as the package manager and installer.

Github Actions PyPI pre-commit Code style: black Tox Versions

With this plugin, you can migrate your project to PDM while retaining the ability to test against multiple versions.

Installation

$ pip install tox-pdm

Or,

$ pdm add -d tox-pdm

Or if you installed tox via pipx, you can inject the plugin by:

$ pipx inject tox tox-pdm

Example tox.ini

The following simple example installs dev and test dependencies into the venv created by Tox and uses pytest to execute the tests, on both Python 3.7 and 3.8.

[tox]
min_version = 4.0
envlist = py37,py38

[testenv]
groups =  ; Dependency groups in pyproject.toml
    dev
    test
deps =      ; Additional dependencies, it will be installed into the library path via normal pip method
    flake8
commands =
    pytest test/

Here is another one installing the test dependencies and executing the test PDM script

[tox]
min_version = 4.0
envlist = py3{8,9,10}

[testenv]
groups = test
commands = test

If no groups are specified, the pdm install will be skipped.

A real-world example can be found at this repository's tox.ini and GitHub Action workflow.

Some best practices:

  1. pdm executable must be exposed in PATH, if it is not the case, give the absolute path to tox by tox --pdm <path_to_pdm>.
  2. Make sure you have generated pdm.lock before running the test, it will greatly accelerate the testing.
  3. If you don't set skip_install = true, the current package will be built and installed into the testing environment together with the dependencies from pyproject.toml.
  4. Reuse your PDM scripts to avoid duplication

tox-pdm's People

Contributors

davidism avatar deronnax avatar frostming avatar noirbizarre avatar pohlt avatar pre-commit-ci[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tox-pdm's Issues

doesn't work when pdm is installed with pyprojectx

> tox -e old     
old: recreate env because env type changed from {'name': 'old', 'type': 'VirtualEnvRunner'} to {'name': 'old', 'type': 'PdmRunner'}
old: remove tox env folder C:\project\.tox\old
old: install_deps> python -I -m pip install pytest==8.0 robotframework==6.1.1
old: install_deps> pdm sync --no-self --group test
old: exit 2 (0.05 seconds) C:\project> pdm sync --no-self --group test
  old: FAIL code 2 (9.58 seconds)
  evaluation failed :( (9.84 seconds)

this is because it's running the command pdm sync --no-self --group test, but when pdm is installed with pyprojectx (see the "inside project" installation method) the command needs to be prefixed with ./pw:

./pw pdm sync --no-self --group test

related: pyprojectx/pyprojectx#23

tox uses wrong Python interpreter locally

When I do a pdm run tox -e py38 locally (where I have a python2 and python3.8 installed), tox tries to use python2 to setup the virtualenv:

action: py38, msg: installpkg
cwd: /home/tom/proj/assertion
cmd: /usr/bin/python -m pip install --no-deps -U .tox/.tmp/package/1/assertion-0.0.1.tar.gz
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/tom/proj/assertion/__pypackages__/3.8/lib/pip/__main__.py", line 21, in <module>
    from pip._internal.cli.main import main as _main
  File "/home/tom/proj/assertion/__pypackages__/3.8/lib/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax

On GitLab, where I use dedicated Python containers, everything works nicely.

I guess the tox-pdm plugin is supposed to select the correct Python version, right?

[docs] More details documentation with best practices

Could you prepare more detailed documentation of how tox-pdm should actually be embedded into a python repository?

This is a great project and it makes working with pdm much easier but it lacks proper documentation of how to actually place it in a project.

In general pdm add -d tox-pdm will add it to the project configuration but that means it will be checked each time tox is called because it's a dependency itself and to actually use it a person need to run pdm install before calling tox.

On the other hand installing it globally means that its version must be somehow in sync with pdm. It looks like both packages are independent if looking at configuration but I noticed that in my project both version diverged and actually tox was not able to install packages that were not available in common PyPI but from private server.

Since tox-pdm actually requires a pdm to work I think it is worth adding it as a dependency that will actually lock to a version that was tested.

Package installed with wrong python version when running miltiple tox env

While running tests on multiple python version, all versions following the first one fail because the tested package is not present.
While investigating, I find that the package has been installed in 3.10 instead of that python version. However, the test group was correctly installed in 3.8.

The default python on my machine is python3.10.
This project uses python3.7:

.pdm.toml:

[python]
path = "/home/alex/.pyenv/shims/python3.7"

When running pdm run tox -r -e "py37, py38", the first env is correct, but the second env, py38, has both a 3.8 and 3.10 __pypackages__.

image
image

tox.ini:

[tox]
envlist = py3{7,8}

[testenv]
groups = test
commands =
    pytest tests/units

The problem seems to be that the packaged library in .tox/.package is installed in py38 env BEFORE .tox/py38/.pdm.toml is created, making it use the default python, python3.10. Seems like the package is installed while 3.7 runs it's tests, some kind of concurrency bug.

The workaround for me is to split the call into two separate tox -r -e ....

Installed tox-pdm breaks usage of tox for any other project without pyproject.toml

VERSION: tox-pdm-0.3.2

An installed tox-pdm causes tox to stumble on error for any project that has only a setup.py and not a pyproject.toml file.
HINT: No tox-pdm functionality is used in the tox.ini file.

$ tox -e py39
...
File "/Users/xxx/Library/Python/3.9/lib/python/site-packages/tox_pdm/utils.py", line 21, in clone_pdm_files
    old_pyproject = toml.load(root.joinpath("pyproject.toml").open("r"))
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/pathlib.py", line 1252, in open
    return io.open(self, mode, buffering, encoding, errors, newline,
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/pathlib.py", line 1120, in _opener
    return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/xxx/se/some_project/pyproject.toml'

$ tox --version
3.24.5 imported from /Users/xxx/Library/Python/3.9/lib/python/site-packages/tox/__init__.py
registered plugins:
    tox-pdm-0.3.2 at /Users/xxx/Library/Python/3.9/lib/python/site-packages/tox_pdm/plugin.py

After tox-pdm is uninstalled, everything works fine again.

Package being tested not installed in the correct directory on first execution

Hi,

I'm having an issue where my project is installed under __pypackages__3.10/lib/bin/ instead of __pypackages__3.10/bin/ when running tox for the first time in a clean environment.

This causes the following error when executing the code from the project entry point:
[PdmUsageError]: Command 'test-project' is not found on your PATH..

Running tox once more (with the -r flag) moves the package in the correct directory, and the error goes away.

pyproject.toml

[project]
name = "project"
version = "1.0"
description = "Test project"
authors = [
    {name = "Jonathan Chouinard", email = "[email protected]"},
]
dependencies = [
    "click>=8.1.3",
]
requires-python = ">=3.8"
license = {text = "MIT"}

[tool.pdm.dev-dependencies]
tox = [
  "tox",
  "tox-pdm",
]

[project.scripts]
test-project = "project.main:cli"

[build-system]
requires = ["pdm-pep517>=0.12.0"]
build-backend = "pdm.pep517.api"

tox.ini

[tox]
basepython = py38

[testenv]
commands =
    test-project

main.py

from __future__ import annotations

import click


@click.command()
def cli():
    print("YAY")

Weird behavior with tests not being executed

Hi, I am having the following tox.ini file, and the testenv is not being created and tests not running.

[tox]
min_version = 3.10
env_list = py310, lint, typecheck

[testenv]
groups = dev
commands =
    pdm run pytest

[testenv:lint]
groups = lint
skip_install = true
commands =
    pdm run black --check bash_log2nl/
    pdm run pflake8 bash_log2nl/

[testenv:typecheck]
groups = typecheck
skip_install = true
commands =
    pdm run mypy bash_log2nl/

These are the logs.

using tox.ini: /Users/gustavo.barrios/Documents/Projects/bash-log2nl/tox.ini (pid 15076)
using tox-3.24.5 from /Users/gustavo.barrios/Documents/Projects/bash-log2nl/__pypackages__/3.10/lib/tox/__init__.py (pid 15076)
lint reusing: /Users/gustavo.barrios/Documents/Projects/bash-log2nl/.tox/lint
[15088] /Users/gustavo.barrios/Documents/Projects/bash-log2nl$ /usr/local/opt/[email protected]/bin/python3.10 -m pip freeze --path .tox/lint/__pypackages__/3.10/lib >.tox/lint/log/lint-83.log
lint installed: black==22.1.0,click==8.0.3,flake8==4.0.1,mccabe==0.6.1,mypy-extensions==0.4.3,pathspec==0.9.0,platformdirs==2.4.1,pycodestyle==2.8.0,pyflakes==2.4.0,pyproject-flake8==0.0.1a2,toml==0.10.2,tomli==2.0.0
lint run-test-pre: PYTHONHASHSEED='2566144580'
lint run-test: commands[0] | pdm run -p /Users/gustavo.barrios/Documents/Projects/bash-log2nl/.tox/lint black --check bash_log2nl/
[15101] /Users/gustavo.barrios/Documents/Projects/bash-log2nl$ /usr/local/bin/pdm run -p .tox/lint black --check bash_log2nl/
All done! ✨ 🍰 ✨
6 files would be left unchanged.
lint run-test: commands[1] | pdm run -p /Users/gustavo.barrios/Documents/Projects/bash-log2nl/.tox/lint pflake8 bash_log2nl/
[15106] /Users/gustavo.barrios/Documents/Projects/bash-log2nl$ /usr/local/bin/pdm run -p .tox/lint pflake8 bash_log2nl/
typecheck reusing: /Users/gustavo.barrios/Documents/Projects/bash-log2nl/.tox/typecheck
[15114] /Users/gustavo.barrios/Documents/Projects/bash-log2nl$ /usr/local/opt/[email protected]/bin/python3.10 -m pip freeze --path .tox/typecheck/__pypackages__/3.10/lib >.tox/typecheck/log/typecheck-29.log
typecheck installed: mypy==0.931,mypy-extensions==0.4.3,tomli==2.0.0,typing_extensions==4.0.1
typecheck run-test-pre: PYTHONHASHSEED='2566144580'
typecheck run-test: commands[0] | pdm run -p /Users/gustavo.barrios/Documents/Projects/bash-log2nl/.tox/typecheck mypy bash_log2nl/
[15128] /Users/gustavo.barrios/Documents/Projects/bash-log2nl$ /usr/local/bin/pdm run -p .tox/typecheck mypy bash_log2nl/
bash_log2nl/validators.py:51: error: Statement is unreachable  [unreachable]
bash_log2nl/validators.py:55: error: Statement is unreachable  [unreachable]
bash_log2nl/models.py:16: error: Variable "bash_log2nl.models.Base" is not valid as a type  [valid-type]
bash_log2nl/models.py:16: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
bash_log2nl/models.py:16: error: Invalid base class "Base"  [misc]
bash_log2nl/models.py:78: error: Variable "bash_log2nl.models.Base" is not valid as a type  [valid-type]
bash_log2nl/models.py:78: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
bash_log2nl/models.py:78: error: Invalid base class "Base"  [misc]
bash_log2nl/models.py:111: error: Variable "bash_log2nl.models.Base" is not valid as a type  [valid-type]
bash_log2nl/models.py:111: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
bash_log2nl/models.py:111: error: Invalid base class "Base"  [misc]
bash_log2nl/models.py:124: error: Variable "bash_log2nl.models.Base" is not valid as a type  [valid-type]
bash_log2nl/models.py:124: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
bash_log2nl/models.py:124: error: Invalid base class "Base"  [misc]
bash_log2nl/models.py:137: error: Variable "bash_log2nl.models.Base" is not valid as a type  [valid-type]
bash_log2nl/models.py:137: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
bash_log2nl/models.py:137: error: Invalid base class "Base"  [misc]
bash_log2nl/parsers.py:9: error: Missing type parameters for generic type "list"  [type-arg]
bash_log2nl/parsers.py:17: error: "AST" has no attribute "value"  [attr-defined]
bash_log2nl/parsers.py:25: error: Missing type parameters for generic type "dict"  [type-arg]
bash_log2nl/parsers.py:25: error: Missing type parameters for generic type "list"  [type-arg]
bash_log2nl/parsers.py:25: error: Missing type parameters for generic type "Dict"  [type-arg]
bash_log2nl/parsers.py:25: error: Missing type parameters for generic type "List"  [type-arg]
bash_log2nl/parsers.py:33: error: Missing type parameters for generic type "dict"  [type-arg]
bash_log2nl/parsers.py:33: error: Missing type parameters for generic type "list"  [type-arg]
bash_log2nl/parsers.py:33: error: Missing type parameters for generic type "Dict"  [type-arg]
bash_log2nl/parsers.py:33: error: Missing type parameters for generic type "List"  [type-arg]
bash_log2nl/parsers.py:38: error: Missing type parameters for generic type "Dict"  [type-arg]
bash_log2nl/parsers.py:50: error: Missing type parameters for generic type "Dict"  [type-arg]
bash_log2nl/configs.py:53: error: Missing return statement  [return]
Found 25 errors in 4 files (checked 6 source files)
ERROR: InvocationError for command /usr/local/bin/pdm run -p .tox/typecheck mypy bash_log2nl/ (exited with code 1)
___________________________________ summary ____________________________________
  lint: commands succeeded
ERROR:   typecheck: commands failed

Installation instruction is not accurate

I'm just "converting" from pip to pdm, and find that the installation instruction of this project is not accurate.

It says, install pip install tox-pdm OR pdm add -d tox-pdm.

However, adding tox-pdm to pdm itself will not help, as tox will not find it.

Still there's a chance that I'm missing something, but for me the only way to get tox to know the tox=pdm plugin is to install it at system level. Also manually in a virtualenv won't work, because tox is using it's own virtualenvs.

pip install --break-system-packages tox-pdm

I guess there is nothing the plugin can do about, but at least that should be updated in the README.md with a note that it has to be the system pip to install tox-pdm in.

I'm happy to file PRs if you agree, otherwise I'd be more than happy to learn about other ways to get this to work.


Update

I'm just finding out more about this...

This works: install pdm in it's venv, then run tox in the venv:

# not in an venv
pdm install
$(pdm venv activate)
tox -r

Somehow this works - there is no pip in that venv, but tox sees tox-pdm and installs the deps.

This does not work: activate a venv, install pdm in the venv, run tox:

virtualenv .venv && source .venv/bin/activate
pdm install
# pip freeze shows that tox-pdm ins installed in pip
tox -r

Even though tox-pdm is installed in pip of the venv, tox doesn't seem to see it. Probably because as I said above, tox is using it's own venv.

Sorry for the noise - this seems more complicated than I though, and probably there is a lot to understand first about pdm works differently with virtualenvs than what pip does. Feel free to close this if that is all as expected.

Breaking bug in 0.7.1

Hey,

your latest update broke our CI/CD, see attached log.

pip install pdm tox-pdm ansible-lintοΏ½[0;m
Collecting pdm
  Downloading pdm-2.11.2-py3-none-any.whl (248 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 248.0/248.0 kB 5.5 MB/s eta 0:00:00
Collecting tox-pdm
  Downloading tox_pdm-0.7.1-py3-none-any.whl (5.3 kB)
Collecting ansible-lint
  Downloading ansible_lint-6.22.1-py3-none-any.whl (296 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 296.8/296.8 kB 11.3 MB/s eta 0:00:00
Collecting cachecontrol[filecache]>=0.13.0
  Downloading cachecontrol-0.13.1-py3-none-any.whl (22 kB)
Requirement already satisfied: packaging!=22.0,>=20.9 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from pdm) (23.2)
Requirement already satisfied: certifi in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from pdm) (2023.7.22)
Collecting python-dotenv>=0.15
  Downloading python_dotenv-1.0.0-py3-none-any.whl (19 kB)
Collecting shellingham>=1.3.2
  Downloading shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB)
Requirement already satisfied: platformdirs in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from pdm) (3.11.0)
Collecting pyproject-hooks
  Downloading pyproject_hooks-1.0.0-py3-none-any.whl (9.3 kB)
Collecting resolvelib>=1.0.1
  Downloading resolvelib-1.0.1-py2.py3-none-any.whl (17 kB)
Collecting dep-logic<1.0,>=0.0.2
  Downloading dep_logic-0.0.4-py3-none-any.whl (26 kB)
Collecting importlib-metadata>=3.6
  Downloading importlib_metadata-7.0.1-py3-none-any.whl (23 kB)
Collecting unearth>=0.12.1
  Downloading unearth-0.12.1-py3-none-any.whl (42 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.9/42.9 kB 2.6 MB/s eta 0:00:00
Requirement already satisfied: tomli>=1.1.0 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from pdm) (2.0.1)
Requirement already satisfied: virtualenv>=20 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from pdm) (20.24.5)
Collecting installer<0.8,>=0.7
  Downloading installer-0.7.0-py3-none-any.whl (453 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 453.8/453.8 kB 26.3 MB/s eta 0:00:00
Collecting findpython<1.0.0a0,>=0.4.0
  Downloading findpython-0.4.1-py3-none-any.whl (20 kB)
Collecting requests-toolbelt
  Downloading requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.5/54.5 kB 5.3 MB/s eta 0:00:00
Collecting blinker
  Downloading blinker-1.7.0-py3-none-any.whl (13 kB)
Collecting rich>=12.3.0
  Downloading rich-13.7.0-py3-none-any.whl (240 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 240.6/240.6 kB 7.1 MB/s eta 0:00:00
Collecting tomlkit<1,>=0.11.1
  Downloading tomlkit-0.12.3-py3-none-any.whl (37 kB)
Requirement already satisfied: tox>=4.0 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from tox-pdm) (4.11.3)
Collecting ansible-compat>=4.1.10
  Downloading ansible_compat-4.1.10-py3-none-any.whl (22 kB)
Collecting black>=22.8.0
  Downloading black-23.12.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 54.7 MB/s eta 0:00:00
Collecting jsonschema>=4.10.0
  Downloading jsonschema-4.20.0-py3-none-any.whl (84 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 84.7/84.7 kB 13.5 MB/s eta 0:00:00
Requirement already satisfied: requests>=2.31.0 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from ansible-lint) (2.31.0)
Collecting yamllint>=1.30.0
  Downloading yamllint-1.33.0-py3-none-any.whl (65 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.4/65.4 kB 8.6 MB/s eta 0:00:00
Collecting pathspec>=0.10.3
  Downloading pathspec-0.12.1-py3-none-any.whl (31 kB)
Collecting ansible-core>=2.12.0
  Downloading ansible_core-2.15.8-py3-none-any.whl (2.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2/2.2 MB 58.6 MB/s eta 0:00:00
Collecting subprocess-tee>=0.4.1
  Downloading subprocess_tee-0.4.1-py3-none-any.whl (5.1 kB)
Collecting wcmatch>=8.1.2
  Downloading wcmatch-8.5-py3-none-any.whl (39 kB)
Requirement already satisfied: filelock>=3.3.0 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from ansible-lint) (3.12.4)
Requirement already satisfied: pyyaml>=5.4.1 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from ansible-lint) (6.0.1)
Collecting ruamel.yaml>=0.18.5
  Downloading ruamel.yaml-0.18.5-py3-none-any.whl (116 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 116.4/116.4 kB 10.6 MB/s eta 0:00:00
Collecting typing-extensions>=4.5.0
  Downloading typing_extensions-4.9.0-py3-none-any.whl (32 kB)
Collecting cryptography
  Downloading cryptography-41.0.7-cp37-abi3-manylinux_2_28_x86_64.whl (4.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 64.1 MB/s eta 0:00:00
Collecting jinja2>=3.0.0
  Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 16.0 MB/s eta 0:00:00
Collecting importlib-resources<5.1,>=5.0
  Downloading importlib_resources-5.0.7-py3-none-any.whl (24 kB)
Collecting click>=8.0.0
  Downloading click-8.1.7-py3-none-any.whl (97 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.9/97.9 kB 6.8 MB/s eta 0:00:00
Collecting mypy-extensions>=0.4.3
  Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Collecting msgpack>=0.5.2
  Downloading msgpack-1.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (530 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 531.0/531.0 kB 21.9 MB/s eta 0:00:00
Collecting zipp>=0.5
  Downloading zipp-3.17.0-py3-none-any.whl (7.4 kB)
Collecting jsonschema-specifications>=2023.03.6
  Downloading jsonschema_specifications-2023.12.1-py3-none-any.whl (18 kB)
Collecting referencing>=0.28.4
  Downloading referencing-0.32.0-py3-none-any.whl (26 kB)
Collecting attrs>=22.2.0
  Downloading attrs-23.2.0-py3-none-any.whl (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.8/60.8 kB 4.9 MB/s eta 0:00:00
Collecting rpds-py>=0.7.1
  Downloading rpds_py-0.16.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 46.4 MB/s eta 0:00:00
Requirement already satisfied: charset-normalizer<4,>=2 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from requests>=2.31.0->ansible-lint) (3.3.0)
Requirement already satisfied: urllib3<3,>=1.21.1 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from requests>=2.31.0->ansible-lint) (2.0.6)
Requirement already satisfied: idna<4,>=2.5 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from requests>=2.31.0->ansible-lint) (3.4)
Collecting markdown-it-py>=2.2.0
  Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 87.5/87.5 kB 4.2 MB/s eta 0:00:00
Collecting pygments<3.0.0,>=2.13.0
  Downloading pygments-2.17.2-py3-none-any.whl (1.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 37.2 MB/s eta 0:00:00
Collecting ruamel.yaml.clib>=0.2.7
  Downloading ruamel.yaml.clib-0.2.8-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (562 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 562.1/562.1 kB 19.6 MB/s eta 0:00:00
Requirement already satisfied: colorama>=0.4.6 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from tox>=4.0->tox-pdm) (0.4.6)
Requirement already satisfied: pyproject-api>=1.6.1 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from tox>=4.0->tox-pdm) (1.6.1)
Requirement already satisfied: pluggy>=1.3 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from tox>=4.0->tox-pdm) (1.3.0)
Requirement already satisfied: cachetools>=5.3.1 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from tox>=4.0->tox-pdm) (5.3.1)
Requirement already satisfied: chardet>=5.2 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from tox>=4.0->tox-pdm) (5.2.0)
Requirement already satisfied: distlib<1,>=0.3.7 in /pyenv/versions/3.9.18/lib/python3.9/site-packages (from virtualenv>=20->pdm) (0.3.7)
Collecting bracex>=2.1.1
  Downloading bracex-2.4-py3-none-any.whl (11 kB)
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting mdurl~=0.1
  Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Collecting cffi>=1.12
  Downloading cffi-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (443 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 443.4/443.4 kB 24.7 MB/s eta 0:00:00
Collecting pycparser
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB 9.8 MB/s eta 0:00:00
Installing collected packages: resolvelib, zipp, typing-extensions, tomlkit, subprocess-tee, shellingham, ruamel.yaml.clib, rpds-py, python-dotenv, pyproject-hooks, pygments, pycparser, pathspec, mypy-extensions, msgpack, mdurl, MarkupSafe, installer, importlib-resources, findpython, dep-logic, click, bracex, blinker, attrs, yamllint, wcmatch, unearth, ruamel.yaml, requests-toolbelt, referencing, markdown-it-py, jinja2, importlib-metadata, cffi, cachecontrol, black, tox-pdm, rich, jsonschema-specifications, cryptography, pdm, jsonschema, ansible-core, ansible-compat, ansible-lint
Successfully installed MarkupSafe-2.1.3 ansible-compat-4.1.10 ansible-core-2.15.8 ansible-lint-6.22.1 attrs-23.2.0 black-23.12.1 blinker-1.7.0 bracex-2.4 cachecontrol-0.13.1 cffi-1.16.0 click-8.1.7 cryptography-41.0.7 dep-logic-0.0.4 findpython-0.4.1 importlib-metadata-7.0.1 importlib-resources-5.0.7 installer-0.7.0 jinja2-3.1.2 jsonschema-4.20.0 jsonschema-specifications-2023.12.1 markdown-it-py-3.0.0 mdurl-0.1.2 msgpack-1.0.7 mypy-extensions-1.0.0 pathspec-0.12.1 pdm-2.11.2 pycparser-2.21 pygments-2.17.2 pyproject-hooks-1.0.0 python-dotenv-1.0.0 referencing-0.32.0 requests-toolbelt-1.0.0 resolvelib-1.0.1 rich-13.7.0 rpds-py-0.16.2 ruamel.yaml-0.18.5 ruamel.yaml.clib-0.2.8 shellingham-1.5.4 subprocess-tee-0.4.1 tomlkit-0.12.3 tox-pdm-0.7.1 typing-extensions-4.9.0 unearth-0.12.1 wcmatch-8.5 yamllint-1.33.0 zipp-3.17.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

[notice] A new release of pip is available: 23.0.1 -> 23.3.2
[notice] To update, run: pip install --upgrade pip
οΏ½[32;1m$ tox -e pylintοΏ½[0;m
pylint: internal error
Traceback (most recent call last):
  File "/pyenv/versions/3.9.18/lib/python3.9/site-packages/tox/session/cmd/run/single.py", line 46, in _evaluate
    tox_env.setup()
  File "/pyenv/versions/3.9.18/lib/python3.9/site-packages/tox/tox_env/api.py", line 247, in setup
    self._setup_env()
  File "/pyenv/versions/3.9.18/lib/python3.9/site-packages/tox_pdm/plugin.py", line 45, in _setup_env
    if self.conf["skip_install"]:
  File "/pyenv/versions/3.9.18/lib/python3.9/site-packages/tox/config/sets.py", line 118, in __getitem__
    return self.load(item)
  File "/pyenv/versions/3.9.18/lib/python3.9/site-packages/tox/config/sets.py", line 128, in load
    config_definition = self._defined[item]
KeyError: 'skip_install'
  pylint: FAIL code 2 (0.63 seconds)
  evaluation failed :( (0.88 seconds)

Looking at the changelog, I'd guess it's because skip_install is somehow assumed to be present, although according to tox docs it is optional and has a default value of False. Could you please revert/fix this change?

feat: select lockfile to use, or alternative way of specifying `direct_minimal_versions`

In my testing, as well as using tox to select the python version, I would like to be able to select the lowest set of compatible dependencies and test against those.

The manual process I follow at the moment is to:

setup

pdm lock -L pdm/lock/lowest.lock --strategy direct_minimal
pdm lock -L pdm/lock/latest.lock

Matrix testing

I have a pipeline which runs the following process for various versions of python

venv_1

pdm sync -L pdm/lock/lowest.lock
pytest .

venv_2

pdm sync -L pdm/lock/latest.lock
pytest .

Q

Is there a way to do that with the currently-implemented functionality?

tox with tox-pdm still install dependencies with pip

Hi.
I created a tox config to test a python project managed by pdm with tox and pdm, and I was surprised to see the "classic" install_package_deps still does a classic pip install without using pdm (which defeat the whole purpose).
In our company it fails because we have some packages in a private registry, PDM has credentials to connect but pip does not.
So I had to remove tox-pdm and "recode" tox-pdm in the tox config.

 ➜ tox -v                                                                                                                                             k3d-mycluster
py3: find interpreter for spec PythonSpec(major=3)
py3: proposed PythonInfo(spec=CPython3.11.4.final.0-64, system=/opt/homebrew/opt/[email protected]/bin/python3.11, exe=/Users/mathieu/.local/pipx/venvs/tox/bin/python, platform=darwin, version='3.11.4 (main, Jun 20 2023, 17:23:00) [Clang 14.0.3 (clang-1403.0.22.14.1)]', encoding_fs_io=utf-8-utf-8)
py3: > pdm sync --no-self --group dev  #     <-- THIS IS GOOD, THAT'S THE EXPECTED BEHAVIOR
.pkg: find interpreter for spec PythonSpec(path=/Users/mathieu/.local/pipx/venvs/tox/bin/python)
.pkg: proposed PythonInfo(spec=CPython3.11.4.final.0-64, system=/opt/homebrew/opt/[email protected]/bin/python3.11, exe=/Users/mathieu/.local/pipx/venvs/tox/bin/python, platform=darwin, version='3.11.4 (main, Jun 20 2023, 17:23:00) [Clang 14.0.3 (clang-1403.0.22.14.1)]', encoding_fs_io=utf-8-utf-8)
.pkg: _optional_hooks> python /Users/mathieu/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.backend
.pkg: exit None (0.04 seconds) /Users/mathieu/dev/ggcore> python /Users/mathieu/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.backend pid=37018
.pkg: get_requires_for_build_sdist> python /Users/mathieu/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.backend
.pkg: exit None (0.00 seconds) /Users/mathieu/dev/ggcore> python /Users/mathieu/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.backend pid=37018
.pkg: build_sdist> python /Users/mathieu/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.backend
.pkg: exit None (0.38 seconds) /Users/mathieu/dev/ggcore> python /Users/mathieu/.local/pipx/venvs/tox/lib/python3.11/site-packages/pyproject_api/_backend.py True pdm.backend pid=37018
py3: install_package_deps> python -I -m pip install jinja2 pydantic requests PRIVATEPACKAGE #   <-- WRONG !

the tox.ini:

[tox]
env_list =  py3
isolated_build = True

[testenv]
groups =
    dev
    all
commands =
    pytest {tty:--color=yes} {posargs}

Let me know if you have enough information

Detect tox venvs

Is your feature request related to a problem? Please describe.

Many projects use tox to create venvs and run tests, etc.
There's a plugin for tox called tox-pdm which allows using pdm to install deps (to leverage pdm.lock, for example, i.e. for reproducible builds)
This is all great but the end user still cannot use pdm directly without either

  • creating yet another venv (.venv by default), which also requires setting up Python correctly (tox may have different Python binary set up)
  • or activating one of venvs in .tox folder (but that doesn't allow managing them via pdm venv command)

It would be great if pdm could see and manage venvs created by tox, or maybe even more generally, and venvs in the subfolders of the current project, and allow using them for commands such as "pdm lock" etc, including use by default.

Describe the solution you'd like

I see a few options:

  • pdm autodetects venvs inside ".tox" folder (or just searches for pyenv.cfg in all folders under project root and one folder down) - they show up in "pdm venv list" and can be used like any other venvs created by pdm
  • pdm option "venv.location" can find tox venvs if pointed to ".tox" - right now it expects certain folder names and ignores others - maybe a new option to disable/change name expectations, like "venv.simple_names = True"
  • new pdm option "venv.tox_working_dir = .tox" which will detect and allow using tox venvs

Option to turn plugin off for some env

Right now plugin always runs, even for envs where user wants to just do automation via commands, and not install anything (i.e. no package and no dependencies). I would be great if user is able to bypass pdm sync for a given env.

use `sync` instead of `install`

For Flask and other Pallets projects, we currently lock all dev dependencies using pip-compile. That way, when new contributors run the tests, they are guaranteed to use a known working set of dependencies, instead of possibly getting a new version of some tool with an incompatibility. I'd like that same guarantee in tox-pdm, so it will do pdm sync -d -G tests and use the lock file, instead of install which might update the lock file instead.

ModuleNotFoundError: No module named 'pytest'

My tox.ini

[tox]
envlist = py37,py38

[testenv]
groups =  ; Dependency groups in pyproject.toml
    test
    extra_tests
allowlist_externals = pdm
commands =
    pytest -s -vv {posargs} {toxinidir}/test/ --assert=plain

Error:

py37 run-test-pre: PYTHONHASHSEED='2279545942'
py37 run-test: commands[0] | pytest -s -vv /Users/laike9m/Dev/Python/Cyberbrain/test/ --assert=plain
WARNING: test command found but not installed in testenv
  cmd: /Users/laike9m/Dev/Python/Cyberbrain/__pypackages__/3.7/bin/pytest
  env: /Users/laike9m/Dev/Python/Cyberbrain/.tox/py37
Maybe you forgot to specify a dependency? See also the allowlist_externals envconfig setting.

DEPRECATION WARNING: this will be an error in tox 4 and above!
Traceback (most recent call last):
  File "/Users/laike9m/Dev/Python/Cyberbrain/__pypackages__/3.7/bin/pytest", line 5, in <module>
    from pytest import console_main
ModuleNotFoundError: No module named 'pytest'
ERROR: InvocationError for command /Users/laike9m/Dev/Python/Cyberbrain/__pypackages__/3.7/bin/pytest -s -vv test --assert=plain (exited with code 1)

Replacing pytest with pdm run pytest works. Perhaps we want to update the example in documentation?

Do not run `pdm sync` if there is no groups defined

Hello, I encountered a problem when adding a testenv that doesn't need pdm, something like this:

[testenv:benchmark]
skip_install = true
commands =
    ...

And when I run this env:

$> tox run -e benchmark
benchmark: install_deps> pdm sync --no-self  # <- This is the problem

I see two possible options:

  • Do not run pdm sync if there is no groups defined
  • Keep pdm sync always run and document in the README how to disable tox-pdm for a given testenv (c.f. #41)

What do you think about it?

Tox3 installs package with deps, leading to error incase of changed pypi index in pdm

My project uses a private PyPI server which has private python libraries.
Configuring PDM to use it works well, however tox3 still tries to install package with pip by installing dependencies, which leads to a failed lookup of private packages in the public pypi server.

logs:

action: py38, msg: installpkg
cwd: /home/alex/work/doo_parsers
cmd: /home/alex/.pyenv/versions/3.8.12/bin/python3.8 -m pip install --exists-action w .tox/.tmp/package/1/doo-parsers-22.3.4+d20220407.tar.gz -t .tox/py38/__pypackages__/3.8/lib
Processing ./.tox/.tmp/package/1/doo-parsers-22.3.4+d20220407.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'
ERROR: Could not find a version that satisfies the requirement doo-utils (from doo-parsers) (from versions: none)
ERROR: No matching distribution found for doo-utils

Tox4 does not seems to have this problem.
Configuring pip with the PyPI is a valid workaround.

Tox not verbose enough when pdm fails, and execution of env continues when it should not

Reproduction: https://github.com/f3flight/tox-pdm-silent-failure-issue
Steps after cloning:

python3 -m venv venv
. venv/bin/activate
pip install tox pdm tox-pdm
tox

Output:

(venv) [dsutiagi@dsutiagi-ld3 tox_pdm_bug]$ tox
py311: > pdm sync --no-self --group test
.pkg: install_requires> python -I -m pip install setuptools wheel
.pkg: _optional_hooks> python /home/dsutiagi/Temp/tox_pdm_bug/venv/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /home/dsutiagi/Temp/tox_pdm_bug/venv/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /home/dsutiagi/Temp/tox_pdm_bug/venv/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py311: install_package_deps> python -I -m pip install 'pyyaml>=6.0'
py311: install_package> python -I -m pip install --force-reinstall --no-deps /home/dsutiagi/Temp/tox_pdm_bug/.tox/.tmp/package/1/helloworld-0.0.0.tar.gz
py311: commands[0]> pytest test.py
py311: exit 2 (0.01 seconds) /home/dsutiagi/Temp/tox_pdm_bug> pytest test.py
.pkg: _exit> python /home/dsutiagi/Temp/tox_pdm_bug/venv/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
  py311: FAIL code 2 (13.34=setup[13.33]+cmd[0.01] seconds)
  evaluation failed :( (13.45 seconds)

As you can see, there's an error but there is no error message, or rather, the error message is confusing (exit 2) - tox tries to run "pytest" while in fact pdm failed so there's no pytest and no point in even trying this command.

If tox is run with debug level verbosity (-vv), only then we can see the error:

...
py311: 321 W > pdm sync --no-self --group test [tox/tox_env/api.py:427]
[ProjectError]: Lock file does not exist, nothing to install
...

I think this behavior is suboptimal and some change needs to be introduced so that pdm failure bubbles up and prevents env from continuing execution and reaching commands, and error should be displayed w/o any -v flags. Right now this error is put into "_hidden_outcomes": https://github.com/tox-dev/tox/blob/release-4.10.0/src/tox/tox_env/api.py#L440 so I think that's part of the issue, but I'm not confident as I'm no good in tox internals.

Can't make it work

A bit frustrated trying to make this work, but it just doesn't, PDM works fine whenever I do pdm install -v or pdm sync
but after I try to run tox I run into the following:

See /var/folders/59/5yr8qg9n6gl1g9hqtgs127rmn4qv12/T/pdm-install-sxz9qti8.log for detailed debug log.
[InstallationError]: Some package operations are not complete yet
Add '-v' to see the detailed traceback

============================================================================================================================================ log end ============================================================================================================================================
ERROR: could not install deps []; v = InvocationError('/usr/local/bin/pdm install -p .tox/lint --no-default --group lint --no-self', 1)
____________________________________________________________________________________________________________________________________________ summary ____________________________________________________________________________________________________________________________________________
ERROR:   lint: could not install deps []; v = InvocationError('/usr/local/bin/pdm install -p .tox/lint --no-default --group lint --no-self', 1)

This are my tox.ini and pyproject.toml

[tox]
env_list = py{310},lint,typecheck
isolated_build = true 

[testenv]
groups = test
commands =
    pytest tests/

[testenv:lint]
groups = lint
skip_install = true
commands =
    black --check bash_log2nl/
    flake9 bash_log2nl/

[testenv:typecheck]
groups = typecheck
skip_install = true
commands =
    mypy bash_log2nl/

[project]
name = "bash_log2nl"
version = "0.1.0"
description = ""
authors = [
    {name = "Gustavo Barrios", email = ""},
]
dependencies = [
    "sqlalchemy>=1.4.31",
    "pydantic[dotenv]>=1.9.0",
    "python-dotenv>=0.19.2",
    "sshtunnel>=0.4.0",
]
requires-python = ">=3.10"
license = {text = "MIT"}

[project.urls]
homepage = ""

[project.optional-dependencies]
[tool]
[tool.pdm]
[tool.pdm.dev-dependencies]
dev = [
    "pytest>=6.2.5",
    "pytest-cov>=3.0.0",
    "tox>=3.24.5",
    "tox-pdm>=0.3.2"]
lint = [
    "black>=22.1.0",
    "flake8>=4.0.1",
]
typecheck = [
    "mypy>=0.931",
]

[build-system]
requires = ["pdm-pep517"]
build-backend = "pdm.pep517.api"

[tool.pytest.ini_options]
addopts = "--cov=bash_log2nl --cov-report=term-missing"
testpaths = "tests"

[tool.pyright]
pythonVersion = "3.10"
typeCheckingMode = "strict"
include = ["bash_log2nl", "typings"]
exclude = ["tests"]
reportGeneralTypeIssues = false
reportConstantRedefinition = false
reportFunctionMemberAccess = false
reportImportCycles = false
reportIncompatibleMethodOverride = false
reportIncompatibleVariableOverride = false
reportMissingModuleSource = false
reportMissingParameterType = false
reportMissingTypeArgument = false
reportMissingTypeStubs = false
reportOptionalCall = false
reportOptionalIterable = false
reportOptionalMemberAccess = false
reportOptionalOperand = false
reportOptionalSubscript = false
reportPrivateImportUsage = false
reportPrivateUsage = false
reportUnboundVariable = false
reportUnknownArgumentType = false
reportUnknownLambdaType = false
reportUnknownMemberType = false
reportUnknownParameterType = false
reportUnknownVariableType = false
reportUnnecessaryComparison = false
reportUnnecessaryIsInstance = false
reportUnsupportedDunderAll = false
reportUntypedBaseClass = false
reportUnusedClass = false
reportUnusedFunction = false
reportUnusedImport = false
reportUnusedVariable = false
reportMissingImports = false

[tool.mypy]
mypy_path = "bash_log2nl"
check_untyped_defs = true
disallow_any_generics = true
ignore_missing_imports = true
no_implicit_optional = true
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
no_implicit_reexport = true

[tool.black]
line-length = 88
target_version = ['py310']

Any help is greatly appreciated.

Can't get tox + pdm to work

I'm clearly doing something wrong, although I've tried both methods of integrating tox + pdm that are described here.

A few things I've discovered, rightly or wrongly.

  • When attempting to integrate with tox-pdm, I find that I need to use the keyword groups rather than sections in my tox.ini. That seems to jive with what the tox-pdm README implies, but not what the pdm docs say.
  • When attempting to integrate with tox-pdm, I also have to invoke this via pdm run tox since tox-pdm is not installed into my global tox.
  • When attempting to integrate without tox-pdm I find that the pdm install -G <group> doesn't seem to install the dependencies into the venv. It's not clear that it should, but even with use_venv set, I don't have to have to repeat myself if I can avoid it.

I would love to get this to work!

Cryptic error when failing to upgrade `pdm` in a `tox`-managed venv

I just ran into a problem where pdm, tox, and tox-pdm unexpectedly stopped playing nice on a Windows machine:

S:\path\to\project> tox -e py3.12
py3.12: install_deps> pdm sync --no-self --group dev
Synchronizing working set with resolved packages: 0 to add, 1 to update, 0 to remove

  x Update pdm 2.17.3 -> 2.18.1 failed
  x Update pdm 2.17.3 -> 2.18.1 failed

... snip traceback details ...

PermissionError: [WinError 32] The process cannot access the file because it is being used by another process:
'S:\\path\\to\\project\\.tox\\py3.12\\Scripts\\pdm.exe'

  x Some package operations failed. 1/1 0:00:00
INFO: Inside an active virtualenv S:\path\to\project\.tox\py3.12, reusing it.
Set env var PDM_IGNORE_ACTIVE_VENV to ignore it.
STATUS: Resolving packages from lockfile...
See C:\Users\Alyssa\AppData\Local\pdm\pdm\Logs\pdm-install-4rac_qnn.log for detailed debug log.
[InstallationError]: Some package operations failed.
WARNING: Add '-v' to see the detailed traceback

The PDM lock file had been updated elsewhere and then pulled over to this Windows machine. The fix was to destroy and recreate the tox environment rather than trying to updated it in place:

S:\path\to\project> tox -re py3.12
... output for test run working as expected ...

This isn't the same as the nox VIRTUAL_ENV handling issue reported in pdm-project/pdm#2297, but I did end up there while trying to make sense of the failure.

Perhaps tox-pdm could detect when the venv itself contains pdm and it is attempting to upgrade it on Windows?

(alternatively, there may be a genuine bug here, and tox-pdm should be running [sys.executable, "-m", "pdm"] rather than running pdm directly?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.