Add support for Python v3.13
Issues
-
Poetry, requires g++
for building non-availablemsgpack
wheel -
No Python v3.13 wheels from pendulum
. The build requirescargo
in the path for building the non-available wheel: Rust v1.63 installed from Debian 12 doesn’t seem to support RFC 3137let…else
.
Compiling _pendulum v3.0.0 (/tmp/tmp64dw2s57/pendulum-3.0.0/rust)
error[E0658]: `let...else` statements are unstable
--> src/parsing.rs:817:9
|
817 | / let Some(mut value) = self.current.to_digit(10) else {
818 | | return Err(self.parse_error("Invalid number in duration".to_string()));
819 | | };
| |__________^
|
= note: see issue #87335 <https://github.com/rust-lang/rust/issues/87335> for more information
For more information about this error, try `rustc --explain E0658`.
error: could not compile `_pendulum` due to previous error
💥 maturin failed
Caused by: Failed to build a native library through cargo
Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="cpython-3.13-64bit" PYO3_PYTHON="/tmp/tmpqoyhqkti/.venv/bin/python" PYTHON_SYS_EXECUTABLE="/tmp/tmpqoyhqkti/.venv/bin/python" "cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/tmp64dw2s57/pendulum-3.0.0/rust/Cargo.toml" "--release" "--lib"`
Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/tmp/tmpqoyhqkti/.venv/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
-
Actually, I can’t release Silkaj with official Py3.13 support, since installing it requires to have rust
toolchain in thePATH
in order to buildpendulum
which does not have Py3.13 pre-built wheels.-
Think about getting rid of pendulum
. Alternative? (Use and introduce a better date utility than da... (#251 - closed)) Arrow?
-
Python pre-releases
-
Set up v3.13 test job -
With allow_failure: true
, to allow tests to fail
-
Python stable release
-
Handle deprecation warning and breaking features: - Follow-up in: duniterpy#208 (comment 44803)
Exception ignored in: <http.client.HTTPResponse object at 0x7f8ddda7f250>
Traceback (most recent call last):
File "/usr/lib64/python3.13/http/client.py", line 432, in close
super().close() # set "closed" flag
File "/usr/lib64/python3.13/http/client.py", line 445, in flush
self.fp.flush()
ValueError: I/O operation on closed file.
-
Remove allow_failure: true
, now on the tests should pass -
Switch Silkaj images builds to v3.13: once Pendulum provides 3.13 wheels, and rust toolchain is removed
CI default image switch approach change
-
Move coverage to v3.13 job -
Set default container used by jobs to v3.13
Changing approach: keeping default image on 3.12 for pre-commit jobs, all tests and coverage generation.
I think that’s ok, to keep them on to-be EOL Python version.
Advantages: No need to synchronise git
and pre-commit
package install/uninstall among Silkaj, DuniterPy, and docker/python3/poetry#10 repositories. Also, solves the issue about still maintaining DuniterPy, which is uncertain. Less efforts spent on this topic, more onto Silkaj development.
Once Py3.12 reaches EOL in Oct 2028 or before, move default version to latest stable Python version image.
Post
-
Open follow-up v3.14 tickets: Add Python v3.14 support and drop Python v3.9 (#489)
References
Edited by Moul