Registry / devops / zope-copy

zope-copy

JSON →
library6.0pypypi✓ verified 83d ago

Provides a pluggable copy mechanism for Python objects, including support for custom copy operations via interfaces. Current version 6.0, requires Python >=3.9. Maintained by the Zope Foundation. Regular releases.

pip install zope.copy
INSTALL
IMPORT
SIG · ZOPE-COPY
Z
zope-copy
devopspythonv6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

copy
from zope.copy import copy
from zope.copy import deepcopy
zope.copy does not have a 'deepcopy' function; use copy with hooks.
ICopyHook
from zope.copy.interfaces import ICopyHook

Demonstrates basic copying of an object using zope.copy's copy function.

from zope.copy import copy from zope.interface import directlyProvides from zope.copy.interfaces import ICopyHook class MyObj: def __init__(self, value): self.value = value # Example usage obj = MyObj(42) obj_copy = copy(obj) print(obj_copy.value) # 42
Debug
Known issues
breakingzope.copy 6.0 removed support for Python 2 and Python versions <3.9.
fix
Ensure your environment uses Python >=3.9.
affects: >=6.0
gotchaThe copy function does not copy some built-in types (e.g., modules, functions, classes) by default; manual handling via ICopyHook adapters may be needed.
fix
Implement an ICopyHook for such types if deep copying is required.
affects: all
deprecatedUse of zope.copy's old-style super() calls may break with newer Python versions.
fix
Upgrade to zope.copy 6.0.
affects: <6.0
Errors
Common errors & fixes
AttributeError: 'module' object has no attribute 'copy'
Importing incorrectly as 'import zope.copy' and then calling 'zope.copy.copy()'.
fix
Use 'from zope.copy import copy'.
TypeError: object.__copy__() takes exactly one argument (the instance to copy)
Trying to use Python's built-in copy.copy on objects that expect zope.copy's copy.
fix
Use 'from zope.copy import copy' instead of 'import copy'.
Upgrade
Version history
6.0latest on PyPI · released Sep 12, 2025
Audit
Dependencies
zope.interfacerequiredRequired for defining copy interfaces.
zope.componentrequiredRequired for adapter lookup during copying.
Agent activity
38 hits · last 30 days
node
32
OpenAI (training)
1
Resources
zope-copy — pip install zope-copy · libregistry