8000 gh-80480: Emit DeprecationWarning for array's 'u' type code by hugovk · Pull Request #95760 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-80480: Emit DeprecationWarning for array's 'u' type code #95760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jun 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
< 8000 /details-menu>
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
Prev Previous commit
Next Next commit
Bump removal for Python 3.15
  • Loading branch information
hugovk committed May 23, 2023
commit 2fb57bc5ad9744f62b7f0684d97143be3fb27a22
2 changes: 1 addition & 1 deletion Doc/library/array.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Notes:
``Py_UNICODE``. This change doesn't affect its behavior because
``Py_UNICODE`` is alias of ``wchar_t`` since Python 3.3.

.. deprecated-removed:: 3.3 3.14
.. deprecated-removed:: 3.3 3.15


The actual representation of values is determined by the machine architecture
Expand Down
3 changes: 0 additions & 3 deletions Doc/whatsnew/3.12.rst
Original file line number Diff line number Diff line change
Expand Up @@ -854,9 +854,6 @@ APIs:

* Creating :c:data:`immutable types <Py_TPFLAGS_IMMUTABLETYPE>` with mutable
bases using the C API (:gh:`95388`)
* :mod:`array`'s ``'u'`` format code, deprecated in docs since Python 3.3,
emits :exc:`DeprecationWarning` since 3.12
(contributed by Hugo van Kemenade in :gh:`80480`)

* Deprecated :class:`collections.abc.ByteString`.
Prefer :class:`Sequence` or :class:`collections.abc.Buffer`.
Expand Down
5 changes: 5 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ Optimizations
Deprecated
==========

Pending Removal in Python 3.15
------------------------------

* :mod:`array`'s ``'u'`` format code, deprecated in docs since Python 3.3,
emits :exc:`DeprecationWarning` since 3.13
(contributed by Hugo van Kemenade in :gh:`80480`)

Removed
=======
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def setUp(self):
warnings.filterwarnings(
"ignore",
message="The 'u' type code is deprecated and "
"will be removed in Python 3.14",
"will be removed in Python 3.15",
category=DeprecationWarning)

def test_error(self):
Expand Down
2 changes: 1 addition & 1 deletion Modules/arraymodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2617,7 +2617,7 @@ array_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
if (c == 'u') {
if (PyErr_WarnEx(PyExc_DeprecationWarning,
"The 'u' type code is deprecated and "
"will be removed in Python 3.14",
"will be removed in Python 3.15",
1)) {
return NULL;
}
Expand Down
0