Skip to content

Commit

Permalink
Merge pull request #3481 from hugovk/add-3.13
Browse files Browse the repository at this point in the history
Add support for Python 3.13
  • Loading branch information
willmcgugan authored Sep 9, 2024
2 parents 22c2cff + c8abbb3 commit 1f131d1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
include:
- { os: ubuntu-latest, python-version: "3.7" }
- { os: windows-latest, python-version: "3.7" }
Expand All @@ -22,6 +23,7 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install and configure Poetry
# TODO: workaround for https://github.com/snok/install-poetry/issues/94
uses: snok/install-poetry@v1.3.4
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

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

## [13.8.0] - 2024-08-26
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
]
include = ["rich/py.typed"]
Expand Down
5 changes: 4 additions & 1 deletion tests/test_pretty.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,10 @@ class Foo:
del foo.bar
result = pretty_repr(foo)
print(repr(result))
expected = "Foo(bar=AttributeError(\"'Foo' object has no attribute 'bar'\"))"
if sys.version_info >= (3, 13):
expected = "Foo(\n bar=AttributeError(\"'tests.test_pretty.test_attrs_broken_310.<locals>.Foo' object has no attribute 'bar'\")\n)"
else:
expected = "Foo(bar=AttributeError(\"'Foo' object has no attribute 'bar'\"))"
assert result == expected


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 @@ minversion = 4.0.0
envlist =
lint
docs
py{37,38,39,310,311}
py{37,38,39,310,311,312,313}
isolated_build = True

[testenv]
Expand Down

0 comments on commit 1f131d1

Please sign in to comment.