You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
array: Add 'w' type and deprecate 'u' type. #80480
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2019-03-15.05:50:02.657>labels= ['3.8', 'library']
title="array: Deprecate 'u' type in array module"updated_at=<Date2020-04-23.00:47:43.731>user='https://github.com/methane'
Even though this has been deprecated in the docs since 3.3, it doesn't seem to raise a DeprecationWarning. If we want to remove it we should add the warning, and then remove it in a later version. The documentation should also be updated according to the plan (see #93986).
I dislike the fact that array.array('u') is only deprecated in the doc. I would prefer to either emit a DeprecationWarning at runtime, or remove the deprecation. See also issue #105373. I'm fine with really deprecating it if someone wants to submit a PR (@methane ?).
Activity
ezio-melotti commentedon Aug 4, 2022
Even though this has been deprecated in the docs since 3.3, it doesn't seem to raise a
DeprecationWarning. If we want to remove it we should add the warning, and then remove it in a later version. The documentation should also be updated according to the plan (see #93986).pythongh-80480 Deprecate array's 'u' type code
fixup! pythongh-80480 Deprecate array's 'u' type code
fixup! pythongh-80480 Deprecate array's 'u' type code
pythongh-80480 Deprecate array's 'u' type code
pythongh-80480 Deprecate array's 'u' type code
pythongh-80480 Emit DeprecationWarning for array's 'u' type code
pythongh-80480 Emit DeprecationWarning for array's 'u' type code
pythongh-80480 Emit DeprecationWarning for array's 'u' type code
pythongh-80480 Emit DeprecationWarning for array's 'u' type code
hugovk commentedon Aug 7, 2022
Please see PR #95760 to emit a
DeprecationWarning.pythongh-80480: Simplify test
hugovk commentedon Nov 27, 2022
@methane Would you be able to look into this? It would be good to have the replacement ready when we start emitting deprecation warnings.
hugovk commentedon May 2, 2023
The 3.12 beta feature freeze is in a week, so we will likely need to target changing this in 3.13 with removal in 3.15.
encukou commentedon May 9, 2023
How about:
'w'for Py_UCS4.wreach end of life'u', and remove it in the future.Is there a reason to rush this?
methane commentedon May 10, 2023
array('u')will cause bugs and almost no valid use case for it.So waiting deprecation 5+ years seems too slow.
On the other hand, I don't hurry about removing it.
I can wait 3+ releases instead of minimum 2 releases.
My plan is:
[-]array: Deprecate 'u' type in array module[/-][+]array: Add 'w' type and deprecate 'u' type.[/+]gh-80480: array: Add 'w' typecode. (#105242)
vstinner commentedon Jun 6, 2023
@methane added
array.array('w')format to Python 3.13.@methane: Would you mind to also document the addition with
versionchangedin https://docs.python.org/dev/library/array.html ? Currently, it's only documented at: https://docs.python.org/dev/whatsnew/3.13.html#arrayvstinner commentedon Jun 6, 2023
I dislike the fact that
array.array('u')is only deprecated in the doc. I would prefer to either emit a DeprecationWarning at runtime, or remove the deprecation. See also issue #105373. I'm fine with really deprecating it if someone wants to submit a PR (@methane ?).hugovk commentedon Jun 6, 2023
@vstinner PR already open at #95760 :)
gh-80480: Emit DeprecationWarning for array's 'u' type code (#95760)
hugovk commentedon Jun 11, 2023
Done in #105242 and #95760.
Let's close this issue and come back to this in four years.
pythongh-80480: remove deprecated 'u' type code (array)
gh-80480: Remove deprecated 'u' array type code (#149535)
vstinner commentedon Jun 1, 2026
The
arrayutype has been removed by the PR gh-149535.