PyCQA / isort

A Python utility / library to sort imports.
https://pycqa.github.io/isort/
MIT License
6.49k stars 580 forks source link

Release new versions of example projects #1915

Open ucodery opened 2 years ago

ucodery commented 2 years ago

The versions on pypi.org have not kept up to date with what is in the project, and neither has isort's pyproject.toml. This currently blocks updating the lock file:

SolverProblemError

  The current project's Python requirement (>=3.6.2) is not compatible with some of the required packages Python requirement:
    - example-isort-sorting-plugin requires Python >=3.6,<4.0, so it will not be satisfied for Python >=4.0

  Because example-isort-sorting-plugin (0.0.3) requires Python >=3.6,<4.0
   and no versions of example-isort-sorting-plugin match >0.0.3,<0.0.4, example-isort-sorting-plugin is forbidden.
  So, because isort depends on example_isort_sorting_plugin (^0.0.3), version solving failed.

because of #1877

I would like to apply this diff, but can't as poetry then complains that the specified dependency doesn't match any versions.

diff --git a/pyproject.toml b/pyproject.toml
index ec7c16ad..afb3128b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -82,8 +83,8 @@ pip-shims = "^0.5.2"
 smmap2 = "^3.0.1"
 gitdb2 = "^4.0.2"
 httpx = "^0.13.3"
-example_shared_isort_profile = "^0.0.1"
-example_isort_sorting_plugin = "^0.0.3"
+example_shared_isort_profile = "^0.0.2"
+example_isort_sorting_plugin = "^0.0.5"
 flake8 = "^3.8.4"
 hypothesis = "^6.10.1"
 libcst = "^0.3.18"
ucodery commented 2 years ago

The change to isort's python dependency seems to have really messed up the ability to do a poetry update. I'm not sure how a new lock file was generated for #1877 but if I clear poetry's cache and then run a poetry update it won't solve because requirements of isort also declare python dependency with a caret range and, as noted in that issue, poetry does not allow mixing greater-than and caret ranges, even when they overlap.

Besides all the example isort project (actually all three need adjusted), the following won't solve with isort's dependency on python>=3.6:

As an infrequent user of poetry maybe I am missing something, but seems that either isort needs to restore the ^3.6 or drop some of these requirements.