failure in python deepcopy #19

pabigot opened this Issue Aug 26, 2014 · 0 comments


None yet

1 participant

pabigot commented Aug 26, 2014

This SF forum post notes that a deep copy of a binding instance that involves absent namespaces produces a serialization error. There's probably some magic method that can be added to tell deepcopy how to proceed.

@pabigot pabigot added this to the PyXB 1.2.4 milestone Aug 26, 2014
@pabigot pabigot added the bug label Aug 26, 2014
@pabigot pabigot self-assigned this Aug 26, 2014
@pabigot pabigot changed the title from failure in python3 deepcopy to failure in python deepcopy Oct 18, 2014
@pabigot pabigot added enhancement and removed bug labels Oct 18, 2014
@pabigot pabigot added a commit that closed this issue Oct 19, 2014
@pabigot fix #19: failure in python deepcopy
The capabilities in Python's copy module depend on serializing and
unserializing instances to create cloned instances.  This breaks when
PyXB does not allow serialization of instances with absent namespaces.

While serialization of such instances cannot be supported in general
(because absent namespaces lack a unique identifier), it can be
supported within a PyXB invocation by generating a session-local unique
identifier as the serialized representation of an absent namespace.
@pabigot pabigot closed this in 49f5eec Oct 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment