Skip to content

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

Merged
merged 6 commits into from
Jan 23, 2023

Conversation

aless10
Copy link
Contributor

@aless10 aless10 commented Jan 21, 2023

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 the mypy_self_check.ini file).

Open Source Saturday

@@ -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'
Copy link
Collaborator

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.*
Copy link
Collaborator

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.

@@ -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'
Copy link
Member

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?

@github-actions

This comment has been minimized.

Copy link
Collaborator

@JukkaL JukkaL left a 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.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JukkaL JukkaL merged commit 77f8725 into python:master Jan 23, 2023
@aless10 aless10 deleted the 14487-fix-contributing-first-steps branch January 23, 2023 15:49
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

Successfully merging this pull request may close these issues.

python3 runtests.py fails if python version == 3.11
3 participants