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

Add py313-dev and pypy3.10 to CI #802

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12-dev", "pypy-3.9"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev", "pypy-3.9", "pypy-3.10"]
os: [ubuntu-latest]
# Include minimum py3 + maximum py3 + pypy3 on Windows
include:
- { os: "windows-latest" , python-version: "3.8" }
- { os: "windows-latest" , python-version: "3.11" }
- { os: "windows-latest" , python-version: "pypy-3.9" }
- { os: "windows-latest" , python-version: "3.12" }
- { os: "windows-latest" , python-version: "pypy-3.10" }

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
23 changes: 14 additions & 9 deletions pyflakes/test/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,10 @@ def evaluate(source):
self.fail()

with self.makeTempFile(source) as sourcePath:
if PYPY:
message = 'end of file (EOF) while scanning triple-quoted string literal'
elif sys.version_info >= (3, 10):
if sys.version_info >= (3, 10):
message = 'unterminated triple-quoted string literal (detected at line 8)' # noqa: E501
elif PYPY:
message = 'end of file (EOF) while scanning triple-quoted string literal'
else:
message = 'invalid syntax'

Expand All @@ -430,10 +430,10 @@ def test_eofSyntaxError(self):
syntax error reflects the cause for the syntax error.
"""
with self.makeTempFile("def foo(") as sourcePath:
if PYPY:
msg = 'parenthesis is never closed'
elif sys.version_info >= (3, 10):
if sys.version_info >= (3, 10):
msg = "'(' was never closed"
elif PYPY:
msg = 'parenthesis is never closed'
else:
msg = 'unexpected EOF while parsing'

Expand Down Expand Up @@ -611,9 +611,14 @@ def test_misencodedFileUTF8(self):
x = "%s"
""" % SNOWMAN).encode('utf-8')
with self.makeTempFile(source) as sourcePath:
self.assertHasErrors(
sourcePath,
[f"{sourcePath}:1:1: 'ascii' codec can't decode byte 0xe2 in position 21: ordinal not in range(128)\n"]) # noqa: E501
if PYPY and sys.version_info >= (3, 10):
prefix = f"{sourcePath}:1:"
else:
prefix = f"{sourcePath}:1:1:"
error = f"{prefix} 'ascii' codec can't decode byte 0xe2 in position 21: ordinal not in range(128)\n" # noqa: E501
if PYPY and sys.version_info >= (3, 10):
error += "# coding: ascii\n"
self.assertHasErrors(sourcePath, [error])

def test_misencodedFileUTF16(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ skip_missing_interpreters = True
envlist = py,pypy3

[testenv]
deps = flake8==6.1.0
deps = flake8==7.0.0
setenv = PYFLAKES_ERROR_UNKNOWN=1
commands =
python --version --version
Expand Down