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-109818: `reprlib.recursive_repr` copies `__type_params__` by sobolevn · Pull Request #109819 · python/cpython

Conversation

@sobolevn

@sobolevn sobolevn commented Sep 25, 2023 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member
  • Issue: reprlib.recursive_repr does not copy __type_params__ #109818

Sorry, something went wrong.

Uh oh!

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

All reactions
@sobolevn
pythongh-109818: repllib.recursive_repr copies __type_params__
cc26fa4
@sobolevn
sobolevn requested a review from JelleZijlstra September 25, 2023 07:00
@bedevere-app bedevere-app Bot added the awaiting review label Sep 25, 2023
@bedevere-app bedevere-app Bot mentioned this pull request Sep 25, 2023
reprlib.recursive_repr does not copy __type_params__ #109818
Closed
@sobolevn sobolevn added the needs backport to 3.12 only security fixes label Sep 25, 2023
AlexWaygood
AlexWaygood reviewed Sep 25, 2023
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2023-09-25-09-59-59.gh-issue-109818.dLRtT-.rst Resolved

Uh oh!

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

@sobolevn @AlexWaygood
Update Misc/NEWS.d/next/Library/2023-09-25-09-59-59.gh-issue-109818.d…
fe9dbfa
…LRtT-.rst

Co-authored-by: Alex Waygood <[email protected]>
@sobolevn sobolevn changed the title gh-109818: repllib.recursive_repr copies __type_params__ gh-109818: replib.recursive_repr copies __type_params__ Sep 25, 2023
@AlexWaygood AlexWaygood changed the title gh-109818: replib.recursive_repr copies __type_params__ gh-109818: reprlib.recursive_repr copies __type_params__ Sep 25, 2023
JelleZijlstra
JelleZijlstra approved these changes Sep 28, 2023
View reviewed changes

@JelleZijlstra JelleZijlstra 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! I think we should backport this to 3.12 but it can wait until 3.12.1.

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 core review and removed awaiting review labels Sep 28, 2023
@JelleZijlstra
JelleZijlstra merged commit f65f9e8 into python:main Sep 28, 2023
@miss-islington

miss-islington commented Sep 28, 2023

Copy link
Copy Markdown
Contributor

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

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 awaiting core review label Sep 28, 2023
@miss-islington

miss-islington commented Sep 28, 2023

Copy link
Copy Markdown
Contributor

Sorry, @sobolevn and @JelleZijlstra, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker f65f9e80fe741c894582a3e413d4e3318c1ed626 3.12

All reactions

Sorry, something went wrong.

Uh oh!

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

@miss-islington miss-islington assigned JelleZijlstra Sep 28, 2023
@JelleZijlstra JelleZijlstra mentioned this pull request Sep 28, 2023
[3.12] gh-109818: reprlib.recursive_repr copies __type_params__ (… #109999
Merged
JelleZijlstra pushed a commit to JelleZijlstra/cpython that referenced this pull request Sep 28, 2023
@sobolevn @JelleZijlstra
[3.12] pythongh-109818: reprlib.recursive_repr copies `__type_param…
3d8ce93
…s__` (pythonGH-109819).

(cherry picked from commit f65f9e8)

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

bedevere-app Bot commented Sep 28, 2023

Copy link
Copy Markdown

GH-109999 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 28, 2023
@bedevere-bot

bedevere-bot commented Sep 28, 2023

Copy link
Copy Markdown

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

Hi! The buildbot PPC64LE RHEL7 LTO + PGO 3.x has failed when building commit f65f9e8.

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/all/#builders/43/builds/4302) and take a look at the build logs.
  4. Check if the failure is related to this commit (f65f9e8) 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/all/#builders/43/builds/4302

Failed tests:

  • test.test_multiprocessing_fork.test_processes

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

==

Click to see traceback logs
remote: Enumerating objects: 20, done.        
remote: Counting objects:   5% (1/20)        
remote: Counting objects:  10% (2/20)        
remote: Counting objects:  15% (3/20)        
remote: Counting objects:  20% (4/20)        
remote: Counting objects:  25% (5/20)        
remote: Counting objects:  30% (6/20)        
remote: Counting objects:  35% (7/20)        
remote: Counting objects:  40% (8/20)        
remote: Counting objects:  45% (9/20)        
remote: Counting objects:  50% (10/20)        
remote: Counting objects:  55% (11/20)        
remote: Counting objects:  60% (12/20)        
remote: Counting objects:  65% (13/20)        
remote: Counting objects:  70% (14/20)        
remote: Counting objects:  75% (15/20)        
remote: Counting objects:  80% (16/20)        
remote: Counting objects:  85% (17/20)        
remote: Counting objects:  90% (18/20)        
remote: Counting objects:  95% (19/20)        
remote: Counting objects: 100% (20/20)        
remote: Counting objects: 100% (20/20), done.        
remote: Compressing objects:  11% (1/9)        
remote: Compressing objects:  22% (2/9)        
remote: Compressing objects:  33% (3/9)        
remote: Compressing objects:  44% (4/9)        
remote: Compressing objects:  55% (5/9)        
remote: Compressing objects:  66% (6/9)        
remote: Compressing objects:  77% (7/9)        
remote: Compressing objects:  88% (8/9)        
remote: Compressing objects: 100% (9/9)        
remote: Compressing objects: 100% (9/9), done.        
remote: Total 11 (delta 9), reused 3 (delta 2), pack-reused 0        
From https://github.com/python/cpython
 * branch            main       -> FETCH_HEAD
Note: checking out 'f65f9e80fe741c894582a3e413d4e3318c1ed626'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at f65f9e8... gh-109818: `reprlib.recursive_repr` copies `__type_params__` (#109819)
Switched to and reset branch 'main'

find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make[2]: [Makefile:2813: clean-retain-profile] Error 1 (ignored)
In file included from Python/ceval.c:766:
Python/generated_cases.c.h: In function ‘_PyEval_EvalFrameDefault’:
Python/generated_cases.c.h:2634:31: warning: unused variable ‘tp’ [-Wunused-variable]
                 PyTypeObject *tp = Py_TYPE(owner);
                               ^~
Python/generated_cases.c.h:3593:31: warning: unused variable ‘owner_cls’ [-Wunused-variable]
                 PyTypeObject *owner_cls = Py_TYPE(owner);
                               ^~~~~~~~~
Python/generated_cases.c.h:3642:31: warning: unused variable ‘owner_cls’ [-Wunused-variable]
                 PyTypeObject *owner_cls = Py_TYPE(owner);
                               ^~~~~~~~~
In file included from Python/executor.c:87:
Python/executor_cases.c.h: In function ‘_PyUopExecute’:
Python/executor_cases.c.h:1739:27: warning: unused variable ‘tp’ [-Wunused-variable]
             PyTypeObject *tp = Py_TYPE(owner);
                           ^~
Python/executor_cases.c.h:2302:27: warning: unused variable ‘owner_cls’ [-Wunused-variable]
             PyTypeObject *owner_cls = Py_TYPE(owner);
                           ^~~~~~~~~
Python/executor_cases.c.h:2348:27: warning: unused variable ‘owner_cls’ [-Wunused-variable]
             PyTypeObject *owner_cls = Py_TYPE(owner);
                           ^~~~~~~~~
./Modules/_testcapi/unicode.c: In function ‘test_string_from_format’:
./Modules/_testcapi/unicode.c:1538:1: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
 test_string_from_format(PyObject *self, PyObject *Py_UNUSED(ignored))
 ^~~~~~~~~~~~~~~~~~~~~~~
./Modules/_testcapi/unicode.c: In function ‘test_string_from_format’:
./Modules/_testcapi/unicode.c:1538:1: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
 test_string_from_format(PyObject *self, PyObject *Py_UNUSED(ignored))
 ^
./Include/internal/pycore_semaphore.h:57:18: warning: type of ‘_PySemaphore_Init’ does not match original declaration [-Wlto-type-mismatch]
 PyAPI_FUNC(void) _PySemaphore_Init(_PySemaphore *sema);
                  ^
Python/parking_lot.c:53:1: note: ‘_PySemaphore_Init’ was previously declared here
 _PySemaphore_Init(_PySemaphore *sema)
 ^
Python/parking_lot.c:53:1: note: code may be misoptimized unless -fno-strict-aliasing is used
./Include/internal/pycore_semaphore.h:49:1: warning: type of ‘_PySemaphore_Wait’ does not match original declaration [-Wlto-type-mismatch]
 _PySemaphore_Wait(_PySemaphore *sema, _PyTime_t timeout_ns, int detach);
 ^
Python/parking_lot.c:178:1: note: ‘_PySemaphore_Wait’ was previously declared here
 _PySemaphore_Wait(_PySemaphore *sema, _PyTime_t timeout, int detach)
 ^
Python/parking_lot.c:178:1: note: code may be misoptimized unless -fno-strict-aliasing is used
./Include/internal/pycore_semaphore.h:58:18: warning: type of ‘_PySemaphore_Destroy’ does not match original declaration [-Wlto-type-mismatch]
 PyAPI_FUNC(void) _PySemaphore_Destroy(_PySemaphore *sema);
                  ^
Python/parking_lot.c:81:1: note: ‘_PySemaphore_Destroy’ was previously declared here
 _PySemaphore_Destroy(_PySemaphore *sema)
 ^
Python/parking_lot.c:81:1: note: code may be misoptimized unless -fno-strict-aliasing is used
./Include/internal/pycore_semaphore.h:54:1: warning: type of ‘_PySemaphore_Wakeup’ does not match original declaration [-Wlto-type-mismatch]
 _PySemaphore_Wakeup(_PySemaphore *sema);
 ^
Python/parking_lot.c:197:1: note: ‘_PySemaphore_Wakeup’ was previously declared here
 _PySemaphore_Wakeup(_PySemaphore *sema)
 ^
Python/parking_lot.c:197:1: note: code may be misoptimized unless -fno-strict-aliasing is used
./Modules/_decimal/libmpdec/context.c:57: warning: mpd_setminalloc: ignoring request to set MPD_MINALLOC a second time

./Modules/_decimal/libmpdec/context.c:57: warning: mpd_setminalloc: ignoring request to set MPD_MINALLOC a second time

In file included from Python/ceval.c:766:
Python/generated_cases.c.h: In function ‘_PyEval_EvalFrameDefault’:
Python/generated_cases.c.h:2634:31: warning: unused variable ‘tp’ [-Wunused-variable]
                 PyTypeObject *tp = Py_TYPE(owner);
                               ^~
Python/generated_cases.c.h:3593:31: warning: unused variable ‘owner_cls’ [-Wunused-variable]
                 PyTypeObject *owner_cls = Py_TYPE(owner);
                               ^~~~~~~~~
Python/generated_cases.c.h:3642:31: warning: unused variable ‘owner_cls’ [-Wunused-variable]
                 PyTypeObject *owner_cls = Py_TYPE(owner);
                               ^~~~~~~~~
In file included from Python/executor.c:87:
Python/executor_cases.c.h: In function ‘_PyUopExecute’:
Python/executor_cases.c.h:1739:27: warning: unused variable ‘tp’ [-Wunused-variable]
             PyTypeObject *tp = Py_TYPE(owner);
                           ^~
Python/executor_cases.c.h:2302:27: warning: unused variable ‘owner_cls’ [-Wunused-variable]
             PyTypeObject *owner_cls = Py_TYPE(owner);
                           ^~~~~~~~~
Python/executor_cases.c.h:2348:27: warning: unused variable ‘owner_cls’ [-Wunused-variable]
             PyTypeObject *owner_cls = Py_TYPE(owner);
                           ^~~~~~~~~
./Include/internal/pycore_semaphore.h:54:1: warning: type of ‘_PySemaphore_Wakeup’ does not match original declaration [-Wlto-type-mismatch]
 _PySemaphore_Wakeup(_PySemaphore *sema);
 ^
Python/parking_lot.c:197:1: note: ‘_PySemaphore_Wakeup’ was previously declared here
 _PySemaphore_Wakeup(_PySemaphore *sema)
 ^
Python/parking_lot.c:197:1: note: code may be misoptimized unless -fno-strict-aliasing is used
./Include/internal/pycore_semaphore.h:57:18: warning: type of ‘_PySemaphore_Init’ does not match original declaration [-Wlto-type-mismatch]
 PyAPI_FUNC(void) _PySemaphore_Init(_PySemaphore *sema);
                  ^
Python/parking_lot.c:53:1: note: ‘_PySemaphore_Init’ was previously declared here
 _PySemaphore_Init(_PySemaphore *sema)
 ^
Python/parking_lot.c:53:1: note: code may be misoptimized unless -fno-strict-aliasing is used
./Include/internal/pycore_semaphore.h:49:1: warning: type of ‘_PySemaphore_Wait’ does not match original declaration [-Wlto-type-mismatch]
 _PySemaphore_Wait(_PySemaphore *sema, _PyTime_t timeout_ns, int detach);
 ^
Python/parking_lot.c:178:1: note: ‘_PySemaphore_Wait’ was previously declared here
 _PySemaphore_Wait(_PySemaphore *sema, _PyTime_t timeout, int detach)
 ^
Python/parking_lot.c:178:1: note: code may be misoptimized unless -fno-strict-aliasing is used
./Include/internal/pycore_semaphore.h:58:18: warning: type of ‘_PySemaphore_Destroy’ does not match original declaration [-Wlto-type-mismatch]
 PyAPI_FUNC(void) _PySemaphore_Destroy(_PySemaphore *sema);
                  ^
Python/parking_lot.c:81:1: note: ‘_PySemaphore_Destroy’ was previously declared here
 _PySemaphore_Destroy(_PySemaphore *sema)
 ^
Python/parking_lot.c:81:1: note: code may be misoptimized unless -fno-strict-aliasing is used

make: *** [Makefile:2032: buildbottest] Error 5
All reactions

Sorry, something went wrong.

Uh oh!

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

csm10495 pushed a commit to csm10495/cpython that referenced this pull request Sep 29, 2023
@sobolevn @csm10495
pythongh-109818: reprlib.recursive_repr copies __type_params__ (p…
6a8f67e
…ython#109819)
@sobolevn sobolevn mentioned this pull request Oct 1, 2023
gh-109653: Just import recursive_repr in dataclasses #109822
Merged
Yhg1s pushed a commit that referenced this pull request Oct 2, 2023
@JelleZijlstra @sobolevn
[3.12] gh-109818: reprlib.recursive_repr copies __type_params__ (… (
9be6a11
#109999)

[3.12] gh-109818: `reprlib.recursive_repr` copies `__type_params__` (GH-109819).
(cherry picked from commit f65f9e8)

Co-authored-by: Nikita Sobolev <[email protected]>
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@sobolevn @Glyphack
pythongh-109818: reprlib.recursive_repr copies __type_params__ (p…
c79de98
…ython#109819)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@AlexWaygood AlexWaygood AlexWaygood left review comments
@JelleZijlstra JelleZijlstra JelleZijlstra approved these changes

Uh oh!

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

Assignees

@JelleZijlstra JelleZijlstra

Labels

None yet

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

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