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-121249: remove F/D type codes from table in the struct module by skirpichev · Pull Request #149346 · python/cpython

Conversation

@skirpichev

@skirpichev skirpichev commented May 4, 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: Add support for C99 complex type (_Complex) to the struct module #121249

Sorry, something went wrong.

Uh oh!

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

All reactions
@skirpichev
pythongh-121249: deprecate support for complex types in the struct mo…
ec9cf6b
…dule
@skirpichev
skirpichev requested a review from AA-Turner as a code owner May 4, 2026 03:20
@bedevere-app bedevere-app Bot added the docs Documentation in the Doc dir label May 4, 2026
@github-project-automation github-project-automation Bot added this to Docs PRs May 4, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs May 4, 2026
@bedevere-app bedevere-app Bot added the awaiting review label May 4, 2026
@bedevere-app bedevere-app Bot mentioned this pull request May 4, 2026
Add support for C99 complex type (_Complex) to the struct module #121249
Closed
@skirpichev skirpichev mentioned this pull request May 4, 2026
Decide buffer protocol format string for complex numbers python/steering-council#345
Closed
@read-the-docs-community

read-the-docs-community Bot commented May 4, 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 #33323752 | 📁 Comparing 2da1b85 against main (3efd2f4)

  🔍 Preview build  

212 files changed · + 5 added · ± 207 modified

+ Added

  • c-api/slots.html
  • deprecations/pending-removal-in-3.21.html
  • howto/abi3t-migration.html
  • library/asyncio-threading.html
  • whatsnew/3.16.html

± Modified

  • bugs.html
  • glossary.html
  • index.html
  • py-modindex.html
  • c-api/bytes.html
  • c-api/complex.html
  • c-api/concrete.html
  • c-api/coro.html
  • c-api/dict.html
  • c-api/exceptions.html
  • and 197 more...
All reactions

Sorry, something went wrong.

Uh oh!

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

hugovk
hugovk reviewed May 4, 2026
View reviewed changes
Comment thread Doc/library/struct.rst Resolved

Uh oh!

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

@serhiy-storchaka

serhiy-storchaka commented May 4, 2026

Copy link
Copy Markdown
Member

What is the reason for deprecation? Also, why is it linked to an issue closed long time ago?

All reactions

Sorry, something went wrong.

Uh oh!

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

@skirpichev

skirpichev commented May 4, 2026

Copy link
Copy Markdown
Member Author

What is the reason for deprecation?

It's an alternative to #148676, see python/steering-council#345 (comment)

There are 3 PRs:

  • gh-148675: Revert GH-146237 and GH-146241 #148674
  • this
  • gh-61103: use PEP 3118 codes in the ctypes #149344

Also, why is it linked to an issue closed long time ago?

Reopened, thanks.

All reactions

Sorry, something went wrong.

Uh oh!

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

@encukou

encukou commented May 4, 2026

Copy link
Copy Markdown
Member

I'm -1.

@hugovk any objections to deprecating in a later beta, rather than b1? That would mean we don't need to decide now.

All reactions

Sorry, something went wrong.

Uh oh!

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

@skirpichev skirpichev closed this May 4, 2026
@skirpichev
skirpichev deleted the struct-deprecate-complex branch May 4, 2026 15:09
@skirpichev
skirpichev restored the struct-deprecate-complex branch May 5, 2026 02:18
skirpichev added 4 commits May 5, 2026 05:30
@skirpichev
Merge branch 'master' into struct-deprecate-complex
270bbe9
@skirpichev
adjust news
ae6c3c0
@skirpichev
remove F/D from table
8312af8
@skirpichev
delay deprecation, as recommended in PEP 387
0e600a5
@skirpichev skirpichev reopened this May 5, 2026
@skirpichev skirpichev changed the title gh-121249: deprecate support for complex types in the struct module gh-121249: deprecate support for F/D type codes in the struct module May 5, 2026
@skirpichev
skirpichev requested a review from vstinner May 5, 2026 02:41
@skirpichev
fix format
344d2be
@skirpichev

skirpichev commented May 5, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

I removed F/D types from the table and postponed removal to 3.20. I think it's now along line of using two-letters type codes in the array, ctypes and for memoryvieweverywhere.

CC @vstinner

Edit: Alternatively - we could just drop old type codes from the table (no deprecation).

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented May 6, 2026

Copy link
Copy Markdown
Member

It's too late to introduce a deprecation in Python 3.15. We can reconsider a deprecation in Python 3.16.

All reactions

Sorry, something went wrong.

Uh oh!

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

skirpichev added 2 commits May 7, 2026 05:20
@skirpichev
Merge branch 'master' into struct-deprecate-complex
4949502
@skirpichev
revert
9a69e5a
@skirpichev skirpichev added the skip news label May 7, 2026
@skirpichev skirpichev changed the title gh-121249: deprecate support for F/D type codes in the struct module gh-121249: remove F/D type codes from table in the struct module May 7, 2026
@vstinner

vstinner commented May 18, 2026

Copy link
Copy Markdown
Member

I would like to hear the Steering Council opinion on this question.

All reactions

Sorry, something went wrong.

Uh oh!

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

@skirpichev skirpichev added the needs backport to 3.15 bugs and security fixes label May 18, 2026
@skirpichev

skirpichev commented May 18, 2026

Copy link
Copy Markdown
Member Author

I would like to hear the Steering Council opinion on this question.

@vstinner, what does require SC decision on this? It's regular documentation change, no deprecations.

All reactions

Sorry, something went wrong.

Uh oh!

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

@skirpichev

skirpichev commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

CC @warsaw as SC voice in python/steering-council#345, per Victor's request.

All reactions

Sorry, something went wrong.

Uh oh!

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

@vstinner

vstinner commented Jun 3, 2026

Copy link
Copy Markdown
Member

I created the issue python/steering-council#352 for the Steering Council to "Deprecated F and D format in the struct module in Python 3.16".

All reactions

Sorry, something went wrong.

Uh oh!

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

@skirpichev skirpichev mentioned this pull request Jun 5, 2026
Deprecated F and D format in the struct module in Python 3.16 (use Zf and Zd instead) python/steering-council#352
Closed
skirpichev added 2 commits June 26, 2026 11:49
@skirpichev
Merge branch 'master' into struct-deprecate-complex
7fc81fc
@skirpichev
Soft-deprecate F/D formats per SC decision
01fd839
@vstinner

vstinner commented Jun 26, 2026

Copy link
Copy Markdown
Member

Hi, the SC decision is to soft deprecate in Python 3.15 and deprecate in Python 3.16: python/steering-council#352 (comment) Currently, the PR does soft deprecate in Python 3.16.

Do you want to create a Python 3.15 PR to soft deprecate and a Python 3.16 to deprecate?

All reactions

Sorry, something went wrong.

Uh oh!

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

@skirpichev

skirpichev commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

Currently, the PR does soft deprecate in Python 3.16.

No, it does this for v3.15 entry. I'll add news entry and then this will be ready for a backport.

I'll do a separate pr for v3.16 one something like this (soft-deprecation) will be merged.

All reactions

Sorry, something went wrong.

Uh oh!

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

skirpichev added 2 commits June 26, 2026 14:12
@skirpichev
+ news
31e9440
@skirpichev
grammar
e1f7c0e
vstinner
vstinner reviewed Jun 26, 2026
View reviewed changes
Comment thread Doc/deprecations/soft-deprecations.rst Resolved

Uh oh!

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

Comment thread Doc/whatsnew/3.15.rst Resolved

Uh oh!

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

@vstinner

vstinner commented Jun 26, 2026

Copy link
Copy Markdown
Member

No, it does this for v3.15 entry. I'll add news entry and then this will be ready for a backport. I'll do a separate pr for v3.16 one something like this (soft-deprecation) will be merged.

I see that the soft deprecation must be documented in What's New In Python 3.15 document which is also part of the main branch, so ok, it makes sense :-)

All reactions

Sorry, something went wrong.

Uh oh!

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

@skirpichev @vstinner
Apply suggestions from code review
2da1b85
Co-authored-by: Victor Stinner <[email protected]>
vstinner
vstinner approved these changes Jun 26, 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

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 26, 2026
@vstinner
vstinner merged commit 5f17434 into python:main Jun 26, 2026
34 checks passed

Uh oh!

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

@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jun 26, 2026
@miss-islington-app

miss-islington-app Bot commented Jun 26, 2026

Copy link
Copy Markdown

Thanks @skirpichev for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting merge label Jun 26, 2026
@miss-islington-app

miss-islington-app Bot commented Jun 26, 2026

Copy link
Copy Markdown

Sorry, @skirpichev and @vstinner, I could not cleanly backport this to 3.15 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 5f17434a1ec9a121eb38f71dc3d5809020b5fbb4 3.15
All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington-app miss-islington-app Bot assigned vstinner Jun 26, 2026
@bedevere-app

bedevere-app Bot commented Jun 26, 2026

Copy link
Copy Markdown

GH-152274 is a backport of this pull request to the 3.15 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Jun 26, 2026
@skirpichev
skirpichev deleted the struct-deprecate-complex branch June 26, 2026 13:36
vstinner added a commit that referenced this pull request Jun 26, 2026
@vstinner @skirpichev
[3.15] gh-121249: Soft deprecate F and D struct format types (#149346) (
f2402cb
#152274)

gh-121249: Soft deprecate F and D struct format types (#149346)

Remove F/D type codes from table in the struct module documentation.


(cherry picked from commit 5f17434)

Co-authored-by: Sergey B Kirpichev <[email protected]>
@vstinner

vstinner commented Jun 26, 2026

Copy link
Copy Markdown
Member

Thanks, I merged your PR to soft deprecate F and D type codes. I'm now waiting for your 3.16 change to (hard) deprecate these type codes :-)

All reactions

Sorry, something went wrong.

Uh oh!

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

@skirpichev

skirpichev commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

FYI: #152309

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

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

Uh oh!

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

Assignees

@vstinner vstinner

Labels

docs Documentation in the Doc dir skip news

Projects

Docs PRs
Status: Done

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.

5 participants

@skirpichev @serhiy-storchaka @encukou @vstinner @hugovk
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.