Skip to content

Python3 TypeError issue when trying to create a subclass of multiprocessing.Queue  #125258

@JosueGauthier

Description

@JosueGauthier

Bug report

Bug description:

Hello,

I try to create a heritant subclass of multiprocessing.Queue as I did for queue.Queue except I get the error :

Traceback (most recent call last):
  File "f:\d\multiprocessing-samples\test.py", line 4, in <module>
    class DataMultiProcQueue(multiprocessing.Queue):
TypeError: method expected 2 arguments, got 3

Here is the code to reproduce this error, I tested the error is present for python3.10,11,12 and 3.8 on windows and linux (debian)

import multiprocessing


class DataMultiProcQueue(multiprocessing.Queue):
    def __init__(self):
        super().__init__()


if __name__ == "__main__":
    my_queue = DataMultiProcQueue()

    my_queue.put(1)
    print(my_queue.get())

Thanks,

Gum

CPython versions tested on:

3.10, 3.11, 3.12,3.8

Operating systems tested on:

Windows,Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions