diff options
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r-- | Modules/arraymodule.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 16e3739..1a59938 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -2679,6 +2679,15 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return NULL; } + if (c == 'u') { + if (PyErr_WarnEx(PyExc_DeprecationWarning, + "The 'u' type code is deprecated and " + "will be removed in Python 3.16", + 1)) { + return NULL; + } + } + bool is_unicode = c == 'u' || c == 'w'; if (initial && !is_unicode) { |