bump test-debug to 3.12

This commit is contained in:
David Hewitt 2023-10-04 19:43:23 +01:00
parent a4b79dc1e5
commit 6c6c607ad3
2 changed files with 14 additions and 17 deletions

View File

@ -376,8 +376,8 @@ jobs:
components: rust-src components: rust-src
- name: Install python3 standalone debug build with nox - name: Install python3 standalone debug build with nox
run: | run: |
PBS_RELEASE="20230826" PBS_RELEASE="20231002"
PBS_PYTHON_VERSION="3.11.5" PBS_PYTHON_VERSION="3.12.0"
PBS_ARCHIVE="cpython-${PBS_PYTHON_VERSION}+${PBS_RELEASE}-x86_64-unknown-linux-gnu-debug-full.tar.zst" PBS_ARCHIVE="cpython-${PBS_PYTHON_VERSION}+${PBS_RELEASE}-x86_64-unknown-linux-gnu-debug-full.tar.zst"
wget "https://github.com/indygreg/python-build-standalone/releases/download/${PBS_RELEASE}/${PBS_ARCHIVE}" wget "https://github.com/indygreg/python-build-standalone/releases/download/${PBS_RELEASE}/${PBS_ARCHIVE}"
tar -I zstd -xf "${PBS_ARCHIVE}" tar -I zstd -xf "${PBS_ARCHIVE}"
@ -393,10 +393,10 @@ jobs:
PYO3_CONFIG_FILE=$(mktemp) PYO3_CONFIG_FILE=$(mktemp)
cat > $PYO3_CONFIG_FILE << EOF cat > $PYO3_CONFIG_FILE << EOF
implementation=CPython implementation=CPython
version=3.11 version=3.12
shared=true shared=true
abi3=false abi3=false
lib_name=python3.11d lib_name=python3.12d
lib_dir=${{ github.workspace }}/python/install/lib lib_dir=${{ github.workspace }}/python/install/lib
executable=${{ github.workspace }}/python/install/bin/python3 executable=${{ github.workspace }}/python/install/bin/python3
pointer_width=64 pointer_width=64

View File

@ -452,18 +452,14 @@ pub const Py_TPFLAGS_DEFAULT: c_ulong = if cfg!(Py_3_10) {
pub const Py_TPFLAGS_HAVE_FINALIZE: c_ulong = 1; pub const Py_TPFLAGS_HAVE_FINALIZE: c_ulong = 1;
pub const Py_TPFLAGS_HAVE_VERSION_TAG: c_ulong = 1 << 18; pub const Py_TPFLAGS_HAVE_VERSION_TAG: c_ulong = 1 << 18;
#[cfg(all(py_sys_config = "Py_REF_DEBUG", not(Py_LIMITED_API)))]
extern "C" { extern "C" {
pub fn _Py_NegativeRefCount(filename: *const c_char, lineno: c_int, op: *mut PyObject); #[cfg(all(py_sys_config = "Py_REF_DEBUG", not(Py_LIMITED_API)))]
#[cfg(Py_3_12)] pub fn _Py_NegativeRefcount(filename: *const c_char, lineno: c_int, op: *mut PyObject);
#[link_name = "_Py_IncRefTotal_DO_NOT_USE_THIS"] #[cfg(all(Py_3_12, py_sys_config = "Py_REF_DEBUG", not(Py_LIMITED_API)))]
fn _Py_INC_REFTOTAL(); fn _Py_INCREF_IncRefTotal();
#[cfg(Py_3_12)] #[cfg(all(Py_3_12, py_sys_config = "Py_REF_DEBUG", not(Py_LIMITED_API)))]
#[link_name = "_Py_DecRefTotal_DO_NOT_USE_THIS"] fn _Py_DECREF_DecRefTotal();
fn _Py_DEC_REFTOTAL();
}
extern "C" {
#[cfg_attr(PyPy, link_name = "_PyPy_Dealloc")] #[cfg_attr(PyPy, link_name = "_PyPy_Dealloc")]
pub fn _Py_Dealloc(arg1: *mut PyObject); pub fn _Py_Dealloc(arg1: *mut PyObject);
@ -537,7 +533,7 @@ pub unsafe fn Py_INCREF(op: *mut PyObject) {
// or submit a PR supporting Py_STATS build option and pystats.h // or submit a PR supporting Py_STATS build option and pystats.h
#[cfg(all(py_sys_config = "Py_REF_DEBUG", Py_3_12))] #[cfg(all(py_sys_config = "Py_REF_DEBUG", Py_3_12))]
_Py_INC_REFTOTAL(); _Py_INCREF_IncRefTotal();
} }
} }
@ -584,7 +580,7 @@ pub unsafe fn Py_DECREF(op: *mut PyObject) {
// or submit a PR supporting Py_STATS build option and pystats.h // or submit a PR supporting Py_STATS build option and pystats.h
#[cfg(all(py_sys_config = "Py_REF_DEBUG", Py_3_12))] #[cfg(all(py_sys_config = "Py_REF_DEBUG", Py_3_12))]
_Py_DEC_REFTOTAL(); _Py_DECREF_DecRefTotal();
#[cfg(Py_3_12)] #[cfg(Py_3_12)]
{ {
@ -593,7 +589,8 @@ pub unsafe fn Py_DECREF(op: *mut PyObject) {
#[cfg(py_sys_config = "Py_REF_DEBUG")] #[cfg(py_sys_config = "Py_REF_DEBUG")]
if (*op).ob_refcnt.ob_refcnt < 0 { if (*op).ob_refcnt.ob_refcnt < 0 {
let location = std::panic::Location::caller(); let location = std::panic::Location::caller();
_Py_NegativeRefcount(location.file(), location.line(), op); let filename = std::ffi::CString::new(location.file()).unwrap();
_Py_NegativeRefcount(filename.as_ptr(), location.line() as i32, op);
} }
if (*op).ob_refcnt.ob_refcnt == 0 { if (*op).ob_refcnt.ob_refcnt == 0 {