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 — Improve docs for `typing.dataclass_transform` by AlexWaygood · Pull Request #105792 · python/cpython

Conversation

@AlexWaygood

@AlexWaygood AlexWaygood commented Jun 14, 2023 •
edited by github-actions Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member
  • Document the function signature in the header
  • Use a Sphinx parameter list to document the meaning of each parameter
  • Use a table to document the accepted parameters for field specifiers

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

Sorry, something went wrong.

Uh oh!

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

All reactions
@AlexWaygood
Improve docs for typing.dataclass_transform
43a6dd1
@AlexWaygood AlexWaygood added skip issue skip news topic-typing labels Jun 14, 2023
@AlexWaygood
AlexWaygood requested a review from erlend-aasland June 14, 2023 16:05
@AlexWaygood
AlexWaygood requested review from Fidget-Spinner, JelleZijlstra and gvanrossum as code owners June 14, 2023 16:05
@bedevere-bot bedevere-bot added awaiting core review docs Documentation in the Doc dir labels Jun 14, 2023
@AlexWaygood AlexWaygood added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jun 14, 2023
@AlexWaygood

AlexWaygood commented Jun 14, 2023

Copy link
Copy Markdown
Member Author

Old: https://docs.python.org/3.13/library/typing.html#typing.dataclass_transform

New: https://cpython-previews--105792.org.readthedocs.build/en/105792/library/typing.html#typing.dataclass_transform

All reactions

Sorry, something went wrong.

Uh oh!

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

JelleZijlstra
JelleZijlstra approved these changes Jun 15, 2023
View reviewed changes
Comment thread Doc/library/typing.rst
:header-rows: 1
:widths: 20 80

* - Parameter name

@JelleZijlstra JelleZijlstra Jun 15, 2023

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.

wow, didn't know you could write tables this way. That's much easier than laying it out manually

Sorry, something went wrong.

Uh oh!

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

erlend-aasland reacted with eyes emoji
All reactions
  • 👀 1 reaction

@AlexWaygood AlexWaygood Jun 15, 2023

Copy link
Copy Markdown
Member Author

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.

Yeah, I learned about this pretty recently too!

Sorry, something went wrong.

Uh oh!

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

All reactions

@erlend-aasland erlend-aasland Jun 15, 2023

Copy link
Copy Markdown
Contributor

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 is neat! TIL

Sorry, something went wrong.

Uh oh!

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

AlexWaygood reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Jun 15, 2023
@AlexWaygood
AlexWaygood merged commit 006a453 into python:main Jun 15, 2023
@miss-islington

miss-islington commented Jun 15, 2023

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the awaiting merge label Jun 15, 2023
@AlexWaygood
AlexWaygood deleted the dataclass-transform-docs branch June 15, 2023 05:51
@miss-islington

miss-islington commented Jun 15, 2023

Copy link
Copy Markdown
Contributor

Sorry, @AlexWaygood, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 006a4532058f1fadba93283c0f45b0d82735b364 3.11

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington miss-islington assigned AlexWaygood Jun 15, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 15, 2023
@AlexWaygood @miss-islington
Improve docs for typing.dataclass_transform (pythonGH-105792)
02b47cd
(cherry picked from commit 006a453)

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

bedevere-bot commented Jun 15, 2023

Copy link
Copy Markdown

GH-105809 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-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Jun 15, 2023
AlexWaygood added a commit that referenced this pull request Jun 15, 2023
@miss-islington @AlexWaygood
[3.12] Improve docs for typing.dataclass_transform (GH-105792) (#10…
1573f16
…5809)

Improve docs for `typing.dataclass_transform` (GH-105792)
(cherry picked from commit 006a453)

Co-authored-by: Alex Waygood <[email protected]>
erlend-aasland
erlend-aasland reviewed Jun 15, 2023
View reviewed changes
Comment thread Doc/library/typing.rst Resolved

Uh oh!

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

@erlend-aasland

erlend-aasland commented Jun 15, 2023

Copy link
Copy Markdown
Contributor

Very nice improvement! LGTM

AlexWaygood reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

@AlexWaygood

AlexWaygood commented Jun 15, 2023

Copy link
Copy Markdown
Member Author

Thanks @erlend-aasland!

All reactions

Sorry, something went wrong.

Uh oh!

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

@erlend-aasland erlend-aasland mentioned this pull request Jun 15, 2023
Docs: make it easier to reference and markup decorators #105812
Closed
AlexWaygood added a commit to AlexWaygood/cpython that referenced this pull request Jun 15, 2023
@AlexWaygood
[3.11] Improve docs for typing.dataclass_transform (python#105792)
1bddb6a
(cherry-picked from commit 006a453)
@bedevere-bot

bedevere-bot commented Jun 15, 2023

Copy link
Copy Markdown

GH-105815 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jun 15, 2023
AlexWaygood added a commit that referenced this pull request Jun 15, 2023
@AlexWaygood
[3.11] Improve docs for typing.dataclass_transform (#105792) (#105815)
c197bd8
(cherry-picked from commit 006a453)
carljm added a commit to carljm/cpython that referenced this pull request Jun 15, 2023
@carljm
Merge branch 'main' into modulelocals
166aca9
* main: (57 commits)
  pythongh-105831: Fix NEWS blurb from pythongh-105828 (python#105833)
  pythongh-105820: Fix tok_mode expression buffer in file & readline tokenizer (python#105828)
  pythongh-105751, test_ctypes: Remove disabled tests (python#105826)
  pythongh-105821: Use a raw f-string in test_httpservers.py (python#105822)
  pythongh-105751: Remove platform usage in test_ctypes (python#105819)
  pythongh-105751: Reenable disable test_ctypes tests (python#105818)
  pythongh-105751: Remove dead code in test_ctypes (python#105817)
  More reorganisation of the typing docs (python#105787)
  Improve docs for `typing.dataclass_transform` (python#105792)
  pythonGH-89812: Churn `pathlib.Path` test methods (python#105807)
  pythongh-105800: Issue SyntaxWarning in f-strings for invalid escape sequences (python#105801)
  pythongh-105751: Cleanup test_ctypes imports (python#105803)
  pythongh-105481: add HAS_JUMP flag to opcode metadata (python#105791)
  pythongh-105751: test_ctypes avoids the operator module (pythonGH-105797)
  pythongh-105751: test_ctypes: Remove @need_symbol decorator (pythonGH-105798)
  pythongh-104909: Implement conditional stack effects for macros (python#105748)
  pythongh-75905: Remove test_xmlrpc_net: skipped since 2017 (python#105796)
  pythongh-105481: Fix types and a bug for pseudos (python#105788)
  Update DSL docs for cases generator (python#105753)
  pythonGH-77273: Better bytecodes for f-strings (pythonGH-6132)
  ...
@erlend-aasland erlend-aasland mentioned this pull request Nov 6, 2024
Add support for a Python decorator role sphinx-doc/sphinx#13105
Closed
@AA-Turner AA-Turner mentioned this pull request Feb 3, 2025
Add the new py:deco cross-reference role sphinx-doc/sphinx#13292
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@erlend-aasland erlend-aasland erlend-aasland left review comments
@JelleZijlstra JelleZijlstra JelleZijlstra approved these changes
@gvanrossum gvanrossum Awaiting requested review from gvanrossum
@Fidget-Spinner Fidget-Spinner Awaiting requested review from Fidget-Spinner

Uh oh!

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

Assignees

@AlexWaygood AlexWaygood

Labels

docs Documentation in the Doc dir skip issue skip news topic-typing

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.

5 participants

@AlexWaygood @miss-islington @bedevere-bot @erlend-aasland @JelleZijlstra
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.