diff --git a/.changelog/0.10.0.toml b/.changelog/0.10.0.toml new file mode 100644 index 00000000..f7ed3437 --- /dev/null +++ b/.changelog/0.10.0.toml @@ -0,0 +1,22 @@ +release-date = "2020-12-30" + +[[entries]] +id = "941943f9-5cf7-48fb-beea-2c341bc01907" +type = "improvement" +description = "classes decorated with `@uniontype(container=True)` must now be constructed using a single keyword argument as in `MyUnion(member1=Member1Value())`\n" +author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "0cb46581-98b5-40ad-82f1-eba64a2d498a" +type = "fix" +description = "add missing `to_stream` and `from_stream` to `__all__`" +author = "@NiklasRosenstein" +component = "databind.json" + +[[entries]] +id = "b65cd60e-3b8f-42c0-b4d8-37e5257bc269" +type = "feature" +description = "add `cast()` function" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/0.11.0.toml b/.changelog/0.11.0.toml similarity index 56% rename from databind.core/.changelog/0.11.0.toml rename to .changelog/0.11.0.toml index 4df094c0..23bbb7a1 100644 --- a/databind.core/.changelog/0.11.0.toml +++ b/.changelog/0.11.0.toml @@ -1,25 +1,43 @@ -release-date = "2021-04-08" +release-date = "2021-03-05" [[entries]] id = "5fdfb706-e8fd-4277-a4fa-8bc9fd894336" type = "feature" description = "`enumerate_fields()` now works with uniontype instances and classes" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "58571d4d-65a2-46c7-949d-60f8eb219e56" type = "improvement" description = "update `@uniontype` generated `__repr__()` method" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "8585b0f1-6d33-4f1c-8637-c4186e456786" type = "feature" description = "add support for member aliasing in `UnionResolver`" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "9a23ae46-60fd-4f4f-950b-bb6966aa0003" type = "feature" description = "add `Context.closed_field_metadata()` function" author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "65f5c1ef-ae7f-4802-af8c-c5e5460f602d" +type = "improvement" +description = "Update union construction during deserialization" +author = "@NiklasRosenstein" +component = "databind.json" + +[[entries]] +id = "779fedda-841f-4e00-bed0-e3ccab1ad836" +type = "improvement" +description = "minimum version of `databind.core` is `^0.10.0`" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.json/.changelog/0.12.0.toml b/.changelog/0.12.0.toml similarity index 88% rename from databind.json/.changelog/0.12.0.toml rename to .changelog/0.12.0.toml index 2e672f3c..e5a2c70e 100644 --- a/databind.json/.changelog/0.12.0.toml +++ b/.changelog/0.12.0.toml @@ -5,33 +5,39 @@ id = "f718e1bd-f235-4a48-81c4-379f5469c9de" type = "feature" description = "Add `uniontype(single_key_discriminator)` argument" author = "@NiklasRosenstein" +component = "databind.json" [[entries]] id = "6349c88c-cedf-4d8f-95f5-441ae9c96486" type = "fix" description = "Generated `__eq__()` method for `uniontype(container=True)` is now injective to avoid issue when `type(other)` is `object`" author = "@NiklasRosenstein" +component = "databind.json" [[entries]] id = "db67c3d6-80a9-4a61-af10-fc46bd505d6e" type = "feature" description = "add support for aliasing with `field(altname)` in `@uniontype` container declarations" author = "@NiklasRosenstein" +component = "databind.json" [[entries]] id = "8373fb43-05e2-469a-88df-76f7d6d0b083" type = "feature" description = "`StringConverter` can now also be relaxed, `FieldMetadata.relaxed` is now inherited from the closest metadata in the context for POD data types" author = "@NiklasRosenstein" +component = "databind.json" [[entries]] id = "55862c13-5599-4bb0-9f1d-d60300584e12" type = "fix" description = "deserializing a `List[str]` from a `str` object now results in an error" author = "@NiklasRosenstein" +component = "databind.json" [[entries]] id = "1ff62e50-8b99-4ee7-813b-f740870638a1" type = "improvement" description = "bump dependency on databind.core to ^0.11.0" author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.json/.changelog/0.2.0.toml b/.changelog/0.2.0.toml similarity index 57% rename from databind.json/.changelog/0.2.0.toml rename to .changelog/0.2.0.toml index e8e8d5e5..2e3ce174 100644 --- a/databind.json/.changelog/0.2.0.toml +++ b/.changelog/0.2.0.toml @@ -1,19 +1,36 @@ release-date = "2020-08-29" +[[entries]] +id = "d54aa0ac-9329-4d2a-8e3a-16063491f764" +type = "improvement" +description = "update type hints to pass mypy checks" +author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "47206f43-6699-40ea-8210-c1a341d2b623" +type = "improvement" +description = "`FieldMetadata` now keeps a reference to the `dataclasses.Field` object and it's' metadata" +author = "@NiklasRosenstein" +component = "databind.core" + [[entries]] id = "3195561b-c5ed-4595-922b-9d76c46892f9" type = "improvement" description = "update type hints to pass mypy checks" author = "@NiklasRosenstein" +component = "databind.json" [[entries]] id = "c3458aff-e6b3-4b20-97b0-12882818b6db" type = "improvement" description = "add DEBUG log when `MixtypeConverter` is unable to convert a value at all to make debugging easier" author = "@NiklasRosenstein" +component = "databind.json" [[entries]] id = "37e0f485-54c0-4bcf-bd3e-082f629b8689" type = "fix" description = "accept `datetime.date`/`datetime.datetime` objects when converting to python if the target type is a respective match (rather than forcing a string as an input)" author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/0.3.0.toml b/.changelog/0.3.0.toml similarity index 65% rename from databind.core/.changelog/0.3.0.toml rename to .changelog/0.3.0.toml index 8fc6b9f1..81db24b6 100644 --- a/databind.core/.changelog/0.3.0.toml +++ b/.changelog/0.3.0.toml @@ -5,9 +5,18 @@ id = "27920260-c47e-4191-9f3a-5249584d28a3" type = "improvement" description = "ensure that non-default arguments do not have a class attribute of type `object` (which is used as a workaround to support non-default fields following default fields in `dataclasses`)" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "0d15905e-4810-4c08-a4d8-70aaa72ad4f0" type = "fix" description = "raise for uninitialized fields inherited from parent datamodels" author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "71c62ec7-7d37-4461-96a3-217de03499de" +type = "improvement" +description = "`ArrayConverter` now supports subclasses of the `typing.List` generic" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/0.4.0.toml b/.changelog/0.4.0.toml similarity index 71% rename from databind.core/.changelog/0.4.0.toml rename to .changelog/0.4.0.toml index 655c7663..8d253fbd 100644 --- a/databind.core/.changelog/0.4.0.toml +++ b/.changelog/0.4.0.toml @@ -5,15 +5,25 @@ id = "0522b7f0-4bc4-48c3-aa0a-fe3d3f96e5c5" type = "feature" description = "add `ModelMetadata.serialize_as` (which translates into a keyword argument for `@datamodel()`) to specify a type hint that should be used instead of the type itself when serializing/deserializing it" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "771ef7cd-2020-4504-b949-2cb0bfc08e35" type = "feature" description = "add `Context.coerce_errors()` context manager" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "30501a59-9860-4f3c-8ccb-d5883449f940" type = "feature" description = "add `TypeHint` variable which should be used in places where a type hint is expected" author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "03524ec0-3644-4bd8-9a64-a1dc0e754fd7" +type = "feature" +description = "support `@datamodel(serialize_as)` in `ModelConverter`" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/.changelog/0.4.1.toml b/.changelog/0.4.1.toml new file mode 100644 index 00000000..b59d4af9 --- /dev/null +++ b/.changelog/0.4.1.toml @@ -0,0 +1,15 @@ +release-date = "2020-09-06" + +[[entries]] +id = "8bc4f7c3-1a29-41f1-9f5d-f3f8a99897ca" +type = "fix" +description = "Re-render setup file, materializing missing dependency on `dataclasses`. This fixes using the module in Python 3.6." +author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "7abbb43c-0eab-4009-9353-9de48aebc5b7" +type = "fix" +description = "conversion of values of a `List` subtype *from Python* are now converted to a built-in `list` instead of the same `List` subtype" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/0.4.2.toml b/.changelog/0.4.2.toml similarity index 89% rename from databind.core/.changelog/0.4.2.toml rename to .changelog/0.4.2.toml index 00740320..f9bd2eb2 100644 --- a/databind.core/.changelog/0.4.2.toml +++ b/.changelog/0.4.2.toml @@ -5,3 +5,4 @@ id = "6993c150-4320-4d1d-b8a9-d5763c326a34" type = "hygiene" description = "Move `type_repr()` declaration to `databind.core.utils` and add `find_orig_base()` function" author = "@NiklasRosenstein" +component = "databind.core" diff --git a/databind.json/.changelog/0.5.0.toml b/.changelog/0.5.0.toml similarity index 91% rename from databind.json/.changelog/0.5.0.toml rename to .changelog/0.5.0.toml index 29075f3c..e2f21b0c 100644 --- a/databind.json/.changelog/0.5.0.toml +++ b/.changelog/0.5.0.toml @@ -5,3 +5,4 @@ id = "bc123b73-f4d0-44a4-9e43-de56b776a7b6" type = "feature" description = "Add `strict` argument to `register_json_converters()` which will allow converters for plain-old-datatypes to accept string representations as well" author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.json/.changelog/0.5.1.toml b/.changelog/0.5.1.toml similarity index 89% rename from databind.json/.changelog/0.5.1.toml rename to .changelog/0.5.1.toml index 7da25110..629a44e3 100644 --- a/databind.json/.changelog/0.5.1.toml +++ b/.changelog/0.5.1.toml @@ -5,3 +5,4 @@ id = "c039776f-9ecc-460a-b5d4-b9cbc5bb1e46" type = "fix" description = "Fix Python 3.6 support for `typing.List` subclasses by reading the generic paraemter from the right object" author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/0.6.0.toml b/.changelog/0.6.0.toml similarity index 59% rename from databind.core/.changelog/0.6.0.toml rename to .changelog/0.6.0.toml index b2886b86..48a10a68 100644 --- a/databind.core/.changelog/0.6.0.toml +++ b/.changelog/0.6.0.toml @@ -1,19 +1,36 @@ -release-date = "2020-09-14" +release-date = "2020-09-10" [[entries]] id = "da1141be-ec57-4d28-a50a-1158dca6107b" type = "fix" description = "`Registry.get_converter()` now looks for a converter in the base classes only if it could not find it for the normalized version of the current type, making converter resolution more predictable" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "df476ea6-934c-440c-92be-d41f4bc8422c" type = "feature" description = "Add `ClassUnionResolver` which evaluates type hints dynamically, allowing to use forward references in the type hints of a `@uniontype()`" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "65bd22be-4505-4b45-ad8a-b0f7f6307312" type = "feature" description = "Add `@interface()` and `@implementation()` decorators" author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "cc7ad2d7-1ba6-428a-8f49-b7407ccdc505" +type = "feature" +description = "Add `to_stream()` and `from_stream()` functions" +author = "@NiklasRosenstein" +component = "databind.json" + +[[entries]] +id = "bc0a165d-7868-415c-9b52-8f9ad9040cb9" +type = "feature" +description = "Add support for `typing.Dict` subclasses" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.json/.changelog/0.6.1.toml b/.changelog/0.6.1.toml similarity index 86% rename from databind.json/.changelog/0.6.1.toml rename to .changelog/0.6.1.toml index 75b0b592..b6eb53e9 100644 --- a/databind.json/.changelog/0.6.1.toml +++ b/.changelog/0.6.1.toml @@ -5,3 +5,4 @@ id = "b5991aa2-b0ba-4243-8529-5cb061c17cc4" type = "fix" description = "Fix `NameError` in `ObjectConverter`" author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/0.7.0.toml b/.changelog/0.7.0.toml similarity index 58% rename from databind.core/.changelog/0.7.0.toml rename to .changelog/0.7.0.toml index 7df356d6..d875ca96 100644 --- a/databind.core/.changelog/0.7.0.toml +++ b/.changelog/0.7.0.toml @@ -5,3 +5,11 @@ id = "24bad1cf-e404-4c23-b6ad-e0b3499564c1" type = "feature" description = "`@dataclasses.dataclass()` classes can now be converted as a data model automatically, `BaseMetadata.for_type()` now returns an optional" author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "b6a90864-ebc9-43fd-a909-4a88139eb2b7" +type = "feature" +description = "Now supports converting Sets" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/0.7.1.toml b/.changelog/0.7.1.toml similarity index 59% rename from databind.core/.changelog/0.7.1.toml rename to .changelog/0.7.1.toml index 54fba4e6..22543c02 100644 --- a/databind.core/.changelog/0.7.1.toml +++ b/.changelog/0.7.1.toml @@ -5,9 +5,18 @@ id = "bc008cf1-db00-4789-9362-7b5c47af1d26" type = "fix" description = "Python 3.9 support in type hint normalization" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "8465d65a-3f95-4a9f-aa18-e8810999b5ec" type = "fix" description = "fix mypy errors" author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "28477028-ec46-493a-9b8c-acf024cf953c" +type = "fix" +description = "Fix mypy errors" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/0.8.0.toml b/.changelog/0.8.0.toml similarity index 73% rename from databind.core/.changelog/0.8.0.toml rename to .changelog/0.8.0.toml index a653ff42..a60b13c9 100644 --- a/databind.core/.changelog/0.8.0.toml +++ b/.changelog/0.8.0.toml @@ -5,3 +5,11 @@ id = "71eb5eb9-8246-489d-948f-8a525b00e505" type = "improvement" description = "`@implementation()` now sets the databind metadata field to `None` if no explicit metadata is already set on the type. `Registry.get_converter()` recognizes this case and stops checking the base classes. This is to avoid a confusing error when the type decorated with `@implementation()` seems to inherit the `UnionMetadata` from the parent class (because of the `Registry.get_converter()` base class check) but actually does not provide a metadata. Now we see \"no converter found for type XYZ\" instead \"expected UnionMetadata to be provided by XYZ\" in `databind.json`" author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "a27c60f9-6cce-4abf-8043-d081c0de33c2" +type = "feature" +description = "add converter for `typing.Any`, which by the way does not actually convert anything" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/0.9.0.toml b/.changelog/0.9.0.toml similarity index 70% rename from databind.core/.changelog/0.9.0.toml rename to .changelog/0.9.0.toml index 2e7283de..16a45c97 100644 --- a/databind.core/.changelog/0.9.0.toml +++ b/.changelog/0.9.0.toml @@ -1,19 +1,29 @@ -release-date = "2020-12-30" +release-date = "2020-11-24" [[entries]] id = "b52ab6b6-b481-4bb7-9883-71adc813408e" type = "feature" description = "add `ImportingUnionResolver` and `EntrypointUnionResolver`, both which can also be used with the `@interface` decorator. The `resolver` argument now accepts a string which will be converted into a `UnionResolver` (supported formats are `import` and `entrypoint:`)" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "3c1737e4-fe26-46e8-9b0c-6560cc9041bd" type = "fix" description = "`@implementation()` can now be used without explicitly specifying the `for_` parameter when decorating a class with multiple bases where only one base is a `@uniontype`" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "896fee89-6413-4f92-8ffd-130e27bc27de" type = "fix" description = "fix inheritance of fields from `@dataclass` parent classes" author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "4436d541-f7a8-4c1b-9292-0bc1d6624a15" +type = "feature" +description = "handle `FieldMetadata.relaxed` and `FieldMetadata.strict` in Bool, Integer and String converters" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/1.0.0.toml b/.changelog/1.0.0.toml similarity index 85% rename from databind.core/.changelog/1.0.0.toml rename to .changelog/1.0.0.toml index 01a50379..699c190b 100644 --- a/databind.core/.changelog/1.0.0.toml +++ b/.changelog/1.0.0.toml @@ -5,3 +5,4 @@ id = "4c779cd4-3aeb-4ab8-b9cf-178dce76db85" type = "breaking change" description = "Full rewrite" author = "@NiklasRosenstein" +component = "databind.core" diff --git a/.changelog/1.0.0.yml b/.changelog/1.0.0.yml deleted file mode 100644 index 2b2f1dd3..00000000 --- a/.changelog/1.0.0.yml +++ /dev/null @@ -1,6 +0,0 @@ -release_date: '2021-07-22' -changes: -- type: breaking_change - component: general - description: minimum Python version is now 3.7 - fixes: [] diff --git a/databind.core/.changelog/1.0.1.toml b/.changelog/1.0.1.toml similarity index 86% rename from databind.core/.changelog/1.0.1.toml rename to .changelog/1.0.1.toml index d1a6bb8e..e8eb9cb0 100644 --- a/databind.core/.changelog/1.0.1.toml +++ b/.changelog/1.0.1.toml @@ -5,9 +5,11 @@ id = "047bcdde-be03-419a-b2ff-351c1519e69b" type = "improvement" description = "import `dataclass_to_schema` into `databind.core` top-level package" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "cd9d09c1-7801-4125-8274-4745295c584a" type = "fix" description = "fix type hints to pass mypy checks" author = "@NiklasRosenstein" +component = "databind.core" diff --git a/databind.core/.changelog/1.1.0.toml b/.changelog/1.1.0.toml similarity index 90% rename from databind.core/.changelog/1.1.0.toml rename to .changelog/1.1.0.toml index 979a3853..efdc959d 100644 --- a/databind.core/.changelog/1.1.0.toml +++ b/.changelog/1.1.0.toml @@ -5,24 +5,28 @@ id = "6fe4210a-2ee5-4311-8152-c6b4164486a4" type = "improvement" description = "remove `AnnotatedType`, add `BaseType.annotations` instead." author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "b864f8a6-fa00-49e3-b23e-cf290e8aee0b" type = "breaking change" description = "Reorganize a lot of internal APIs and some public APIs (e.g. renamed `ITypeHintConverter` to `TypeHintAdapter`, `IConverter` to `Converter` + respective module name changes, deprecated `ObjectMapper.default()`, remove `IObjectMapper` and replace `Context.mapper` with `Context.converters` and `Context.annotations`." author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "a7f89cac-61a3-42bd-acec-6b25ed363f4f" type = "breaking change" description = "replace `Schema.flat_fields()` with `Schema.flattened()`" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "aaff65b7-df9f-4e90-b7c0-86b0b7762479" type = "improvement" description = "only import members from sub-modules where they are expected to be used from (ie. `databind.core`, `databind.core.annotations`, `databind.core.dataclasses`, `databind.json`)" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "8d8029c3-7fb9-4017-ae24-61f7099e73fb" @@ -32,3 +36,4 @@ author = "@NiklasRosenstein" issues = [ "https://github.com/NiklasRosenstein/databind/issues/7", ] +component = "databind.core" diff --git a/databind.core/.changelog/1.1.1.toml b/.changelog/1.1.1.toml similarity index 89% rename from databind.core/.changelog/1.1.1.toml rename to .changelog/1.1.1.toml index 46067948..57dddff4 100644 --- a/databind.core/.changelog/1.1.1.toml +++ b/.changelog/1.1.1.toml @@ -5,3 +5,4 @@ id = "a17c9256-e016-4328-9b80-a4ee73627c39" type = "fix" description = "fix `EntrypointSubtypes()` constructor which used to accidentally accept a `TypeHintAdapter` argument" author = "@NiklasRosenstein" +component = "databind.core" diff --git a/.changelog/1.1.2.toml b/.changelog/1.1.2.toml new file mode 100644 index 00000000..e86e7d96 --- /dev/null +++ b/.changelog/1.1.2.toml @@ -0,0 +1,15 @@ +release-date = "2021-08-06" + +[[entries]] +id = "bf344197-c36c-41ff-9084-fcf035d58f37" +type = "fix" +description = "fix `@A.union` types to accept `ObjectType`s" +author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "9f730924-d0bc-4c55-8563-66719ff6188d" +type = "feature" +description = "support de-/serializing `bytes` as base64" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/1.1.3.toml b/.changelog/1.1.3.toml similarity index 88% rename from databind.core/.changelog/1.1.3.toml rename to .changelog/1.1.3.toml index 0b943152..511a1a6a 100644 --- a/databind.core/.changelog/1.1.3.toml +++ b/.changelog/1.1.3.toml @@ -5,9 +5,11 @@ id = "fba8312f-7a24-4f0f-adb3-e1a21f02dae5" type = "improvement" description = "`ObjectType` and `ConcreteType` now show the class fqn on repr()" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "99cec1c1-6269-4a2b-81b9-9f8dcdfb359d" type = "fix" description = "fix support for special generic subclasses (like `List` or `Dict`) with another generic base class (eg. `Generic`)" author = "@NiklasRosenstein" +component = "databind.core" diff --git a/.changelog/1.1.4.yml b/.changelog/1.1.4.yml deleted file mode 100644 index e1eaa200..00000000 --- a/.changelog/1.1.4.yml +++ /dev/null @@ -1,7 +0,0 @@ -changes: -- type: fix - component: general - description: rerender `setup.py` files with `shut==0.16.0` with https://github.com/NiklasRosenstein/shut/issues/21 - fixed, now the LICENSE.txt is again included in the `sdist` - fixes: [] -release_date: '2021-08-10' diff --git a/databind.json/.changelog/1.1.5.toml b/.changelog/1.1.5.toml similarity index 55% rename from databind.json/.changelog/1.1.5.toml rename to .changelog/1.1.5.toml index d98234b3..976196cd 100644 --- a/databind.json/.changelog/1.1.5.toml +++ b/.changelog/1.1.5.toml @@ -1,5 +1,12 @@ release-date = "2021-08-16" +[[entries]] +id = "efbf0a33-5eae-4868-84e0-00d252c7a08d" +type = "fix" +description = "normal type with `Annotated[MyType, union(...)]` is now correctly interpreted as `UnionType`" +author = "@NiklasRosenstein" +component = "databind.core" + [[entries]] id = "02e75fd1-7555-42de-bb36-e9c88b65b680" type = "fix" @@ -8,3 +15,4 @@ author = "@NiklasRosenstein" issues = [ "https://github.com/NiklasRosenstein/databind/issues/13", ] +component = "databind.json" diff --git a/databind.core/.changelog/1.1.6.toml b/.changelog/1.1.6.toml similarity index 90% rename from databind.core/.changelog/1.1.6.toml rename to .changelog/1.1.6.toml index 84e7f22b..1d90b702 100644 --- a/databind.core/.changelog/1.1.6.toml +++ b/.changelog/1.1.6.toml @@ -5,3 +5,4 @@ id = "a1d0d6a4-75ea-41c4-b79b-5d3a4f517b69" type = "fix" description = "fix case where DefaultTypeHintAdapter does not continue adaptation dynamically upon encountering a fixed type object" author = "@NiklasRosenstein" +component = "databind.core" diff --git a/.changelog/1.2.0.toml b/.changelog/1.2.0.toml new file mode 100644 index 00000000..841f345b --- /dev/null +++ b/.changelog/1.2.0.toml @@ -0,0 +1,52 @@ +release-date = "2021-08-20" + +[[entries]] +id = "2bfa9bb8-736b-4f42-ae79-662ac60d6c95" +type = "feature" +description = "add `Direction.is_serialize()` and `Direction.is_deserialize()`" +author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "9ca8468e-f716-4033-a07d-7c06d3d3e549" +type = "feature" +description = "add `AnnotationsRegistry.add_type_annotation()` and `AnnotationsRegistry.add_field_annotation()`" +author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "e8fa6c70-9732-40a3-a7d8-54d772e21ba9" +type = "feature" +description = "`DefaultAnnotationsProvider` now supports finding annotations in `Enum` members when annotated with `te.Annotated`, `DefaultAnnotationsProvider` is now registered to an `ObjectMapper` by default" +author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "c09f08bb-ce01-49f8-b3bc-94fb8d27a2e5" +type = "feature" +description = "add converter for `pathlib.PurePath` subclasses, enabled in the `JsonModule` by default" +author = "@NiklasRosenstein" +issues = [ + "https://github.com/NiklasRosenstein/databind/issues/14", +] +component = "databind.json" + +[[entries]] +id = "6b4a28ad-478a-4ae8-bfb8-58e3730bfee5" +type = "feature" +description = "add converter for `uuid.UUID` to `JsonModule`" +author = "@NiklasRosenstein" +issues = [ + "https://github.com/NiklasRosenstein/databind/issues/15", +] +component = "databind.json" + +[[entries]] +id = "c067911a-cee5-416a-b05d-19801bccbb27" +type = "feature" +description = "support aliases on enum values" +author = "@NiklasRosenstein" +issues = [ + "https://github.com/NiklasRosenstein/databind/issues/1", +] +component = "databind.json" diff --git a/.changelog/1.2.1.yml b/.changelog/1.2.1.yml deleted file mode 100644 index ed55fe77..00000000 --- a/.changelog/1.2.1.yml +++ /dev/null @@ -1,7 +0,0 @@ -changes: -- type: fix - component: general - description: fix interpreting `alias()` annotations on enumeration values in Python3.9+ - by including extras when looking up field annotations in `DefaultAnnotationsProvider` - fixes: [] -release_date: '2021-08-31' diff --git a/databind.core/.changelog/1.2.2.toml b/.changelog/1.2.2.toml similarity index 89% rename from databind.core/.changelog/1.2.2.toml rename to .changelog/1.2.2.toml index bf64ced1..9722f446 100644 --- a/databind.core/.changelog/1.2.2.toml +++ b/.changelog/1.2.2.toml @@ -5,9 +5,11 @@ id = "2a888a18-5c19-4857-9818-3fbf0d304472" type = "fix" description = "`DefaultTypeHintAdapter` no longer raises an exception upon receiving a BaseType instance" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "0f969c4c-29db-453c-b748-5ce5ad5e8fe2" type = "improvement" description = "`dataclass_to_schema(type_adapter)` argument is now optional and defaults to a `DefaultTypeHintAdapter` instance" author = "@NiklasRosenstein" +component = "databind.core" diff --git a/databind.core/.changelog/1.2.3.toml b/.changelog/1.2.3.toml similarity index 90% rename from databind.core/.changelog/1.2.3.toml rename to .changelog/1.2.3.toml index 4ee29813..2f923902 100644 --- a/databind.core/.changelog/1.2.3.toml +++ b/.changelog/1.2.3.toml @@ -8,3 +8,4 @@ author = "@NiklasRosenstein" issues = [ "https://github.com/NiklasRosenstein/databind/issues/19", ] +component = "databind.core" diff --git a/databind.json/.changelog/1.2.4.toml b/.changelog/1.2.4.toml similarity index 90% rename from databind.json/.changelog/1.2.4.toml rename to .changelog/1.2.4.toml index 14df5a05..3c656fa5 100644 --- a/databind.json/.changelog/1.2.4.toml +++ b/.changelog/1.2.4.toml @@ -5,3 +5,4 @@ id = "404847f0-d763-4a38-889a-3364f15024b1" type = "fix" description = "declare missing `nr.optional` dependency (was not an actual bug because the dependency was introduced transitively anyway)" author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/1.2.5.toml b/.changelog/1.2.5.toml similarity index 89% rename from databind.core/.changelog/1.2.5.toml rename to .changelog/1.2.5.toml index 686f5d99..e2ed4d63 100644 --- a/databind.core/.changelog/1.2.5.toml +++ b/.changelog/1.2.5.toml @@ -5,3 +5,4 @@ id = "de35184a-5931-40b4-82db-72ab0912b99a" type = "fix" description = "add missing nr.pylang.utils dependency (was introduced transtively before so it was no crucial bug)" author = "@NiklasRosenstein" +component = "databind.core" diff --git a/databind.core/.changelog/1.2.6.toml b/.changelog/1.2.6.toml similarity index 87% rename from databind.core/.changelog/1.2.6.toml rename to .changelog/1.2.6.toml index 691e8849..6b1a62bc 100644 --- a/databind.core/.changelog/1.2.6.toml +++ b/.changelog/1.2.6.toml @@ -5,3 +5,4 @@ id = "b33b4453-c0ff-4abd-bebe-57b643a47f6b" type = "fix" description = "correctly support Python 3.10 `types.UnionType`" author = "@NiklasRosenstein" +component = "databind.core" diff --git a/databind.core/.changelog/1.3.0.toml b/.changelog/1.3.0.toml similarity index 88% rename from databind.core/.changelog/1.3.0.toml rename to .changelog/1.3.0.toml index d29524ef..87f89346 100644 --- a/databind.core/.changelog/1.3.0.toml +++ b/.changelog/1.3.0.toml @@ -5,3 +5,4 @@ id = "11e63e15-6b96-4c99-b096-70d4230288c6" type = "improvement" description = "improve readability of `ConversionError` by changing `Location.format()`" author = "@NiklasRosenstein" +component = "databind.core" diff --git a/databind.core/.changelog/1.3.1.toml b/.changelog/1.3.1.toml similarity index 55% rename from databind.core/.changelog/1.3.1.toml rename to .changelog/1.3.1.toml index 1c720ecf..c33bfced 100644 --- a/databind.core/.changelog/1.3.1.toml +++ b/.changelog/1.3.1.toml @@ -8,6 +8,7 @@ author = "@NiklasRosenstein" issues = [ "https://github.com/NiklasRosenstein/databind/issues/23", ] +component = "databind.core" [[entries]] id = "aefb76ba-5f30-4589-a5bd-e482851e9351" @@ -17,9 +18,28 @@ author = "@NiklasRosenstein" issues = [ "https://github.com/NiklasRosenstein/databind/issues/24", ] +component = "databind.core" [[entries]] id = "cc443d45-6490-4291-890f-ef6ed1555c90" type = "improvement" description = "change `ConverterProvider.get_converter()` to `ConverterProvider.get_converters()` and `ConversionNotApplicable` error type, allowing to test multiple converters for a type" author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "d192ebd0-f643-4823-bbbe-ec20b878d8b2" +type = "feature" +description = "add `databind.json.annotations.with_custom_json_converter()` annotation to allow implementing a custom converter for dataclasses" +author = "@NiklasRosenstein" +component = "databind.json" + +[[entries]] +id = "f5a426e0-21c1-415f-b7b3-c975d357f5a4" +type = "fix" +description = "narrow `JsonType` union type to use `dict` and `list` instead of `t.Mapping` and `t.Collection`" +author = "@NiklasRosenstein" +issues = [ + "https://github.com/NiklasRosenstein/databind/issues/22", +] +component = "databind.json" diff --git a/databind.core/.changelog/1.3.2.toml b/.changelog/1.3.2.toml similarity index 88% rename from databind.core/.changelog/1.3.2.toml rename to .changelog/1.3.2.toml index 9814b22d..394f0f67 100644 --- a/databind.core/.changelog/1.3.2.toml +++ b/.changelog/1.3.2.toml @@ -5,3 +5,4 @@ id = "7cb94b0f-5f69-4595-a38f-c2f532626082" type = "fix" description = "make `databind.core.annotations` hashable for use in `typing.Annotations`" author = "@NiklasRosenstein" +component = "databind.core" diff --git a/.changelog/1.4.0.toml b/.changelog/1.4.0.toml new file mode 100644 index 00000000..6c10ed3a --- /dev/null +++ b/.changelog/1.4.0.toml @@ -0,0 +1,21 @@ +release-date = "2022-01-22" + +[[entries]] +id = "b5ebc00a-ea8d-425b-931e-773840e22073" +type = "feature" +description = "add `union.Style.keyed`" +author = "@NiklasRosenstein" +issues = [ + "https://github.com/NiklasRosenstein/databind/issues/21", +] +component = "databind.core" + +[[entries]] +id = "af09d38c-66ee-4399-a9a7-404a1911add5" +type = "feature" +description = "support `union.Style.keyed`" +author = "@NiklasRosenstein" +issues = [ + "https://github.com/NiklasRosenstein/databind/issues/21", +] +component = "databind.json" diff --git a/databind.core/.changelog/1.5.0.toml b/.changelog/1.5.0.toml similarity index 90% rename from databind.core/.changelog/1.5.0.toml rename to .changelog/1.5.0.toml index 4cf79b92..bf530f40 100644 --- a/databind.core/.changelog/1.5.0.toml +++ b/.changelog/1.5.0.toml @@ -8,9 +8,11 @@ author = "@NiklasRosenstein" issues = [ "https://github.com/NiklasRosenstein/databind/issues/25", ] +component = "databind.core" [[entries]] id = "8ee5d13b-d721-461d-bacd-3cdb6e199a1d" type = "fix" description = "fix `unpack_type_hints()` to return args for a parametrized special generic alias (like `typing.List[T]` returning `(list, (T,))`)" author = "@NiklasRosenstein" +component = "databind.core" diff --git a/.changelog/1.5.1.toml b/.changelog/1.5.1.toml new file mode 100644 index 00000000..e5d19245 --- /dev/null +++ b/.changelog/1.5.1.toml @@ -0,0 +1,15 @@ +release-date = "2022-02-26" + +[[entries]] +id = "968be339-8a28-4cce-bdc6-61eb838fb803" +type = "refactor" +description = "migrate to `nr.util` package" +author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "2b6514ea-b84b-4c94-8b65-71f78ea8114e" +type = "refactor" +description = "migrate to `nr.util` package" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/1.5.2.toml b/.changelog/1.5.2.toml similarity index 87% rename from databind.core/.changelog/1.5.2.toml rename to .changelog/1.5.2.toml index 5423ccd0..6639053b 100644 --- a/databind.core/.changelog/1.5.2.toml +++ b/.changelog/1.5.2.toml @@ -5,3 +5,4 @@ id = "6873045a-f6b2-4244-991e-d31cf8eb0e3d" type = "feature" description = "add `nesting_key` parameter to `union()` annotation" author = "@NiklasRosenstein" +component = "databind.core" diff --git a/databind.core/.changelog/2.0.0-alpha.4.toml b/.changelog/2.0.0-alpha.4.toml similarity index 54% rename from databind.core/.changelog/2.0.0-alpha.4.toml rename to .changelog/2.0.0-alpha.4.toml index 51ed4ba4..da1ed63e 100644 --- a/databind.core/.changelog/2.0.0-alpha.4.toml +++ b/.changelog/2.0.0-alpha.4.toml @@ -5,9 +5,18 @@ id = "3bac26ba-57d6-4953-8393-386c618e1d14" type = "fix" description = "Fix error in `ConversionError.expected()` if the `types` parameter was a type hint" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "9439eaa0-19ba-4b9e-9437-b59c55219550" type = "breaking change" description = "add `ConversionError()` `origin` and `errors` parameter" author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "9f5996fe-a2bf-4fb5-b8bf-42c526673d93" +type = "breaking change" +description = "implement `Union.BEST_MATCH` in `UnionConverter`, which is now used as the default if an un-annotated `typing.Union` is encountered" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.json/.changelog/2.0.0.toml b/.changelog/2.0.0.toml similarity index 87% rename from databind.json/.changelog/2.0.0.toml rename to .changelog/2.0.0.toml index 6dd407d5..86c19571 100644 --- a/databind.json/.changelog/2.0.0.toml +++ b/.changelog/2.0.0.toml @@ -5,3 +5,4 @@ id = "c84b03be-9143-48bb-846d-5330a0665f45" type = "breaking change" description = "Remove `databind.json.settings` module" author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/2.0.0a2.toml b/.changelog/2.0.0a2.toml similarity index 62% rename from databind.core/.changelog/2.0.0a2.toml rename to .changelog/2.0.0a2.toml index 5d381e14..779fe5d7 100644 --- a/databind.core/.changelog/2.0.0a2.toml +++ b/.changelog/2.0.0a2.toml @@ -5,9 +5,18 @@ id = "321e07d2-6720-4a85-acb0-6975779a0cdf" type = "improvement" description = "move `ExtraKeys` and `Remainder` setting from `databind.json` to `databind.core`" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "20fd7449-70e4-4200-8058-f03e20155485" type = "feature" description = "make `ExtraKeys` setting a subclass of `ClassDecoratorSetting`, allowing it to be used to mark an entire class and allowing extra keys" author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "85403125-18ad-4988-8514-019a38a7128d" +type = "improvement" +description = "move `ExtraKeys` and `Remainder` setting from `databind.json` to `databind.core`" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.json/.changelog/2.0.0a3.toml b/.changelog/2.0.0a3.toml similarity index 91% rename from databind.json/.changelog/2.0.0a3.toml rename to .changelog/2.0.0a3.toml index 7f1592ba..2065f53e 100644 --- a/databind.json/.changelog/2.0.0a3.toml +++ b/.changelog/2.0.0a3.toml @@ -5,3 +5,4 @@ id = "72d6a4f6-dcd2-4638-af22-64764ea89385" type = "fix" description = "Fix `CollectionConverter` (used for subclasses of `collections.abc.Collection`) does not end up returnin a generator instead of a collection" author = "@NiklasRosenstein" +component = "databind.json" diff --git a/.changelog/2.0.1.toml b/.changelog/2.0.1.toml new file mode 100644 index 00000000..3a230bac --- /dev/null +++ b/.changelog/2.0.1.toml @@ -0,0 +1,29 @@ +release-date = "2022-05-09" + +[[entries]] +id = "77ea4dca-ae09-4454-9c01-2687ff3d57ad" +type = "improvement" +description = "Loosen requirement on `typing-extensions` from `^3.10.0` to `>=3.10.0`" +author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "adf0e51f-ba27-4421-a5a4-f771b5e5221e" +type = "refactor" +description = "Use Black and isort for code formatting, Flake8 for linting" +author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "e13ad790-4e0a-44fb-afec-3ecc7c6b9ad8" +type = "improvement" +description = "Loosen requirement on `typing-extensions` from `^3.10.0` to `>=3.10.0`" +author = "@NiklasRosenstein" +component = "databind.json" + +[[entries]] +id = "b537c6b7-fa06-41b4-a452-8edb5b0f6fe4" +type = "refactor" +description = "Use Black and isort for code formatting, Flake8 for linting" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/2.0.2.toml b/.changelog/2.0.2.toml similarity index 50% rename from databind.core/.changelog/2.0.2.toml rename to .changelog/2.0.2.toml index 004cb6d5..5f70e00e 100644 --- a/databind.core/.changelog/2.0.2.toml +++ b/.changelog/2.0.2.toml @@ -5,9 +5,25 @@ id = "f15a4a8f-c74e-4e71-801a-0f5ee411d227" type = "docs" description = "Add URLs to project metadata." author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "690814ed-1018-4a1d-b67f-4c1152003ce0" type = "improvement" description = "Schemas (dataclasses, typed dicts) that have an `Optional` field that are not explicitly marked as `Required()` now automatically get assigned `None` as a default value" author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "2b9885cd-5196-45dd-8b3e-3b8d10d8f708" +type = "docs" +description = "Add URLs to project metadata." +author = "@NiklasRosenstein" +component = "databind.json" + +[[entries]] +id = "a37639a0-d0bd-40e1-8b8b-06dbd6b96d9e" +type = "improvement" +description = "Use a fields default value if it is available when deserializing schemas" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.json/.changelog/2.0.3.toml b/.changelog/2.0.3.toml similarity index 62% rename from databind.json/.changelog/2.0.3.toml rename to .changelog/2.0.3.toml index fe4ec9c6..49bc170b 100644 --- a/databind.json/.changelog/2.0.3.toml +++ b/.changelog/2.0.3.toml @@ -1,7 +1,15 @@ release-date = "2022-05-11" +[[entries]] +id = "ad7df855-fe04-4acc-b925-83010fe02662" +type = "fix" +description = "Fix resolving nested forward references in dataclasses." +author = "@NiklasRosenstein" +component = "databind.core" + [[entries]] id = "fde3ca08-6897-4a16-a4d9-b794da8dd702" type = "fix" description = "Fixed an issue when deserializing fields in a schema when the Python type does not have the exact same representation in the structured payload, causing an error when that Python default value is handed as a value to be deserialized." author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/2.0.4.toml b/.changelog/2.0.4.toml similarity index 89% rename from databind.core/.changelog/2.0.4.toml rename to .changelog/2.0.4.toml index 9bfbd1df..5fbeafd7 100644 --- a/databind.core/.changelog/2.0.4.toml +++ b/.changelog/2.0.4.toml @@ -5,9 +5,11 @@ id = "bc8211d9-3762-44cb-8de8-bb0f7b56726a" type = "fix" description = "Fixed an issue where the frame for a dataclass type saved with `typeapi.scoped` was not respected for type evaluation." author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "1c10d176-2231-4632-a67b-458d71bdd523" type = "fix" description = "Fixed module-scoped evaluation of forward references for subclasses of `typing.TypedDict`." author = "@NiklasRosenstein" +component = "databind.core" diff --git a/databind.json/.changelog/2.0.5.toml b/.changelog/2.0.5.toml similarity index 93% rename from databind.json/.changelog/2.0.5.toml rename to .changelog/2.0.5.toml index 8333844f..5f529387 100644 --- a/databind.json/.changelog/2.0.5.toml +++ b/.changelog/2.0.5.toml @@ -5,3 +5,4 @@ id = "349e567d-c835-44e6-b10d-2296850f4249" type = "fix" description = "Fix that subclasses of a dataclasses marked also with @Union are deserialized as dataclasses instead of Unions; this change may have wider reaching effects because we no longer look up settings in bases of a type, but unit tests are OK with this" author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/2.0.6.toml b/.changelog/2.0.6.toml similarity index 86% rename from databind.core/.changelog/2.0.6.toml rename to .changelog/2.0.6.toml index 7bcc527b..4477e902 100644 --- a/databind.core/.changelog/2.0.6.toml +++ b/.changelog/2.0.6.toml @@ -5,3 +5,4 @@ id = "081d896e-cd4d-449c-9e0b-584097448905" type = "improvement" description = "Add support for `typeapi 0.2.0`" author = "@NiklasRosenstein" +component = "databind.core" diff --git a/.changelog/2.0.7.toml b/.changelog/2.0.7.toml new file mode 100644 index 00000000..acd7aa4b --- /dev/null +++ b/.changelog/2.0.7.toml @@ -0,0 +1,15 @@ +release-date = "2022-06-20" + +[[entries]] +id = "56621ccd-8ec3-409a-84f6-9ec4ce1a052f" +type = "improvement" +description = "Enable Mypy strict type checking mode" +author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "df546027-bed8-46e1-8e9d-caa6447142bf" +type = "improvement" +description = "Enable Mypy strict type checking mode" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.json/.changelog/2.0.8.toml b/.changelog/2.0.8.toml similarity index 90% rename from databind.json/.changelog/2.0.8.toml rename to .changelog/2.0.8.toml index 2112e7e0..55033c74 100644 --- a/databind.json/.changelog/2.0.8.toml +++ b/.changelog/2.0.8.toml @@ -5,3 +5,4 @@ id = "25634f7f-a646-407b-9696-fedfa201e1b9" type = "improvement" description = "Add a `LiteralConverter` which allows you to create literal-based unions (see new example in readme)" author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.json/.changelog/2.0.9.toml b/.changelog/2.0.9.toml similarity index 53% rename from databind.json/.changelog/2.0.9.toml rename to .changelog/2.0.9.toml index 52741306..1b001672 100644 --- a/databind.json/.changelog/2.0.9.toml +++ b/.changelog/2.0.9.toml @@ -1,7 +1,15 @@ release-date = "2022-11-03" +[[entries]] +id = "c8cb2dd0-edb5-4a7c-a0e8-f3c8ac89aecb" +type = "feature" +description = "add `Module.get_converters()`" +author = "@NiklasRosenstein" +component = "databind.core" + [[entries]] id = "6ae51d42-f0e1-4d1a-85bc-0bf5c4ec7623" type = "feature" description = "add `JsonConverter()` setting to override the converter used for JSON de-/serialization" author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/3.0.0.toml b/.changelog/3.0.0.toml similarity index 66% rename from databind.core/.changelog/3.0.0.toml rename to .changelog/3.0.0.toml index 7c9fdee5..176855e8 100644 --- a/databind.core/.changelog/3.0.0.toml +++ b/.changelog/3.0.0.toml @@ -5,45 +5,74 @@ id = "16443154-fd91-4685-a66a-0bec2b277aa4" type = "breaking change" description = "add `Direction` as a concept to `databind.core` (previously only in `databind.json`) which can be imported from `databind.core.context`" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "2658cbe1-c2d3-48e2-9dc1-94f72b4206b7" type = "feature" description = "add `Context.direction` member" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "7b9e9a77-f3be-4159-8dc8-7876feb009fd" type = "feature" description = "add `ObjectMapper.serialize()` and `ObjectMapper.deserialize()`" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "4ac0f272-c68f-40f5-9130-fc0f648008a7" type = "breaking change" description = "remove `BiObjectMapper` class" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "d19a3728-9cb3-44b0-b85e-edcde9d31865" type = "breaking change" description = "add `direction` argument to `ObjectMapper.convert()`" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "e11ca3ed-6c24-4a55-bac5-6f930c905b23" type = "feature" description = "add `Converter.serialize()` and `Converter.deserialize()`, add default implementation for `Converter.convert()` to dispatch to the respective member based on the `Context.direction`" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "76610cad-ef0c-40d0-8436-9ec3a84b076c" type = "breaking change" description = "`ObjectMapper` is now a generic with parameters `T` (the deserialized representation of the type) and `U` (the serialized representation of the type)" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "48b7f1b9-5931-4b66-b6af-d4d35ca2d621" type = "breaking change" description = "Change `ExtraKeys` setting signature from `(arg: bool | callable)` to `(allow: bool = True, recorder: callable | None = None)`" author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "1cecb7ce-6876-4d0f-8904-81258863f3a7" +type = "docs" +description = "add Examples page to docs" +author = "@NiklasRosenstein" +component = "databind.json" + +[[entries]] +id = "fa76a6be-5af0-46f6-88af-c81fb5ccb31d" +type = "breaking change" +description = "remove `get_bimapper()` and replace it with `get_object_mapper()`" +author = "@NiklasRosenstein" +component = "databind.json" + +[[entries]] +id = "837d04da-6025-4800-b822-445bfe382727" +type = "breaking change" +description = "remove `Direction` concept from this package as it is now part of `databind.core`, removed it from `JsonModule` and all `Converter` implementations" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/.changelog/4.0.0.toml b/.changelog/4.0.0.toml new file mode 100644 index 00000000..78a39714 --- /dev/null +++ b/.changelog/4.0.0.toml @@ -0,0 +1,17 @@ +release-date = "2022-11-06" + +[[entries]] +id = "f5e3ef06-52d0-480d-8685-0473bea87691" +type = "breaking change" +description = "Databind is now compatible with Python 3.6! This required a few breaking changes to the API used to extend Databind, which is why this is a major version bump. We now use `typeapi 1.x` which has a significantly different API but enables the Python 3.6 compatibilty." +author = "@NiklasRosenstein" +pr = "https://github.com/NiklasRosenstein/python-databind/issues/31" +component = "databind.core" + +[[entries]] +id = "7478f5e3-d2cc-43f0-a557-753c8420ed4b" +type = "breaking change" +description = "Databind is now compatible with Python 3.6! This required a few breaking changes to the API used to extend Databind, which is why this is a major version bump. We now use `typeapi 1.x` which has a significantly different API but enables the Python 3.6 compatibilty." +author = "@NiklasRosenstein" +pr = "https://github.com/NiklasRosenstein/python-databind/issues/31" +component = "databind.json" diff --git a/databind.core/.changelog/4.1.0.toml b/.changelog/4.1.0.toml similarity index 50% rename from databind.core/.changelog/4.1.0.toml rename to .changelog/4.1.0.toml index 1ce2d070..47d15775 100644 --- a/databind.core/.changelog/4.1.0.toml +++ b/.changelog/4.1.0.toml @@ -5,9 +5,25 @@ id = "f368b4b8-414a-4791-a01b-2012c5dc99b6" type = "tests" description = "add a unnit test to see if the conversion of nested dataclasses with forward references works as expected (breaks in Python 3.6.2)" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "9f76e90c-650f-4725-bfd2-fe566f62406c" type = "fix" description = "Set min version to 3.6.3 because of a `typing.get_type_hints()` incompatibiltiy" author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "df9af6b0-896e-41f5-846f-550de25c2db9" +type = "fix" +description = "Set min version to 3.6.3 because of a `typing.get_type_hints()` incompatibiltiy" +author = "@NiklasRosenstein" +component = "databind.json" + +[[entries]] +id = "ed7e9626-ccad-469f-acaa-b3e6225cf6d9" +type = "feature" +description = "support deserialization of tuples" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.json/.changelog/4.1.1.toml b/.changelog/4.1.1.toml similarity index 57% rename from databind.json/.changelog/4.1.1.toml rename to .changelog/4.1.1.toml index 312aef1b..ab4292b2 100644 --- a/databind.json/.changelog/4.1.1.toml +++ b/.changelog/4.1.1.toml @@ -1,7 +1,15 @@ release-date = "2022-11-11" +[[entries]] +id = "c9d1726c-f435-4b69-af21-1d8d29178111" +type = "feature" +description = "add `Module.register(first)` argument" +author = "@NiklasRosenstein" +component = "databind.core" + [[entries]] id = "3c686427-9cb7-4a22-a534-0cbf7a22257f" type = "fix" description = "Register stringify converters for specific types first in the module to take priority over other converters (fixes deserializing `nr.date.duration`)" author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/4.2.0.toml b/.changelog/4.2.0.toml similarity index 52% rename from databind.core/.changelog/4.2.0.toml rename to .changelog/4.2.0.toml index 7ac958bc..99650117 100644 --- a/databind.core/.changelog/4.2.0.toml +++ b/.changelog/4.2.0.toml @@ -5,9 +5,25 @@ id = "33063789-c83a-4d0d-967c-9093984dbc62" type = "improvement" description = "improve error message display format and add a default implementation for `Converter.__repr__()`" author = "@NiklasRosenstein" +component = "databind.core" [[entries]] id = "ea24af2b-0378-414e-8452-d8b379e8b780" type = "improvement" description = "when a `ConversionError` occurs, we continue with the remaining converters to attempt to convert it until we are all out of options" author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "f80f15cd-54ce-465e-a9b7-e88040ad380e" +type = "tests" +description = "add unit tests for deserializing `duration` from an object form" +author = "@NiklasRosenstein" +component = "databind.json" + +[[entries]] +id = "32461220-a197-4d09-aa81-d9c8c827a637" +type = "docs" +description = "update readme to list supported types" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.json/.changelog/4.2.1.toml b/.changelog/4.2.1.toml similarity index 88% rename from databind.json/.changelog/4.2.1.toml rename to .changelog/4.2.1.toml index 9b820eee..bc469bc8 100644 --- a/databind.json/.changelog/4.2.1.toml +++ b/.changelog/4.2.1.toml @@ -5,9 +5,11 @@ id = "8bfab3e3-e014-4e99-a647-5af5e47aa6c7" type = "improvement" description = "add `StringifyConverter(name)` parameter and improve `__repr__()`" author = "@NiklasRosenstein" +component = "databind.json" [[entries]] id = "e44aff02-4fe8-48d6-b26a-6e41f0ca53ea" type = "fix" description = "fix order of converters for `pathlib.Path` and `pathlib.PurePath` registered to the `JsonModule`" author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.core/.changelog/4.2.2.toml b/.changelog/4.2.2.toml similarity index 91% rename from databind.core/.changelog/4.2.2.toml rename to .changelog/4.2.2.toml index 2f27ad58..ccaec475 100644 --- a/databind.core/.changelog/4.2.2.toml +++ b/.changelog/4.2.2.toml @@ -6,3 +6,4 @@ type = "fix" description = "fix type hint for `ClassDecoratorSetting.__call__()` which would confuse Pylance" author = "@NiklasRosenstein" pr = "https://github.com/NiklasRosenstein/python-databind/issues/34" +component = "databind.core" diff --git a/databind.core/.changelog/4.2.3.toml b/.changelog/4.2.3.toml similarity index 91% rename from databind.core/.changelog/4.2.3.toml rename to .changelog/4.2.3.toml index c4c8d512..ec384347 100644 --- a/databind.core/.changelog/4.2.3.toml +++ b/.changelog/4.2.3.toml @@ -6,3 +6,4 @@ type = "fix" description = "Fixed an issue where TypeVar parametrization was lost when converting a dataclass to a schema." author = "@NiklasRosenstein" pr = "https://github.com/NiklasRosenstein/python-databind/issues/39" +component = "databind.core" diff --git a/databind.core/.changelog/4.2.4.toml b/.changelog/4.2.4.toml similarity index 93% rename from databind.core/.changelog/4.2.4.toml rename to .changelog/4.2.4.toml index ffdf200d..fac7772a 100644 --- a/databind.core/.changelog/4.2.4.toml +++ b/.changelog/4.2.4.toml @@ -6,3 +6,4 @@ type = "fix" description = "Fixed an issue where the source class of a fields type hint was not correctly propagated to the TypeHint API such that evaluating forward references that reference to a member on the same class level would fail to evaluate." author = "@NiklasRosenstein" pr = "https://github.com/NiklasRosenstein/python-databind/issues/41" +component = "databind.core" diff --git a/databind.core/.changelog/4.2.5.toml b/.changelog/4.2.5.toml similarity index 90% rename from databind.core/.changelog/4.2.5.toml rename to .changelog/4.2.5.toml index 2608b93a..013cd4cd 100644 --- a/databind.core/.changelog/4.2.5.toml +++ b/.changelog/4.2.5.toml @@ -6,6 +6,7 @@ type = "feature" description = "add `DelegateToClassmethodConverter` class" author = "@NiklasRosenstein" pr = "https://github.com/NiklasRosenstein/python-databind/issues/42" +component = "databind.core" [[entries]] id = "ce944eb9-871d-498a-9f23-5f54bf3d589e" @@ -13,6 +14,7 @@ type = "feature" description = "add `JsonConverter.using_classmethods()` method" author = "@NiklasRosenstein" pr = "https://github.com/NiklasRosenstein/python-databind/issues/42" +component = "databind.core" [[entries]] id = "4128540f-d20a-498b-ab91-d89eaea5c8b4" @@ -20,3 +22,4 @@ type = "improvement" description = "Removed restriction that would only permit keys of type `int|str|Root|None` in `Context.key`. This unlocks serializing keys in mappings of specialized types." author = "@NiklasRosenstein" pr = "https://github.com/NiklasRosenstein/python-databind/issues/42" +component = "databind.core" diff --git a/databind.core/.changelog/4.2.6.toml b/.changelog/4.2.6.toml similarity index 92% rename from databind.core/.changelog/4.2.6.toml rename to .changelog/4.2.6.toml index 443c32f6..a0e4b3fc 100644 --- a/databind.core/.changelog/4.2.6.toml +++ b/.changelog/4.2.6.toml @@ -5,3 +5,4 @@ id = "8a53d9d5-7be3-4db0-979b-0f438cd927fe" type = "fix" description = "Fixed a bug where `convert_dataclass_to_schema()` would fail to pick up members from a base class if an intermediate base class had all its explicitly defined fields overriden by its next subclass." author = "@NiklasRosenstein" +component = "databind.core" diff --git a/databind.core/.changelog/4.2.7.toml b/.changelog/4.2.7.toml similarity index 90% rename from databind.core/.changelog/4.2.7.toml rename to .changelog/4.2.7.toml index 76bb5a7f..82144462 100644 --- a/databind.core/.changelog/4.2.7.toml +++ b/.changelog/4.2.7.toml @@ -5,3 +5,4 @@ id = "8a6d54b8-0898-465a-a34c-6d5b37dab337" type = "fix" description = "Fix potential `NameError: parameter_map` in `convert_dataclass_to_schema()` (regression introduced in 4.2.6)" author = "@NiklasRosenstein" +component = "databind.core" diff --git a/databind.core/.changelog/4.2.8.toml b/.changelog/4.2.8.toml similarity index 88% rename from databind.core/.changelog/4.2.8.toml rename to .changelog/4.2.8.toml index 5032d245..c407ac60 100644 --- a/databind.core/.changelog/4.2.8.toml +++ b/.changelog/4.2.8.toml @@ -5,3 +5,4 @@ id = "fdfc7b53-785f-4ab9-a23b-2b9f1dde2a5c" type = "improvement" description = "Allow passing a `str` into the `List` argument of the `Union()` setting." author = "@NiklasRosenstein" +component = "databind.core" diff --git a/.changelog/4.3.0.toml b/.changelog/4.3.0.toml new file mode 100644 index 00000000..78aedbfb --- /dev/null +++ b/.changelog/4.3.0.toml @@ -0,0 +1,50 @@ +release-date = "2023-05-28" + +[[entries]] +id = "f6034daf-a9d7-46d5-8430-4128b89c05e9" +type = "tests" +description = "Type-check unit tests" +author = "@NiklasRosenstein" +component = "databind" + +[[entries]] +id = "34f4cbf8-4bd4-4b6d-837f-6bf4b2006803" +type = "feature" +description = "Add `DeserializeAs` setting" +author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "78606f4e-7b4c-4f88-9143-e40b12d86100" +type = "improvement" +description = "Expose public API in `databind.core` root module." +author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "8d5cd812-ba8f-4c4d-9681-b0d8866ae023" +type = "improvement" +description = "Mark some more settings as frozen or add unsafe hash functions to support passing them as metadata to `typing_extensions.Annotated` in Python 3.6" +author = "@NiklasRosenstein" +component = "databind.core" + +[[entries]] +id = "5d31c345-35ef-40f4-bf02-bfca907f0517" +type = "feature" +description = "Support new `DeserializeAs` setting" +author = "@NiklasRosenstein" +component = "databind.json" + +[[entries]] +id = "e8a41ce4-27c1-4706-a154-fb2488c342dd" +type = "improvement" +description = "Expose public API in `databind.json` root module." +author = "@NiklasRosenstein" +component = "databind.json" + +[[entries]] +id = "5bbbae6a-fb76-4657-b16d-27358ae9f22d" +type = "tests" +description = "Type-check unit tests" +author = "@NiklasRosenstein" +component = "databind.json" diff --git a/databind.json/.changelog/4.3.1.toml b/.changelog/4.3.1.toml similarity index 91% rename from databind.json/.changelog/4.3.1.toml rename to .changelog/4.3.1.toml index c43d8262..faf4dbca 100644 --- a/databind.json/.changelog/4.3.1.toml +++ b/.changelog/4.3.1.toml @@ -6,3 +6,4 @@ type = "fix" description = "Fix serde of `collections.namedtuple` (to array) and `typing.NamedTuple` (to object)" author = "@NiklasRosenstein" pr = "https://github.com/NiklasRosenstein/python-databind/pull/49" +component = "databind.json" diff --git a/databind.json/.changelog/4.3.2.toml b/.changelog/4.3.2.toml similarity index 90% rename from databind.json/.changelog/4.3.2.toml rename to .changelog/4.3.2.toml index a0774f2e..dd2c30bf 100644 --- a/databind.json/.changelog/4.3.2.toml +++ b/.changelog/4.3.2.toml @@ -6,3 +6,4 @@ type = "fix" description = "Evaluate forward references when creating schema for NamedTuples" author = "@NiklasRosenstein" pr = "https://github.com/NiklasRosenstein/python-databind/pull/50" +component = "databind.json" diff --git a/databind.json/.changelog/4.4.0.toml b/.changelog/4.4.0.toml similarity index 60% rename from databind.json/.changelog/4.4.0.toml rename to .changelog/4.4.0.toml index db853644..3efca3d8 100644 --- a/databind.json/.changelog/4.4.0.toml +++ b/.changelog/4.4.0.toml @@ -1,11 +1,36 @@ release-date = "2023-06-21" +[[entries]] +id = "b44947f0-8e70-4a29-b584-a20eeff51bba" +type = "fix" +description = "Fixed serde of types that have a parameterized generic base class. (First reported in NiklasRosenstein/pydoc-markdown#292)" +author = "rosensteinniklas@gmail.com" +pr = "https://github.com/NiklasRosenstein/python-databind/pull/51" +component = "databind.core" + +[[entries]] +id = "43fe920b-b6b9-4701-9403-bff9aba2e744" +type = "improvement" +description = "Work around highly nested error tracebacks in `Module.convert()` by expanding all converters returned by `Module.get_converter()`. Note that this means `Module.convert()` is no longer called if the module is a child of another module." +author = "@NiklasRosenstein" +pr = "https://github.com/NiklasRosenstein/python-databind/pull/52" +component = "databind.core" + +[[entries]] +id = "e2e3fbdf-b19c-443d-bc79-8560dba4b1b5" +type = "improvement" +description = "Add `DelegateToClassmethodConverter(serialized_type)` parameter." +author = "@NiklasRosenstein" +pr = "https://github.com/NiklasRosenstein/python-databind/pull/52" +component = "databind.core" + [[entries]] id = "6ac5f7d0-aeb8-436c-bc2c-a178e2a82a74" type = "tests" description = "Add a unit tests to demonstrate that deserializing a nested type cannot work." author = "@NiklasRosenstein" pr = "https://github.com/NiklasRosenstein/python-databind/pull/51" +component = "databind.json" [[entries]] id = "89204ef2-6173-4d4e-b857-3af59db2de32" @@ -13,6 +38,7 @@ type = "fix" description = "Technically a breaking change, but any consumer who is relying on this behaviour probably does that implicitly and wants to change their code anyway. o_o -- The `CollectionConverter` no longer implicitly assumes `Any` as the item type if collection is not parameterized." author = "@NiklasRosenstein" pr = "https://github.com/NiklasRosenstein/python-databind/pull/52" +component = "databind.json" [[entries]] id = "0b05e104-7012-4a03-a995-12ed05878f0b" @@ -20,6 +46,7 @@ type = "improvement" description = "The `CollectionConverter` now properly infers the item type from the types base classes" author = "@NiklasRosenstein" pr = "https://github.com/NiklasRosenstein/python-databind/pull/52" +component = "databind.json" [[entries]] id = "ae147797-2857-4e6e-b7af-d2c6c1152e59" @@ -27,6 +54,7 @@ type = "improvement" description = "The `MappingConverter` now does improved resolution of the key and value type just like the `CollectionConverter`; note that an unparameterized Mapping no longer has its key and value type fall back to `typing.Any`" author = "@NiklasRosenstein" pr = "https://github.com/NiklasRosenstein/python-databind/pull/52" +component = "databind.json" [[entries]] id = "08e63490-84b9-418d-8f26-39c770f17d59" @@ -34,6 +62,7 @@ type = "improvement" description = "Use `ConversionError.expected()` factory function in `PlainDatatypeConverter`" author = "@NiklasRosenstein" pr = "https://github.com/NiklasRosenstein/python-databind/pull/52" +component = "databind.json" [[entries]] id = "78c6beda-22dd-419e-848f-5835ab554efd" @@ -41,3 +70,4 @@ type = "tests" description = "Test `JsonConverter`" author = "@NiklasRosenstein" pr = "https://github.com/NiklasRosenstein/python-databind/pull/52" +component = "databind.json" diff --git a/databind.core/.changelog/4.4.1.toml b/.changelog/4.4.1.toml similarity index 89% rename from databind.core/.changelog/4.4.1.toml rename to .changelog/4.4.1.toml index f879e4b1..bd82e192 100644 --- a/databind.core/.changelog/4.4.1.toml +++ b/.changelog/4.4.1.toml @@ -5,3 +5,4 @@ id = "0484f896-617e-450e-8835-6bcd6f8acc80" type = "fix" description = "Fixed a potential exception during generating the exception message when date object cannot be parsed." author = "@NiklasRosenstein" +component = "databind.core" diff --git a/databind.core/.changelog/4.4.2.toml b/.changelog/4.4.2.toml similarity index 91% rename from databind.core/.changelog/4.4.2.toml rename to .changelog/4.4.2.toml index bb18e865..69b41d91 100644 --- a/databind.core/.changelog/4.4.2.toml +++ b/.changelog/4.4.2.toml @@ -6,3 +6,4 @@ type = "improvement" description = "Support Python 3.12 by using `importlib.metadata` instead of `pkg_resources` in Python 3.10 and newer" author = "@NiklasRosenstein" pr = "https://github.com/NiklasRosenstein/python-databind/pull/55" +component = "databind.core" diff --git a/databind.core/.changelog/_unreleased.toml b/.changelog/_unreleased.toml similarity index 58% rename from databind.core/.changelog/_unreleased.toml rename to .changelog/_unreleased.toml index cdd0b3f6..616bb298 100644 --- a/databind.core/.changelog/_unreleased.toml +++ b/.changelog/_unreleased.toml @@ -7,3 +7,10 @@ pr = "https://github.com/NiklasRosenstein/python-databind/pull/60" issues = [ "https://github.com/NiklasRosenstein/python-databind/issues/59", ] + +[[entries]] +id = "086986b6-c4bf-4f09-a1f3-7cc41a40e17e" +type = "breaking change" +description = "Drop support for Python 3.6 and 3.7" +author = "@NiklasRosenstein" +pr = "https://github.com/NiklasRosenstein/python-databind/pull/61" diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml index da200866..f3833c4c 100644 --- a/.github/workflows/changelog.yaml +++ b/.github/workflows/changelog.yaml @@ -9,14 +9,14 @@ on: pull_request_target: { branches: [ "develop" ] } jobs: - changelog-update: - name: "Insert Pull Request URL into new changelog entries" - runs-on: ubuntu-latest - if: github.event_name == 'pull_request_target' - steps: - - uses: actions/checkout@v2 - - uses: NiklasRosenstein/slap@gha/changelog/update/v2 - with: { pr-id: '${{ github.event.pull_request.number }}' } + # changelog-update: + # name: "Insert Pull Request URL into new changelog entries" + # runs-on: ubuntu-latest + # if: github.event_name == 'pull_request_target' + # steps: + # - uses: actions/checkout@v2 + # - uses: NiklasRosenstein/slap@gha/changelog/update/v2 + # with: { pr-id: '${{ github.event.pull_request.number }}' } assert-new-changelog-entries: name: "At least one new changelog entry must be added" diff --git a/databind.core/.changelog/0.10.0.toml b/databind.core/.changelog/0.10.0.toml deleted file mode 100644 index 20cdac98..00000000 --- a/databind.core/.changelog/0.10.0.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2021-03-05" - -[[entries]] -id = "941943f9-5cf7-48fb-beea-2c341bc01907" -type = "improvement" -description = "classes decorated with `@uniontype(container=True)` must now be constructed using a single keyword argument as in `MyUnion(member1=Member1Value())`\n" -author = "@NiklasRosenstein" diff --git a/databind.core/.changelog/0.2.0.toml b/databind.core/.changelog/0.2.0.toml deleted file mode 100644 index 248aecd9..00000000 --- a/databind.core/.changelog/0.2.0.toml +++ /dev/null @@ -1,13 +0,0 @@ -release-date = "2020-08-29" - -[[entries]] -id = "d54aa0ac-9329-4d2a-8e3a-16063491f764" -type = "improvement" -description = "update type hints to pass mypy checks" -author = "@NiklasRosenstein" - -[[entries]] -id = "47206f43-6699-40ea-8210-c1a341d2b623" -type = "improvement" -description = "`FieldMetadata` now keeps a reference to the `dataclasses.Field` object and it's' metadata" -author = "@NiklasRosenstein" diff --git a/databind.core/.changelog/0.4.1.toml b/databind.core/.changelog/0.4.1.toml deleted file mode 100644 index dee82885..00000000 --- a/databind.core/.changelog/0.4.1.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2020-09-08" - -[[entries]] -id = "8bc4f7c3-1a29-41f1-9f5d-f3f8a99897ca" -type = "fix" -description = "Re-render setup file, materializing missing dependency on `dataclasses`. This fixes using the module in Python 3.6." -author = "@NiklasRosenstein" diff --git a/databind.core/.changelog/0.5.0.toml b/databind.core/.changelog/0.5.0.toml deleted file mode 100644 index 2590f8e7..00000000 --- a/databind.core/.changelog/0.5.0.toml +++ /dev/null @@ -1 +0,0 @@ -release-date = "2020-09-10" diff --git a/databind.core/.changelog/1.1.2.toml b/databind.core/.changelog/1.1.2.toml deleted file mode 100644 index 092832b2..00000000 --- a/databind.core/.changelog/1.1.2.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2021-08-06" - -[[entries]] -id = "bf344197-c36c-41ff-9084-fcf035d58f37" -type = "fix" -description = "fix `@A.union` types to accept `ObjectType`s" -author = "@NiklasRosenstein" diff --git a/databind.core/.changelog/1.1.5.toml b/databind.core/.changelog/1.1.5.toml deleted file mode 100644 index 83ff5fa8..00000000 --- a/databind.core/.changelog/1.1.5.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2021-08-16" - -[[entries]] -id = "efbf0a33-5eae-4868-84e0-00d252c7a08d" -type = "fix" -description = "normal type with `Annotated[MyType, union(...)]` is now correctly interpreted as `UnionType`" -author = "@NiklasRosenstein" diff --git a/databind.core/.changelog/1.2.0.toml b/databind.core/.changelog/1.2.0.toml deleted file mode 100644 index f2176321..00000000 --- a/databind.core/.changelog/1.2.0.toml +++ /dev/null @@ -1,19 +0,0 @@ -release-date = "2021-08-20" - -[[entries]] -id = "2bfa9bb8-736b-4f42-ae79-662ac60d6c95" -type = "feature" -description = "add `Direction.is_serialize()` and `Direction.is_deserialize()`" -author = "@NiklasRosenstein" - -[[entries]] -id = "9ca8468e-f716-4033-a07d-7c06d3d3e549" -type = "feature" -description = "add `AnnotationsRegistry.add_type_annotation()` and `AnnotationsRegistry.add_field_annotation()`" -author = "@NiklasRosenstein" - -[[entries]] -id = "e8fa6c70-9732-40a3-a7d8-54d772e21ba9" -type = "feature" -description = "`DefaultAnnotationsProvider` now supports finding annotations in `Enum` members when annotated with `te.Annotated`, `DefaultAnnotationsProvider` is now registered to an `ObjectMapper` by default" -author = "@NiklasRosenstein" diff --git a/databind.core/.changelog/1.4.0.toml b/databind.core/.changelog/1.4.0.toml deleted file mode 100644 index dc4b1143..00000000 --- a/databind.core/.changelog/1.4.0.toml +++ /dev/null @@ -1,10 +0,0 @@ -release-date = "2022-01-22" - -[[entries]] -id = "b5ebc00a-ea8d-425b-931e-773840e22073" -type = "feature" -description = "add `union.Style.keyed`" -author = "@NiklasRosenstein" -issues = [ - "https://github.com/NiklasRosenstein/databind/issues/21", -] diff --git a/databind.core/.changelog/1.5.1.toml b/databind.core/.changelog/1.5.1.toml deleted file mode 100644 index ed0b9ac3..00000000 --- a/databind.core/.changelog/1.5.1.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2022-02-26" - -[[entries]] -id = "968be339-8a28-4cce-bdc6-61eb838fb803" -type = "refactor" -description = "migrate to `nr.util` package" -author = "@NiklasRosenstein" diff --git a/databind.core/.changelog/2.0.1.toml b/databind.core/.changelog/2.0.1.toml deleted file mode 100644 index c4f3295a..00000000 --- a/databind.core/.changelog/2.0.1.toml +++ /dev/null @@ -1,13 +0,0 @@ -release-date = "2022-05-09" - -[[entries]] -id = "77ea4dca-ae09-4454-9c01-2687ff3d57ad" -type = "improvement" -description = "Loosen requirement on `typing-extensions` from `^3.10.0` to `>=3.10.0`" -author = "@NiklasRosenstein" - -[[entries]] -id = "adf0e51f-ba27-4421-a5a4-f771b5e5221e" -type = "refactor" -description = "Use Black and isort for code formatting, Flake8 for linting" -author = "@NiklasRosenstein" diff --git a/databind.core/.changelog/2.0.3.toml b/databind.core/.changelog/2.0.3.toml deleted file mode 100644 index 630af279..00000000 --- a/databind.core/.changelog/2.0.3.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2022-05-11" - -[[entries]] -id = "ad7df855-fe04-4acc-b925-83010fe02662" -type = "fix" -description = "Fix resolving nested forward references in dataclasses." -author = "@NiklasRosenstein" diff --git a/databind.core/.changelog/2.0.7.toml b/databind.core/.changelog/2.0.7.toml deleted file mode 100644 index a15b03c8..00000000 --- a/databind.core/.changelog/2.0.7.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2022-06-20" - -[[entries]] -id = "56621ccd-8ec3-409a-84f6-9ec4ce1a052f" -type = "improvement" -description = "Enable Mypy strict type checking mode" -author = "@NiklasRosenstein" diff --git a/databind.core/.changelog/2.0.9.toml b/databind.core/.changelog/2.0.9.toml deleted file mode 100644 index c59b5282..00000000 --- a/databind.core/.changelog/2.0.9.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2022-11-03" - -[[entries]] -id = "c8cb2dd0-edb5-4a7c-a0e8-f3c8ac89aecb" -type = "feature" -description = "add `Module.get_converters()`" -author = "@NiklasRosenstein" diff --git a/databind.core/.changelog/4.0.0.toml b/databind.core/.changelog/4.0.0.toml deleted file mode 100644 index ceb65217..00000000 --- a/databind.core/.changelog/4.0.0.toml +++ /dev/null @@ -1,8 +0,0 @@ -release-date = "2022-11-06" - -[[entries]] -id = "f5e3ef06-52d0-480d-8685-0473bea87691" -type = "breaking change" -description = "Databind is now compatible with Python 3.6! This required a few breaking changes to the API used to extend Databind, which is why this is a major version bump. We now use `typeapi 1.x` which has a significantly different API but enables the Python 3.6 compatibilty." -author = "@NiklasRosenstein" -pr = "https://github.com/NiklasRosenstein/python-databind/issues/31" diff --git a/databind.core/.changelog/4.1.1.toml b/databind.core/.changelog/4.1.1.toml deleted file mode 100644 index 1b5e9f65..00000000 --- a/databind.core/.changelog/4.1.1.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2022-11-11" - -[[entries]] -id = "c9d1726c-f435-4b69-af21-1d8d29178111" -type = "feature" -description = "add `Module.register(first)` argument" -author = "@NiklasRosenstein" diff --git a/databind.core/.changelog/4.3.0.toml b/databind.core/.changelog/4.3.0.toml deleted file mode 100644 index 093ff836..00000000 --- a/databind.core/.changelog/4.3.0.toml +++ /dev/null @@ -1,19 +0,0 @@ -release-date = "2023-05-28" - -[[entries]] -id = "34f4cbf8-4bd4-4b6d-837f-6bf4b2006803" -type = "feature" -description = "Add `DeserializeAs` setting" -author = "@NiklasRosenstein" - -[[entries]] -id = "78606f4e-7b4c-4f88-9143-e40b12d86100" -type = "improvement" -description = "Expose public API in `databind.core` root module." -author = "@NiklasRosenstein" - -[[entries]] -id = "8d5cd812-ba8f-4c4d-9681-b0d8866ae023" -type = "improvement" -description = "Mark some more settings as frozen or add unsafe hash functions to support passing them as metadata to `typing_extensions.Annotated` in Python 3.6" -author = "@NiklasRosenstein" diff --git a/databind.core/.changelog/4.4.0.toml b/databind.core/.changelog/4.4.0.toml deleted file mode 100644 index d408838b..00000000 --- a/databind.core/.changelog/4.4.0.toml +++ /dev/null @@ -1,22 +0,0 @@ -release-date = "2023-06-21" - -[[entries]] -id = "b44947f0-8e70-4a29-b584-a20eeff51bba" -type = "fix" -description = "Fixed serde of types that have a parameterized generic base class. (First reported in NiklasRosenstein/pydoc-markdown#292)" -author = "rosensteinniklas@gmail.com" -pr = "https://github.com/NiklasRosenstein/python-databind/pull/51" - -[[entries]] -id = "43fe920b-b6b9-4701-9403-bff9aba2e744" -type = "improvement" -description = "Work around highly nested error tracebacks in `Module.convert()` by expanding all converters returned by `Module.get_converter()`. Note that this means `Module.convert()` is no longer called if the module is a child of another module." -author = "@NiklasRosenstein" -pr = "https://github.com/NiklasRosenstein/python-databind/pull/52" - -[[entries]] -id = "e2e3fbdf-b19c-443d-bc79-8560dba4b1b5" -type = "improvement" -description = "Add `DelegateToClassmethodConverter(serialized_type)` parameter." -author = "@NiklasRosenstein" -pr = "https://github.com/NiklasRosenstein/python-databind/pull/52" diff --git a/databind.core/README.md b/databind.core/README.md index 196edb11..e69de29b 100644 --- a/databind.core/README.md +++ b/databind.core/README.md @@ -1,9 +0,0 @@ -# `databind.core` - -This library provides the core functionality to implement serialization functions to and from Python objects, with -a great support for many features of the Python type system. A JSON implementation is provided by the `databind.json` -package. - ---- - -

Copyright © 2020 – Niklas Rosenstein

diff --git a/databind.core/pyproject.toml b/databind.core/pyproject.toml index 26733a2e..3a4c8e64 100644 --- a/databind.core/pyproject.toml +++ b/databind.core/pyproject.toml @@ -1,37 +1,19 @@ [tool.poetry] name = "databind.core" version = "4.4.2" -description = "Databind is a library inspired by jackson-databind to de-/serialize Python dataclasses. Compatible with Python 3.8 and newer." +description = "Databind is a library inspired by jackson-databind to de-/serialize Python dataclasses. Compatible with Python 3.8 and newer. Deprecated, use `databind` package." authors = ["Niklas Rosenstein "] license = "MIT" readme = "README.md" -packages = [{include = "databind/core", from = "src"}] [tool.poetry.urls] "Bug Tracker" = "https://github.com/NiklasRosenstein/python-databind/issues" Documentation = "https://niklasrosenstein.github.io/python-databind/" -# Homepage = "" Repository = "https://github.com/NiklasRosenstein/python-databind" [tool.poetry.dependencies] python = "^3.8.0" -Deprecated = "^1.2.12" -nr-date = "^2.0.0" -nr-stream = "^1.0.0" -setuptools = { version = ">=40.8.0", markers = "python_version < '3.10'" } -typeapi = ">=2.0.1,<3" -typing-extensions = ">=3.10.0,<5" - -[tool.poetry.dev-dependencies] -black = ">=23.0.0,<24.0.0" -flake8 = ">=5.0.4,<8.0.0" -isort = ">=5.13.2,<6.0.0" -pytest = ">=8.1.1,<9.0.0" -mypy = ">=1.9.0,<2.0.0" -types-dataclasses = "*" -types-deprecated = "*" -types-setuptools = "*" -types-termcolor = "*" +databind = "^4.4.2" [tool.slap] typed = true @@ -39,36 +21,3 @@ typed = true [build-system] requires = ["poetry-core==1.9.0"] build-backend = "poetry.core.masonry.api" - -[tool.slap.test] -check = "slap check" -mypy = "dmypy run src/" -pytest = "pytest src/ -vv" -black = "black --check src/" -isort = "isort --check-only src/" -flake8 = "flake8 src/" - -[tool.slap.run] -fmt = "black src/ && isort src/" - -[tool.mypy] -python_version = "3.8" -explicit_package_bases = true -mypy_path = ["src"] -namespace_packages = true -pretty = true -show_error_codes = true -show_error_context = true -strict = true -warn_no_return = true -warn_redundant_casts = true -warn_unreachable = true -warn_unused_ignores = true - -[tool.isort] -profile = "black" -line_length = 120 -combine_as_imports = true - -[tool.black] -line-length = 120 diff --git a/databind.core/src/_databind_core_proxy.py b/databind.core/src/_databind_core_proxy.py new file mode 100644 index 00000000..ac557672 --- /dev/null +++ b/databind.core/src/_databind_core_proxy.py @@ -0,0 +1 @@ +# Need at least one Python file to publish a package. diff --git a/databind.json/.changelog/0.10.0.toml b/databind.json/.changelog/0.10.0.toml deleted file mode 100644 index 37a4f144..00000000 --- a/databind.json/.changelog/0.10.0.toml +++ /dev/null @@ -1,13 +0,0 @@ -release-date = "2020-12-30" - -[[entries]] -id = "0cb46581-98b5-40ad-82f1-eba64a2d498a" -type = "fix" -description = "add missing `to_stream` and `from_stream` to `__all__`" -author = "@NiklasRosenstein" - -[[entries]] -id = "b65cd60e-3b8f-42c0-b4d8-37e5257bc269" -type = "feature" -description = "add `cast()` function" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/0.11.0.toml b/databind.json/.changelog/0.11.0.toml deleted file mode 100644 index 9ecba9ba..00000000 --- a/databind.json/.changelog/0.11.0.toml +++ /dev/null @@ -1,13 +0,0 @@ -release-date = "2021-03-05" - -[[entries]] -id = "65f5c1ef-ae7f-4802-af8c-c5e5460f602d" -type = "improvement" -description = "Update union construction during deserialization" -author = "@NiklasRosenstein" - -[[entries]] -id = "779fedda-841f-4e00-bed0-e3ccab1ad836" -type = "improvement" -description = "minimum version of `databind.core` is `^0.10.0`" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/0.3.0.toml b/databind.json/.changelog/0.3.0.toml deleted file mode 100644 index 54654057..00000000 --- a/databind.json/.changelog/0.3.0.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2020-08-29" - -[[entries]] -id = "71c62ec7-7d37-4461-96a3-217de03499de" -type = "improvement" -description = "`ArrayConverter` now supports subclasses of the `typing.List` generic" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/0.4.0.toml b/databind.json/.changelog/0.4.0.toml deleted file mode 100644 index b217e796..00000000 --- a/databind.json/.changelog/0.4.0.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2020-09-06" - -[[entries]] -id = "03524ec0-3644-4bd8-9a64-a1dc0e754fd7" -type = "feature" -description = "support `@datamodel(serialize_as)` in `ModelConverter`" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/0.4.1.toml b/databind.json/.changelog/0.4.1.toml deleted file mode 100644 index c03992d6..00000000 --- a/databind.json/.changelog/0.4.1.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2020-09-06" - -[[entries]] -id = "7abbb43c-0eab-4009-9353-9de48aebc5b7" -type = "fix" -description = "conversion of values of a `List` subtype *from Python* are now converted to a built-in `list` instead of the same `List` subtype" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/0.6.0.toml b/databind.json/.changelog/0.6.0.toml deleted file mode 100644 index 72ba78fa..00000000 --- a/databind.json/.changelog/0.6.0.toml +++ /dev/null @@ -1,13 +0,0 @@ -release-date = "2020-09-10" - -[[entries]] -id = "cc7ad2d7-1ba6-428a-8f49-b7407ccdc505" -type = "feature" -description = "Add `to_stream()` and `from_stream()` functions" -author = "@NiklasRosenstein" - -[[entries]] -id = "bc0a165d-7868-415c-9b52-8f9ad9040cb9" -type = "feature" -description = "Add support for `typing.Dict` subclasses" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/0.7.0.toml b/databind.json/.changelog/0.7.0.toml deleted file mode 100644 index 944c563d..00000000 --- a/databind.json/.changelog/0.7.0.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2020-10-02" - -[[entries]] -id = "b6a90864-ebc9-43fd-a909-4a88139eb2b7" -type = "feature" -description = "Now supports converting Sets" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/0.7.1.toml b/databind.json/.changelog/0.7.1.toml deleted file mode 100644 index c744f065..00000000 --- a/databind.json/.changelog/0.7.1.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2020-11-20" - -[[entries]] -id = "28477028-ec46-493a-9b8c-acf024cf953c" -type = "fix" -description = "Fix mypy errors" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/0.8.0.toml b/databind.json/.changelog/0.8.0.toml deleted file mode 100644 index 476c544b..00000000 --- a/databind.json/.changelog/0.8.0.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2020-11-24" - -[[entries]] -id = "a27c60f9-6cce-4abf-8043-d081c0de33c2" -type = "feature" -description = "add converter for `typing.Any`, which by the way does not actually convert anything" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/0.9.0.toml b/databind.json/.changelog/0.9.0.toml deleted file mode 100644 index 901fb478..00000000 --- a/databind.json/.changelog/0.9.0.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2020-11-24" - -[[entries]] -id = "4436d541-f7a8-4c1b-9292-0bc1d6624a15" -type = "feature" -description = "handle `FieldMetadata.relaxed` and `FieldMetadata.strict` in Bool, Integer and String converters" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/1.1.2.toml b/databind.json/.changelog/1.1.2.toml deleted file mode 100644 index 071b7bb3..00000000 --- a/databind.json/.changelog/1.1.2.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2021-08-06" - -[[entries]] -id = "9f730924-d0bc-4c55-8563-66719ff6188d" -type = "feature" -description = "support de-/serializing `bytes` as base64" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/1.2.0.toml b/databind.json/.changelog/1.2.0.toml deleted file mode 100644 index cd957228..00000000 --- a/databind.json/.changelog/1.2.0.toml +++ /dev/null @@ -1,28 +0,0 @@ -release-date = "2021-08-20" - -[[entries]] -id = "c09f08bb-ce01-49f8-b3bc-94fb8d27a2e5" -type = "feature" -description = "add converter for `pathlib.PurePath` subclasses, enabled in the `JsonModule` by default" -author = "@NiklasRosenstein" -issues = [ - "https://github.com/NiklasRosenstein/databind/issues/14", -] - -[[entries]] -id = "6b4a28ad-478a-4ae8-bfb8-58e3730bfee5" -type = "feature" -description = "add converter for `uuid.UUID` to `JsonModule`" -author = "@NiklasRosenstein" -issues = [ - "https://github.com/NiklasRosenstein/databind/issues/15", -] - -[[entries]] -id = "c067911a-cee5-416a-b05d-19801bccbb27" -type = "feature" -description = "support aliases on enum values" -author = "@NiklasRosenstein" -issues = [ - "https://github.com/NiklasRosenstein/databind/issues/1", -] diff --git a/databind.json/.changelog/1.3.1.toml b/databind.json/.changelog/1.3.1.toml deleted file mode 100644 index 99977ef6..00000000 --- a/databind.json/.changelog/1.3.1.toml +++ /dev/null @@ -1,16 +0,0 @@ -release-date = "2022-01-08" - -[[entries]] -id = "d192ebd0-f643-4823-bbbe-ec20b878d8b2" -type = "feature" -description = "add `databind.json.annotations.with_custom_json_converter()` annotation to allow implementing a custom converter for dataclasses" -author = "@NiklasRosenstein" - -[[entries]] -id = "f5a426e0-21c1-415f-b7b3-c975d357f5a4" -type = "fix" -description = "narrow `JsonType` union type to use `dict` and `list` instead of `t.Mapping` and `t.Collection`" -author = "@NiklasRosenstein" -issues = [ - "https://github.com/NiklasRosenstein/databind/issues/22", -] diff --git a/databind.json/.changelog/1.4.0.toml b/databind.json/.changelog/1.4.0.toml deleted file mode 100644 index 4099f2c1..00000000 --- a/databind.json/.changelog/1.4.0.toml +++ /dev/null @@ -1,10 +0,0 @@ -release-date = "2022-01-22" - -[[entries]] -id = "af09d38c-66ee-4399-a9a7-404a1911add5" -type = "feature" -description = "support `union.Style.keyed`" -author = "@NiklasRosenstein" -issues = [ - "https://github.com/NiklasRosenstein/databind/issues/21", -] diff --git a/databind.json/.changelog/1.5.1.toml b/databind.json/.changelog/1.5.1.toml deleted file mode 100644 index a30ac82a..00000000 --- a/databind.json/.changelog/1.5.1.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2022-02-26" - -[[entries]] -id = "2b6514ea-b84b-4c94-8b65-71f78ea8114e" -type = "refactor" -description = "migrate to `nr.util` package" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/2.0.0-alpha.4.toml b/databind.json/.changelog/2.0.0-alpha.4.toml deleted file mode 100644 index 2ca74769..00000000 --- a/databind.json/.changelog/2.0.0-alpha.4.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2022-03-29" - -[[entries]] -id = "9f5996fe-a2bf-4fb5-b8bf-42c526673d93" -type = "breaking change" -description = "implement `Union.BEST_MATCH` in `UnionConverter`, which is now used as the default if an un-annotated `typing.Union` is encountered" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/2.0.0a2.toml b/databind.json/.changelog/2.0.0a2.toml deleted file mode 100644 index 9ae7e5a7..00000000 --- a/databind.json/.changelog/2.0.0a2.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2022-03-24" - -[[entries]] -id = "85403125-18ad-4988-8514-019a38a7128d" -type = "improvement" -description = "move `ExtraKeys` and `Remainder` setting from `databind.json` to `databind.core`" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/2.0.1.toml b/databind.json/.changelog/2.0.1.toml deleted file mode 100644 index 0fa9afb9..00000000 --- a/databind.json/.changelog/2.0.1.toml +++ /dev/null @@ -1,13 +0,0 @@ -release-date = "2022-05-09" - -[[entries]] -id = "e13ad790-4e0a-44fb-afec-3ecc7c6b9ad8" -type = "improvement" -description = "Loosen requirement on `typing-extensions` from `^3.10.0` to `>=3.10.0`" -author = "@NiklasRosenstein" - -[[entries]] -id = "b537c6b7-fa06-41b4-a452-8edb5b0f6fe4" -type = "refactor" -description = "Use Black and isort for code formatting, Flake8 for linting" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/2.0.2.toml b/databind.json/.changelog/2.0.2.toml deleted file mode 100644 index 57008a2e..00000000 --- a/databind.json/.changelog/2.0.2.toml +++ /dev/null @@ -1,13 +0,0 @@ -release-date = "2022-05-11" - -[[entries]] -id = "2b9885cd-5196-45dd-8b3e-3b8d10d8f708" -type = "docs" -description = "Add URLs to project metadata." -author = "@NiklasRosenstein" - -[[entries]] -id = "a37639a0-d0bd-40e1-8b8b-06dbd6b96d9e" -type = "improvement" -description = "Use a fields default value if it is available when deserializing schemas" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/2.0.7.toml b/databind.json/.changelog/2.0.7.toml deleted file mode 100644 index 5a3d5022..00000000 --- a/databind.json/.changelog/2.0.7.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2022-06-20" - -[[entries]] -id = "df546027-bed8-46e1-8e9d-caa6447142bf" -type = "improvement" -description = "Enable Mypy strict type checking mode" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/3.0.0.toml b/databind.json/.changelog/3.0.0.toml deleted file mode 100644 index b4b9bbf9..00000000 --- a/databind.json/.changelog/3.0.0.toml +++ /dev/null @@ -1,19 +0,0 @@ -release-date = "2022-11-05" - -[[entries]] -id = "1cecb7ce-6876-4d0f-8904-81258863f3a7" -type = "docs" -description = "add Examples page to docs" -author = "@NiklasRosenstein" - -[[entries]] -id = "fa76a6be-5af0-46f6-88af-c81fb5ccb31d" -type = "breaking change" -description = "remove `get_bimapper()` and replace it with `get_object_mapper()`" -author = "@NiklasRosenstein" - -[[entries]] -id = "837d04da-6025-4800-b822-445bfe382727" -type = "breaking change" -description = "remove `Direction` concept from this package as it is now part of `databind.core`, removed it from `JsonModule` and all `Converter` implementations" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/4.0.0.toml b/databind.json/.changelog/4.0.0.toml deleted file mode 100644 index 6565bff7..00000000 --- a/databind.json/.changelog/4.0.0.toml +++ /dev/null @@ -1,8 +0,0 @@ -release-date = "2022-11-06" - -[[entries]] -id = "7478f5e3-d2cc-43f0-a557-753c8420ed4b" -type = "breaking change" -description = "Databind is now compatible with Python 3.6! This required a few breaking changes to the API used to extend Databind, which is why this is a major version bump. We now use `typeapi 1.x` which has a significantly different API but enables the Python 3.6 compatibilty." -author = "@NiklasRosenstein" -pr = "https://github.com/NiklasRosenstein/python-databind/issues/31" diff --git a/databind.json/.changelog/4.1.0.toml b/databind.json/.changelog/4.1.0.toml deleted file mode 100644 index 3eb3dc8a..00000000 --- a/databind.json/.changelog/4.1.0.toml +++ /dev/null @@ -1,13 +0,0 @@ -release-date = "2022-11-10" - -[[entries]] -id = "df9af6b0-896e-41f5-846f-550de25c2db9" -type = "fix" -description = "Set min version to 3.6.3 because of a `typing.get_type_hints()` incompatibiltiy" -author = "@NiklasRosenstein" - -[[entries]] -id = "ed7e9626-ccad-469f-acaa-b3e6225cf6d9" -type = "feature" -description = "support deserialization of tuples" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/4.2.0.toml b/databind.json/.changelog/4.2.0.toml deleted file mode 100644 index 8bf9c8e4..00000000 --- a/databind.json/.changelog/4.2.0.toml +++ /dev/null @@ -1,13 +0,0 @@ -release-date = "2022-11-21" - -[[entries]] -id = "f80f15cd-54ce-465e-a9b7-e88040ad380e" -type = "tests" -description = "add unit tests for deserializing `duration` from an object form" -author = "@NiklasRosenstein" - -[[entries]] -id = "32461220-a197-4d09-aa81-d9c8c827a637" -type = "docs" -description = "update readme to list supported types" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/4.3.0.toml b/databind.json/.changelog/4.3.0.toml deleted file mode 100644 index 4cc9a45c..00000000 --- a/databind.json/.changelog/4.3.0.toml +++ /dev/null @@ -1,19 +0,0 @@ -release-date = "2023-05-28" - -[[entries]] -id = "5d31c345-35ef-40f4-bf02-bfca907f0517" -type = "feature" -description = "Support new `DeserializeAs` setting" -author = "@NiklasRosenstein" - -[[entries]] -id = "e8a41ce4-27c1-4706-a154-fb2488c342dd" -type = "improvement" -description = "Expose public API in `databind.json` root module." -author = "@NiklasRosenstein" - -[[entries]] -id = "5bbbae6a-fb76-4657-b16d-27358ae9f22d" -type = "tests" -description = "Type-check unit tests" -author = "@NiklasRosenstein" diff --git a/databind.json/.changelog/_unreleased.toml b/databind.json/.changelog/_unreleased.toml deleted file mode 100644 index 933da1db..00000000 --- a/databind.json/.changelog/_unreleased.toml +++ /dev/null @@ -1,9 +0,0 @@ -[[entries]] -id = "6aab96f1-c6c0-4afe-bd73-0071d5dedebb" -type = "breaking change" -description = "Support typing-extensions>4.7 for Python 3.8 or greater" -author = "@rhaps0dy" -pr = "https://github.com/NiklasRosenstein/python-databind/pull/60" -issues = [ - "https://github.com/NiklasRosenstein/python-databind/issues/59", -] diff --git a/databind.json/pyproject.toml b/databind.json/pyproject.toml index 77ed1e37..285ca4ad 100644 --- a/databind.json/pyproject.toml +++ b/databind.json/pyproject.toml @@ -1,31 +1,19 @@ [tool.poetry] name = "databind.json" version = "4.4.2" -description = "De-/serialize Python dataclasses to or from JSON payloads. Compatible with Python 3.8 and newer." +description = "De-/serialize Python dataclasses to or from JSON payloads. Compatible with Python 3.8 and newer. Deprecated, use `databind` module instead." authors = ["Niklas Rosenstein "] license = "MIT" readme = "README.md" -packages = [{include = "databind/json", from = "src"}] [tool.poetry.urls] "Bug Tracker" = "https://github.com/NiklasRosenstein/python-databind/issues" Documentation = "https://niklasrosenstein.github.io/python-databind/" -# Homepage = "" Repository = "https://github.com/NiklasRosenstein/python-databind" [tool.poetry.dependencies] python = "^3.8.0" -"databind.core" = "^4.4.2" -nr-date = "^2.0.0" -typeapi = ">=2.0.1,<3" -typing-extensions = ">=3.10.0,<5" - -[tool.poetry.dev-dependencies] -black = ">=23.0.0,<24.0.0" -flake8 = ">=5.0.4,<8.0.0" -isort = ">=5.13.2,<6.0.0" -pytest = ">=8.1.1,<9.0.0" -mypy = ">=1.9.0,<2.0.0" +databind = "^4.4.2" [build-system] requires = ["poetry-core==1.9.0"] @@ -33,36 +21,3 @@ build-backend = "poetry.core.masonry.api" [tool.slap] typed = true - -[tool.slap.test] -check = "slap check" -mypy = "dmypy run src/" -pytest = "pytest src/ -vv $PYTEST_FLAGS" -black = "black --check src/" -isort = "isort --check-only src/" -flake8 = "flake8 src/" - -[tool.slap.run] -fmt = "black src/ && isort src/" - -[tool.mypy] -python_version = "3.8" -explicit_package_bases = true -mypy_path = ["src"] -namespace_packages = true -pretty = true -show_error_codes = true -show_error_context = true -strict = true -warn_no_return = true -warn_redundant_casts = true -warn_unreachable = true -warn_unused_ignores = true - -[tool.isort] -profile = "black" -line_length = 120 -combine_as_imports = true - -[tool.black] -line-length = 120 diff --git a/databind.json/src/_databind_json_proxy.py b/databind.json/src/_databind_json_proxy.py new file mode 100644 index 00000000..ac557672 --- /dev/null +++ b/databind.json/src/_databind_json_proxy.py @@ -0,0 +1 @@ +# Need at least one Python file to publish a package. diff --git a/databind/.changelog/4.3.0.toml b/databind/.changelog/4.3.0.toml deleted file mode 100644 index 3d3a3fe7..00000000 --- a/databind/.changelog/4.3.0.toml +++ /dev/null @@ -1,7 +0,0 @@ -release-date = "2023-05-28" - -[[entries]] -id = "f6034daf-a9d7-46d5-8430-4128b89c05e9" -type = "tests" -description = "Type-check unit tests" -author = "@NiklasRosenstein" diff --git a/databind/.flake8 b/databind/.flake8 new file mode 100644 index 00000000..6deafc26 --- /dev/null +++ b/databind/.flake8 @@ -0,0 +1,2 @@ +[flake8] +max-line-length = 120 diff --git a/databind/README.md b/databind/README.md index 7670097d..8763bf3e 100644 --- a/databind/README.md +++ b/databind/README.md @@ -1,23 +1,19 @@ +

