python-greenlet / greenlet

Lightweight in-process concurrent programming
Other
1.63k stars 247 forks source link

Poetry can't install `greenlet==3.0.0` on MacOS #378

Closed tasansal closed 10 months ago

tasansal commented 10 months ago

Issue

On MacOS (laptop and CI/CD), when installing greenlet==3.0.0 via Poetry, it can't find an installation candidate.

Issue doesn't exist in ~2 versions.

Reproducer

Environment:

poetry add greenlet=3.0.0

The following build "should" technically work: *greenlet-3.0.0-cp311-cp311-macosx_10_9_universal2.whl

However, it gets skipped due to sha256 checksum does not match expected value.

The 2.0.2 version doesn't have this problem. pip install greenlet==3.0.0 also works. WIndows and Linux also works.

What could be the issue?

Dumping logs with -vvv flag; here is the following error log:

$ poetry add greenlet=3.0.0 -vvv
Loading configuration file .../config.toml
Using virtualenv: .../mambaforge/envs/greenlet
[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): 1 packages found for greenlet 3.0.0

Updating dependencies
Resolving dependencies...
   1: fact: dummy is 0.1.0
   1: derived: dummy
   1: fact: dummy depends on greenlet (3.0.0)
   1: selecting dummy (0.1.0)
   1: derived: greenlet (==3.0.0)
Source (PyPI): 1 packages found for greenlet 3.0.0
   1: selecting greenlet (3.0.0)
   1: Version solving took 0.004 seconds.
   1: Tried 1 solutions.

Finding the necessary packages for the current system
Source (PyPI): 1 packages found for greenlet 3.0.0

Package operations: 1 install, 0 updates, 0 removals

  • Installing greenlet (3.0.0): Pending...
Skipping greenlet-3.0.0-cp310-cp310-macosx_10_9_universal2.whl as sha256 checksum does not match expected value
Skipping greenlet-3.0.0-cp310-cp310-win_amd64.whl as sha256 checksum does not match expected value
Skipping greenlet-3.0.0-cp311-cp311-macosx_10_9_universal2.whl as sha256 checksum does not match expected value
Skipping greenlet-3.0.0-cp312-cp312-macosx_10_9_universal2.whl as sha256 checksum does not match expected value
Skipping greenlet-3.0.0-cp312-cp312-macosx_13_0_arm64.whl as sha256 checksum does not match expected value
Skipping greenlet-3.0.0-cp37-cp37m-win32.whl as sha256 checksum does not match expected value
Skipping greenlet-3.0.0-cp37-cp37m-win_amd64.whl as sha256 checksum does not match expected value
Skipping greenlet-3.0.0-cp38-cp38-macosx_11_0_universal2.whl as sha256 checksum does not match expected value
Skipping greenlet-3.0.0-cp38-cp38-win32.whl as sha256 checksum does not match expected value
Skipping greenlet-3.0.0-cp38-cp38-win_amd64.whl as sha256 checksum does not match expected value
Skipping greenlet-3.0.0-cp39-cp39-macosx_10_9_universal2.whl as sha256 checksum does not match expected value
Skipping greenlet-3.0.0-cp39-cp39-win32.whl as sha256 checksum does not match expected value
Skipping greenlet-3.0.0-cp39-cp39-win_amd64.whl as sha256 checksum does not match expected value
Skipping greenlet-3.0.0.tar.gz as sha256 checksum does not match expected value
Skipping wheel greenlet-3.0.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp310-cp310-musllinux_1_1_aarch64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp310-cp310-musllinux_1_1_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp310-universal2-macosx_11_0_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp311-cp311-musllinux_1_1_aarch64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp311-cp311-musllinux_1_1_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp311-cp311-win_amd64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp312-cp312-musllinux_1_1_aarch64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp312-cp312-musllinux_1_1_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp312-cp312-win_amd64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp37-cp37m-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp37-cp37m-musllinux_1_1_aarch64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp37-cp37m-musllinux_1_1_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp37-universal2-macosx_11_0_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp38-cp38-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp38-cp38-musllinux_1_1_aarch64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp38-cp38-musllinux_1_1_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp38-universal2-macosx_11_0_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp39-cp39-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp39-cp39-musllinux_1_1_aarch64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp39-cp39-musllinux_1_1_x86_64.whl as this is not supported by the current environment
Skipping wheel greenlet-3.0.0-cp39-universal2-macosx_11_0_x86_64.whl as this is not supported by the current environment
  • Installing greenlet (3.0.0): Failed

  Stack trace:

  5  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/executor.py:286 in _execute_operation
      284│ 
      285│             try:
    → 286│                 result = self._do_execute_operation(operation)
      287│             except EnvCommandError as e:
      288│                 if e.e.returncode == -2:

  4  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/executor.py:386 in _do_execute_operation
      384│             return 0
      385│ 
    → 386│         result: int = getattr(self, f"_execute_{method}")(operation)
      387│ 
      388│         if result != 0:

  3  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/executor.py:511 in _execute_install
      509│ 
      510│     def _execute_install(self, operation: Install | Update) -> int:
    → 511│         status_code = self._install(operation)
      512│ 
      513│         self._save_url_reference(operation)

  2  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/executor.py:549 in _install
      547│             archive = self._download_link(operation, Link(package.source_url))
      548│         else:
    → 549│             archive = self._download(operation)
      550│ 
      551│         operation_message = self.get_operation_message(operation)

  1  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/executor.py:739 in _download
      737│ 
      738│     def _download(self, operation: Install | Update) -> Path:
    → 739│         link = self._chooser.choose_for(operation.package)
      740│ 
      741│         if link.yanked:

  RuntimeError

  Unable to find installation candidates for greenlet (3.0.0)

  at ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/chooser.py:73 in choose_for
       69│ 
       70│             links.append(link)
       71│ 
       72│         if not links:
    →  73│             raise RuntimeError(f"Unable to find installation candidates for {package}")
       74│ 
       75│         # Get the best link
       76│         chosen = max(links, key=lambda link: self._sort_key(package, link))
       77│ 
tasansal commented 10 months ago

The issue is resolved after clearing Poetry's PyPI cache. It seems like there were duplicate wheels for MacOS mentioned in my comment in #372 and it was causing a hash mismatch. Now that extra wheel is gone. Closing for now.