Skip to content

gh-121249: remove F/D type codes from table in the struct module - #149346

Merged
vstinner merged 14 commits into
python:mainfrom
skirpichev:struct-deprecate-complex
Jun 26, 2026
Merged

gh-121249: remove F/D type codes from table in the struct module#149346
vstinner merged 14 commits into
python:mainfrom
skirpichev:struct-deprecate-complex

Conversation

@skirpichev

@skirpichevskirpichev commented May 4, 2026

Copy link
Copy Markdown
Member

@read-the-docs-community

read-the-docs-communityBot commented May 4, 2026

Copy link
Copy Markdown

Comment threadDoc/library/struct.rst Outdated
@serhiy-storchaka

Copy link
Copy Markdown
Member

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

@skirpichev

Copy link
Copy Markdown
MemberAuthor

What is the reason for deprecation?

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

There are 3 PRs:

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

Reopened, thanks.

@encukou

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.

@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
@skirpichevskirpichev reopened this May 5, 2026
@skirpichevskirpichev changed the title gh-121249: deprecate support for complex types in the struct modulegh-121249: deprecate support for F/D type codes in the struct moduleMay 5, 2026
@skirpichev
skirpichev requested a review from vstinnerMay 5, 2026 02:41
@skirpichev

skirpichev commented May 5, 2026

Copy link
Copy Markdown
MemberAuthor

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).

@vstinner

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.

@skirpichevskirpichev changed the title gh-121249: deprecate support for F/D type codes in the struct modulegh-121249: remove F/D type codes from table in the struct moduleMay 7, 2026
@vstinner

Copy link
Copy Markdown
Member

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

@skirpichevskirpichev added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 18, 2026
@skirpichev

Copy link
Copy Markdown
MemberAuthor

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.

@skirpichev

Copy link
Copy Markdown
MemberAuthor

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

@vstinner

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".

@vstinner

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?

@skirpichev

Copy link
Copy Markdown
MemberAuthor

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.

Comment threadDoc/deprecations/soft-deprecations.rst Outdated
Comment threadDoc/whatsnew/3.15.rst Outdated
@vstinner

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 :-)

Co-authored-by: Victor Stinner <vstinner@python.org>

@vstinnervstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@vstinner
vstinner merged commit 5f17434 into python:mainJun 26, 2026
34 checks passed
@github-project-automationgithub-project-automationBot moved this from Todo to Done in Docs PRsJun 26, 2026
@miss-islington-app

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.
🐍🍒⛏🤖

@miss-islington-app

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

@bedevere-app

Copy link
Copy Markdown

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

@bedevere-appbedevere-appBot removed the needs backport to 3.15 pre-release feature fixes, 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
#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 <skirpichev@gmail.com>
@vstinner

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 :-)

@skirpichev

Copy link
Copy Markdown
MemberAuthor

FYI: #152309

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

Labels

docsDocumentation in the Doc dirskip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants

@skirpichev@serhiy-storchaka@encukou@vstinner@hugovk