Skip to content

Commit

Permalink
Add support for python 3.13 (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
mauvilsa committed Sep 11, 2024
1 parent 9919b35 commit d901a1f
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
9 changes: 8 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
root: .
paths:
- ./coverage_*.xml
# test-py313:
# <<: *test-py38
# docker:
# - image: cimg/python:3.13
test-py312:
<<: *test-py38
docker:
Expand Down Expand Up @@ -101,7 +105,7 @@ jobs:
command: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
for py in 3.7 3.8 3.9 3.10 3.11 3.12; do
for py in 3.7 3.8 3.9 3.10 3.11 3.12 3.13; do
for suffix in "" _all _types _pydantic1 _pydantic2; do
if [ -f coverage_py${py}${suffix}.xml ]; then
./codecov \
Expand Down Expand Up @@ -152,6 +156,8 @@ workflows:
only: /^v\d+\.\d+\.\d+.*$/
- test-py38:
<<: *buildreq
# - test-py313:
# <<: *buildreq
- test-py312:
<<: *buildreq
- test-py311:
Expand All @@ -166,6 +172,7 @@ workflows:
<<: *buildreq
- codecov:
requires:
# - test-py313
- test-py312
- test-py311
- test-py310
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: [3.7, 3.8, 3.9, "3.10", 3.11, 3.12]
python: [3.7, 3.8, 3.9, "3.10", 3.11, 3.12, 3.13]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ The semantic versioning only considers the public API as described in
paths are considered internals and can change in minor and patch releases.


v4.32.2 (2024-09-??)
v4.33.0 (2024-09-??)
--------------------

Added
^^^^^
- Support for Python 3.13.

Fixed
^^^^^
- Callable type with subclass return not showing the ``--*.help`` option (`#567
Expand Down
2 changes: 1 addition & 1 deletion jsonargparse_tests/test_formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_help_action_config_file(parser):
parser.add_argument("-c", "--cfg", help="Config in yaml/json.", action="config")
help_str = get_parser_help(parser)
assert "ARG: --print_config" in help_str
assert "ARG: -c CFG, --cfg CFG" in help_str
assert "ARG: -c CFG, --cfg CFG" in help_str or "ARG: -c, --cfg CFG" in help_str
assert "ENV: APP_CFG" in help_str
assert "Config in yaml/json." in help_str
assert "APP_PRINT_CONFIG" not in help_str
Expand Down
2 changes: 1 addition & 1 deletion jsonargparse_tests/test_stubs_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def test_get_params_classmethod():
expected = expected[:4] + ["compresslevel"] + expected[4:]
assert expected == get_param_names(params)[: len(expected)]
if sys.version_info >= (3, 10):
assert all(p.annotation is not inspect._empty for p in params if p.name != "compresslevel")
assert all(p.annotation is not inspect._empty for p in params if p.name not in {"compresslevel", "stream"})
with mock_typeshed_client_unavailable():
params = get_params(TarFile, "open")
assert expected == get_param_names(params)[: len(expected)]
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
Expand Down Expand Up @@ -56,7 +57,8 @@ jsonschema = [
]
jsonnet = [
"jsonnet>=0.13.0; os_name == 'posix'",
"jsonnet-binary>=0.17.0; os_name != 'posix'",
"jsonnet-binary>=0.17.0; os_name != 'posix' and python_version < '3.13'",
"jsonnet @ https://github.com/google/jsonnet/zipball/master ; os_name != 'posix' and python_version == '3.13'",
]
urls = [
"requests>=2.18.4",
Expand Down Expand Up @@ -190,7 +192,7 @@ Villegas = "Villegas"
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py{37,38,39,310,311,312}-{all,no}-extras,omegaconf
envlist = py{37,38,39,310,311,312,313}-{all,no}-extras,omegaconf
skip_missing_interpreters = true
[testenv]
Expand Down

0 comments on commit d901a1f

Please sign in to comment.