[issue11480] Cannot copy a class with a metaclass other than type

2013-12-01 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c6bb6f304f75 by Alexandre Vassalotti in branch '3.3':
Issue #11480: Fixed copy.copy to work with classes with custom metaclasses.
http://hg.python.org/cpython/rev/c6bb6f304f75

New changeset c4715c9f442f by Alexandre Vassalotti in branch 'default':
Issue #11480: Merge with 3.3.
http://hg.python.org/cpython/rev/c4715c9f442f

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11480
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11480] Cannot copy a class with a metaclass other than type

2013-12-01 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

Thank you for the patch!

--
assignee:  - alexandre.vassalotti
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed
versions: +Python 3.4 -Python 3.1, Python 3.2

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11480
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11480] Cannot copy a class with a metaclass other than type

2013-02-24 Thread Jyrki Pulliainen

Jyrki Pulliainen added the comment:

Hi, to be able to include your patch, could you sign the contributor form, 
please: http://www.python.org/psf/contrib/ ?

--
nosy: +nailor

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11480
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11480] Cannot copy a class with a metaclass other than type

2013-02-24 Thread Daniel Urban

Daniel Urban added the comment:

I did, and I've been told that it has been added to the bug tracker: 
http://mail.python.org/pipermail/python-committers/2012-May/001987.html

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11480
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11480] Cannot copy a class with a metaclass other than type

2013-02-24 Thread Jyrki Pulliainen

Jyrki Pulliainen added the comment:

Oh, my bad. The * was not just showing next to your name. Maybe someone with 
more access rights can help?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11480
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11480] Cannot copy a class with a metaclass other than type

2012-06-03 Thread Daniel Urban

Daniel Urban urban.dani...@gmail.com added the comment:

I've updated the patch to the current version. I've also checked, that the 
tests still pass.

--
nosy: +ncoghlan
Added file: http://bugs.python.org/file25806/copy_metaclass_2.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11480
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11480] Cannot copy a class with a metaclass other than type

2011-03-18 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Looks good to me.

--
nosy: +eric.araujo, pitrou

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11480
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11480] Cannot copy a class with a metaclass other than type

2011-03-14 Thread Daniel Stutzbach

Changes by Daniel Stutzbach stutzb...@google.com:


--
keywords: +needs review
nosy: +alexandre.vassalotti, stutzbach
stage:  - patch review

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11480
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11480] Cannot copy a class with a metaclass other than type

2011-03-13 Thread Daniel Urban

New submission from Daniel Urban urban.dani...@gmail.com:

copy.copy cannot copy a class which have a metaclass other than type:

 import abc
 import copy
 
 class C(metaclass=abc.ABCMeta):
... pass
... 
 copy.copy(C)
Traceback (most recent call last):
...
TypeError: can't pickle int objects


The reason seems to be, as described in msg8329 (issue494904) that the 
__reduce_ex__ function inherited from object will be called instead of the 
method bound to the class object (that's the reason of the strange error 
message). (See also issue7689.)

The interesting thing is, that copy.deepcopy was already fixed in 4680ef4fe90a. 
 I'm attaching a patch, that does basically the same for copy that was done 
with deepcopy (it also includes a test).

--
components: Library (Lib)
files: copy_metaclass.patch
keywords: patch
messages: 130731
nosy: durban
priority: normal
severity: normal
status: open
title: Cannot copy a class with a metaclass other than type
type: behavior
versions: Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file21100/copy_metaclass.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11480
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com