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

avoid try 1000 in asyncio all_tasks by making weak collection .copy() atomic #89439

Closed
graingert mannequin opened this issue Sep 24, 2021 · 2 comments
Closed

avoid try 1000 in asyncio all_tasks by making weak collection .copy() atomic #89439

graingert mannequin opened this issue Sep 24, 2021 · 2 comments
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-asyncio

Comments

@graingert
Copy link
Mannequin

graingert mannequin commented Sep 24, 2021

BPO 45276
Nosy @asvetlov, @1st1, @graingert
PRs
  • bpo-45276: make weak collection's copy() atomic and use this feature to avoid race conditions in asyncio and threading #28541
  • 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 2021-09-24.08:10:36.669>
    labels = ['interpreter-core', '3.11', '3.9', '3.10', 'expert-asyncio']
    title = 'avoid try 1000 in asyncio all_tasks by making weak collection .copy() atomic'
    updated_at = <Date 2021-09-24.08:17:16.047>
    user = 'https://github.com/graingert'

    bugs.python.org fields:

    activity = <Date 2021-09-24.08:17:16.047>
    actor = 'graingert'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Interpreter Core', 'asyncio']
    creation = <Date 2021-09-24.08:10:36.669>
    creator = 'graingert'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45276
    keywords = ['patch']
    message_count = 1.0
    messages = ['402544']
    nosy_count = 3.0
    nosy_names = ['asvetlov', 'yselivanov', 'graingert']
    pr_nums = ['28541']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue45276'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @graingert
    Copy link
    Mannequin Author

    graingert mannequin commented Sep 24, 2021

    the weak collections should have the same threadsafe/thread unsafe guarantees as their strong reference counterparts - eg dict.copy and set.copy are atomic and so the weak versions should be atomic also

    @graingert graingert mannequin added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-asyncio labels Sep 24, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @ezio-melotti ezio-melotti moved this to Todo in asyncio Jul 17, 2022
    @kumaraditya303
    Copy link
    Contributor

    This is not how this should be fixed, relying on implicit implementation details should be avoided unless guaranteed. See #80788 (comment)

    @kumaraditya303 kumaraditya303 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 2, 2022
    Repository owner moved this from Todo to Done in asyncio Dec 2, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) topic-asyncio
    Projects
    Status: Done
    Development

    No branches or pull requests

    1 participant