Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions newsfragments/6041.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add FFI definition `Py_UNICODE_TODECIMAL`.
12 changes: 12 additions & 0 deletions newsfragments/6041.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Mark FFI definitions no longer available on 3.11 and up: `PyUnicode_Encode`, `PyUnicode_EncodeASCII`, `PyUnicode_EncodeCharmap`, `PyUnicode_EncodeDecimal`,
`PyUnicode_EncodeLatin1`,
`PyUnicode_EncodeRawUnicodeEscape`,
`PyUnicode_EncodeUTF7`,
`PyUnicode_EncodeUTF8`,
`PyUnicode_EncodeUTF16`,
`PyUnicode_EncodeUTF32`,
`PyUnicode_EncodeUnicodeEscape`,
`PyUnicode_TransformDecimalToASCII`, and
`PyUnicode_TranslateCharmap`.

Mark FFI definition `PyUnicode_ClearFreeList` no longer avaialable on 3.9 and up.
15 changes: 1 addition & 14 deletions pyo3-ffi-check/macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ const MACRO_EXCLUSIONS: &[(&str, &str)] = &[
("Py_REFCNT", "not(Py_3_14)"),
("Py_True", ""),
("Py_TYPE", "not(Py_3_14)"),
("Py_UNICODE_TODECIMAL", ""),
("Py_XDECREF", ""),
("Py_XINCREF", ""),
// These functions were only added in 3.10, but pyo3-ffi defines them for
Expand Down Expand Up @@ -459,20 +460,6 @@ const EXCLUDED_SYMBOLS: &[&str] = &[
"PySys_AddXOption",
"PySys_HasWarnOptions",
"PySys_SetPath",
"PyUnicode_ClearFreeList",
"PyUnicode_Encode",
"PyUnicode_EncodeASCII",
"PyUnicode_EncodeCharmap",
"PyUnicode_EncodeDecimal",
"PyUnicode_EncodeLatin1",
"PyUnicode_EncodeRawUnicodeEscape",
"PyUnicode_EncodeUTF7",
"PyUnicode_EncodeUTF8",
"PyUnicode_EncodeUTF16",
"PyUnicode_EncodeUTF32",
"PyUnicode_EncodeUnicodeEscape",
"PyUnicode_TransformDecimalToASCII",
"PyUnicode_TranslateCharmap",
// This symbol was not in headers but still public until Python 3.10,
// should be able to remove this exclusion once support for 3.9 dropped
"Py_GetArgcArgv",
Expand Down
Loading
Loading