Skip to content

Commit

Permalink
Declare support for Python 3.13
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 704381933
  • Loading branch information
oprypin authored and copybara-github committed Dec 9, 2024
1 parent f9f47ec commit 892d3ca
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
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"]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
Expand Down
3 changes: 3 additions & 0 deletions absl/testing/tests/parameterized_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,9 @@ def test_successful_execution(self):
self.assertEqual(2, res.testsRun)
self.assertTrue(res.wasSuccessful())

@unittest.skipIf(
sys.version_info >= (3, 13), 'makeSuite was removed in Python 3.13'
)
def test_metaclass_side_effects(self):
ts = unittest.makeSuite(self.MyParams, suiteClass=self.MySuite)

Expand Down
6 changes: 4 additions & 2 deletions absl/testing/tests/xml_reporter_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,16 @@ def xml_escaped_exception_type(exception_type):
FAILURE_MESSAGE = r"""
<failure message="e" type="{}"><!\[CDATA\[Traceback \(most recent call last\):
File ".*xml_reporter_test\.py", line \d+, in get_sample_failure
self.fail\(\'e\'\)
self.fail\(\'e\'\)(
~~~~~~~~~\^\^\^\^\^)?
AssertionError: e
\]\]></failure>""".format(xml_escaped_exception_type(AssertionError))

ERROR_MESSAGE = r"""
<error message="invalid&#x20;literal&#x20;for&#x20;int\(\)&#x20;with&#x20;base&#x20;10:&#x20;(&apos;)?a(&apos;)?" type="{}"><!\[CDATA\[Traceback \(most recent call last\):
File ".*xml_reporter_test\.py", line \d+, in get_sample_error
int\('a'\)
int\('a'\)(
~~~\^\^\^\^\^)?
ValueError: invalid literal for int\(\) with base 10: '?a'?
\]\]></error>""".format(xml_escaped_exception_type(ValueError))

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
'License :: OSI Approved :: Apache Software License',
Expand Down

0 comments on commit 892d3ca

Please sign in to comment.