Skip to content

Commit e9b033f

Browse files
committed
Update Python inlined files: 3.12.7 (3.2)
1 parent 8c751f1 commit e9b033f

File tree

6 files changed

+166
-186
lines changed

6 files changed

+166
-186
lines changed

graalpython/com.oracle.graal.python.cext/include/cpython/unicodeobject.h

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -512,20 +512,6 @@ PyAPI_FUNC(Py_UCS4) _PyUnicode_FindMaxChar (
512512

513513
/* --- Legacy deprecated API ---------------------------------------------- */
514514

515-
/* Create a Unicode Object from the Py_UNICODE buffer u of the given
516-
size.
517-
518-
u may be NULL which causes the contents to be undefined. It is the
519-
user's responsibility to fill in the needed data afterwards. Note
520-
that modifying the Unicode object contents after construction is
521-
only allowed if u was set to NULL.
522-
523-
The buffer is copied into the new object. */
524-
Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
525-
const Py_UNICODE *u, /* Unicode buffer */
526-
Py_ssize_t size /* size of buffer */
527-
);
528-
529515
/* Return a read-only pointer to the Unicode object's internal
530516
Py_UNICODE buffer.
531517
If the wchar_t/Py_UNICODE representation is not yet available, this
@@ -540,17 +526,6 @@ PyAPI_FUNC(const Py_UNICODE *) _PyUnicode_AsUnicode(
540526
PyObject *unicode /* Unicode object */
541527
);
542528

543-
/* Return a read-only pointer to the Unicode object's internal
544-
Py_UNICODE buffer and save the length at size.
545-
If the wchar_t/Py_UNICODE representation is not yet available, this
546-
function will calculate it. */
547-
548-
Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicodeAndSize(
549-
PyObject *unicode, /* Unicode object */
550-
Py_ssize_t *size /* location where to save the length */
551-
);
552-
553-
554529
/* Fast access macros */
555530

556531
Py_DEPRECATED(3.3)

graalpython/com.oracle.graal.python.cext/modules/_sqlite/clinic/connection.c.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ pysqlite_connection_init(PyObject *self, PyObject *args, PyObject *kwargs)
5757
PyObject *factory = (PyObject*)clinic_state()->ConnectionType;
5858
int cache_size = 128;
5959
int uri = 0;
60+
enum autocommit_mode autocommit = LEGACY_TRANSACTION_CONTROL;
6061

6162
fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser, 1, 8, 0, argsbuf);
6263
if (!fastargs) {

graalpython/com.oracle.graal.python.cext/modules/_sqlite/connection.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,9 @@ pysqlite_connection_init_impl(pysqlite_Connection *self, PyObject *database,
185185
double timeout, int detect_types,
186186
const char *isolation_level,
187187
int check_same_thread, PyObject *factory,
188-
int cache_size, int uri)
189-
/*[clinic end generated code: output=839eb2fee4293bda input=b8ce63dc6f70a383]*/
188+
int cache_size, int uri,
189+
enum autocommit_mode autocommit)
190+
/*[clinic end generated code: output=cba057313ea7712f input=9b0ab6c12f674fa3]*/
190191
{
191192
if (PySys_Audit("sqlite3.connect", "O", database) < 0) {
192193
return -1;

graalpython/com.oracle.graal.python.cext/modules/_testcapi.c

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -2045,41 +2045,6 @@ test_widechar(PyObject *self, PyObject *Py_UNUSED(ignored))
20452045
Py_DECREF(wide);
20462046
Py_DECREF(utf8);
20472047

2048-
#if defined(SIZEOF_WCHAR_T) && (SIZEOF_WCHAR_T == 4)
2049-
wide = PyUnicode_FromWideChar(invalid, 1);
2050-
if (wide == NULL)
2051-
PyErr_Clear();
2052-
else
2053-
return raiseTestError("test_widechar",
2054-
"PyUnicode_FromWideChar(L\"\\U00110000\", 1) didn't fail");
2055-
2056-
#if USE_UNICODE_WCHAR_CACHE
2057-
/* Ignore use of deprecated APIs */
2058-
_Py_COMP_DIAG_PUSH
2059-
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
2060-
wide = PyUnicode_FromUnicode(invalid, 1);
2061-
if (wide == NULL)
2062-
PyErr_Clear();
2063-
else
2064-
return raiseTestError("test_widechar",
2065-
"PyUnicode_FromUnicode(L\"\\U00110000\", 1) didn't fail");
2066-
2067-
wide = PyUnicode_FromUnicode(NULL, 1);
2068-
if (wide == NULL)
2069-
return NULL;
2070-
PyUnicode_AS_UNICODE(wide)[0] = invalid[0];
2071-
if (_PyUnicode_Ready(wide) < 0) {
2072-
Py_DECREF(wide);
2073-
PyErr_Clear();
2074-
}
2075-
else {
2076-
Py_DECREF(wide);
2077-
return raiseTestError("test_widechar",
2078-
"PyUnicode_Ready() didn't fail");
2079-
}
2080-
_Py_COMP_DIAG_POP
2081-
#endif /* USE_UNICODE_WCHAR_CACHE */
2082-
#endif
20832048

20842049
Py_RETURN_NONE;
20852050
}
@@ -2292,35 +2257,6 @@ unicode_copycharacters(PyObject *self, PyObject *args)
22922257
return Py_BuildValue("(Nn)", to_copy, copied);
22932258
}
22942259

2295-
#if USE_UNICODE_WCHAR_CACHE
2296-
/* Ignore use of deprecated APIs */
2297-
_Py_COMP_DIAG_PUSH
2298-
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
2299-
2300-
static PyObject *
2301-
unicode_legacy_string(PyObject *self, PyObject *args)
2302-
{
2303-
Py_UNICODE *data;
2304-
Py_ssize_t len;
2305-
PyObject *u;
2306-
2307-
if (!PyArg_ParseTuple(args, "u#", &data, &len))
2308-
return NULL;
2309-
2310-
u = PyUnicode_FromUnicode(NULL, len);
2311-
if (u == NULL)
2312-
return NULL;
2313-
2314-
memcpy(PyUnicode_AS_UNICODE(u), data, len * sizeof(Py_UNICODE));
2315-
2316-
if (len > 0) { /* The empty string is always ready. */
2317-
assert(!PyUnicode_IS_READY(u));
2318-
}
2319-
2320-
return u;
2321-
}
2322-
_Py_COMP_DIAG_POP
2323-
#endif /* USE_UNICODE_WCHAR_CACHE */
23242260

23252261
static PyObject *
23262262
getargs_w_star(PyObject *self, PyObject *args)
@@ -6524,9 +6460,6 @@ static PyMethodDef TestMethods[] = {
65246460
{"unicode_decodeutf8", unicode_decodeutf8, METH_VARARGS},
65256461
{"unicode_decodeutf8stateful",unicode_decodeutf8stateful, METH_VARARGS}, {"unicode_findchar", unicode_findchar, METH_VARARGS},
65266462
{"unicode_copycharacters", unicode_copycharacters, METH_VARARGS},
6527-
#if USE_UNICODE_WCHAR_CACHE
6528-
{"unicode_legacy_string", unicode_legacy_string, METH_VARARGS},
6529-
#endif /* USE_UNICODE_WCHAR_CACHE */
65306463
{"_test_thread_state", test_thread_state, METH_VARARGS},
65316464
{"_pending_threadfunc", pending_threadfunc, METH_VARARGS},
65326465
#ifdef HAVE_GETTIMEOFDAY

graalpython/com.oracle.graal.python.cext/src/call.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@
55
#include "pycore_pyerrors.h" // _PyErr_Occurred()
66
#include "pycore_pystate.h" // _PyThreadState_GET()
77
#include "pycore_tuple.h" // _PyTuple_ITEMS()
8-
#include "frameobject.h" // _PyFrame_New_NoTrack()
9-
10-
11-
static PyObject *const *
12-
_PyStack_UnpackDict(PyThreadState *tstate,
13-
PyObject *const *args, Py_ssize_t nargs,
14-
PyObject *kwargs, PyObject **p_kwnames);
15-
16-
static void
17-
_PyStack_UnpackDict_Free(PyObject *const *stack, Py_ssize_t nargs,
18-
PyObject *kwnames);
198

209

2110
static PyObject *

0 commit comments

Comments
 (0)