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

[bug] mypy global python version too old #3276

Closed
cyianor opened this issue Oct 5, 2023 · 1 comment · Fixed by #3278
Closed

[bug] mypy global python version too old #3276

cyianor opened this issue Oct 5, 2023 · 1 comment · Fixed by #3278
Labels
Milestone

Comments

@cyianor
Copy link
Contributor

cyianor commented Oct 5, 2023

Problem description

I forked pyro from the dev branch at 01ccf36 and installed all dependencies with make install as in CONTRIBUTING.md. I also needed to manually install ruff and mypy to be able run make format and make lint.

During make lint I encountered the following error

mypy --install-types --non-interactive pyro scripts
/Users/xxx/.pyenv/versions/3.11.5/lib/python3.11/site-packages/numpy/_typing/_nested_sequence.py:60: error: Positional-only parameters are only supported in Python 3.8 and greater  [syntax]
Found 1 error in 1 file (errors prevented further checking)
make: *** [lint] Error 2

I saw that in setup.cfg it says that python_version = 3.7 which seems to be the problem. As soon as I change this to python_version = 3.8 all works as expected.

I assume that pyro is still meant to be usable with Python 3.7 and that is why this line is there? However, linting will then always fail when performed with newer versions of Python.

Setup

macOS 13.6
Python 3.11.5
mypy 1.5.1
numpy 1.26.0

@fritzo fritzo added the bug label Oct 5, 2023
@fritzo fritzo added this to the 1.9 release milestone Oct 5, 2023
@fritzo
Copy link
Member

fritzo commented Oct 5, 2023

Sounds like a good reason to bump our Python version, as previously recommended by @ordabayevy

@ordabayevy ordabayevy linked a pull request Oct 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants