Skip to content

gh-144162: Allow for subclasses of a dataclass to define required fields when a parent has defined optional fields #133168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LukeGrochocki
Copy link

Fix for gh-144162

gh-133162: Allow for subclasses of a dataclass to define required fields when a parent has defined optional fields

@python-cla-bot
Copy link

python-cla-bot bot commented Apr 29, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Apr 29, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Copy link
Member

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

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

Hi, I'd suggest looking at the devguide for the pull request tutorial.

A number of things I'd like you to change here:

  • Please move the test to somewhere in the existing dataclass tests.
  • This needs a blurb entry per the bot, but also needs a whatsnew entry for 3.14.
  • The title should be in a gh-NNNN: quick summary format.

The test is failing, FYI!

StanFromIreland

This comment was marked as duplicate.

@ericvsmith
Copy link
Member

Also, please give this a better title. I didn’t notice it in my inbox. Thanks!

@AA-Turner AA-Turner changed the title Fix for gh-144162 gh-144162: Allow for subclasses of a dataclass to define required fields when a parent has defined optional fields May 4, 2025
@AA-Turner
Copy link
Member

Still needs a better title, I just copied the one from the issue.

A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants