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

Specify minimum Python version #1

Closed
mc-mario opened this issue Feb 28, 2023 · 1 comment
Closed

Specify minimum Python version #1

mc-mario opened this issue Feb 28, 2023 · 1 comment

Comments

@mc-mario
Copy link
Contributor

Good morning!

I tried running the tests but I was getting the following error;

  File "/Users/-/GitHub/myPyllant/tests/generate_test_data.py", line 31, in main
    from myPyllant.api import API_URL_BASE, MyPyllantAPI
  File "/Users/-/GitHub/myPyllant/src/myPyllant/api.py", line 10, in <module>
    from myPyllant.models import (
  File "/Users/-/GitHub/myPyllant/src/myPyllant/models.py", line 58, in <module>
    class Zone(BaseModel):
  File "/Users/-/GitHub/myPyllant/src/myPyllant/models.py", line 69, in Zone
    humidity: float | None
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

After some digging I found this is due to | operator being a Python 3.10 feature, and I was running it with Python 3.9 (as hinted here in the setup.cfg)

Do you mind specifying the supported Python version somewhere?

Very cool project!

@mc-mario mc-mario changed the title Specify minimum Python ersion Specify minimum Python version Feb 28, 2023
@signalkraft
Copy link
Owner

Thanks, I added a note in the README and changed the two remaining places where 3.9 was mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants