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

Update pos-only unit tests for Python 3.10.7 #13660

Merged
merged 4 commits into from Sep 14, 2022

Conversation

AlexWaygood
Copy link
Member

Description

The CI has started to sporadically fail depending on whether 3.10.6 is picked up by GitHub Actions (okay) or 3.10.7 (not okay). For example:

On Python 3.10.7 (but not on Python 3.10.6), mypy correctly rejects using PEP 570 syntax unless --python-version is set to 3.8 or higher (this is due to python/cpython#95935). However, this makes several unit tests fail.

This PR updates those unit tests so that the CI passes on both 3.10.6 and 3.10.7

Copy link
Collaborator

@hauntsaninja hauntsaninja 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! Although maybe check-python38 should automatically set --python-version 3.8? Eh, this is fine and tests automagically setting flags has tripped me up before

@hauntsaninja
Copy link
Collaborator

(looks like CI is running with 3.10.6 so I'm just gonna trust that you got everything)

@AlexWaygood
Copy link
Member Author

Thanks for fixing! Although maybe check-python38 should automatically set --python-version 3.8? Eh, this is fine and tests automagically setting flags has tripped me up before

It surprised me that it didn't! But also it's consistent with check-dataclasses, which laboriously sets --python-version 3.7 for every single test. So, yeah -- big "meh", seems fine ;)

@AlexWaygood
Copy link
Member Author

(looks like CI is running with 3.10.6 so I'm just gonna trust that you got everything)

I fixed all the ones I found in failing CI runs, but then I just tried upgrading to Python 3.10.7 locally, and I found a bunch more 🤷‍♂️. I've just updated the PR to fix those as well.

@hauntsaninja hauntsaninja merged commit 1df4ac2 into python:master Sep 14, 2022
@AlexWaygood AlexWaygood deleted the pep-570 branch September 14, 2022 08:34
cdce8p pushed a commit to cdce8p/mypy that referenced this pull request Sep 14, 2022
…#13660)

The CI has started to sporadically fail depending on whether 3.10.6 is
picked up by GitHub Actions (okay) or 3.10.7 (not okay). For example:

- https://github.com/python/mypy/actions/runs/3046671132/jobs/4909772702
- https://github.com/python/mypy/actions/runs/3046723692/jobs/4909887963

On Python 3.10.7 (but not on Python 3.10.6), mypy correctly rejects
using PEP 570 syntax unless `--python-version` is set to 3.8 or higher
(this is due to python/cpython#95935). However,
this makes several unit tests fail.

This PR updates those unit tests so that the CI passes on both 3.10.6
and 3.10.7
hauntsaninja pushed a commit that referenced this pull request Sep 14, 2022
#13665)

Backport #13660 to fix test issues with Python 3.10.7.
https://github.com/python/mypy/actions/runs/3046723692/jobs/4909887963

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
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.

None yet

2 participants