Skip to content

Streamline repr(partial object) #72249

Description

@Vgr255
mannequin
BPO 28062
Nosy @rhettinger, @ncoghlan, @serhiy-storchaka, @Vgr255
Files
  • functools_partial_repr_1.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2016-09-10.12:12:43.179>
    labels = ['type-bug', 'library']
    title = 'Streamline repr(partial object)'
    updated_at = <Date 2016-09-10.12:40:13.692>
    user = 'https://github.com/Vgr255'

    bugs.python.org fields:

    activity = <Date 2016-09-10.12:40:13.692>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2016-09-10.12:12:43.179>
    creator = 'abarry'
    dependencies = []
    files = ['44529']
    hgrepos = []
    issue_num = 28062
    keywords = ['patch']
    message_count = 2.0
    messages = ['275628', '275632']
    nosy_count = 4.0
    nosy_names = ['rhettinger', 'ncoghlan', 'serhiy.storchaka', 'abarry']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue28062'
    versions = ['Python 3.6']

    Linked PRs

    Activity

    1. Vgr255 commented on Sep 10, 2016

      Vgr255mannequin
      MannequinAuthor

      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.

    2. added
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Sep 10, 2016
    3. serhiy-storchaka commented on Sep 10, 2016

      @serhiy-storchaka
      Member

      Similar issues: bpo-27541 and bpo-21861.

    4. transferred this issue fromon Apr 10, 2022
    5. furkanonder commented on Feb 14, 2023

      @furkanonder
      Contributor

      The PR is ready for review. @serhiy-storchaka

    6. added
      interpreter-core(Objects, Python, Grammar, and Parser dirs)
      and removed
      stdlibStandard Library Python modules in the Lib/ directory
      on Feb 15, 2023
    7. added a commit that references this issue on Feb 25, 2024
    8. serhiy-storchaka commented on Feb 25, 2024

      @serhiy-storchaka
      Member

      Thank you for your contribution @Vgr255 and @furkanonder.

      I do not think that it is worth to backport this change.

    9. added a commit that references this issue on Mar 4, 2024
    10. added a commit that references this issue on Mar 25, 2024
    11. added a commit that references this issue on Apr 17, 2024
    12. added a commit that references this issue on Jan 22, 2025
    13. added 2 commits that reference this issue on Sep 3, 2025
    14. added 2 commits that reference this issue on Sep 3, 2025
    15. added a commit that references this issue on Sep 3, 2025
    16. added a commit that references this issue on Sep 3, 2025
    17. added a commit that references this issue on Sep 9, 2025
    18. added a commit that references this issue on Sep 9, 2025
    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

      3.13only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions