pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/py-pydantic



Module Name:    pkgsrc
Committed By:   adam
Date:           Tue Oct 25 09:15:04 UTC 2022

Modified Files:
        pkgsrc/devel/py-pydantic: Makefile distinfo

Log Message:
py-pydantic: updated to 1.10.2

v1.10.2 (2022-09-05)

* **Revert Change:** Revert percent encoding of URL parts which was originally added in
* Prevent long (length > `4_300`) strings/bytes as input to int fields, see
  [CVE-2020-10735](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10735),
* fix: dataclass wrapper was not always called,
* Use `tomllib` on Python 3.11 when parsing `mypy` configuration,
* Basic fix of `GenericModel` cache to detect order of arguments in `Union` models,
* Fix mypy plugin when using bare types like `list` and `dict` as `default_factory`,

v1.10.1 (2022-08-31)

* Add `__hash__` method to `pydancic.color.Color` class,

v1.10.0 (2022-08-30)

* Refactor the whole _pydantic_ `dataclass` decorator to really act like its standard lib equivalent.
  It hence keeps `__eq__`, `__hash__`, ... and makes comparison with its non-validated version possible.
  It also fixes usage of `frozen` dataclasses in fields and usage of `default_factory` in nested dataclasses.
  The support of `Config.extra` has been added.
  Finally, config customization directly via a `dict` is now possible,
  <br/><br/>
  **BREAKING CHANGES:**
  - The `compiled` boolean (whether _pydantic_ is compiled with cython) has been moved from `main.py` to `version.py`
  - Now that `Config.extra` is supported, `dataclass` ignores by default extra arguments (like `BaseModel`)
* Fix PEP487 `__set_name__` protocol in `BaseModel` for PrivateAttrs,
* Allow for custom parsing of environment variables via `parse_env_var` in `Config`,
* Rename `master` to `main`,
* Fix `StrictStr` does not raise `ValidationError` when `max_length` is present in `Field`,
* Make `SecretStr` and `SecretBytes` hashable,
* Fix `StrictBytes` does not raise `ValidationError` when `max_length` is present in `Field`,
* Add support for bare `type`,
* Support Python 3.11, including binaries for 3.11 in PyPI,
* Add support for `re.Pattern`,
* Fix `__post_init_post_parse__` is incorrectly passed keyword arguments when no `__post_init__` is defined,
* Fix implicitly importing `ForwardRef` and `Callable` from `pydantic.typing` instead of `typing` and also expose `MappingIntStrAny`,
* remove `Any` types from the `dataclass` decorator so it can be used with the `disallow_any_expr` mypy option,
* moved repo to `pydantic/pydantic`,
* fix "extra fields not permitted" error when dataclass with `Extra.forbid` is validated multiple times,
* Add Python 3.9 and 3.10 examples to docs,
* Discriminated union models now use `oneOf` instead of `anyOf` when generating OpenAPI schema definitions,
* Allow type checkers to infer inner type of `Json` type. `Json[list[str]]` will be now inferred as `list[str]`,
  `Json[Any]` should be used instead of plain `Json`.
  Runtime behaviour is not changed,
* Allow empty string aliases by using a `alias is not None` check, rather than `bool(alias)`,
* Update `ForwardRef`s in `Field.outer_type_`,
* The use of `__dataclass_transform__` has been replaced by `typing_extensions.dataclass_transform`, which is the preferred way to mark pydantic models as a dataclass under [PEP 
681](https://peps.python.org/pep-0681/),
* Use parent model's `Config` when validating nested `NamedTuple` fields,
* Update `BaseModel.construct` to work with aliased Fields,
* Catch certain raised errors in `smart_deepcopy` and revert to `deepcopy` if so,
* Add `Config.anystr_upper` and `to_upper` kwarg to constr and conbytes,
* Fix JSON schema for `set` and `frozenset` when they include default values,
* Teach the mypy plugin that methods decorated by `@validator` are classmethods,
* Improve mypy plugin's ability to detect required fields,
* Support fields of type `Type[]` in schema,
* Add `default` value in JSON Schema when `const=True`,
* Adds reserved word check to signature generation logic,
* Fix Json strategy failure for the complex nested field,
* Add JSON-compatible float constraint `allow_inf_nan`,
* Remove undefined behaviour when `env_prefix` had characters in common with `env_nested_delimiter`,
* Support generics model with `create_model`,
* allow submodels to overwrite extra field info,
* Document and test structural pattern matching ([PEP 636](https://peps.python.org/pep-0636/)) on `BaseModel`,
* Fix incorrect deserialization of python timedelta object to ISO 8601 for negative time deltas.
  Minus was serialized in incorrect place ("P-1DT23H59M59.888735S" instead of correct "-P1DT23H59M59.888735S"),
* Fix validation of discriminated union fields with an alias when passing a model instance,
* Add a CockroachDsn type to validate CockroachDB connection strings. The type
  supports the following schemes: `cockroachdb`, `cockroachdb+psycopg2` and `cockroachdb+asyncpg`,
* Fix MyPy plugin to not override pre-existing `__init__` method in models,
* Fix mypy version checking,
* support overwriting dunder attributes of `BaseModel` instances,
* Added `ConstrainedDate` and `condate`,
* Support `kw_only` in dataclasses,
* Add comparison method for `Color` class,
* Drop support for python3.6, associated cleanup,
* created new function `to_lower_camel()` for "non pascal case" camel case,
* Add checks to `default` and `default_factory` arguments in Mypy plugin,
* fix mangling of `inspect.signature` for `BaseModel`,
* Adds the `SecretField` abstract class so that all the current and future secret fields like `SecretStr` and `SecretBytes` will derive from it,
* Support multi hosts validation in `PostgresDsn`,
* Fix parsing of very small numeric timedelta values,
* Update `SecretsSettingsSource` to respect `config.case_sensitive`,
* Add MongoDB network data source name (DSN) schema,
* Add support for multiple dotenv files,
* Raise an explicit `ConfigError` when multiple fields are incorrectly set for a single validator,
* Allow ellipsis on `Field`s inside `Annotated` for `TypedDicts` required,
* Catch overflow errors in `int_validator`,
* Adds a `__rich_repr__` method to `Representation` class which enables pretty printing with [Rich](https://github.com/willmcgugan/rich),
* Add percent encoding in `AnyUrl` and descendent types,
* `validate_arguments` decorator now supports `alias`,
* Avoid `__dict__` and `__weakref__` attributes in `AnyUrl` and IP address fields,
* Add ability to use `Final` in a field type annotation,
* Update requirement to `typing_extensions>=4.1.0` to guarantee `dataclass_transform` is available,
* Add Explosion and AWS to main sponsors,
* Update documentation for `copy_on_model_validation` to reflect recent changes,
* Runtime warning if `__slots__` is passed to `create_model`, `__slots__` is then ignored,
* Add type hints to `BaseSettings.Config` to avoid mypy errors, also correct mypy version compatibility notice in docs


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/devel/py-pydantic/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/py-pydantic/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/py-pydantic/Makefile
diff -u pkgsrc/devel/py-pydantic/Makefile:1.3 pkgsrc/devel/py-pydantic/Makefile:1.4
--- pkgsrc/devel/py-pydantic/Makefile:1.3       Tue Aug 23 11:20:40 2022
+++ pkgsrc/devel/py-pydantic/Makefile   Tue Oct 25 09:15:04 2022
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.3 2022/08/23 11:20:40 adam Exp $
+# $NetBSD: Makefile,v 1.4 2022/10/25 09:15:04 adam Exp $
 
-DISTNAME=      pydantic-1.9.2
+DISTNAME=      pydantic-1.10.2
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/pydantic/}
@@ -10,9 +10,9 @@ HOMEPAGE=     https://github.com/samuelcolvi
 COMMENT=       Data validation and settings management using python type hints
 LICENSE=       mit
 
-DEPENDS+=      ${PYPKGPREFIX}-typing-extensions>=3.7.4.3:../../devel/py-typing-extensions
+DEPENDS+=      ${PYPKGPREFIX}-typing-extensions>=4.1.0:../../devel/py-typing-extensions
 
-PYTHON_VERSIONS_INCOMPATIBLE=  27 # and 36
+PYTHON_VERSIONS_INCOMPATIBLE=  27
 
 MAKE_ENV+=     SKIP_CYTHON=1
 USE_LANGUAGES= # empty

Index: pkgsrc/devel/py-pydantic/distinfo
diff -u pkgsrc/devel/py-pydantic/distinfo:1.2 pkgsrc/devel/py-pydantic/distinfo:1.3
--- pkgsrc/devel/py-pydantic/distinfo:1.2       Tue Aug 23 11:20:40 2022
+++ pkgsrc/devel/py-pydantic/distinfo   Tue Oct 25 09:15:04 2022
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.2 2022/08/23 11:20:40 adam Exp $
+$NetBSD: distinfo,v 1.3 2022/10/25 09:15:04 adam Exp $
 
-BLAKE2s (pydantic-1.9.2.tar.gz) = c6380e829f2d41bbf557bee7ed74cd13cf826589526151c1a88cda2c72947167
-SHA512 (pydantic-1.9.2.tar.gz) = 524595aea9401e82d2e985fdb5aa9b4a8b39edfed856d08e057695c786d65c3455991e4f57ce326902ff9cbed328bcb5e6f4133bda769fecea5affb68f3b4345
-Size (pydantic-1.9.2.tar.gz) = 307957 bytes
+BLAKE2s (pydantic-1.10.2.tar.gz) = 4fe73f8eec2aecc1865a87c21cd01f2f4281eb22cb30c42766b92b325c857635
+SHA512 (pydantic-1.10.2.tar.gz) = 2dbb9cb573c497f381a7ae115ad8f684e58943f5657e02a66aa0ea37923a6451d45c154558d4267088c0f7ce983907cc945efaf896544171329f4e0689af9be5
+Size (pydantic-1.10.2.tar.gz) = 335713 bytes



Home | Main Index | Thread Index | Old Index