Skip to content

clear method of list class in multiprocessing.Manager() is missing #119176

@YvesDup

Description

@YvesDup

Bug report

Bug description:

import multiprocessing as mp

if __name__ == '__main__':
    mp.freeze_support()
    m = mp.Manager()
    l = m.list([None, True, 2.9001])
    print(l)
    l.clear()

Result is:

[None, True, 2.9001]
Traceback (most recent call last):
  File "/Users/yves/Desktop/Bugs/gh-xxxxxxx1.py", line 8, in <module>
    l.clear()
    ^^^^^^^
AttributeError: 'ListProxy' object has no attribute 'clear'

The clear method is missing. Is there a particular reason for this, or is it just an oversight ?

PS: The clear method exists with the dict class of multiprocessing.Manager().

CPython versions tested on:

CPython main branch

Operating systems tested on:

macOS

Linked PRs

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