Skip to content

gh-142083: Clarify documentation for array('u') typecode - #142323

Closed
Sweekar-cmd wants to merge 2 commits into
python:mainfrom
Sweekar-cmd:fix-array-docstring-142083
Closed

gh-142083: Clarify documentation for array('u') typecode#142323
Sweekar-cmd wants to merge 2 commits into
python:mainfrom
Sweekar-cmd:fix-array-docstring-142083

Conversation

@Sweekar-cmd

@Sweekar-cmdSweekar-cmd commented Dec 5, 2025

Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown

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

python-cla-botBot commented Dec 5, 2025

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@Sweekar-cmdSweekar-cmd changed the title Clarify documentation for array('u') typecodegh-142083: Clarify documentation for array('u') typecodeDec 5, 2025
@vstinner

Copy link
Copy Markdown
Member

Your PR doesn't build successfully. Your change is not correct.

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actionsgithub-actionsBot added the stale Stale PR or inactive for long period of time. label May 3, 2026
@Sweekar-cmd

Copy link
Copy Markdown
Author

Closing this PR for now as the change needs more investigation and alignment with CPython internals.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting reviewstaleStale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Sweekar-cmd@vstinner