Skip to content

Commit 1f131d1

Browse files
authored
Merge pull request #3481 from hugovk/add-3.13
Add support for Python 3.13
2 parents 22c2cff + c8abbb3 commit 1f131d1

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

.github/workflows/pythonpackage.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ jobs:
66
build:
77
runs-on: ${{ matrix.os }}
88
strategy:
9+
fail-fast: false
910
matrix:
1011
os: [windows-latest, ubuntu-latest, macos-latest]
11-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
12+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
1213
include:
1314
- { os: ubuntu-latest, python-version: "3.7" }
1415
- { os: windows-latest, python-version: "3.7" }
@@ -22,6 +23,7 @@ jobs:
2223
uses: actions/setup-python@v5
2324
with:
2425
python-version: ${{ matrix.python-version }}
26+
allow-prereleases: true
2527
- name: Install and configure Poetry
2628
# TODO: workaround for https://github.com/snok/install-poetry/issues/94
2729
uses: snok/install-poetry@v1.3.4

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Fixed
1111

12+
- Added support for Python 3.13 https://github.com/Textualize/rich/pull/3481
1213
- Fixed infinite loop when appending Text to same instance https://github.com/Textualize/rich/pull/3480
1314

1415
## [13.8.0] - 2024-08-26

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ classifiers = [
2121
"Programming Language :: Python :: 3.10",
2222
"Programming Language :: Python :: 3.11",
2323
"Programming Language :: Python :: 3.12",
24+
"Programming Language :: Python :: 3.13",
2425
"Typing :: Typed",
2526
]
2627
include = ["rich/py.typed"]

tests/test_pretty.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,10 @@ class Foo:
668668
del foo.bar
669669
result = pretty_repr(foo)
670670
print(repr(result))
671-
expected = "Foo(bar=AttributeError(\"'Foo' object has no attribute 'bar'\"))"
671+
if sys.version_info >= (3, 13):
672+
expected = "Foo(\n bar=AttributeError(\"'tests.test_pretty.test_attrs_broken_310.<locals>.Foo' object has no attribute 'bar'\")\n)"
673+
else:
674+
expected = "Foo(bar=AttributeError(\"'Foo' object has no attribute 'bar'\"))"
672675
assert result == expected
673676

674677

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ minversion = 4.0.0
33
envlist =
44
lint
55
docs
6-
py{37,38,39,310,311}
6+
py{37,38,39,310,311,312,313}
77
isolated_build = True
88

99
[testenv]

0 commit comments

Comments
 (0)