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 — bpo-43905: Expand dataclasses.astuple() and asdict() docs by akulakov · Pull Request #26154 · python/cpython

Conversation

@akulakov

@akulakov akulakov commented May 15, 2021 •
edited by miss-islington
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Expanded astuple() docs, warning about deepcopy being applied
and providing a workaround.

https://bugs.python.org/issue43905

Automerge-Triggered-By: GH:ericvsmith

Sorry, something went wrong.

Uh oh!

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

All reactions
@akulakov
Update dataclasses.rst
75a6626
Expanded ``astuple()`` docs.
@akulakov
akulakov requested a review from ericvsmith as a code owner May 15, 2021 22:19
@bedevere-bot bedevere-bot added the awaiting review label May 15, 2021
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label May 15, 2021
@bedevere-bot bedevere-bot added the docs Documentation in the Doc dir label May 15, 2021
@akulakov akulakov changed the title bpo-43905: Expand dataclass.astuple() docs bpo-43905: Expand dataclasses.astuple() docs May 15, 2021
ericvsmith
ericvsmith reviewed May 15, 2021
View reviewed changes
Comment thread Doc/library/dataclasses.rst Resolved

Uh oh!

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

akulakov and others added 2 commits May 24, 2021 00:52
@akulakov
Moved 'deepcopy' sentence to the first paragraph.
1b80a7a
@blurb-it
📜🤖 Added by blurb_it.
390274c
@akulakov

akulakov commented May 24, 2021

Copy link
Copy Markdown
Contributor Author

@ericvsmith thanks for the review, updated per your comment.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions

github-actions Bot commented Jun 24, 2021

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Jun 24, 2021
@ericvsmith

ericvsmith commented Nov 28, 2021

Copy link
Copy Markdown
Member

Closing and re-opening in order to run tests again.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ericvsmith ericvsmith closed this Nov 28, 2021
@ericvsmith ericvsmith reopened this Nov 28, 2021
ericvsmith
ericvsmith requested changes Nov 29, 2021
View reviewed changes
Comment thread Doc/library/dataclasses.rst Resolved

Uh oh!

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

Comment thread Doc/library/dataclasses.rst Resolved

Uh oh!

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

@bedevere-bot bedevere-bot added awaiting changes and removed awaiting review labels Nov 29, 2021
@bedevere-bot

bedevere-bot commented Nov 29, 2021

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

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

akulakov added 2 commits November 28, 2021 20:33
@akulakov
fix trailing whitespace
be3feaf
@akulakov
fix one more trailing space
f0e5b87
ericvsmith
ericvsmith requested changes Nov 29, 2021
View reviewed changes

@ericvsmith ericvsmith 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 to me. Can you add the corresponding asdict change?

Sorry, something went wrong.

Uh oh!

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

All reactions
akulakov added 2 commits November 28, 2021 23:06
@akulakov
added deepcopy note and workaround to asdict
f9f2734
@akulakov
remove tildes in links
fbcc54a
@akulakov akulakov changed the title bpo-43905: Expand dataclasses.astuple() docs bpo-43905: Expand dataclasses.astuple() and asdict() docs Nov 29, 2021
@akulakov

akulakov commented Nov 29, 2021

Copy link
Copy Markdown
Contributor Author

@ericvsmith I've added the note and workaround to asdict and tweaked the wording a bit to make it clearer that the last paragraph refers to the respective function rather than the workaround example.

All reactions

Sorry, something went wrong.

Uh oh!

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

ericvsmith
ericvsmith requested changes Nov 29, 2021
View reviewed changes

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

Other than the news entry, this looks good to me.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Misc/NEWS.d/next/Documentation/2021-05-24-05-00-12.bpo-43905.tBIndE.rst Outdated
@@ -0,0 +1,2 @@
Expanded ``dataclasses.astuple()`` docs, warning about deepcopy being applied
and providing a workaround. No newline at end of file

@ericvsmith ericvsmith Nov 29, 2021

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 should also mention asdict().

