Skip to content

Export the UNBOUND / UNBOUND_ERROR / UNBOUND_REMOVE / ItemInterpreterDestroyed in concurrent.interpreters._queue #139360

Description

@aisk

Bug report

Bug description:

We have exported the create function from concurrent.interpreters._queue to concurrent.interpreters:

https://github.com/python/cpython/blob/8288f3693f50058ad9b9fe04e01f5dad902d8bad/Lib/concurrent/interpreters/__init__.py#L13C15-L13C27

But the create function accept an optional parameter unbounditems, which can be one of UNBOUND / UNBOUND_ERROR / UNBOUND_REMOVE:

def create(maxsize=0, *, unbounditems=UNBOUND):

Besides of this, put / put_nowait methods may raise ItemInterpreterDestroyed if we specify the unbounditems to UNBOUND_ERROR.

As a result, we should export them to concurrent.interpreters from concurrent.interpreters._queue.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Activity

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

    stdlibStandard Library Python modules in the Lib/ directorytopic-subinterpreterstype-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions