Skip to content

Commit 3d07534

Browse files
committed
Add support for Python 3.13
1 parent f0514ed commit 3d07534

File tree

7 files changed

+35
-9
lines changed

7 files changed

+35
-9
lines changed

.github/workflows/run-tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest]
19-
version: ['3.8', '3.9', '3.10', '3.11', '3.12']
19+
version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
2020
include:
2121
- version: '3.8'
2222
tox-env: py38,py38-mypy,py38-lint,safety
@@ -28,6 +28,8 @@ jobs:
2828
tox-env: py311,py311-mypy,py311-lint,safety
2929
- version: '3.12'
3030
tox-env: py312,py312-mypy,py312-lint,format,safety
31+
- version: '3.13'
32+
tox-env: py311,py311-mypy,py311-lint,safety
3133
- os: windows-latest
3234
version: '3.12'
3335
tox-env: py312,safety

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1919
* Added a compiler metadata flag for suppressing warnings when Var indirection is unavoidable (#1052)
2020
* Added the `--emit-generated-python` CLI argument to control whether generated Python code strings are stored by the runtime for each compiled namespace (#1045)
2121
* Added the ability to reload namespaces using the `:reload` flag on `require` (#1060)
22+
* Added support for Python 3.13 (#1056)
2223

2324
### Changed
2425
* The compiler will issue a warning when adding any alias that might conflict with any other alias (#1045)

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ documentation = "https://basilisp.readthedocs.io/"
1313
classifiers = [
1414
# Trove classifiers
1515
# Full list: https://pypi.python.org/pypi?%3Aaction=list_classifiers
16-
"Development Status :: 3 - Alpha",
16+
"Development Status :: 3 - Beta",
1717
"Intended Audience :: Developers",
1818
"License :: OSI Approved :: Eclipse Public License 1.0 (EPL-1.0)",
1919
"Programming Language :: Python",
@@ -23,6 +23,7 @@ classifiers = [
2323
"Programming Language :: Python :: 3.10",
2424
"Programming Language :: Python :: 3.11",
2525
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
2627
"Programming Language :: Python :: Implementation :: CPython",
2728
"Programming Language :: Python :: Implementation :: PyPy",
2829
"Topic :: Software Development :: Compilers",

src/basilisp/lang/runtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
NS_VAR_SYM = sym.symbol(NS_VAR_NAME, ns=CORE_NS)
8686
NS_VAR_NS = CORE_NS
8787
REPL_DEFAULT_NS = "basilisp.user"
88-
SUPPORTED_PYTHON_VERSIONS = frozenset({(3, 8), (3, 9), (3, 10), (3, 11), (3, 12)})
88+
SUPPORTED_PYTHON_VERSIONS = frozenset({(3, 8), (3, 9), (3, 10), (3, 11), (3, 12), (3, 13)})
8989
BASILISP_VERSION_STRING = importlib.metadata.version("basilisp")
9090
BASILISP_VERSION = vec.vector(
9191
(int(s) if s.isdigit() else s) for s in BASILISP_VERSION_STRING.split(".")

tests/basilisp/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from tests.basilisp.helpers import CompileFn, get_or_create_ns
1313

1414

15-
@pytest.fixture(params=[3, 4] if sys.version_info < (3, 8) else [3, 4, 5])
15+
@pytest.fixture(params=[3, 4, 5])
1616
def pickle_protocol(request) -> int:
1717
return request.param
1818

tests/basilisp/runtime_test.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def test_is_supported_python_version():
4242
"lpy310-",
4343
"lpy311-",
4444
"lpy312-",
45+
"lpy313-",
4546
platform.system().lower(),
4647
],
4748
)
@@ -59,6 +60,7 @@ def test_is_supported_python_version():
5960
"lpy310-",
6061
"lpy311-",
6162
"lpy312-",
63+
"lpy313-",
6264
platform.system().lower(),
6365
],
6466
)
@@ -70,6 +72,7 @@ def test_is_supported_python_version():
7072
"lpy310",
7173
"default",
7274
"lpy",
75+
"lpy313-",
7376
"lpy312-",
7477
"lpy311-",
7578
"lpy310+",
@@ -88,6 +91,7 @@ def test_is_supported_python_version():
8891
"default",
8992
"lpy",
9093
"lpy311+",
94+
"lpy313-",
9195
"lpy312-",
9296
"lpy311-",
9397
"lpy310+",
@@ -106,8 +110,26 @@ def test_is_supported_python_version():
106110
"lpy",
107111
"lpy311+",
108112
"lpy312+",
113+
"lpy313-",
109114
"lpy312-",
115+
"lpy39+",
116+
"lpy38+",
117+
platform.system().lower(),
118+
],
119+
)
120+
),
121+
(3, 13): frozenset(
122+
map(
123+
kw.keyword,
124+
[
125+
"lpy313",
126+
"default",
127+
"lpy",
110128
"lpy311+",
129+
"lpy312+",
130+
"lpy313+",
131+
"lpy313-",
132+
"lpy310+",
111133
"lpy39+",
112134
"lpy38+",
113135
platform.system().lower(),

tox.ini

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[tox]
2-
envlist = py38,py39,py310,py311,py312,pypy3,coverage,py{38,39,310,311,312}-mypy,py{38,39,310,311,312}-lint,format,safety
2+
envlist = py38,py39,py310,py311,py312,py313,pypy3,coverage,py{38,39,310,311,312,313}-mypy,py{38,39,310,311,312,313}-lint,format,safety
33
labels =
4-
test = py38,py39,py310,py311,py312
4+
test = py38,py39,py310,py311,py312,py313
55

66
[testenv]
77
allowlist_externals = poetry
@@ -23,7 +23,7 @@ commands =
2323
{posargs}
2424

2525
[testenv:coverage]
26-
depends = py38, py39, py310, py311, py312
26+
depends = py38, py39, py310, py311, py312, py313
2727
deps = coverage[toml]
2828
commands =
2929
coverage combine
@@ -38,7 +38,7 @@ commands =
3838
isort --check .
3939
black --check .
4040

41-
[testenv:py{38,39,310,311,312}-mypy]
41+
[testenv:py{38,39,310,311,312,313}-mypy]
4242
labels = mypy
4343
deps =
4444
mypy
@@ -47,7 +47,7 @@ deps =
4747
commands =
4848
mypy --config-file={toxinidir}/pyproject.toml -p basilisp
4949

50-
[testenv:py{38,39,310,311,312}-lint]
50+
[testenv:py{38,39,310,311,312,313}-lint]
5151
labels = lint
5252
deps =
5353
pylint >=3.0.0,<4.0.0

0 commit comments

Comments
 (0)