Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy.py bug #41516

Closed
disommav mannequin opened this issue Feb 2, 2005 · 6 comments
Closed

copy.py bug #41516

disommav mannequin opened this issue Feb 2, 2005 · 6 comments
Labels
stdlib Python modules in the Lib dir

Comments

@disommav
Copy link
Mannequin

disommav mannequin commented Feb 2, 2005

BPO 1114776
Nosy @mwhudson, @aleaxit, @kbkaiser

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 = None
closed_at = <Date 2005-04-14.21:00:00.000>
created_at = <Date 2005-02-02.14:43:24.000>
labels = ['library']
title = 'copy.py bug'
updated_at = <Date 2005-04-14.21:00:00.000>
user = 'https://bugs.python.org/disommav'

bugs.python.org fields:

activity = <Date 2005-04-14.21:00:00.000>
actor = 'kbk'
assignee = 'anthonybaxter'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2005-02-02.14:43:24.000>
creator = 'disommav'
dependencies = []
files = []
hgrepos = []
issue_num = 1114776
keywords = []
message_count = 6.0
messages = ['24128', '24129', '24130', '24131', '24132', '24133']
nosy_count = 5.0
nosy_names = ['mwh', 'aleax', 'anthonybaxter', 'kbk', 'disommav']
pr_nums = []
priority = 'critical'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1114776'
versions = ['Python 2.3']

@disommav
Copy link
Mannequin Author

disommav mannequin commented Feb 2, 2005

upgrading from python 2.3.4 to 2.3.5rc1 I got this
error on a module that was working correctly

File "../Field.py", line 203, in copy
properties = deepcopy(cdict)
File "/usr/lib/python2.3/copy.py", line 191, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.3/copy.py", line 285, in
_deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python2.3/copy.py", line 200, in deepcopy
copier = _getspecial(cls, "__deepcopy__")
File "/usr/lib/python2.3/copy.py", line 66, in
_getspecial
for basecls in cls.__mro__:
AttributeError: __mro__

@disommav disommav mannequin closed this as completed Feb 2, 2005
@disommav disommav mannequin assigned anthonybaxter Feb 2, 2005
@disommav disommav mannequin added the stdlib Python modules in the Lib dir label Feb 2, 2005
@disommav disommav mannequin closed this as completed Feb 2, 2005
@disommav disommav mannequin assigned anthonybaxter Feb 2, 2005
@disommav disommav mannequin added the stdlib Python modules in the Lib dir label Feb 2, 2005
@mwhudson
Copy link

mwhudson commented Feb 2, 2005

Logged In: YES
user_id=6656

Eek, that sounds pretty bad! Can you attach the code/cook up a smaller
test case?

@anthonybaxter
Copy link
Mannequin

anthonybaxter mannequin commented Feb 3, 2005

Logged In: YES
user_id=29957

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=293338
has a fuller stack trace.

@aleaxit
Copy link
Contributor

aleaxit commented Feb 5, 2005

Logged In: YES
user_id=60314

The problem's easy to fix (using inspect.getmro instead of direct
__mro__ access) but hard to reproduce -- what type not recorded in the
dispatch table lacks an __mro__? Can't find one easily, and I'd like to
have a unit-test reproducing the bug before I commit the fix.

Vincenzo, can you explain what the type is happening to be in that value
whose deepcopy gives problems? or can anybody else suggest a type as
above?

@aleaxit
Copy link
Contributor

aleaxit commented Feb 6, 2005

Logged In: YES
user_id=60314

Fixed (using inspect.getmro instead of direct __mro__ access) -- added
unittest for that thanks to John Lenton's suggestion on c.l.py

@kbkaiser
Copy link
Contributor

Logged In: YES
user_id=149084

Should this be closed?

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

3 participants