Skip to content

Commit bc5c6c5

Browse files
committed
Drop support for Python 3.9
Ref. eng/recordflux/RecordFlux#1424
1 parent 3360b28 commit bc5c6c5

44 files changed

Lines changed: 316 additions & 390 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitlab-ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@ python_compatibility:
341341
parallel:
342342
matrix:
343343
- PYTHON_VERSION:
344-
- "3.9"
345344
- "3.10"
346345
- "3.12"
347346
script:
@@ -676,7 +675,6 @@ installation_from_pypi:
676675
parallel:
677676
matrix:
678677
- PYTHON_VERSION:
679-
- "3.9"
680678
- "3.10"
681679
- "3.11"
682680
- "3.12"
@@ -698,7 +696,6 @@ installation_from_testpypi:
698696
parallel:
699697
matrix:
700698
- PYTHON_VERSION:
701-
- "3.9"
702699
- "3.10"
703700
- "3.11"
704701
- "3.12"

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Display of message graphs in VS Code (AdaCore/RecordFlux#1307, eng/recordflux/RecordFlux#1838)
1313
- Validity of null messages in PyRFLX (eng/recordflux/RecordFlux#1841)
1414

15+
### Removed
16+
17+
- Support for Python 3.9 (eng/recordflux/RecordFlux#1424)
18+
1519
## [0.26.0] - 2024-12-18
1620

1721
### Added

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GNATCOLL_ORIGIN ?= https://github.com/AdaCore
1111
LANGKIT_ORIGIN ?= https://github.com/AdaCore
1212
ADASAT_ORIGIN ?= https://github.com/AdaCore
1313
VERSION ?= $(shell test -f pyproject.toml && test -f $(POETRY) && $(POETRY) version -s)
14-
PYTHON_VERSIONS ?= 3.9 3.10 3.11 3.12
14+
PYTHON_VERSIONS ?= 3.10 3.11 3.12
1515
CARGO_HOME ?= $(MAKEFILE_DIR)/.cargo-home
1616
NO_GIT_CHECKOUT ?=
1717
CHECK_VENV_FULL_SYNC ?=
@@ -45,7 +45,7 @@ GNATCOLL_DIR = contrib/gnatcoll-bindings
4545
LANGKIT_DIR = contrib/langkit
4646
ADASAT_DIR = contrib/adasat
4747

48-
DEVUTILS_HEAD = 4e878cc2b2224a2ff6b24ac1f9210c2b307af25b
48+
DEVUTILS_HEAD = 652d5c611df3790fafddf25780b6f473f3465f94
4949
GNATCOLL_HEAD = f988b2052d01310b830d63e86e19c8dc77d382a2
5050
LANGKIT_HEAD = 07218ed24a932e747b98416ceae74e1620276ecc
5151
ADASAT_HEAD = f20d814a4b26508d0dd6ee48a92bc560b122dad5

doc/user_guide/10-introduction.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ If FSF GNAT is used, the `GNATcoll iconv binding <https://docs.adacore.com/live/
142142

143143
To run RecordFlux one of the following Python versions is needed:
144144

145-
- Python 3.9
146145
- Python 3.10
147146
- Python 3.11
148147
- Python 3.12

examples/apps/wireguard/handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import os
66
from collections.abc import Callable
77
from pathlib import Path
8-
from typing import TYPE_CHECKING, Optional
8+
from typing import TYPE_CHECKING
99

1010
from rflx.model import NeverVerify
1111
from rflx.pyrflx import MessageValue, PyRFLX
@@ -40,7 +40,7 @@ class Connection:
4040
packet_counter: int = 0
4141

4242

43-
HandlerType = Callable[[Connection, MessageValue], Optional[bytes]]
43+
HandlerType = Callable[[Connection, MessageValue], bytes | None]
4444

4545

4646
def _create_transport_data_message(conn: Connection, clear_data: bytes) -> bytes:

examples/apps/wireguard/tai64_bindings/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "tai64_bindings"
7-
requires-python = ">=3.9"
7+
requires-python = ">=3.10"
88
classifiers = [
99
"Programming Language :: Rust",
1010
"Programming Language :: Python :: Implementation :: CPython",

examples/specs/checksum.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
# noqa: INP001
2+
3+
14
def icmp_checksum(message: bytes, **kwargs: object) -> int:
25
first_arg = kwargs.get("Tag'First .. Checksum'First - 1")
36
assert isinstance(first_arg, tuple)
47
tag_first, checksum_first_minus_one = first_arg
5-
assert tag_first == 0 and checksum_first_minus_one == 15
8+
assert tag_first == 0
9+
assert checksum_first_minus_one == 15
610
second_arg = kwargs.get("Checksum'Last + 1 .. Message'Last")
711
assert isinstance(second_arg, tuple)
812
checksum_last_plus_one, data_last = second_arg
9-
assert checksum_last_plus_one == 32 and data_last == 511
13+
assert checksum_last_plus_one == 32
14+
assert data_last == 511
1015

1116
checksum_bytes = message[tag_first : (checksum_first_minus_one + 1) // 8]
1217
checksum_bytes += b"\x00" * 2
@@ -18,7 +23,8 @@ def ip_header_checksum(message: bytes, **kwargs: object) -> int:
1823
first_arg = kwargs.get("Version'First .. Header_Checksum'First - 1")
1924
assert isinstance(first_arg, tuple)
2025
version_first, checksum_first_minus_one = first_arg
21-
assert version_first == 0 and checksum_first_minus_one == 79
26+
assert version_first == 0
27+
assert checksum_first_minus_one == 79
2228
second_arg = kwargs.get("Header_Checksum'Last + 1 .. Payload'First - 1")
2329
assert isinstance(second_arg, tuple)
2430
checksum_last_plus_one, options_last = second_arg
@@ -42,7 +48,8 @@ def add_ones_complement(num1: int, num2: int) -> int:
4248
intermediary_result = message_in_sixteen_bit_chunks[0]
4349
for i in range(1, len(message_in_sixteen_bit_chunks)):
4450
intermediary_result = add_ones_complement(
45-
intermediary_result, message_in_sixteen_bit_chunks[i]
51+
intermediary_result,
52+
message_in_sixteen_bit_chunks[i],
4653
)
4754

4855
return intermediary_result ^ 0xFFFF

poetry.lock

Lines changed: 2 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ classifiers = [
1818
"Programming Language :: Ada",
1919
"Programming Language :: Python :: 3 :: Only",
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",
@@ -70,7 +69,7 @@ script = "build.py"
7069
generate-setup-file = true
7170

7271
[tool.poetry.dependencies]
73-
python = ">=3.9.2, <4"
72+
python = ">=3.10, <4"
7473
attrs = ">=22.1, <24"
7574
defusedxml = ">=0.7, <0.8"
7675
lark = ">=1.1.8, <2"

rflx/ada.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ def __init__(
15711571
self.identifier = ID(identifier)
15721572
self.generic_package = ID(generic_package)
15731573
self.associations: list[tuple[ID | None, Expr]] = [
1574-
(ID(i) if i else None, Variable(e) if isinstance(e, (str, ID)) else e)
1574+
(ID(i) if i else None, Variable(e) if isinstance(e, str | ID) else e)
15751575
for i, e in associations or []
15761576
]
15771577

@@ -2036,7 +2036,7 @@ def __str__(self) -> str:
20362036
if (
20372037
self.identifier.ada_str == "Assert"
20382038
and len(self.pragma_parameters) == 1
2039-
and isinstance(self.pragma_parameters[0], (IfExpr, CaseExpr))
2039+
and isinstance(self.pragma_parameters[0], IfExpr | CaseExpr)
20402040
):
20412041
parameters = f" {parameters}"
20422042
else:
@@ -2579,7 +2579,7 @@ def __str__(self) -> str:
25792579
if (
25802580
self.identifier.ada_str == "Assert"
25812581
and len(self.pragma_parameters) == 1
2582-
and isinstance(self.pragma_parameters[0], (IfExpr, CaseExpr))
2582+
and isinstance(self.pragma_parameters[0], IfExpr | CaseExpr)
25832583
):
25842584
parameters = f" {parameters}"
25852585
else:
@@ -2637,7 +2637,7 @@ def __init__(
26372637
self.formal_parameters = formal_parameters
26382638

26392639
def __iadd__(self, other: object) -> Self:
2640-
if isinstance(other, (UnitPart, SubprogramUnitPart)):
2640+
if isinstance(other, UnitPart | SubprogramUnitPart):
26412641
self.declaration.declarations = [*self.declaration.declarations, *other.specification]
26422642
self.declaration.private_declarations = [
26432643
*self.declaration.private_declarations,

0 commit comments

Comments
 (0)