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

Unable to add debugpy as a dependency #7686

Closed
4 tasks done
steve-marmalade opened this issue Mar 19, 2023 · 6 comments · Fixed by #7694
Closed
4 tasks done

Unable to add debugpy as a dependency #7686

steve-marmalade opened this issue Mar 19, 2023 · 6 comments · Fixed by #7694
Labels
area/installer Related to the dependency installer kind/bug Something isn't working as expected status/external-issue Issue is caused by external project (platform, dep, etc)

Comments

@steve-marmalade
Copy link

steve-marmalade commented Mar 19, 2023

  • Poetry version: Poetry (version 1.4.1)
  • Python version:
Poetry
Version: 1.4.1
Python:  3.9.11

Virtualenv
Python:         3.11.1
Implementation: CPython
Path:           /home/test-user/.cache/pypoetry/virtualenvs/poetry-test-VqRfSpzI-py3.11
Executable:     /home/test-user/.cache/pypoetry/virtualenvs/poetry-test-VqRfSpzI-py3.11/bin/python
Valid:          True

System
Platform:   linux
OS:         posix
Python:     3.11.1
Path:       /home/test-user/.pyenv/versions/3.11.1
Executable: /home/test-user/.pyenv/versions/3.11.1/bin/python3.11
  • OS version and name: Arch Linux 6.2.6-arch1-1

  • pyproject.toml: pyproject.toml

  • I am on the latest stable Poetry version, installed using a recommended method. pipx

  • I have searched the issues of this repo and believe that this is not a duplicate.

  • I have consulted the FAQ and blog for any relevant entries or release notes.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

Adding debugpy fails for Python 3.11 (debug output printed below). I discovered this while trying to install jupyterlab / ipykernel which have debugpy as a dependency.

I am filing the issue with poetry because I am able to install debugpy using pip.

Loading configuration file /home/test-user/.config/pypoetry/config.toml
Trying to detect current active python executable as specified in the config.
Found: /home/test-user/.pyenv/versions/3.11.1/bin/python
Using virtualenv: /home/test-user/.cache/pypoetry/virtualenvs/poetry-test-VqRfSpzI-py3.11
[keyring.backend] Loading KWallet
[keyring.backend] Loading SecretService
[keyring.backend] Loading Windows
[keyring.backend] Loading chainer
[keyring.backend] Loading libsecret
[keyring.backend] Loading macOS
Creating new session for pypi.org
Source (PyPI): 17 packages found for debugpy *
Using version ^1.6.6 for debugpy

Updating dependencies
Resolving dependencies...
   1: fact: poetry-test is 0.1.0
   1: derived: poetry-test
   1: fact: poetry-test depends on debugpy (^1.6.6)
   1: selecting poetry-test (0.1.0)
   1: derived: debugpy (>=1.6.6,<2.0.0)
Source (PyPI): 1 packages found for debugpy >=1.6.6,<2.0.0
   1: selecting debugpy (1.6.6)
   1: Version solving took 0.003 seconds.
   1: Tried 1 solutions.

Finding the necessary packages for the current system
Source (poetry-repo): 1 packages found for debugpy >=1.6.6,<2.0.0

Package operations: 1 install, 0 updates, 0 removals

  • Installing debugpy (1.6.6)
