Thanks to visit codestin.com
Credit goes to github.com

Skip to content

14487 fix contributing first steps - #14492

Merged
JukkaL merged 6 commits into
python:masterfrom
aless10:14487-fix-contributing-first-steps
Jan 23, 2023
Merged

14487 fix contributing first steps#14492
JukkaL merged 6 commits into
python:masterfrom
aless10:14487-fix-contributing-first-steps

Conversation

@aless10

@aless10 aless10 commented Jan 21, 2023

Copy link
Copy Markdown
Contributor

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

Comment thread mypy-requirements.txt Outdated
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
Copy Markdown
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).

Comment thread CONTRIBUTING.md Outdated
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
Copy Markdown
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.

Comment thread test-requirements.txt Outdated
py>=1.5.2
setuptools>=65.5.1
six
tomli>=1.1.0; python_version<'3.12'

Copy link
Copy Markdown
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.

@JukkaL JukkaL left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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