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

Declare support for Python 3.13 #314

Merged
merged 1 commit into from
Dec 11, 2024
Merged
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
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
5 changes: 4 additions & 1 deletion absl/flags/tests/argparse_flags_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ def test_help_main_module_flags(self):
# Only the short name is shown in the usage string.
self.assertIn('[-s ABSL_STRING]', help_message)
# Both names are included in the options section.
self.assertIn('-s ABSL_STRING, --absl_string ABSL_STRING', help_message)
if sys.version_info >= (3, 13):
self.assertIn(' -s, --absl_string ABSL_STRING', help_message)
else:
self.assertIn(' -s ABSL_STRING, --absl_string ABSL_STRING', help_message)
# Verify help messages.
self.assertIn('help for --absl_string=%.', help_message)
self.assertIn('<apple|orange>: help for --absl_enum.', help_message)
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
Loading