Files
youknowdot 5f3daa5386 Implement Python 3.15 base64 APIs (#9085)
* Implement Python 3.15 base64 encoding and decoding

Follow CPython 3.15.0 final d220409a13b77de7a6c30abe16ea90db01528edc for base64 options, alphabets, padding and canonical decoding. Keep reverse-table caches in traced module-native state and preserve module-bound callable semantics. Add bounded Python regressions without editing Lib.

Assisted-by: OpenAI Codex:model identifier unavailable

* Complete binascii codecs for canonical Python 3.15 tests

Migrate Lib/test/test_binascii.py unchanged from CPython 3.15.0 final using scripts/update_lib and replace the superseded custom base64 snippet. Implement the base32, Base85, Ascii85 and hex ignorechars APIs required by the canonical suite. Share the existing module-bound original-key alphabet cache across base32/base64/base85 and preserve argument and buffer cleanup semantics. Keep the existing base64 kernels and VM state integration unchanged.

Assisted-by: OpenAI Codex:model identifier unavailable
2026-10-12 16:12:24 +09:00

73 lines
2.1 KiB
TOML

[package]
name = "rustpython-common"
description = "General python functions and algorithms for use in RustPython"
version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
repository.workspace = true
license.workspace = true
[features]
default = ["std"]
binascii = ["dep:crc32fast"]
bz2 = ["std", "dep:bzip2"]
cjk-codecs = []
inet = ["std"]
json = ["dep:memchr", "std"]
lzma = ["std", "dep:xz", "dep:xz-sys"]
hashlib = [
"std",
"parking_lot",
"dep:md-5",
"dep:sha1",
"dep:sha2",
"dep:sha3",
"dep:shake",
"dep:blake2b_simd",
"dep:blake2s_simd",
"dep:scrypt",
]
std = []
threading = ["parking_lot", "std"]
wasm_js = ["getrandom/wasm_js"]
zlib = ["std", "dep:libz-rs-sys", "dep:zlib-rs"]
[dependencies]
rustpython-literal = { workspace = true }
rustpython-unicode = { workspace = true }
rustpython-wtf8 = { workspace = true }
ascii = { workspace = true }
bitflags = { workspace = true }
blake2b_simd = { workspace = true, optional = true }
blake2s_simd = { workspace = true, optional = true }
bzip2 = { workspace = true, optional = true }
crc32fast = { workspace = true, optional = true }
getrandom = { workspace = true }
itertools = { workspace = true }
libc = { workspace = true }
libz-rs-sys = { workspace = true, optional = true }
malachite-bigint = { workspace = true }
malachite-q = { workspace = true }
malachite-base = { workspace = true }
md-5 = { workspace = true, optional = true }
memchr = { workspace = true, optional = true }
num-traits = { workspace = true }
parking_lot = { workspace = true, optional = true }
radium = { workspace = true }
scrypt = { workspace = true, optional = true }
sha1 = { workspace = true, optional = true }
sha2 = { workspace = true, optional = true }
sha3 = { workspace = true, optional = true }
shake = { workspace = true, optional = true }
zlib-rs = { workspace = true, optional = true }
lock_api = { workspace = true }
siphasher = { workspace = true }
num-complex = { workspace = true }
xz = { workspace = true, optional = true }
xz-sys = { workspace = true, optional = true }
[lints]
workspace = true