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 the __dict__ and __weakref__ __slots__ for any class by serhiy-storchaka · Pull Request #141755 · 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--141755.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 the __dict__ and __weakref__ __slots__…
b42a86a
… for any class
@serhiy-storchaka
serhiy-storchaka requested a review from encukou November 19, 2025 15:30
@serhiy-storchaka
serhiy-storchaka requested review from AA-Turner, markshannon and willingc as code owners November 19, 2025 15:30
@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
@serhiy-storchaka serhiy-storchaka mentioned this pull request Nov 19, 2025
gh-103740: Improve support of __slots__ for variable-length classes #141636
Closed
encukou
encukou reviewed Nov 19, 2025
View reviewed changes

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

This looks good, thank you!

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Lib/test/test_descr.py Resolved

Uh oh!

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

Comment thread Lib/test/test_descr.py Resolved

Uh oh!

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

Comment thread Objects/typeobject.c Resolved

Uh oh!

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

@serhiy-storchaka @encukou
Apply suggestions from code review
66fa445
Co-authored-by: Petr Viktorin <[email protected]>
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) November 19, 2025 16:47
@serhiy-storchaka
serhiy-storchaka merged commit 4bcab46 into python:main Nov 19, 2025
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 Nov 19, 2025
@bedevere-bot

bedevere-bot commented Nov 19, 2025

Copy link
Copy Markdown

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

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

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

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/support/__init__.py", line 847, 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 847, 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.

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Nov 19, 2025
@serhiy-storchaka
pythongh-41779: Allow defining the __dict__ and __weakref__ __slots__…
6865073
… for any class (pythonGH-141755)
StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
@serhiy-storchaka @StanFromIreland
pythongh-41779: Allow defining the __dict__ and __weakref__ __slots__…
b4b4f60
… for any class (pythonGH-141755)
ashm-dev pushed a commit to ashm-dev/cpython that referenced this pull request Dec 8, 2025
@serhiy-storchaka @ashm-dev
pythongh-41779: Allow defining the __dict__ and __weakref__ __slots__…
abda153
… for any class (pythonGH-141755)
@serhiy-storchaka
serhiy-storchaka deleted the special-slots-with-items3 branch July 1, 2026 16:47
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 @bedevere-bot @encukou
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.