GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-80480: remove deprecated 'u' type code (array) by skirpichev · Pull Request #149535 · python/cpython

Conversation

@skirpichev

@skirpichev skirpichev commented May 8, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member
  • Issue: array: Add 'w' type and deprecate 'u' type. #80480

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot mentioned this pull request May 8, 2026
array: Add 'w' type and deprecate 'u' type. #80480
Closed
@read-the-docs-community

read-the-docs-community Bot commented May 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32933925 | 📁 Comparing 37738f4 against main (4ae1a26)

  🔍 Preview build  

77 files changed · + 1 added · ± 76 modified

+ Added

  • deprecations/pending-removal-in-3.21.html

± Modified

  • glossary.html
  • index.html
  • c-api/dict.html
  • c-api/import.html
  • c-api/sentinel.html
  • c-api/slots.html
  • c-api/stable.html
  • c-api/threads.html
  • c-api/unicode.html
  • deprecations/index.html
  • and 66 more...
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@skirpichev
pythongh-80480: remove deprecated 'u' type code (array)
2009a2d
@skirpichev
skirpichev force-pushed the remove-array-u branch from 3cd2694 to 2009a2d Compare May 8, 2026 06:42
sobolevn
sobolevn reviewed May 8, 2026
View reviewed changes

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, don't forget to fix docs in Doc/library/array.rst

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

skirpichev reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@skirpichev
fix sphinx docs
ec60c14
@skirpichev
skirpichev marked this pull request as ready for review May 8, 2026 07:28
@skirpichev
skirpichev requested a review from AA-Turner as a code owner May 8, 2026 07:28
@bedevere-app bedevere-app Bot added the awaiting review label May 8, 2026
@skirpichev
skirpichev requested a review from sobolevn May 8, 2026 08:04
sobolevn
sobolevn reviewed May 8, 2026
View reviewed changes

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I am not a module expert, so let's wait for one to merge this :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@skirpichev
Merge branch 'main' into remove-array-u
07f5c10
@skirpichev

skirpichev commented May 31, 2026

Copy link
Copy Markdown
Member Author

CC @vstinner

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vstinner
vstinner reviewed Jun 1, 2026
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find remaining references to the u format in (updated) array, memoryview and struct: good!

Note: ctypes.c_wchar uses _type_ = "u" but this type code is unrelated to struct type codes. This ctypes is not deprecated.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Doc/whatsnew/3.16.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_array.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Lib/test/test_re.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/arraymodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

skirpichev added 4 commits June 1, 2026 13:45
@skirpichev
Merge branch 'master' into remove-array-u
09eaa55
@skirpichev
address review: add assert
16878f3
@skirpichev
address review: news
caa484b
@skirpichev
address review: reuse array.typecodes
37738f4
@skirpichev
skirpichev requested a review from vstinner June 1, 2026 11:03
@vstinner

vstinner commented Jun 1, 2026

Copy link
Copy Markdown
Member

Tests / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm) (pull_request)Failing after 1m
Tests / Ubuntu / build and test (ubuntu-24.04-arm) (pull_request)Failing after 1m
Tests / WASI / build and test (pull_request)Failing after 1m

Strange, the 3 jobs failed with Error: The operation was canceled. Canceled by what? I will re-run these jobs once other jobs completed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vstinner
vstinner approved these changes Jun 1, 2026
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the update.

Reuse array.typecodes makes the code easier to maintain.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Jun 1, 2026
@vstinner
vstinner enabled auto-merge (squash) June 1, 2026 11:10
@vstinner
vstinner merged commit 46b5e3e into python:main Jun 1, 2026
102 of 106 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Jun 1, 2026
@skirpichev
skirpichev deleted the remove-array-u branch June 1, 2026 11:58
@vstinner

vstinner commented Jun 1, 2026

Copy link
Copy Markdown
Member

Merged. Thanks for the change.

skirpichev reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Jun 1, 2026

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Debian root 3.x (tier-1) has failed when building commit 46b5e3e.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/345/builds/14390) and take a look at the build logs.
  4. Check if the failure is related to this commit (46b5e3e) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/345/builds/14390

Failed tests:

  • test_embed

Failed subtests:

  • test_thread_state_ensure - test.test_embed.AuditingTests.test_thread_state_ensure

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_embed.py", line 2036, in test_thread_state_ensure
    self.run_embedded_interpreter("test_thread_state_ensure")
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_embed.py", line 161, in run_embedded_interpreter
    self.assertEqual(p.returncode, returncode,
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
                     "bad returncode %d, stderr is %r" %
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                     (p.returncode, err))
                     ^^^^^^^^^^^^^^^^^^^^
AssertionError: -6 != 0 : bad returncode -6, stderr is "_testembed: ./Programs/_testembed.c:2741: test_thread_state_ensure: Assertion `_Py_atomic_load_int(&data.done) == 1' failed.\n"


Traceback (most recent call last):
  File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py", line 948, in gc_collect
    gc.collect()
    ~~~~~~~~~~^^
ResourceWarning: unclosed file <_io.FileIO name=13 mode='wb' closefd=True>


Traceback (most recent call last):
  File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py", line 948, in gc_collect
    gc.collect()
    ~~~~~~~~~~^^
ResourceWarning: unclosed file <_io.FileIO name=11 mode='wb' closefd=True>
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Jun 1, 2026

Copy link
Copy Markdown
Member

Hi! The buildbot AMD64 Debian root 3.x (tier-1) has failed when building commit 46b5e3e.
test_thread_state_ensure - test.test_embed.AuditingTests.test_thread_state_ensure

That's the unrelated issue gh-150391.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

@sobolevn sobolevn sobolevn left review comments
@vstinner vstinner vstinner approved these changes
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@skirpichev @vstinner @bedevere-bot @sobolevn
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.