- Nothing changed yet.
ExternalizableInstanceDict
no longer inherits fromAbstractDynamicIO
, it just implements the same interface (with the exception of many of the_ext
methods). This class is deprecated.
- Make
InterfaceObjectIO._ext_self
readable from Python, even though that is not documented (and may change again in the future). Document the intended API,_ext_replacement()
. See issue 73. - Make
AbstractDynamicObjectIO._ext_getattr
handle a default value, and add_ext_replacement_getattr
for when it will only be called once. See issue 73.
- The
@NoPickle
decorator also works withPersistent
subclasses (and may or may not work with multiple-inheritance subclasses ofPersistent
, depending on the MRO, but that's always been the case for regular objects). APersistent
subclass being decorated with@NoPickle
doesn't make much sense, so aRuntimeWarning
is issued. A warning is also issued if the class directly implements one of the pickle protocol methods. - Updating objects that use
createFieldProperties
or otherwise haveFieldProperty
objects in their type is at least 10% faster thanks to avoiding double-validation due to a small monkey-patch onFieldProperty
. See issue 67. - Proxies around objects that implement
toExternalObject
are allowed again; the proxied object'stoExternalObject
will be called. - The signature for
updateFromExternalObject()
has been tightened. It should be(self, external_object, context, **kwargs)
, where**kwargs
is optional, as is context.**kwargs
currently contains nothing useful. Uses ofdataserver=None
in the signature will generate a warning. This may be tightened further in the future. See issue 30. __ext_ignore_updateFromExternalObject__
is officially deprecated and generates a warning.update_from_external_object
caches certain information about the types of the updater objects, making it 8-25% faster.update_from_external_object
mutates sequences contained in a dict in-place instead of overwriting with a new list.update_from_external_object
mutates sequences at the top level instead of returning a new list.- Add support for finding factories for incoming data which do not
specify a MIME type or class field based on the key they are
assigned to. This aids in consuming data produced by foreign systems
or using
Dict
schema fields that require modelled values. See issue 51 and PR 68. - Schemas that use
InterfaceObjectIO
(including through the ZCML directiveregisterAutoPackageIO
) can useDict
fields more easily on internalization (externalization has always worked): They automatically internalize their values by treating theDict
as anonymous external data. - Strings can automatically be adapted into
ITimeDelta
objects.
- The low levels of externalization no longer catch and hide POSKeyError. This indicates a problem with the database. See #60
- Remove support for
object_hook
inupdate_from_external_object
. See #29. - A number of deprecated aliases for moved functions have been removed.
- On CPython, some of the modules are compiled as extension modules
using Cython for a 10-30% increase in speed. Set the
PURE_PYTHON
environment variable to disable this at runtime. - The unused, undocumented method
stripSyntheticKeysFromExternalDictionary
was removed from instances ofExternalizableDictionaryMixin
. Use the import instead. - Unused keyword arguments for
to_standard_external_dictionary
andto_minimal_standard_external_dictionary
now produce a warning. In the future, extra keyword arguments will be an error. notifyModified
no longer accepts theeventFactory
argument.- The
notify_modified
alias fornotifyModified
has been removed. - Decorating external mappings and external objects handled
decorate_callback
differently. This argument is only used whendecorate
is false. This argument is also confusing and should be considered deprecated. choose_field
no longer has the undocumented conversion behaviour for the CREATOR external field name.
- First PyPI release.
- Add support for Python 3.
- Drop support for externalizing to plists. See #21
- Reach 100% test coverage and ensure we remain there through CI.
- Introduce
nti.externalization.extension_points
to hold hook functions. Move the Pyramid integration there (and deprecate that). Also move the NTIID support there (but the old name works too). See #27 - Deprecate
nti.externalization.internalization.register_legacy_search_module
. See #35 - Stop
ext:registerAutoPackageIO
from registering the legacy class-name based factories by default. If you need class-name based factories, there are two options. The first is to explicitly registerIClassObjectFactory
objects in ZCML (we could add a scanning directive to make that more convenient for large numbers of classes), and the second is to setregister_legacy_search_module
to a true value in the ZCML directive forext:registerAutoPackageIO
. Note that we expect the behaviour of this attribute to change in the near future. See #33 - Make
ext:registerAutoPackageIO
perform legacy class registrations when the configuration context executes, not when the directive runs. This means that conflicts in legacy class names will be detected at configuration time. It also means that legacy class names can be registered locally withz3c.baseregistry
(previously they were always registered in the global site manager). See #28 - Drop dependency on
zope.preference
andzope.annotation
. They were not used by this package, although ourconfigure.zcml
did include them. If you usezope.preference
orzope.annotation
, please include them in your own ZCML file. - Drop hard dependency on Acquisition. It is still used if available and is used in test mode.
- Add public implementations of
IMimeObjectFactory
andIClassObjectFactory
innti.externalization.factory
. - Drop dependency on
nti.zodb
and itsPersistentPropertyHolder
. The datastructures innti.externalization.persistence
no longer extend that class; if you have further subclasses that addnti.zodb.peristentproperty.PropertyHoldingPersistent
properties, you'll need to be sure to mixin this class now. See #43 - Add the
<ext:classObjectFactory>
directive for registeringClass
based factories. (Note: MIME factories are preferred.) - Callers of
to_standard_external_dictionary
(which includes AutoPackageScopedInterfaceIO) will now automatically get aMimeType
value if one can be found. Previously only callers ofto_minimal_standard_external_dictionary
would.