Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamline repr(partial object) #72249

Closed
Vgr255 mannequin opened this issue Sep 10, 2016 · 4 comments
Closed

Streamline repr(partial object) #72249

Vgr255 mannequin opened this issue Sep 10, 2016 · 4 comments
Labels
3.13 bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@Vgr255
Copy link
Mannequin

Vgr255 mannequin commented Sep 10, 2016

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

    @Vgr255
    Copy link
    Mannequin Author

    Vgr255 mannequin commented 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.

    @Vgr255 Vgr255 mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Sep 10, 2016
    @serhiy-storchaka
    Copy link
    Member

    Similar issues: bpo-27541 and bpo-21861.

    @furkanonder
    Copy link
    Sponsor Contributor

    The PR is ready for review. @serhiy-storchaka

    @arhadthedev arhadthedev added interpreter-core (Objects, Python, Grammar, and Parser dirs) and removed stdlib Python modules in the Lib dir labels Feb 15, 2023
    serhiy-storchaka pushed a commit that referenced this issue Feb 25, 2024
    @serhiy-storchaka
    Copy link
    Member

    Thank you for your contribution @Vgr255 and @furkanonder.

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

    @serhiy-storchaka serhiy-storchaka added the 3.13 bugs and security fixes label Feb 25, 2024
    woodruffw pushed a commit to woodruffw-forks/cpython that referenced this issue Mar 4, 2024
    adorilson pushed a commit to adorilson/cpython that referenced this issue Mar 25, 2024
    diegorusso pushed a commit to diegorusso/cpython that referenced this issue Apr 17, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.13 bugs and security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants