Skip to content

setup-poetry: Update default Poetry version to 2.4.1 - #85

Open
bkeryan wants to merge 1 commit into
mainfrom
users/bkeryan/update-default-poetry-version
Open

bkeryan wants to merge 1 commit into
mainfrom
users/bkeryan/update-default-poetry-version

Conversation

@bkeryan

@bkeryan bkeryan commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

What does this Pull Request accomplish?

setup-poetry: Update the default value of poetry-version from 2.1.4 to 2.4.1

Why should this Pull Request be merged?

Poetry 2.4 introduced the solver.min-release-age setting which makes Poetry work better with Renovate's minimumReleaseAge setting.

What testing has been done?

PR build

Comment thread setup-poetry/action.yml
inputs:
poetry-version:
default: 2.1.4
default: 2.4.1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re PR build, let's stop validating 3.9

@bkeryan bkeryan closed this Oct 12, 2026
@bkeryan bkeryan reopened this Oct 12, 2026
Comment thread setup-poetry/action.yml

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Install only-ni-python-styleguide
2s
Run install_cmd="poetry install -v $INSTALL_ARGS"
  Using virtualenv: /home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv
  Checking keyring availability: Unavailable
  Installing dependencies from lock file
  
  Finding the necessary packages for the current system
  
  Package operations: 0 installs, 3 updates, 0 removals, 22 skipped
  
    - Installing better-diff (0.1.4): Skipped for the following reason: Already installed
    - Installing black (25.11.0): Skipped for the following reason: Already installed
    - Downgrading click (8.3.0 -> 8.1.8)
    - Installing flake8 (5.0.4): Skipped for the following reason: Already installed
    - Installing flake8-black (0.4.0): Skipped for the following reason: Already installed
    - Installing flake8-docstrings (1.7.0): Skipped for the following reason: Already installed
    - Installing flake8-import-order (0.19.2): Skipped for the following reason: Already installed
    - Installing flake8-tidy-imports (4.12.0): Skipped for the following reason: Already installed
    - Downgrading isort (7.0.0 -> 6.1.0)
    - Installing mccabe (0.7.0): Skipped for the following reason: Already installed
    - Installing mypy-extensions (1.1.0): Skipped for the following reason: Already installed
    - Installing ni-python-styleguide (0.5.2): Skipped for the following reason: Already installed
    - Installing packaging (25.0): Skipped for the following reason: Already installed
    - Installing pathspec (0.12.1): Skipped for the following reason: Already installed
    - Installing pep8-naming (0.15.1): Skipped for the following reason: Already installed
    - Downgrading platformdirs (4.5.0 -> 4.4.0)
    - Installing pycodestyle (2.9.1): Skipped for the following reason: Already installed
    - Installing pydocstyle (6.3.0): Skipped for the following reason: Already installed
    - Installing pyflakes (2.5.0): Skipped for the following reason: Already installed
    - Installing pytokens (0.3.0): Skipped for the following reason: Already installed
    - Installing setuptools (80.9.0): Skipped for the following reason: Already installed
    - Installing snowballstemmer (3.0.1): Skipped for the following reason: Already installed
    - Installing toml (0.10.2): Skipped for the following reason: Already installed
    - Installing tomli (2.3.0): Skipped for the following reason: Already installed
    - Installing typing-extensions (4.15.0): Skipped for the following reason: Already installed
  
    CalledProcessError
  
    Command '['/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/bin/python', '-m', 'pip', 'uninstall', 'platformdirs', '-y']' returned non-zero exit status 1.
  
    at /opt/hostedtoolcache/Python/3.10.22/x64/lib/python3.10/subprocess.py:526 in run
         522│             # We don't call process.wait() as .__exit__ does that for us.
         523│             raise
         524│         retcode = process.poll()
         525│         if check and retcode:
      →  526│             raise CalledProcessError(retcode, process.args,
         527│                                      output=stdout, stderr=stderr)
         528│     return CompletedProcess(process.args, retcode, stdout, stderr)
         529│ 
         530│ 
  
  The following error occurred when trying to handle this error:
  
  
    EnvCommandError
  
    Command ['/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/bin/python', '-m', 'pip', 'uninstall', 'platformdirs', '-y'] errored with the following return code 1
    
    Output:
    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.10.22/x64/lib/python3.10/runpy.py", line 196, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "/opt/hostedtoolcache/Python/3.10.22/x64/lib/python3.10/runpy.py", line 86, in _run_code
        exec(code, run_globals)
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/__main__.py", line 22, in <module>
        from pip._internal.cli.main import main as _main
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/cli/main.py", line 10, in <module>
        from pip._internal.cli.autocompletion import autocomplete
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
        from pip._internal.cli.main_parser import create_main_parser
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
        from pip._internal.build_env import get_runnable_pip
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/build_env/__init__.py", line 8, in <module>
        from pip._internal.build_env.installer import (
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/build_env/installer.py", line 13, in <module>
        from pip._internal.cli.spinners import open_rich_spinner, open_spinner
    ImportError: cannot import name 'open_rich_spinner' from 'pip._internal.cli.spinners' (/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/cli/spinners.py)
    
  
    at ~/work/_temp/poetry/home/lib/python3.10/site-packages/poetry/utils/env/base_env.py:453 in _run
        449│                 output = subprocess.check_output(
        450│                     cmd, stderr=stderr, env=env, text=True, encoding="locale", **kwargs
        451│                 )
        452│         except CalledProcessError as e:
      → 453│             raise EnvCommandError(e)
        454│ 
        455│         return output
        456│ 
        457│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:
  
  Cannot install platformdirs.
  
  
    CalledProcessError
  
    Command '['/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/bin/python', '-m', 'pip', 'uninstall', 'click', '-y']' returned non-zero exit status 1.
  
    at /opt/hostedtoolcache/Python/3.10.22/x64/lib/python3.10/subprocess.py:526 in run
         522│             # We don't call process.wait() as .__exit__ does that for us.
         523│             raise
         524│         retcode = process.poll()
         525│         if check and retcode:
      →  526│             raise CalledProcessError(retcode, process.args,
         527│                                      output=stdout, stderr=stderr)
         528│     return CompletedProcess(process.args, retcode, stdout, stderr)
         529│ 
         530│ 
  
  The following error occurred when trying to handle this error:
  
  
    EnvCommandError
  
    Command ['/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/bin/python', '-m', 'pip', 'uninstall', 'click', '-y'] errored with the following return code 1
    
    Output:
    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.10.22/x64/lib/python3.10/runpy.py", line 196, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "/opt/hostedtoolcache/Python/3.10.22/x64/lib/python3.10/runpy.py", line 86, in _run_code
        exec(code, run_globals)
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/__main__.py", line 22, in <module>
        from pip._internal.cli.main import main as _main
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/cli/main.py", line 10, in <module>
        from pip._internal.cli.autocompletion import autocomplete
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
        from pip._internal.cli.main_parser import create_main_parser
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
        from pip._internal.build_env import get_runnable_pip
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/build_env/__init__.py", line 8, in <module>
        from pip._internal.build_env.installer import (
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/build_env/installer.py", line 13, in <module>
        from pip._internal.cli.spinners import open_rich_spinner, open_spinner
    ImportError: cannot import name 'open_rich_spinner' from 'pip._internal.cli.spinners' (/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/cli/spinners.py)
    
  
    at ~/work/_temp/poetry/home/lib/python3.10/site-packages/poetry/utils/env/base_env.py:453 in _run
        449│                 output = subprocess.check_output(
        450│                     cmd, stderr=stderr, env=env, text=True, encoding="locale", **kwargs
        451│                 )
        452│         except CalledProcessError as e:
      → 453│             raise EnvCommandError(e)
        454│ 
        455│         return output
        456│ 
        457│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:
  
  Cannot install click.
  
  
    CalledProcessError
  
    Command '['/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/bin/python', '-m', 'pip', 'uninstall', 'isort', '-y']' returned non-zero exit status 1.
  
    at /opt/hostedtoolcache/Python/3.10.22/x64/lib/python3.10/subprocess.py:526 in run
         522│             # We don't call process.wait() as .__exit__ does that for us.
         523│             raise
         524│         retcode = process.poll()
         525│         if check and retcode:
      →  526│             raise CalledProcessError(retcode, process.args,
         527│                                      output=stdout, stderr=stderr)
         528│     return CompletedProcess(process.args, retcode, stdout, stderr)
         529│ 
         530│ 
  
  The following error occurred when trying to handle this error:
  
  
    EnvCommandError
  
    Command ['/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/bin/python', '-m', 'pip', 'uninstall', 'isort', '-y'] errored with the following return code 1
    
    Output:
    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.10.22/x64/lib/python3.10/runpy.py", line 196, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "/opt/hostedtoolcache/Python/3.10.22/x64/lib/python3.10/runpy.py", line 86, in _run_code
        exec(code, run_globals)
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/__main__.py", line 22, in <module>
        from pip._internal.cli.main import main as _main
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/cli/main.py", line 10, in <module>
        from pip._internal.cli.autocompletion import autocomplete
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
        from pip._internal.cli.main_parser import create_main_parser
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
        from pip._internal.build_env import get_runnable_pip
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/build_env/__init__.py", line 8, in <module>
        from pip._internal.build_env.installer import (
      File "/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/build_env/installer.py", line 13, in <module>
        from pip._internal.cli.spinners import open_rich_spinner, open_spinner
    ImportError: cannot import name 'open_rich_spinner' from 'pip._internal.cli.spinners' (/home/runner/work/python-actions/python-actions/.github/test_projects/only-ni-python-styleguide/.venv/lib/python3.10/site-packages/pip/_internal/cli/spinners.py)
    
  
    at ~/work/_temp/poetry/home/lib/python3.10/site-packages/poetry/utils/env/base_env.py:453 in _run
        449│                 output = subprocess.check_output(
        450│                     cmd, stderr=stderr, env=env, text=True, encoding="locale", **kwargs
        451│                 )
        452│         except CalledProcessError as e:
      → 453│             raise EnvCommandError(e)
        454│ 
        455│         return output
        456│ 
        457│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:
  
  Cannot install isort.
  
  Error: Process completed with exit code 1.

observations:

@mshafer-NI

@bkeryan bkeryan Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mshafer-NI I rebased against main and now it's only failing with pypy3.11. https://github.com/ni/python-actions/actions/runs/38440770800/job/115446447740

analyze-project is still downgrading click, isort, and platformdirs to the versions that support Python 3.9 (?). Has Poetry's behavior changed here?

analyze-project with 3.10 is still installing click 8.1.8 instead of click 8.3.0, but it doesn't fail because there's no longer a cache hit.

setup-poetry tests are failing on poetry --version.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple things I think are playing in looking at the log (+ your comment).

Poetry (lock) tries to pick a single version of any dep that satisfies the entire supported range of the package. If we need different versions of dep X for different py versions, we have to explicitly tell click to do that.

I suspect we need to add a poetry env use python to get poetry to use the currently selected Python interpreter correctly.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be related to actions/setup-python#1348

actions/setup-python is unconditionally installing the latest pip when it installs pypy, and it's using --ignore-installed rather than upgrading. The result is a mixture of the old and new pip packages.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can reproduce this behavior locally without actions/setup-python

PS C:\Users\bkeryan\AppData\Local\Temp> pyenv local pypy3.11-v8.0.0-win64
PS C:\Users\bkeryan\AppData\Local\Temp> python -m venv poetry-pypy
PS C:\Users\bkeryan\AppData\Local\Temp> .\poetry-pypy\Scripts\python.exe -m pip install poetry==2.4.1
Collecting poetry==2.4.1
  Using cached poetry-2.4.1-py3-none-any.whl.metadata (7.5 kB)
Collecting build<2.0.0,>=1.2.1 (from poetry==2.4.1)
  Downloading build-1.6.1-py3-none-any.whl.metadata (5.6 kB)
Collecting cachecontrol<0.15.0,>=0.14.0 (from cachecontrol[filecache]<0.15.0,>=0.14.0->poetry==2.4.1)
  Using cached cachecontrol-0.14.4-py3-none-any.whl.metadata (3.1 kB)
Collecting cleo<3.0.0,>=2.1.0 (from poetry==2.4.1)
  Using cached cleo-2.1.0-py3-none-any.whl.metadata (12 kB)
Collecting dulwich<2,>=0.25.0 (from poetry==2.4.1)
  Downloading dulwich-1.2.17-py3-none-any.whl.metadata (6.0 kB)
Collecting fastjsonschema<3.0.0,>=2.18.0 (from poetry==2.4.1)
  Downloading fastjsonschema-2.22.2-py3-none-any.whl.metadata (2.1 kB)
Collecting findpython<0.9.0,>=0.6.2 (from poetry==2.4.1)
  Using cached findpython-0.8.0-py3-none-any.whl.metadata (5.4 kB)
Collecting installer<2.0.0,>=0.7.0 (from poetry==2.4.1)
  Downloading installer-1.1.0-py3-none-any.whl.metadata (1.3 kB)
Collecting keyring<26.0.0,>=25.1.0 (from poetry==2.4.1)
  Using cached keyring-25.7.0-py3-none-any.whl.metadata (21 kB)
Collecting packaging>=24.2 (from poetry==2.4.1)
  Downloading packaging-26.3-py3-none-any.whl.metadata (3.5 kB)
Collecting pbs-installer>=2025.6.10 (from pbs-installer[download,install]>=2025.6.10->poetry==2.4.1)
  Downloading pbs_installer-2026.10.3-py3-none-any.whl.metadata (1.2 kB)
Collecting pkginfo<2.0,>=1.12 (from poetry==2.4.1)
  Downloading pkginfo-1.13-py3-none-any.whl.metadata (13 kB)
Collecting platformdirs<5,>=3.0.0 (from poetry==2.4.1)
  Downloading platformdirs-4.13.0-py3-none-any.whl.metadata (5.5 kB)
Collecting poetry-core==2.4.0 (from poetry==2.4.1)
  Using cached poetry_core-2.4.0-py3-none-any.whl.metadata (3.8 kB)
Collecting pyproject-hooks<2.0.0,>=1.0.0 (from poetry==2.4.1)
  Downloading pyproject_hooks-1.3.3-py3-none-any.whl.metadata (1.3 kB)
Collecting requests<3.0,>=2.26 (from poetry==2.4.1)
  Using cached requests-2.34.2-py3-none-any.whl.metadata (4.8 kB)
Collecting requests-toolbelt<2.0.0,>=1.0.0 (from poetry==2.4.1)
  Using cached requests_toolbelt-1.0.0-py2.py3-none-any.whl.metadata (14 kB)
Collecting shellingham<2.0,>=1.5 (from poetry==2.4.1)
  Using cached shellingham-1.5.4-py2.py3-none-any.whl.metadata (3.5 kB)
Collecting tomlkit<1.0.0,>=0.11.4 (from poetry==2.4.1)
  Downloading tomlkit-0.15.1-py3-none-any.whl.metadata (3.3 kB)
Collecting trove-classifiers>=2022.5.19 (from poetry==2.4.1)
  Downloading trove_classifiers-2026.9.21.13-py3-none-any.whl.metadata (2.4 kB)
Collecting virtualenv>=20.26.6 (from poetry==2.4.1)
  Downloading virtualenv-21.14.7-py3-none-any.whl.metadata (4.1 kB)
Collecting colorama (from build<2.0.0,>=1.2.1->poetry==2.4.1)
  Using cached colorama-0.4.6-py2.py3-none-any.whl.metadata (17 kB)
Collecting msgpack<2.0.0,>=0.5.2 (from cachecontrol<0.15.0,>=0.14.0->cachecontrol[filecache]<0.15.0,>=0.14.0->poetry==2.4.1)
  Downloading msgpack-1.2.3.tar.gz (196 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 196.5/196.5 kB 2.4 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting filelock>=3.8.0 (from cachecontrol[filecache]<0.15.0,>=0.14.0->poetry==2.4.1)
  Downloading filelock-4.1.1-py3-none-any.whl.metadata (2.0 kB)
Collecting crashtest<0.5.0,>=0.4.1 (from cleo<3.0.0,>=2.1.0->poetry==2.4.1)
  Using cached crashtest-0.4.1-py3-none-any.whl.metadata (1.1 kB)
Collecting rapidfuzz<4.0.0,>=3.0.0 (from cleo<3.0.0,>=2.1.0->poetry==2.4.1)
  Downloading rapidfuzz-3.14.6.tar.gz (58.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.0/58.0 MB 14.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting urllib3>=2.2.2 (from dulwich<2,>=0.25.0->poetry==2.4.1)
  Downloading urllib3-2.8.0-py3-none-any.whl.metadata (7.4 kB)
Collecting typing_extensions>=4.6.0 (from dulwich<2,>=0.25.0->poetry==2.4.1)
  Downloading typing_extensions-4.16.0-py3-none-any.whl.metadata (3.3 kB)
Collecting pywin32-ctypes>=0.2.0 (from keyring<26.0.0,>=25.1.0->poetry==2.4.1)
  Using cached pywin32_ctypes-0.2.3-py3-none-any.whl.metadata (3.9 kB)
Collecting importlib_metadata>=4.11.4 (from keyring<26.0.0,>=25.1.0->poetry==2.4.1)
  Downloading importlib_metadata-9.0.1-py3-none-any.whl.metadata (4.5 kB)
Collecting jaraco.classes (from keyring<26.0.0,>=25.1.0->poetry==2.4.1)
  Using cached jaraco.classes-3.4.0-py3-none-any.whl.metadata (2.6 kB)
Collecting jaraco.functools (from keyring<26.0.0,>=25.1.0->poetry==2.4.1)
  Downloading jaraco_functools-4.6.0-py3-none-any.whl.metadata (2.9 kB)
Collecting jaraco.context (from keyring<26.0.0,>=25.1.0->poetry==2.4.1)
  Using cached jaraco_context-6.1.2-py3-none-any.whl.metadata (4.2 kB)
Collecting httpx<1,>=0.27.0 (from pbs-installer[download,install]>=2025.6.10->poetry==2.4.1)
  Using cached httpx-0.28.1-py3-none-any.whl.metadata (7.1 kB)
Collecting backports.zstd>=1.0.0 (from pbs-installer[download,install]>=2025.6.10->poetry==2.4.1)
  Downloading backports_zstd-1.8.0-pp311-pypy311_pp80-win_amd64.whl.metadata (7.0 kB)
Collecting charset_normalizer<4,>=2 (from requests<3.0,>=2.26->poetry==2.4.1)
  Downloading charset_normalizer-3.5.2-py3-none-any.whl.metadata (46 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.4/46.4 kB 2.3 MB/s eta 0:00:00
Collecting idna<4,>=2.5 (from requests<3.0,>=2.26->poetry==2.4.1)
  Downloading idna-3.20-py3-none-any.whl.metadata (7.2 kB)
Collecting certifi>=2023.5.7 (from requests<3.0,>=2.26->poetry==2.4.1)
  Downloading certifi-2026.7.22-py3-none-any.whl.metadata (2.5 kB)
Collecting distlib<1,>=0.4.3 (from virtualenv>=20.26.6->poetry==2.4.1)
  Downloading distlib-0.4.3-py2.py3-none-any.whl.metadata (5.3 kB)
Collecting python-discovery>=1.6.1 (from virtualenv>=20.26.6->poetry==2.4.1)
  Downloading python_discovery-1.6.2-py3-none-any.whl.metadata (5.1 kB)
Collecting anyio (from httpx<1,>=0.27.0->pbs-installer[download,install]>=2025.6.10->poetry==2.4.1)
  Downloading anyio-4.15.1-py3-none-any.whl.metadata (4.7 kB)
Collecting httpcore==1.* (from httpx<1,>=0.27.0->pbs-installer[download,install]>=2025.6.10->poetry==2.4.1)
  Using cached httpcore-1.0.9-py3-none-any.whl.metadata (21 kB)
Collecting h11>=0.16 (from httpcore==1.*->httpx<1,>=0.27.0->pbs-installer[download,install]>=2025.6.10->poetry==2.4.1)
  Using cached h11-0.16.0-py3-none-any.whl.metadata (8.3 kB)
Collecting zipp>=3.20 (from importlib_metadata>=4.11.4->keyring<26.0.0,>=25.1.0->poetry==2.4.1)
  Downloading zipp-4.1.1-py3-none-any.whl.metadata (3.6 kB)
Collecting more-itertools (from jaraco.classes->keyring<26.0.0,>=25.1.0->poetry==2.4.1)
  Downloading more_itertools-11.2.0-py3-none-any.whl.metadata (42 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.7/42.7 kB 2.2 MB/s eta 0:00:00
Collecting backports.tarfile (from jaraco.context->keyring<26.0.0,>=25.1.0->poetry==2.4.1)
  Using cached backports.tarfile-1.2.0-py3-none-any.whl.metadata (2.0 kB)
Using cached poetry-2.4.1-py3-none-any.whl (292 kB)
Using cached poetry_core-2.4.0-py3-none-any.whl (374 kB)
Downloading build-1.6.1-py3-none-any.whl (31 kB)
Using cached cachecontrol-0.14.4-py3-none-any.whl (22 kB)
Using cached cleo-2.1.0-py3-none-any.whl (78 kB)
Downloading dulwich-1.2.17-py3-none-any.whl (747 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 747.8/747.8 kB 23.0 MB/s eta 0:00:00
Downloading fastjsonschema-2.22.2-py3-none-any.whl (27 kB)
Using cached findpython-0.8.0-py3-none-any.whl (21 kB)
Downloading installer-1.1.0-py3-none-any.whl (464 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 464.5/464.5 kB 28.4 MB/s eta 0:00:00
Using cached keyring-25.7.0-py3-none-any.whl (39 kB)
Downloading packaging-26.3-py3-none-any.whl (129 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 130.0/130.0 kB 7.5 MB/s eta 0:00:00
Downloading pbs_installer-2026.10.3-py3-none-any.whl (83 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 83.0/83.0 kB 4.5 MB/s eta 0:00:00
Downloading pkginfo-1.13-py3-none-any.whl (32 kB)
Downloading platformdirs-4.13.0-py3-none-any.whl (32 kB)
Downloading pyproject_hooks-1.3.3-py3-none-any.whl (10 kB)
Using cached requests-2.34.2-py3-none-any.whl (73 kB)
Using cached requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)
Using cached shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB)
Downloading tomlkit-0.15.1-py3-none-any.whl (49 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.4/49.4 kB 1.3 MB/s eta 0:00:00
Downloading trove_classifiers-2026.9.21.13-py3-none-any.whl (14 kB)
Downloading virtualenv-21.14.7-py3-none-any.whl (5.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.5/5.5 MB 35.1 MB/s eta 0:00:00
Downloading backports_zstd-1.8.0-pp311-pypy311_pp80-win_amd64.whl (404 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 404.3/404.3 kB 24.6 MB/s eta 0:00:00
Downloading certifi-2026.7.22-py3-none-any.whl (136 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 137.0/137.0 kB 8.4 MB/s eta 0:00:00
Downloading charset_normalizer-3.5.2-py3-none-any.whl (68 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 68.9/68.9 kB 3.9 MB/s eta 0:00:00
Using cached crashtest-0.4.1-py3-none-any.whl (7.6 kB)
Downloading distlib-0.4.3-py2.py3-none-any.whl (470 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 470.6/470.6 kB 30.7 MB/s eta 0:00:00
Downloading filelock-4.1.1-py3-none-any.whl (132 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.5/132.5 kB 7.6 MB/s eta 0:00:00
Using cached httpx-0.28.1-py3-none-any.whl (73 kB)
Using cached httpcore-1.0.9-py3-none-any.whl (78 kB)
Downloading idna-3.20-py3-none-any.whl (69 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 69.6/69.6 kB 3.7 MB/s eta 0:00:00
Downloading importlib_metadata-9.0.1-py3-none-any.whl (27 kB)
Downloading python_discovery-1.6.2-py3-none-any.whl (38 kB)
Using cached pywin32_ctypes-0.2.3-py3-none-any.whl (30 kB)
Downloading typing_extensions-4.16.0-py3-none-any.whl (45 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 45.6/45.6 kB 2.4 MB/s eta 0:00:00
Downloading urllib3-2.8.0-py3-none-any.whl (135 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 135.7/135.7 kB 4.0 MB/s eta 0:00:00
Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Using cached jaraco.classes-3.4.0-py3-none-any.whl (6.8 kB)
Using cached jaraco_context-6.1.2-py3-none-any.whl (7.9 kB)
Downloading jaraco_functools-4.6.0-py3-none-any.whl (11 kB)
Downloading zipp-4.1.1-py3-none-any.whl (10 kB)
Downloading anyio-4.15.1-py3-none-any.whl (132 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.1/132.1 kB 8.1 MB/s eta 0:00:00
Using cached backports.tarfile-1.2.0-py3-none-any.whl (30 kB)
Downloading more_itertools-11.2.0-py3-none-any.whl (74 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 74.4/74.4 kB 4.3 MB/s eta 0:00:00
Using cached h11-0.16.0-py3-none-any.whl (37 kB)
Building wheels for collected packages: msgpack, rapidfuzz
  Building wheel for msgpack (pyproject.toml) ... done
  Created wheel for msgpack: filename=msgpack-1.2.3-py3-none-any.whl size=15510 sha256=08b6c40e3dc1c1be8c594bc0e1251d6c309a2ff0a2a5234fb9f9b6f0d358d203
  Stored in directory: c:\users\bkeryan\appdata\local\pip\cache\wheels\62\38\9d\18cb1c31a450c6bb3a830db76a97f76baf867012d27d6f2c22
  Building wheel for rapidfuzz (pyproject.toml) ... done
  Created wheel for rapidfuzz: filename=rapidfuzz-3.14.6-py3-none-any.whl size=64509 sha256=2b8f0ca7bbb7c3937312897f7bbaf299cf31c48cad36e64ba168b0f4fe671124
  Stored in directory: c:\users\bkeryan\appdata\local\pip\cache\wheels\8d\96\30\fcf73b2a3ce819c29acf47e00bc2c763bb0ae441b561850130
Successfully built msgpack rapidfuzz
Installing collected packages: trove-classifiers, distlib, zipp, urllib3, typing_extensions, tomlkit, shellingham, rapidfuzz, pywin32-ctypes, pyproject-hooks, poetry-core, platformdirs, pkginfo, pbs-installer, packaging, msgpack, more-itertools, installer, idna, h11, filelock, fastjsonschema, crashtest, colorama, charset_normalizer, certifi, backports.zstd, backports.tarfile, requests, python-discovery, jaraco.functools, jaraco.context, jaraco.classes, importlib_metadata, httpcore, findpython, dulwich, cleo, build, anyio, virtualenv, requests-toolbelt, keyring, httpx, cachecontrol, poetry
Successfully installed anyio-4.15.1 backports.tarfile-1.2.0 backports.zstd-1.8.0 build-1.6.1 cachecontrol-0.14.4 certifi-2026.7.22 charset_normalizer-3.5.2 cleo-2.1.0 colorama-0.4.6 crashtest-0.4.1 distlib-0.4.3 dulwich-1.2.17 fastjsonschema-2.22.2 filelock-4.1.1 findpython-0.8.0 h11-0.16.0 httpcore-1.0.9 httpx-0.28.1 idna-3.20 importlib_metadata-9.0.1 installer-1.1.0 jaraco.classes-3.4.0 jaraco.context-6.1.2 jaraco.functools-4.6.0 keyring-25.7.0 more-itertools-11.2.0 msgpack-1.2.3 packaging-26.3 pbs-installer-2026.10.3 pkginfo-1.13 platformdirs-4.13.0 poetry-2.4.1 poetry-core-2.4.0 pyproject-hooks-1.3.3 python-discovery-1.6.2 pywin32-ctypes-0.2.3 rapidfuzz-3.14.6 requests-2.34.2 requests-toolbelt-1.0.0 shellingham-1.5.4 tomlkit-0.15.1 trove-classifiers-2026.9.21.13 typing_extensions-4.16.0 urllib3-2.8.0 virtualenv-21.14.7 zipp-4.1.1

[notice] A new release of pip is available: 24.0 -> 26.2.1
[notice] To update, run: C:\Users\bkeryan\AppData\Local\Temp\poetry-pypy\Scripts\python.exe -m pip install --upgrade pip
PS C:\Users\bkeryan\AppData\Local\Temp> .\poetry-pypy\Scripts\poetry.exe --version

The specified module could not be found

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple things I think are playing in looking at the log (+ your comment).

Poetry (lock) tries to pick a single version of any dep that satisfies the entire supported range of the package. If we need different versions of dep X for different py versions, we have to explicitly tell click to do that.

poetry.lock contains click 8.1.8 and 8.3.0.

poetry 2.1.4 installed click 8.3.0 with the same poetry.lock file: https://github.com/ni/python-actions/actions/runs/38318779270/job/115041634642

I suspect we need to add a poetry env use python to get poetry to use the currently selected Python interpreter correctly.

Installing Poetry using the selected Python was intended to avoid this, and in the past, it worked. Otherwise we might as well use pipx.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, a problem with poetry env use python is that it must be done once per venv, not once per Poetry, so ni/python-actions/setup-poetry can't do it for you.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is somehow related to backports.zstd

PS C:\Users\bkeryan\AppData\Local\Temp> .\poetry-pypy\Scripts\poetry.exe --version --verbose

  ImportError

  The specified module could not be found

  at poetry-pypy\Lib\site-packages\backports\zstd\_cffi\_common.py:3 in <module>
        1│ import enum
        2│
    →   3│ from backports.zstd._zstd_cffi import ffi as _ffi
        4│ from backports.zstd._zstd_cffi import lib as _lib
        5│
        6│ _new_nonzero = _ffi.new_allocator(should_clear_after_alloc=False)
        7│
        8│
        9│ class ZstdError(Exception):

.\poetry-pypy\Lib\site-packages\backports\zstd\_zstd_cffi.pypy311-pp80-win_amd64.pyd exists, though.

@bkeryan
bkeryan force-pushed the users/bkeryan/update-default-poetry-version branch from 6adc95e to 57c0bf3 Compare October 13, 2026 17:42
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

Successfully merging this pull request may close these issues.

2 participants