bswck / proxyvars

Create type-safe, context-dependent proxy objects. Inspired by werkzeug's LocalProxy
https://bswck.github.io/proxyvars/
MIT License
3 stars 1 forks source link

Problem install on python 3.12 #11

Open heckad opened 9 months ago

heckad commented 9 months ago
>>> poetry add proxyvars                                                                                                                                                                                                                              
Using version ^0.9.1 for proxyvars

Updating dependencies
Resolving dependencies... (0.0s)

The current project's supported Python range (>=3.12,<4.0) is not compatible with some of the required packages Python requirement:
  - proxyvars requires Python >=3.8,<=3.12, so it will not be satisfied for Python >3.12,<4.0

Because no versions of proxyvars match >0.9.1,<0.10.0
 and proxyvars (0.9.1) requires Python >=3.8,<=3.12, proxyvars is forbidden.
So, because foo-project depends on proxyvars (^0.9.1), version solving failed.

  • Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties

    For proxyvars, a possible solution would be to set the `python` property to "3.12"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers
bswck commented 9 months ago

Thank you for this report. I admit that some skeleton downstream projects are not that much associated with version-specific language features, and thus may be relaxed to allow yet unstable versions of the language. The issue should be addressed at the infrastructure level in the project skeleton, and the fix should be applied among all downstream projects, including this one.

This will be fixed in v1.0.0, a release that enters into semver and primarily values stability.

As a workaround for the installation problem now, you might want to either (1) set your Python version in [tool.poetry.dependencies] to never exceed the latest Python 3.12, e.g. python = ">=3.8,<3.13" or (2) in [tool.poetry.dependencies], add the line proxyvars = { version = "^0.9.1", python = ">=3.8,<3.13" } to only install proxyvars on Python <3.13. The latter option will break your project Python 3.13+ provided proxyvars is its hard dependency, so I would recommend the first one until a fix in the proxyvars metadata is released.

bswck commented 9 months ago

As I can see, the Python spec is incorrectly set to <=3.12 which I think only allows 3.12.0 as a maximum version. Making a quick release to set it to <3.13. It was fixed in other projects, this one remained.

bswck commented 9 months ago

v0.9.2 released. The suggested temporary workarounds should work. Please hang on until a ready-for-production v1.0.0 is released, and the >=3.8,<4.0 range will be allowed!

bswck commented 9 months ago

v1.0.0 should come out in April.