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-91126: Docs and tests for slotted dataclasses with `__init_subclass__` by sobolevn · Pull Request #123342 · python/cpython

Conversation

@sobolevn

@sobolevn sobolevn commented Aug 26, 2024 •
edited by github-actions Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member
  • Issue: dataclass(slots=True) incompatible with __init_subclass__ #91126

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

Sorry, something went wrong.

Uh oh!

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

All reactions
@sobolevn
pythongh-91126: Docs and tests for slotted dataclasses with `__init_s…
0939d82
…ubclass__`
@sobolevn
sobolevn requested a review from carljm August 26, 2024 15:38
@sobolevn
sobolevn requested a review from ericvsmith as a code owner August 26, 2024 15:38
@bedevere-app bedevere-app Bot mentioned this pull request Aug 26, 2024
dataclass(slots=True) incompatible with __init_subclass__ #91126
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Aug 26, 2024
@sobolevn sobolevn added skip news needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes labels Aug 26, 2024
@sobolevn

sobolevn commented Aug 26, 2024

Copy link
Copy Markdown
Member Author

New look: https://cpython-previews--123342.org.readthedocs.build/en/123342/library/dataclasses.html

Снимок экрана 2024-08-26 в 18 45 01
All reactions

Sorry, something went wrong.

Uh oh!

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

carljm
carljm reviewed Aug 26, 2024
View reviewed changes

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

Thanks!

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Doc/library/dataclasses.rst Resolved

Uh oh!

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

Comment thread Lib/test/test_dataclasses/__init__.py Resolved

Uh oh!

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

@sobolevn
Address review
c5ac016
carljm
carljm approved these changes Aug 26, 2024
View reviewed changes

@carljm carljm 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 core review labels Aug 26, 2024
@sobolevn

sobolevn commented Aug 26, 2024

Copy link
Copy Markdown
Member Author

I will wait a bit for @ericvsmith's review and merge it in a couple of days. Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

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

@sobolevn
sobolevn merged commit 75e7282 into python:main Sep 1, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Sep 1, 2024
@miss-islington-app

miss-islington-app Bot commented Sep 1, 2024

Copy link
Copy Markdown

Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 1, 2024
@sobolevn @miss-islington
pythongh-91126: Docs and tests for slotted dataclasses with `__init_s…
9265957
…ubclass__` (pythonGH-123342)

(cherry picked from commit 75e7282)

Co-authored-by: sobolevn <[email protected]>
@bedevere-app

bedevere-app Bot commented Sep 1, 2024

Copy link
Copy Markdown

GH-123568 is a backport of this pull request to the 3.13 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.13 only security fixes label Sep 1, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 1, 2024
@sobolevn @miss-islington
pythongh-91126: Docs and tests for slotted dataclasses with `__init_s…
33a044b
…ubclass__` (pythonGH-123342)

(cherry picked from commit 75e7282)

Co-authored-by: sobolevn <[email protected]>
@sobolevn

sobolevn commented Sep 1, 2024

Copy link
Copy Markdown
Member Author

One week later - merging :)

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-app

bedevere-app Bot commented Sep 1, 2024

Copy link
Copy Markdown

GH-123569 is a backport of this pull request to the 3.12 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.12 only security fixes label Sep 1, 2024
sobolevn added a commit that referenced this pull request Sep 1, 2024
@miss-islington @sobolevn
[3.12] gh-91126: Docs and tests for slotted dataclasses with `__init_…
12db938
…subclass__` (GH-123342) (#123569)

gh-91126: Docs and tests for slotted dataclasses with `__init_subclass__` (GH-123342)
(cherry picked from commit 75e7282)

Co-authored-by: sobolevn <[email protected]>
@sobolevn sobolevn mentioned this pull request Sep 1, 2024
Improve weakref_slot docs in dataclasses.rst #123570
Closed
sobolevn added a commit that referenced this pull request Sep 1, 2024
@miss-islington @sobolevn
[3.13] gh-91126: Docs and tests for slotted dataclasses with `__init_…
cfdf376
…subclass__` (GH-123342) (#123568)

gh-91126: Docs and tests for slotted dataclasses with `__init_subclass__` (GH-123342)
(cherry picked from commit 75e7282)

Co-authored-by: sobolevn <[email protected]>
@bedevere-bot

bedevere-bot commented Sep 1, 2024

Copy link
Copy Markdown

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

Hi! The buildbot PPC64LE RHEL8 Refleaks 3.13 has failed when building commit cfdf376.

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

Failed subtests:

  • test_create_connection_local_addr_skip_different_family - test.test_asyncio.test_events.EPollEventLoopTests.test_create_connection_local_addr_skip_different_family

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

Click to see traceback logs
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.13.cstratak-RHEL8-ppc64le.refleak/build/Lib/test/test_asyncio/test_events.py", line 694, in test_create_connection_local_addr_skip_different_family
    with self.assertRaises(OSError):
        self.loop.run_until_complete(f)
AssertionError: OSError not raised
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

@carljm carljm carljm approved these changes
@ericvsmith ericvsmith Awaiting requested review from ericvsmith ericvsmith is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

skip news

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

@sobolevn @bedevere-bot @carljm
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 01402520 — 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.