nti.externalization 3.0.0__tar.gz → 3.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/.github/workflows/tests.yml +25 -7
- nti_externalization-3.2.0/.readthedocs.yml +35 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/CHANGES.rst +26 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/MANIFEST.in +1 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/PKG-INFO +31 -4
- nti_externalization-3.2.0/docs/api/datetime.rst +5 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/basics.rst +25 -6
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/conf.py +1 -1
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/externalization.rst +2 -2
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/make-manylinux +3 -3
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/pyproject.toml +47 -1
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/setup.py +8 -4
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/__init__.py +7 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/_base_interfaces.c +492 -415
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/_base_interfaces.py +4 -8
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/_compat.py +13 -7
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/_interface_cache.c +131 -130
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/_interface_cache.py +4 -8
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/_threadlocal.py +11 -10
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/autopackage.py +8 -9
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/configure.zcml +8 -8
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/datastructures.c +2319 -2145
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/datastructures.py +29 -28
- nti_externalization-3.0.0/src/nti/externalization/datetime.py → nti_externalization-3.2.0/src/nti/externalization/datetime_ext.py +1 -6
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/dublincore.py +2 -6
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/extension_points.py +0 -4
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/__init__.py +12 -21
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/_externalizer.pxd +1 -2
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/_standard_fields.pxd +2 -2
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/decorate.c +2 -2
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/dictionary.c +684 -859
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/dictionary.py +29 -51
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/externalizer.c +959 -933
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/externalizer.py +41 -40
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/fields.c +304 -366
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/fields.py +0 -9
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/replacers.py +4 -5
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/standard_fields.c +360 -360
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/standard_fields.py +1 -4
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/tests/test_externalizer.py +3 -5
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/factory.py +5 -5
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/integer_strings.py +3 -10
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/interfaces.py +10 -13
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/__init__.py +0 -4
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/_externals.pxd +2 -2
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/_factories.pxd +2 -2
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/_fields.pxd +2 -4
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/_legacy_factories.pxd +1 -1
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/_updater.pxd +12 -10
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/events.c +596 -559
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/events.py +11 -11
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/externals.c +368 -468
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/externals.py +2 -17
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/factories.c +786 -873
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/factories.py +14 -20
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/fields.c +1419 -1179
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/fields.py +28 -40
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/legacy_factories.c +1061 -840
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/legacy_factories.py +14 -20
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/tests/test_externals_wo_class_mimetype.py +10 -15
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/tests/test_fields.py +7 -13
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/tests/test_updater.py +5 -10
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/updater.c +1970 -1782
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/updater.py +53 -53
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/numbers.py +0 -4
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/oids.py +6 -8
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/persistence.py +3 -7
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/proxy.py +3 -4
- nti_externalization-3.2.0/src/nti/externalization/py.typed +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/representation.py +149 -35
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/singleton.c +200 -240
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/singleton.py +10 -13
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/testing.py +0 -4
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/__init__.py +4 -8
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/benchmarks/__init__.py +0 -3
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/benchmarks/__main__.py +2 -4
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/benchmarks/bm_simple_iface.py +7 -12
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/benchmarks/bm_simple_iface_list.py +9 -20
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/benchmarks/bm_simple_registered_class.py +3 -5
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/benchmarks/bm_singleton.py +2 -4
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/benchmarks/bm_user_profile.py +0 -5
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/benchmarks/bootstrapinterfaces.py +0 -5
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/benchmarks/interfaces.py +3 -8
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/benchmarks/objects.py +2 -6
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/benchmarks/profileinterfaces.py +5 -9
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test__compat.py +0 -5
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_autopackage.py +3 -7
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_datastructures.py +7 -11
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_datetime.py +8 -11
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_docs.py +8 -6
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_dublincore.py +5 -9
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_externalization.py +41 -38
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_factory.py +2 -7
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_integer_strings.py +0 -4
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_interfaces.py +2 -4
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_internalization.py +12 -17
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_oids.py +4 -8
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_persistence.py +11 -15
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_proxy.py +0 -4
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_representation.py +9 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_singleton.py +1 -6
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_testing.py +0 -4
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_zcml.py +5 -7
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/zcml.py +7 -6
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti.externalization.egg-info/PKG-INFO +31 -4
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti.externalization.egg-info/SOURCES.txt +3 -1
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti.externalization.egg-info/requires.txt +3 -1
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/tox.ini +20 -2
- nti_externalization-3.0.0/docs/api/datetime.rst +0 -5
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/.coveragerc +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/.github/dependabot.yml +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/.isort.cfg +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/.pylintrc +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/AUTHORS +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/COPYRIGHT.txt +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/INSTALL +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/LICENSE +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/README.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/doc-requirements.txt +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/Makefile +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/ADVANCED.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/BASICS.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/HELPERS.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/STRINGS.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/ZODB.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/autopackage.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/datastructures.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/dublincore.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/extension_points.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/externalization.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/factory.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/index.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/integer_strings.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/interfaces.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/internalization.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/oids.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/persistence.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/proxy.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/representation.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/singleton.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/api/zcml.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/changelog.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/glossary.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/index.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/internalization.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/schemas.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/docs/special_attributes.rst +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/requirements.txt +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/setup.cfg +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/__init__.py +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/__base_interfaces.pxd +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/__interface_cache.pxd +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/_datastructures.pxd +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/_singleton.pxd +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/_decorate.pxd +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/_dictionary.pxd +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/_fields.pxd +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/decorate.py +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/externalization/tests/__init__.py +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/_events.pxd +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/internalization/tests/__init__.py +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/meta.zcml +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/benchmarks/configure.zcml +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/benchmarks/profileconfigure.zcml +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti/externalization/tests/test_benchmarks.py +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti.externalization.egg-info/dependency_links.txt +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti.externalization.egg-info/entry_points.txt +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti.externalization.egg-info/top_level.txt +0 -0
- {nti_externalization-3.0.0 → nti_externalization-3.2.0}/src/nti.externalization.egg-info/zip-safe +0 -0
|
@@ -18,11 +18,18 @@ jobs:
|
|
|
18
18
|
- "3.12"
|
|
19
19
|
- "3.13"
|
|
20
20
|
- "3.14"
|
|
21
|
+
- "3.15-dev"
|
|
21
22
|
extras:
|
|
22
|
-
- "[test,docs,zodb]"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
- "[test,docs,zodb,orjson]"
|
|
24
|
+
include:
|
|
25
|
+
# orjson 3.11.9 doesn't currently support
|
|
26
|
+
# being built for free-threaded python, so if we wanted
|
|
27
|
+
# to test there, we'd need to substitute it, most likely by
|
|
28
|
+
# moving it to an extra.
|
|
29
|
+
- python-version: "3.14t"
|
|
30
|
+
extras: "[test,docs,zodb]"
|
|
31
|
+
- python-version: "3.15t-dev"
|
|
32
|
+
extras: "[test,docs,zodb]"
|
|
26
33
|
|
|
27
34
|
runs-on: ubuntu-latest
|
|
28
35
|
steps:
|
|
@@ -38,13 +45,20 @@ jobs:
|
|
|
38
45
|
python -m pip install -U pip setuptools wheel
|
|
39
46
|
python -m pip install -U coverage
|
|
40
47
|
python -m pip install -v -U -e ".${{ matrix.extras }}"
|
|
48
|
+
- name: Disable GIL
|
|
49
|
+
if: ${{endsWith(matrix.python-version, 't') || endsWith(matrix.python-version, 't-dev')}}
|
|
50
|
+
# zope.hookable 8.2/zope.proxy 7.2 currently enables the gil
|
|
51
|
+
run: |
|
|
52
|
+
echo PYTHON_GIL=0 >> $GITHUB_ENV
|
|
41
53
|
- name: Test
|
|
42
54
|
run: |
|
|
43
55
|
python -m coverage run -m zope.testrunner --test-path=src --auto-color --auto-progress
|
|
44
56
|
PURE_PYTHON=1 coverage run -a -m zope.testrunner --test-path=src --auto-color --auto-progress
|
|
57
|
+
- name: Docs
|
|
58
|
+
if: matrix.python-version == '3.14'
|
|
59
|
+
# Requires orjson
|
|
60
|
+
run: |
|
|
45
61
|
coverage run -a -m sphinx -b doctest -d docs/_build/doctrees docs docs/_build/doctests
|
|
46
|
-
coverage combine || true
|
|
47
|
-
coverage report -i || true
|
|
48
62
|
- name: Lint
|
|
49
63
|
if: matrix.python-version == '3.14'
|
|
50
64
|
run: |
|
|
@@ -54,6 +68,10 @@ jobs:
|
|
|
54
68
|
run: |
|
|
55
69
|
python -m pip uninstall -y ZODB zope.dublincore persistent zope.container BTrees
|
|
56
70
|
PURE_PYTHON=1 coverage run -a -m zope.testrunner --test-path=src --auto-color --auto-progress
|
|
71
|
+
- name: Combine Coverage
|
|
72
|
+
run: |
|
|
73
|
+
coverage combine || true
|
|
74
|
+
coverage report -i || true
|
|
57
75
|
- name: Submit to Coveralls
|
|
58
76
|
uses: coverallsapp/github-action@v2
|
|
59
77
|
with:
|
|
@@ -75,7 +93,7 @@ jobs:
|
|
|
75
93
|
# We use a regular Python matrix entry to share as much code as possible.
|
|
76
94
|
strategy:
|
|
77
95
|
matrix:
|
|
78
|
-
python-version: [3.
|
|
96
|
+
python-version: [3.14]
|
|
79
97
|
image:
|
|
80
98
|
- manylinux_2_28_x86_64
|
|
81
99
|
- manylinux_2_28_aarch64
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# .readthedocs.yml
|
|
2
|
+
# Read the Docs configuration file
|
|
3
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
4
|
+
|
|
5
|
+
# Some things can only be configured on the RTD dashboard.
|
|
6
|
+
# Those that we may have changed from the default include:
|
|
7
|
+
|
|
8
|
+
# Analytics code:
|
|
9
|
+
# Show Version Warning: False
|
|
10
|
+
# Single Version: True
|
|
11
|
+
|
|
12
|
+
# Required
|
|
13
|
+
version: 2
|
|
14
|
+
|
|
15
|
+
# Build documentation in the docs/ directory with Sphinx
|
|
16
|
+
sphinx:
|
|
17
|
+
builder: html
|
|
18
|
+
configuration: docs/conf.py
|
|
19
|
+
|
|
20
|
+
# Set the version of Python and requirements required to build your
|
|
21
|
+
# docs
|
|
22
|
+
|
|
23
|
+
build:
|
|
24
|
+
# os is required for some reason
|
|
25
|
+
os: ubuntu-22.04
|
|
26
|
+
tools:
|
|
27
|
+
python: "3.14"
|
|
28
|
+
|
|
29
|
+
python:
|
|
30
|
+
install:
|
|
31
|
+
- method: pip
|
|
32
|
+
path: .
|
|
33
|
+
extra_requirements:
|
|
34
|
+
- docs
|
|
35
|
+
- orjson
|
|
@@ -3,6 +3,32 @@
|
|
|
3
3
|
=========
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
3.2.0 (2026-05-19)
|
|
7
|
+
==================
|
|
8
|
+
|
|
9
|
+
- Drop support for Python 3.10.
|
|
10
|
+
- Add support for Python 3.15.
|
|
11
|
+
- Move the ``orjson`` dependency to the ``orjson`` extra
|
|
12
|
+
for compatibility with free-threaded Python. If you're using regular
|
|
13
|
+
Python, it is highly recommended to install this extra.
|
|
14
|
+
- Add support for free-threaded CPython. However, note that some
|
|
15
|
+
dependencies, most notably orjson, cannot
|
|
16
|
+
currently be installed on free-threaded CPython, and other
|
|
17
|
+
dependencies may currently require enabling the GIL.
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
3.1.0 (2026-05-08)
|
|
21
|
+
==================
|
|
22
|
+
|
|
23
|
+
- Document the ``to_json_representation`` variants and add one
|
|
24
|
+
that guarantees sorted keys. Make the "fast" variant not dependent
|
|
25
|
+
on second-chance externalization.
|
|
26
|
+
- Renamed the "datetime" module to "datetime_ext" to avoid conflicts
|
|
27
|
+
with the standard library. Backwards compatibility shims are in place.
|
|
28
|
+
- Remove some long-deprecated parameters that were typically
|
|
29
|
+
undocumented.
|
|
30
|
+
- Introduce some basic type annotations.
|
|
31
|
+
|
|
6
32
|
3.0.0 (2026-05-07)
|
|
7
33
|
==================
|
|
8
34
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nti.externalization
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.2.0
|
|
4
4
|
Summary: NTI Externalization
|
|
5
5
|
Home-page: https://github.com/OpenNTI/nti.externalization
|
|
6
6
|
Author: Jason Madden
|
|
@@ -12,20 +12,19 @@ Classifier: Natural Language :: English
|
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
20
20
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
21
|
-
Requires-Python: >=3.
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
License-File: AUTHORS
|
|
24
24
|
Requires-Dist: nti.schema>=1.17.0
|
|
25
25
|
Requires-Dist: PyYAML>=5.1
|
|
26
26
|
Requires-Dist: isodate
|
|
27
27
|
Requires-Dist: pytz
|
|
28
|
-
Requires-Dist: orjson>=3.11.9
|
|
29
28
|
Requires-Dist: transaction
|
|
30
29
|
Requires-Dist: zope.component>=4.6.1
|
|
31
30
|
Requires-Dist: zope.configuration>=4.4.0
|
|
@@ -58,6 +57,8 @@ Requires-Dist: repoze.sphinx.autointerface; extra == "docs"
|
|
|
58
57
|
Requires-Dist: sphinx_rtd_theme; extra == "docs"
|
|
59
58
|
Provides-Extra: benchmarks
|
|
60
59
|
Requires-Dist: pyperf; extra == "benchmarks"
|
|
60
|
+
Provides-Extra: orjson
|
|
61
|
+
Requires-Dist: orjson>=3.11.9; extra == "orjson"
|
|
61
62
|
Dynamic: author
|
|
62
63
|
Dynamic: author-email
|
|
63
64
|
Dynamic: classifier
|
|
@@ -105,6 +106,32 @@ Documentation is hosted at https://ntiexternalization.readthedocs.io/
|
|
|
105
106
|
=========
|
|
106
107
|
|
|
107
108
|
|
|
109
|
+
3.2.0 (2026-05-19)
|
|
110
|
+
==================
|
|
111
|
+
|
|
112
|
+
- Drop support for Python 3.10.
|
|
113
|
+
- Add support for Python 3.15.
|
|
114
|
+
- Move the ``orjson`` dependency to the ``orjson`` extra
|
|
115
|
+
for compatibility with free-threaded Python. If you're using regular
|
|
116
|
+
Python, it is highly recommended to install this extra.
|
|
117
|
+
- Add support for free-threaded CPython. However, note that some
|
|
118
|
+
dependencies, most notably orjson, cannot
|
|
119
|
+
currently be installed on free-threaded CPython, and other
|
|
120
|
+
dependencies may currently require enabling the GIL.
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
3.1.0 (2026-05-08)
|
|
124
|
+
==================
|
|
125
|
+
|
|
126
|
+
- Document the ``to_json_representation`` variants and add one
|
|
127
|
+
that guarantees sorted keys. Make the "fast" variant not dependent
|
|
128
|
+
on second-chance externalization.
|
|
129
|
+
- Renamed the "datetime" module to "datetime_ext" to avoid conflicts
|
|
130
|
+
with the standard library. Backwards compatibility shims are in place.
|
|
131
|
+
- Remove some long-deprecated parameters that were typically
|
|
132
|
+
undocumented.
|
|
133
|
+
- Introduce some basic type annotations.
|
|
134
|
+
|
|
108
135
|
3.0.0 (2026-05-07)
|
|
109
136
|
==================
|
|
110
137
|
|
|
@@ -60,6 +60,23 @@ concerns should be kept as separated as possible from our model
|
|
|
60
60
|
objects. Ideally, we should be able to use third-party objects that we
|
|
61
61
|
have no control over seamlessly in external and internal data.
|
|
62
62
|
|
|
63
|
+
Installation
|
|
64
|
+
============
|
|
65
|
+
|
|
66
|
+
This package is installed from PyPI::
|
|
67
|
+
|
|
68
|
+
pip install nti.externalization[orjson,zodb]
|
|
69
|
+
|
|
70
|
+
It has some extras:
|
|
71
|
+
|
|
72
|
+
orjson
|
|
73
|
+
Highly recommended for a faster dumping and loading experience. As
|
|
74
|
+
of at least orjson 3.11.9, however, this is incompatible with
|
|
75
|
+
free-threaded Python.
|
|
76
|
+
zodb
|
|
77
|
+
Optional; provides support for BTrees, persistent objects, intids, and
|
|
78
|
+
container proxies.
|
|
79
|
+
|
|
63
80
|
Getting Started
|
|
64
81
|
===============
|
|
65
82
|
|
|
@@ -248,7 +265,7 @@ others:
|
|
|
248
265
|
|
|
249
266
|
>>> internal.creator = u'sjohnson'
|
|
250
267
|
>>> internal.createdTime = 123456
|
|
251
|
-
>>> pprint(to_external_object(internal))
|
|
268
|
+
>>> pprint(to_external_object(internal), compact=True, indent=1)
|
|
252
269
|
{'Class': 'ExternalObject',
|
|
253
270
|
'CreatedTime': 123456,
|
|
254
271
|
'Creator': 'sjohnson',
|
|
@@ -337,7 +354,7 @@ Now we can register and use it as before:
|
|
|
337
354
|
... postal_code=u'95014',
|
|
338
355
|
... country=u'USA')
|
|
339
356
|
>>> external = to_external_object(address)
|
|
340
|
-
>>> pprint(external)
|
|
357
|
+
>>> pprint(external, compact=True, indent=1)
|
|
341
358
|
{'Class': 'Address',
|
|
342
359
|
'city': 'Cupertino',
|
|
343
360
|
'country': 'USA',
|
|
@@ -473,7 +490,7 @@ demonstrating that nested schemas and objects are possible.
|
|
|
473
490
|
... realname=u'Steve Jobs',
|
|
474
491
|
... )
|
|
475
492
|
>>> external = to_external_object(user_profile)
|
|
476
|
-
>>> pprint(external)
|
|
493
|
+
>>> pprint(external, compact=True, indent=1)
|
|
477
494
|
{'Class': 'UserProfile',
|
|
478
495
|
'MimeType': 'application/vnd.nextthought.benchmarks.userprofile',
|
|
479
496
|
'addresses': {'home': {'Class': 'Address',
|
|
@@ -556,16 +573,18 @@ keyword arguments to change that:
|
|
|
556
573
|
>>> as_bytes = to_external_representation(address, EXT_REPR_JSON, sort_keys=False, as_str=False)
|
|
557
574
|
>>> assert isinstance(as_bytes, bytes)
|
|
558
575
|
|
|
559
|
-
There are also some convenience functions
|
|
560
|
-
|
|
576
|
+
There are also some convenience functions. The "fast" and "sorted"
|
|
577
|
+
variants bypass utility lookup and directly use the default ``JsonRepresenter``.
|
|
561
578
|
|
|
562
579
|
>>> from nti.externalization import to_json_representation
|
|
563
580
|
>>> from nti.externalization import to_json_representation_fast
|
|
581
|
+
>>> from nti.externalization import to_json_representation_sorted
|
|
564
582
|
>>> to_json_representation(address)
|
|
565
583
|
'{"Class":"Address",...
|
|
566
584
|
>>> as_bytes = to_json_representation_fast(address)
|
|
567
585
|
>>> assert isinstance(as_bytes, bytes)
|
|
568
|
-
|
|
586
|
+
>>> to_json_representation_sorted(address)
|
|
587
|
+
'{"Class":"Address","city":"Cupertino",...
|
|
569
588
|
|
|
570
589
|
Loading from a string doesn't have a shortcut, we need to use the
|
|
571
590
|
utility:
|
|
@@ -78,7 +78,7 @@ release = rqmt
|
|
|
78
78
|
#
|
|
79
79
|
# This is also used if you do content translation via gettext catalogs.
|
|
80
80
|
# Usually you set "language" from the command line for these cases.
|
|
81
|
-
language =
|
|
81
|
+
language = 'en'
|
|
82
82
|
|
|
83
83
|
# List of patterns, relative to source directory, that match files and
|
|
84
84
|
# directories to ignore when looking for source files.
|
|
@@ -85,7 +85,7 @@ We'll register our adapter and externalize:
|
|
|
85
85
|
>>> from zope import component
|
|
86
86
|
>>> component.provideSubscriptionAdapter(PrivateAddressDecorator)
|
|
87
87
|
>>> from pprint import pprint
|
|
88
|
-
>>> pprint(to_external_object(home_address))
|
|
88
|
+
>>> pprint(to_external_object(home_address), compact=True, indent=1)
|
|
89
89
|
{'Class': 'Address',
|
|
90
90
|
'MimeType': 'application/vnd.nextthought.benchmarks.address',
|
|
91
91
|
'country': 'USA',
|
|
@@ -118,7 +118,7 @@ look for a request):
|
|
|
118
118
|
:pyversion: > 3.3
|
|
119
119
|
|
|
120
120
|
>>> component.provideSubscriptionAdapter(LinkAddressDecorator)
|
|
121
|
-
>>> pprint(to_external_object(home_address, request=Request()))
|
|
121
|
+
>>> pprint(to_external_object(home_address, request=Request()), compact=True, indent=1)
|
|
122
122
|
{'Class': 'Address',
|
|
123
123
|
'MimeType': 'application/vnd.nextthought.benchmarks.address',
|
|
124
124
|
'country': 'USA',
|
|
@@ -13,7 +13,7 @@ export TRAVIS=true
|
|
|
13
13
|
# know. The env var works for pip 20.
|
|
14
14
|
export PIP_NO_PYTHON_VERSION_WARNING=1
|
|
15
15
|
export PIP_NO_WARN_SCRIPT_LOCATION=1
|
|
16
|
-
|
|
16
|
+
export PIP_ROOT_USER_ACTION=ignore
|
|
17
17
|
|
|
18
18
|
if [ -d /project ] && [ -d /opt/python ]; then
|
|
19
19
|
# Running inside docker
|
|
@@ -44,9 +44,9 @@ if [ -d /project ] && [ -d /opt/python ]; then
|
|
|
44
44
|
OPATH="$PATH"
|
|
45
45
|
which auditwheel
|
|
46
46
|
echo @@@@@@@@@@@@@@@@@@@@@@
|
|
47
|
-
echo Will build /opt/python/cp{
|
|
47
|
+
echo Will build /opt/python/cp{311,312,313,314,315}*
|
|
48
48
|
|
|
49
|
-
for variant in `ls -d /opt/python/cp{314,313,
|
|
49
|
+
for variant in `ls -d /opt/python/cp{315,314,313,311,312}*`; do
|
|
50
50
|
|
|
51
51
|
export PATH="$variant/bin:$OPATH"
|
|
52
52
|
echo "Building $variant $(python --version)"
|
|
@@ -17,8 +17,54 @@ requires = [
|
|
|
17
17
|
# failing in Python 2 (https://travis-ci.org/github/gevent/gevent/jobs/683782800);
|
|
18
18
|
# This was fixed in 3.0a5 (https://github.com/cython/cython/issues/3578)
|
|
19
19
|
# 3.0a6 fixes an issue cythonizing source on 32-bit platforms
|
|
20
|
-
"Cython >= 3.2.
|
|
20
|
+
"Cython >= 3.2.4",
|
|
21
21
|
]
|
|
22
22
|
|
|
23
23
|
[tool.check-manifest]
|
|
24
24
|
ignore = ["*.c"]
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
[tool.mypy]
|
|
28
|
+
# Must be present for mypy to read this file.
|
|
29
|
+
follow_imports = "normal"
|
|
30
|
+
check_untyped_defs = true
|
|
31
|
+
allow_redefinition = true
|
|
32
|
+
disable_error_code = [
|
|
33
|
+
"method-assign"
|
|
34
|
+
]
|
|
35
|
+
# Our tests are in terrible shape
|
|
36
|
+
# and will need some work to be clean
|
|
37
|
+
exclude = [
|
|
38
|
+
'test_.*\.py',
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[[tool.mypy.overrides]]
|
|
42
|
+
# third-party untyped code
|
|
43
|
+
module = [
|
|
44
|
+
"ZODB.*",
|
|
45
|
+
"zope.*",
|
|
46
|
+
"persistent.*",
|
|
47
|
+
"cpuinfo",
|
|
48
|
+
"nti.*",
|
|
49
|
+
"botocore.*",
|
|
50
|
+
"fsspec.*",
|
|
51
|
+
"transaction",
|
|
52
|
+
"grpc",
|
|
53
|
+
"grpc_health.*",
|
|
54
|
+
"google.type.*",
|
|
55
|
+
"zc.*",
|
|
56
|
+
"z3c.*",
|
|
57
|
+
"netaddr.*",
|
|
58
|
+
"dnslib",
|
|
59
|
+
"cytoolz.*",
|
|
60
|
+
"toolz.*",
|
|
61
|
+
"boto3.*",
|
|
62
|
+
"pg8000",
|
|
63
|
+
"urllib3.*",
|
|
64
|
+
"indexed_gzip",
|
|
65
|
+
"pyperf",
|
|
66
|
+
"isodate",
|
|
67
|
+
"vmprof"
|
|
68
|
+
|
|
69
|
+
]
|
|
70
|
+
ignore_missing_imports = true
|
|
@@ -133,6 +133,7 @@ if not PYPY:
|
|
|
133
133
|
'language_level': '3',
|
|
134
134
|
'always_allow_keywords': False,
|
|
135
135
|
'nonecheck': False,
|
|
136
|
+
'freethreading_compatible': True,
|
|
136
137
|
},
|
|
137
138
|
)
|
|
138
139
|
except ValueError:
|
|
@@ -147,7 +148,7 @@ if not PYPY:
|
|
|
147
148
|
|
|
148
149
|
setup(
|
|
149
150
|
name='nti.externalization',
|
|
150
|
-
version='3.
|
|
151
|
+
version='3.2.0',
|
|
151
152
|
author='Jason Madden',
|
|
152
153
|
author_email='jason@seecoresoftware.com',
|
|
153
154
|
description="NTI Externalization",
|
|
@@ -160,11 +161,11 @@ setup(
|
|
|
160
161
|
'Operating System :: OS Independent',
|
|
161
162
|
'Programming Language :: Python :: 3',
|
|
162
163
|
'Programming Language :: Python :: 3 :: Only',
|
|
163
|
-
'Programming Language :: Python :: 3.10',
|
|
164
164
|
'Programming Language :: Python :: 3.11',
|
|
165
165
|
'Programming Language :: Python :: 3.12',
|
|
166
166
|
'Programming Language :: Python :: 3.13',
|
|
167
167
|
'Programming Language :: Python :: 3.14',
|
|
168
|
+
'Programming Language :: Python :: 3.15',
|
|
168
169
|
'Programming Language :: Python :: Implementation :: CPython',
|
|
169
170
|
],
|
|
170
171
|
url="https://github.com/OpenNTI/nti.externalization",
|
|
@@ -179,7 +180,7 @@ setup(
|
|
|
179
180
|
'PyYAML >= 5.1',
|
|
180
181
|
'isodate',
|
|
181
182
|
'pytz',
|
|
182
|
-
|
|
183
|
+
|
|
183
184
|
'transaction',
|
|
184
185
|
'zope.component >= 4.6.1',
|
|
185
186
|
'zope.configuration >= 4.4.0',
|
|
@@ -212,7 +213,10 @@ setup(
|
|
|
212
213
|
'benchmarks': [
|
|
213
214
|
'pyperf',
|
|
214
215
|
],
|
|
216
|
+
'orjson': [
|
|
217
|
+
'orjson >= 3.11.9',
|
|
218
|
+
]
|
|
215
219
|
},
|
|
216
220
|
entry_points=entry_points,
|
|
217
|
-
python_requires=">=3.
|
|
221
|
+
python_requires=">=3.11",
|
|
218
222
|
)
|
|
@@ -10,6 +10,7 @@ __all__ = [
|
|
|
10
10
|
'update_from_external_object',
|
|
11
11
|
'to_json_representation_fast',
|
|
12
12
|
'to_json_representation',
|
|
13
|
+
'to_json_representation_sorted',
|
|
13
14
|
]
|
|
14
15
|
|
|
15
16
|
from nti.externalization.externalization import to_external_object
|
|
@@ -17,6 +18,12 @@ from nti.externalization.externalization import to_standard_external_dictionary
|
|
|
17
18
|
|
|
18
19
|
from nti.externalization.representation import to_external_representation
|
|
19
20
|
from nti.externalization.representation import to_json_representation_fast
|
|
21
|
+
from nti.externalization.representation import to_json_representation_sorted
|
|
20
22
|
from nti.externalization.representation import to_json_representation
|
|
21
23
|
from nti.externalization.internalization import new_from_external_object
|
|
22
24
|
from nti.externalization.internalization import update_from_external_object
|
|
25
|
+
|
|
26
|
+
# BWC hacks
|
|
27
|
+
import sys
|
|
28
|
+
import nti.externalization.datetime_ext as datetime
|
|
29
|
+
sys.modules['nti.externalization.datetime'] = datetime
|