cloudevents / sdk-python

Python SDK for CloudEvents
https://pypi.org/p/cloudevents/
Apache License 2.0
266 stars 53 forks source link

Invalid constraint error #203

Closed mkonterS closed 1 year ago

mkonterS commented 1 year ago

Expected Behavior

Installing cloudevents with poetry does not raise an error.

Actual Behavior

$ poetry lock
Updating dependencies
Resolving dependencies... (0.1s)Invalid constraint (pydantic (>=1.0.0<1.9.0) ; (python_version <= "3.6") and extra == 'pydantic') found in cloudevents-1.7.0 dependencies, skipping
Invalid constraint (pydantic (>=1.0.0<2.0) ; (python_version > "3.6") and extra == 'pydantic') found in cloudevents-1.7.0 dependencies, skipping
Resolving dependencies... (0.2s)

Writing lock file

Note that this only recently popped up when I upgraded from Poetry 1.1.15 to 1.2.2. However they reported that this package is faulty since they only changed the behavior to show this error: https://github.com/python-poetry/poetry/issues/7065

Steps to Reproduce the Problem

  1. Use the following pyproject.toml:
    
    [tool.poetry]
    name = "showcase"
    version = "0.1.0"
    description = ""
    authors = ["Your Name <you@example.com>"]
    readme = "README.md"

[tool.poetry.dependencies] python = "^3.10" cloudevents = "^1.7.0"

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


2. Use Python `3.10.8` and Poetry `1.2.2`
3. Run `poetry lock`

## Specifications

- Platform: `Linux delta 5.15.79-1-lts #1 SMP Wed, 16 Nov 2022 11:03:21 +0000 x86_64 GNU/Linux`
- Python Version: `3.10.8`
- Poetry Version: `1.2.2`
xSAVIKx commented 1 year ago

OK, so with poetry 1.2.0 it works without any issues.

mkonterS commented 1 year ago

Thanks a lot for the quick fix. I am using version 1.6.3 now and it's working fine :ok_hand: