Skip to content

Commit 5fbac74

Browse files
authored
cpython is unmaintained (#1822)
1 parent d8c4086 commit 5fbac74

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

crates/cpython/RUSTSEC-0000-0000.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
```toml
2+
[advisory]
3+
id = "RUSTSEC-0000-0000"
4+
package = "cpython"
5+
date = "2023-11-14"
6+
url = "https://github.com/dgrunwald/rust-cpython/commit/e815555"
7+
references = [
8+
"https://github.com/dgrunwald/rust-cpython/issues/265",
9+
"https://github.com/dgrunwald/rust-cpython/issues/294",
10+
]
11+
informational = "unmaintained"
12+
13+
[versions]
14+
patched = []
15+
```
16+
17+
# `cpython` is unmaintained
18+
19+
The `cpython` crate and the underlying `python3-sys` and `python27-sys` crates have been marked as [no longer actively maintained] by the developer.
20+
21+
There are also open issues for unsound code that is currently in these crates:
22+
23+
- [cpython#265]: Using some string functions causes segmentation faults on big-endian architectures. Due to incorrect bitfield manipulations, it is possible to create invalid Python objects that crash the Python interpreter.
24+
- [cpython#294]: Python 3.12 is not supported. Due to ABI changes in Python 3.12, calling some string functions will result in invalid Python objects and / or cause out-of-bounds memory accesses.
25+
26+
## Recommended alternatives
27+
28+
- [`pyo3`] (version 0.19.2 and newer)
29+
30+
The `pyo3` crate is actively maintained. Preliminary support for Python 3.12 was added in version 0.19.2, and version 0.20.0 was released with full support for Python 3.12.
31+
32+
Both versions implement string functions correctly on big-endian architectures. The endianness issue affecting the `cpython` crate was fixed in recent versions of `pyo3`.
33+
34+
[no longer actively maintained]: https://github.com/dgrunwald/rust-cpython/commit/e815555
35+
[cpython#265]: https://github.com/dgrunwald/rust-cpython/issues/265
36+
[cpython#294]: https://github.com/dgrunwald/rust-cpython/issues/294
37+
[`pyo3`]: https://crates.io/crates/pyo3
38+

0 commit comments

Comments
 (0)