Add support for Python v3.13
### Issues - [x] Poetry, requires `g++` for building non-available `msgpack` wheel - [ ] [No Python v3.13 wheels from `pendulum`](https://github.com/sdispater/pendulum/issues/844). The build requires `cargo` in the path for building the non-available wheel: Rust v1.63 installed from Debian 12 doesn’t seem to support [RFC 3137 `let…else`](https://github.com/rust-lang/rust/issues/87335). ``` 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 the `PATH` in order to build `pendulum` which does not have Py3.13 pre-built wheels. - [x] (#492+) Think about getting rid of `pendulum`. Use an alternative? (#251+) Migrate to Arrow? - [ ] [Work on `pendulum` to (add Py3.13 support)](https://github.com/sdispater/pendulum/pull/863)/ publish Py3.13 wheels - Say there is no full Py3.13 support in Silkaj v0.12.0, but do an other release v0.12.1 with it? ### Python pre-releases - [x] Set up v3.13 test job - [x] With `allow_failure: true`, to allow tests to fail ### Python stable release - [x] Handle deprecation warning and breaking features: - Follow-up in: https://git.duniter.org/clients/python/duniterpy/-/issues/208#note_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. ``` - [x] 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: #493+ ### 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](https://endoflife.date/python) or before, move default version to latest stable Python version image. ### Post - [x] Open follow-up v3.14 tickets: #489+ ### References - Expected to be release the [October 1st 2024](https://peps.python.org/pep-0719/). - docker/python3/poetry#10+ - clients/python/duniterpy#208+
issue