-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
14487 fix contributing first steps #14492
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
14487 fix contributing first steps #14492
Conversation
mypy-requirements.txt
Outdated
@@ -2,4 +2,4 @@ | |||
typing_extensions>=3.10 | |||
mypy_extensions>=0.4.3 | |||
typed_ast>=1.4.0,<2; python_version<'3.8' | |||
tomli>=1.1.0; python_version<'3.11' | |||
tomli>=1.1.0; python_version<'3.12' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only want to install tomli on Python 3.11 if we are running tests, so this should only be added to test-requirements.txt
for Python 3.11 and later. If you change mypy-requirements.txt
, tomli will always be installed, even though it's unnecessary for running mypy (it's only needed for self check and compilation).
CONTRIBUTING.md
Outdated
@@ -50,6 +50,8 @@ like this: | |||
``` | |||
python3 runtests.py | |||
``` | |||
*Please note that the python version used here is ``3.7``. This is due to the fact that we want to always type check in 3.7 mode to make sure we don't use any features from more recent Python versions.* | |||
*You can change this in the ``mypy_self_check.ini`` file.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we should change CONTRIBUTING.md
. If the dependencies are set up correctly, things should just work, and these additions are unnecessary detail. I don't think that changing the version is part of a normal workflow -- it should only be needed when dropping support for a Python version that has reached its end of life, and that's not something we need to document here.
test-requirements.txt
Outdated
@@ -17,3 +17,4 @@ pytest-cov>=2.10.0 | |||
py>=1.5.2 | |||
setuptools>=65.5.1 | |||
six | |||
tomli>=1.1.0; python_version<'3.12' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why only below 3.12?
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this! It makes getting started developing smoother.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Fixes #14487
(Explain how this PR changes mypy.)
This PR would like to explicit the fact that when you follow the steps in the Contributing Guidelines and you run the command that runs the tests, the python version is
3.7
(set in themypy_self_check.ini
file).