+

databind

- Python versions - -

-

-Databind is a Python serialization library on top of dataclasses, inspired by similar libraries from other languages -like jackson-databind and serde-rs. -

-

- CORE Guide | - JSON Examples + Python versions + + Documentation

-## Overview 📖 +The `databind` package provides a (de)serialization framework that understands most native Python types as well as +dataclasses, as well as an implementation for serialize to/from JSON-like nested data structures. + +Databind is intended mostly for flexible and easy to use configuration loading. It does __not__ try achieve high-performance; you should look towards e.g. [mashumaro](https://pypi.org/project/mashumaro/) for this usecase. -The `databind.core` package provides the core framework for databind. It is then used by `databind.json` to provide -comprehensive serializatio support between Python and JSON-like data structure. The serialization can easily be -extended to YAML or TOML by combining it with respective libraries (e.g. `pyaaml` and `tomli`). +### Example ```python @dataclass @@ -30,11 +26,13 @@ class Config: server: Server from databind.json import dump, load -assert load({"server": {"host": "localhost", "port": 8080}}, Config) == Config(server=Server(host='localhost', port=8080)) -assert dump(Config(server=Server(host='localhost', port=8080)), Config) == {"server": {"host": "localhost", "port": 8080}} -``` -If you install the `databind` proxy package, you get matching versions of `databind.core` and `databind.json`. +dict_payload = {"server": {"host": "localhost", "port": 8080}} +loaded = Config(server=Server(host="localhost", port=8080)) + +assert load(dict_payload, Config) == loaded +assert dump(loaded, Config) == dict_payload +``` ## Features ✨ @@ -54,6 +52,14 @@ If you install the `databind` proxy package, you get matching versions of `datab * As class-level settings using a decorator: `@Union(style=Union.FLAT)` or `@ExtraKeys(True)` * As type-hint level settings using `typing.Annotated` (or `typing_extensions.Annotated`): `full_name: Annotated[str, Alias("fullName")]` or `FullNameField = Annotated[str, Alias("fullName")]` +## Notable release notes + +### 4.5.0 + +* Merged `databind.core` and `databind.json` packages into `databind`. The old PyPI packages will remain as proxies + until the next minor version. +* Dropped support for Python 3.6 and 3.7. + ---

Copyright © 2022 – Niklas Rosenstein

diff --git a/databind/pyproject.toml b/databind/pyproject.toml index 981204e4..5ae70c00 100644 --- a/databind/pyproject.toml +++ b/databind/pyproject.toml @@ -5,13 +5,64 @@ description = "Databind is a library inspired by jackson-databind to de-/seriali authors = ["Niklas Rosenstein "] license = "MIT" readme = "README.md" -packages = [{ include="databind/_version", from="src" }] +packages = [{include = "databind/core", from = "src"}, {include = "databind/json", from = "src"}] [tool.poetry.dependencies] python = "^3.8.0" -"databind.core" = "^4.4.2" -"databind.json" = "^4.4.2" +Deprecated = "^1.2.12" +nr-date = "^2.0.0" +nr-stream = "^1.0.0" +setuptools = { version = ">=40.8.0", markers = "python_version < '3.10'" } +typeapi = ">=2.0.1,<3" +typing-extensions = ">=3.10.0,<5" + +[tool.poetry.dev-dependencies] +black = ">=23.0.0,<24.0.0" +flake8 = ">=5.0.4,<8.0.0" +isort = ">=5.13.2,<6.0.0" +pytest = ">=8.1.1,<9.0.0" +mypy = ">=1.9.0,<2.0.0" +types-dataclasses = "*" +types-deprecated = "*" +types-setuptools = "*" +types-termcolor = "*" [build-system] requires = ["poetry-core==1.9.0"] build-backend = "poetry.core.masonry.api" + +[tool.slap] +typed = true + +[tool.slap.test] +check = "slap check" +mypy = "dmypy run src/" +pytest = "pytest src/ -vv" +black = "black --check src/" +isort = "isort --check-only src/" +flake8 = "flake8 src/" + +[tool.slap.run] +fmt = "black src/ && isort src/" + +[tool.mypy] +python_version = "3.8" +explicit_package_bases = true +mypy_path = ["src"] +namespace_packages = true +pretty = true +show_error_codes = true +show_error_context = true +strict = true +warn_no_return = true +warn_redundant_casts = true +warn_unreachable = true +warn_unused_ignores = true + +[tool.isort] +profile = "black" +line_length = 120 +combine_as_imports = true + +[tool.black] +line-length = 120 diff --git a/databind/src/databind/_version/__init__.py b/databind/src/databind/_version/__init__.py deleted file mode 100644 index 30357c8b..00000000 --- a/databind/src/databind/_version/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = "4.4.2" diff --git a/databind.core/src/databind/core/__init__.py b/databind/src/databind/core/__init__.py similarity index 100% rename from databind.core/src/databind/core/__init__.py rename to databind/src/databind/core/__init__.py diff --git a/databind.core/src/databind/core/context.py b/databind/src/databind/core/context.py similarity index 100% rename from databind.core/src/databind/core/context.py rename to databind/src/databind/core/context.py diff --git a/databind.core/src/databind/core/converter.py b/databind/src/databind/core/converter.py similarity index 100% rename from databind.core/src/databind/core/converter.py rename to databind/src/databind/core/converter.py diff --git a/databind.core/src/databind/core/dataclasses.py b/databind/src/databind/core/dataclasses.py similarity index 100% rename from databind.core/src/databind/core/dataclasses.py rename to databind/src/databind/core/dataclasses.py diff --git a/databind.core/src/databind/core/dataclasses.pyi b/databind/src/databind/core/dataclasses.pyi similarity index 100% rename from databind.core/src/databind/core/dataclasses.pyi rename to databind/src/databind/core/dataclasses.pyi diff --git a/databind.core/src/databind/core/mapper.py b/databind/src/databind/core/mapper.py similarity index 100% rename from databind.core/src/databind/core/mapper.py rename to databind/src/databind/core/mapper.py diff --git a/databind.core/src/databind/core/py.typed b/databind/src/databind/core/py.typed similarity index 100% rename from databind.core/src/databind/core/py.typed rename to databind/src/databind/core/py.typed diff --git a/databind.core/src/databind/core/schema.py b/databind/src/databind/core/schema.py similarity index 100% rename from databind.core/src/databind/core/schema.py rename to databind/src/databind/core/schema.py diff --git a/databind.core/src/databind/core/settings.py b/databind/src/databind/core/settings.py similarity index 100% rename from databind.core/src/databind/core/settings.py rename to databind/src/databind/core/settings.py diff --git a/databind.core/src/databind/core/tests/context_test.py b/databind/src/databind/core/tests/context_test.py similarity index 100% rename from databind.core/src/databind/core/tests/context_test.py rename to databind/src/databind/core/tests/context_test.py diff --git a/databind.core/src/databind/core/tests/schema_docspec_example_test.py b/databind/src/databind/core/tests/schema_docspec_example_test.py similarity index 100% rename from databind.core/src/databind/core/tests/schema_docspec_example_test.py rename to databind/src/databind/core/tests/schema_docspec_example_test.py diff --git a/databind.core/src/databind/core/tests/schema_test.py b/databind/src/databind/core/tests/schema_test.py similarity index 100% rename from databind.core/src/databind/core/tests/schema_test.py rename to databind/src/databind/core/tests/schema_test.py diff --git a/databind.core/src/databind/core/tests/schema_with_nested_dataclasses_test.py b/databind/src/databind/core/tests/schema_with_nested_dataclasses_test.py similarity index 100% rename from databind.core/src/databind/core/tests/schema_with_nested_dataclasses_test.py rename to databind/src/databind/core/tests/schema_with_nested_dataclasses_test.py diff --git a/databind.core/src/databind/core/union.py b/databind/src/databind/core/union.py similarity index 100% rename from databind.core/src/databind/core/union.py rename to databind/src/databind/core/union.py diff --git a/databind.core/src/databind/core/utils.py b/databind/src/databind/core/utils.py similarity index 100% rename from databind.core/src/databind/core/utils.py rename to databind/src/databind/core/utils.py diff --git a/databind.json/src/databind/json/__init__.py b/databind/src/databind/json/__init__.py similarity index 99% rename from databind.json/src/databind/json/__init__.py rename to databind/src/databind/json/__init__.py index 4125d6ea..bb78914c 100644 --- a/databind.json/src/databind/json/__init__.py +++ b/databind/src/databind/json/__init__.py @@ -4,7 +4,6 @@ import typing as t from databind.core import ObjectMapper, Setting, Settings - from databind.json.module import JsonModule from databind.json.settings import JsonConverter diff --git a/databind.json/src/databind/json/converters.py b/databind/src/databind/json/converters.py similarity index 99% rename from databind.json/src/databind/json/converters.py rename to databind/src/databind/json/converters.py index 9f7f8497..e04df808 100644 --- a/databind.json/src/databind/json/converters.py +++ b/databind/src/databind/json/converters.py @@ -4,6 +4,17 @@ import enum import typing as t +from typeapi import ( + AnnotatedTypeHint, + ClassTypeHint, + LiteralTypeHint, + TupleTypeHint, + TypeHint, + UnionTypeHint, + get_annotations, + type_repr, +) + from databind.core import ( Alias, Context, @@ -24,16 +35,6 @@ get_annotation_setting, get_fields_expanded, ) -from typeapi import ( - AnnotatedTypeHint, - ClassTypeHint, - LiteralTypeHint, - TupleTypeHint, - TypeHint, - UnionTypeHint, - get_annotations, - type_repr, -) T = t.TypeVar("T") diff --git a/databind.json/src/databind/json/module.py b/databind/src/databind/json/module.py similarity index 99% rename from databind.json/src/databind/json/module.py rename to databind/src/databind/json/module.py index 3f3d0bbb..371911a2 100644 --- a/databind.json/src/databind/json/module.py +++ b/databind/src/databind/json/module.py @@ -2,7 +2,6 @@ from databind.core.context import Context from databind.core.converter import Converter, Module - from databind.json.settings import JsonConverter diff --git a/databind.json/src/databind/json/py.typed b/databind/src/databind/json/py.typed similarity index 100% rename from databind.json/src/databind/json/py.typed rename to databind/src/databind/json/py.typed diff --git a/databind.json/src/databind/json/settings.py b/databind/src/databind/json/settings.py similarity index 99% rename from databind.json/src/databind/json/settings.py rename to databind/src/databind/json/settings.py index ead14ab5..e2875b9c 100644 --- a/databind.json/src/databind/json/settings.py +++ b/databind/src/databind/json/settings.py @@ -1,6 +1,7 @@ import typing as t import typing_extensions as te + from databind.core.converter import Converter, DelegateToClassmethodConverter from databind.core.settings import ClassDecoratorSetting diff --git a/databind.json/src/databind/json/tests/converters_test.py b/databind/src/databind/json/tests/converters_test.py similarity index 100% rename from databind.json/src/databind/json/tests/converters_test.py rename to databind/src/databind/json/tests/converters_test.py index c2b809d0..0de421cd 100644 --- a/databind.json/src/databind/json/tests/converters_test.py +++ b/databind/src/databind/json/tests/converters_test.py @@ -9,6 +9,8 @@ import pytest import typing_extensions as te +from nr.date import duration + from databind.core.context import Context, Direction from databind.core.converter import ConversionError, Converter, NoMatchingConverter from databind.core.mapper import ObjectMapper @@ -22,8 +24,6 @@ Strict, Union, ) -from nr.date import duration - from databind.json.converters import ( AnyConverter, CollectionConverter, diff --git a/docs/build.novella b/docs/build.novella index d163a533..9a6951e9 100644 --- a/docs/build.novella +++ b/docs/build.novella @@ -22,20 +22,20 @@ def databind_json_modules = [ action "mkdocs-update-config" { site_name = "python-databind" - update '$.theme.features' add: [] - update '$.theme.palette' set: {'primary': 'blue', 'accent': 'amber'} + update '$.theme.features' add: ["navigation.tabs"] + update '$.theme.palette' set: {'primary': 'black', 'accent': 'blue', 'scheme': 'slate'} update_with config -> { for module in databind_core_modules: - config['nav'][1]['CORE'][-1]['API'].append('core/api/' + module + '.md') + config['nav'][1]['databind.core'][-1]['API'].append('core/api/' + module + '.md') for module in databind_json_modules: - config['nav'][2]['JSON'][-1]['API'].append('json/api/' + module + '.md') + config['nav'][2]['databind.json'][-1]['API'].append('json/api/' + module + '.md') } } action "preprocess-markdown" { use "pydoc" { - loader().search_path = [ "../databind.core/src", "../databind.json/src" ] - loader().packages = [ "databind.core", "databind.json" ] + loader().search_path = [ "../databind/src" ] + loader().packages = [ "databind" ] } } diff --git a/docs/content/changelog.md b/docs/content/changelog.md new file mode 100644 index 00000000..c51ca3c2 --- /dev/null +++ b/docs/content/changelog.md @@ -0,0 +1,3 @@ +# Changelog + +@shell cd .. && slap changelog format --markdown --all diff --git a/docs/content/core/changelog.md b/docs/content/core/changelog.md deleted file mode 100644 index 0947c3b2..00000000 --- a/docs/content/core/changelog.md +++ /dev/null @@ -1,3 +0,0 @@ -# Changelog - -@shell cd ../databind.core && slap changelog format --markdown --all diff --git a/docs/content/img/logo-transparent.png b/docs/content/img/logo-transparent.png new file mode 100644 index 00000000..e5f99f54 Binary files /dev/null and b/docs/content/img/logo-transparent.png differ diff --git a/docs/content/img/logo.webp b/docs/content/img/logo.webp new file mode 100644 index 00000000..d54a2d99 Binary files /dev/null and b/docs/content/img/logo.webp differ diff --git a/docs/content/json/changelog.md b/docs/content/json/changelog.md deleted file mode 100644 index c7e51b79..00000000 --- a/docs/content/json/changelog.md +++ /dev/null @@ -1,3 +0,0 @@ -# Changelog - -@shell cd ../databind.json && slap changelog format --markdown --all diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 0fd39b6d..a1225bc5 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -1,18 +1,21 @@ +repo_url: https://github.com/NiklasRosenstein/python-databind +repo_name: NiklasRosenstein/python-databind + nav: - - Home: index.md - - CORE: + - Home: + - index.md + - changelog.md + - databind.core: - core/index.md - core/basic-usage.md - core/settings.md - core/dataclass-ext.md - - core/changelog.md - API: [] - - JSON: + - databind.json: - json/index.md - Examples: - json/examples/index.md - json/examples/config-serde.md - json/examples/unions.md - json/examples/unknown-keys.md - - json/changelog.md - API: [] diff --git a/slap.toml b/slap.toml index 8c992377..b2f172b6 100644 --- a/slap.toml +++ b/slap.toml @@ -1,10 +1,9 @@ [changelog] -enabled = false +enabled = true [run] "docs:build" = "cd docs && novella --base-url python-databind/" "docs:dev" = "cd docs && novella --serve" -fmt = "cd databind.core && slap run fmt && cd ../databind.json && slap run fmt" [test] check = "slap check"