You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a followup to bpo-27137, where it was found out the repr of a partial object includes the module (i.e. 'functools') only if it's not a subclass. This behaviour is surprising at best. Attached patch streamlines the reprs of partial objects to always include the module.
Raymond, do you remember why this approach was taken? Looking at the code, it seems it was just the easiest way to go about it.
Side-note: I couldn't run the test suite since I ran into bpo-28061, so I just did manual testing.
Activity
Vgr255 commentedon Sep 10, 2016
This is a followup to bpo-27137, where it was found out the repr of a partial object includes the module (i.e. 'functools') only if it's not a subclass. This behaviour is surprising at best. Attached patch streamlines the reprs of partial objects to always include the module.
Raymond, do you remember why this approach was taken? Looking at the code, it seems it was just the easiest way to go about it.
Side-note: I couldn't run the test suite since I ran into bpo-28061, so I just did manual testing.
serhiy-storchaka commentedon Sep 10, 2016
Similar issues: bpo-27541 and bpo-21861.
furkanonder commentedon Feb 14, 2023
The PR is ready for review. @serhiy-storchaka
gh-72249: Include the module name in the repr of partial object (GH-1…
serhiy-storchaka commentedon Feb 25, 2024
Thank you for your contribution @Vgr255 and @furkanonder.
I do not think that it is worth to backport this change.
pythongh-72249: Include the module name in the repr of partial object (…
pythongh-72249: Include the module name in the repr of partial object (…
pythongh-72249: Include the module name in the repr of partial object (…
pythongh-72249: Include the module name in the repr of partial object (…
pythongh-72249: Correct wording of pythonGH-101910 blurb
gh-72249: Correct wording of GH-101910 blurb (GH-138468)
pythongh-72249: Correct wording of pythonGH-101910 blurb (pythonGH-13…
pythongh-72249: Correct wording of pythonGH-101910 blurb (pythonGH-13…
[3.13] gh-72249: Correct wording of GH-101910 blurb (GH-138471)
[3.14] gh-72249: Correct wording of GH-101910 blurb (GH-138468) (#138470
[3.14] pythongh-72249: Correct wording of pythonGH-101910 blurb (pyth…
pythongh-72249: Correct wording of pythonGH-101910 blurb (pythonGH-13…