Skip to content

Commit d8141b5

Browse files
samuelcolvinclaude
andauthored
3.15 support (#173)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
1 parent cfea217 commit d8141b5

5 files changed

Lines changed: 12 additions & 38 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
fail-fast: false
6262
matrix:
6363
os: [ubuntu-latest, macos-latest, windows-latest]
64-
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
64+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.15']
6565

6666
runs-on: ${{ matrix.os }}
6767

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# python devtools
22

3-
[![CI](https://github.com/samuelcolvin/python-devtools/workflows/CI/badge.svg?event=push)](https://github.com/samuelcolvin/python-devtools/actions?query=event%3Apush+branch%3Amain+workflow%3ACI)
3+
[![CI](https://img.shields.io/github/actions/workflow/status/samuelcolvin/python-devtools/ci.yml?branch=main&logo=github&label=CI)](https://github.com/samuelcolvin/python-devtools/actions?query=event%3Apush+branch%3Amain+workflow%3ACI)
44
[![Coverage](https://coverage-badge.samuelcolvin.workers.dev/samuelcolvin/python-devtools.svg)](https://coverage-badge.samuelcolvin.workers.dev/redirect/samuelcolvin/python-devtools)
55
[![pypi](https://img.shields.io/pypi/v/devtools.svg)](https://pypi.python.org/pypi/devtools)
66
[![versions](https://img.shields.io/pypi/pyversions/devtools.svg)](https://github.com/samuelcolvin/python-devtools)

‎docs/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Python devtools
22

3-
[![CI](https://github.com/samuelcolvin/python-devtools/workflows/CI/badge.svg?event=push)](https://github.com/samuelcolvin/python-devtools/actions?query=event%3Apush+branch%3Amain+workflow%3ACI)
3+
[![CI](https://img.shields.io/github/actions/workflow/status/samuelcolvin/python-devtools/ci.yml?branch=main&logo=github&label=CI)](https://github.com/samuelcolvin/python-devtools/actions?query=event%3Apush+branch%3Amain+workflow%3ACI)
44
[![Coverage](https://coverage-badge.samuelcolvin.workers.dev/samuelcolvin/python-devtools.svg)](https://coverage-badge.samuelcolvin.workers.dev/redirect/samuelcolvin/python-devtools)
55
[![pypi](https://img.shields.io/pypi/v/devtools.svg)](https://pypi.python.org/pypi/devtools)
66
[![versions](https://img.shields.io/pypi/pyversions/devtools.svg)](https://github.com/samuelcolvin/python-devtools)

‎pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ classifiers = [
2727
'Programming Language :: Python :: 3.12',
2828
'Programming Language :: Python :: 3.13',
2929
'Programming Language :: Python :: 3.14',
30+
'Programming Language :: Python :: 3.15',
3031
'Topic :: Software Development :: Libraries :: Python Modules',
3132
'Topic :: Internet',
3233
'Typing :: Typed',

‎tests/test_prettier.py‎

Lines changed: 8 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import ast
22
import os
33
import string
4-
import sys
54
from collections import Counter, OrderedDict
65
from collections.abc import Iterator
76
from dataclasses import dataclass
@@ -456,40 +455,14 @@ class User(SQLAlchemyBase):
456455
)
457456

458457

459-
@pytest.mark.skipif(sys.version_info < (3, 9), reason='no indent on older versions')
460458
def test_ast_expr():
461-
if sys.version_info >= (3, 13):
462-
# ast.dump omits empty lists from 3.13 onwards
463-
expected = (
464-
'Expression('
465-
'\n body=Call('
466-
"\n func=Name(id='print', ctx=Load()),"
467-
'\n args=['
468-
'\n Constant(value=1),'
469-
'\n Constant(value=2),'
470-
'\n Call('
471-
"\n func=Name(id='round', ctx=Load()),"
472-
'\n args=['
473-
'\n Constant(value=3)])]))'
474-
)
475-
else:
476-
expected = (
477-
'Expression('
478-
'\n body=Call('
479-
"\n func=Name(id='print', ctx=Load()),"
480-
'\n args=['
481-
'\n Constant(value=1),'
482-
'\n Constant(value=2),'
483-
'\n Call('
484-
"\n func=Name(id='round', ctx=Load()),"
485-
'\n args=['
486-
'\n Constant(value=3)],'
487-
'\n keywords=[])],'
488-
'\n keywords=[]))'
489-
)
490-
assert pformat(ast.parse('print(1, 2, round(3))', mode='eval')) == expected
491-
492-
493-
@pytest.mark.skipif(sys.version_info < (3, 9), reason='no indent on older versions')
459+
node = ast.parse('print(1, 2, round(3))', mode='eval')
460+
v = pformat(node)
461+
# exactly which fields ast.dump omits changes between python versions, so compare to its own output
462+
assert v == ast.dump(node, indent=4)
463+
assert v.startswith('Expression(\n body=Call(\n func=Name(')
464+
assert '\n Constant(value=3)' in v
465+
466+
494467
def test_ast_module():
495468
assert pformat(ast.parse('print(1, 2, round(3))')).startswith('Module(\n body=[')

0 commit comments

Comments
 (0)