Drop support for Python 3.6 (end-of-life 2021-12-23).
Add support for PyPy 3.7.
Add Python wheels distribution.
Restore prior order of
ocidkey in merged releases.
Improve performance of
rule_overrideskeys omit array indexes.
MissingDateKeyErroris now initialized correctly.
TypeError, to allow exception handling of versions less than 0.5.2 to remain unchanged.
The collision behavior is changed to always warn.
collision_behaviorargument. Use a warning filter instead.
DuplicateIdValueWarningto store the
pathat which, and the
idon which, the collision occurred.
add_release_to_versioned_release, which can be set on a per-field basis to:
ocdsmerge.MERGE_BY_POSITION: merge objects in the array based on their array index, instead of their
ocdsmerge.APPEND: retain all objects in the array.
Remove these flags as possible values of
The collision behavior is changed to silently ignore the collision, by default.
Add these flags as possible values of
ocdsmerge.MERGE_BY_POSITION: merge objects in arrays based on their array index, instead of their
ocdsmerge.APPEND: retain all objects in arrays.
Warn if multiple objects in an array have the same
add_release_to_versioned_release, which can be set to:
ocdsmerge.WARN: issue a
ocdsmerge.RAISE: raise a
ocdsmerge.IGNORE: silently ignore the collision
get_tagsno longer returns duplicate tags.
Added exception messages to all exceptions.
If there is more than one release, but a
datefield is neither a string nor null, the
NonStringDateValueErrorexception is raised, instead of
If a release is not an object, the
NonObjectReleaseErrorexception is raised, instead of
If there is a
TypeErrorfor any other reason, it is raised as-is, instead of
Fix package: Rename VCR cassettes for Windows users.
Fix package: Remove
Fix package: Add VCR cassettes to
Fix package: Add
MANIFEST.inand allow tests to run offline.
Extract the inner loops of
If there is more than one release, but a
datefield is either missing or null, the
NullDateValueErrorexceptions are raised, respectively, instead of the generic
If a field’s value is set to
null, it is omitted from the compiled release.
If a field’s value is an empty object or empty array in a release, skip it.
Behavior is undefined and inconsistent if an array is not defined in the schema and contains only objects in some releases but not in others. 0a81a43
For developers using this library as a reference implementation:
versionIdis ignored by this library, as it merely assists in identifying which
idfields are not on objects in arrays.
The following behaviors were previously undocumented, though they are implied by the merge rules:
Test cases for other implementations. See README.
You can specify a custom schema by passing parsed JSON to the existing
If the schema isn’t provided or is a URL or file path, it is parsed once and cached. 5d2f831
Recognizes OCDS 1.0
ocdsVersionmerge strategies. e67353d
The following conditions occur on structurally correct OCDS data:
If the items in an array were non-objects, the array wouldn’t be treated as a single value. #14
If an array were mixing objects with and without
idfields, the compiled release would merge objects if an array index matched an
idvalue. The new behavior is to keep any objects without
If objects in an array weren’t defined in the schema and had no
idfields, the objects would be merged based on array index. The new behavior is to keep all objects. 0e26402
The following conditions don’t occur in OCDS schema, but can occur in extensions:
If objects in an array were defined in the schema and had no
wholeListMergewere not set, the objects would be merged based on array index, instead of using the whole-list-merge strategy. 73dd088
If an array were defined in the schema as having objects and non-objects, the identifier-merge strategy would sometimes be used instead of the whole-list-merge strategy. d222e09
The following conditions don’t occur in OCDS schema, or in extensions authored by the Open Contracting Partnership, but can occur in extensions authored by others:
false, they were treated as
true, instead of being ignored. d115fa2
omitWhenMergedwere set on an array of non-objects, the array wouldn’t be omitted, instead of being omitted. 2d39a0f
wholeListMergewere set on an object, only the latest version of the object would be retained in the compiled release, instead of merging all versions of the object. b2a0dc6
Use the schema to determine the merge rules.
Allow specifying a custom local or remote schema.
Use relative imports.
Move repository to open-contracting organization.