Skip to content

Conversation

@Sweekar-cmd
Copy link

@Sweekar-cmd Sweekar-cmd commented Dec 5, 2025

This PR updates the documentation for the array('u') typecode to match current CPython behavior.

Changes:

  • Clarifies that array('u') stores characters using the platform wchar_t size.
  • Notes typical sizes: 2 bytes on Windows (UTF-16) and 4 bytes on most Unix-like systems (UTF-32).
  • Adds the deprecation notice: array('u') has been deprecated since Python 3.3 and will be removed in Python 3.16.
  • Recommends using array('w'), which stores Unicode characters as 4-byte Py_UCS4.

This makes the docstring accurate and consistent with the official documentation.

@bedevere-app
Copy link

bedevere-app bot commented Dec 5, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app
Copy link

bedevere-app bot commented Dec 5, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@python-cla-bot
Copy link

python-cla-bot bot commented Dec 5, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@Sweekar-cmd Sweekar-cmd changed the title Clarify documentation for array('u') typecode gh-142083: Clarify documentation for array('u') typecode Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant