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 — Add `frozen_default` parameter on `dataclass_transform` · Issue #99957 · python/cpython

Add frozen_default parameter on dataclass_transform #99957

New issue
Copy link
New issue
Copy link
Closed
#99958
Closed
Add frozen_default parameter on dataclass_transform#99957
#99958
Copy link
Labels
type-featureA feature request or enhancementA feature request or enhancement

Description

@debonte
debonte
opened on Dec 2, 2022
Issue body actions

Feature or enhancement

Add a new frozen_default parameter to dataclass_transform similar to the existing eq_default and order_default parameters.

Pitch

  • Frozen dataclasses are very popular when working with Jax (flax.struct.dataclass and tjax.dataclass), so being able to indicate that they are frozen by default would improve the user experience.
  • dataclass_transform is currently supported by Pyright/Pylance and Pyre. Both teams are in favor of implementing this new parameter. Since dataclass_transform supports kwargs for experimentation/extensibility, Pyright was already able to add support for frozen_default.
  • All feedback on typing-sig has been in favor of this enhancement.

Previous discussion

Discussed in typing-sig.

Linked PRs

  • gh-99957: Add frozen_default parameter on dataclass_transform #99958

Activity

  1. debonte
    added
    type-featureA feature request or enhancementA feature request or enhancement
    on Dec 2, 2022
  2. JelleZijlstra
    closed this as completedin #99958on Dec 6, 2022
  3. JelleZijlstra
    added a commit that references this issue on Dec 6, 2022

    gh-99957: Add `frozen_default` parameter on `dataclass_transform` (#9…

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.