python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
31.76k stars 2.27k forks source link

Spurious version conflict #2852

Closed dmyersturnbull closed 4 years ago

dmyersturnbull commented 4 years ago

Issue

This appears to be a spurious conflict:
Because pocketutils depends on both peewee (>=3.13, <1.0) and peewee (>=3.13, <1.0), version solving failed.

Full log:

(fish) PS C:\Users\douglas\Desktop\code\pocketutils> poetry lock -vvv
Using virtualenv: C:\ProgramData\Miniconda3\envs\fish
Updating dependencies
Resolving dependencies...
   1: fact: pocketutils is 0.1.1
   1: derived: pocketutils
   0: Duplicate dependencies for tomlkit
   0: Merging requirements for tomlkit (>=0.5, <1.0)
   1: fact: pocketutils depends on numpy (^1.18)
   1: fact: pocketutils depends on tomlkit (>=0.5, <1.0)
   1: fact: pocketutils depends on importlib-metadata (^1)
   1: fact: pocketutils depends on requests (^2)
   1: fact: pocketutils depends on dill (^0.3)
   1: fact: pocketutils depends on jsonpickle (^1)
   1: fact: pocketutils depends on natsort (^7)
   1: fact: pocketutils depends on pandas (^1)
   1: fact: pocketutils depends on joblib (>=0.16, <1.0)
   1: fact: pocketutils depends on PyMySQL (>=0.10, <1.0)
   1: fact: pocketutils depends on peewee (>=3.13, <1.0)
   1: fact: pocketutils depends on sshtunnel (0.13, <1.0)
   1: fact: pocketutils depends on matplotlib (^3)
   1: fact: pocketutils depends on goatools (^1)
   1: fact: pocketutils depends on uniprot (^1)
   1: fact: pocketutils depends on colorama (>=0.4, <1.0)
   1: fact: pocketutils depends on psutil (^5)
   1: fact: pocketutils depends on ipython (^7)
   1: fact: pocketutils depends on pre-commit (^2)
   1: fact: pocketutils depends on pytest (^6)
   1: fact: pocketutils depends on coverage (^5)
   1: fact: pocketutils depends on pytest-cov (^2)
   1: fact: pocketutils depends on sphinx (^3)
   1: fact: pocketutils depends on sphinx-autoapi (^1)
   1: fact: pocketutils depends on sphinx-rtd-theme (^0)
   1: fact: pocketutils depends on flake8 (^3)
   1: fact: pocketutils depends on flake8-docstrings (^1)
   1: fact: pocketutils depends on black (=19.10b0)
   1: fact: pocketutils depends on isort (^5)
   1: fact: pocketutils depends on sphinx-autodoc-typehints (^1)
   1: fact: pocketutils depends on hypothesis (^5)
   1: fact: pocketutils depends on flake8-bugbear (^20)
   1: fact: pocketutils depends on coveralls (^2)
   1: fact: pocketutils depends on pre-commit (^2)
   1: fact: pocketutils depends on pytest (^6)
   1: fact: pocketutils depends on coverage (^5)
   1: fact: pocketutils depends on pytest-cov (^2)
   1: fact: pocketutils depends on sphinx (^3)
   1: fact: pocketutils depends on sphinx-autoapi (^1)
   1: fact: pocketutils depends on sphinx-rtd-theme (^0)
   1: fact: pocketutils depends on flake8 (^3)
   1: fact: pocketutils depends on flake8-docstrings (^1)
   1: fact: pocketutils depends on black (=19.10b0)
   1: fact: pocketutils depends on isort (^5)
   1: fact: pocketutils depends on sphinx-autodoc-typehints (^1)
   1: fact: pocketutils depends on hypothesis (^5)
   1: fact: pocketutils depends on flake8-bugbear (^20)
   1: fact: pocketutils depends on coveralls (^2)
   1: fact: pocketutils depends on tomlkit (>=0.5, <1.0)
   1: selecting pocketutils (0.1.1)
   1: derived: tomlkit (>=0.5, <1.0)
   1: derived: coveralls (^2)
   1: derived: flake8-bugbear (^20)
   1: derived: hypothesis (^5)
   1: derived: sphinx-autodoc-typehints (^1)
   1: derived: isort (^5)
   1: derived: black (=19.10b0)
   1: derived: flake8-docstrings (^1)
   1: derived: flake8 (^3)
   1: derived: sphinx-rtd-theme (^0)
   1: derived: sphinx-autoapi (^1)
   1: derived: sphinx (^3)
   1: derived: pytest-cov (^2)
   1: derived: coverage (^5)
   1: derived: pytest (^6)
   1: derived: pre-commit (^2)
   1: derived: ipython (^7)
   1: derived: psutil (^5)
   1: derived: colorama (>=0.4, <1.0)
   1: derived: uniprot (^1)
   1: derived: goatools (^1)
   1: derived: matplotlib (^3)
   1: derived: sshtunnel (0.13, <1.0)
   1: derived: peewee (>=3.13, <1.0)
   1: derived: PyMySQL (>=0.10, <1.0)
   1: derived: joblib (>=0.16, <1.0)
   1: derived: pandas (^1)
   1: derived: natsort (^7)
   1: derived: jsonpickle (^1)
   1: derived: dill (^0.3)
   1: derived: requests (^2)
   1: derived: importlib-metadata (^1)
   1: derived: numpy (^1.18)
   1: conflict: pocketutils depends on peewee (>=3.13, <1.0)
   1: ! not peewee (>=3.13, <1.0) is satisfied by peewee (>=3.13, <1.0)
   1: ! which is caused by "pocketutils depends on peewee (>=3.13, <1.0)"
   1: ! thus: version solving failed
   1: Version solving took 0.080 seconds.
   1: Tried 1 solutions.

[SolverProblemError]
Because pocketutils depends on both peewee (>=3.13, <1.0) and peewee (>=3.13, <1.0), version solving failed.

Traceback (most recent call last):
  File "c:\programdata\miniconda3\envs\fish\lib\site-packages\clikit\console_application.py", line 131, in run
    status_code = command.handle(parsed_args, io)
  File "c:\programdata\miniconda3\envs\fish\lib\site-packages\clikit\api\command\command.py", line 120, in handle
    status_code = self._do_handle(args, io)
  File "c:\programdata\miniconda3\envs\fish\lib\site-packages\clikit\api\command\command.py", line 171, in _do_handle
    return getattr(handler, handler_method)(args, io, self)
  File "c:\programdata\miniconda3\envs\fish\lib\site-packages\cleo\commands\command.py", line 92, in wrap_handle
    return self.handle()
  File "c:\programdata\miniconda3\envs\fish\lib\site-packages\poetry\console\commands\lock.py", line 28, in handle
    return installer.run()
  File "c:\programdata\miniconda3\envs\fish\lib\site-packages\poetry\installation\installer.py", line 74, in run
    self._do_install(local_repo)
  File "c:\programdata\miniconda3\envs\fish\lib\site-packages\poetry\installation\installer.py", line 161, in _do_install
    ops = solver.solve(use_latest=self._whitelist)
  File "c:\programdata\miniconda3\envs\fish\lib\site-packages\poetry\puzzle\solver.py", line 36, in solve
    packages, depths = self._solve(use_latest=use_latest)
  File "c:\programdata\miniconda3\envs\fish\lib\site-packages\poetry\puzzle\solver.py", line 190, in _solve
    raise SolverProblemError(e)
finswimmer commented 4 years ago

Hello @dmyersturnbull,

there are some mistakes in your pyproject.toml here:

PyMySQL                  = {version=">=0.10, <1.0", optional=true}
peewee                   = {version=">=3.13, <1.0", optional=true}
sshtunnel                = {version="0.13, <1.0", optional=true}

You are saying the peewee version must be greater >=3.13 and smaller <1.0. Both criteria cannot be valid at the same time.

Furthermore the sshtunnel version must be exact 0.13 and smaller 1.0. While this can be valid, the current version of sshtunnel is 0.1.5. So poetry will fail here as well.

Also you have specified tomlkit twice as a dependency.

fin swimmer

dmyersturnbull commented 4 years ago

Oh wow, I have no idea how I didn't notice that. Thanks.

github-actions[bot] commented 8 months ago

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.