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

Update interface of weakref dictionaries #47214

Closed
birkenfeld opened this issue May 25, 2008 · 7 comments
Closed

Update interface of weakref dictionaries #47214

birkenfeld opened this issue May 25, 2008 · 7 comments
Labels
release-blocker stdlib Python modules in the Lib dir

Comments

@birkenfeld
Copy link
Member

BPO 2965
Nosy @warsaw, @birkenfeld, @pitrou, @benjaminp
Files
  • weakref_py3k.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 = <Date 2008-09-04.01:43:02.447>
    created_at = <Date 2008-05-25.09:46:19.556>
    labels = ['library', 'release-blocker']
    title = 'Update interface of weakref dictionaries'
    updated_at = <Date 2008-09-04.01:51:17.140>
    user = 'https://github.com/birkenfeld'

    bugs.python.org fields:

    activity = <Date 2008-09-04.01:51:17.140>
    actor = 'barry'
    assignee = 'none'
    closed = True
    closed_date = <Date 2008-09-04.01:43:02.447>
    closer = 'barry'
    components = ['Library (Lib)']
    creation = <Date 2008-05-25.09:46:19.556>
    creator = 'georg.brandl'
    dependencies = []
    files = ['10441']
    hgrepos = []
    issue_num = 2965
    keywords = ['patch']
    message_count = 7.0
    messages = ['67339', '67353', '70480', '70492', '70493', '72452', '72453']
    nosy_count = 4.0
    nosy_names = ['barry', 'georg.brandl', 'pitrou', 'benjamin.peterson']
    pr_nums = []
    priority = 'release blocker'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue2965'
    versions = ['Python 3.0']

    @birkenfeld
    Copy link
    Member Author

    The weak dictionaries in the weakref module still present the 2.x
    dictionary methods (iter*). This should be fixed for consistency with 3k
    dicts.

    @birkenfeld birkenfeld added the stdlib Python modules in the Lib dir label May 25, 2008
    @benjaminp
    Copy link
    Contributor

    Attaching patch.

    @benjaminp
    Copy link
    Contributor

    What needs to happen here?

    @pitrou
    Copy link
    Member

    pitrou commented Jul 31, 2008

    Is it ok that the keys/values/items return iterators rather than views?

    @pitrou
    Copy link
    Member

    pitrou commented Jul 31, 2008

    By the way, code like:
    items1 = list(dict.items())
    items1.sort()

    could be simplified into:
    items1 = sorted(dict.items())

    (same for reversed() instead of list.reverse())

    @warsaw
    Copy link
    Member

    warsaw commented Sep 4, 2008

    I will apply the patch to 3.0.

    Please open a separate bug for the simplification (which is not an API
    change). As for returning iterators rather than views, it would be nice
    to get that fixed before the final release, but I don't see that as
    critical. Please open a separate bug for that.

    @warsaw warsaw closed this as completed Sep 4, 2008
    @warsaw
    Copy link
    Member

    warsaw commented Sep 4, 2008

    r66202

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    release-blocker stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants