close
Skip to content

The addresses of multiprocessing.connection can also be bytes #10054

Description

@lw

Typeshed says that the addresses used in multiprocessing.connection are str | tuple[str, int]. However, sometimes a bytes can be returned as well:

$ python3
Python 3.9.15 (main, Nov 24 2022, 14:31:59)
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from multiprocessing.connection import Listener
>>> l = Listener("", "AF_UNIX")
>>> l.address
b'\x00listener-1553475-0'

I believe this is "new" starting in Python 3.9.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions