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 issues: Version requirement for sphinx / sphinx-autodoc-typehints #39

Open
tony opened this issue Mar 13, 2022 · 0 comments
Open
Assignees
Labels
bug Something isn't working stale

Comments

@tony
Copy link

tony commented Mar 13, 2022

@domdfcoding thank you for this project / organization!

Description

Issue installing through poetry package maanger

Steps to Reproduce

[tool.poetry.dev-dependencies]
sphinx = "*"
sphinx-autodoc-typehints = "~1.17.0"
sphinx-autofixture = "~0.2.3"

Actual result:

poetry update sphinx-autofixture
Updating dependencies
Resolving dependencies... (1.5s)

  SolverProblemError

  Because no versions of sphinx-autofixture match >0.2.3,<0.3.0
   and sphinx-autofixture (0.2.3) depends on sphinx (>=3.0.3,<3.4.0), sphinx-autofixture (>=0.2.3,<0.3.0) requires sphinx (>=3.0.3,<3.4.0).
  And because sphinx-autodoc-typehints (1.17.0) depends on Sphinx (>=4)
   and no versions of sphinx-autodoc-typehints match >1.17.0,<1.18.0, sphinx-autofixture (>=0.2.3,<0.3.0) is incompatible with sphinx-autodoc-typehints (>=1.17.0,<1.18.0).
  So, because tmuxp depends on both sphinx-autodoc-typehints (~1.17.0) and sphinx-autofixture (~0.2.3), version solving failed.

  at .venv/lib/python3.10/site-packages/poetry/puzzle/solver.py:241 in _solve
      237│             packages = result.packages
      238│         except OverrideNeeded as e:
      239│             return self.solve_in_compatibility_mode(e.overrides, use_latest=use_latest)
      240│         except SolveFailure as e:
    → 241│             raise SolverProblemError(e)
      242│
      243│         results = dict(
      244│             depth_first_search(
      245│                 PackageNode(self._package, packages), aggregate_package_nodes

Expected result:

I don't know of a best practice. My hope is this:

  • Keeping constraints to the minimum required version, or
  • perhaps relaxing them entirely

and letting it error on runtime

Reproduces how often:

Easy reproduced if you use a system with lockfiles

Version

  • Operating System: WSL, Ubuntu 20.04 / focal
  • Python: 3.10
  • sphinx-autofixture: 0.2.3
  • sphinx: 4.3.2
  • sphinx-autodoc-typehints: 1.17.0

Installation source

PyPI, via poetry

Other Additional Information:

  • sphinx updates major releases more often these days
  • sphinx extensions may be non-breaking (more often that not)
  • packaging lock systems are becoming more ubiquitous
  • May be worth it to let Matrix builds in CI handle checking against version of required packages to fuzz for errors
@tony tony added the bug Something isn't working label Mar 13, 2022
tony added a commit to tmux-python/tmuxp that referenced this issue Mar 13, 2022
@stale stale bot added the stale label Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants