Skip to content

Commit ab5b46a

Browse files
authored
Add support for 3.14; drop support for 3.9 (#1284)
Fixes #1282 Fixes #1283
1 parent 2069221 commit ab5b46a

File tree

12 files changed

+59
-52
lines changed

12 files changed

+59
-52
lines changed

.github/workflows/run-tests.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,26 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest]
19-
version: ['3.9', '3.10', '3.11', '3.12', '3.13.0']
19+
version: ['3.10', '3.11', '3.12', '3.13', '3.14']
2020
include:
21-
- version: '3.9'
22-
tox-env: py39,py39-mypy,py39-lint,bandit
2321
- version: '3.10'
2422
tox-env: py310,py310-mypy,py310-lint,bandit
2523
- version: '3.11'
2624
tox-env: py311,py311-mypy,py311-lint,bandit
2725
- version: '3.12'
28-
tox-env: py312,py312-mypy,py312-lint,format,bandit
29-
- version: '3.13.0'
26+
tox-env: py312,py312-mypy,py312-lint,bandit
27+
- version: '3.13'
3028
tox-env: py313,py313-mypy,py313-lint,bandit
29+
# TODO: bandit doesn't currently work with 3.14
30+
# https://github.com/PyCQA/bandit/issues/1314
31+
- version: '3.14'
32+
tox-env: py314,py314-mypy,py314-lint,format
3133
- os: windows-latest
32-
version: '3.13'
33-
tox-env: py313,bandit
34+
version: '3.14'
35+
tox-env: py314,py314-lint
3436
- os: macos-latest
35-
version: '3.13'
36-
tox-env: py313,bandit
37+
version: '3.14'
38+
tox-env: py313,py314-lint
3739
steps:
3840
- uses: actions/checkout@v4
3941
- uses: actions/setup-python@v5
@@ -148,8 +150,8 @@ jobs:
148150
strategy:
149151
matrix:
150152
os: [ubuntu-latest]
151-
version: ['3.9']
152-
tox-env: ['py39']
153+
version: ['3.10']
154+
tox-env: ['py310']
153155
steps:
154156
- uses: actions/checkout@v4
155157
- uses: actions/setup-python@v5

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Added
9+
* Added support for Python 3.14 (#1282)
10+
11+
### Removed
12+
* Removed support for Python 3.9 (#1283)
813

914
## [v0.4.0]
1015
### Added

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 🐍 basilisp 🐍
22

3-
A Clojure-compatible(-ish) Lisp dialect targeting Python 3.9+.
3+
A Clojure-compatible(-ish) Lisp dialect targeting Python 3.10+.
44

55
[![PyPI](https://img.shields.io/pypi/v/basilisp.svg?style=flat-square)](https://pypi.org/project/basilisp/) [![python](https://img.shields.io/pypi/pyversions/basilisp.svg?style=flat-square)](https://pypi.org/project/basilisp/) [![pyimpl](https://img.shields.io/pypi/implementation/basilisp.svg?style=flat-square)](https://pypi.org/project/basilisp/) [![readthedocs](https://img.shields.io/readthedocs/basilisp.svg?style=flat-square)](https://basilisp.readthedocs.io/) [![Run tests](https://github.com/basilisp-lang/basilisp/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/basilisp-lang/basilisp/actions/workflows/run-tests.yml) [![Coveralls github](https://img.shields.io/coveralls/github/basilisp-lang/basilisp.svg?style=flat-square)](https://coveralls.io/github/basilisp-lang/basilisp) [![license](https://img.shields.io/github/license/basilisp-lang/basilisp.svg?style=flat-square)](https://github.com/basilisp-lang/basilisp/blob/master/LICENSE)
66

docs/compiler.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Debugging
193193

194194
The compiler generates Python code by generating Python AST nodes, rather than emitting the raw Python code as text.
195195
This is convenient for the compiler, but inspecting Python AST nodes manually for bugs can be a bit of a challenge even with a debugger.
196-
For this reason, the Basilisp compiler can also use the :external:py:func:`ast.unparse` (`astor <https://github.com/berkerpeksag/astor>`_ in versions of Python prior to 3.9) library to generate raw Python code for visual inspection.
196+
For this reason, the Basilisp compiler can also use the :external:py:func:`ast.unparse` library to generate raw Python code for visual inspection.
197197

198198
Currently, the compiler is configured to automatically generate Python code for all namespaces.
199199
This code generation isn't slow, but it does add an appreciable amount of time to the compilation of each individual namespace.

docs/differencesfromclojure.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Hosted on Python
1616
----------------
1717

1818
Unlike Clojure, Basilisp is hosted on the Python VM.
19-
Basilisp supports versions of Python 3.9+.
19+
Basilisp supports versions of Python 3.10+.
2020
Basilisp projects and libraries may both import Python code and be imported by Python code (once the Basilisp runtime has been :ref:`initialized <bootstrapping>` and the import hooks have been installed).
2121

2222
.. _type_differences:

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Welcome to Basilisp's documentation!
77
====================================
88

9-
Basilisp is a :ref:`Clojure-compatible(-ish) <differences_from_clojure>` Lisp dialect targeting Python 3.9+.
9+
Basilisp is a :ref:`Clojure-compatible(-ish) <differences_from_clojure>` Lisp dialect targeting Python 3.10+.
1010

1111
Basilisp compiles down to raw Python 3 code and executes on the Python 3 virtual machine, allowing natural interoperability between existing Python libraries and new Lisp code.
1212

docs/reader.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ Splicing reader conditionals may only appear within other collection literal for
603603
Python Version Reader Features
604604
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
605605

606-
Basilisp includes a specialized set of reader features based on the major version of Python (e.g. 3.8, 3.9, etc.).
606+
Basilisp includes a specialized set of reader features based on the major version of Python (e.g. 3.10, 3.11, etc.).
607607
Because the API of Python's standard library changes significantly between versions, it can be challenging to support multiple versions at once.
608608
In classical Python, users are forced to use conditional gates either at the top level of a module to define different function versions, or perhaps gate the logic within a function or class.
609609
Both options incur some level of runtime cost.

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ classifiers = [
1818
"License :: OSI Approved :: Eclipse Public License 1.0 (EPL-1.0)",
1919
"Programming Language :: Python",
2020
"Programming Language :: Python :: 3",
21-
"Programming Language :: Python :: 3.9",
2221
"Programming Language :: Python :: 3.10",
2322
"Programming Language :: Python :: 3.11",
2423
"Programming Language :: Python :: 3.12",
2524
"Programming Language :: Python :: 3.13",
25+
"Programming Language :: Python :: 3.14",
2626
"Programming Language :: Python :: Implementation :: CPython",
2727
"Programming Language :: Python :: Implementation :: PyPy",
2828
"Topic :: Software Development :: Compilers",
2929
]
3030
include = ["README.md", "LICENSE"]
3131

3232
[tool.poetry.dependencies]
33-
python = "^3.9"
33+
python = "^3.10"
3434
attrs = ">=22.2.0"
3535
immutables = ">=0.20,<1.0.0"
3636
prompt-toolkit = ">=3.0.0,<4.0.0"
@@ -51,7 +51,7 @@ pytest-pycharm = "*"
5151
# to maintain consistent output during both development and publishing on
5252
# Read The Docs.
5353
sphinx = "^7.1.0"
54-
sphinx-autobuild = { version = "^2024.04.16", python = ">=3.9" }
54+
sphinx-autobuild = "^2024.04.16"
5555
sphinx-copybutton = "^0.5.2"
5656
sphinxext-opengraph = "^v0.9.1"
5757
furo = "^2023.08.19"
@@ -236,7 +236,6 @@ warn_unused_ignores = true
236236

237237
[[tool.mypy.overrides]]
238238
module = [
239-
"astor.*",
240239
"prompt_toolkit.*",
241240
"pygments.*",
242241
"pytest.*",

src/basilisp/lang/reader.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import decimal
66
import functools
77
import io
8+
import math
89
import os
910
import re
1011
import uuid
@@ -1498,9 +1499,9 @@ def _read_regex(ctx: ReaderContext) -> Pattern:
14981499

14991500

15001501
_NUMERIC_CONSTANTS = {
1501-
"NaN": float("nan"),
1502-
"Inf": float("inf"),
1503-
"-Inf": -float("inf"),
1502+
"NaN": math.nan,
1503+
"Inf": math.inf,
1504+
"-Inf": -math.inf,
15041505
}
15051506

15061507

src/basilisp/lang/runtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
IMPORT_MODULE_VAR_SYM = sym.symbol(IMPORT_MODULE_VAR_NAME, ns=CORE_NS)
6969
NS_VAR_NS = CORE_NS
7070
REPL_DEFAULT_NS = "basilisp.user"
71-
SUPPORTED_PYTHON_VERSIONS = frozenset({(3, 9), (3, 10), (3, 11), (3, 12), (3, 13)})
71+
SUPPORTED_PYTHON_VERSIONS = frozenset({(3, 10), (3, 11), (3, 12), (3, 13), (3, 14)})
7272
BASILISP_VERSION_STRING = importlib.metadata.version("basilisp")
7373
BASILISP_VERSION = vec.vector(
7474
(int(s) if s.isdigit() else s) for s in BASILISP_VERSION_STRING.split(".")

0 commit comments

Comments
 (0)