Skipping wheel debugpy-1.6.6-cp310-cp310-macosx_11_0_x86_64.whl as this is not supported by the current environment
Skipping wheel debugpy-1.6.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment
Skipping wheel debugpy-1.6.6-cp310-cp310-win32.whl as this is not supported by the current environment
Skipping wheel debugpy-1.6.6-cp310-cp310-win_amd64.whl as this is not supported by the current environment
Skipping wheel debugpy-1.6.6-cp37-cp37m-macosx_10_15_x86_64.whl as this is not supported by the current environment
Skipping wheel debugpy-1.6.6-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment
Skipping wheel debugpy-1.6.6-cp37-cp37m-win32.whl as this is not supported by the current environment
Skipping wheel debugpy-1.6.6-cp37-cp37m-win_amd64.whl as this is not supported by the current environment
Skipping wheel debugpy-1.6.6-cp38-cp38-macosx_10_15_x86_64.whl as this is not supported by the current environment
Skipping wheel debugpy-1.6.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment
Skipping wheel debugpy-1.6.6-cp38-cp38-win32.whl as this is not supported by the current environment
Skipping wheel debugpy-1.6.6-cp38-cp38-win_amd64.whl as this is not supported by the current environment
Skipping wheel debugpy-1.6.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment
Skipping wheel debugpy-1.6.6-cp39-cp39-win32.whl as this is not supported by the current environment
Skipping wheel debugpy-1.6.6-cp39-cp39-win_amd64.whl as this is not supported by the current environment

  Stack trace:

  5  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/installation/executor.py:272 in _execute_operation
      270│ 
      271│             try:
    → 272│                 result = self._do_execute_operation(operation)
      273│             except EnvCommandError as e:
      274│                 if e.e.returncode == -2:

  4  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/installation/executor.py:374 in _do_execute_operation
      372│             return 0
      373│ 
    → 374│         result: int = getattr(self, f"_execute_{method}")(operation)
      375│ 
      376│         if result != 0:

  3  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/installation/executor.py:494 in _execute_install
      492│ 
      493│     def _execute_install(self, operation: Install | Update) -> int:
    → 494│         status_code = self._install(operation)
      495│ 
      496│         self._save_url_reference(operation)

  2  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/installation/executor.py:552 in _install
      550│                 self._remove(operation.initial_package)
      551│ 
    → 552│             self._wheel_installer.install(archive)
      553│         finally:
      554│             if cleanup_archive:

  1  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/installation/wheel_installer.py:101 in install
       99│     def install(self, wheel: Path) -> None:
      100│         with WheelFile.open(wheel) as source:
    → 101│             source.validate_record()
      102│             install(
      103│                 source=source,

  _WheelFileValidationError

  ["In /home/test-user/.cache/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cp39-win_amd64.pyd didn't match RECORD", "In /home/test-user/.cache/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.cp39-win_amd64.pyd didn't match RECORD", "In /home/test-user/.cache/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll didn't match RECORD", "In /home/test-user/.cache/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll didn't match RECORD", "In /home/test-user/.cache/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe didn't match RECORD", "In /home/test-user/.cache/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.exe didn't match RECORD", "In /home/test-user/.cache/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll didn't match RECORD", "In /home/test-user/.cache/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll didn't match RECORD"]

  at ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/installer/sources.py:289 in validate_record
      285│                         f"In {self._zipfile.filename}, hash / size of {item.filename} didn't match RECORD"
      286│                     )
      287│ 
      288│         if issues:
    → 289│             raise _WheelFileValidationError(issues)
      290│ 
      291│     def get_contents(self) -> Iterator[WheelContentElement]:
      292│         """Sequential access to all contents of the wheel (including dist-info files).
      293│ 
@steve-marmalade steve-marmalade added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Mar 19, 2023
@radoering
Copy link
Member

First of all, the debugpy wheel is invalid and you should raise an issue there.

However, considering the early feedback after 1.4.1 (not just here but also on our Discord server), there might be more invalid wheels out there than we thought so we might turn the error into a warning in another patch release.

Workaround for now: set installer.modern-installation to false.

@radoering radoering added the status/external-issue Issue is caused by external project (platform, dep, etc) label Mar 19, 2023
EliahKagan added a commit to EliahKagan/palgoviz that referenced this issue Mar 19, 2023
debugpy is an indirect dependency of this project. When poetry
1.4.1 is used with the default configration, poetry refuses to
install debugpy, due to recognizing something wrong with the wheel.

This is the same issue (with the same dependency) as:

python-poetry/poetry#7686

For now, I'm setting installer.modern-installation to false, per
the workaround in:

python-poetry/poetry#7686 (comment)
@dimbleby
Copy link
Contributor

dimbleby commented Mar 19, 2023

we might turn the error into a warning in another patch release.

I'd hold firm! The reasoning of #7671 is still true: failing to install these packages is correct behaviour, users should report broken packages to the maintainers of those packages, they can use the non-modern installer if they need a workaround.

Looking at it another way: this failure already serves as a warning, which can be worked around - it's a much more effective warning than some text that everyone will ignore will ever be.

(I suspect this view is likely to be overruled, but I want it out there)

Edit: perhaps a sensible halfway house would be: fail by default, require users to pass a flag to reduce the failure to a warning.

EliahKagan added a commit to EliahKagan/palgoviz that referenced this issue Mar 19, 2023
debugpy is an indirect dependency of this project. When poetry
1.4.1 is used with the default configration, poetry refuses to
install debugpy, due to recognizing something wrong with the wheel.

This is the same issue (with the same dependency) as:

python-poetry/poetry#7686

For now, I'm setting installer.modern-installation to false, per
the workaround in:

python-poetry/poetry#7686 (comment)
EliahKagan added a commit to EliahKagan/findrepo2-experiment that referenced this issue Mar 19, 2023
EliahKagan added a commit to EliahKagan/findrepo2-experiment that referenced this issue Mar 19, 2023
@steve-marmalade
Copy link
Author

steve-marmalade commented Mar 19, 2023

@radoering , @dimbleby , thank you both for the quick responses. At your direction, I have created microsoft/debugpy#1246 in the upstream repo.

If there is any additional context about this issue that's worth providing the maintainers of that repo, I'd appreciate you providing it 🙏

I trust your judgement if you prefer to close this issue now that that one has been opened.

@radoering radoering added area/installer Related to the dependency installer and removed status/triage This issue needs to be triaged labels Mar 20, 2023
antdking pushed a commit to datapane/components that referenced this issue Mar 20, 2023
abey79 added a commit to abey79/vpype that referenced this issue Mar 21, 2023
This caused an issue when running the test suite, which could involve creating multiple hundreds of context, ultimately leading to a crash (see moderngl/moderngl#575)

Also excluded poetry 1.4.1 from CI, see python-poetry/poetry#7686 and pradyunsg/furo#639
@admackin
Copy link

Edit: perhaps a sensible halfway house would be: fail by default, require users to pass a flag to reduce the failure to a warning.

this seems like a reasonable compromise to me. Currently lots of packages have started failing installation due to a point upgrade of poetry

@doyled-it
Copy link

Edit: perhaps a sensible halfway house would be: fail by default, require users to pass a flag to reduce the failure to a warning.

this seems like a reasonable compromise to me. Currently lots of packages have started failing installation due to a point upgrade of poetry

Yup, the easiest thing for me and my team is to use poetry 1.4.0, so that's what we're doing. We can't wait for these packages to figure it out.

kaitj added a commit to kaitj/hippunfold that referenced this issue Mar 31, 2023
As of Poetry v1.4.1, packages were required to use modern installation (see: python-poetry/poetry#7686). This is potentially problematic when relying on older versions of packages and for packages who are still using non-modern installers. 

This commit adds an additional step to disable that modern-installation requirement, which should get the workflow working again.
kaitj added a commit to kaitj/hippunfold that referenced this issue Mar 31, 2023
As of Poetry v1.4.1, packages were required to use modern installation (see: python-poetry/poetry#7686). This is potentially problematic when relying on older versions of packages and for packages who are still using non-modern installers.

This commit adds an additional step to disable that modern-installation requirement, which should get the workflow working again.
kaitj added a commit to kaitj/hippunfold that referenced this issue Mar 31, 2023
As of Poetry v1.4.1, packages were required to use modern installation (see: python-poetry/poetry#7686). This is potentially problematic when relying on older versions of packages and for packages who are still using non-modern installers.

This commit adds an additional step to disable that modern-installation requirement, which should get the workflow working again.
kaitj added a commit to kaitj/hippunfold that referenced this issue Mar 31, 2023
As of Poetry v1.4.1, packages were required to use modern installation (see: python-poetry/poetry#7686). This is potentially problematic when relying on older versions of packages and for packages who are still using non-modern installers.

This commit adds an additional step to disable that modern-installation requirement, which should get the workflow working again.
kaitj added a commit to kaitj/hippunfold that referenced this issue Mar 31, 2023
As of Poetry v1.4.1, packages were required to use modern installation (see: python-poetry/poetry#7686). This is potentially problematic when relying on older versions of packages and for packages who are still using non-modern installers.

This commit adds an additional step to disable that modern-installation requirement, which should get the workflow working again.
kaitj added a commit to kaitj/hippunfold that referenced this issue Mar 31, 2023
As of Poetry v1.4.1, packages were required to use modern installation (see: python-poetry/poetry#7686). This is potentially problematic when relying on older versions of packages and for packages who are still using non-modern installers.

This commit adds an additional step to disable that modern-installation requirement, which should get the workflow working again.
kaitj added a commit to kaitj/hippunfold that referenced this issue Mar 31, 2023
As of Poetry v1.4.1, packages were required to use modern installation (see: python-poetry/poetry#7686). This is potentially problematic when relying on older versions of packages and for packages who are still using non-modern installers.

This commit adds an additional step to disable that modern-installation requirement, which should get the workflow working again.
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/installer Related to the dependency installer kind/bug Something isn't working as expected status/external-issue Issue is caused by external project (platform, dep, etc)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants