-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Calling deepcopy on a memoryview raises a TypeError, this looks similar to bug 82474 #82474
This also breaks BinaryField when using Django Polymorphic
jazzband/django-polymorphic#524
Your environment
- CPython versions tested on: 3.8, 3.10
- Operating system and architecture: Ubuntu 21.10
>>> a = memoryview(b'123')
>>> from copy import deepcopy
>>> deepcopy(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.10/copy.py", line 161, in deepcopy
rv = reductor(4)
TypeError: cannot pickle 'memoryview' object
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
No status