Sorry, something went wrong.

Uh oh!

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

akulakov reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@ericvsmith ericvsmith removed the stale Stale PR or inactive for long period of time. label Nov 29, 2021
@akulakov
update news
4a8a2a7
@akulakov

akulakov commented Nov 29, 2021

Copy link
Copy Markdown
Contributor Author

@ericvsmith Updated the news, please take a look.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ericvsmith ericvsmith added needs backport to 3.9 labels Nov 29, 2021
ericvsmith
ericvsmith approved these changes Nov 29, 2021
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting changes labels Nov 29, 2021
@miss-islington
miss-islington merged commit c1f93f0 into python:main Nov 29, 2021
@bedevere-bot bedevere-bot removed the awaiting merge label Nov 29, 2021
@miss-islington

miss-islington commented Nov 29, 2021

Copy link
Copy Markdown
Contributor

Thanks @akulakov for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

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 Nov 29, 2021
@akulakov @miss-islington
bpo-43905: Expand dataclasses.astuple() and asdict() docs (pythonGH-2…
066327b
…6154)

Expanded ``astuple()`` docs, warning about deepcopy being applied
and providing a workaround.

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit c1f93f0)

Co-authored-by: andrei kulakov <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.10 label Nov 29, 2021
@bedevere-bot

bedevere-bot commented Nov 29, 2021

Copy link
Copy Markdown

GH-29851 is a backport of this pull request to the 3.10 branch.

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 Nov 29, 2021
@akulakov @miss-islington
bpo-43905: Expand dataclasses.astuple() and asdict() docs (pythonGH-2…
30747fd
…6154)

Expanded ``astuple()`` docs, warning about deepcopy being applied
and providing a workaround.

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit c1f93f0)

Co-authored-by: andrei kulakov <[email protected]>
@bedevere-bot bedevere-bot removed the needs backport to 3.9 label Nov 29, 2021
@bedevere-bot

bedevere-bot commented Nov 29, 2021

Copy link
Copy Markdown

GH-29852 is a backport of this pull request to the 3.9 branch.

All reactions

Sorry, something went wrong.

Uh oh!

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

miss-islington added a commit that referenced this pull request Nov 29, 2021
@miss-islington @akulakov
bpo-43905: Expand dataclasses.astuple() and asdict() docs (GH-26154)
376b24e
Expanded ``astuple()`` docs, warning about deepcopy being applied
and providing a workaround.

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit c1f93f0)

Co-authored-by: andrei kulakov <[email protected]>
miss-islington added a commit that referenced this pull request Nov 29, 2021
@miss-islington @akulakov
bpo-43905: Expand dataclasses.astuple() and asdict() docs (GH-26154)
32f1491
Expanded ``astuple()`` docs, warning about deepcopy being applied
and providing a workaround.

Automerge-Triggered-By: GH:ericvsmith
(cherry picked from commit c1f93f0)

Co-authored-by: andrei kulakov <[email protected]>
shihai1991 added a commit to shihai1991/cpython that referenced this pull request Dec 1, 2021
@shihai1991
Merge branch 'main' into bpo_44133
6edb6f5
* main: (21 commits)
  bpo-45876:  Have stdev() also use decimal specific square root. (pythonGH-29869)
  bpo-45876:  Correctly rounded stdev() and pstdev() for the Decimal case (pythonGH-29828)
  bpo-45711: Change exc_info related APIs to derive type and traceback from the exception instance (pythonGH-29780)
  bpo-30533:Add function inspect.getmembers_static that does not call properties or dynamic properties. (python#20911)
  bpo-45476: Disallow using asdl_seq_GET() as l-value (pythonGH-29866)
  bpo-45476: Add _Py_RVALUE() macro (pythonGH-29860)
  bpo-33381: [doc] strftime's %f option may pad zeros on the left or the right (pythonGH-29801)
  Fix EncodingWarning in Tools/freeze/test/freeze.py (pythonGH-29742)
  no-issue: remove unused import from test_graphlib.py (pythonGH-29853)
  bpo-45931: Prevent Directory.Build.props/targets from leaking from directories above the repo when building on Windows (pythonGH-29854)
  bpo-45653: fix test_embed on windows (pythonGH-29814)
  bpo-45917: Add math.exp2() method - return 2 raised to the power of x (pythonGH-29829)
  bpo-43905: Expand dataclasses.astuple() and asdict() docs (pythonGH-26154)
  bpo-44391: Remove unused argument from a varargs call. (pythonGH-29843)
  bpo-45881: configure --with-freeze-module --with-build-python (pythonGH-29835)
  bpo-45847: PY_STDLIB_MOD_SIMPLE now checks py_stdlib_not_available (pythonGH-29844)
  bpo-45828: Use unraisable exceptions within sqlite3 callbacks (FH-29591)
  bpo-40280: Emscripten systems use .wasm suffix by default (pythonGH-29842)
  bpo-45723: Sort the grand AC_CHECK_HEADERS check (pythonGH-29846)
  bpo-45847: Make socket module conditional (pythonGH-29769)
  ...
shihai1991 added a commit to shihai1991/cpython that referenced this pull request Dec 1, 2021
@shihai1991
Merge branch 'main' into bpo_44133
b71b124
* main: (21 commits)
  bpo-45876:  Have stdev() also use decimal specific square root. (pythonGH-29869)
  bpo-45876:  Correctly rounded stdev() and pstdev() for the Decimal case (pythonGH-29828)
  bpo-45711: Change exc_info related APIs to derive type and traceback from the exception instance (pythonGH-29780)
  bpo-30533:Add function inspect.getmembers_static that does not call properties or dynamic properties. (python#20911)
  bpo-45476: Disallow using asdl_seq_GET() as l-value (pythonGH-29866)
  bpo-45476: Add _Py_RVALUE() macro (pythonGH-29860)
  bpo-33381: [doc] strftime's %f option may pad zeros on the left or the right (pythonGH-29801)
  Fix EncodingWarning in Tools/freeze/test/freeze.py (pythonGH-29742)
  no-issue: remove unused import from test_graphlib.py (pythonGH-29853)
  bpo-45931: Prevent Directory.Build.props/targets from leaking from directories above the repo when building on Windows (pythonGH-29854)
  bpo-45653: fix test_embed on windows (pythonGH-29814)
  bpo-45917: Add math.exp2() method - return 2 raised to the power of x (pythonGH-29829)
  bpo-43905: Expand dataclasses.astuple() and asdict() docs (pythonGH-26154)
  bpo-44391: Remove unused argument from a varargs call. (pythonGH-29843)
  bpo-45881: configure --with-freeze-module --with-build-python (pythonGH-29835)
  bpo-45847: PY_STDLIB_MOD_SIMPLE now checks py_stdlib_not_available (pythonGH-29844)
  bpo-45828: Use unraisable exceptions within sqlite3 callbacks (FH-29591)
  bpo-40280: Emscripten systems use .wasm suffix by default (pythonGH-29842)
  bpo-45723: Sort the grand AC_CHECK_HEADERS check (pythonGH-29846)
  bpo-45847: Make socket module conditional (pythonGH-29769)
  ...
ischurov added a commit to ischurov/cpython that referenced this pull request Feb 10, 2023
@ischurov
Update dataclasses.astuple and dataclasses.asdict docstrings to refle…
c537df5
…ct that they deep copy objects in the field values, according to the changes in the docs, see python#26154
@ischurov ischurov mentioned this pull request Feb 10, 2023
gh-88071: Update docstrings of dataclass' astuple and asdict #101806
Merged
@mandolaerik mandolaerik mannequin mentioned this pull request Apr 10, 2022
dataclasses.astuple (and .asdict) do deepcopy on all fields #88071
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ericvsmith ericvsmith ericvsmith approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

docs Documentation in the Doc dir

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

@akulakov @ericvsmith @bedevere-bot @miss-islington @the-knights-who-say-ni
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.