You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/jaraco'closed_at=<Date2021-01-16.19:46:42.134>created_at=<Date2020-10-29.01:53:35.133>labels= ['type-bug', 'library', '3.9', '3.10']
title='copy.deepcopy() no longer works on platform.uname_result objects'updated_at=<Date2021-01-16.19:46:42.133>user='https://bugs.python.org/rocallahan'
Starting from Python 3.9, copy.deepcopy can't copy a platform.uname_result object.
Python 3.9.0 (default, Oct 6 2020, 00:00:00)
[GCC 10.2.1 20200826 (Red Hat 10.2.1-3)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> import copy
>>> u = platform.uname()
>>> print(u)
uname_result(system='Linux', node='localhost.localdomain', release='5.8.16-300.fc33.x86_64', version='#1 SMP Mon Oct 19 13:18:33 UTC 2020', machine='x86_64')
>>> v = copy.deepcopy(u)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python3.9/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib64/python3.9/copy.py", line 264, in _reconstruct
y = func(*args)
File "/usr/lib64/python3.9/copyreg.py", line 91, in __newobj__
return cls.__new__(cls, *args)
TypeError: <lambda>() takes 6 positional arguments but 7 were given
Looks similar to bpo-42163 but I guess it might need to be fixed differently.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: