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

poetry add "requests[security]" fails on Poetry 1.2.0b1 #5727

Closed
thailow opened this issue May 31, 2022 · 20 comments · Fixed by #5769
Closed

poetry add "requests[security]" fails on Poetry 1.2.0b1 #5727

thailow opened this issue May 31, 2022 · 20 comments · Fixed by #5769
Labels
kind/bug Something isn't working as expected

Comments

@thailow
Copy link

thailow commented May 31, 2022

If I run poetry add "requests[security]" on Poetry 1.2.0b1, it fails with this message:

Package 'requests' is listed as a dependency of itself.

I downgraded to Poetry 1.1.13 where it works. Thanks for all your work!

@thailow thailow added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels May 31, 2022
@finswimmer
Copy link
Member

Hello @thailow,

I guess your project itself is named requests. Have a look at your pyproject.toml at the keyword name in the [tool.poetry] section.

Naming the project the same as a dependency is not allowed.

fin swimmer

@finswimmer finswimmer added the status/waiting-on-response Waiting on response from author label May 31, 2022
@thailow
Copy link
Author

thailow commented May 31, 2022

Hi @finswimmer, the project has a different name. I am pretty sure this is a bug as it's working fine in 1.1.13.

@finswimmer
Copy link
Member

Hey,

then please show your pyproject.toml so that one can reproduce your issue.

fin swimmer

@thailow
Copy link
Author

thailow commented May 31, 2022

Sure, here it is:

[tool.poetry]
name = "cross_piano_client"
version = "0.1.27"
description = ""
authors = ["Full Name <full.name@email.com>"]

[tool.poetry.dependencies]
python = "3.9.13"
dependency-injector = "^4.38.0"
deprecated = "^1.2.13"
requests = {extras = ["security"], version = "^2.27.1"}

[tool.poetry.dev-dependencies]
pytest = "^7.1.2"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[[tool.poetry.source]]
name = "gitlab_shared"
url = "https://gitlab.com/api/v4/groups/1241251/-/packages/pypi/simple"

@dimbleby
Copy link
Contributor

poetry lock with the above works just fine for me at all of 1.1.13, 1.2.0b1, and master

@thailow
Copy link
Author

thailow commented May 31, 2022

I just retested as well - you should be able to reproduce with these steps:

  • poetry install with above pyproject.toml
  • Remove requests from the pyproject.toml
  • Run a poetry update
  • Run poetry add "requests[security]"
  • Get this error: Package 'requests' is listed as a dependency of itself.
    The error is not thrown with 1.1.13.

@dimbleby
Copy link
Contributor

Still all works fine for me...

Hard to know what to suggest in that case, maybe clear out your cache and see if that helps? rm -fr ~/.cache/pypoetry or local equivalent

@thailow
Copy link
Author

thailow commented May 31, 2022

Strange.. I am managing the .venv in the projects (virtualenvs.in-project = true), hence, should not rely too much on any cache. Is it possible that there is some interference with pyenv?

There is some other issue which I always face (and I do not know it this may be related as well). When I do a poetry install, it does not pick up the exact Python version specified in the pyproject.toml (and also not pyenv's version in .python-version). Rather, I always need to do a poetry env use 3.9.13 or similar to enforce this.

By the way, I am on a Mac with M1 Max processor.

@dimbleby
Copy link
Contributor

afaik the way that you create your virtual environment has nothing to do with poetry's cache.

@klnrdknt
Copy link

klnrdknt commented Jun 1, 2022

I have the same problem, just with black[jupyter] (and also coverage for some reason when i change to just black without the extra). Even full-clearing the cache did not fix the issue for me.

stack trace
  Stack trace:

  17  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/application.py:330 in run
       328│
       329│             try:
     → 330│                 exit_code = self._run(io)
       331│             except Exception as e:
       332│                 if not self._catch_exceptions:

  16  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/console/application.py:174 in _run
       172│         self._load_plugins(io)
       173│
     → 174│         return super()._run(io)
       175│
       176│     def _configure_io(self, io: IO) -> None:

  15  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/application.py:425 in _run
       423│                 io.set_input(ArgvInput(argv))
       424│
     → 425│         exit_code = self._run_command(command, io)
       426│         self._running_command = None
       427│

  14  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/application.py:467 in _run_command
       465│
       466│         if error is not None:
     → 467│             raise error
       468│
       469│         return event.exit_code

  13  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/application.py:451 in _run_command
       449│
       450│             if event.command_should_run():
     → 451│                 exit_code = command.run(io)
       452│             else:
       453│                 exit_code = ConsoleCommandEvent.RETURN_CODE_DISABLED

  12  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/commands/base_command.py:118 in run
       116│         io.input.validate()
       117│
     → 118│         status_code = self.execute(io)
       119│
       120│         if status_code is None:

  11  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/cleo/commands/command.py:85 in execute
        83│
        84│         try:
     →  85│             return self.handle()
        86│         except KeyboardInterrupt:
        87│             return 1

  10  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/console/commands/update.py:51 in handle
        49│         self._installer.update(True)
        50│
     →  51│         return self._installer.run()
        52│

   9  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/installation/installer.py:114 in run
       112│         local_repo = Repository()
       113│
     → 114│         return self._do_install(local_repo)
       115│
       116│     def dry_run(self, dry_run: bool = True) -> Installer:

   8  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/installation/installer.py:325 in _do_install
       323│
       324│         with solver.use_environment(self._env):
     → 325│             ops = solver.solve(use_latest=self._whitelist).calculate_operations(
       326│                 with_uninstalls=self._requires_synchronization,
       327│                 synchronize=self._requires_synchronization,

   7  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/puzzle/solver.py:74 in solve
        72│         with self._provider.progress():
        73│             start = time.time()
     →  74│             packages, depths = self._solve(use_latest=use_latest)
        75│             end = time.time()
        76│

   6  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/puzzle/solver.py:133 in _solve
       131│
       132│         try:
     → 133│             result = resolve_version(
       134│                 self._package, self._provider, locked=locked, use_latest=use_latest
       135│             )

   5  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/mixology/__init__.py:24 in resolve_version
        22│     solver = VersionSolver(root, provider, locked=locked, use_latest=use_latest)
        23│
     →  24│     return solver.solve()
        25│

   4  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/mixology/version_solver.py:81 in solve
        79│             while next is not None:
        80│                 self._propagate(next)
     →  81│                 next = self._choose_package_version()
        82│
        83│             return self._result()

   3  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/mixology/version_solver.py:397 in _choose_package_version
       395│
       396│         conflict = False
     → 397│         for incompatibility in self._provider.incompatibilities_for(package):
       398│             self._add_incompatibility(incompatibility)
       399│

   2  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/puzzle/provider.py:433 in incompatibilities_for
       431│             dependencies.append(dep)
       432│
     → 433│         return [
       434│             Incompatibility(
       435│                 [Term(package.to_dependency(), True), Term(dep, False)],

   1  ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/puzzle/provider.py:434 in <listcomp>
       432│
       433│         return [
     → 434│             Incompatibility(
       435│                 [Term(package.to_dependency(), True), Term(dep, False)],
       436│                 DependencyCause(),

  AssertionError

  Package 'coverage' is listed as a dependency of itself.

  at ~/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/mixology/incompatibility.py:61 in __init__
       57│                     # incompatibility irrelevant, since we already know that mutually
       58│                     # exclusive version ranges are incompatible. We should never derive
       59│                     # an irrelevant incompatibility.
       60│                     err_msg = f"Package '{ref}' is listed as a dependency of itself."
    →  61│                     assert by_ref[ref] is not None, err_msg
       62│                 else:
       63│                     by_ref[ref] = term
       64│
       65│             new_terms = []

@abn
Copy link
Member

abn commented Jun 1, 2022

I tried adding requests[security] black[jupyter] and coverage via poetry add. All of it works well with version on master. The following dependencies were successfully added to pyproject.toml and installed. Maybe try installing poetry from vcs?

requests = {extras = ["security"], version = "^2.27.1"}
black = {extras = ["jupyter"], version = "^22.3.0"}
coverage = "^6.4"
console log:

$ poetry add 'requests[security]'
Using version ^2.27.1 for requests

Updating dependencies
Resolving dependencies... (0.2s)

Writing lock file

Package operations: 5 installs, 0 updates, 0 removals

  • Installing certifi (2022.5.18.1)
  • Installing charset-normalizer (2.0.12)
  • Installing idna (3.3)
  • Installing urllib3 (1.26.9)
  • Installing requests (2.27.1)
$ poetry add 'black[jupyter]'
Using version ^22.3.0 for black

Updating dependencies
Resolving dependencies... (1.8s)

Writing lock file

Package operations: 20 installs, 1 update, 0 removals

  • Installing parso (0.8.3)
  • Installing ptyprocess (0.7.0)
  • Installing traitlets (5.2.2.post1)
  • Installing wcwidth (0.2.5)
  • Installing backcall (0.2.0)
  • Installing decorator (5.1.1)
  • Installing jedi (0.18.1)
  • Installing matplotlib-inline (0.1.3)
  • Installing pexpect (4.8.0)
  • Installing pickleshare (0.7.5)
  • Installing prompt-toolkit (3.0.29)
  • Installing pygments (2.12.0)
  • Updating setuptools (62.1.0 -> 62.3.2)
  • Installing click (8.1.3)
  • Installing ipython (7.34.0)
  • Installing mypy-extensions (0.4.3)
  • Installing pathspec (0.9.0)
  • Installing platformdirs (2.5.2)
  • Installing tokenize-rt (4.2.1)
  • Installing tomli (2.0.1)
  • Installing black (22.3.0)
$ poetry add coverage
Using version ^6.4 for coverage

Updating dependencies
Resolving dependencies... (0.2s)

Writing lock file

Package operations: 1 install, 0 updates, 0 removals

  • Installing coverage (6.4)

Install Poetry from VCS

pipx install --force --suffix=@git 'poetry @ git+https://github.com/python-poetry/poetry.git'

@abn
Copy link
Member

abn commented Jun 1, 2022

If you are still experiencing the issue with the code on master, I'd recommend you do the following.

  1. Create a minimal project that fails.
  2. Remove poetry.lock file.
  3. Remove any virtualenv created already.
  4. Execute and post full output of poetry@git --no-cache install -vvv. (preferrably in gist or a collapsed block).

Note: poetry@git assumes you installed poetry as mentioned in my previous comment.

@Agalin
Copy link

Agalin commented Jun 3, 2022

It seems to be related to private repos.

pyproject.toml
[tool.poetry]
name = "test"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"

[[tool.poetry.source]]
name = "devpi"
url = "https://<devpi mirror>"
default = true


[tool.poetry.dependencies]
python = "^3.9"
google-cloud-pubsub = "^2.12.1"


[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
poetry install --no-cache -vvv
Configuration file exists at /Users/<user>/Library/Application Support/pypoetry, reusing this directory.

Consider moving configuration to /Users/<user>/Library/Preferences/pypoetry, as support for the legacy directory will be removed in an upcoming release.
/Users/<user>/.local/pipx/venvs/poetry/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Loading configuration file /Users/<user>/Library/Application Support/pypoetry/config.toml
Disabling source caches
Adding repository devpi (https://devpi.services.ams.osa/root/opera/+simple) and setting it as the default one
Deactivating the PyPI repository
Creating virtualenv test-w7yS3lyD-py3.9 in /Users/<user>/Library/Caches/pypoetry/virtualenvs
/Users/<user>/.local/pipx/venvs/poetry/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/Users/<user>/.local/pipx/venvs/poetry/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Using virtualenv: /Users/<user>/Library/Caches/pypoetry/virtualenvs/test-w7yS3lyD-py3.9
Updating dependencies
Resolving dependencies...
   1: fact: test is 0.1.0
   1: derived: test
   1: fact: test depends on google-cloud-pubsub (^2.12.1)
   1: selecting test (0.1.0)
   1: derived: google-cloud-pubsub (>=2.12.1,<3.0.0)
   1: fact: google-cloud-pubsub (2.12.1) depends on grpcio (>=1.38.1,<2.0dev)
   1: fact: google-cloud-pubsub (2.12.1) depends on google-api-core (>=1.31.5,<2.0.0 || >2.3.0,<3.0.0dev)
   1: fact: google-cloud-pubsub (2.12.1) depends on proto-plus (>=1.15.0)
   1: fact: google-cloud-pubsub (2.12.1) depends on grpc-google-iam-v1 (>=0.12.3,<0.13dev)
   1: fact: google-cloud-pubsub (2.12.1) depends on grpcio-status (>=1.16.0)
   1: selecting google-cloud-pubsub (2.12.1)
   1: derived: grpcio-status (>=1.16.0)
   1: derived: grpc-google-iam-v1 (>=0.12.3,<0.13dev)
   1: derived: proto-plus (>=1.15.0)
   1: derived: google-api-core[grpc] (>=1.31.5,<2.0.0 || >2.3.0,<3.0.0dev)
   1: derived: grpcio (>=1.38.1,<2.0dev)
   1: fact: grpc-google-iam-v1 (0.12.4) depends on googleapis-common-protos (>=1.56.0,<2.0.0dev)
   1: fact: grpc-google-iam-v1 (0.12.4) depends on grpcio (>=1.0.0,<2.0.0dev)
   1: selecting grpc-google-iam-v1 (0.12.4)
   1: derived: googleapis-common-protos[grpc] (>=1.56.0,<2.0.0dev)
   1: fact: googleapis-common-protos (1.56.2) depends on googleapis-common-protos (1.56.2)
   1: fact: googleapis-common-protos (1.56.2) depends on protobuf (>=3.15.0,<4.0.0dev)
   1: fact: googleapis-common-protos (1.56.2) depends on grpcio (>=1.0.0,<2.0.0dev)
   1: selecting googleapis-common-protos[grpc] (1.56.2)
   1: derived: protobuf (>=3.15.0,<4.0.0dev)
   1: derived: googleapis-common-protos (==1.56.2)
   1: fact: google-api-core (2.8.1) depends on google-api-core (2.8.1)
   1: fact: google-api-core (2.8.1) depends on googleapis-common-protos (>=1.56.2,<2.0dev)
   1: fact: google-api-core (2.8.1) depends on protobuf (>=3.15.0,<4.0.0dev)
   1: fact: google-api-core (2.8.1) depends on google-auth (>=1.25.0,<3.0dev)
   1: fact: google-api-core (2.8.1) depends on requests (>=2.18.0,<3.0.0dev)
   1: fact: google-api-core (2.8.1) depends on grpcio (>=1.33.2,<2.0dev)
   1: fact: google-api-core (2.8.1) depends on grpcio-status (>=1.33.2,<2.0dev)
   1: selecting google-api-core[grpc] (2.8.1)
   1: derived: grpcio-status (>=1.33.2,<2.0dev)
   1: derived: requests (>=2.18.0,<3.0.0dev)
   1: derived: google-auth (>=1.25.0,<3.0dev)
   1: derived: google-api-core (==2.8.1)
   1: fact: requests (2.27.1) depends on urllib3 (>=1.21.1,<1.27)
   1: fact: requests (2.27.1) depends on certifi (>=2017.4.17)
   1: fact: requests (2.27.1) depends on charset-normalizer (>=2.0.0,<2.1.0)
   1: fact: requests (2.27.1) depends on idna (>=2.5,<4)
   1: selecting requests (2.27.1)
   1: derived: idna (>=2.5,<4)
   1: derived: charset-normalizer (>=2.0.0,<2.1.0)
   1: derived: certifi (>=2017.4.17)
   1: derived: urllib3 (>=1.21.1,<1.27)
   1: fact: grpcio-status (1.46.3) depends on protobuf (>=3.12.0)
   1: fact: grpcio-status (1.46.3) depends on grpcio (>=1.46.3)
   1: fact: grpcio-status (1.46.3) depends on googleapis-common-protos (>=1.5.5)
   1: selecting grpcio-status (1.46.3)
   1: derived: grpcio (>=1.46.3)
   1: fact: grpcio (1.46.3) depends on six (>=1.5.2)
   1: selecting grpcio (1.46.3)
   1: derived: six (>=1.5.2)
   1: selecting six (1.16.0)
   1: fact: proto-plus (1.20.5) depends on protobuf (>=3.19.0,<4.0.0dev)
   1: selecting proto-plus (1.20.5)
   1: derived: protobuf (>=3.19.0,<4.0.0dev)
   1: selecting protobuf (3.20.1)
   1: selecting certifi (2022.5.18.1)
   1: selecting urllib3 (1.26.9)
   1: fact: google-auth (2.6.6) depends on cachetools (>=2.0.0,<6.0)
   1: fact: google-auth (2.6.6) depends on pyasn1-modules (>=0.2.1)
   1: fact: google-auth (2.6.6) depends on six (>=1.9.0)
   1: fact: google-auth (2.6.6) depends on rsa (>=3.1.4,<5)
   1: selecting google-auth (2.6.6)
   1: derived: rsa (>=3.1.4,<5)
   1: derived: pyasn1-modules (>=0.2.1)
   1: derived: cachetools (>=2.0.0,<6.0)
   1: fact: pyasn1-modules (0.2.8) depends on pyasn1 (>=0.4.6,<0.5.0)
   1: selecting pyasn1-modules (0.2.8)
   1: derived: pyasn1 (>=0.4.6,<0.5.0)
   1: selecting pyasn1 (0.4.8)
   1: selecting cachetools (5.2.0)
   1: fact: googleapis-common-protos (1.56.2) depends on protobuf (>=3.15.0,<4.0.0dev)
   1: selecting googleapis-common-protos (1.56.2)
   1: fact: google-api-core (2.8.1) depends on googleapis-common-protos (>=1.56.2,<2.0dev)
   1: fact: google-api-core (2.8.1) depends on protobuf (>=3.15.0,<4.0.0dev)
   1: fact: google-api-core (2.8.1) depends on google-auth (>=1.25.0,<3.0dev)
   1: fact: google-api-core (2.8.1) depends on requests (>=2.18.0,<3.0.0dev)
   1: selecting google-api-core (2.8.1)
   1: selecting idna (3.3)
   1: selecting charset-normalizer (2.0.12)
   1: fact: rsa (4.8) depends on pyasn1 (>=0.1.3)
   1: selecting rsa (4.8)
   1: Version solving took 18.404 seconds.
   1: Tried 1 solutions.

Writing lock file

Finding the necessary packages for the current system

  Stack trace:

  17  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/cleo/application.py:330 in run
       328│ 
       329│             try:
     → 330│                 exit_code = self._run(io)
       331│             except Exception as e:
       332│                 if not self._catch_exceptions:

  16  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/console/application.py:188 in _run
       186│         self._load_plugins(io)
       187│ 
     → 188│         exit_code: int = super()._run(io)
       189│         return exit_code
       190│ 

  15  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/cleo/application.py:425 in _run
       423│                 io.set_input(ArgvInput(argv))
       424│ 
     → 425│         exit_code = self._run_command(command, io)
       426│         self._running_command = None
       427│ 

  14  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/cleo/application.py:467 in _run_command
       465│ 
       466│         if error is not None:
     → 467│             raise error
       468│ 
       469│         return event.exit_code

  13  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/cleo/application.py:451 in _run_command
       449│ 
       450│             if event.command_should_run():
     → 451│                 exit_code = command.run(io)
       452│             else:
       453│                 exit_code = ConsoleCommandEvent.RETURN_CODE_DISABLED

  12  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/cleo/commands/base_command.py:118 in run
       116│         io.input.validate()
       117│ 
     → 118│         status_code = self.execute(io)
       119│ 
       120│         if status_code is None:

  11  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/cleo/commands/command.py:85 in execute
        83│ 
        84│         try:
     →  85│             return self.handle()
        86│         except KeyboardInterrupt:
        87│             return 1

  10  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/console/commands/install.py:106 in handle
       104│         self._installer.verbose(self._io.is_verbose())
       105│ 
     → 106│         return_code = self._installer.run()
       107│ 
       108│         if return_code != 0:

   9  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/installation/installer.py:111 in run
       109│             self._execute_operations = False
       110│ 
     → 111│         return self._do_install()
       112│ 
       113│     def dry_run(self, dry_run: bool = True) -> Installer:

   8  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/installation/installer.py:309 in _do_install
       307│ 
       308│         with solver.use_environment(self._env):
     → 309│             ops = solver.solve(use_latest=self._whitelist).calculate_operations(
       310│                 with_uninstalls=self._requires_synchronization,
       311│                 synchronize=self._requires_synchronization,

   7  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/puzzle/solver.py:78 in solve
        76│         with self._provider.progress():
        77│             start = time.time()
     →  78│             packages, depths = self._solve(use_latest=use_latest)
        79│             end = time.time()
        80│ 

   6  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/puzzle/solver.py:147 in _solve
       145│ 
       146│         try:
     → 147│             result = resolve_version(
       148│                 self._package, self._provider, locked=locked, use_latest=use_latest
       149│             )

   5  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/mixology/__init__.py:24 in resolve_version
        22│     solver = VersionSolver(root, provider, locked=locked, use_latest=use_latest)
        23│ 
     →  24│     return solver.solve()
        25│ 

   4  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/mixology/version_solver.py:125 in solve
       123│             while next is not None:
       124│                 self._propagate(next)
     → 125│                 next = self._choose_package_version()
       126│ 
       127│             return self._result()

   3  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/mixology/version_solver.py:451 in _choose_package_version
       449│ 
       450│         conflict = False
     → 451│         for incompatibility in self._provider.incompatibilities_for(package):
       452│             self._add_incompatibility(incompatibility)
       453│ 

   2  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/puzzle/provider.py:501 in incompatibilities_for
       499│         dependencies = self._get_dependencies_with_overrides(_dependencies, package)
       500│ 
     → 501│         return [
       502│             Incompatibility(
       503│                 [Term(package.to_dependency(), True), Term(dep, False)],

   1  ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/puzzle/provider.py:502 in <listcomp>
       500│ 
       501│         return [
     → 502│             Incompatibility(
       503│                 [Term(package.to_dependency(), True), Term(dep, False)],
       504│                 DependencyCause(),

  AssertionError

  Package 'googleapis-common-protos' is listed as a dependency of itself.

  at ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/mixology/incompatibility.py:62 in __init__
       58│                     # incompatibility irrelevant, since we already know that mutually
       59│                     # exclusive version ranges are incompatible. We should never derive
       60│                     # an irrelevant incompatibility.
       61│                     err_msg = f"Package '{ref}' is listed as a dependency of itself."
    →  62│                     assert value is not None, err_msg
       63│                     by_ref[ref] = value
       64│                 else:
       65│                     by_ref[ref] = term
       66│ 

Without a mirror works just fine
Configuration file exists at /Users/<user>/Library/Application Support/pypoetry, reusing this directory.

Consider moving configuration to /Users/<user>/Library/Preferences/pypoetry, as support for the legacy directory will be removed in an upcoming release.
/Users/<user>/.local/pipx/venvs/poetry/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
Loading configuration file /Users/<user>/Library/Application Support/pypoetry/config.toml
Disabling source caches
Using virtualenv: /Users/<user>/Library/Caches/pypoetry/virtualenvs/test-w7yS3lyD-py3.9
Project environment contains an empty path in sys_path, ignoring.
Updating dependencies
Resolving dependencies...
   1: fact: test is 0.1.0
   1: derived: test
   1: fact: test depends on google-cloud-pubsub (^2.12.1)
   1: selecting test (0.1.0)
   1: derived: google-cloud-pubsub (>=2.12.1,<3.0.0)
[keyring.backend] Loading KWallet
[keyring.backend] Loading SecretService
[keyring.backend] Loading Windows
[keyring.backend] Loading chainer
[keyring.backend] Loading macOS
Creating new session for pypi.org
[urllib3.connectionpool] Starting new HTTPS connection (1): pypi.org:443
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/google-cloud-pubsub/json HTTP/1.1" 200 26647
Source (PyPI): No release information found for google-cloud-pubsub-0.0.1, skipping
Source (PyPI): 1 packages found for google-cloud-pubsub >=2.12.1,<3.0.0
Source (PyPI): Getting info for google-cloud-pubsub (2.12.1) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/google-cloud-pubsub/2.12.1/json HTTP/1.1" 200 26647
   1: fact: google-cloud-pubsub (2.12.1) depends on grpcio (>=1.38.1,<2.0dev)
   1: fact: google-cloud-pubsub (2.12.1) depends on google-api-core (>=1.31.5,<2.0.0 || >2.3.0,<3.0.0dev)
   1: fact: google-cloud-pubsub (2.12.1) depends on proto-plus (>=1.15.0)
   1: fact: google-cloud-pubsub (2.12.1) depends on grpc-google-iam-v1 (>=0.12.3,<0.13dev)
   1: fact: google-cloud-pubsub (2.12.1) depends on grpcio-status (>=1.16.0)
   1: selecting google-cloud-pubsub (2.12.1)
   1: derived: grpcio-status (>=1.16.0)
   1: derived: grpc-google-iam-v1 (>=0.12.3,<0.13dev)
   1: derived: proto-plus (>=1.15.0)
   1: derived: google-api-core[grpc] (>=1.31.5,<2.0.0 || >2.3.0,<3.0.0dev)
   1: derived: grpcio (>=1.38.1,<2.0dev)
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/grpcio-status/json HTTP/1.1" 200 17066
Source (PyPI): 44 packages found for grpcio-status >=1.16.0
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/grpc-google-iam-v1/json HTTP/1.1" 200 3740
Source (PyPI): 3 packages found for grpc-google-iam-v1 >=0.12.3,<0.13dev
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/proto-plus/json HTTP/1.1" 200 13058
Source (PyPI): 21 packages found for proto-plus >=1.15.0
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/google-api-core/json HTTP/1.1" 200 26642
Source (PyPI): 14 packages found for google-api-core >=1.31.5,<2.0.0 || >2.3.0,<3.0.0dev
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/grpcio/json HTTP/1.1" 200 626795
Source (PyPI): No release information found for grpcio-0.12.0b8, skipping
Source (PyPI): No release information found for grpcio-0.3.0, skipping
Source (PyPI): No release information found for grpcio-0.4.0, skipping
Source (PyPI): 22 packages found for grpcio >=1.38.1,<2.0dev
Source (PyPI): Getting info for grpc-google-iam-v1 (0.12.4) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/grpc-google-iam-v1/0.12.4/json HTTP/1.1" 200 3740
   1: fact: grpc-google-iam-v1 (0.12.4) depends on googleapis-common-protos (>=1.56.0,<2.0.0dev)
   1: fact: grpc-google-iam-v1 (0.12.4) depends on grpcio (>=1.0.0,<2.0.0dev)
   1: selecting grpc-google-iam-v1 (0.12.4)
   1: derived: googleapis-common-protos[grpc] (>=1.56.0,<2.0.0dev)
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/googleapis-common-protos/json HTTP/1.1" 200 9253
Source (PyPI): 3 packages found for googleapis-common-protos >=1.56.0,<2.0.0dev
Source (PyPI): Getting info for googleapis-common-protos (1.56.2) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/googleapis-common-protos/1.56.2/json HTTP/1.1" 200 9253
   1: fact: googleapis-common-protos (1.56.2) depends on googleapis-common-protos (1.56.2)
   1: fact: googleapis-common-protos (1.56.2) depends on protobuf (>=3.15.0,<4.0.0dev)
   1: fact: googleapis-common-protos (1.56.2) depends on grpcio (>=1.0.0,<2.0.0dev)
   1: selecting googleapis-common-protos[grpc] (1.56.2)
   1: derived: protobuf (>=3.15.0,<4.0.0dev)
   1: derived: googleapis-common-protos (==1.56.2)
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/protobuf/json HTTP/1.1" 200 217647
Source (PyPI): 34 packages found for protobuf >=3.15.0,<4.0.0dev
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/googleapis-common-protos/json HTTP/1.1" 200 9253
Source (PyPI): 1 packages found for googleapis-common-protos 1.56.2
Source (PyPI): Getting info for google-api-core (2.8.1) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/google-api-core/2.8.1/json HTTP/1.1" 200 26642
   1: fact: google-api-core (2.8.1) depends on google-api-core (2.8.1)
   1: fact: google-api-core (2.8.1) depends on googleapis-common-protos (>=1.56.2,<2.0dev)
   1: fact: google-api-core (2.8.1) depends on protobuf (>=3.15.0,<4.0.0dev)
   1: fact: google-api-core (2.8.1) depends on google-auth (>=1.25.0,<3.0dev)
   1: fact: google-api-core (2.8.1) depends on requests (>=2.18.0,<3.0.0dev)
   1: fact: google-api-core (2.8.1) depends on grpcio (>=1.33.2,<2.0dev)
   1: fact: google-api-core (2.8.1) depends on grpcio-status (>=1.33.2,<2.0dev)
   1: selecting google-api-core[grpc] (2.8.1)
   1: derived: grpcio-status (>=1.33.2,<2.0dev)
   1: derived: requests (>=2.18.0,<3.0.0dev)
   1: derived: google-auth (>=1.25.0,<3.0dev)
   1: derived: google-api-core (==2.8.1)
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/requests/json HTTP/1.1" 200 32531
Source (PyPI): No release information found for requests-0.0.1, skipping
Source (PyPI): No release information found for requests-0.12.01, skipping
Source (PyPI): No release information found for requests-2.15.0, skipping
Source (PyPI): 18 packages found for requests >=2.18.0,<3.0.0dev
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/google-auth/json HTTP/1.1" 200 33114
Source (PyPI): 39 packages found for google-auth >=1.25.0,<3.0dev
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/google-api-core/json HTTP/1.1" 200 26642
Source (PyPI): 1 packages found for google-api-core 2.8.1
Source (PyPI): Getting info for requests (2.27.1) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/requests/2.27.1/json HTTP/1.1" 200 32531
   1: fact: requests (2.27.1) depends on urllib3 (>=1.21.1,<1.27)
   1: fact: requests (2.27.1) depends on certifi (>=2017.4.17)
   1: fact: requests (2.27.1) depends on charset-normalizer (>=2.0.0,<2.1.0)
   1: fact: requests (2.27.1) depends on idna (>=2.5,<4)
   1: selecting requests (2.27.1)
   1: derived: idna (>=2.5,<4)
   1: derived: charset-normalizer (>=2.0.0,<2.1.0)
   1: derived: certifi (>=2017.4.17)
   1: derived: urllib3 (>=1.21.1,<1.27)
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/idna/json HTTP/1.1" 200 10499
Source (PyPI): No release information found for idna-0.1, skipping
Source (PyPI): 10 packages found for idna >=2.5,<4
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/charset-normalizer/json HTTP/1.1" 200 14342
Source (PyPI): 13 packages found for charset-normalizer >=2.0.0,<2.1.0
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/certifi/json HTTP/1.1" 200 14058
Source (PyPI): No release information found for certifi-0, skipping
Source (PyPI): 24 packages found for certifi >=2017.4.17
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/urllib3/json HTTP/1.1" 200 34494
Source (PyPI): No release information found for urllib3-0.3, skipping
Source (PyPI): No release information found for urllib3-0.3.1, skipping
Source (PyPI): No release information found for urllib3-0.4.0, skipping
Source (PyPI): No release information found for urllib3-0.4.1, skipping
Source (PyPI): 29 packages found for urllib3 >=1.21.1,<1.27
Source (PyPI): Getting info for grpcio-status (1.46.3) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/grpcio-status/1.46.3/json HTTP/1.1" 200 17066
   1: fact: grpcio-status (1.46.3) depends on protobuf (>=3.12.0)
   1: fact: grpcio-status (1.46.3) depends on grpcio (>=1.46.3)
   1: fact: grpcio-status (1.46.3) depends on googleapis-common-protos (>=1.5.5)
   1: selecting grpcio-status (1.46.3)
   1: derived: grpcio (>=1.46.3)
Source (PyPI): Getting info for grpcio (1.46.3) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/grpcio/1.46.3/json HTTP/1.1" 200 626795
   1: fact: grpcio (1.46.3) depends on six (>=1.5.2)
   1: selecting grpcio (1.46.3)
   1: derived: six (>=1.5.2)
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/six/json HTTP/1.1" 200 7998
Source (PyPI): 16 packages found for six >=1.5.2
Source (PyPI): Getting info for six (1.16.0) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/six/1.16.0/json HTTP/1.1" 200 7998
Source (PyPI): No dependencies found, downloading archives
Source (PyPI): Downloading wheel: six-1.16.0-py2.py3-none-any.whl
Creating new session for files.pythonhosted.org
[urllib3.connectionpool] Starting new HTTPS connection (1): files.pythonhosted.org:443
[urllib3.connectionpool] https://files.pythonhosted.org:443 "GET /packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl HTTP/1.1" 200 11053
   1: selecting six (1.16.0)
Source (PyPI): Getting info for proto-plus (1.20.5) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/proto-plus/1.20.5/json HTTP/1.1" 200 13058
   1: fact: proto-plus (1.20.5) depends on protobuf (>=3.19.0,<4.0.0dev)
   1: selecting proto-plus (1.20.5)
   1: derived: protobuf (>=3.19.0,<4.0.0dev)
Source (PyPI): Getting info for protobuf (3.20.1) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/protobuf/3.20.1/json HTTP/1.1" 200 220894
Source (PyPI): No dependencies found, downloading archives
Source (PyPI): Downloading wheel: protobuf-3.20.1-py2.py3-none-any.whl
[urllib3.connectionpool] https://files.pythonhosted.org:443 "GET /packages/ef/c8/2e7f7feaf804b7206e6cc8fa3f0f49834a78f7cb127813d2c45e42d5f7bf/protobuf-3.20.1-py2.py3-none-any.whl HTTP/1.1" 200 162127
   1: selecting protobuf (3.20.1)
Source (PyPI): Getting info for certifi (2022.5.18.1) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/certifi/2022.5.18.1/json HTTP/1.1" 200 14058
Source (PyPI): No dependencies found, downloading archives
Source (PyPI): Downloading wheel: certifi-2022.5.18.1-py3-none-any.whl
[urllib3.connectionpool] https://files.pythonhosted.org:443 "GET /packages/11/dd/e015f3780f42dd9af62cf0107b44ea1298926627ecd70c17b0e484e95bcd/certifi-2022.5.18.1-py3-none-any.whl HTTP/1.1" 200 155170
   1: selecting certifi (2022.5.18.1)
Source (PyPI): Getting info for urllib3 (1.26.9) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/urllib3/1.26.9/json HTTP/1.1" 200 34494
   1: selecting urllib3 (1.26.9)
Source (PyPI): Getting info for google-auth (2.6.6) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/google-auth/2.6.6/json HTTP/1.1" 200 33114
   1: fact: google-auth (2.6.6) depends on cachetools (>=2.0.0,<6.0)
   1: fact: google-auth (2.6.6) depends on pyasn1-modules (>=0.2.1)
   1: fact: google-auth (2.6.6) depends on six (>=1.9.0)
   1: fact: google-auth (2.6.6) depends on rsa (>=3.1.4,<5)
   1: selecting google-auth (2.6.6)
   1: derived: rsa (>=3.1.4,<5)
   1: derived: pyasn1-modules (>=0.2.1)
   1: derived: cachetools (>=2.0.0,<6.0)
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/rsa/json HTTP/1.1" 200 12861
Source (PyPI): No release information found for rsa-3.2.1, skipping
Source (PyPI): 21 packages found for rsa >=3.1.4,<5
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/pyasn1-modules/json HTTP/1.1" 200 36482
Source (PyPI): 8 packages found for pyasn1-modules >=0.2.1
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/cachetools/json HTTP/1.1" 200 13085
Source (PyPI): 17 packages found for cachetools >=2.0.0,<6.0
Source (PyPI): Getting info for pyasn1-modules (0.2.8) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/pyasn1-modules/0.2.8/json HTTP/1.1" 200 36482
   1: fact: pyasn1-modules (0.2.8) depends on pyasn1 (>=0.4.6,<0.5.0)
   1: selecting pyasn1-modules (0.2.8)
   1: derived: pyasn1 (>=0.4.6,<0.5.0)
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/pyasn1/json HTTP/1.1" 200 46711
Source (PyPI): No release information found for pyasn1-0.0.6a, skipping
Source (PyPI): 3 packages found for pyasn1 >=0.4.6,<0.5.0
Source (PyPI): Getting info for pyasn1 (0.4.8) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/pyasn1/0.4.8/json HTTP/1.1" 200 46711
Source (PyPI): No dependencies found, downloading archives
Source (PyPI): Downloading wheel: pyasn1-0.4.8-py2.py3-none-any.whl
[urllib3.connectionpool] https://files.pythonhosted.org:443 "GET /packages/62/1e/a94a8d635fa3ce4cfc7f506003548d0a2447ae76fd5ca53932970fe3053f/pyasn1-0.4.8-py2.py3-none-any.whl HTTP/1.1" 200 77145
   1: selecting pyasn1 (0.4.8)
Source (PyPI): Getting info for cachetools (5.2.0) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/cachetools/5.2.0/json HTTP/1.1" 200 13085
Source (PyPI): No dependencies found, downloading archives
Source (PyPI): Downloading wheel: cachetools-5.2.0-py3-none-any.whl
[urllib3.connectionpool] https://files.pythonhosted.org:443 "GET /packages/68/aa/5fc646cae6e997c3adf3b0a7e257cda75cff21fcba15354dffd67789b7bb/cachetools-5.2.0-py3-none-any.whl HTTP/1.1" 200 9292
   1: selecting cachetools (5.2.0)
Source (PyPI): Getting info for googleapis-common-protos (1.56.2) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/googleapis-common-protos/1.56.2/json HTTP/1.1" 200 9253
   1: fact: googleapis-common-protos (1.56.2) depends on protobuf (>=3.15.0,<4.0.0dev)
   1: selecting googleapis-common-protos (1.56.2)
Source (PyPI): Getting info for google-api-core (2.8.1) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/google-api-core/2.8.1/json HTTP/1.1" 200 26642
   1: fact: google-api-core (2.8.1) depends on googleapis-common-protos (>=1.56.2,<2.0dev)
   1: fact: google-api-core (2.8.1) depends on protobuf (>=3.15.0,<4.0.0dev)
   1: fact: google-api-core (2.8.1) depends on google-auth (>=1.25.0,<3.0dev)
   1: fact: google-api-core (2.8.1) depends on requests (>=2.18.0,<3.0.0dev)
   1: selecting google-api-core (2.8.1)
Source (PyPI): Getting info for idna (3.3) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/idna/3.3/json HTTP/1.1" 200 10499
Source (PyPI): No dependencies found, downloading archives
Source (PyPI): Downloading wheel: idna-3.3-py3-none-any.whl
[urllib3.connectionpool] https://files.pythonhosted.org:443 "GET /packages/04/a2/d918dcd22354d8958fe113e1a3630137e0fc8b44859ade3063982eacd2a4/idna-3.3-py3-none-any.whl HTTP/1.1" 200 61160
   1: selecting idna (3.3)
Source (PyPI): Getting info for charset-normalizer (2.0.12) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/charset-normalizer/2.0.12/json HTTP/1.1" 200 14342
   1: selecting charset-normalizer (2.0.12)
Source (PyPI): Getting info for rsa (4.8) from PyPI
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/rsa/4.8/json HTTP/1.1" 200 12861
   1: fact: rsa (4.8) depends on pyasn1 (>=0.1.3)
   1: selecting rsa (4.8)
   1: Version solving took 2.622 seconds.
   1: Tried 1 solutions.

Writing lock file

Finding the necessary packages for the current system

Package operations: 19 installs, 0 updates, 0 removals

  • Installing protobuf (3.20.1): Pending...
  • Installing pyasn1 (0.4.8): Pending...
  • Installing six (1.16.0): Pending...
[urllib3.connectionpool] Starting new HTTPS connection (2): pypi.org:443
[urllib3.connectionpool] Starting new HTTPS connection (3): pypi.org:443
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/protobuf/3.20.1/json HTTP/1.1" 200 220894
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/pyasn1/0.4.8/json HTTP/1.1" 200 46711
[urllib3.connectionpool] https://pypi.org:443 "GET /pypi/six/1.16.0/json HTTP/1.1" 200 7998
Skipping wheel protobuf-3.20.1-cp310-cp310-macosx_10_9_universal2.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp310-cp310-manylinux2014_aarch64.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp310-cp310-win32.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp310-cp310-win_amd64.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp36-cp36m-macosx_10_9_x86_64.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp37-cp37m-macosx_10_9_x86_64.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp37-cp37m-manylinux2014_aarch64.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp37-cp37m-win32.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp37-cp37m-win_amd64.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp38-cp38-macosx_10_9_x86_64.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp38-cp38-manylinux2014_aarch64.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp38-cp38-win32.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp38-cp38-win_amd64.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp39-cp39-manylinux2014_aarch64.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp39-cp39-win32.whl as this is not supported by the current environment
Skipping wheel protobuf-3.20.1-cp39-cp39-win_amd64.whl as this is not supported by the current environment
Creating new session for files.pythonhosted.org
Skipping unsupported distribution pyasn1-0.4.8-py2.4.egg
Skipping unsupported distribution pyasn1-0.4.8-py2.5.egg
Skipping unsupported distribution pyasn1-0.4.8-py2.6.egg
Skipping unsupported distribution pyasn1-0.4.8-py2.7.egg
Skipping unsupported distribution pyasn1-0.4.8-py3.1.egg
Skipping unsupported distribution pyasn1-0.4.8-py3.2.egg
Skipping unsupported distribution pyasn1-0.4.8-py3.3.egg
Skipping unsupported distribution pyasn1-0.4.8-py3.4.egg
  • Installing protobuf (3.20.1): Downloading... 100%
  • Installing protobuf (3.20.1): Installing...
  • Installing protobuf (3.20.1)
  • Installing pyasn1 (0.4.8): Downloading... 100%
  • Installing pyasn1 (0.4.8): Installing...
  • Installing pyasn1 (0.4.8)
  • Installing six (1.16.0): Downloading... 100%
  • Installing six (1.16.0): Installing...
  • Installing six (1.16.0)
  • Installing cachetools (5.2.0): Pending...
  • Installing certifi (2022.5.18.1): Pending...
  • Installing charset-normalizer (2.0.12): Pending...
  • Installing googleapis-common-protos (1.56.2): Pending...
  • Installing grpcio (1.46.3): Pending...
[urllib3.connectionpool] Starting new HTTPS connection (4): pypi.org:443
  • Installing idna (3.3): Pending...
  • Installing pyasn1-modules (0.2.8): Pending...
[urllib3.connectionpool] Starting new HTTPS connection (5): pypi.org:443
  • Installing cachetools (5.2.0): Downloading... 100%
  • Installing cachetools (5.2.0): Installing...
  • Installing certifi (2022.5.18.1): Downloading... 100%
  • Installing certifi (2022.5.18.1): Installing...
  • Installing charset-normalizer (2.0.12): Downloading... 100%
  • Installing charset-normalizer (2.0.12): Installing...
  • Installing googleapis-common-protos (1.56.2): Pending...
  • Installing grpcio (1.46.3): Pending...
  • Installing idna (3.3): Pending...
  • Installing pyasn1-modules (0.2.8): Pending...
  • Installing rsa (4.8): Pending...
  • Installing urllib3 (1.26.9): Pending...
  • Installing googleapis-common-protos (1.56.2): Downloading... 0%
  • Installing grpcio (1.46.3): Pending...
  • Installing idna (3.3): Downloading... 100%
  • Installing idna (3.3): Installing...
  • Installing pyasn1-modules (0.2.8): Pending...
  • Installing rsa (4.8): Downloading... 100%
  • Installing rsa (4.8): Installing...
  • Installing urllib3 (1.26.9): Pending...
Skipping unsupported distribution pyasn1_modules-0.2.8-py2.4.egg
Skipping unsupported distribution pyasn1_modules-0.2.8-py2.5.egg
Skipping unsupported distribution pyasn1_modules-0.2.8-py2.6.egg
  • Installing googleapis-common-protos (1.56.2): Downloading... 100%
  • Installing googleapis-common-protos (1.56.2): Installing...
  • Installing grpcio (1.46.3): Pending...
  • Installing idna (3.3): Downloading... 100%
  • Installing idna (3.3): Installing...
  • Installing pyasn1-modules (0.2.8): Downloading... 100%
  • Installing pyasn1-modules (0.2.8): Installing...
  • Installing rsa (4.8): Downloading... 100%
  • Installing rsa (4.8): Installing...
  • Installing urllib3 (1.26.9): Downloading... 100%
  • Installing urllib3 (1.26.9): Installing...
Skipping wheel grpcio-1.46.3-cp310-cp310-linux_armv7l.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp310-cp310-macosx_10_10_universal2.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp310-cp310-manylinux_2_17_aarch64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp310-cp310-musllinux_1_1_i686.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp310-cp310-musllinux_1_1_x86_64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp310-cp310-win32.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp310-cp310-win_amd64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp36-cp36m-linux_armv7l.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp36-cp36m-macosx_10_10_x86_64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp36-cp36m-manylinux_2_17_aarch64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp36-cp36m-manylinux_2_17_i686.manylinux2014_i686.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp36-cp36m-musllinux_1_1_i686.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp36-cp36m-musllinux_1_1_x86_64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp36-cp36m-win32.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp36-cp36m-win_amd64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp37-cp37m-linux_armv7l.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp37-cp37m-macosx_10_10_x86_64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp37-cp37m-manylinux_2_17_aarch64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp37-cp37m-musllinux_1_1_i686.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp37-cp37m-musllinux_1_1_x86_64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp37-cp37m-win32.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp37-cp37m-win_amd64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp38-cp38-linux_armv7l.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp38-cp38-macosx_10_10_x86_64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp38-cp38-manylinux_2_17_aarch64.whl as this is not supported by the current environment
Skipping wheel grpcio-1.46.3-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl as this is not supported by the current environment
  • Installing cachetools (5.2.0)
  • Installing certifi (2022.5.18.1): Downloading... 100%
  • Installing certifi (2022.5.18.1): Installing...
  • Installing certifi (2022.5.18.1)
  • Installing charset-normalizer (2.0.12): Downloading... 100%
  • Installing charset-normalizer (2.0.12): Installing...
  • Installing charset-normalizer (2.0.12)
  • Installing googleapis-common-protos (1.56.2): Downloading... 100%
  • Installing googleapis-common-protos (1.56.2): Installing...
  • Installing googleapis-common-protos (1.56.2)
  • Installing grpcio (1.46.3): Downloading... 100%
  • Installing grpcio (1.46.3): Installing...
  • Installing grpcio (1.46.3)
  • Installing idna (3.3): Downloading... 100%
  • Installing idna (3.3): Installing...
  • Installing idna (3.3)
  • Installing pyasn1-modules (0.2.8): Downloading... 100%
  • Installing pyasn1-modules (0.2.8): Installing...
  • Installing pyasn1-modules (0.2.8)
  • Installing rsa (4.8): Downloading... 100%
  • Installing rsa (4.8): Installing...
  • Installing rsa (4.8)
  • Installing urllib3 (1.26.9): Downloading... 100%
  • Installing urllib3 (1.26.9): Installing...
  • Installing urllib3 (1.26.9)
  • Installing google-auth (2.6.6): Pending...
  • Installing grpcio-status (1.46.3): Pending...
  • Installing requests (2.27.1): Pending...
  • Installing google-auth (2.6.6): Downloading... 100%
  • Installing google-auth (2.6.6): Installing...
  • Installing google-auth (2.6.6)
  • Installing grpcio-status (1.46.3): Downloading... 100%
  • Installing grpcio-status (1.46.3): Installing...
  • Installing grpcio-status (1.46.3)
  • Installing requests (2.27.1): Downloading... 100%
  • Installing requests (2.27.1): Installing...
  • Installing requests (2.27.1)
  • Installing google-api-core (2.8.1): Pending...
  • Installing grpc-google-iam-v1 (0.12.4): Pending...
  • Installing proto-plus (1.20.5): Pending...
  • Installing google-api-core (2.8.1): Downloading... 100%
  • Installing google-api-core (2.8.1): Installing...
  • Installing google-api-core (2.8.1)
  • Installing grpc-google-iam-v1 (0.12.4): Downloading... 100%
  • Installing grpc-google-iam-v1 (0.12.4): Installing...
  • Installing grpc-google-iam-v1 (0.12.4)
  • Installing proto-plus (1.20.5): Downloading... 100%
  • Installing proto-plus (1.20.5): Installing...
  • Installing proto-plus (1.20.5)
  • Installing google-cloud-pubsub (2.12.1): Pending...
  • Installing google-cloud-pubsub (2.12.1): Downloading... 100%
  • Installing google-cloud-pubsub (2.12.1): Installing...
  • Installing google-cloud-pubsub (2.12.1)

Locking works correctly, it's installation that fails.

Everything above was done using the latest master installed through pipx runpip poetry install git+https://github.com/python-poetry/poetry.git

@Darsstar
Copy link
Contributor

Darsstar commented Jun 3, 2022

I'm also encountering this issue.

Locking seems to work 'fine' in that that operation does not produce any runtime errors due to solving.
During solving it it adds the base package x as a dependency of x[y]. So far so good as far as I understand. My guess at the moment, more debugging soon, is that when it writes the lock file it normalizes x[y] to x and then merges the dependencies of both x packages, resulting in x depending on x.

Master (89e3f7b) produced this lock file section:

[[package]]
name = "coverage"
version = "6.4.1"
description = "Code coverage measurement for Python"
category = "dev"
optional = false
python-versions = ">=3.7"

[package.dependencies]
coverage = {version = "6.4.1", markers = "python_version >= \"3.7\""}
tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""}

[package.extras]
toml = ["tomli"]

[package.source]
type = "legacy"
url = "https://pkgs.dev.azure.com/REDACTED/_packaging/REDACTED/pypi/simple"
reference = "Mirror"

So locking produces an incorrect result which is only noticed when installing.

@Agalin
Copy link

Agalin commented Jun 3, 2022

Seems to be broken starting from 6ad508f6437bda7d6b76f8ae27202fef74cf6813 (update to poetry-core 1.1.0 beta 1). Works fine with a previous commit (and alpha core installed).

@Agalin
Copy link

Agalin commented Jun 3, 2022

Oh. Maybe it's in locking after al. With version that works for a project without a lock file (i.e. the example above) I've tried to install another project with lock generated using latest master and it failed. After regenerating lock it installs correctly.

Darsstar pushed a commit to Darsstar/poetry that referenced this issue Jun 3, 2022
Darsstar pushed a commit to Darsstar/poetry that referenced this issue Jun 3, 2022
@Darsstar
Copy link
Contributor

Darsstar commented Jun 3, 2022

if (
_package.name == package.name
and not _package.is_same_package_as(package)
and _package.version == package.version
):
for dep in package.requires:
if dep.is_same_package_as(_package):
continue

I think that needs to become (seems to work for me)

                    if (
                        not _package.features
                        and package.provides(_package)
                        and _package.version == package.version
                    ):
                        for dep in package.requires:
                            # Prevent adding base package as a dependency to itself
                            if _package.provides(dep):
                                continue

is_same_package_as() compares sources. The x dependency that gets added to x[y] gets created out of thin air and has no source because of it. Causing it to not be considered the same package.

dep has no source, _package can have a source. When _package has a source they are not considered the same package. This explains why it works when you remove the source.

Since that if is inside another if that tests whether it has features or not provides() seems to be a better choice than is_same_package_as() since it only compares the names and features.

@Darsstar Darsstar mentioned this issue Jun 3, 2022
@vdwees
Copy link

vdwees commented Jun 3, 2022

I have also hit this issue when using the gitlab pypi registry and testing poetry==1.2.0b1, the issue does not occur with poetry==1.1.13

@radoering
Copy link
Member

@Agalin @Darsstar Thanks for the analysis. That sounds very plausible to me. is_same_package_as() has been fixed in poetry-core 1.1.0b1, which causes downstream code that exploits the fixed bug to fail. I'll add it to the blocker list.

@Darsstar Your comment in the release issue sounds like you're already working on a PR with a fix and a test? (I'm looking forward to it.)

Darsstar pushed a commit to Darsstar/poetry that referenced this issue Jun 4, 2022
Darsstar pushed a commit to Darsstar/poetry that referenced this issue Jun 4, 2022
Darsstar pushed a commit to Darsstar/poetry that referenced this issue Jun 4, 2022
Darsstar pushed a commit to Darsstar/poetry that referenced this issue Jun 4, 2022
Darsstar pushed a commit to Darsstar/poetry that referenced this issue Jun 4, 2022
Darsstar pushed a commit to Darsstar/poetry that referenced this issue Jun 4, 2022
Darsstar pushed a commit to Darsstar/poetry that referenced this issue Jun 4, 2022
Darsstar pushed a commit to Darsstar/poetry that referenced this issue Jun 4, 2022
Darsstar pushed a commit to Darsstar/poetry that referenced this issue Jun 4, 2022
radoering pushed a commit that referenced this issue Jun 5, 2022
… are involved (#5769)

* Add Failing test for #5727

* Fixes #5727

Co-authored-by: Dos Moonen <d.moonen@nki.nl>
@mkniewallner mkniewallner removed status/triage This issue needs to be triaged status/waiting-on-response Waiting on response from author labels Jun 11, 2022
Copy link

github-actions bot commented Mar 2, 2024

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 Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants