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-41779: Allow defining any __slots__ for a class derived from tuple by serhiy-storchaka · Pull Request #141763 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Nov 19, 2025 •
edited by github-actions Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member
  • Issue: __slots__ for subclasses of variable length types #41779

📚 Documentation preview 📚: https://cpython-previews--141763.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

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

All reactions
@serhiy-storchaka
pythongh-41779: Allow defining any __slots__ for a class derived from…
a452fce
… tuple
@serhiy-storchaka
serhiy-storchaka requested a review from encukou November 19, 2025 18:50
@serhiy-storchaka
serhiy-storchaka requested review from AA-Turner, markshannon and willingc as code owners November 19, 2025 18:50
@bedevere-app bedevere-app Bot added the awaiting core review label Nov 19, 2025
@bedevere-app bedevere-app Bot mentioned this pull request Nov 19, 2025
__slots__ for subclasses of variable length types #41779
Closed
encukou
encukou reviewed Nov 21, 2025
View reviewed changes
Comment thread Objects/typeobject.c Resolved

Uh oh!

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

Comment thread Python/specialize.c
Comment on lines +814 to +817
if (dmem->flags & _Py_AFTER_ITEMS) {
SPECIALIZATION_FAIL(LOAD_ATTR, SPEC_FAIL_ATTR_SLOT_AFTER_ITEMS);
return -1;
}

@encukou encukou Nov 21, 2025

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.

This looks OK but I don't know enough about the specializer to review properly.

Sorry, something went wrong.

Uh oh!

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

All reactions
serhiy-storchaka added 2 commits November 21, 2025 18:13
@serhiy-storchaka
Merge branch 'main' into slots-after-items
cfa6fe9
@serhiy-storchaka
Clean up.
b38b8b8
@encukou

encukou commented Nov 24, 2025

Copy link
Copy Markdown
Member

@markshannon Is this compatible with the laout you had in mind for the “Grand Unified Python Object Layout”?

All reactions

Sorry, something went wrong.

Uh oh!

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

@serhiy-storchaka
Merge branch 'main' into slots-after-items
46bb64c
@serhiy-storchaka

serhiy-storchaka commented Jan 4, 2026

Copy link
Copy Markdown
Member Author

Let's merge this, and fix possible issues if they occur later.

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

@serhiy-storchaka
serhiy-storchaka merged commit 4d21297 into python:main Jan 6, 2026
46 checks passed

Uh oh!

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

@bedevere-app bedevere-app Bot removed the awaiting core review label Jan 6, 2026
@serhiy-storchaka
serhiy-storchaka deleted the slots-after-items branch January 6, 2026 09:36
@bedevere-bot

bedevere-bot commented Jan 6, 2026

Copy link
Copy Markdown

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

Hi! The buildbot ARM64 macOS 3.x (tier-2) has failed when building commit 4d21297.

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/725/builds/12464) and take a look at the build logs.
  4. Check if the failure is related to this commit (4d21297) 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/725/builds/12464

Failed tests:

  • test_urllib2net

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

==

Click to see traceback logs
remote: Enumerating objects: 24, done.        
remote: Counting objects:   4% (1/23)        
remote: Counting objects:   8% (2/23)        
remote: Counting objects:  13% (3/23)        
remote: Counting objects:  17% (4/23)        
remote: Counting objects:  21% (5/23)        
remote: Counting objects:  26% (6/23)        
remote: Counting objects:  30% (7/23)        
remote: Counting objects:  34% (8/23)        
remote: Counting objects:  39% (9/23)        
remote: Counting objects:  43% (10/23)        
remote: Counting objects:  47% (11/23)        
remote: Counting objects:  52% (12/23)        
remote: Counting objects:  56% (13/23)        
remote: Counting objects:  60% (14/23)        
remote: Counting objects:  65% (15/23)        
remote: Counting objects:  69% (16/23)        
remote: Counting objects:  73% (17/23)        
remote: Counting objects:  78% (18/23)        
remote: Counting objects:  82% (19/23)        
remote: Counting objects:  86% (20/23)        
remote: Counting objects:  91% (21/23)        
remote: Counting objects:  95% (22/23)        
remote: Counting objects: 100% (23/23)        
remote: Counting objects: 100% (23/23), done.        
remote: Compressing objects:   5% (1/20)        
remote: Compressing objects:  10% (2/20)        
remote: Compressing objects:  15% (3/20)        
remote: Compressing objects:  20% (4/20)        
remote: Compressing objects:  25% (5/20)        
remote: Compressing objects:  30% (6/20)        
remote: Compressing objects:  35% (7/20)        
remote: Compressing objects:  40% (8/20)        
remote: Compressing objects:  45% (9/20)        
remote: Compressing objects:  50% (10/20)        
remote: Compressing objects:  55% (11/20)        
remote: Compressing objects:  60% (12/20)        
remote: Compressing objects:  65% (13/20)        
remote: Compressing objects:  70% (14/20)        
remote: Compressing objects:  75% (15/20)        
remote: Compressing objects:  80% (16/20)        
remote: Compressing objects:  85% (17/20)        
remote: Compressing objects:  90% (18/20)        
remote: Compressing objects:  95% (19/20)        
remote: Compressing objects: 100% (20/20)        
remote: Compressing objects: 100% (20/20), done.        
remote: Total 24 (delta 3), reused 3 (delta 3), pack-reused 1 (from 1)        
From https://github.com/python/cpython
 * branch                    main       -> FETCH_HEAD
Note: switching to '4d21297d288f17c0db775605e2543749840e46b2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 4d21297d288 gh-41779: Allow defining any __slots__ for a class derived from tuple (GH-141763)
Switched to and reset branch 'main'

make: *** [buildbottest] Error 2
All reactions

Sorry, something went wrong.

Uh oh!

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

thunder-coding pushed a commit to thunder-coding/cpython that referenced this pull request Feb 15, 2026
@serhiy-storchaka @thunder-coding
pythongh-41779: Allow defining any __slots__ for a class derived from…
ed979b6
… tuple (pythonGH-141763)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@encukou encukou encukou left review comments
@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner
@willingc willingc Awaiting requested review from willingc willingc 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.

3 participants

@serhiy-storchaka @encukou @bedevere-bot
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.