Recent Releases of pydantic

pydantic - v2.12.0a1 2025-07-26

v2.12.0a1 (2025-07-26)

This is the first alpha release of the upcoming 2.12 release, which adds initial support for Python 3.14.

What's Changed

New Features

  • Add __pydantic_on_complete__() hook that is called once model is fully ready to be used by @DouweM in #11762
  • Add initial support for Python 3.14 by @Viicos in #11991
  • Add regex patterns to JSON schema for Decimal type by @Dima-Bulavenko in #11987
  • Add support for doc attribute on dataclass fields by @Viicos in #12077
  • Add experimental MISSING sentinel by @Viicos in #11883

Changes

  • Allow config and bases to be specified together in create_model() by @Viicos in #11714
  • Move some field logic out of the GenerateSchema class by @Viicos in #11733
  • Always make use of inspect.getsourcelines() for docstring extraction on Python 3.13 and greater by @Viicos in #11829
  • Only support the latest Mypy version by @Viicos in #11832
  • Do not implicitly convert after model validators to class methods by @Viicos in #11957
  • Refactor FieldInfo creation implementation by @Viicos in #11898
  • Make Secret covariant by @bluenote10 in #12008
  • Emit warning when field-specific metadata is used in invalid contexts by @Viicos in #12028

Fixes

  • Properly fetch plain serializer function when serializing default value in JSON Schema by @Viicos in #11721
  • Remove generics cache workaround by @Viicos in #11755
  • Remove coercion of decimal constraints by @Viicos in #11772
  • Fix crash when expanding root type in the mypy plugin by @Viicos in #11735
  • Only mark model as complete once all fields are complete by @DouweM in #11759
  • Do not provide field_name in validator core schemas by @DouweM in #11761
  • Fix issue with recursive generic models by @Viicos in #11775
  • Fix qualified name comparison of private attributes during namespace inspection by @karta9821 in #11803
  • Make sure Pydantic dataclasses with slots and validate_assignment can be unpickled by @Viicos in #11769
  • Traverse function-before schemas during schema gathering by @Viicos in #11801
  • Fix check for stdlib dataclasses by @Viicos in #11822
  • Check if FieldInfo is complete after applying type variable map by @Viicos in #11855
  • Do not delete mock validator/serializer in model_rebuild() by @Viicos in #11890
  • Rebuild dataclass fields before schema generation by @Viicos in #11949
  • Always store the original field assignment on FieldInfo by @Viicos in #11946
  • Do not use deprecated methods as default field values by @Viicos in #11914
  • Allow callable discriminator to be applied on PEP 695 type aliases by @Viicos in #11941
  • Suppress core schema generation warning when using SkipValidation by @ygsh0816 in #12002
  • Do not emit typechecking error for invalid Field() default with validate_default set to True by @Viicos in #11988
  • Refactor logic to support Pydantic's Field() function in dataclasses by @Viicos in #12051

Packaging

  • Update project metadata to use PEP 639 by @Viicos in #11694
  • Bump mkdocs-llmstxt to v0.2.0 by @Viicos in #11725
  • Bump pydantic-core to v2.35.1 by @Viicos in #11963
  • Bump dawidd6/action-download-artifact from 10 to 11 by @dependabot[bot] in #12033
  • Bump astral-sh/setup-uv from 5 to 6 by @dependabot[bot] in #11826
  • Update mypy to 1.17.0 by @Viicos in #12076

New Contributors

  • @parth-paradkar made their first contribution in #11695
  • @dqkqd made their first contribution in #11739
  • @fhightower made their first contribution in #11722
  • @gbaian10 made their first contribution in #11766
  • @DouweM made their first contribution in #11759
  • @bowenliang123 made their first contribution in #11719
  • @rawwar made their first contribution in #11799
  • @karta9821 made their first contribution in #11803
  • @jinnovation made their first contribution in #11834
  • @zmievsa made their first contribution in #11861
  • @Otto-AA made their first contribution in #11860
  • @ygsh0816 made their first contribution in #12002
  • @lukland made their first contribution in #12015
  • @Dima-Bulavenko made their first contribution in #11987
  • @GSemikozov made their first contribution in #12050
  • @hannah-heywa made their first contribution in #12082

- Python
Published by Viicos 10 months ago

pydantic - v2.11.7 2025-06-14

What's Changed

Fixes

  • Copy FieldInfo instance if necessary during FieldInfo build by @Viicos in https://github.com/pydantic/pydantic/pull/11980

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.11.6...v2.11.7

- Python
Published by Viicos 12 months ago

pydantic - v2.11.6 2025-06-13

v2.11.6 (2025-06-13)

What's Changed

Fixes

  • Rebuild dataclass fields before schema generation by @Viicos in #11949
  • Always store the original field assignment on FieldInfo by @Viicos in #11946

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.11.5...v2.11.6

- Python
Published by Viicos 12 months ago

pydantic - v2.11.5 2025-05-22

What's Changed

Fixes

  • Check if FieldInfo is complete after applying type variable map by @Viicos in #11855
  • Do not delete mock validator/serializer in model_rebuild() by @Viicos in #11890
  • Do not duplicate metadata on model rebuild by @Viicos in #11902

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.11.4...v2.11.5

- Python
Published by Viicos about 1 year ago

pydantic - v2.11.4 2025-04-29

What's Changed

Packaging

  • Bump mkdocs-llmstxt to v0.2.0 by @Viicos in #11725

Changes

  • Allow config and bases to be specified together in create_model() by @Viicos in #11714. This change was backported as it was previously possible (although not meant to be supported) to provide model_config as a field, which would make it possible to provide both configuration and bases.

Fixes

  • Remove generics cache workaround by @Viicos in #11755
  • Remove coercion of decimal constraints by @Viicos in #11772
  • Fix crash when expanding root type in the mypy plugin by @Viicos in #11735
  • Fix issue with recursive generic models by @Viicos in #11775
  • Traverse function-before schemas during schema gathering by @Viicos in #11801

- Python
Published by Viicos about 1 year ago

pydantic - v2.11.3 2025-04-08

What's Changed

Packaging

  • Update V1 copy to v1.10.21 by @Viicos in https://github.com/pydantic/pydantic/pull/11706 ### Fixes
  • Preserve field description when rebuilding model fields by @Viicos in https://github.com/pydantic/pydantic/pull/11698

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.11.2...v2.11.3

- Python
Published by Viicos about 1 year ago

pydantic - v2.11.2 2025-04-03

What's Changed

Fixes

  • Bump pydantic-core to v2.33.1 by @Viicos in https://github.com/pydantic/pydantic/pull/11678
  • Make sure __pydantic_private__ exists before setting private attributes by @Viicos in https://github.com/pydantic/pydantic/pull/11666
  • Do not override FieldInfo._complete when using field from parent class by @Viicos in https://github.com/pydantic/pydantic/pull/11668
  • Provide the available definitions when applying discriminated unions by @Viicos in https://github.com/pydantic/pydantic/pull/11670
  • Do not expand root type in the mypy plugin for variables by @Viicos in https://github.com/pydantic/pydantic/pull/11676
  • Mention the attribute name in model fields deprecation message by @Viicos in https://github.com/pydantic/pydantic/pull/11674
  • Properly validate parameterized mappings by @Viicos in https://github.com/pydantic/pydantic/pull/11658
  • Prepare release v2.11.2 by @Viicos in https://github.com/pydantic/pydantic/pull/11684

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.11.1...v2.11.2

- Python
Published by Viicos about 1 year ago

pydantic - v2.11.1 2025-03-28

What's Changed

Fixes

  • Do not override 'definitions-ref' schemas containing serialization schemas or metadata by @Viicos in https://github.com/pydantic/pydantic/pull/11644

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.11.0...v2.11.1

- Python
Published by Viicos about 1 year ago

pydantic - v2.11.0 2025-03-27

What's Changed

Packaging

  • Re-enable memray related tests on Python 3.12+ by @Viicos in https://github.com/pydantic/pydantic/pull/11191
  • Bump astral-sh/setup-uv from 4 to 5 by @dependabot in https://github.com/pydantic/pydantic/pull/11205
  • Add a check_pydantic_core_version() function by @Viicos in https://github.com/pydantic/pydantic/pull/11324
  • Remove greenlet development dependency by @Viicos in https://github.com/pydantic/pydantic/pull/11351
  • Bump ruff from 0.9.2 to 0.9.5 by @Viicos in https://github.com/pydantic/pydantic/pull/11407
  • Improve release automation process by @austinyu in https://github.com/pydantic/pydantic/pull/11427
  • Bump dawidd6/action-download-artifact from 8 to 9 by @dependabot in https://github.com/pydantic/pydantic/pull/11513
  • Bump pydantic-core to v2.32.0 by @Viicos in https://github.com/pydantic/pydantic/pull/11567

New Features

  • Support unsubstituted type variables with both a default and a bound or constraints by @FyZzyss in https://github.com/pydantic/pydantic/pull/10789
  • Add a default_factory_takes_validated_data property to FieldInfo by @Viicos in https://github.com/pydantic/pydantic/pull/11034
  • Raise a better error when a generic alias is used inside type[] by @Viicos in https://github.com/pydantic/pydantic/pull/11088
  • Properly support PEP 695 generics syntax by @Viicos in https://github.com/pydantic/pydantic/pull/11189
  • Properly support type variable defaults by @Viicos in https://github.com/pydantic/pydantic/pull/11332
  • Add support for validating v6, v7, v8 UUIDs by @astei in https://github.com/pydantic/pydantic/pull/11436
  • Improve alias configuration APIs by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11468
  • Add experimental support for free threading by @Viicos in https://github.com/pydantic/pydantic/pull/11516
  • Add encoded_string() method to the URL types by @YassinNouh21 in https://github.com/pydantic/pydantic/pull/11580
  • Add support for defer_build with @validate_call decorator by @Viicos in https://github.com/pydantic/pydantic/pull/11584
  • Allow @with_config decorator to be used with keyword arguments by @Viicos in https://github.com/pydantic/pydantic/pull/11608
  • Simplify customization of default value inclusion in JSON Schema generation by @Viicos in https://github.com/pydantic/pydantic/pull/11634
  • Add generate_arguments_schema() function by @Viicos in https://github.com/pydantic/pydantic/pull/11572

Changes

  • Rework create_model field definitions format by @Viicos in https://github.com/pydantic/pydantic/pull/11032
  • Raise a deprecation warning when a field is annotated as final with a default value by @Viicos in https://github.com/pydantic/pydantic/pull/11168
  • Deprecate accessing model_fields and model_computed_fields on instances by @Viicos in https://github.com/pydantic/pydantic/pull/11169
  • Move core schema generation logic for path types inside the GenerateSchema class by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10846
  • Move Mapping schema gen to GenerateSchema to complete removal of prepare_annotations_for_known_type workaround by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11247
  • Remove Python 3.8 Support by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11258
  • Optimize calls to get_type_ref by @Viicos in https://github.com/pydantic/pydantic/pull/10863
  • Disable pydantic-core core schema validation by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11271 ### Performance
  • Only evaluate FieldInfo annotations if required during schema building by @Viicos in https://github.com/pydantic/pydantic/pull/10769
  • Improve __setattr__ performance of Pydantic models by caching setter functions by @MarkusSintonen in https://github.com/pydantic/pydantic/pull/10868
  • Improve annotation application performance by @Viicos in https://github.com/pydantic/pydantic/pull/11186
  • Improve performance of _typing_extra module by @Viicos in https://github.com/pydantic/pydantic/pull/11255
  • Refactor and optimize schema cleaning logic by @Viicos in https://github.com/pydantic/pydantic/pull/11244
  • Create a single dictionary when creating a CoreConfig instance by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11384
  • Reuse cached core schemas for parametrized generic Pydantic models by @MarkusSintonen in https://github.com/pydantic/pydantic/pull/11434 ### Fixes
  • Add validation tests for _internal/_validators.py by @tkasuz in https://github.com/pydantic/pydantic/pull/10763
  • Subclass all single host url classes from AnyUrl to preserve behavior from v2.9 by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10856
  • Improve TypeAdapter instance repr by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10872
  • Use the correct frame when instantiating a parametrized TypeAdapter by @Viicos in https://github.com/pydantic/pydantic/pull/10893
  • Relax check for validated data in default factory utils by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10909
  • Fix type checking issue with model_fields and model_computed_fields by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10911
  • Use the parent configuration during schema generation for stdlib dataclasses by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10928
  • Use the globals of the function when evaluating the return type of serializers and computed_fields by @Viicos in https://github.com/pydantic/pydantic/pull/10929
  • Fix url constraint application by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10922
  • Fix URL equality with different validation methods by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10934
  • Fix JSON schema title when specified as '' by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10936
  • Do not evaluate annotations for private fields by @Viicos in https://github.com/pydantic/pydantic/pull/10962
  • Support serialization as any for Secret types and Url types by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10947
  • Fix type hint of Field.default to be compatible with Python 3.8 and 3.9 by @Viicos in https://github.com/pydantic/pydantic/pull/10972
  • hashing support for urls by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10975
  • Hide BaseModel.__replace__ definition from type checkers by @Viicos in https://github.com/pydantic/pydantic/pull/10979
  • Set fields when defer_build is set on Pydantic dataclasses by @Viicos in https://github.com/pydantic/pydantic/pull/10984
  • Do not resolve the JSON Schema reference for dict core schema keys by @Viicos in https://github.com/pydantic/pydantic/pull/10989
  • Use the globals of the function when evaluating the return type for PlainSerializer and WrapSerializer functions by @Viicos in https://github.com/pydantic/pydantic/pull/11008
  • Fix host required enforcement for urls to be compatible with v2.9 behavior by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11027
  • Fix url json schema in serialization mode by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11035
  • Fix for comparison of AnyUrl objects by @alexprabhat99 in https://github.com/pydantic/pydantic/pull/11082
  • Properly fetch PEP 695 type params for functions, do not fetch annotations from signature by @Viicos in https://github.com/pydantic/pydantic/pull/11093
  • Infer final fields with a default value as class variables in the mypy plugin by @Viicos in https://github.com/pydantic/pydantic/pull/11121
  • Recursively unpack Literal values if using PEP 695 type aliases by @Viicos in https://github.com/pydantic/pydantic/pull/11114
  • Override __subclasscheck__ on ModelMetaclass to avoid memory leak and performance issues by @Viicos in https://github.com/pydantic/pydantic/pull/11116
  • Include JSON Schema input core schema in function schemas by @Viicos in https://github.com/pydantic/pydantic/pull/11085
  • Add len to _BaseUrl to avoid TypeError by @Kharianne in https://github.com/pydantic/pydantic/pull/11111
  • Make sure the type reference is removed from the seen references by @Viicos in https://github.com/pydantic/pydantic/pull/11143
  • Add FastAPI and SQLModel to third-party tests by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11044
  • Improve discriminated union error message for invalid union variants by @Viicos in https://github.com/pydantic/pydantic/pull/11161
  • Unpack PEP 695 type aliases if using the Annotated form by @Viicos in https://github.com/pydantic/pydantic/pull/11109
  • Remove custom MRO implementation of Pydantic models by @Viicos in https://github.com/pydantic/pydantic/pull/11184
  • Add pandera third-party tests by @Viicos in https://github.com/pydantic/pydantic/pull/11193
  • Add ODMantic third-party tests by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11197
  • Copy WithJsonSchema schema to avoid sharing mutated data by @thejcannon in https://github.com/pydantic/pydantic/pull/11014
  • Do not cache parametrized models when in the process of parametrizing another model by @Viicos in https://github.com/pydantic/pydantic/pull/10704
  • Add discriminated union related metadata entries to the CoreMetadata definition by @Viicos in https://github.com/pydantic/pydantic/pull/11216
  • Consolidate schema definitions logic in the _Definitions class by @Viicos in https://github.com/pydantic/pydantic/pull/11208
  • Fix url serialization for unions by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11227
  • Support initializing root model fields with values of the root type in the mypy plugin by @Viicos in https://github.com/pydantic/pydantic/pull/11212
  • Move deque schema gen to GenerateSchema class by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11239
  • Fix various issues with dataclasses and use_attribute_docstrings by @Viicos in https://github.com/pydantic/pydantic/pull/11246
  • Only compute normalized decimal places if necessary in decimal_places_validator by @misrasaurabh1 in https://github.com/pydantic/pydantic/pull/11281
  • Add support for validation_alias in the mypy plugin by @Viicos in https://github.com/pydantic/pydantic/pull/11295
  • Fix JSON Schema reference collection with "examples" keys by @Viicos in https://github.com/pydantic/pydantic/pull/11305
  • Do not transform model serializer functions as class methods in the mypy plugin by @Viicos in https://github.com/pydantic/pydantic/pull/11298
  • Fix url python serialization by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11330
  • Add additional allowed schemes for ClickHouseDsn by @Maze21127 in https://github.com/pydantic/pydantic/pull/11319
  • Coerce decimal constraints to Decimal instances by @Viicos in https://github.com/pydantic/pydantic/pull/11350
  • Use the correct JSON Schema mode when handling function schemas by @Viicos in https://github.com/pydantic/pydantic/pull/11367
  • Fix JSON Schema reference logic with examples keys by @Viicos in https://github.com/pydantic/pydantic/pull/11366
  • Improve exception message when encountering recursion errors during type evaluation by @Viicos in https://github.com/pydantic/pydantic/pull/11356
  • Always include additionalProperties: True for arbitrary dictionary schemas by @austinyu in https://github.com/pydantic/pydantic/pull/11392
  • Expose fallback parameter in serialization methods by @Viicos in https://github.com/pydantic/pydantic/pull/11398
  • Fix path serialization behavior by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11416
  • Do not reuse validators and serializers during model rebuild by @Viicos in https://github.com/pydantic/pydantic/pull/11429
  • Collect model fields when rebuilding a model by @Viicos in https://github.com/pydantic/pydantic/pull/11388
  • Allow cached properties to be altered on frozen models by @Viicos in https://github.com/pydantic/pydantic/pull/11432
  • Fix tuple serialization for Sequence types by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11435
  • Fix: do not check for __get_validators__ on classes where __get_pydantic_core_schema__ is also defined by @tlambert03 in https://github.com/pydantic/pydantic/pull/11444
  • Allow callable instances to be used as serializers by @Viicos in https://github.com/pydantic/pydantic/pull/11451
  • Improve error thrown when overriding field with a property by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11459
  • Add BentoML and Semantic Kernel third-party tests by @Viicos in https://github.com/pydantic/pydantic/pull/11469
  • Adding langchain third party tests by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11474
  • Fix JSON Schema generation with referenceable core schemas holding JSON metadata by @Viicos in https://github.com/pydantic/pydantic/pull/11475
  • Support strict specification on union member types by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11481
  • Run Beanie third-party tests on a single Python version by @Viicos in https://github.com/pydantic/pydantic/pull/11502
  • Implicitly set validate_by_name to True when validate_by_alias is False by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11503
  • Change type of Any when synthesizing BaseSettings.__init__ signature in the mypy plugin by @Viicos in https://github.com/pydantic/pydantic/pull/11497
  • Use the typing-inspection library by @Viicos in https://github.com/pydantic/pydantic/pull/11479
  • Support type variable defaults referencing other type variables by @Viicos in https://github.com/pydantic/pydantic/pull/11520
  • Fix NotRequired qualifier not taken into account in stringified annotation by @Viicos in https://github.com/pydantic/pydantic/pull/11559
  • Allow generic typed dictionaries to be used for unpacked variadic keyword parameters by @Viicos in https://github.com/pydantic/pydantic/pull/11571
  • Fix runtime error when computing model string representation involving cached properties and self-referenced models by @Viicos in https://github.com/pydantic/pydantic/pull/11579
  • Preserve other steps when using the ellipsis in the pipeline API by @Viicos in https://github.com/pydantic/pydantic/pull/11626
  • Fix deferred discriminator application logic by @Viicos in https://github.com/pydantic/pydantic/pull/11591

New Contributors

  • @FyZzyss made their first contribution in https://github.com/pydantic/pydantic/pull/10789
  • @tamird made their first contribution in https://github.com/pydantic/pydantic/pull/10948
  • @felixxm made their first contribution in https://github.com/pydantic/pydantic/pull/11077
  • @alexprabhat99 made their first contribution in https://github.com/pydantic/pydantic/pull/11082
  • @Kharianne made their first contribution in https://github.com/pydantic/pydantic/pull/11111
  • @mdaffad made their first contribution in https://github.com/pydantic/pydantic/pull/11177
  • @thejcannon made their first contribution in https://github.com/pydantic/pydantic/pull/11014
  • @thomasfrimannkoren made their first contribution in https://github.com/pydantic/pydantic/pull/11251
  • @usernameMAI made their first contribution in https://github.com/pydantic/pydantic/pull/11275
  • @ananiavito made their first contribution in https://github.com/pydantic/pydantic/pull/11302
  • @pawamoy made their first contribution in https://github.com/pydantic/pydantic/pull/11311
  • @Maze21127 made their first contribution in https://github.com/pydantic/pydantic/pull/11319
  • @kauabh made their first contribution in https://github.com/pydantic/pydantic/pull/11369
  • @jaceklaskowski made their first contribution in https://github.com/pydantic/pydantic/pull/11353
  • @tmpbeing made their first contribution in https://github.com/pydantic/pydantic/pull/11375
  • @petyosi made their first contribution in https://github.com/pydantic/pydantic/pull/11405
  • @austinyu made their first contribution in https://github.com/pydantic/pydantic/pull/11392
  • @mikeedjones made their first contribution in https://github.com/pydantic/pydantic/pull/11402
  • @astei made their first contribution in https://github.com/pydantic/pydantic/pull/11436
  • @dsayling made their first contribution in https://github.com/pydantic/pydantic/pull/11522
  • @joren485 made their first contribution in https://github.com/pydantic/pydantic/pull/11547
  • @cmenon12 made their first contribution in https://github.com/pydantic/pydantic/pull/11562
  • @Jeukoh made their first contribution in https://github.com/pydantic/pydantic/pull/11611

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.10.6...v2.11.0

- Python
Published by Viicos about 1 year ago

pydantic - v2.11.0b2 2025-03-17

What's Changed

Packaging

  • Bump pydantic-core to v2.32.0 by @Viicos in https://github.com/pydantic/pydantic/pull/11567 ### New Features
  • Add experimental support for free threading by @Viicos in https://github.com/pydantic/pydantic/pull/11516 ### Fixes
  • Fix NotRequired qualifier not taken into account in stringified annotation by @Viicos in https://github.com/pydantic/pydantic/pull/11559

New Contributors

  • @joren485 made their first contribution in https://github.com/pydantic/pydantic/pull/11547

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.11.0b1...v2.11.0b2

- Python
Published by Viicos about 1 year ago

pydantic - v2.11.0b1 2025-03-06

GitHub release

What's Changed

Packaging

  • Add a check_pydantic_core_version() function by @Viicos in https://github.com/pydantic/pydantic/pull/11324
  • Remove greenlet development dependency by @Viicos in https://github.com/pydantic/pydantic/pull/11351
  • Use the typing-inspection library by @Viicos in https://github.com/pydantic/pydantic/pull/11479
  • Bump pydantic-core to v2.31.1 by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11526

New Features

  • Support unsubstituted type variables with both a default and a bound or constraints by @FyZzyss in https://github.com/pydantic/pydantic/pull/10789
  • Add a default_factory_takes_validated_data property to FieldInfo by @Viicos in https://github.com/pydantic/pydantic/pull/11034
  • Raise a better error when a generic alias is used inside type[] by @Viicos in https://github.com/pydantic/pydantic/pull/11088
  • Properly support PEP 695 generics syntax by @Viicos in https://github.com/pydantic/pydantic/pull/11189
  • Properly support type variable defaults by @Viicos in https://github.com/pydantic/pydantic/pull/11332
  • Add support for validating v6, v7, v8 UUIDs by @astei in https://github.com/pydantic/pydantic/pull/11436
  • Improve alias configuration APIs by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11468

Changes

  • Rework create_model field definitions format by @Viicos in https://github.com/pydantic/pydantic/pull/11032
  • Raise a deprecation warning when a field is annotated as final with a default value by @Viicos in https://github.com/pydantic/pydantic/pull/11168
  • Deprecate accessing model_fields and model_computed_fields on instances by @Viicos in https://github.com/pydantic/pydantic/pull/11169
  • Breaking Change: Move core schema generation logic for path types inside the GenerateSchema class by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10846
  • Remove Python 3.8 Support by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11258
  • Optimize calls to get_type_ref by @Viicos in https://github.com/pydantic/pydantic/pull/10863
  • Disable pydantic-core core schema validation by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11271

Performance

  • Only evaluate FieldInfo annotations if required during schema building by @Viicos in https://github.com/pydantic/pydantic/pull/10769
  • Improve __setattr__ performance of Pydantic models by caching setter functions by @MarkusSintonen in https://github.com/pydantic/pydantic/pull/10868
  • Improve annotation application performance by @Viicos in https://github.com/pydantic/pydantic/pull/11186
  • Improve performance of _typing_extra module by @Viicos in https://github.com/pydantic/pydantic/pull/11255
  • Refactor and optimize schema cleaning logic by @Viicos in https://github.com/pydantic/pydantic/pull/11244
  • Create a single dictionary when creating a CoreConfig instance by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11384
  • Bump pydantic-core and thus use SchemaValidator and SchemaSerializer caching by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11402
  • Reuse cached core schemas for parametrized generic Pydantic models by @MarkusSintonen in https://github.com/pydantic/pydantic/pull/11434

Fixes

  • Improve TypeAdapter instance repr by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10872
  • Use the correct frame when instantiating a parametrized TypeAdapter by @Viicos in https://github.com/pydantic/pydantic/pull/10893
  • Infer final fields with a default value as class variables in the mypy plugin by @Viicos in https://github.com/pydantic/pydantic/pull/11121
  • Recursively unpack Literal values if using PEP 695 type aliases by @Viicos in https://github.com/pydantic/pydantic/pull/11114
  • Override __subclasscheck__ on ModelMetaclass to avoid memory leak and performance issues by @Viicos in https://github.com/pydantic/pydantic/pull/11116
  • Remove unused _extract_get_pydantic_json_schema() parameter by @Viicos in https://github.com/pydantic/pydantic/pull/11155
  • Improve discriminated union error message for invalid union variants by @Viicos in https://github.com/pydantic/pydantic/pull/11161
  • Unpack PEP 695 type aliases if using the Annotated form by @Viicos in https://github.com/pydantic/pydantic/pull/11109
  • Add missing stacklevel in deprecated_instance_property warning by @Viicos in https://github.com/pydantic/pydantic/pull/11200
  • Copy WithJsonSchema schema to avoid sharing mutated data by @thejcannon in https://github.com/pydantic/pydantic/pull/11014
  • Do not cache parametrized models when in the process of parametrizing another model by @Viicos in https://github.com/pydantic/pydantic/pull/10704
  • Add discriminated union related metadata entries to the CoreMetadata definition by @Viicos in https://github.com/pydantic/pydantic/pull/11216
  • Consolidate schema definitions logic in the _Definitions class by @Viicos in https://github.com/pydantic/pydantic/pull/11208
  • Support initializing root model fields with values of the root type in the mypy plugin by @Viicos in https://github.com/pydantic/pydantic/pull/11212
  • Fix various issues with dataclasses and use_attribute_docstrings by @Viicos in https://github.com/pydantic/pydantic/pull/11246
  • Only compute normalized decimal places if necessary in decimal_places_validator by @misrasaurabh1 in https://github.com/pydantic/pydantic/pull/11281
  • Add support for validation_alias in the mypy plugin by @Viicos in https://github.com/pydantic/pydantic/pull/11295
  • Fix JSON Schema reference collection with "examples" keys by @Viicos in https://github.com/pydantic/pydantic/pull/11305
  • Do not transform model serializer functions as class methods in the mypy plugin by @Viicos in https://github.com/pydantic/pydantic/pull/11298
  • Simplify GenerateJsonSchema.literal_schema() implementation by @misrasaurabh1 in https://github.com/pydantic/pydantic/pull/11321
  • Add additional allowed schemes for ClickHouseDsn by @Maze21127 in https://github.com/pydantic/pydantic/pull/11319
  • Coerce decimal constraints to Decimal instances by @Viicos in https://github.com/pydantic/pydantic/pull/11350
  • Use the correct JSON Schema mode when handling function schemas by @Viicos in https://github.com/pydantic/pydantic/pull/11367
  • Improve exception message when encountering recursion errors during type evaluation by @Viicos in https://github.com/pydantic/pydantic/pull/11356
  • Always include additionalProperties: True for arbitrary dictionary schemas by @austinyu in https://github.com/pydantic/pydantic/pull/11392
  • Expose fallback parameter in serialization methods by @Viicos in https://github.com/pydantic/pydantic/pull/11398
  • Fix path serialization behavior by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11416
  • Do not reuse validators and serializers during model rebuild by @Viicos in https://github.com/pydantic/pydantic/pull/11429
  • Collect model fields when rebuilding a model by @Viicos in https://github.com/pydantic/pydantic/pull/11388
  • Allow cached properties to be altered on frozen models by @Viicos in https://github.com/pydantic/pydantic/pull/11432
  • Fix tuple serialization for Sequence types by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11435
  • Fix: do not check for __get_validators__ on classes where __get_pydantic_core_schema__ is also defined by @tlambert03 in https://github.com/pydantic/pydantic/pull/11444
  • Allow callable instances to be used as serializers by @Viicos in https://github.com/pydantic/pydantic/pull/11451
  • Improve error thrown when overriding field with a property by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11459
  • Fix JSON Schema generation with referenceable core schemas holding JSON metadata by @Viicos in https://github.com/pydantic/pydantic/pull/11475
  • Support strict specification on union member types by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11481
  • Implicitly set validate_by_name to True when validate_by_alias is False by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11503
  • Change type of Any when synthesizing BaseSettings.__init__ signature in the mypy plugin by @Viicos in https://github.com/pydantic/pydantic/pull/11497
  • Support type variable defaults referencing other type variables by @Viicos in https://github.com/pydantic/pydantic/pull/11520
  • Fix ValueError on year zero by @davidhewitt in https://github.com/pydantic/pydantic-core/pull/1583
  • dataclass InitVar shouldn't be required on serialization by @sydney-runkle in https://github.com/pydantic/pydantic-core/pull/1602

New Contributors

  • @FyZzyss made their first contribution in https://github.com/pydantic/pydantic/pull/10789
  • @tamird made their first contribution in https://github.com/pydantic/pydantic/pull/10948
  • @felixxm made their first contribution in https://github.com/pydantic/pydantic/pull/11077
  • @alexprabhat99 made their first contribution in https://github.com/pydantic/pydantic/pull/11082
  • @Kharianne made their first contribution in https://github.com/pydantic/pydantic/pull/11111
  • @mdaffad made their first contribution in https://github.com/pydantic/pydantic/pull/11177
  • @thejcannon made their first contribution in https://github.com/pydantic/pydantic/pull/11014
  • @thomasfrimannkoren made their first contribution in https://github.com/pydantic/pydantic/pull/11251
  • @usernameMAI made their first contribution in https://github.com/pydantic/pydantic/pull/11275
  • @ananiavito made their first contribution in https://github.com/pydantic/pydantic/pull/11302
  • @pawamoy made their first contribution in https://github.com/pydantic/pydantic/pull/11311
  • @Maze21127 made their first contribution in https://github.com/pydantic/pydantic/pull/11319
  • @kauabh made their first contribution in https://github.com/pydantic/pydantic/pull/11369
  • @jaceklaskowski made their first contribution in https://github.com/pydantic/pydantic/pull/11353
  • @tmpbeing made their first contribution in https://github.com/pydantic/pydantic/pull/11375
  • @petyosi made their first contribution in https://github.com/pydantic/pydantic/pull/11405
  • @austinyu made their first contribution in https://github.com/pydantic/pydantic/pull/11392
  • @mikeedjones made their first contribution in https://github.com/pydantic/pydantic/pull/11402
  • @astei made their first contribution in https://github.com/pydantic/pydantic/pull/11436
  • @dsayling made their first contribution in https://github.com/pydantic/pydantic/pull/11522
  • @sobolevn made their first contribution in https://github.com/pydantic/pydantic-core/pull/1645

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.10.6...v2.11.0b1

- Python
Published by sydney-runkle about 1 year ago

pydantic - v2.11.0a2 2025-02-10

What's Changed

[!NOTE] Pydantic v2.11 is a version strongly focused on build time performance of Pydantic models (and core schema generation in general). This is another early alpha release, meant to collect early feedback from users having issues with core schema builds.

Packaging

  • Bump ruff from 0.9.2 to 0.9.5 by @Viicos in https://github.com/pydantic/pydantic/pull/11407
  • Bump pydantic-core to v2.29.0 by @mikeedjones in https://github.com/pydantic/pydantic/pull/11402
  • Use locally-built rust with symbols & pgo by @davidhewitt in https://github.com/pydantic/pydantic/pull/11403

Performance

  • Create a single dictionary when creating a CoreConfig instance by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11384

Fixes

  • Use the correct JSON Schema mode when handling function schemas by @Viicos in https://github.com/pydantic/pydantic/pull/11367
  • Fix JSON Schema reference logic with examples keys by @Viicos in https://github.com/pydantic/pydantic/pull/11366
  • Improve exception message when encountering recursion errors during type evaluation by @Viicos in https://github.com/pydantic/pydantic/pull/11356
  • Always include additionalProperties: True for arbitrary dictionary schemas by @austinyu in https://github.com/pydantic/pydantic/pull/11392
  • Expose fallback parameter in serialization methods by @Viicos in https://github.com/pydantic/pydantic/pull/11398
  • Fix path serialization behavior by @sydney-runkle in https://github.com/pydantic/pydantic/pull/11416

New Contributors

  • @kauabh made their first contribution in https://github.com/pydantic/pydantic/pull/11369
  • @jaceklaskowski made their first contribution in https://github.com/pydantic/pydantic/pull/11353
  • @tmpbeing made their first contribution in https://github.com/pydantic/pydantic/pull/11375
  • @petyosi made their first contribution in https://github.com/pydantic/pydantic/pull/11405
  • @austinyu made their first contribution in https://github.com/pydantic/pydantic/pull/11392
  • @mikeedjones made their first contribution in https://github.com/pydantic/pydantic/pull/11402

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.11.0a1...v2.11.0a2

- Python
Published by sydney-runkle over 1 year ago

pydantic - v2.11.0a1 2025-01-30

v2.11.0a1 (2025-01-30)

What's Changed

[!NOTE]
Pydantic v2.11 is a version strongly focused on build time performance of Pydantic models (and core schema generation in general). This is an early alpha release, meant to collect early feedback from users having issues with core schema builds.

Packaging

  • Bump dawidd6/action-download-artifact from 6 to 7 by @dependabot in #11018
  • Re-enable memray related tests on Python 3.12+ by @Viicos in #11191
  • Bump astral-sh/setup-uv to 5 by @dependabot in #11205
  • Bump ruff to v0.9.0 by @sydney-runkle in #11254
  • Regular uv.lock deps update by @sydney-runkle in #11333
  • Add a check_pydantic_core_version() function by @Viicos in #11324
  • Remove greenlet development dependency by @Viicos in #11351
  • Bump pydantic-core to v2.28.0 by @Viicos in #11364

New Features

  • Support unsubstituted type variables with both a default and a bound or constraints by @FyZzyss in #10789
  • Add a default_factory_takes_validated_data property to FieldInfo by @Viicos in #11034
  • Raise a better error when a generic alias is used inside type[] by @Viicos in #11088
  • Properly support PEP 695 generics syntax by @Viicos in #11189
  • Properly support type variable defaults by @Viicos in #11332

Changes

  • Rework create_model field definitions format by @Viicos in #11032
  • Raise a deprecation warning when a field is annotated as final with a default value by @Viicos in #11168
  • Deprecate accessing model_fields and model_computed_fields on instances by @Viicos in #11169
  • Move core schema generation logic for path types inside the GenerateSchema class by @sydney-runkle in #10846
  • Move deque schema gen to GenerateSchema class by @sydney-runkle in #11239
  • Move Mapping schema gen to GenerateSchema to complete removal of prepare_annotations_for_known_type workaround by @sydney-runkle in #11247
  • Remove Python 3.8 Support by @sydney-runkle in #11258
  • Disable pydantic-core core schema validation by @sydney-runkle in #11271

Performance

  • Only evaluate FieldInfo annotations if required during schema building by @Viicos in #10769
  • Optimize calls to get_type_ref by @Viicos in #10863
  • Improve __setattr__ performance of Pydantic models by caching setter functions by @MarkusSintonen in #10868
  • Improve annotation application performance by @Viicos in #11186
  • Improve performance of _typing_extra module by @Viicos in #11255
  • Refactor and optimize schema cleaning logic by @Viicos and @MarkusSintonen in #11244

Fixes

  • Add validation tests for _internal/_validators.py by @tkasuz in #10763
  • Improve TypeAdapter instance repr by @sydney-runkle in #10872
  • Revert "ci: use locally built pydantic-core with debug symbols by @sydney-runkle in #10942
  • Re-enable all FastAPI tests by @tamird in #10948
  • Fix typo in HISTORY.md. by @felixxm in #11077
  • Infer final fields with a default value as class variables in the mypy plugin by @Viicos in #11121
  • Recursively unpack Literal values if using PEP 695 type aliases by @Viicos in #11114
  • Override __subclasscheck__ on ModelMetaclass to avoid memory leak and performance issues by @Viicos in #11116
  • Remove unused _extract_get_pydantic_json_schema() parameter by @Viicos in #11155
  • Add FastAPI and SQLModel to third-party tests by @sydney-runkle in #11044
  • Fix conditional expressions syntax for third-party tests by @Viicos in #11162
  • Move FastAPI tests to third-party workflow by @Viicos in #11164
  • Improve discriminated union error message for invalid union variants by @Viicos in #11161
  • Unpack PEP 695 type aliases if using the Annotated form by @Viicos in #11109
  • Include openapi-python-client check in issue creation for third-party failures, use main branch by @sydney-runkle in #11182
  • Add pandera third-party tests by @Viicos in #11193
  • Add ODMantic third-party tests by @sydney-runkle in #11197
  • Add missing stacklevel in deprecated_instance_property warning by @Viicos in #11200
  • Copy WithJsonSchema schema to avoid sharing mutated data by @thejcannon in #11014
  • Do not cache parametrized models when in the process of parametrizing another model by @Viicos in #10704
  • Re-enable Beanie third-party tests by @Viicos in #11214
  • Add discriminated union related metadata entries to the CoreMetadata definition by @Viicos in #11216
  • Consolidate schema definitions logic in the _Definitions class by @Viicos in #11208
  • Support initializing root model fields with values of the root type in the mypy plugin by @Viicos in #11212
  • Fix various issues with dataclasses and use_attribute_docstrings by @Viicos in #11246
  • Only compute normalized decimal places if necessary in decimal_places_validator by @misrasaurabh1 in #11281
  • Fix two misplaced sentences in validation errors documentation by @ananiavito in #11302
  • Fix mkdocstrings inventory example in documentation by @pawamoy in #11311
  • Add support for validation_alias in the mypy plugin by @Viicos in #11295
  • Do not transform model serializer functions as class methods in the mypy plugin by @Viicos in #11298
  • Simplify GenerateJsonSchema.literal_schema() implementation by @misrasaurabh1 in #11321
  • Add additional allowed schemes for ClickHouseDsn by @Maze21127 in #11319
  • Coerce decimal constraints to Decimal instances by @Viicos in #11350
  • Fix ValueError on year zero by @davidhewitt in pydantic-core#1583

New Contributors

  • @FyZzyss made their first contribution in #10789
  • @tamird made their first contribution in #10948
  • @felixxm made their first contribution in #11077
  • @alexprabhat99 made their first contribution in #11082
  • @Kharianne made their first contribution in #11111
  • @mdaffad made their first contribution in #11177
  • @thejcannon made their first contribution in #11014
  • @thomasfrimannkoren made their first contribution in #11251
  • @usernameMAI made their first contribution in #11275
  • @ananiavito made their first contribution in #11302
  • @pawamoy made their first contribution in #11311
  • @Maze21127 made their first contribution in #11319

- Python
Published by Viicos over 1 year ago

pydantic - v2.10.6 2025-01-23

What's Changed

Fixes

  • Fix JSON Schema reference collection with 'examples' keys by @Viicos in #11325
  • Fix url python serialization by @sydney-runkle in #11331

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.10.5...v2.10.6

- Python
Published by sydney-runkle over 1 year ago

pydantic - v2.10.5 2024-12-18

What's Changed

Fixes

  • Remove custom MRO implementation of Pydantic models by @Viicos in #11184
  • Fix URL serialization for unions by @sydney-runkle in #11233

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.10.4...v2.10.5

- Python
Published by Viicos over 1 year ago

pydantic - v1.10.20 2025-01-07

What's Changed

This release provides proper support for Python 3.13, with (Cythonized) wheels published for this version. As a consequence, Cython was updated from 0.29.x to 3.0.x.

  • General maintenance of CI and build ecosystem by @Viicos in https://github.com/pydantic/pydantic/pull/10847
    • Update Cython to 3.0.x.
    • Properly address Python 3.13 deprecation warnings.
    • Migrate packaging to pyproject.toml, make use of PEP 517 build options.
    • Use build instead of direct setup.py invocations.
    • Update various Github Actions versions.
  • Replace outdated stpmex link in documentation by @jaredenorris in https://github.com/pydantic/pydantic/pull/10997

New Contributors

  • @jaredenorris made their first contribution in https://github.com/pydantic/pydantic/pull/10997

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.19...v1.10.20

- Python
Published by Viicos over 1 year ago

pydantic - v2.10.4 2024-12-18

What's Changed

Packaging

  • Bump pydantic-core to v2.27.2 by @davidhewitt in #11138

Fixes

  • Fix for comparison of AnyUrl objects by @alexprabhat99 in #11082
  • Properly fetch PEP 695 type params for functions, do not fetch annotations from signature by @Viicos in #11093
  • Include JSON Schema input core schema in function schemas by @Viicos in #11085
  • Add len to _BaseUrl to avoid TypeError by @Kharianne in #11111
  • Make sure the type reference is removed from the seen references by @Viicos in #11143

New Contributors

  • @alexprabhat99 made their first contribution in #11082
  • @Kharianne made their first contribution in #11111

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.10.3...v2.10.4

- Python
Published by sydney-runkle over 1 year ago

pydantic - v2.10.3 2024-12-03

What's Changed

Fixes

  • Set fields when defer_build is set on Pydantic dataclasses by @Viicos in #10984
  • Do not resolve the JSON Schema reference for dict core schema keys by @Viicos in #10989
  • Use the globals of the function when evaluating the return type for PlainSerializer and WrapSerializer functions by @Viicos in #11008
  • Fix host required enforcement for urls to be compatible with v2.9 behavior by @sydney-runkle in #11027
  • Add a default_factory_takes_validated_data property to FieldInfo by @Viicos in #11034
  • Fix url json schema in serialization mode by @sydney-runkle in #11035

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.10.2...v2.10.3

- Python
Published by sydney-runkle over 1 year ago

pydantic - v2.10.2 2024-11-26

What's Changed

Fixes

  • Only evaluate FieldInfo annotations if required during schema building by @Viicos in #10769
  • Do not evaluate annotations for private fields by @Viicos in #10962
  • Support serialization as any for Secret types and Url types by @sydney-runkle in #10947
  • Fix type hint of Field.default to be compatible with Python 3.8 and 3.9 by @Viicos in #10972
  • Add hashing support for URL types by @sydney-runkle in #10975
  • Hide BaseModel.__replace__ definition from type checkers by @Viicos in 10979

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.10.1...v2.10.2

- Python
Published by sydney-runkle over 1 year ago

pydantic - v2.10.1 2024-11-21

What's Changed

Packaging

  • Bump pydantic-core version to v2.27.1 by @sydney-runkle in #10938

Fixes

  • Use the correct frame when instantiating a parametrized TypeAdapter by @Viicos in #10893
  • Relax check for validated data in default_factory utils by @sydney-runkle in #10909
  • Fix type checking issue with model_fields and model_computed_fields by @sydney-runkle in #10911
  • Use the parent configuration during schema generation for stdlib dataclasses by @sydney-runkle in #10928
  • Use the globals of the function when evaluating the return type of serializers and computed_fields by @Viicos in #10929
  • Fix URL constraint application by @sydney-runkle in #10922
  • Fix URL equality with different validation methods by @sydney-runkle in #10934
  • Fix JSON schema title when specified as '' by @sydney-runkle in #10936
  • Fix python mode serialization for complex inference by @sydney-runkle in pydantic-core#1549

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.10.0...v2.10.1

- Python
Published by sydney-runkle over 1 year ago

pydantic - v2.10.0 2024-11-20

The code released in v2.10.0 is practically identical to that of v2.10.0b2. See the v2.10 release blog post for the highlights!

What's Changed

Packaging

  • Bump pydantic-core to v2.27.0 by @sydney-runkle in #10825
  • Replaced pdm with uv by @frfahim in #10727

New Features

  • Support fractions.Fraction by @sydney-runkle in #10318
  • Support Hashable for json validation by @sydney-runkle in #10324
  • Add a SocketPath type for linux systems by @theunkn0wn1 in #10378
  • Allow arbitrary refs in JSON schema examples by @sydney-runkle in #10417
  • Support defer_build for Pydantic dataclasses by @Viicos in #10313
  • Adding v1 / v2 incompatibility warning for nested v1 model by @sydney-runkle in #10431
  • Add support for unpacked TypedDict to type hint variadic keyword arguments with @validate_call by @Viicos in #10416
  • Support compiled patterns in protected_namespaces by @sydney-runkle in #10522
  • Add support for propertyNames in JSON schema by @FlorianSW in #10478
  • Adding __replace__ protocol for Python 3.13+ support by @sydney-runkle in #10596
  • Expose public sort method for JSON schema generation by @sydney-runkle in #10595
  • Add runtime validation of @validate_call callable argument by @kc0506 in #10627
  • Add experimental_allow_partial support by @samuelcolvin in #10748
  • Support default factories taking validated data as an argument by @Viicos in #10678
  • Allow subclassing ValidationError and PydanticCustomError by @Youssefares in pydantic/pydantic-core#1413
  • Add trailing-strings support to experimental_allow_partial by @sydney-runkle in #10825
  • Add rebuild() method for TypeAdapter and simplify defer_build patterns by @sydney-runkle in #10537
  • Improve TypeAdapter instance repr by @sydney-runkle in #10872

Changes

  • Don't allow customization of SchemaGenerator until interface is more stable by @sydney-runkle in #10303
  • Cleanly defer_build on TypeAdapters, removing experimental flag by @sydney-runkle in #10329
  • Fix mro of generic subclass by @kc0506 in #10100
  • Strip whitespaces on JSON Schema title generation by @sydney-runkle in #10404
  • Use b64decode and b64encode for Base64Bytes type by @sydney-runkle in #10486
  • Relax protected namespace config default by @sydney-runkle in #10441
  • Revalidate parametrized generics if instance's origin is subclass of OG class by @sydney-runkle in #10666
  • Warn if configuration is specified on the @dataclass decorator and with the __pydantic_config__ attribute by @sydney-runkle in #10406
  • Recommend against using Ellipsis (...) with Field by @Viicos in #10661
  • Migrate to subclassing instead of annotated approach for pydantic url types by @sydney-runkle in #10662
  • Change JSON schema generation of Literals and Enums by @Viicos in #10692
  • Simplify unions involving Any or Never when replacing type variables by @Viicos in #10338
  • Do not require padding when decoding base64 bytes by @bschoenmaeckers in pydantic/pydantic-core#1448
  • Support dates all the way to 1BC by @changhc in pydantic/speedate#77

Performance

  • Schema cleaning: skip unnecessary copies during schema walking by @Viicos in #10286
  • Refactor namespace logic for annotations evaluation by @Viicos in #10530
  • Improve email regexp on edge cases by @AlekseyLobanov in #10601
  • CoreMetadata refactor with an emphasis on documentation, schema build time performance, and reducing complexity by @sydney-runkle in #10675

Fixes

  • Remove guarding check on computed_field with field_serializer by @nix010 in #10390
  • Fix Predicate issue in v2.9.0 by @sydney-runkle in #10321
  • Fixing annotated-types bound by @sydney-runkle in #10327
  • Turn tzdata install requirement into optional timezone dependency by @jakob-keller in #10331
  • Use correct types namespace when building namedtuple core schemas by @Viicos in #10337
  • Fix evaluation of stringified annotations during namespace inspection by @Viicos in #10347
  • Fix IncEx type alias definition by @Viicos in #10339
  • Do not error when trying to evaluate annotations of private attributes by @Viicos in #10358
  • Fix nested type statement by @kc0506 in #10369
  • Improve typing of ModelMetaclass.mro by @Viicos in #10372
  • Fix class access of deprecated computed_fields by @Viicos in #10391
  • Make sure inspect.iscoroutinefunction works on coroutines decorated with @validate_call by @MovisLi in #10374
  • Fix NameError when using validate_call with PEP 695 on a class by @kc0506 in #10380
  • Fix ZoneInfo with various invalid types by @sydney-runkle in #10408
  • Fix PydanticUserError on empty model_config with annotations by @cdwilson in #10412
  • Fix variance issue in _IncEx type alias, only allow True by @Viicos in #10414
  • Fix serialization schema generation when using PlainValidator by @Viicos in #10427
  • Fix schema generation error when serialization schema holds references by @Viicos in #10444
  • Inline references if possible when generating schema for json_schema_input_type by @Viicos in #10439
  • Fix recursive arguments in Representation by @Viicos in #10480
  • Fix representation for builtin function types by @kschwab in #10479
  • Add python validators for decimal constraints (max_digits and decimal_places) by @sydney-runkle in #10506
  • Only fetch __pydantic_core_schema__ from the current class during schema generation by @Viicos in #10518
  • Fix stacklevel on deprecation warnings for BaseModel by @sydney-runkle in #10520
  • Fix warning stacklevel in BaseModel.__init__ by @Viicos in #10526
  • Improve error handling for in-evaluable refs for discriminator application by @sydney-runkle in #10440
  • Change the signature of ConfigWrapper.core_config to take the title directly by @Viicos in #10562
  • Do not use the previous config from the stack for dataclasses without config by @Viicos in #10576
  • Fix serialization for IP types with mode='python' by @sydney-runkle in #10594
  • Support constraint application for Base64Etc types by @sydney-runkle in #10584
  • Fix validate_call ignoring Field in Annotated by @kc0506 in #10610
  • Raise an error when Self is invalid by @kc0506 in #10609
  • Using core_schema.InvalidSchema instead of metadata injection + checks by @sydney-runkle in #10523
  • Tweak type alias logic by @kc0506 in #10643
  • Support usage of type with typing.Self and type aliases by @kc0506 in #10621
  • Use overloads for Field and PrivateAttr functions by @Viicos in #10651
  • Clean up the mypy plugin implementation by @Viicos in #10669
  • Properly check for typing_extensions variant of TypeAliasType by @Daraan in #10713
  • Allow any mapping in BaseModel.model_copy() by @Viicos in #10751
  • Fix isinstance behavior for urls by @sydney-runkle in #10766
  • Ensure cached_property can be set on Pydantic models by @Viicos in #10774
  • Fix equality checks for primitives in literals by @sydney-runkle in pydantic/pydantic-core#1459
  • Properly enforce host_required for URLs by @Viicos in pydantic/pydantic-core#1488
  • Fix when coerce_numbers_to_str enabled and string has invalid Unicode character by @andrey-berenda in pydantic/pydantic-core#1515
  • Fix serializing complex values in Enums by @changhc in pydantic/pydantic-core#1524
  • Refactor _typing_extra module by @Viicos in #10725
  • Support intuitive equality for urls by @sydney-runkle in #10798
  • Add bytearray to TypeAdapter.validate_json signature by @samuelcolvin in #10802
  • Ensure class access of method descriptors is performed when used as a default with Field by @Viicos in #10816
  • Fix circular import with validate_call by @sydney-runkle in #10807
  • Fix error when using type aliases referencing other type aliases by @Viicos in #10809
  • Fix IncEx type alias to be compatible with mypy by @Viicos in #10813
  • Make __signature__ a lazy property, do not deepcopy defaults by @Viicos in #10818
  • Make __signature__ lazy for dataclasses, too by @sydney-runkle in #10832
  • Subclass all single host url classes from AnyUrl to preserve behavior from v2.9 by @sydney-runkle in #10856

New Contributors

  • @jakob-keller made their first contribution in #10331
  • @MovisLi made their first contribution in #10374
  • @joaopalmeiro made their first contribution in #10405
  • @theunkn0wn1 made their first contribution in #10378
  • @cdwilson made their first contribution in #10412
  • @dlax made their first contribution in #10421
  • @kschwab made their first contribution in #10479
  • @santibreo made their first contribution in #10453
  • @FlorianSW made their first contribution in #10478
  • @tkasuz made their first contribution in #10555
  • @AlekseyLobanov made their first contribution in #10601
  • @NiclasvanEyk made their first contribution in #10667
  • @mschoettle made their first contribution in #10677
  • @Daraan made their first contribution in #10713
  • @k4nar made their first contribution in #10736
  • @UriyaHarpeness made their first contribution in #10740
  • @frfahim made their first contribution in #10727

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.9.2...v2.10.0

- Python
Published by sydney-runkle over 1 year ago

pydantic - v2.10.0b2 2024-11-13

What's Changed

Packaging

  • Replaced pdm with uv by @frfahim in #10727

New Features

  • Add trailing-strings support to experimental_allow_partial by @sydney-runkle in #10825
  • Add rebuild() method for TypeAdapter and simplify defer_build patterns by @sydney-runkle in #10537

Fixes

  • Refactor _typing_extra module by @Viicos in #10725
  • Support intuitive equality for urls by @sydney-runkle in #10798
  • Add bytearray to TypeAdapter.validate_json signature by @samuelcolvin in #10802
  • Ensure class access of method descriptors is performed when used as a default with Field by @Viicos in #10816
  • Fix circular import with validate_call by @sydney-runkle in #10807
  • Fix error when using type aliases referencing other type aliases by @Viicos in #10809
  • Fix IncEx type alias to be compatible with mypy by @Viicos in #10813
  • Make __signature__ a lazy property, do not deepcopy defaults by @Viicos in #10818
  • Make __signature__ lazy for dataclasses, too by @sydney-runkle in #10832

New Contributors

  • @frfahim made their first contribution in #10727

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.10.0b1...v2.10.0b2

- Python
Published by sydney-runkle over 1 year ago

pydantic - v2.10.0b1 (2024-11-06)

What's Changed

Packaging

  • Bump pydantic-core to v2.26.0 by @samuelcolvin in #10748

New Features

  • Support fractions.Fraction by @sydney-runkle in #10318
  • Support Hashable for json validation by @sydney-runkle in #10324
  • Add a SocketPath type for linux systems by @theunkn0wn1 in #10378
  • Allow arbitrary refs in JSON schema examples by @sydney-runkle in #10417
  • Support defer_build for Pydantic dataclasses by @Viicos in #10313
  • Adding v1 / v2 incompatibility warning for nested v1 model by @sydney-runkle in #10431
  • Add support for unpacked TypedDict to type hint variadic keyword arguments with @validate_call by @Viicos in #10416
  • Support compiled patterns in protected_namespaces by @sydney-runkle in #10522
  • Add support for propertyNames in JSON schema by @FlorianSW in #10478
  • Adding __replace__ protocol for Python 3.13+ support by @sydney-runkle in #10596
  • Expose public sort method for JSON schema generation by @sydney-runkle in #10595
  • Add runtime validation of @validate_call callable argument by @kc0506 in #10627
  • Add experimental_allow_partial support by @samuelcolvin in #10748
  • Support default factories taking validated data as an argument by @Viicos in #10678
  • Allow subclassing ValidationError and PydanticCustomError by @Youssefares in pydantic/pydantic-core#1413 - see release blog post for usage details.

Changes

  • Don't allow customization of SchemaGenerator until interface is more stable by @sydney-runkle in #10303
  • Cleanly defer_build on TypeAdapters, removing experimental flag by @sydney-runkle in #10329
  • Fix mro of generic subclass by @kc0506 in #10100
  • Strip whitespaces on JSON Schema title generation by @sydney-runkle in #10404
  • Use b64decode and b64encode for Base64Bytes type by @sydney-runkle in #10486
  • Relax protected namespace config default by @sydney-runkle in #10441 - see release blog post for more details.
  • Revalidate parametrized generics if instance's origin is subclass of OG class by @sydney-runkle in #10666
  • Warn if configuration is specified on the @dataclass decorator and with the __pydantic_config__ attribute by @sydney-runkle in #10406
  • Recommend against using Ellipsis (...) with Field by @Viicos in #10661
  • Migrate to subclassing instead of annotated approach for pydantic url types by @sydney-runkle in #10662
  • Change JSON schema generation of Literals and Enums by @Viicos in #10692
  • Simplify unions involving Any or Never when replacing type variables by @Viicos in #10338
  • Do not require padding when decoding base64 bytes by @bschoenmaeckers in pydantic/pydantic-core#1448
  • Support dates all the way to 1BC by @changhc in pydantic/speedate#77

Performance

  • Schema cleaning: skip unnecessary copies during schema walking by @Viicos in #10286
  • Refactor namespace logic for annotations evaluation by @Viicos in #10530
  • Improve email regexp on edge cases by @AlekseyLobanov in #10601
  • CoreMetadata refactor with an emphasis on documentation, schema build time performance, and reducing complexity by @sydney-runkle in #10675

Fixes

  • Remove guarding check on computed_field with field_serializer by @nix010 in #10390
  • Fix Predicate issue in v2.9.0 by @sydney-runkle in #10321
  • Fixing annotated-types bound by @sydney-runkle in #10327
  • Turn tzdata install requirement into optional timezone dependency by @jakob-keller in #10331
  • Use correct types namespace when building namedtuple core schemas by @Viicos in #10337
  • Fix evaluation of stringified annotations during namespace inspection by @Viicos in #10347
  • Fix IncEx type alias definition by @Viicos in #10339
  • Do not error when trying to evaluate annotations of private attributes by @Viicos in #10358
  • Fix nested type statement by @kc0506 in #10369
  • Improve typing of ModelMetaclass.mro by @Viicos in #10372
  • Fix class access of deprecated computed_fields by @Viicos in #10391
  • Make sure inspect.iscoroutinefunction works on coroutines decorated with @validate_call by @MovisLi in #10374
  • Fix NameError when using validate_call with PEP 695 on a class by @kc0506 in #10380
  • Fix ZoneInfo with various invalid types by @sydney-runkle in #10408
  • Fix PydanticUserError on empty model_config with annotations by @cdwilson in #10412
  • Fix variance issue in _IncEx type alias, only allow True by @Viicos in #10414
  • Fix serialization schema generation when using PlainValidator by @Viicos in #10427
  • Fix schema generation error when serialization schema holds references by @Viicos in #10444
  • Inline references if possible when generating schema for json_schema_input_type by @Viicos in #10439
  • Fix recursive arguments in Representation by @Viicos in #10480
  • Fix representation for builtin function types by @kschwab in #10479
  • Add python validators for decimal constraints (max_digits and decimal_places) by @sydney-runkle in #10506
  • Only fetch __pydantic_core_schema__ from the current class during schema generation by @Viicos in #10518
  • Fix stacklevel on deprecation warnings for BaseModel by @sydney-runkle in #10520
  • Fix warning stacklevel in BaseModel.__init__ by @Viicos in #10526
  • Improve error handling for in-evaluable refs for discriminator application by @sydney-runkle in #10440
  • Change the signature of ConfigWrapper.core_config to take the title directly by @Viicos in #10562
  • Do not use the previous config from the stack for dataclasses without config by @Viicos in #10576
  • Fix serialization for IP types with mode='python' by @sydney-runkle in #10594
  • Support constraint application for Base64Etc types by @sydney-runkle in #10584
  • Fix validate_call ignoring Field in Annotated by @kc0506 in #10610
  • Raise an error when Self is invalid by @kc0506 in #10609
  • Using core_schema.InvalidSchema instead of metadata injection + checks by @sydney-runkle in #10523
  • Tweak type alias logic by @kc0506 in #10643
  • Support usage of type with typing.Self and type aliases by @kc0506 in #10621
  • Use overloads for Field and PrivateAttr functions by @Viicos in #10651
  • Clean up the mypy plugin implementation by @Viicos in #10669
  • Properly check for typing_extensions variant of TypeAliasType by @Daraan in #10713
  • Allow any mapping in BaseModel.model_copy() by @Viicos in #10751
  • Fix isinstance behavior for urls by @sydney-runkle in #10766
  • Ensure cached_property can be set on Pydantic models by @Viicos in #10774
  • Fix equality checks for primitives in literals by @sydney-runkle in pydantic/pydantic-core#1459
  • Properly enforce host_required for URLs by @Viicos in pydantic/pydantic-core#1488
  • Fix when coerce_numbers_to_str enabled and string has invalid Unicode character by @andrey-berenda in pydantic/pydantic-core#1515
  • Fix serializing complex values in Enums by @changhc in pydantic/pydantic-core#1524

New Contributors

  • @jakob-keller made their first contribution in #10331
  • @MovisLi made their first contribution in #10374
  • @joaopalmeiro made their first contribution in #10405
  • @theunkn0wn1 made their first contribution in #10378
  • @cdwilson made their first contribution in #10412
  • @dlax made their first contribution in #10421
  • @kschwab made their first contribution in #10479
  • @santibreo made their first contribution in #10453
  • @FlorianSW made their first contribution in #10478
  • @tkasuz made their first contribution in #10555
  • @AlekseyLobanov made their first contribution in #10601
  • @NiclasvanEyk made their first contribution in #10667
  • @mschoettle made their first contribution in #10677
  • @Daraan made their first contribution in #10713
  • @k4nar made their first contribution in #10736
  • @UriyaHarpeness made their first contribution in #10740

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.9.2...v2.10.0b1

- Python
Published by sydney-runkle over 1 year ago

pydantic - v1.10.19 (2024-11-06)

What's Changed

  • Add warning when v2 model is nested in v1 model by @sydney-runkle in https://github.com/pydantic/pydantic/pull/10432
  • Fix deprecation warning in V1 isinstance check by @alicederyn in https://github.com/pydantic/pydantic/pull/10645

- Python
Published by sydney-runkle over 1 year ago

pydantic - v2.9.2 (2024-09-17)

What's Changed

Fixes

  • Do not error when trying to evaluate annotations of private attributes by @Viicos in #10358
  • Adding notes on designing sound Callable discriminators by @sydney-runkle in #10400
  • Fix serialization schema generation when using PlainValidator by @Viicos in #10427
  • Fix Union serialization warnings by @sydney-runkle in pydantic/pydantic-core#1449
  • Fix variance issue in _IncEx type alias, only allow True by @Viicos in #10414
  • Fix ZoneInfo validation with various invalid types by @sydney-runkle in #10408

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.9.1...v2.9.2

- Python
Published by sydney-runkle over 1 year ago

pydantic - v2.9.1 (2024-09-09)

What's Changed

Fixes

  • Fix Predicate issue in v2.9.0 by @sydney-runkle in #10321
  • Fixing annotated-types bound to >=0.6.0 by @sydney-runkle in #10327
  • Turn tzdata install requirement into optional timezone dependency by @jakob-keller in #10331
  • Fix IncExc type alias definition by @Viicos in #10339
  • Use correct types namespace when building namedtuple core schemas by @Viicos in #10337
  • Fix evaluation of stringified annotations during namespace inspection by @Viicos in #10347
  • Fix tagged union serialization with alias generators by @sydney-runkle in pydantic/pydantic-core#1442

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.9.0...v2.9.1

- Python
Published by sydney-runkle over 1 year ago

pydantic - v2.9.0 (2024-09-05)

The code released in v2.9.0 is practically identical to that of v2.9.0b2.

Check out our blog post to learn more about the release highlights!

What's Changed

Packaging

  • Bump ruff to v0.5.0 and pyright to v1.1.369 by @sydney-runkle in #9801
  • Bump pydantic-extra-types to v2.9.0 by @sydney-runkle in #9832
  • Support compatibility with pdm v2.18.1 by @Viicos in #10138
  • Bump v1 version stub to v1.10.18 by @sydney-runkle in #10214
  • Bump pydantic-core to v2.23.2 by @sydney-runkle in #10311

New Features

  • Add support for ZoneInfo by @Youssefares in #9896
  • Add Config.val_json_bytes by @josh-newman in #9770
  • Add DSN for Snowflake by @aditkumar72 in #10128
  • Support complex number by @changhc in #9654
  • Add support for annotated_types.Not by @aditkumar72 in #10210
  • Allow WithJsonSchema to inject $refs w/ http or https links by @dAIsySHEng1 in #9863
  • Allow validators to customize validation JSON schema by @Viicos in #10094
  • Support parametrized PathLike types by @nix010 in #9764
  • Add tagged union serializer that attempts to use str or callable discriminators to select the correct serializer by @sydney-runkle in in pydantic/pydantic-core#1397

Changes

  • Breaking Change: Merge dict type json_schema_extra by @sydney-runkle in #9792
    • For more info (how to replicate old behavior) on this change, see here
  • Refactor annotation injection for known (often generic) types by @sydney-runkle in #9979
  • Move annotation compatibility errors to validation phase by @sydney-runkle in #9999
  • Improve runtime errors for string constraints like pattern for incompatible types by @sydney-runkle in #10158
  • Remove 'allOf' JSON schema workarounds by @dpeachey in #10029
  • Remove typed_dict_cls data from CoreMetadata by @sydney-runkle in #10180
  • Deprecate passing a dict to the Examples class by @Viicos in #10181
  • Remove initial_metadata from internal metadata construct by @sydney-runkle in #10194
  • Use re.Pattern.search instead of re.Pattern.match for consistency with rust behavior by @tinez in pydantic/pydantic-core#1368
  • Show value of wrongly typed data in pydantic-core serialization warning by @BoxyUwU in pydantic/pydantic-core#1377
  • Breaking Change: in pydantic-core, change metadata type hint in core schemas from Any -> Dict[str, Any] | None by @sydney-runkle in pydantic/pydantic-core#1411
  • Raise helpful warning when self isn't returned from model validator by @sydney-runkle in #10255

Performance

  • Initial start at improving import times for modules, using caching primarily by @sydney-runkle in #10009
  • Using cached internal import for BaseModel by @sydney-runkle in #10013
  • Simplify internal generics logic - remove generator overhead by @sydney-runkle in #10059
  • Remove default module globals from types namespace by @sydney-runkle in #10123
  • Performance boost: skip caching parent namespaces in most cases by @sydney-runkle in #10113
  • Update ns stack with already copied ns by @sydney-runkle in #10267

Minor Internal Improvements

  • ⚡️ Speed up multiple_of_validator() by 31% in pydantic/_internal/_validators.py by @misrasaurabh1 in #9839
  • ⚡️ Speed up ModelPrivateAttr.__set_name__() by 18% in pydantic/fields.py by @misrasaurabh1 in #9841
  • ⚡️ Speed up dataclass() by 7% in pydantic/dataclasses.py by @misrasaurabh1 in #9843
  • ⚡️ Speed up function _field_name_for_signature by 37% in pydantic/_internal/_signature.py by @misrasaurabh1 in #9951
  • ⚡️ Speed up method GenerateSchema._unpack_refs_defs by 26% in pydantic/_internal/_generate_schema.py by @misrasaurabh1 in #9949
  • ⚡️ Speed up function apply_each_item_validators by 100% in pydantic/_internal/_generate_schema.py by @misrasaurabh1 in #9950
  • ⚡️ Speed up method ConfigWrapper.core_config by 28% in pydantic/_internal/_config.py by @misrasaurabh1 in #9953

Fixes

  • Respect use_enum_values on Literal types by @kwint in #9787
  • Prevent type error for exotic BaseModel/RootModel inheritance by @dmontagu in #9913
  • Fix typing issue with field_validator-decorated methods by @dmontagu in #9914
  • Replace str type annotation with Any in validator factories in documentation on validators by @maximilianfellhuber in #9885
  • Fix ComputedFieldInfo.wrapped_property pointer when a property setter is assigned by @tlambert03 in #9892
  • Fix recursive typing of main.IncEnx by @tlambert03 in #9924
  • Allow usage of type[Annotated[...]] by @Viicos in #9932
  • mypy plugin: handle frozen fields on a per-field basis by @dmontagu in #9935
  • Fix typo in invalid-annotated-type error code by @sydney-runkle in #9948
  • Simplify schema generation for uuid, url, and ip types by @sydney-runkle in #9975
  • Move date schemas to _generate_schema.py by @sydney-runkle in #9976
  • Move decimal.Decimal validation to _generate_schema.py by @sydney-runkle in #9977
  • Simplify IP address schema in _std_types_schema.py by @sydney-runkle in #9959
  • Fix type annotations for some potentially generic GenerateSchema.match_type options by @sydney-runkle in #9961
  • Add class name to "has conflict" warnings by @msabramo in #9964
  • Fix dataclass ignoring default_factory passed in Annotated by @kc0506 in #9971
  • Fix Sequence ignoring discriminator by @kc0506 in #9980
  • Fix typing for IPvAnyAddress and IPvAnyInterface by @haoyun in #9990
  • Fix false positives on v1 models in mypy plugin for from_orm check requiring from_attributes=True config by @radekwlsk in #9938
  • Apply strict=True to __init__ in mypy plugin by @kc0506 in #9998
  • Refactor application of deque annotations by @sydney-runkle in #10018
  • Raise a better user error when failing to evaluate a forward reference by @Viicos in #10030
  • Fix evaluation of __pydantic_extra__ annotation in specific circumstances by @Viicos in #10070
  • Fix frozen enforcement for dataclasses by @sydney-runkle in #10066
  • Remove logic to handle unused __get_pydantic_core_schema__ signature by @Viicos in #10075
  • Use is_annotated consistently by @Viicos in #10095
  • Fix PydanticDeprecatedSince26 typo by @kc0506 in #10101
  • Improve pyright tests, refactor model decorators signatures by @Viicos in #10092
  • Fix ip serialization logic by @sydney-runkle in #10112
  • Warn when frozen defined twice for dataclasses by @mochi22 in #10082
  • Do not compute JSON Schema default when plain serializers are used with when_used set to 'json-unless-none' and the default value is None by @Viicos in #10121
  • Fix ImportString special cases by @sydney-runkle in #10137
  • Blacklist default globals to support exotic user code with __ prefixed annotations by @sydney-runkle in #10136
  • Handle nullable schemas with serialization schema available during JSON Schema generation by @Viicos in #10132
  • Reorganize BaseModel annotations by @kc0506 in #10110
  • Fix core schema simplification when serialization schemas are involved in specific scenarios by @Viicos in #10155
  • Add support for stringified annotations when using PrivateAttr with Annotated by @Viicos in #10157
  • Fix JSON Schema number type for literal and enum schemas by @Viicos in #10172
  • Fix JSON Schema generation of fields with plain validators in serialization mode by @Viicos in #10167
  • Fix invalid JSON Schemas being generated for functions in certain scenarios by @Viicos in #10188
  • Make sure generated JSON Schemas are valid in tests by @Viicos in #10182
  • Fix key error with custom serializer by @sydney-runkle in #10200
  • Add 'wss' for allowed schemes in NatsDsn by @swelborn in #10224
  • Fix Mapping and MutableMapping annotations to use mapping schema instead of dict schema by @sydney-runkle in #10020
  • Fix JSON Schema generation for constrained dates by @Viicos in #10185
  • Fix discriminated union bug regression when using enums by @kfreezen in pydantic/pydantic-core#1286
  • Fix field_serializer with computed field when using * by @nix010 in pydantic/pydantic-core#1349
  • Try each option in Union serializer before inference by @sydney-runkle in pydantic/pydantic-core#1398
  • Fix float serialization behavior in strict mode by @sydney-runkle in pydantic/pydantic-core#1400
  • Introduce exactness into Decimal validation logic to improve union validation behavior by @sydney-runkle in in pydantic/pydantic-core#1405
  • Fix new warnings assertions to use pytest.warns() by @mgorny in #10241
  • Fix a crash when cleaning the namespace in ModelMetaclass by @Viicos in #10242
  • Fix parent namespace issue with model rebuilds by @sydney-runkle in #10257
  • Remove defaults filter for namespace by @sydney-runkle in #10261
  • Use identity instead of equality after validating model in __init__ by @Viicos in #10264
  • Support BigInt serialization for int subclasses by @kxx317 in pydantic/pydantic-core#1417
  • Support signature for wrap validators without info by @sydney-runkle in #10277
  • Ensure __pydantic_complete__ is set when rebuilding dataclasses by @Viicos in #10291
  • Respect schema_generator config value in TypeAdapter by @sydney-runkle in #10300

New Contributors

pydantic

  • @kwint made their first contribution in #9787
  • @seekinginfiniteloop made their first contribution in #9822
  • @a-alexander made their first contribution in #9848
  • @maximilianfellhuber made their first contribution in #9885
  • @karmaBonfire made their first contribution in #9945
  • @s-rigaud made their first contribution in #9958
  • @msabramo made their first contribution in #9964
  • @DimaCybr made their first contribution in #9972
  • @kc0506 made their first contribution in #9971
  • @haoyun made their first contribution in #9990
  • @radekwlsk made their first contribution in #9938
  • @dpeachey made their first contribution in #10029
  • @BoxyUwU made their first contribution in #10085
  • @mochi22 made their first contribution in #10082
  • @aditkumar72 made their first contribution in #10128
  • @changhc made their first contribution in #9654
  • @insumanth made their first contribution in #10229
  • @AdolfoVillalobos made their first contribution in #10240
  • @bllchmbrs made their first contribution in #10270

pydantic-core

- Python
Published by sydney-runkle over 1 year ago

pydantic - v2.9.0b2 (2024-08-30)

What's Changed

Packaging

  • Bump pydantic-core to v2.23.1 and other minor version bumps by @sydney-runkle in #10269

Changes

  • Raise helpful warning when self isn't returned from model validator by @sydney-runkle in #10255

Performance

  • Update namespace stack with already copied namespace by @sydney-runkle in #10267

Fixes

  • Fix new warnings assertions to use pytest.warns() by @mgorny in #10241
  • Fix a crash when cleaning the namespace in ModelMetaclass by @Viicos in #10242
  • Fix parent namespace issue with model rebuilds by @sydney-runkle in #10257
  • Remove defaults filter for namespace by @sydney-runkle in #10261
  • Use identity instead of equality after validating model in __init__ by @Viicos in #10264
  • Support BigInt serialization for int subclasses by @kxx317 in pydantic/pydantic-core#1417

New Contributors

  • @AdolfoVillalobos made their first contribution in #10240
  • @bllchmbrs made their first contribution in #10270

- Python
Published by sydney-runkle over 1 year ago

pydantic - v2.9.0b1 (2024-08-26)

What's Changed

Packaging

  • Bump ruff to v0.5.0 and pyright to v1.1.369 by @sydney-runkle in #9801
  • Bump pydantic-extra-types to v2.9.0 by @sydney-runkle in #9832
  • Support compatibility with pdm v2.18.1 by @Viicos in #10138
  • Bump pydantic-core to v2.23.0 by @sydney-runkle in #10180
  • Bump v1 version stub to v1.10.18 by @sydney-runkle in #10214

New Features

  • Add support for ZoneInfo by @Youssefares in #9896
  • Add Config.val_json_bytes by @josh-newman in #9770
  • Add DSN for Snowflake by @aditkumar72 in #10128
  • Support complex number by @changhc in #9654
  • Add support for annotated_types.Not by @aditkumar72 in #10210
  • Allow WithJsonSchema to inject $refs w/ http or https links by @dAIsySHEng1 in #9863
  • Allow validators to customize validation JSON schema by @Viicos in #10094
  • Support parametrized PathLike types by @nix010 in #9764
  • Add tagged union serializer that attempts to use str or callable discriminators to select the correct serializer by @sydney-runkle in in pydantic/pydantic-core#1397

Changes

  • Breaking Change: Merge dict type json_schema_extra by @sydney-runkle in #9792
    • For more info (how to replicate old behavior) on this change, see here
  • Refactor annotation injection for known (often generic) types by @sydney-runkle in #9979
  • Move annotation compatibility errors to validation phase by @sydney-runkle in #9999
  • Improve runtime errors for string constraints like pattern for incompatible types by @sydney-runkle in #10158
  • Remove 'allOf' JSON schema workarounds by @dpeachey in #10029
  • Remove typed_dict_cls data from CoreMetadata by @sydney-runkle in #10180
  • Deprecate passing a dict to the Examples class by @Viicos in #10181
  • Remove initial_metadata from internal metadata construct by @sydney-runkle in #10194
  • Use re.Pattern.search instead of re.Pattern.match for consistency with rust behavior by @tinez in pydantic/pydantic-core#1368
  • Show value of wrongly typed data in pydantic-core serialization warning by @BoxyUwU in pydantic/pydantic-core#1377
  • Breaking Change: in pydantic-core, change metadata type hint in core schemas from Any -> Dict[str, Any] | None by @sydney-runkle in pydantic/pydantic-core#1411

Performance

  • Initial start at improving import times for modules, using caching primarily by @sydney-runkle in #10009
  • Using cached internal import for BaseModel by @sydney-runkle in #10013
  • Simplify internal generics logic - remove generator overhead by @sydney-runkle in #10059
  • Remove default module globals from types namespace by @sydney-runkle in #10123
  • Performance boost: skip caching parent namespaces in most cases by @sydney-runkle in #10113

Minor Internal Improvements

  • ⚡️ Speed up multiple_of_validator() by 31% in pydantic/_internal/_validators.py by @misrasaurabh1 in #9839
  • ⚡️ Speed up ModelPrivateAttr.__set_name__() by 18% in pydantic/fields.py by @misrasaurabh1 in #9841
  • ⚡️ Speed up dataclass() by 7% in pydantic/dataclasses.py by @misrasaurabh1 in #9843
  • ⚡️ Speed up function _field_name_for_signature by 37% in pydantic/_internal/_signature.py by @misrasaurabh1 in #9951
  • ⚡️ Speed up method GenerateSchema._unpack_refs_defs by 26% in pydantic/_internal/_generate_schema.py by @misrasaurabh1 in #9949
  • ⚡️ Speed up function apply_each_item_validators by 100% in pydantic/_internal/_generate_schema.py by @misrasaurabh1 in #9950
  • ⚡️ Speed up method ConfigWrapper.core_config by 28% in pydantic/_internal/_config.py by @misrasaurabh1 in #9953

Fixes

  • Respect use_enum_values on Literal types by @kwint in #9787
  • Prevent type error for exotic BaseModel/RootModel inheritance by @dmontagu in #9913
  • Fix typing issue with field_validator-decorated methods by @dmontagu in #9914
  • Replace str type annotation with Any in validator factories in documentation on validators by @maximilianfellhuber in #9885
  • Fix ComputedFieldInfo.wrapped_property pointer when a property setter is assigned by @tlambert03 in #9892
  • Fix recursive typing of main.IncEnx by @tlambert03 in #9924
  • Allow usage of type[Annotated[...]] by @Viicos in #9932
  • mypy plugin: handle frozen fields on a per-field basis by @dmontagu in #9935
  • Fix typo in invalid-annotated-type error code by @sydney-runkle in #9948
  • Simplify schema generation for uuid, url, and ip types by @sydney-runkle in #9975
  • Move date schemas to _generate_schema.py by @sydney-runkle in #9976
  • Move decimal.Decimal validation to _generate_schema.py by @sydney-runkle in #9977
  • Simplify IP address schema in _std_types_schema.py by @sydney-runkle in #9959
  • Fix type annotations for some potentially generic GenerateSchema.match_type options by @sydney-runkle in #9961
  • Add class name to "has conflict" warnings by @msabramo in #9964
  • Fix dataclass ignoring default_factory passed in Annotated by @kc0506 in #9971
  • Fix Sequence ignoring discriminator by @kc0506 in #9980
  • Fix typing for IPvAnyAddress and IPvAnyInterface by @haoyun in #9990
  • Fix false positives on v1 models in mypy plugin for from_orm check requiring from_attributes=True config by @radekwlsk in #9938
  • Apply strict=True to __init__ in mypy plugin by @kc0506 in #9998
  • Refactor application of deque annotations by @sydney-runkle in #10018
  • Raise a better user error when failing to evaluate a forward reference by @Viicos in #10030
  • Fix evaluation of __pydantic_extra__ annotation in specific circumstances by @Viicos in #10070
  • Fix frozen enforcement for dataclasses by @sydney-runkle in #10066
  • Remove logic to handle unused __get_pydantic_core_schema__ signature by @Viicos in #10075
  • Use is_annotated consistently by @Viicos in #10095
  • Fix PydanticDeprecatedSince26 typo by @kc0506 in #10101
  • Improve pyright tests, refactor model decorators signatures by @Viicos in #10092
  • Fix ip serialization logic by @sydney-runkle in #10112
  • Warn when frozen defined twice for dataclasses by @mochi22 in #10082
  • Do not compute JSON Schema default when plain serializers are used with when_used set to 'json-unless-none' and the default value is None by @Viicos in #10121
  • Fix ImportString special cases by @sydney-runkle in #10137
  • Blacklist default globals to support exotic user code with __ prefixed annotations by @sydney-runkle in #10136
  • Handle nullable schemas with serialization schema available during JSON Schema generation by @Viicos in #10132
  • Reorganize BaseModel annotations by @kc0506 in #10110
  • Fix core schema simplification when serialization schemas are involved in specific scenarios by @Viicos in #10155
  • Add support for stringified annotations when using PrivateAttr with Annotated by @Viicos in #10157
  • Fix JSON Schema number type for literal and enum schemas by @Viicos in #10172
  • Fix JSON Schema generation of fields with plain validators in serialization mode by @Viicos in #10167
  • Fix invalid JSON Schemas being generated for functions in certain scenarios by @Viicos in #10188
  • Make sure generated JSON Schemas are valid in tests by @Viicos in #10182
  • Fix key error with custom serializer by @sydney-runkle in #10200
  • Add 'wss' for allowed schemes in NatsDsn by @swelborn in #10224
  • Fix Mapping and MutableMapping annotations to use mapping schema instead of dict schema by @sydney-runkle in #10020
  • Fix JSON Schema generation for constrained dates by @Viicos in #10185
  • Fix discriminated union bug regression when using enums by @kfreezen in pydantic/pydantic-core#1286
  • Fix field_serializer with computed field when using * by @nix010 in pydantic/pydantic-core#1349
  • Try each option in Union serializer before inference by @sydney-runkle in pydantic/pydantic-core#1398
  • Fix float serialization behavior in strict mode by @sydney-runkle in pydantic/pydantic-core#1400
  • Introduce exactness into Decimal validation logic to improve union validation behavior by @sydney-runkle in in pydantic/pydantic-core#1405

New Contributors

pydantic

  • @kwint made their first contribution in #9787
  • @seekinginfiniteloop made their first contribution in #9822
  • @a-alexander made their first contribution in #9848
  • @maximilianfellhuber made their first contribution in #9885
  • @karmaBonfire made their first contribution in #9945
  • @s-rigaud made their first contribution in #9958
  • @msabramo made their first contribution in #9964
  • @DimaCybr made their first contribution in #9972
  • @kc0506 made their first contribution in #9971
  • @haoyun made their first contribution in #9990
  • @radekwlsk made their first contribution in #9938
  • @dpeachey made their first contribution in #10029
  • @BoxyUwU made their first contribution in #10085
  • @mochi22 made their first contribution in #10082
  • @aditkumar72 made their first contribution in #10128
  • @changhc made their first contribution in #9654
  • @insumanth made their first contribution in #10229

pydantic-core

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.8.1...v2.8.2

- Python
Published by sydney-runkle almost 2 years ago

pydantic - v1.10.18 (2024-08-22)

What's Changed

Fixes

  • Eval type fix in V1 by @sydney-runkle in https://github.com/pydantic/pydantic/pull/9751
  • Add to_lower_camel to __all__ in utils.py by @sydney-runkle (direct commit)
  • Fix mypy v1 plugin for mypy 1.11 release by @flaeppe in https://github.com/pydantic/pydantic/pull/10139
  • Fix discriminator key used when discriminator has alias and .schema(by_alias=False) by @exs-dwoodward in https://github.com/pydantic/pydantic/pull/10146

New Contributors

  • @flaeppe made their first contribution in https://github.com/pydantic/pydantic/pull/10139

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.17...v1.10.18

- Python
Published by sydney-runkle almost 2 years ago

pydantic - v2.8.2 (2024-07-03)

What's Changed

Fixes

  • Fix issue with assertion caused by pluggable schema validator by @dmontagu in #9838

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.8.1...v2.8.2

- Python
Published by sydney-runkle almost 2 years ago

pydantic - v2.8.1 (2024-07-03)

What's Changed

Packaging

  • Bump ruff to v0.5.0 and pyright to v1.1.369 by @sydney-runkle in #9801
  • Bump pydantic-core to v2.20.1, pydantic-extra-types to v2.9.0 by @sydney-runkle in #9832

Fixes

  • Fix breaking change in to_snake from v2.7 -> v2.8 by @sydney-runkle in #9812
  • Fix list constraint json schema application by @sydney-runkle in #9818
  • Support time duration more than 23 by @nix010 in pydantic/speedate#64
  • Fix millisecond fraction being handled with the wrong scale by @davidhewitt in pydantic/speedate#65
  • Handle negative fractional durations correctly by @sydney-runkle in pydantic/speedate#71

New Contributors

  • @kwint made their first contribution in https://github.com/pydantic/pydantic/pull/9787
  • @seekinginfiniteloop made their first contribution in https://github.com/pydantic/pydantic/pull/9822

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.8.0...v2.8.1

- Python
Published by sydney-runkle almost 2 years ago

pydantic - v2.8.0 (2024-07-01)

The code released in v2.8.0 is functionally identical to that of v2.8.0b1.

Check out our blog post to learn more about the release highlights!

What's Changed

Packaging

  • Update citation version automatically with new releases by @sydney-runkle in #9673
  • Bump pyright to v1.1.367 and add type checking tests for pipeline API by @adriangb in #9674
  • Update pydantic.v1 stub to v1.10.17 by @sydney-runkle in #9707
  • General package updates to prep for v2.8.0b1 by @sydney-runkle in #9741
  • Bump pydantic-core to v2.20.0 by @sydney-runkle in #9745
  • Add support for Python 3.13 by @sydney-runkle in #9743
  • Update pdm version used for pdm.lock to v2.16.1 by @sydney-runkle in #9761
  • Update to ruff v0.4.8 by @Viicos in #9585

New Features

  • Experimental: support defer_build for TypeAdapter by @MarkusSintonen in #8939
  • Implement deprecated field in json schema by @NeevCohen in #9298
  • Experimental: Add pipeline API by @adriangb in #9459
  • Add support for programmatic title generation by @NeevCohen in #9183
  • Implement fail_fast feature by @uriyyo in #9708
  • Add ser_json_inf_nan='strings' mode to produce valid JSON by @josh-newman in pydantic/pydantic-core#1307

Changes

  • Add warning when "alias" is set in ignored Annotated field by @nix010 in #9170
  • Support serialization of some serializable defaults in JSON schema by @sydney-runkle in #9624
  • Relax type specification for __validators__ values in create_model by @sydney-runkle in #9697
  • Breaking Change: Improve smart union matching logic by @sydney-runkle in pydantic/pydantic-core#1322 You can read more about our smart union matching logic here. In some cases, if the old behavior is desired, you can switch to left-to-right mode and change the order of your Union members.

Performance

Internal Improvements

  • ⚡️ Speed up _display_error_loc() by 25% in pydantic/v1/error_wrappers.py by @misrasaurabh1 in #9653
  • ⚡️ Speed up _get_all_json_refs() by 34% in pydantic/json_schema.py by @misrasaurabh1 in #9650
  • ⚡️ Speed up is_pydantic_dataclass() by 41% in pydantic/dataclasses.py by @misrasaurabh1 in #9652
  • ⚡️ Speed up to_snake() by 27% in pydantic/alias_generators.py by @misrasaurabh1 in #9747
  • ⚡️ Speed up unwrap_wrapped_function() by 93% in pydantic/_internal/_decorators.py by @misrasaurabh1 in #9727

Fixes

  • Replace __spec__.parent with __package__ by @hramezani in #9331
  • Fix Outputted Model JSON Schema for Sequence type by @anesmemisevic in #9303
  • Fix typing of _frame_depth by @Viicos in #9353
  • Make ImportString json schema compatible by @amitschang in #9344
  • Hide private attributes (PrivateAttr) from __init__ signature in type checkers by @idan22moral in #9293
  • Make detection of TypeVar defaults robust to the CPython PEP-696 implementation by @AlexWaygood in #9426
  • Fix usage of PlainSerializer with builtin types by @Viicos in #9450
  • Add more robust custom validation examples by @ChrisPappalardo in #9468
  • Fix ignored strict specification for StringConstraint(strict=False) by @vbmendes in #9476
  • Use Self where possible by @Viicos in #9479
  • Do not alter RootModel.model_construct signature in the mypy plugin by @Viicos in #9480
  • Fixed type hint of validation_context by @OhioDschungel6 in #9508
  • Support context being passed to TypeAdapter's dump_json/dump_python by @alexcouper in #9495
  • Updates type signature for Field() constructor by @bjmc in #9484
  • Improve builtin alias generators by @sydney-runkle in #9561
  • Fix typing of TypeAdapter by @Viicos in #9570
  • Add fallback default value for private fields in __setstate__ of BaseModel by @anhpham1509 in #9584
  • Support PEP 746 by @adriangb in #9587
  • Allow validator and serializer functions to have default values by @Viicos in #9478
  • Fix bug with mypy plugin's handling of covariant TypeVar fields by @dmontagu in #9606
  • Fix multiple annotation / constraint application logic by @sydney-runkle in #9623
  • Respect regex flags in validation and json schema by @sydney-runkle in #9591
  • Fix type hint on IpvAnyAddress by @sydney-runkle in #9640
  • Allow a field specifier on __pydantic_extra__ by @dmontagu in #9659
  • Use normalized case for file path comparison by @sydney-runkle in #9737
  • Modify constraint application logic to allow field constraints on Optional[Decimal] by @lazyhope in #9754
  • validate_call type params fix by @sydney-runkle in #9760
  • Check all warnings returned by pytest.warns() by @s-t-e-v-e-n-k in #9702
  • Reuse re.Pattern object in regex patterns to allow for regex flags by @sydney-runkle in pydantic/pydantic-core#1318

New Contributors

  • @idan22moral made their first contribution in #9294
  • @anesmemisevic made their first contribution in #9303
  • @max-muoto made their first contribution in #9338
  • @amitschang made their first contribution in #9344
  • @paulmartin91 made their first contribution in #9410
  • @OhioDschungel6 made their first contribution in #9405
  • @AlexWaygood made their first contribution in #9426
  • @kinuax made their first contribution in #9433
  • @antoni-jamiolkowski made their first contribution in #9431
  • @candleindark made their first contribution in #9448
  • @nix010 made their first contribution in #9170
  • @tomy0000000 made their first contribution in #9457
  • @vbmendes made their first contribution in #9470
  • @micheleAlberto made their first contribution in #9471
  • @ChrisPappalardo made their first contribution in #9468
  • @blueTurtz made their first contribution in #9475
  • @WinterBlue16 made their first contribution in #9477
  • @bittner made their first contribution in #9500
  • @alexcouper made their first contribution in #9495
  • @bjmc made their first contribution in #9484
  • @pjvv made their first contribution in #9529
  • @nedbat made their first contribution in #9530
  • @gunnellEvan made their first contribution in #9469
  • @jaymbans made their first contribution in #9531
  • @MarcBresson made their first contribution in #9534
  • @anhpham1509 made their first contribution in #9584
  • @K-dash made their first contribution in #9595
  • @s-t-e-v-e-n-k made their first contribution in #9527
  • @airwoodix made their first contribution in #9506
  • @misrasaurabh1 made their first contribution in #9653
  • @AlessandroMiola made their first contribution in #9740
  • @mylapallilavanyaa made their first contribution in #9746
  • @lazyhope made their first contribution in #9754
  • @YassinNouh21 made their first contribution in #9759

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.7.4...v2.8.0/

- Python
Published by sydney-runkle almost 2 years ago

pydantic - v2.8.0b1 (2024-06-27)

What's Changed

Packaging

  • Update citation version automatically with new releases by @sydney-runkle in #9673
  • Bump pyright to v1.1.367 and add type checking tests for pipeline API by @adriangb in #9674
  • Update pydantic.v1 stub to v1.10.17 by @sydney-runkle in #9707
  • General package updates to prep for v2.8.0b1 by @sydney-runkle in #9741
  • Bump pydantic-core to v2.20.0 by @sydney-runkle in #9745
  • Add support for Python 3.13 by @sydney-runkle in #9743
  • Update pdm version used for pdm.lock to v2.16.1 by @sydney-runkle in #9761
  • Update to ruff v0.4.8 by @Viicos in #9585

New Features

  • Experimental: support defer_build for TypeAdapter by @MarkusSintonen in #8939
  • Implement deprecated field in json schema by @NeevCohen in #9298
  • Experimental: Add pipeline API by @adriangb in #9459
  • Add support for programmatic title generation by @NeevCohen in #9183
  • Implement fail_fast feature by @uriyyo in #9708
  • Add ser_json_inf_nan='strings' mode to produce valid JSON by @josh-newman in pydantic/pydantic-core#1307

Changes

  • Add warning when "alias" is set in ignored Annotated field by @nix010 in #9170
  • Support serialization of some serializable defaults in JSON schema by @sydney-runkle in #9624
  • Relax type specification for __validators__ values in create_model by @sydney-runkle in #9697
  • Breaking Change: Improve smart union matching logic by @sydney-runkle in pydantic/pydantic-core#1322 You can read more about our smart union matching logic here. In some cases, if the old behavior is desired, you can switch to left-to-right mode and change the order of your Union members.

Performance

Internal Improvements

  • ⚡️ Speed up _display_error_loc() by 25% in pydantic/v1/error_wrappers.py by @misrasaurabh1 in #9653
  • ⚡️ Speed up _get_all_json_refs() by 34% in pydantic/json_schema.py by @misrasaurabh1 in #9650
  • ⚡️ Speed up is_pydantic_dataclass() by 41% in pydantic/dataclasses.py by @misrasaurabh1 in #9652
  • ⚡️ Speed up to_snake() by 27% in pydantic/alias_generators.py by @misrasaurabh1 in #9747
  • ⚡️ Speed up unwrap_wrapped_function() by 93% in pydantic/_internal/_decorators.py by @misrasaurabh1 in #9727

Fixes

  • Replace __spec__.parent with __package__ by @hramezani in #9331
  • Fix Outputted Model JSON Schema for Sequence type by @anesmemisevic in #9303
  • Fix typing of _frame_depth by @Viicos in #9353
  • Make ImportString json schema compatible by @amitschang in #9344
  • Hide private attributes (PrivateAttr) from __init__ signature in type checkers by @idan22moral in #9293
  • Make detection of TypeVar defaults robust to the CPython PEP-696 implementation by @AlexWaygood in #9426
  • Fix usage of PlainSerializer with builtin types by @Viicos in #9450
  • Add more robust custom validation examples by @ChrisPappalardo in #9468
  • Fix ignored strict specification for StringConstraint(strict=False) by @vbmendes in #9476
  • Use Self where possible by @Viicos in #9479
  • Do not alter RootModel.model_construct signature in the mypy plugin by @Viicos in #9480
  • Fixed type hint of validation_context by @OhioDschungel6 in #9508
  • Support context being passed to TypeAdapter's dump_json/dump_python by @alexcouper in #9495
  • Updates type signature for Field() constructor by @bjmc in #9484
  • Improve builtin alias generators by @sydney-runkle in #9561
  • Fix typing of TypeAdapter by @Viicos in #9570
  • Add fallback default value for private fields in __setstate__ of BaseModel by @anhpham1509 in #9584
  • Support PEP 746 by @adriangb in #9587
  • Allow validator and serializer functions to have default values by @Viicos in #9478
  • Fix bug with mypy plugin's handling of covariant TypeVar fields by @dmontagu in #9606
  • Fix multiple annotation / constraint application logic by @sydney-runkle in #9623
  • Respect regex flags in validation and json schema by @sydney-runkle in #9591
  • Fix type hint on IpvAnyAddress by @sydney-runkle in #9640
  • Allow a field specifier on __pydantic_extra__ by @dmontagu in #9659
  • Use normalized case for file path comparison by @sydney-runkle in #9737
  • Modify constraint application logic to allow field constraints on Optional[Decimal] by @lazyhope in #9754
  • validate_call type params fix by @sydney-runkle in #9760
  • Check all warnings returned by pytest.warns() by @s-t-e-v-e-n-k in #9702
  • Reuse re.Pattern object in regex patterns to allow for regex flags by @sydney-runkle in pydantic/pydantic-core#1318

New Contributors

  • @idan22moral made their first contribution in #9294
  • @anesmemisevic made their first contribution in #9303
  • @max-muoto made their first contribution in #9338
  • @amitschang made their first contribution in #9344
  • @paulmartin91 made their first contribution in #9410
  • @OhioDschungel6 made their first contribution in #9405
  • @AlexWaygood made their first contribution in #9426
  • @kinuax made their first contribution in #9433
  • @antoni-jamiolkowski made their first contribution in #9431
  • @candleindark made their first contribution in #9448
  • @nix010 made their first contribution in #9170
  • @tomy0000000 made their first contribution in #9457
  • @vbmendes made their first contribution in #9470
  • @micheleAlberto made their first contribution in #9471
  • @ChrisPappalardo made their first contribution in #9468
  • @blueTurtz made their first contribution in #9475
  • @WinterBlue16 made their first contribution in #9477
  • @bittner made their first contribution in #9500
  • @alexcouper made their first contribution in #9495
  • @bjmc made their first contribution in #9484
  • @pjvv made their first contribution in #9529
  • @nedbat made their first contribution in #9530
  • @gunnellEvan made their first contribution in #9469
  • @jaymbans made their first contribution in #9531
  • @MarcBresson made their first contribution in #9534
  • @anhpham1509 made their first contribution in #9584
  • @K-dash made their first contribution in #9595
  • @s-t-e-v-e-n-k made their first contribution in #9527
  • @airwoodix made their first contribution in #9506
  • @misrasaurabh1 made their first contribution in #9653
  • @AlessandroMiola made their first contribution in #9740
  • @mylapallilavanyaa made their first contribution in #9746
  • @lazyhope made their first contribution in #9754
  • @YassinNouh21 made their first contribution in #9759

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.7.4...v2.8.0b1/

- Python
Published by sydney-runkle almost 2 years ago

pydantic - v1.10.17 (2024-06-20)

What's Changed

  • Advertise Python 3.12 for 1.10.x! Part Deux by @vfazio in https://github.com/pydantic/pydantic/pull/9644
  • Mirrored modules in v1 namespace to fix typing and object resolution in python>3.11 by @exs-dwoodward in https://github.com/pydantic/pydantic/pull/9660
  • setup: remove upper bound from python_requires by @vfazio in https://github.com/pydantic/pydantic/pull/9685

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.16...v1.10.17

- Python
Published by sydney-runkle almost 2 years ago

pydantic - v2.7.4 (2024-06-12)

What's Changed

Packaging

  • Bump pydantic.v1 to v1.10.16 reference by @sydney-runkle in #9639

Fixes

  • Specify recursive_guard as kwarg in FutureRef._evaluate by @vfazio in #9612

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.7.3...v2.7.4

- Python
Published by sydney-runkle almost 2 years ago

pydantic - v1.10.16 (2024-06-11)

What's Changed

  • Import modules/objects directly from v1 namespace by @exs-dwoodward in https://github.com/pydantic/pydantic/pull/9162
  • Fix mypy v1 plugin for upcoming mypy release by @cdce8p in https://github.com/pydantic/pydantic/pull/9586
  • Specify recursive_guard as kwarg in FutureRef._evaluate by @vfazio in https://github.com/pydantic/pydantic/pull/9612

New Contributors

  • @exs-dwoodward made their first contribution in https://github.com/pydantic/pydantic/pull/9162
  • @vfazio made their first contribution in https://github.com/pydantic/pydantic/pull/9612

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.15...v1.10.16

- Python
Published by sydney-runkle almost 2 years ago

pydantic - v2.7.3 (2024-06-03)

What's Changed

Packaging

  • Bump pydantic-core to v2.18.4 by @sydney-runkle in #9550

Fixes

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.7.2...v2.7.3/*

- Python
Published by sydney-runkle almost 2 years ago

pydantic - v2.7.2 (2024-05-28)

What's Changed

Packaging

  • Bump pydantic-core to v2.18.3 by @sydney-runkle in #9515

Fixes

  • Replace __spec__.parent with __package__ by @hramezani in #9331
  • Fix validation of ints with leading unary minus by @RajatRajdeep in pydantic/pydantic-core#1291
  • Fix str subclass validation for enums by @sydney-runkle in [pydantic/pydantic-core#1273]https://github.com/pydantic/pydantic-core/pull/1273
  • Support BigInts in Literals and Enums by @samuelcolvin in [pydantic/pydantic-core#1297]https://github.com/pydantic/pydantic-core/pull/1297
  • Fix: uuid - allow str subclass as input by @davidhewitt in [pydantic/pydantic-core#1296]https://github.com/pydantic/pydantic-core/pull/1296

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.7.1...v2.7.2/

- Python
Published by sydney-runkle about 2 years ago

pydantic - v2.7.1 (2024-04-23)

What's Changed

Packaging

New Features

  • Ftp and Websocket connection strings support by @CherrySuryp in #9205

Changes

  • Use field description for RootModel schema description when there is by @LouisGobert in #9214

Fixes

  • Fix validation_alias behavior with model_construct for AliasChoices and AliasPath by @sydney-runkle in #9223
  • Revert typing.Literal and import it outside the TYPE_CHECKING block by @frost-nzcr4 in #9232
  • Fix Secret serialization schema, applicable for unions by @sydney-runkle in #9240
  • Fix strict application to function-after with use_enum_values by @sydney-runkle in #9279
  • Address case where model_construct on a class which defines model_post_init fails with AttributeError by @babygrimes in #9168
  • Fix model_json_schema with config types by @NeevCohen in #9287
  • Support multiple zeros as an int by @samuelcolvin in pydantic/pydantic-core#1269
  • Fix validation of ints with leading unary plus by @cknv in pydantic/pydantic-core#1272
  • Fix interaction between extra != 'ignore' and from_attributes=True by @davidhewitt in pydantic/pydantic-core#1276
  • Handle error from Enum's missing function as ValidationError by @sydney-runkle in pydantic/pydantic-core#1274
  • Fix memory leak with Iterable validation by @davidhewitt in pydantic/pydantic-core#1271

New Contributors

  • @zzstoatzz made their first contribution in #9219
  • @frost-nzcr4 made their first contribution in #9232
  • @CherrySuryp made their first contribution in #9205
  • @vagenas made their first contribution in #9268
  • @ollz272 made their first contribution in #9262
  • @babygrimes made their first contribution in #9168
  • @swelborn made their first contribution in #9296
  • @kf-novi made their first contribution in #9236
  • @lgeiger made their first contribution in #9288

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.7.0...v2.7.1/

- Python
Published by sydney-runkle about 2 years ago

pydantic - v2.7.0

v2.7.0 (2024-04-11)

The code released in v2.7.0 is practically identical to that of v2.7.0b1.

What's Changed

Packaging

New Features

  • Extract attribute docstrings from FieldInfo.description by @Viicos in #6563
  • Add a with_config decorator to comply with typing spec by @Viicos in #8611
  • Allow an optional separator splitting the value and unit of the result of ByteSize.human_readable by @jks15satoshi in #8706
  • Add generic Secret base type by @conradogarciaberrotaran in #8519
  • Make use of Sphinx inventories for cross references in docs by @Viicos in #8682
  • Add environment variable to disable plugins by @geospackle in #8767
  • Add support for deprecated fields by @Viicos in #8237
  • Allow field_serializer('*') by @ornariece in #9001
  • Handle a case when model_config is defined as a model property by @alexeyt101 in #9004
  • Update create_model() to support typing.Annotated as input by @wannieman98 in #8947
  • Add ClickhouseDsn support by @solidguy7 in #9062
  • Add support for re.Pattern[str] to pattern field by @jag-k in #9053
  • Support for serialize_as_any runtime setting by @sydney-runkle in #8830
  • Add support for typing.Self by @Youssefares in #9023
  • Ability to pass context to serialization by @ornariece in #8965
  • Add feedback widget to docs with flarelytics integration by @sydney-runkle in #9129
  • Support for parsing partial JSON strings in Python by @samuelcolvin in pydantic/jiter#66

Finalized in v2.7.0, rather than v2.7.0b1: * Add support for field level number to str coercion option by @NeevCohen in #9137 * Update warnings parameter for serialization utilities to allow raising a warning by @Lance-Drane in #9166

Changes

  • Correct docs, logic for model_construct behavior with extra by @sydney-runkle in #8807
  • Improve error message for improper RootModel subclasses by @sydney-runkle in #8857
  • Use PEP570 syntax by @Viicos in #8940
  • Add enum and type to the JSON schema for single item literals by @dmontagu in #8944
  • Deprecate update_json_schema internal function by @sydney-runkle in #9125
  • Serialize duration to hour minute second, instead of just seconds by @kakilangit in pydantic/speedate#50
  • Trimming str before parsing to int and float by @hungtsetse in pydantic/pydantic-core#1203

Performance

  • enum validator improvements by @samuelcolvin in #9045
  • Move enum validation and serialization to Rust by @samuelcolvin in #9064
  • Improve schema generation for nested dataclasses by @sydney-runkle in #9114
  • Fast path for ASCII python string creation in JSON by @samuelcolvin in in pydantic/jiter#72
  • SIMD integer and string JSON parsing on aarch64(Note: SIMD on x86 will be implemented in a future release) by @samuelcolvin in in pydantic/jiter#65
  • Support JSON Cow<str> from jiter by @davidhewitt in pydantic/pydantic-core#1231
  • MAJOR performance improvement: update to PyO3 0.21 final by @davidhewitt in pydantic/pydantic-core#1248
  • cache Python strings by @samuelcolvin in pydantic/pydantic-core#1240

Fixes

  • Fix strict parsing for some Sequences by @sydney-runkle in #8614
  • Add a check on the existence of __qualname__ by @anci3ntr0ck in #8642
  • Handle __pydantic_extra__ annotation being a string or inherited by @alexmojaki in #8659
  • Fix json validation for NameEmail by @Holi0317 in #8650
  • Fix type-safety of attribute access in BaseModel by @bluenote10 in #8651
  • Fix bug with mypy plugin and no_strict_optional = True by @dmontagu in #8666
  • Fix ByteSize error type change by @sydney-runkle in #8681
  • Fix inheriting annotations in dataclasses by @sydney-runkle in #8679
  • Fix regression in core schema generation for indirect definition references by @dmontagu in #8702
  • Fix unsupported types bug with plain validator by @sydney-runkle in #8710
  • Reverting problematic fix from 2.6 release, fixing schema building bug by @sydney-runkle in #8718
  • fixes __pydantic_config__ ignored for TypeDict by @13sin in #8734
  • Fix test failures with pytest v8.0.0 due to pytest.warns() starting to work inside pytest.raises() by @mgorny in #8678
  • Use is_valid_field from 1.x for mypy plugin by @DanielNoord in #8738
  • Better-support mypy strict equality flag by @dmontagu in #8799
  • modeljsonschema export with Annotated types misses 'required' parameters by @LouisGobert in #8793
  • Fix default inclusion in FieldInfo.__repr_args__ by @sydney-runkle in #8801
  • Fix resolution of forward refs in dataclass base classes that are not present in the subclass module namespace by @matsjoyce-refeyn in #8751
  • Fix BaseModel type annotations to be resolvable by typing.get_type_hints by @devmonkey22 in #7680
  • Fix: allow empty string aliases with AliasGenerator by @sydney-runkle in #8810
  • Fix test along with date -> datetime timezone assumption fix by @sydney-runkle in #8823
  • Fix deprecation warning with usage of ast.Str by @Viicos in #8837
  • Add missing deprecated decorators by @Viicos in #8877
  • Fix serialization of NameEmail if name includes an email address by @NeevCohen in #8860
  • Add information about class in error message of schema generation by @Czaki in #8917
  • Make TypeAdapter's typing compatible with special forms by @adriangb in #8923
  • Fix issue with config behavior being baked into the ref schema for enums by @dmontagu in #8920
  • More helpful error re wrong model_json_schema usage by @sydney-runkle in #8928
  • Fix nested discriminated union schema gen, pt 2 by @sydney-runkle in #8932
  • Fix schema build for nested dataclasses / TypedDicts with discriminators by @sydney-runkle in #8950
  • Remove unnecessary logic for definitions schema gen with discriminated unions by @sydney-runkle in #8951
  • Fix handling of optionals in mypy plugin by @dmontagu in #9008
  • Fix PlainSerializer usage with std type constructor by @sydney-runkle in #9031
  • Remove unnecessary warning for config in plugin by @dmontagu in #9039
  • Fix default value serializing by @NeevCohen in #9066
  • Fix extra fields check in Model.__getattr__() by @NeevCohen in #9082
  • Fix ClassVar forward ref inherited from parent class by @alexmojaki in #9097
  • fix sequence like validator with strict True by @andresliszt in #8977
  • Improve warning message when a field name shadows a field in a parent model by @chan-vince in #9105
  • Do not warn about shadowed fields if they are not redefined in a child class by @chan-vince in #9111
  • Fix discriminated union bug with unsubstituted type var by @sydney-runkle in #9124
  • Support serialization of deque when passed to Sequence[blah blah blah] by @sydney-runkle in #9128
  • Init private attributes from super-types in model_post_init by @Viicos in #9134
  • fix model_construct with validation_alias by @ornariece in #9144
  • Ensure json-schema generator handles Literal null types by @bruno-f-cruz in #9135
  • Fixed in v2.7.0: Fix allow extra generic by @dmontagu in #9193

New Contributors

  • @hungtsetse made their first contribution in #8546
  • @StrawHatDrag0n made their first contribution in #8583
  • @anci3ntr0ck made their first contribution in #8642
  • @Holi0317 made their first contribution in #8650
  • @bluenote10 made their first contribution in #8651
  • @ADSteele916 made their first contribution in #8703
  • @musicinmybrain made their first contribution in #8731
  • @jks15satoshi made their first contribution in #8706
  • @13sin made their first contribution in #8734
  • @DanielNoord made their first contribution in #8738
  • @conradogarciaberrotaran made their first contribution in #8519
  • @chris-griffin made their first contribution in #8775
  • @LouisGobert made their first contribution in #8793
  • @matsjoyce-refeyn made their first contribution in #8751
  • @devmonkey22 made their first contribution in #7680
  • @adamency made their first contribution in #8847
  • @MamfTheKramf made their first contribution in #8851
  • @ornariece made their first contribution in #9001
  • @alexeyt101 made their first contribution in #9004
  • @wannieman98 made their first contribution in #8947
  • @solidguy7 made their first contribution in #9062
  • @kloczek made their first contribution in #9047
  • @jag-k made their first contribution in #9053
  • @priya-gitTest made their first contribution in #9088
  • @Youssefares made their first contribution in #9023
  • @chan-vince made their first contribution in #9105
  • @bruno-f-cruz made their first contribution in #9135
  • @Lance-Drane made their first contribution in #9166

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.6.4...v2.7.0/

- Python
Published by sydney-runkle about 2 years ago

pydantic - v2.7.0b1

v2.7.0b1 (2024-04-03)

What's Changed

Packaging

New Features

  • Extract attribute docstrings from FieldInfo.description by @Viicos in #6563
  • Add a with_config decorator to comply with typing spec by @Viicos in #8611
  • Allow an optional separator splitting the value and unit of the result of ByteSize.human_readable by @jks15satoshi in #8706
  • Add generic Secret base type by @conradogarciaberrotaran in #8519
  • Make use of Sphinx inventories for cross references in docs by @Viicos in #8682
  • Add environment variable to disable plugins by @geospackle in #8767
  • Add support for deprecated fields by @Viicos in #8237
  • Allow field_serializer('*') by @ornariece in #9001
  • Handle a case when model_config is defined as a model property by @alexeyt101 in #9004
  • Update create_model() to support typing.Annotated as input by @wannieman98 in #8947
  • Add ClickhouseDsn support by @solidguy7 in #9062
  • Add support for re.Pattern[str] to pattern field by @jag-k in #9053
  • Support for serialize_as_any runtime setting by @sydney-runkle in #8830
  • Add support for typing.Self by @Youssefares in #9023
  • Ability to pass context to serialization by @ornariece in #8965
  • Add feedback widget to docs with flarelytics integration by @sydney-runkle in #9129
  • Support for parsing partial JSON strings in Python by @samuelcolvin in pydantic/jiter#66

Changes

  • Correct docs, logic for model_construct behavior with extra by @sydney-runkle in #8807
  • Improve error message for improper RootModel subclasses by @sydney-runkle in #8857
  • Use PEP570 syntax by @Viicos in #8940
  • Add enum and type to the JSON schema for single item literals by @dmontagu in #8944
  • Deprecate update_json_schema internal function by @sydney-runkle in #9125
  • Serialize duration to hour minute second, instead of just seconds by @kakilangit in pydantic/speedate#50
  • Trimming str before parsing to int and float by @hungtsetse in pydantic/pydantic-core#1203

Performance

  • enum validator improvements by @samuelcolvin in #9045
  • Move enum validation and serialization to Rust by @samuelcolvin in #9064
  • Improve schema generation for nested dataclasses by @sydney-runkle in #9114
  • Fast path for ASCII python string creation in JSON by @samuelcolvin in in pydantic/jiter#72
  • SIMD integer and string JSON parsing on aarch64(Note: SIMD on x86 will be implemented in a future release) by @samuelcolvin in in pydantic/jiter#65
  • Support JSON Cow<str> from jiter by @davidhewitt in pydantic/pydantic-core#1231
  • MAJOR performance improvement: update to PyO3 0.21 final by @davidhewitt in pydantic/pydantic-core#1248
  • cache Python strings by @samuelcolvin in pydantic/pydantic-core#1240

Fixes

  • Fix strict parsing for some Sequences by @sydney-runkle in #8614
  • Add a check on the existence of __qualname__ by @anci3ntr0ck in #8642
  • Handle __pydantic_extra__ annotation being a string or inherited by @alexmojaki in #8659
  • Fix json validation for NameEmail by @Holi0317 in #8650
  • Fix type-safety of attribute access in BaseModel by @bluenote10 in #8651
  • Fix bug with mypy plugin and no_strict_optional = True by @dmontagu in #8666
  • Fix ByteSize error type change by @sydney-runkle in #8681
  • Fix inheriting annotations in dataclasses by @sydney-runkle in #8679
  • Fix regression in core schema generation for indirect definition references by @dmontagu in #8702
  • Fix unsupported types bug with plain validator by @sydney-runkle in #8710
  • Reverting problematic fix from 2.6 release, fixing schema building bug by @sydney-runkle in #8718
  • fixes __pydantic_config__ ignored for TypeDict by @13sin in #8734
  • Fix test failures with pytest v8.0.0 due to pytest.warns() starting to work inside pytest.raises() by @mgorny in #8678
  • Use is_valid_field from 1.x for mypy plugin by @DanielNoord in #8738
  • Better-support mypy strict equality flag by @dmontagu in #8799
  • modeljsonschema export with Annotated types misses 'required' parameters by @LouisGobert in #8793
  • Fix default inclusion in FieldInfo.__repr_args__ by @sydney-runkle in #8801
  • Fix resolution of forward refs in dataclass base classes that are not present in the subclass module namespace by @matsjoyce-refeyn in #8751
  • Fix BaseModel type annotations to be resolvable by typing.get_type_hints by @devmonkey22 in #7680
  • Fix: allow empty string aliases with AliasGenerator by @sydney-runkle in #8810
  • Fix test along with date -> datetime timezone assumption fix by @sydney-runkle in #8823
  • Fix deprecation warning with usage of ast.Str by @Viicos in #8837
  • Add missing deprecated decorators by @Viicos in #8877
  • Fix serialization of NameEmail if name includes an email address by @NeevCohen in #8860
  • Add information about class in error message of schema generation by @Czaki in #8917
  • Make TypeAdapter's typing compatible with special forms by @adriangb in #8923
  • Fix issue with config behavior being baked into the ref schema for enums by @dmontagu in #8920
  • More helpful error re wrong model_json_schema usage by @sydney-runkle in #8928
  • Fix nested discriminated union schema gen, pt 2 by @sydney-runkle in #8932
  • Fix schema build for nested dataclasses / TypedDicts with discriminators by @sydney-runkle in #8950
  • Remove unnecessary logic for definitions schema gen with discriminated unions by @sydney-runkle in #8951
  • Fix handling of optionals in mypy plugin by @dmontagu in #9008
  • Fix PlainSerializer usage with std type constructor by @sydney-runkle in #9031
  • Remove unnecessary warning for config in plugin by @dmontagu in #9039
  • Fix default value serializing by @NeevCohen in #9066
  • Fix extra fields check in Model.__getattr__() by @NeevCohen in #9082
  • Fix ClassVar forward ref inherited from parent class by @alexmojaki in #9097
  • fix sequence like validator with strict True by @andresliszt in #8977
  • Improve warning message when a field name shadows a field in a parent model by @chan-vince in #9105
  • Do not warn about shadowed fields if they are not redefined in a child class by @chan-vince in #9111
  • Fix discriminated union bug with unsubstituted type var by @sydney-runkle in #9124
  • Support serialization of deque when passed to Sequence[blah blah blah] by @sydney-runkle in #9128
  • Init private attributes from super-types in model_post_init by @Viicos in #9134
  • fix model_construct with validation_alias by @ornariece in #9144
  • Ensure json-schema generator handles Literal null types by @bruno-f-cruz in #9135

New Contributors

  • @hungtsetse made their first contribution in #8546
  • @StrawHatDrag0n made their first contribution in #8583
  • @anci3ntr0ck made their first contribution in #8642
  • @Holi0317 made their first contribution in #8650
  • @bluenote10 made their first contribution in #8651
  • @ADSteele916 made their first contribution in #8703
  • @musicinmybrain made their first contribution in #8731
  • @jks15satoshi made their first contribution in #8706
  • @13sin made their first contribution in #8734
  • @DanielNoord made their first contribution in #8738
  • @conradogarciaberrotaran made their first contribution in #8519
  • @chris-griffin made their first contribution in #8775
  • @LouisGobert made their first contribution in #8793
  • @matsjoyce-refeyn made their first contribution in #8751
  • @devmonkey22 made their first contribution in #7680
  • @adamency made their first contribution in #8847
  • @MamfTheKramf made their first contribution in #8851
  • @ornariece made their first contribution in #9001
  • @alexeyt101 made their first contribution in #9004
  • @wannieman98 made their first contribution in #8947
  • @solidguy7 made their first contribution in #9062
  • @kloczek made their first contribution in #9047
  • @jag-k made their first contribution in #9053
  • @priya-gitTest made their first contribution in #9088
  • @Youssefares made their first contribution in #9023
  • @chan-vince made their first contribution in #9105
  • @bruno-f-cruz made their first contribution in #9135

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.6.4...v2.7.0b1/

- Python
Published by sydney-runkle about 2 years ago

pydantic - v1.10.15

What's Changed

  • Add pydantic.v1 namespace to Pydantic v1 by @exs-dmiketa in https://github.com/pydantic/pydantic/pull/9042
  • Relax version of typing-extensions for V1 by @SonOfLilit in https://github.com/pydantic/pydantic/pull/8819
  • patch fix for mypy by @sydney-runkle in https://github.com/pydantic/pydantic/pull/8765

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.14...v1.10.15

- Python
Published by sydney-runkle about 2 years ago

pydantic - v2.6.4 (2024-03-12)

What's Changed

Fixes

  • Fix usage of AliasGenerator with computed_field decorator by @sydney-runkle in #8806
  • Fix nested discriminated union schema gen, pt 2 by @sydney-runkle in #8932
  • Fix bug with nostrictoptional=True caused by API deferral by @dmontagu in #8826

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.6.3...v2.6.4/

- Python
Published by sydney-runkle about 2 years ago

pydantic - v2.6.3 2024-02-27

What's Changed

Packaging

  • Update pydantic-settings version in the docs by @hramezani in #8906

Fixes

  • Fix discriminated union schema gen bug by @sydney-runkle in #8904

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.6.2...v2.6.3/

- Python
Published by sydney-runkle over 2 years ago

pydantic - v2.6.2 2024-02-23

What's Changed

Packaging

  • Upgrade to pydantic-core 2.16.3 by @sydney-runkle in #8879

Fixes

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.6.1...v2.6.2/

- Python
Published by sydney-runkle over 2 years ago

pydantic - v2.6.1 2024-02-05

v2.6.1 (2024-02-05)

What's Changed

Packaging

  • Upgrade to pydantic-core 2.16.2 by @sydney-runkle in #8717

Fixes

  • Fix bug with mypy plugin and no_strict_optional = True by @dmontagu in #8666
  • Fix ByteSize error type change by @sydney-runkle in #8681
  • Fix inheriting Field annotations in dataclasses by @sydney-runkle in #8679
  • Fix regression in core schema generation for indirect definition references by @dmontagu in #8702
  • Fix unsupported types bug with PlainValidator by @sydney-runkle in #8710
  • Reverting problematic fix from 2.6 release, fixing schema building bug by @sydney-runkle in #8718
  • Fix warning for tuple of wrong size in Union by @davidhewitt in pydantic/pydantic-core#1174
  • Fix computed_field JSON serializer exclude_none behavior by @sydney-runkle in pydantic/pydantic-core#1187

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.6.0...v2.6.1/

- Python
Published by sydney-runkle over 2 years ago

pydantic - v2.6.0 2024-01-29

v2.6.0 (2024-01-29)

GitHub release

The code released in v2.6.0 is practically identical to that of v2.6.0b1.

What's Changed

Packaging

  • Check for email-validator version >= 2.0 by @commonism in #6033
  • Upgrade ruff` target version to Python 3.8 by @Elkiwa in #8341
  • Update to pydantic-extra-types==2.4.1 by @yezz123 in #8478
  • Update to pyright==1.1.345 by @Viicos in #8453
  • Update pydantic-core from 2.14.6 to 2.16.1, significant changes from these updates are described below, full changelog here

New Features

  • Add NatsDsn by @ekeew in #6874
  • Add ConfigDict.ser_json_inf_nan by @davidhewitt in #8159
  • Add types.OnErrorOmit by @adriangb in #8222
  • Support AliasGenerator usage by @sydney-runkle in #8282
  • Add Pydantic People Page to docs by @sydney-runkle in #8345
  • Support yyyy-MM-DD datetime parsing by @sydney-runkle in #8404
  • Added bits conversions to the ByteSize class #8415 by @luca-matei in #8507
  • Enable json schema creation with type ByteSize by @geospackle in #8537
  • Add eval_type_backport to handle union operator and builtin generic subscripting in older Pythons by @alexmojaki in #8209
  • Add support for dataclass fields init by @dmontagu in #8552
  • Implement pickling for ValidationError by @davidhewitt in pydantic/pydantic-core#1119
  • Add unified tuple validator that can handle "variadic" tuples via PEP-646 by @dmontagu in pydantic/pydantic-core#865

Changes

  • Drop Python3.7 support by @hramezani in #7188
  • Drop Python 3.7, and PyPy 3.7 and 3.8 by @davidhewitt in pydantic/pydantic-core#1129
  • Use positional-only self in BaseModel constructor, so no field name can ever conflict with it by @ariebovenberg in #8072
  • Make @validate_call return a function instead of a custom descriptor - fixes binding issue with inheritance and adds self/cls argument to validation errors by @alexmojaki in #8268
  • Exclude BaseModel docstring from JSON schema description by @sydney-runkle in #8352
  • Introducing classproperty decorator for model_computed_fields by @Jocelyn-Gas in #8437
  • Explicitly raise an error if field names clashes with types by @Viicos in #8243
  • Use stricter serializer for unions of simple types by @alexdrydew pydantic/pydantic-core#1132

Performance

Fixes

  • Move getattr warning in deprecated BaseConfig by @tlambert03 in #7183
  • Only hash model_fields, not whole __dict__ by @alexmojaki in #7786
  • Fix mishandling of unions while freezing types in the mypy plugin by @dmontagu in #7411
  • Fix mypy error on untyped ClassVar by @vincent-hachin-wmx in #8138
  • Only compare pydantic fields in BaseModel.__eq__ instead of whole __dict__ by @QuentinSoubeyranAqemia in #7825
  • Update strict docstring in model_validate method. by @LukeTonin in #8223
  • Fix overload position of computed_field by @Viicos in #8227
  • Fix custom type type casting used in multiple attributes by @ianhfc in #8066
  • Fix issue not allowing validate_call decorator to be dynamically assigned to a class method by @jusexton in #8249
  • Fix issue unittest.mock deprecation warnings by @ibleedicare in #8262
  • Added tests for the case JsonValue contains subclassed primitive values by @jusexton in #8286
  • Fix mypy error on free before validator (classmethod) by @sydney-runkle in #8285
  • Fix to_snake conversion by @jevins09 in #8316
  • Fix type annotation of ModelMetaclass.__prepare__ by @slanzmich in #8305
  • Disallow config specification when initializing a TypeAdapter when the annotated type has config already by @sydney-runkle in #8365
  • Fix a naming issue with JSON schema for generics parametrized by recursive type aliases by @dmontagu in #8389
  • Fix type annotation in pydantic people script by @shenxiangzhuang in #8402
  • Add support for field alias in dataclass signature by @NeevCohen in #8387
  • Fix bug with schema generation with Field(...) in a forward ref by @dmontagu in #8494
  • Fix ordering of keys in __dict__ with model_construct call by @sydney-runkle in #8500
  • Fix module path_type creation when globals does not contain __name__ by @hramezani in #8470
  • Fix for namespace issue with dataclasses with from __future__ import annotations by @sydney-runkle in #8513
  • Fix: make function validator types positional-only by @pmmmwh in #8479
  • Fix usage of @deprecated by @Viicos in #8294
  • Add more support for private attributes in model_construct call by @sydney-runkle in #8525
  • Use a stack for the types namespace by @dmontagu in #8378
  • Fix schema-building bug with TypeAliasType for types with refs by @dmontagu in #8526
  • Support pydantic.Field(repr=False) in dataclasses by @tigeryy2 in #8511
  • Override dataclass_transform behavior for RootModel by @Viicos in #8163
  • Refactor signature generation for simplicity by @sydney-runkle in #8572
  • Fix ordering bug of PlainValidator annotation by @Anvil in #8567
  • Fix exclude_none for json serialization of computed_fields by @sydney-runkle in pydantic/pydantic-core#1098
  • Support yyyy-MM-DD string for datetimes by @sydney-runkle in pydantic/pydantic-core#1124
  • Tweak ordering of definitions in generated schemas by @StrawHatDrag0n in #8583

New Contributors

pydantic

  • @ekeew made their first contribution in #6874
  • @lambertsbennett made their first contribution in #8054
  • @vincent-hachin-wmx made their first contribution in #8138
  • @QuentinSoubeyranAqemia made their first contribution in #7825
  • @ariebovenberg made their first contribution in #8072
  • @LukeTonin made their first contribution in #8223
  • @denisart made their first contribution in #8231
  • @ianhfc made their first contribution in #8066
  • @eonu made their first contribution in #8255
  • @amandahla made their first contribution in #8263
  • @ibleedicare made their first contribution in #8262
  • @jevins09 made their first contribution in #8316
  • @cuu508 made their first contribution in #8322
  • @slanzmich made their first contribution in #8305
  • @jensenbox made their first contribution in #8331
  • @szepeviktor made their first contribution in #8356
  • @Elkiwa made their first contribution in #8341
  • @parhamfh made their first contribution in #8395
  • @shenxiangzhuang made their first contribution in #8402
  • @NeevCohen made their first contribution in #8387
  • @zby made their first contribution in #8497
  • @patelnets made their first contribution in #8491
  • @edwardwli made their first contribution in #8503
  • @luca-matei made their first contribution in #8507
  • @Jocelyn-Gas made their first contribution in #8437
  • @bL34cHig0 made their first contribution in #8501
  • @tigeryy2 made their first contribution in #8511
  • @geospackle made their first contribution in #8537
  • @Anvil made their first contribution in #8567
  • @hungtsetse made their first contribution in #8546
  • @StrawHatDrag0n made their first contribution in #8583

pydantic-core

- Python
Published by sydney-runkle over 2 years ago

pydantic - v2.6.0b1 2024-01-19

What's Changed

Packaging

  • Check for email-validator version >= 2.0 by @commonism in #6033
  • Upgrade ruff` target version to Python 3.8 by @Elkiwa in #8341
  • Update to pydantic-extra-types==2.4.1 by @yezz123 in #8478
  • Update to pyright==1.1.345 by @Viicos in #8453
  • Update pydantic-core from 2.14.6 to 2.16.1, significant changes from these updates are described below, full changelog here

New Features

  • Add NatsDsn by @ekeew in #6874
  • Add ConfigDict.ser_json_inf_nan by @davidhewitt in #8159
  • Add types.OnErrorOmit by @adriangb in #8222
  • Support AliasGenerator usage by @sydney-runkle in #8282
  • Add Pydantic People Page to docs by @sydney-runkle in #8345
  • Support yyyy-MM-DD datetime parsing by @sydney-runkle in #8404
  • Added bits conversions to the ByteSize class #8415 by @luca-matei in #8507
  • Enable json schema creation with type ByteSize by @geospackle in #8537
  • Add eval_type_backport to handle union operator and builtin generic subscripting in older Pythons by @alexmojaki in #8209
  • Add support for dataclass fields init by @dmontagu in #8552
  • Implement pickling for ValidationError by @davidhewitt in pydantic/pydantic-core#1119
  • Add unified tuple validator that can handle "variadic" tuples via PEP-646 by @dmontagu in pydantic/pydantic-core#865

Changes

  • Drop Python3.7 support by @hramezani in #7188
  • Drop Python 3.7, and PyPy 3.7 and 3.8 by @davidhewitt in pydantic/pydantic-core#1129
  • Use positional-only self in BaseModel constructor, so no field name can ever conflict with it by @ariebovenberg in #8072
  • Make @validate_call return a function instead of a custom descriptor - fixes binding issue with inheritance and adds self/cls argument to validation errors by @alexmojaki in #8268
  • Exclude BaseModel docstring from JSON schema description by @sydney-runkle in #8352
  • Introducing classproperty decorator for model_computed_fields by @Jocelyn-Gas in #8437
  • Explicitly raise an error if field names clashes with types by @Viicos in #8243
  • Use stricter serializer for unions of simple types by @alexdrydew pydantic/pydantic-core#1132

Performance

Fixes

  • Move getattr warning in deprecated BaseConfig by @tlambert03 in #7183
  • Only hash model_fields, not whole __dict__ by @alexmojaki in #7786
  • Fix mishandling of unions while freezing types in the mypy plugin by @dmontagu in #7411
  • Fix mypy error on untyped ClassVar by @vincent-hachin-wmx in #8138
  • Only compare pydantic fields in BaseModel.__eq__ instead of whole __dict__ by @QuentinSoubeyranAqemia in #7825
  • Update strict docstring in model_validate method. by @LukeTonin in #8223
  • Fix overload position of computed_field by @Viicos in #8227
  • Fix custom type type casting used in multiple attributes by @ianhfc in #8066
  • Fix issue not allowing validate_call decorator to be dynamically assigned to a class method by @jusexton in #8249
  • Fix issue unittest.mock deprecation warnings by @ibleedicare in #8262
  • Added tests for the case JsonValue contains subclassed primitive values by @jusexton in #8286
  • Fix mypy error on free before validator (classmethod) by @sydney-runkle in #8285
  • Fix to_snake conversion by @jevins09 in #8316
  • Fix type annotation of ModelMetaclass.__prepare__ by @slanzmich in #8305
  • Disallow config specification when initializing a TypeAdapter when the annotated type has config already by @sydney-runkle in #8365
  • Fix a naming issue with JSON schema for generics parametrized by recursive type aliases by @dmontagu in #8389
  • Fix type annotation in pydantic people script by @shenxiangzhuang in #8402
  • Add support for field alias in dataclass signature by @NeevCohen in #8387
  • Fix bug with schema generation with Field(...) in a forward ref by @dmontagu in #8494
  • Fix ordering of keys in __dict__ with model_construct call by @sydney-runkle in #8500
  • Fix module path_type creation when globals does not contain __name__ by @hramezani in #8470
  • Fix for namespace issue with dataclasses with from __future__ import annotations by @sydney-runkle in #8513
  • Fix: make function validator types positional-only by @pmmmwh in #8479
  • Fix usage of @deprecated by @Viicos in #8294
  • Add more support for private attributes in model_construct call by @sydney-runkle in #8525
  • Use a stack for the types namespace by @dmontagu in #8378
  • Fix schema-building bug with TypeAliasType for types with refs by @dmontagu in #8526
  • Support pydantic.Field(repr=False) in dataclasses by @tigeryy2 in #8511
  • Override dataclass_transform behavior for RootModel by @Viicos in #8163
  • Refactor signature generation for simplicity by @sydney-runkle in #8572
  • Fix ordering bug of PlainValidator annotation by @Anvil in #8567
  • Fix exclude_none for json serialization of computed_fields by @sydney-runkle in pydantic/pydantic-core#1098
  • Support yyyy-MM-DD string for datetimes by @sydney-runkle in pydantic/pydantic-core#1124

New Contributors

pydantic

  • @ekeew made their first contribution in #6874
  • @lambertsbennett made their first contribution in #8054
  • @vincent-hachin-wmx made their first contribution in #8138
  • @QuentinSoubeyranAqemia made their first contribution in #7825
  • @ariebovenberg made their first contribution in #8072
  • @LukeTonin made their first contribution in #8223
  • @denisart made their first contribution in #8231
  • @ianhfc made their first contribution in #8066
  • @eonu made their first contribution in #8255
  • @amandahla made their first contribution in #8263
  • @ibleedicare made their first contribution in #8262
  • @jevins09 made their first contribution in #8316
  • @cuu508 made their first contribution in #8322
  • @slanzmich made their first contribution in #8305
  • @jensenbox made their first contribution in #8331
  • @szepeviktor made their first contribution in #8356
  • @Elkiwa made their first contribution in #8341
  • @parhamfh made their first contribution in #8395
  • @shenxiangzhuang made their first contribution in #8402
  • @NeevCohen made their first contribution in #8387
  • @zby made their first contribution in #8497
  • @patelnets made their first contribution in #8491
  • @edwardwli made their first contribution in #8503
  • @luca-matei made their first contribution in #8507
  • @Jocelyn-Gas made their first contribution in #8437
  • @bL34cHig0 made their first contribution in #8501
  • @tigeryy2 made their first contribution in #8511
  • @geospackle made their first contribution in #8537
  • @Anvil made their first contribution in #8567

pydantic-core

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.5.3...v2.6.0b1

- Python
Published by sydney-runkle over 2 years ago

pydantic - v1.10.14 2024-01-19

What's Changed

  • Update install.md by @dmontagu in https://github.com/pydantic/pydantic/pull/7690
  • Fix ci to only deploy docs on release by @sydney-runkle in https://github.com/pydantic/pydantic/pull/7740
  • Ubuntu fixes for V1 by @sydney-runkle in https://github.com/pydantic/pydantic/pull/8540 and https://github.com/pydantic/pydantic/pull/8587
  • Fix cached_property handling in dataclasses when copied by @rdbisme in https://github.com/pydantic/pydantic/pull/8407

New Contributors

  • @rdbisme made their first contribution in https://github.com/pydantic/pydantic/pull/8407

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.13...v1.10.14

- Python
Published by sydney-runkle over 2 years ago

pydantic - v2.5.3 2023-12-22

v2.5.3 (2023-12-22)

GitHub release

What's Changed

Packaging

  • uprev pydantic-core to 2.14.6

Fixes

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.5.2...v2.5.3/

- Python
Published by hramezani over 2 years ago

pydantic - v2.5.2 2023-11-22

v2.5.2 (2023-11-22)

GitHub release

What's Changed

Packaging

  • uprev pydantic-core to 2.14.5

New Features

  • Add ConfigDict.ser_json_inf_nan by @davidhewitt in #8159

Fixes

https://github.com/pydantic/pydantic/compare/v2.5.1...v2.5.2/

- Python
Published by sydney-runkle over 2 years ago

pydantic - v2.5.1 2023-11-15

v2.5.1 (2023-11-15)

GitHub release

What's Changed

Packaging

  • uprev pydantic-core to 2.14.3 by @samuelcolvin in #8120

Fixes

  • Fix package description limit by @dmontagu in #8097
  • Fix ValidateCallWrapper error when creating a model which has a @validate_call wrapped field annotation by @sydney-runkle in #8110

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.5.0...v2.5.1/

- Python
Published by hramezani over 2 years ago

pydantic - v2.5.0 2023-11-13

v2.5.0 (2023-11-13)

GitHub release

The code released in v2.5.0 is functionally identical to that of v2.5.0b1.

What's Changed

Packaging

  • Update pydantic-core from 2.10.1 to 2.14.1, significant changes from these updates are described below, full changelog here
  • Update to pyright==1.1.335 by @Viicos in #8075

New Features

  • Allow plugins to catch non ValidationError errors by @adriangb in #7806
  • Support __doc__ argument in create_model() by @chris-spann in #7863
  • Expose regex_engine flag - meaning you can use with the Rust or Python regex libraries in constraints by @utkini in #7768
  • Save return type generated from type annotation in ComputedFieldInfo by @alexmojaki in #7889
  • Adopting ruff formatter by @Luca-Blight in #7930
  • Added validation_error_cause to config by @zakstucke in #7626
  • Make path of the item to validate available in plugin by @hramezani in #7861
  • Add CallableDiscriminator and Tag by @dmontagu in #7983
    • CallableDiscriminator renamed to Discriminator by @dmontagu in #8047
  • Make union case tags affect union error messages by @dmontagu in #8001
  • Add examples and json_schema_extra to @computed_field by @alexmojaki in #8013
  • Add JsonValue type by @dmontagu in #7998
  • Allow str as argument to Discriminator by @dmontagu in #8047
  • Add SchemaSerializer.__reduce__ method to enable pickle serialization by @edoakes in pydantic/pydantic-core#1006

Changes

  • Significant Change: replace ultra_strict with new smart union implementation, the way unions are validated has changed significantly to improve performance and correctness, we have worked hard to absolutely minimise the number of cases where behaviour has changed, see the PR for details - by @davidhewitt in pydantic/pydantic-core#867
  • Add support for instance method reassignment when extra='allow' by @sydney-runkle in #7683
  • Support JSON schema generation for Enum types with no cases by @sydney-runkle in #7927
  • Warn if a class inherits from Generic before BaseModel by @alexmojaki in #7891

Performance

Fixes

  • Fix mypy issue with subclasses of RootModel by @sydney-runkle in #7677
  • Properly rebuild the FieldInfo when a forward ref gets evaluated by @dmontagu in #7698
  • Fix failure to load SecretStr from JSON (regression in v2.4) by @sydney-runkle in #7729
  • Fix defer_build behavior with TypeAdapter by @sydney-runkle in #7736
  • Improve compatibility with legacy mypy versions by @dmontagu in #7742
  • Fix: update TypeVar handling when default is not set by @pmmmwh in #7719
  • Support specification of strict on Enum type fields by @sydney-runkle in #7761
  • Wrap weakref.ref instead of subclassing to fix cloudpickle serialization by @edoakes in #7780
  • Keep values of private attributes set within model_post_init in subclasses by @alexmojaki in #7775
  • Add more specific type for non-callable json_schema_extra by @alexmojaki in #7803
  • Raise an error when deleting frozen (model) fields by @alexmojaki in #7800
  • Fix schema sorting bug with default values by @sydney-runkle in #7817
  • Use generated alias for aliases that are not specified otherwise by @alexmojaki in #7802
  • Support strict specification for UUID types by @sydney-runkle in #7865
  • JSON schema: fix extra parameter handling by @me-and in #7810
  • Fix: support pydantic.Field(kw_only=True) with inherited dataclasses by @PrettyWood in #7827
  • Support validate_call decorator for methods in classes with __slots__ by @sydney-runkle in #7883
  • Fix pydantic dataclass problem with dataclasses.field default by @hramezani in #7898
  • Fix schema generation for generics with union type bounds by @sydney-runkle in #7899
  • Fix version for importlib_metadata on python 3.7 by @sydney-runkle in #7904
  • Support | operator (Union) in PydanticRecursiveRef by @alexmojaki in #7892
  • Fix display_as_type for TypeAliasType in python 3.12 by @dmontagu in #7929
  • Add support for NotRequired generics in TypedDict by @sydney-runkle in #7932
  • Make generic TypeAliasType specifications produce different schema definitions by @alexdrydew in #7893
  • Added fix for signature of inherited dataclass by @howsunjow in #7925
  • Make the model name generation more robust in JSON schema by @joakimnordling in #7881
  • Fix plurals in validation error messages (in tests) by @Iipin in #7972
  • PrivateAttr is passed from Annotated default position by @tabassco in #8004
  • Don't decode bytes (which may not be UTF8) when displaying SecretBytes by @alexmojaki in #8012
  • Use classmethod instead of classmethod[Any, Any, Any] by @Mr-Pepe in #7979
  • Clearer error on invalid Plugin by @samuelcolvin in #8023
  • Correct pydantic dataclasses import by @samuelcolvin in #8027
  • Fix misbehavior for models referencing redefined type aliases by @dmontagu in #8050
  • Fix Optional field with validate_default only performing one field validation by @sydney-runkle in pydantic/pydantic-core#1002
  • Fix definition-ref bug with Dict keys by @sydney-runkle in pydantic/pydantic-core#1014
  • Fix bug allowing validation of bool types with coerce_numbers_to_str=True by @sydney-runkle in pydantic/pydantic-core#1017
  • Don't accept NaN in float and decimal constraints by @davidhewitt in pydantic/pydantic-core#1037
  • Add lax_str and lax_int support for enum values not inherited from str/int by @michaelhly in pydantic/pydantic-core#1015
  • Support subclasses in lists in Union of List types by @sydney-runkle in pydantic/pydantic-core#1039
  • Allow validation against max_digits and decimals to pass if normalized or non-normalized input is valid by @sydney-runkle in pydantic/pydantic-core#1049
  • Fix: proper pluralization in ValidationError messages by @Iipin in pydantic/pydantic-core#1050
  • Disallow the string '-' as datetime input by @davidhewitt in pydantic/speedate#52 & pydantic/pydantic-core#1060
  • Fix: NaN and Inf float serialization by @davidhewitt in pydantic/pydantic-core#1062
  • Restore manylinux-compatible PGO builds by @davidhewitt in pydantic/pydantic-core#1068

New Contributors

pydantic

  • @schneebuzz made their first contribution in #7699
  • @edoakes made their first contribution in #7780
  • @alexmojaki made their first contribution in #7775
  • @NickG123 made their first contribution in #7751
  • @gowthamgts made their first contribution in #7830
  • @jamesbraza made their first contribution in #7848
  • @laundmo made their first contribution in #7850
  • @rahmatnazali made their first contribution in #7870
  • @waterfountain1996 made their first contribution in #7878
  • @chris-spann made their first contribution in #7863
  • @me-and made their first contribution in #7810
  • @utkini made their first contribution in #7768
  • @bn-l made their first contribution in #7744
  • @alexdrydew made their first contribution in #7893
  • @Luca-Blight made their first contribution in #7930
  • @howsunjow made their first contribution in #7925
  • @joakimnordling made their first contribution in #7881
  • @icfly2 made their first contribution in #7976
  • @Yummy-Yums made their first contribution in #8003
  • @Iipin made their first contribution in #7972
  • @tabassco made their first contribution in #8004
  • @Mr-Pepe made their first contribution in #7979
  • @0x00cl made their first contribution in #8010
  • @barraponto made their first contribution in #8032

pydantic-core

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.4.2...v2.5.0

- Python
Published by sydney-runkle over 2 years ago

pydantic - v2.5.0b1 (2023-11-09)

What's Changed

Packaging

  • Update pydantic-core from 2.10.1 to 2.14.1, significant changes from these updates are described below, full changelog here

New Features

  • Allow plugins to catch non ValidationError errors by @adriangb in #7806
  • Support __doc__ argument in create_model() by @chris-spann in #7863
  • Expose regex_engine flag - meaning you can use with the Rust or Python regex libraries in constraints by @utkini in #7768
  • Save return type generated from type annotation in ComputedFieldInfo by @alexmojaki in #7889
  • Adopting ruff formatter by @Luca-Blight in #7930
  • Added validation_error_cause to config by @zakstucke in #7626
  • Make path of the item to validate available in plugin by @hramezani in #7861
  • Add CallableDiscriminator and Tag by @dmontagu in #7983
  • Make union case tags affect union error messages by @dmontagu in #8001
  • Add examples and json_schema_extra to @computed_field by @alexmojaki in #8013
  • Add JsonValue type by @dmontagu in #7998
  • Allow str as argument to Discriminator by @dmontagu in #8047
  • Add SchemaSerializer.__reduce__ method to enable pickle serialization by @edoakes in pydantic/pydantic-core#1006

Changes

  • Significant Change: replace ultra_strict with new smart union implementation, the way unions are validated has changed significantly to improve performance and correctness, we have worked hard to absolutely minimise the number of cases where behaviour has changed, see the PR for details - by @davidhewitt in pydantic/pydantic-core#867
  • Add support for instance method reassignment when extra='allow' by @sydney-runkle in #7683
  • Support JSON schema generation for Enum types with no cases by @sydney-runkle in #7927
  • Warn if a class inherits from Generic before BaseModel by @alexmojaki in #7891

Performance

Fixes

  • Fix mypy issue with subclasses of RootModel by @sydney-runkle in #7677
  • Properly rebuild the FieldInfo when a forward ref gets evaluated by @dmontagu in #7698
  • Fix failure to load SecretStr from JSON (regression in v2.4) by @sydney-runkle in #7729
  • Fix defer_build behavior with TypeAdapter by @sydney-runkle in #7736
  • Improve compatibility with legacy mypy versions by @dmontagu in #7742
  • Fix: update TypeVar handling when default is not set by @pmmmwh in #7719
  • Support specification of strict on Enum type fields by @sydney-runkle in #7761
  • Wrap weakref.ref instead of subclassing to fix cloudpickle serialization by @edoakes in #7780
  • Keep values of private attributes set within model_post_init in subclasses by @alexmojaki in #7775
  • Add more specific type for non-callable json_schema_extra by @alexmojaki in #7803
  • Raise an error when deleting frozen (model) fields by @alexmojaki in #7800
  • Fix schema sorting bug with default values by @sydney-runkle in #7817
  • Use generated alias for aliases that are not specified otherwise by @alexmojaki in #7802
  • Support strict specification for UUID types by @sydney-runkle in #7865
  • JSON schema: fix extra parameter handling by @me-and in #7810
  • Fix: support pydantic.Field(kw_only=True) with inherited dataclasses by @PrettyWood in #7827
  • Support validate_call decorator for methods in classes with __slots__ by @sydney-runkle in #7883
  • Fix pydantic dataclass problem with dataclasses.field default by @hramezani in #7898
  • Fix schema generation for generics with union type bounds by @sydney-runkle in #7899
  • Fix version for importlib_metadata on python 3.7 by @sydney-runkle in #7904
  • Support | operator (Union) in PydanticRecursiveRef by @alexmojaki in #7892
  • Fix display_as_type for TypeAliasType in python 3.12 by @dmontagu in #7929
  • Add support for NotRequired generics in TypedDict by @sydney-runkle in #7932
  • Make generic TypeAliasType specifications produce different schema definitions by @alexdrydew in #7893
  • Added fix for signature of inherited dataclass by @howsunjow in #7925
  • Make the model name generation more robust in JSON schema by @joakimnordling in #7881
  • Fix plurals in validation error messages (in tests) by @Iipin in #7972
  • PrivateAttr is passed from Annotated default position by @tabassco in #8004
  • Don't decode bytes (which may not be UTF8) when displaying SecretBytes by @alexmojaki in #8012
  • Use classmethod instead of classmethod[Any, Any, Any] by @Mr-Pepe in #7979
  • Clearer error on invalid Plugin by @samuelcolvin in #8023
  • Correct pydantic dataclasses import by @samuelcolvin in #8027
  • Fix misbehavior for models referencing redefined type aliases by @dmontagu in #8050
  • Fix Optional field with validate_default only performing one field validation by @sydney-runkle in pydantic/pydantic-core#1002
  • Fix definition-ref bug with Dict keys by @sydney-runkle in pydantic/pydantic-core#1014
  • Fix bug allowing validation of bool types with coerce_numbers_to_str=True by @sydney-runkle in pydantic/pydantic-core#1017
  • Don't accept NaN in float and decimal constraints by @davidhewitt in pydantic/pydantic-core#1037
  • Add lax_str and lax_int support for enum values not inherited from str/int by @michaelhly in pydantic/pydantic-core#1015
  • Support subclasses in lists in Union of List types by @sydney-runkle in pydantic/pydantic-core#1039
  • Allow validation against max_digits and decimals to pass if normalized or non-normalized input is valid by @sydney-runkle in pydantic/pydantic-core#1049
  • Fix: proper pluralization in ValidationError messages by @Iipin in pydantic/pydantic-core#1050
  • Disallow the string '-' as datetime input by @davidhewitt in pydantic/speedate#52 & pydantic/pydantic-core#1060
  • Fix: NaN and Inf float serialization by @davidhewitt in pydantic/pydantic-core#1062
  • Restore manylinux-compatible PGO builds by @davidhewitt in pydantic/pydantic-core#1068

New Contributors

pydantic

  • @schneebuzz made their first contribution in #7699
  • @edoakes made their first contribution in #7780
  • @alexmojaki made their first contribution in #7775
  • @NickG123 made their first contribution in #7751
  • @gowthamgts made their first contribution in #7830
  • @jamesbraza made their first contribution in #7848
  • @laundmo made their first contribution in #7850
  • @rahmatnazali made their first contribution in #7870
  • @waterfountain1996 made their first contribution in #7878
  • @chris-spann made their first contribution in #7863
  • @me-and made their first contribution in #7810
  • @utkini made their first contribution in #7768
  • @bn-l made their first contribution in #7744
  • @alexdrydew made their first contribution in #7893
  • @Luca-Blight made their first contribution in #7930
  • @howsunjow made their first contribution in #7925
  • @joakimnordling made their first contribution in #7881
  • @icfly2 made their first contribution in #7976
  • @Yummy-Yums made their first contribution in #8003
  • @Iipin made their first contribution in #7972
  • @tabassco made their first contribution in #8004
  • @Mr-Pepe made their first contribution in #7979
  • @0x00cl made their first contribution in #8010
  • @barraponto made their first contribution in #8032

pydantic-core

Full changelog: Full Changelog: https://github.com/pydantic/pydantic/compare/v2.4.2...v2.5.0b1/

- Python
Published by samuelcolvin over 2 years ago

pydantic - v2.4.2 2023-09-27

What's Changed

Fixes

  • Fix bug with JSON schema for sequence of discriminated union by @dmontagu in #7647
  • Fix schema references in discriminated unions by @adriangb in #7646
  • Fix json schema generation for recursive models by @adriangb in #7653
  • Fix models_json_schema for generic models by @adriangb in #7654
  • Fix xfailed test for generic model signatures by @adriangb in #7658

New Contributors

  • @austinorr made their first contribution in #7657
  • @peterHoburg made their first contribution in #7670

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.4.1...v2.4.2/

- Python
Published by hramezani over 2 years ago

pydantic - V1.10.13 2023-09-27

What's Changed

  • Update pip commands to install 1.10 by @chbndrhnns in https://github.com/pydantic/pydantic/pull/6930
  • Make the v1 mypy plugin work with both v1 and v2 by @dmontagu in https://github.com/pydantic/pydantic/pull/6920
  • [Backport] Add max length check to validate_email by @hramezani in https://github.com/pydantic/pydantic/pull/7673

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.12...v1.10.13

- Python
Published by hramezani over 2 years ago

pydantic - v2.4.1 2023-09-26

What's Changed

Packaging

  • Update pydantic-core to 2.10.1 by @davidhewitt in #7633

Fixes

  • Serialize unsubstituted type vars as Any by @adriangb in #7606
  • Remove schema building caches by @adriangb in #7624
  • Fix an issue where JSON schema extras weren't JSON encoded by @dmontagu in #7625

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.4.0...v2.4.1/

- Python
Published by hramezani over 2 years ago

pydantic - v2.4.0 2023-09-25

What's Changed

Packaging

  • Update pydantic-core to 2.10.0 by @samuelcolvin in #7542

New Features

  • Add Base64Url types by @dmontagu in #7286
  • Implement optional number to str coercion by @lig in #7508
  • Allow access to field_name and data in all validators if there is data and a field name by @samuelcolvin in #7542
  • Add BaseModel.model_validate_strings and TypeAdapter.validate_strings by @hramezani in #7552
  • Add Pydantic plugins experimental implementation by @lig @samuelcolvin and @Kludex in #6820

Changes

  • Do not override model_post_init in subclass with private attrs by @Viicos in #7302
  • Make fields with defaults not required in the serialization schema by default by @dmontagu in #7275
  • Mark Extra as deprecated by @disrupted in #7299
  • Make EncodedStr a dataclass by @Kludex in #7396
  • Move annotated_handlers to be public by @samuelcolvin in #7569

Performance

  • Simplify flattening and inlining of CoreSchema by @adriangb in #7523
  • Remove unused copies in CoreSchema walking by @adriangb in #7528
  • Add caches for collecting definitions and invalid schemas from a CoreSchema by @adriangb in #7527
  • Eagerly resolve discriminated unions and cache cases where we can't by @adriangb in #7529
  • Replace dict.get and dict.setdefault with more verbose versions in CoreSchema building hot paths by @adriangb in #7536
  • Cache invalid CoreSchema discovery by @adriangb in #7535
  • Allow disabling CoreSchema validation for faster startup times by @adriangb in #7565

Fixes

  • Fix config detection for TypedDict from grandparent classes by @dmontagu in #7272
  • Fix hash function generation for frozen models with unusual MRO by @dmontagu in #7274
  • Make strict config overridable in field for Path by @hramezani in #7281
  • Use ser_json_<timedelta|bytes> on default in GenerateJsonSchema by @Kludex in #7269
  • Adding a check that alias is validated as an identifier for Python by @andree0 in #7319
  • Raise an error when computed field overrides field by @sydney-runkle in #7346
  • Fix applying SkipValidation to referenced schemas by @adriangb in #7381
  • Enforce behavior of private attributes having double leading underscore by @lig in #7265
  • Standardize __get_pydantic_core_schema__ signature by @hramezani in #7415
  • Fix generic dataclass fields mutation bug (when using TypeAdapter) by @sydney-runkle in #7435
  • Fix TypeError on model_validator in wrap mode by @pmmmwh in #7496
  • Improve enum error message by @hramezani in #7506
  • Make repr work for instances that failed initialization when handling ValidationErrors by @dmontagu in #7439
  • Fixed a regular expression denial of service issue by limiting whitespaces by @prodigysml in #7360
  • Fix handling of UUID values having UUID.version=None by @lig in #7566
  • Fix __iter__ returning private cached_property info by @sydney-runkle in #7570
  • Improvements to version info message by @samuelcolvin in #7594

New Contributors

  • @15498th made their first contribution in #7238
  • @GabrielCappelli made their first contribution in #7213
  • @tobni made their first contribution in #7184
  • @redruin1 made their first contribution in #7282
  • @FacerAin made their first contribution in #7288
  • @acdha made their first contribution in #7297
  • @andree0 made their first contribution in #7319
  • @gordonhart made their first contribution in #7375
  • @pmmmwh made their first contribution in #7496
  • @disrupted made their first contribution in #7299
  • @prodigysml made their first contribution in #7360

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.3.0...v2.4.0

- Python
Published by samuelcolvin over 2 years ago

pydantic - v2.3.0

What's Changed

  • 🔥 Remove orphaned changes file from repo by @lig in https://github.com/pydantic/pydantic/pull/7168
  • Add copy button on documentation by @Kludex in https://github.com/pydantic/pydantic/pull/7190
  • Fix docs on JSON type by @Kludex in https://github.com/pydantic/pydantic/pull/7189
  • Update mypy 1.5.0 to 1.5.1 in CI by @hramezani in https://github.com/pydantic/pydantic/pull/7191
  • fix download links badge by @samuelcolvin in https://github.com/pydantic/pydantic/pull/7200
  • add 2.2.1 to changelog by @samuelcolvin in https://github.com/pydantic/pydantic/pull/7212
  • Make ModelWrapValidator protocols generic by @dmontagu in https://github.com/pydantic/pydantic/pull/7154
  • Correct Field(..., exclude: bool) docs by @samuelcolvin in https://github.com/pydantic/pydantic/pull/7214
  • Make shadowing attributes a warning instead of an error by @adriangb in https://github.com/pydantic/pydantic/pull/7193
  • Document Base64Str and Base64Bytes by @Kludex in https://github.com/pydantic/pydantic/pull/7192
  • Fix config.defer_build for serialization first cases by @samuelcolvin in https://github.com/pydantic/pydantic/pull/7024
  • clean Model docstrings in JSON Schema by @samuelcolvin in https://github.com/pydantic/pydantic/pull/7210
  • fix #7228 (typo): docs in validators.md to correct validate_default kwarg by @lmmx in https://github.com/pydantic/pydantic/pull/7229
  • ✅ Implement tzinfo.fromutc method for TzInfo in pydantic-core by @lig in https://github.com/pydantic/pydantic/pull/7019
  • Support __get_validators__ by @hramezani in https://github.com/pydantic/pydantic/pull/7197

New Contributors

  • @lmmx made their first contribution in https://github.com/pydantic/pydantic/pull/7229

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.2.1...v2.2.2

- Python
Published by adriangb almost 3 years ago

pydantic - v2.2.1 2023-08-18

What's Changed

  • Make xfailing test for root model extra stop xfailing by @dmontagu in https://github.com/pydantic/pydantic/pull/6937
  • Optimize recursion detection by stopping on the second visit for the … by @mciucu in https://github.com/pydantic/pydantic/pull/7160
  • fix link in docs by @tlambert03 in https://github.com/pydantic/pydantic/pull/7166
  • Bump pydantic-core to 2.6.1 and prepare 2.2.1 release by @adriangb in https://github.com/pydantic/pydantic/pull/7176

New Contributors

  • @mciucu made their first contribution in https://github.com/pydantic/pydantic/pull/7160

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.2.0...v2.2.1

- Python
Published by adriangb almost 3 years ago

pydantic - v2.2.0 2023-08-17

What's Changed

  • Split "pipx install" setup command into two commands on the documentation site by @nomadmtb in https://github.com/pydantic/pydantic/pull/6869
  • Deprecate Field.include by @hramezani in https://github.com/pydantic/pydantic/pull/6852
  • Fix typo in default factory error msg by @hramezani in https://github.com/pydantic/pydantic/pull/6880
  • Simplify handling of typing.Annotated in GenerateSchema by @dmontagu in https://github.com/pydantic/pydantic/pull/6887
  • Re-enable fastapi tests in CI by @dmontagu in https://github.com/pydantic/pydantic/pull/6883
  • Make it harder to hit collisions with json schema defrefs by @dmontagu in https://github.com/pydantic/pydantic/pull/6566
  • Cleaner error for invalid input to Path fields by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6903
  • :memo: support Coordinate Type by @yezz123 in https://github.com/pydantic/pydantic/pull/6906
  • Fix ForwardRef wrapper for py 3.10.0 (shim until bpo-45166) by @randomir in https://github.com/pydantic/pydantic/pull/6919
  • Fix misbehavior related to copying of RootModel by @dmontagu in https://github.com/pydantic/pydantic/pull/6918
  • Fix issue with recursion error caused by ParamSpec by @dmontagu in https://github.com/pydantic/pydantic/pull/6923
  • Add section about Constrained classes to the Migration Guide by @Kludex in https://github.com/pydantic/pydantic/pull/6924
  • Use main branch for badge links by @Viicos in https://github.com/pydantic/pydantic/pull/6925
  • Add test for v1/v2 Annotated discrepancy by @carlbordum in https://github.com/pydantic/pydantic/pull/6926
  • Make the v1 mypy plugin work with both v1 and v2 by @dmontagu in https://github.com/pydantic/pydantic/pull/6921
  • Fix issue where generic models couldn't be parametrized with BaseModel by @dmontagu in https://github.com/pydantic/pydantic/pull/6933
  • Remove xfail for discriminated union with alias by @dmontagu in https://github.com/pydantic/pydantic/pull/6938
  • add fieldserializer to computedfield by @andresliszt in https://github.com/pydantic/pydantic/pull/6965
  • Use union_schema with Type[Union[...]] by @JeanArhancet in https://github.com/pydantic/pydantic/pull/6952
  • Fix inherited typeddict attributes / config by @adriangb in https://github.com/pydantic/pydantic/pull/6981
  • fix dataclass annotated before validator called twice by @davidhewitt in https://github.com/pydantic/pydantic/pull/6998
  • Update test-fastapi deselected tests by @hramezani in https://github.com/pydantic/pydantic/pull/7014
  • Fix validator doc format by @hramezani in https://github.com/pydantic/pydantic/pull/7015
  • Fix typo in docstring of modeljsonschema by @AdamVinch-Federated in https://github.com/pydantic/pydantic/pull/7032
  • remove unused "type ignores" with pyright by @samuelcolvin in https://github.com/pydantic/pydantic/pull/7026
  • Add benchmark representing FastAPI startup time by @adriangb in https://github.com/pydantic/pydantic/pull/7030
  • Fix json_encoders for Enum subclasses by @adriangb in https://github.com/pydantic/pydantic/pull/7029
  • Update docstring of ser_json_bytes regarding base64 encoding by @Viicos in https://github.com/pydantic/pydantic/pull/7052
  • Allow @validate_call to work on async methods by @adriangb in https://github.com/pydantic/pydantic/pull/7046
  • Fix: mypy error with Settings and SettingsConfigDict by @JeanArhancet in https://github.com/pydantic/pydantic/pull/7002
  • Fix some typos (repeated words and it's/its) by @eumiro in https://github.com/pydantic/pydantic/pull/7063
  • Fix the typo in docstring by @harunyasar in https://github.com/pydantic/pydantic/pull/7062
  • Docs: Fix broken URL in the pydantic-settings package recommendation by @swetjen in https://github.com/pydantic/pydantic/pull/6995
  • Handle constraints being applied to schemas that don't accept it by @adriangb in https://github.com/pydantic/pydantic/pull/6951
  • Replace almostequalfloats with math.isclose by @eumiro in https://github.com/pydantic/pydantic/pull/7082
  • bump pydantic-core to 2.5.0 by @davidhewitt in https://github.com/pydantic/pydantic/pull/7077
  • Add short_version and use it in links by @hramezani in https://github.com/pydantic/pydantic/pull/7115
  • 📝 Add usage link to RootModel by @Kludex in https://github.com/pydantic/pydantic/pull/7113
  • Revert "Fix default port for mongosrv DSNs (#6827)" by @Kludex in https://github.com/pydantic/pydantic/pull/7116
  • Clarify validate_default and _Unset handling in usage docs and migration guide by @benbenbang in https://github.com/pydantic/pydantic/pull/6950
  • Tweak documentation of Field.exclude by @Viicos in https://github.com/pydantic/pydantic/pull/7086
  • Do not require validate_assignment to use Field.frozen by @Viicos in https://github.com/pydantic/pydantic/pull/7103
  • tweaks to _core_utils by @samuelcolvin in https://github.com/pydantic/pydantic/pull/7040
  • Make DefaultDict working with set by @hramezani in https://github.com/pydantic/pydantic/pull/7126
  • Don't always require typing.Generic as a base for partially parametrized models by @dmontagu in https://github.com/pydantic/pydantic/pull/7119
  • Fix issue with JSON schema incorrectly using parent class core schema by @dmontagu in https://github.com/pydantic/pydantic/pull/7020
  • Fix xfailed test related to TypedDict and alias_generator by @dmontagu in https://github.com/pydantic/pydantic/pull/6940
  • Improve error message for NameEmail by @dmontagu in https://github.com/pydantic/pydantic/pull/6939
  • Fix generic computed fields by @dmontagu in https://github.com/pydantic/pydantic/pull/6988
  • Reflect namedtuple default values during validation by @dmontagu in https://github.com/pydantic/pydantic/pull/7144
  • Update dependencies, fix pydantic-core usage, fix CI issues by @dmontagu in https://github.com/pydantic/pydantic/pull/7150
  • Add mypy 1.5.0 by @hramezani in https://github.com/pydantic/pydantic/pull/7118
  • Handle non-json native enum values by @adriangb in https://github.com/pydantic/pydantic/pull/7056
  • document round_trip in Json type documentation by @jc-louis in https://github.com/pydantic/pydantic/pull/7137
  • Relax signature checks to better support builtins and C extension functions as validators by @adriangb in https://github.com/pydantic/pydantic/pull/7101
  • add unionmode='leftto_right' by @davidhewitt in https://github.com/pydantic/pydantic/pull/7151
  • Include an error message hint for inherited ordering by @yvalencia91 in https://github.com/pydantic/pydantic/pull/7124
  • Fix one docs link and resolve some warnings for two others by @dmontagu in https://github.com/pydantic/pydantic/pull/7153
  • Include Field extra keys name in warning by @hramezani in https://github.com/pydantic/pydantic/pull/7136
  • Prepare for v2.2.0 by @dmontagu in https://github.com/pydantic/pydantic/pull/7157

New Contributors

  • @nomadmtb made their first contribution in https://github.com/pydantic/pydantic/pull/6869
  • @RS-Credentive made their first contribution in https://github.com/pydantic/pydantic/pull/6878
  • @ialarmedalien made their first contribution in https://github.com/pydantic/pydantic/pull/6886
  • @randomir made their first contribution in https://github.com/pydantic/pydantic/pull/6919
  • @carlbordum made their first contribution in https://github.com/pydantic/pydantic/pull/6926
  • @vishallama made their first contribution in https://github.com/pydantic/pydantic/pull/6947
  • @andresliszt made their first contribution in https://github.com/pydantic/pydantic/pull/6965
  • @AdamVinch-Federated made their first contribution in https://github.com/pydantic/pydantic/pull/7032
  • @eumiro made their first contribution in https://github.com/pydantic/pydantic/pull/7063
  • @harunyasar made their first contribution in https://github.com/pydantic/pydantic/pull/7062
  • @mo1ein made their first contribution in https://github.com/pydantic/pydantic/pull/7074
  • @swetjen made their first contribution in https://github.com/pydantic/pydantic/pull/6995
  • @benbenbang made their first contribution in https://github.com/pydantic/pydantic/pull/6950
  • @jc-louis made their first contribution in https://github.com/pydantic/pydantic/pull/7137
  • @yvalencia91 made their first contribution in https://github.com/pydantic/pydantic/pull/7124

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.1.1...v2.2.0

- Python
Published by lig almost 3 years ago

pydantic - v2.1.1 2023-07-25

What's Changed

  • Skip FieldInfo merging when unnecessary by @dmontagu in https://github.com/pydantic/pydantic/pull/6862
  • Prepare 2.1.1 by @dmontagu in https://github.com/pydantic/pydantic/pull/6865

- Python
Published by dmontagu almost 3 years ago

pydantic - v2.1.0 2023-07-25

What's Changed

  • Add StringConstraints for use as Annotated metadata by @adriangb in https://github.com/pydantic/pydantic/pull/6605
  • Try to fix intermittently failing CI by @adriangb in https://github.com/pydantic/pydantic/pull/6683
  • Remove redundant example of optional vs default. by @ehiggs-deliverect in https://github.com/pydantic/pydantic/pull/6676
  • Docs update by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6692
  • Remove the Validate always section in validator docs by @adriangb in https://github.com/pydantic/pydantic/pull/6679
  • Fix recursion error in json schema generation by @adriangb in https://github.com/pydantic/pydantic/pull/6720
  • Fix incorrect subclass check for secretstr by @AlexVndnblcke in https://github.com/pydantic/pydantic/pull/6730
  • update pdm / pdm lockfile to 2.8.0 by @davidhewitt in https://github.com/pydantic/pydantic/pull/6714
  • unpin pdm on more CI jobs by @davidhewitt in https://github.com/pydantic/pydantic/pull/6755
  • improve source locations for auxiliary packages in docs by @davidhewitt in https://github.com/pydantic/pydantic/pull/6749
  • Assume builtins don't accept an info argument by @adriangb in https://github.com/pydantic/pydantic/pull/6754
  • Fix bug where calling help(BaseModelSubclass) raises errors by @hramezani in https://github.com/pydantic/pydantic/pull/6758
  • Fix mypy plugin handling of @model_validator(mode="after") by @ljodal in https://github.com/pydantic/pydantic/pull/6753
  • update pydantic-core to 2.3.1 by @davidhewitt in https://github.com/pydantic/pydantic/pull/6756
  • Mypy plugin for settings by @hramezani in https://github.com/pydantic/pydantic/pull/6760
  • Use contentSchema keyword for JSON schema by @dmontagu in https://github.com/pydantic/pydantic/pull/6715
  • fast-path checking finite decimals by @davidhewitt in https://github.com/pydantic/pydantic/pull/6769
  • Docs update by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6771
  • Improve json schema doc by @hramezani in https://github.com/pydantic/pydantic/pull/6772
  • Update validator docs by @adriangb in https://github.com/pydantic/pydantic/pull/6695
  • Fix typehint for wrap validator by @dmontagu in https://github.com/pydantic/pydantic/pull/6788
  • 🐛 Fix validation warning for unions of Literal and other type by @lig in https://github.com/pydantic/pydantic/pull/6628
  • Update documentation for generics support in V2 by @tpdorsey in https://github.com/pydantic/pydantic/pull/6685
  • add pydantic-core build info to version_info() by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6785
  • Fix pydantic dataclasses that use slots with default values by @dmontagu in https://github.com/pydantic/pydantic/pull/6796
  • Fix inheritance of hash function for frozen models by @dmontagu in https://github.com/pydantic/pydantic/pull/6789
  • ✨ Add SkipJsonSchema annotation by @Kludex in https://github.com/pydantic/pydantic/pull/6653
  • Error if an invalid field name is used with Field by @dmontagu in https://github.com/pydantic/pydantic/pull/6797
  • Add GenericModel to MOVEDINV2 by @adriangb in https://github.com/pydantic/pydantic/pull/6776
  • Remove unused code from docs/usage/types/custom.md by @hramezani in https://github.com/pydantic/pydantic/pull/6803
  • Fix float -> Decimal coercion precision loss by @adriangb in https://github.com/pydantic/pydantic/pull/6810
  • remove email validation from the north star benchmark by @davidhewitt in https://github.com/pydantic/pydantic/pull/6816
  • Fix link to mypy by @progsmile in https://github.com/pydantic/pydantic/pull/6824
  • Improve initialization hooks example by @hramezani in https://github.com/pydantic/pydantic/pull/6822
  • Fix default port for mongosrv DSNs by @dmontagu in https://github.com/pydantic/pydantic/pull/6827
  • Improve API documentation, in particular more links between usage and API docs by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6780
  • update pydantic-core to 2.4.0 by @davidhewitt in https://github.com/pydantic/pydantic/pull/6831
  • Fix annotated_types.MaxLen validator for custom sequence types by @ImogenBits in https://github.com/pydantic/pydantic/pull/6809
  • Update V1 by @hramezani in https://github.com/pydantic/pydantic/pull/6833
  • Make it so callable JSON schema extra works by @dmontagu in https://github.com/pydantic/pydantic/pull/6798
  • Fix serialization issue with InstanceOf by @dmontagu in https://github.com/pydantic/pydantic/pull/6829
  • Add back support for json_encoders by @adriangb in https://github.com/pydantic/pydantic/pull/6811
  • Update field annotations when building the schema by @dmontagu in https://github.com/pydantic/pydantic/pull/6838
  • Use WeakValueDictionary to fix generic memory leak by @dmontagu in https://github.com/pydantic/pydantic/pull/6681
  • Add config.defer_build to optionally make model building lazy by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6823
  • delegate UUID serialization to pydantic-core by @davidhewitt in https://github.com/pydantic/pydantic/pull/6850
  • Update json_encoders docs by @adriangb in https://github.com/pydantic/pydantic/pull/6848
  • Fix error message for staticmethod/classmethod order with validate_call by @dmontagu in https://github.com/pydantic/pydantic/pull/6686
  • Improve documentation for config by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6847
  • Update serialization doc to mention Field.exclude takes priority over call-time include/exclude by @hramezani in https://github.com/pydantic/pydantic/pull/6851
  • Allow customizing core schema generation by making GenerateSchema public by @adriangb in https://github.com/pydantic/pydantic/pull/6737
  • Prepare for release of v2.1.0 by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6853

New Contributors

  • @ehiggs-deliverect made their first contribution in https://github.com/pydantic/pydantic/pull/6676
  • @AlexVndnblcke made their first contribution in https://github.com/pydantic/pydantic/pull/6730
  • @ljodal made their first contribution in https://github.com/pydantic/pydantic/pull/6753
  • @progsmile made their first contribution in https://github.com/pydantic/pydantic/pull/6824
  • @ImogenBits made their first contribution in https://github.com/pydantic/pydantic/pull/6809

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.0.3...v2.1.0

- Python
Published by samuelcolvin almost 3 years ago

pydantic - V1.10.12

What's Changed

  • Deque's maxlen property dropped on V1 validation by @maciekglowka in https://github.com/pydantic/pydantic/pull/6586
  • Prepare release 1.10.12 by @hramezani in https://github.com/pydantic/pydantic/pull/6825

New Contributors

  • @maciekglowka made their first contribution in https://github.com/pydantic/pydantic/pull/6586

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.11...v1.10.12

- Python
Published by hramezani almost 3 years ago

pydantic - v2.0.3

What's Changed

  • Mention PyObject (v1) moving to ImportString (v2) in migration doc by @slafs in https://github.com/pydantic/pydantic/pull/6456
  • Fix release-tweet CI by @Kludex in https://github.com/pydantic/pydantic/pull/6461
  • Revise the section on required / optional / nullable fields. by @ybressler in https://github.com/pydantic/pydantic/pull/6468
  • Warn if a type hint is not in fact a type by @adriangb in https://github.com/pydantic/pydantic/pull/6479
  • Replace TransformSchema with GetPydanticSchema by @dmontagu in https://github.com/pydantic/pydantic/pull/6484
  • Fix the un-hashability of various annotation types, for use in caching generic containers by @dmontagu in https://github.com/pydantic/pydantic/pull/6480
  • PYD-164: Rework custom types docs by @adriangb in https://github.com/pydantic/pydantic/pull/6490
  • Fix ci by @adriangb in https://github.com/pydantic/pydantic/pull/6507
  • Fix forward ref in generic by @adriangb in https://github.com/pydantic/pydantic/pull/6511
  • Fix generation of serialization JSON schemas for core_schema.ChainSchema by @dmontagu in https://github.com/pydantic/pydantic/pull/6515
  • Document the change in Field.alias behavior in Pydantic V2 by @hramezani in https://github.com/pydantic/pydantic/pull/6508
  • Give better error message attempting to compute the json schema of a model with undefined fields by @dmontagu in https://github.com/pydantic/pydantic/pull/6519
  • Document alias_priority by @tpdorsey in https://github.com/pydantic/pydantic/pull/6520
  • Add redirect for types documentation by @tpdorsey in https://github.com/pydantic/pydantic/pull/6513
  • Allow updating docs without release by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6551
  • Ensure docs tests always run in the right folder by @dmontagu in https://github.com/pydantic/pydantic/pull/6487
  • Defer evaluation of return type hints for serializer functions by @dmontagu in https://github.com/pydantic/pydantic/pull/6516
  • Disable E501 from Ruff and rely on just Black by @adriangb in https://github.com/pydantic/pydantic/pull/6552
  • Update JSON Schema documentation for V2 by @tpdorsey in https://github.com/pydantic/pydantic/pull/6492
  • Add documentation of cyclic reference handling by @dmontagu in https://github.com/pydantic/pydantic/pull/6493
  • Remove the need for change files by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6556
  • add "north star" benchmark by @davidhewitt in https://github.com/pydantic/pydantic/pull/6547
  • Update Dataclasses docs by @tpdorsey in https://github.com/pydantic/pydantic/pull/6470
  • ♻️ Use different error message on v1 redirects by @Kludex in https://github.com/pydantic/pydantic/pull/6595
  • ⬆ Upgrade pydantic-core to v2.2.0 by @lig in https://github.com/pydantic/pydantic/pull/6589
  • Fix serialization for IPvAny by @dmontagu in https://github.com/pydantic/pydantic/pull/6572
  • Improve CI by using PDM instead of pip to install typing-extensions by @adriangb in https://github.com/pydantic/pydantic/pull/6602
  • Add enum error type docs by @lig in https://github.com/pydantic/pydantic/pull/6603
  • 🐛 Fix max_length for unicode strings by @lig in https://github.com/pydantic/pydantic/pull/6559
  • Add documentation for accessing features via pydantic.v1 by @tpdorsey in https://github.com/pydantic/pydantic/pull/6604
  • Include extra when iterating over a model by @adriangb in https://github.com/pydantic/pydantic/pull/6562
  • Fix typing of model_validator by @adriangb in https://github.com/pydantic/pydantic/pull/6514
  • Touch up Decimal validator by @adriangb in https://github.com/pydantic/pydantic/pull/6327
  • Fix various docstrings using fixed pytest-examples by @dmontagu in https://github.com/pydantic/pydantic/pull/6607
  • Handle function validators in a discriminated union by @dmontagu in https://github.com/pydantic/pydantic/pull/6570
  • Review json_schema.md by @tpdorsey in https://github.com/pydantic/pydantic/pull/6608
  • Make validate_call work on basemodel methods by @dmontagu in https://github.com/pydantic/pydantic/pull/6569
  • add test for big int json serde by @davidhewitt in https://github.com/pydantic/pydantic/pull/6614
  • Fix pydantic dataclass problem with dataclasses.field default_factory by @hramezani in https://github.com/pydantic/pydantic/pull/6616
  • Fixed mypy type inferrence for TypeAdapter by @zakstucke in https://github.com/pydantic/pydantic/pull/6617
  • Make it work to use None as a generic parameter by @dmontagu in https://github.com/pydantic/pydantic/pull/6609
  • Make it work to use $ref as an alias by @dmontagu in https://github.com/pydantic/pydantic/pull/6568
  • add note to migration guide about changes to AnyUrl etc by @davidhewitt in https://github.com/pydantic/pydantic/pull/6618
  • 🐛 Support defining json_schema_extra on RootModel using Field by @lig in https://github.com/pydantic/pydantic/pull/6622
  • Update pre-commit to prevent commits to main branch on accident by @dmontagu in https://github.com/pydantic/pydantic/pull/6636
  • Fix PDM CI for python 3.7 on MacOS/windows by @dmontagu in https://github.com/pydantic/pydantic/pull/6627
  • Produce more accurate signatures for pydantic dataclasses by @dmontagu in https://github.com/pydantic/pydantic/pull/6633
  • Updates to Url types for Pydantic V2 by @tpdorsey in https://github.com/pydantic/pydantic/pull/6638
  • Fix list markdown in transform docstring by @StefanBRas in https://github.com/pydantic/pydantic/pull/6649
  • simplify slots_dataclass construction to appease mypy by @davidhewitt in https://github.com/pydantic/pydantic/pull/6639
  • Update TypedDict schema generation docstring by @adriangb in https://github.com/pydantic/pydantic/pull/6651
  • Detect and lint-error for prints by @dmontagu in https://github.com/pydantic/pydantic/pull/6655
  • Add xfailing test for pydantic-core PR 766 by @dmontagu in https://github.com/pydantic/pydantic/pull/6641
  • Ignore unrecognized fields from dataclasses metadata by @dmontagu in https://github.com/pydantic/pydantic/pull/6634
  • Make non-existent class getattr a mypy error by @dmontagu in https://github.com/pydantic/pydantic/pull/6658
  • Update pydantic-core to 2.3.0 by @hramezani in https://github.com/pydantic/pydantic/pull/6648
  • Use OrderedDict from typing_extensions by @dmontagu in https://github.com/pydantic/pydantic/pull/6664
  • Fix typehint for JSON schema extra callable by @dmontagu in https://github.com/pydantic/pydantic/pull/6659

New Contributors

  • @slafs made their first contribution in https://github.com/pydantic/pydantic/pull/6456
  • @zakstucke made their first contribution in https://github.com/pydantic/pydantic/pull/6617
  • @StefanBRas made their first contribution in https://github.com/pydantic/pydantic/pull/6649

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.0.2...v2.03

- Python
Published by adriangb almost 3 years ago

pydantic - v2.0.2 2023-07-05

What's Changed

  • 💚 Insert the version without double quotes on tweet by @Kludex in https://github.com/pydantic/pydantic/pull/6437
  • tests - test for #6416 by @commonism in https://github.com/pydantic/pydantic/pull/6424
  • Fix the changelog address on pyproject.toml by @hakancelikdev in https://github.com/pydantic/pydantic/pull/6445
  • Fix GenerateJsonSchema.generate_definitions signature by @dmontagu in https://github.com/pydantic/pydantic/pull/6436
  • Fix list indentation by @ofek in https://github.com/pydantic/pydantic/pull/6408
  • Docs: Fixing constr argument regex -> pattern // Typo by @miili in https://github.com/pydantic/pydantic/pull/6452
  • 👷 Require change files by @Kludex in https://github.com/pydantic/pydantic/pull/6428
  • 💚 Fix git usage in FastAPI integration tests by @lig in https://github.com/pydantic/pydantic/pull/6434
  • Update pydantic-core to 2.1.2 by @adriangb in https://github.com/pydantic/pydantic/pull/6392
  • Fix issue with union parsing of enums by @dmontagu in https://github.com/pydantic/pydantic/pull/6440
  • Allow single-item discriminated unions by @dmontagu in https://github.com/pydantic/pydantic/pull/6405
  • Fix pickling of RootModel by @dmontagu in https://github.com/pydantic/pydantic/pull/6457
  • Prepare for v2.0.2 by @dmontagu in https://github.com/pydantic/pydantic/pull/6460

New Contributors

  • @hakancelikdev made their first contribution in https://github.com/pydantic/pydantic/pull/6445
  • @miili made their first contribution in https://github.com/pydantic/pydantic/pull/6452

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.0.1...v2.0.2

- Python
Published by dmontagu almost 3 years ago

pydantic - v2.0.1 2023-07-04

What's Changed

  • 📝 Add note about Bump Pydantic by @Kludex in https://github.com/pydantic/pydantic/pull/6281
  • Parse Decimal in python to avoid precision loss by @adriangb in https://github.com/pydantic/pydantic/pull/6321
  • Fix typo of model_parametrized_name in docs/usage/models.md by @hramezani in https://github.com/pydantic/pydantic/pull/6325
  • fix(docs): typo fix for docs by @ozgurturkiye in https://github.com/pydantic/pydantic/pull/6335
  • Allow __modify_schema__ to co-exist __get_pydantic_json_schema__ by @adriangb in https://github.com/pydantic/pydantic/pull/6334
  • Fix tagged unions multiple processing in submodels by @suharnikov in https://github.com/pydantic/pydantic/pull/6340
  • Unpack json schema refs for custom types by @adriangb in https://github.com/pydantic/pydantic/pull/6315
  • Fix typo in create_model function by @TimDiekmann in https://github.com/pydantic/pydantic/pull/6347
  • Update README.md by @weqopy in https://github.com/pydantic/pydantic/pull/6363
  • Adding extra field via setattr adds field to model_extra by @aaraney in https://github.com/pydantic/pydantic/pull/6365
  • Fix validate_call schema generation and doc error for TypedDict by @adriangb in https://github.com/pydantic/pydantic/pull/6370
  • :memo: Include Mac Address documentation by @yezz123 in https://github.com/pydantic/pydantic/pull/6367
  • Remove warning from top of docs/usage/types/encoded.md by @hramezani in https://github.com/pydantic/pydantic/pull/6377
  • Remove datamodel code generator not working warning from doc by @hramezani in https://github.com/pydantic/pydantic/pull/6378
  • Fix some uses of Field inside of Annotated by @adriangb in https://github.com/pydantic/pydantic/pull/6373
  • 🔨 Include pydantic-extra-types to integration tests by @yezz123 in https://github.com/pydantic/pydantic/pull/6344
  • add davidhewitt to hooky respondents by @davidhewitt in https://github.com/pydantic/pydantic/pull/6385
  • Update pydantic-core to 2.0.2 by @adriangb in https://github.com/pydantic/pydantic/pull/6389
  • 🐛 Don't call repr() on qualname retrieval by @Kludex in https://github.com/pydantic/pydantic/pull/6382
  • Warn instead of error protected namespace by @dmontagu in https://github.com/pydantic/pydantic/pull/6326
  • Do not recommend raising TypeError in validators by @Viicos in https://github.com/pydantic/pydantic/pull/6391
  • Test model_extra is None when extra='forbid' by @dmontagu in https://github.com/pydantic/pydantic/pull/6341
  • Remove --verbose flag from docs build to clean up CI logs by @adriangb in https://github.com/pydantic/pydantic/pull/6399
  • Add note about changes to regex engine used by @adriangb in https://github.com/pydantic/pydantic/pull/6400
  • Allow combining Field annotations by merging them by @adriangb in https://github.com/pydantic/pydantic/pull/6398
  • BaseSettings moved, not removed by @tpdorsey in https://github.com/pydantic/pydantic/pull/6401
  • Bind validate_call to instance when decorating methods by @dmontagu in https://github.com/pydantic/pydantic/pull/6406
  • 💚 Use "result" instead of "status" on GitHub Action conditional by @Kludex in https://github.com/pydantic/pydantic/pull/6410
  • Update models.md by @dmontagu in https://github.com/pydantic/pydantic/pull/6331
  • 🐛 Add __hash__ for WithJsonSchema and Examples by @Kludex in https://github.com/pydantic/pydantic/pull/6414
  • 🐛 Fix generic tuple cannot have more than one item by @lig in https://github.com/pydantic/pydantic/pull/6384
  • Upate mypy plugin to consider pydantic-settings model by @hramezani in https://github.com/pydantic/pydantic/pull/6396
  • Improve BaseModel.__getattr__ to raise a better error in case of AttributeError in model property by @hramezani in https://github.com/pydantic/pydantic/pull/6417
  • Fix issue where validate_call methods would break when accessed as a class attribute by @dmontagu in https://github.com/pydantic/pydantic/pull/6431
  • Update Pydantic V1 to 1.10.11 by @hramezani in https://github.com/pydantic/pydantic/pull/6427
  • Rework how JSON schema refs get built/"simplified" by @dmontagu in https://github.com/pydantic/pydantic/pull/6402
  • Prepare for v2.0.1 by @dmontagu in https://github.com/pydantic/pydantic/pull/6433
  • 💚 Use main-pv2 FastAPI branch in integration tests by @lig in https://github.com/pydantic/pydantic/pull/6432

New Contributors

  • @ozgurturkiye made their first contribution in https://github.com/pydantic/pydantic/pull/6335
  • @suharnikov made their first contribution in https://github.com/pydantic/pydantic/pull/6340
  • @TimDiekmann made their first contribution in https://github.com/pydantic/pydantic/pull/6347
  • @weqopy made their first contribution in https://github.com/pydantic/pydantic/pull/6363
  • @aaraney made their first contribution in https://github.com/pydantic/pydantic/pull/6365

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.0...v2.0.1

- Python
Published by dmontagu almost 3 years ago

pydantic - V1.10.11

What's Changed

  • Fix import of create_model in tools.py by @SharathHuddar in https://github.com/pydantic/pydantic/pull/6364
  • Prepare for 1.10.11 by @hramezani in https://github.com/pydantic/pydantic/pull/6420

New Contributors

  • @SharathHuddar made their first contribution in https://github.com/pydantic/pydantic/pull/6364

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.10...v1.10.11

- Python
Published by hramezani almost 3 years ago

pydantic - v2.0 2023-06-30

What's Changed

  • 📝 Don't recomend to use TypeError on validators by @Kludex in https://github.com/pydantic/pydantic/pull/6179
  • 📝 Add docs about custom error messages by @Kludex in https://github.com/pydantic/pydantic/pull/6182
  • Change allow mutation wording by @mark-todd in https://github.com/pydantic/pydantic/pull/6184
  • 📝 Improve fields documentation by @Kludex in https://github.com/pydantic/pydantic/pull/6183
  • Ignore deprecated methods of pydantic.main in pydocstyle check by @hramezani in https://github.com/pydantic/pydantic/pull/6185
  • Another solution to custom getattr/delattr by @dmontagu in https://github.com/pydantic/pydantic/pull/6165
  • 🐛 Fix RootModel default values by @lig in https://github.com/pydantic/pydantic/pull/5949
  • Improve conversion_table by @hramezani in https://github.com/pydantic/pydantic/pull/6186
  • Uncomment from_orm deprecated decorator by @hramezani in https://github.com/pydantic/pydantic/pull/6189
  • Complete pydantic/root_model.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6193
  • Complete pydantic/functional_validators.py docstrings by @hramezani in https://github.com/pydantic/pydantic/pull/6191
  • Fix access of 'required' key for TypedDictField in GenerateJsonSchema by @adriangb in https://github.com/pydantic/pydantic/pull/6200
  • 💚 Use the same conditions on send_tweet as release by @Kludex in https://github.com/pydantic/pydantic/pull/6170
  • 📝 Add migration reference to the "Import Error" section by @Kludex in https://github.com/pydantic/pydantic/pull/6208
  • Improve pydantic/mypy.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6207
  • 📝 Update documentation about "Number Types" by @Kludex in https://github.com/pydantic/pydantic/pull/6211
  • Don't sort model keys by @adriangb in https://github.com/pydantic/pydantic/pull/6212
  • Add documentation for strict mode by @tpdorsey in https://github.com/pydantic/pydantic/pull/6196
  • Add documentation for strict types by @tpdorsey in https://github.com/pydantic/pydantic/pull/6218
  • Update serialization decorator documentation by @tpdorsey in https://github.com/pydantic/pydantic/pull/6216
  • Update list and set docs by @dmontagu in https://github.com/pydantic/pydantic/pull/6142
  • Update docs for sequence_iterable by @dmontagu in https://github.com/pydantic/pydantic/pull/6220
  • 👷 Add Integration CI workflow for pydantic-settings by @lig in https://github.com/pydantic/pydantic/pull/6221
  • ⬆ Upgrade to pydantic-core 0.41.0 by @lig in https://github.com/pydantic/pydantic/pull/6219
  • Document Strict on Annotated fields by @tpdorsey in https://github.com/pydantic/pydantic/pull/6223
  • 🐛 Fix crash on serializing a union of RootModel and BaseModel by @lig in https://github.com/pydantic/pydantic/pull/6201
  • Run docstring tests by @dmontagu in https://github.com/pydantic/pydantic/pull/6175
  • Add documentation for PlainSerializer and WrapSerializer by @tpdorsey in https://github.com/pydantic/pydantic/pull/6230
  • Improve mypy documentation by @hramezani in https://github.com/pydantic/pydantic/pull/6226
  • 🚸 Improve error message when BaseSettings is imported by @Kludex in https://github.com/pydantic/pydantic/pull/6229
  • correct deprecation warning for parse_file by @davidhewitt in https://github.com/pydantic/pydantic/pull/6228
  • Update migration docs to include a note about parse_env_var removal by @hramezani in https://github.com/pydantic/pydantic/pull/6235
  • Add warning about datamodel-code-generator to docs by @hramezani in https://github.com/pydantic/pydantic/pull/6236
  • PYD-124: improve docs for __get_pydantic_core_schema__ by @adriangb in https://github.com/pydantic/pydantic/pull/6224
  • Minor edits from review of Enum docs by @tpdorsey in https://github.com/pydantic/pydantic/pull/6238
  • Update and consolidate links in number types by @tpdorsey in https://github.com/pydantic/pydantic/pull/6239
  • Update V2 vs V1 section in README.md by @adriangb in https://github.com/pydantic/pydantic/pull/6242
  • Add type key to enums by @adriangb in https://github.com/pydantic/pydantic/pull/6243
  • 🐛 Restrict range on Python version for _make_forward_ref by @Kludex in https://github.com/pydantic/pydantic/pull/6246
  • 💚 Add timeout on publish_docs job by @Kludex in https://github.com/pydantic/pydantic/pull/6247
  • 👷 Enable FastAPI tests by @Kludex in https://github.com/pydantic/pydantic/pull/6249
  • docs: use pydanticcore.pyi as only docs source for now by @davidhewitt in https://github.com/pydantic/pydantic/pull/6257
  • Reorder basemodel methods by @dmontagu in https://github.com/pydantic/pydantic/pull/6260
  • Improve file type docs by @hramezani in https://github.com/pydantic/pydantic/pull/6252
  • 🔧 Add assignees list to the hooky config by @lig in https://github.com/pydantic/pydantic/pull/6264
  • Document "wrap" validators by @tpdorsey in https://github.com/pydantic/pydantic/pull/6258
  • Update validate_call documentation by @tpdorsey in https://github.com/pydantic/pydantic/pull/6255
  • 📝 Update docs about hypothesis by @Kludex in https://github.com/pydantic/pydantic/pull/6266
  • Update docs for validation errors by @dmontagu in https://github.com/pydantic/pydantic/pull/6262
  • 📝 Improve docstrings on json_schema.py by @Kludex in https://github.com/pydantic/pydantic/pull/6267
  • Update internal links to be compatible with versions by @tpdorsey in https://github.com/pydantic/pydantic/pull/6271
  • Update pydantic-core to 0.42.0 by @adriangb in https://github.com/pydantic/pydantic/pull/6272
  • 📝 Add documentation on Special Types by @Kludex in https://github.com/pydantic/pydantic/pull/6269
  • Fix deduplication of Enum refs in CoreSchema by @adriangb in https://github.com/pydantic/pydantic/pull/6274
  • 🔥 Remove final keyword from Field by @Kludex in https://github.com/pydantic/pydantic/pull/6284
  • Fix relative links for logos by @tpdorsey in https://github.com/pydantic/pydantic/pull/6285
  • 🐛 Fix TypeError on mixed discriminated unions by @lig in https://github.com/pydantic/pydantic/pull/6282
  • Defer building discriminated unions until after all schemas are defined by @adriangb in https://github.com/pydantic/pydantic/pull/6288
  • Update the return type for RootModel.model_dump and document how to override it by @dmontagu in https://github.com/pydantic/pydantic/pull/6290
  • 🐛 Fix RootModel.construct() and RootModel.__init__() results aren't equal by @lig in https://github.com/pydantic/pydantic/pull/6283
  • Improve the rendering of the conversion table by @dmontagu in https://github.com/pydantic/pydantic/pull/6275
  • Fix privateattr clobbering classvars with future annotations by @dmontagu in https://github.com/pydantic/pydantic/pull/6287
  • Add documentation of Strict Mode by @dmontagu in https://github.com/pydantic/pydantic/pull/6276
  • 💥 Use custom PydanticDeprecationWarning warning instead of the generic one by @lig in https://github.com/pydantic/pydantic/pull/6180
  • PYD-140: Fix use_enum_values config flag by @adriangb in https://github.com/pydantic/pydantic/pull/6294
  • PYD-142: Fix use of Annotated + Field for dataclasses by @adriangb in https://github.com/pydantic/pydantic/pull/6293
  • Add missing metadata to computed field JSON schemas by @dmontagu in https://github.com/pydantic/pydantic/pull/6299
  • Move export_models to serialization by @tpdorsey in https://github.com/pydantic/pydantic/pull/6303
  • Review custom types by @tpdorsey in https://github.com/pydantic/pydantic/pull/6292
  • Improve types dict mapping doc by @hramezani in https://github.com/pydantic/pydantic/pull/6265
  • Change mypy tests to put comments in-line in a python module by @dmontagu in https://github.com/pydantic/pydantic/pull/6305
  • Update installation for release by @tpdorsey in https://github.com/pydantic/pydantic/pull/6289
  • Blog and announce bar for v2 release by @tpdorsey in https://github.com/pydantic/pydantic/pull/6291
  • Review and update Standard Types by @tpdorsey in https://github.com/pydantic/pydantic/pull/6240
  • Update Pydantic V1 to 1.10.10 by @hramezani in https://github.com/pydantic/pydantic/pull/6311
  • Document validation context, and fix up some other issues with validators.md by @dmontagu in https://github.com/pydantic/pydantic/pull/6256
  • adding page about version compatibility by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6309
  • 📝 Add note about page not up-to-date by @Kludex in https://github.com/pydantic/pydantic/pull/6312
  • pydantic-core 2.0.1 by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6310
  • Update mypy plugin by @dmontagu in https://github.com/pydantic/pydantic/pull/6306
  • PYD-131 Links between API and usage docs by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6307
  • Remove warning on top of docs/usage/types/callables.md by @hramezani in https://github.com/pydantic/pydantic/pull/6318
  • Index improvements by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6314
  • Prepare for release by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6319

New Contributors

  • @davidhewitt made their first contribution in https://github.com/pydantic/pydantic/pull/6228

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.0b3...v2.0

- Python
Published by samuelcolvin almost 3 years ago

pydantic - V1.10.10

What's Changed

  • Fix racy doctests by @K900 in https://github.com/pydantic/pydantic/pull/6103
  • ✅ Update FastAPI test script by @Kludex in https://github.com/pydantic/pydantic/pull/6117
  • add roadmap to annoucement by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6120
  • Fixed literal validator errors for unhashable values by @markus1978 in https://github.com/pydantic/pydantic/pull/6194
  • Bug fix for forward refs in generics by @mark-todd in https://github.com/pydantic/pydantic/pull/6157
  • Add Pydantic Json field support to settings management by @hramezani in https://github.com/pydantic/pydantic/pull/6250

New Contributors

  • @K900 made their first contribution in https://github.com/pydantic/pydantic/pull/6103
  • @markus1978 made their first contribution in https://github.com/pydantic/pydantic/pull/6194

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.9...v1.10.10

- Python
Published by hramezani almost 3 years ago

pydantic - v2.0b3 2023-06-16

What's Changed

  • Fix SchemaError when multiple computed fields point to the same type by @adriangb in https://github.com/pydantic/pydantic/pull/5987
  • Fix bug in BaseModel signature generation when a field uses Annotated by @adriangb in https://github.com/pydantic/pydantic/pull/5990
  • Fix json schema for single empty tuple by @adriangb in https://github.com/pydantic/pydantic/pull/5988
  • Fix testextrausedasenum to use pytest.warns() by @mgorny in https://github.com/pydantic/pydantic/pull/5994
  • Improve test coverage of pydantic.internal.typing_extra by @hramezani in https://github.com/pydantic/pydantic/pull/5978
  • 🗑️ Deprecate Color and PaymentCardNumber by @Kludex in https://github.com/pydantic/pydantic/pull/6003
  • Allow __pydantic_config__ to be used on vanilla dataclasses by @adriangb in https://github.com/pydantic/pydantic/pull/6008
  • Give nicer error when using a bare root_validator by @dmontagu in https://github.com/pydantic/pydantic/pull/6009
  • Fix bug with model_construct when extra=allow by @dmontagu in https://github.com/pydantic/pydantic/pull/6012
  • 👷 Add mkdocs-material-insiders to pipeline by @Kludex in https://github.com/pydantic/pydantic/pull/6014
  • Add more types to conversion table by @hramezani in https://github.com/pydantic/pydantic/pull/6005
  • 📝 Add documentation for model_config by @Kludex in https://github.com/pydantic/pydantic/pull/6021
  • 📦 Import RootModel dynamically when accessed directly only by @lig in https://github.com/pydantic/pydantic/pull/5951
  • 🐛 Fix aliases priority by @Kludex in https://github.com/pydantic/pydantic/pull/6023
  • Improve usage models doc by @hramezani in https://github.com/pydantic/pydantic/pull/6019
  • 📝 Add documentation for PhoneNumber and ABARoutingNumber by @Kludex in https://github.com/pydantic/pydantic/pull/6031
  • Improve docs/usage/exporting_models doc by @hramezani in https://github.com/pydantic/pydantic/pull/6030
  • 📝 Include API documentation for pydantic-settings by @Kludex in https://github.com/pydantic/pydantic/pull/6035
  • Fix api links in docs by @hramezani in https://github.com/pydantic/pydantic/pull/6036
  • 💚 Remove installation of mkdocs-material-insiders on forks by @Kludex in https://github.com/pydantic/pydantic/pull/6037
  • Add tests for mypy inspection of metaclass arguments by @cpratt34 in https://github.com/pydantic/pydantic/pull/5982
  • Sort produced json schemas by @adriangb in https://github.com/pydantic/pydantic/pull/6043
  • Add 1.10 releases to HISTORY.md by @hramezani in https://github.com/pydantic/pydantic/pull/6044
  • Improve docs/usage/dataclasses.md by @hramezani in https://github.com/pydantic/pydantic/pull/6046
  • 📝 Reference ConfigDict API documentation from model_config.md by @Kludex in https://github.com/pydantic/pydantic/pull/6047
  • 📝 Update postponed_annotations.md documentation by @Kludex in https://github.com/pydantic/pydantic/pull/6048
  • 📝 Add API documentation for pydantic-extra-types by @Kludex in https://github.com/pydantic/pydantic/pull/6050
  • 📝 Add docstrings for top level modules by @Kludex in https://github.com/pydantic/pydantic/pull/6053
  • 📝 Update documentation for the color module by @Kludex in https://github.com/pydantic/pydantic/pull/6057
  • Update datetime.md by @Phantom1472 in https://github.com/pydantic/pydantic/pull/6061
  • Add API docs file for root_model.py (issue DOC-3) by @dmontagu in https://github.com/pydantic/pydantic/pull/6060
  • Improve docs/usage/types/string_types.md by @hramezani in https://github.com/pydantic/pydantic/pull/6058
  • Minor docs improvements by @dmontagu in https://github.com/pydantic/pydantic/pull/6064
  • Update dataclasses.py docstrings by @dmontagu in https://github.com/pydantic/pydantic/pull/6065
  • Docstring formatting fixes for dataclasses and functional_validators by @tpdorsey in https://github.com/pydantic/pydantic/pull/6063
  • Add pydocstyle ruff rules by @Kludex in https://github.com/pydantic/pydantic/pull/6067
  • Specify members to appear in documentation for pydantic_core by @tpdorsey in https://github.com/pydantic/pydantic/pull/6062
  • 📝 Update docstings on networks.py by @Kludex in https://github.com/pydantic/pydantic/pull/6069
  • 📝 Add docstrings on version.py by @Kludex in https://github.com/pydantic/pydantic/pull/6070
  • 📝 Update install.md documentation by @Kludex in https://github.com/pydantic/pydantic/pull/6071
  • Create fields.md on the documentation by @Kludex in https://github.com/pydantic/pydantic/pull/6072
  • Fix broken and incorrectly formatting internal links by @tpdorsey in https://github.com/pydantic/pydantic/pull/6075
  • Document docstring requirements with examples by @tpdorsey in https://github.com/pydantic/pydantic/pull/6081
  • ✅ Update installation of FastAPI for tests by @tiangolo in https://github.com/pydantic/pydantic/pull/6084
  • Improve config docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6066
  • Allow applying serializers and constraints to named/ref schemas by @adriangb in https://github.com/pydantic/pydantic/pull/6007
  • Improve pydantic/_internal/_annotated_handlers.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6086
  • 🔥 Remove Google Analytics by @Kludex in https://github.com/pydantic/pydantic/pull/6087
  • 📝 Add docstrings for functional_serializers.py by @Kludex in https://github.com/pydantic/pydantic/pull/6092
  • Update datetime usage docs by @dmontagu in https://github.com/pydantic/pydantic/pull/6077
  • Update Pydantic V1 to 1.10.9 by @hramezani in https://github.com/pydantic/pydantic/pull/6093
  • Replace pydantic with Pydantic in docs by @tpdorsey in https://github.com/pydantic/pydantic/pull/6097
  • Improve docs/usage/errors.md docs by @hramezani in https://github.com/pydantic/pydantic/pull/6098
  • 📝 Add docstrings to types.py by @Kludex in https://github.com/pydantic/pydantic/pull/6091
  • 📝 Improve fields.py docstring by @Kludex in https://github.com/pydantic/pydantic/pull/6088
  • ♻️ Remove SecretField from public API by @Kludex in https://github.com/pydantic/pydantic/pull/6094
  • Update generic custom type example in docs/usage/types/custom.md by @adriangb in https://github.com/pydantic/pydantic/pull/5935
  • Update pydantic-core by @adriangb in https://github.com/pydantic/pydantic/pull/5958
  • Fix __get_pydantic_core_schema__ for Enum by @adriangb in https://github.com/pydantic/pydantic/pull/6100
  • Improve pydantic/_internal/_dataclasses.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6105
  • Replace deprecated-kwargs with removed-kwargs by @hramezani in https://github.com/pydantic/pydantic/pull/6107
  • 📝 Improve "Config Model" documentation by @Kludex in https://github.com/pydantic/pydantic/pull/6108
  • 📝 Add docstrings to type_adapter.py by @Kludex in https://github.com/pydantic/pydantic/pull/6109
  • 📝 Move "Arbitrary Types Allowed" section to "Model Config" page by @Kludex in https://github.com/pydantic/pydantic/pull/6110
  • Simplify our usage of handler.generate_schema() to simplify explaining it in the docs by @adriangb in https://github.com/pydantic/pydantic/pull/6102
  • Improve pydantic/_internal/_core_metadata.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6089
  • Improve pydantic/_internal/_decorators.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6114
  • Fix typo in errors doc by @hramezani in https://github.com/pydantic/pydantic/pull/6118
  • add road-map to annoucement bar by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6119
  • Document the behavior of non-hashable default values by @dmontagu in https://github.com/pydantic/pydantic/pull/6122
  • Fix extra fields behavior for TypedDict and make additionalProperties explicit in JSON schema by @adriangb in https://github.com/pydantic/pydantic/pull/6115
  • Skip test test_del_model_attr_error to run on PyPy < 3.9 by @hramezani in https://github.com/pydantic/pydantic/pull/6131
  • Update docs related to postponed annotations by @dmontagu in https://github.com/pydantic/pydantic/pull/6123
  • Improve documentation related to model_construct by @dmontagu in https://github.com/pydantic/pydantic/pull/6121
  • Revert "Skip test test_del_model_attr_error to run on PyPy < 3.9 (#6131)" by @hramezani in https://github.com/pydantic/pydantic/pull/6133
  • 📝 Add documentation about model_config inheritance by @Kludex in https://github.com/pydantic/pydantic/pull/6132
  • Make it work when using a type annotation on the model_config by @dmontagu in https://github.com/pydantic/pydantic/pull/6136
  • 📝 Add documentation about AliasPath and AliasChoices by @Kludex in https://github.com/pydantic/pydantic/pull/6129
  • Improve pydantic/_internal/_decorators_v1.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6128
  • Remove default factory call results from the JSON schema by @dmontagu in https://github.com/pydantic/pydantic/pull/6126
  • Improve pydantic/_internal/_discriminated_union.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6134
  • Landing page fix links and minor edits by @tpdorsey in https://github.com/pydantic/pydantic/pull/6074
  • Improve the regex used for NameEmail validation by @dmontagu in https://github.com/pydantic/pydantic/pull/6125
  • Docs updates for type adapter by @tpdorsey in https://github.com/pydantic/pydantic/pull/6052
  • Update documentation about exporting models by @dmontagu in https://github.com/pydantic/pydantic/pull/6078
  • 📝 Update union.md documentation by @Kludex in https://github.com/pydantic/pydantic/pull/6055
  • Update booleans.md and bytesize.md by @dmontagu in https://github.com/pydantic/pydantic/pull/6076
  • 🐛 Remove dataclass field with init_var from __pydantic__fields__ by @Kludex in https://github.com/pydantic/pydantic/pull/6141
  • Improve pydantic/_internal/_fields.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6138
  • Fix typo in pydantic._internal._fields by @Viicos in https://github.com/pydantic/pydantic/pull/6148
  • Skip test_del_model_attr_error on PyPy by @hramezani in https://github.com/pydantic/pydantic/pull/6153
  • 💡 Update links to RootModel docs section everywhere by @lig in https://github.com/pydantic/pydantic/pull/6154
  • Remove not needed code from pydantic/_internal/_forward_ref.py by @hramezani in https://github.com/pydantic/pydantic/pull/6146
  • Improve pydantic/_internal/_known_annotated_metadata.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6155
  • Improve pydantic/_internal/_generics.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6151
  • 🐛 Fix RootModel json schema meta info by @lig in https://github.com/pydantic/pydantic/pull/6104
  • Fix definitions unpacking and registering when building a schema that uses a model by @adriangb in https://github.com/pydantic/pydantic/pull/6144
  • Add additional links and notes regarding extra types by @tpdorsey in https://github.com/pydantic/pydantic/pull/6160
  • PYD-92: Add custom type docs for Annotated and TypeAliasType by @adriangb in https://github.com/pydantic/pydantic/pull/6161
  • DOC-104: add note about preserving input types to migration guide by @adriangb in https://github.com/pydantic/pydantic/pull/6135
  • Add SerializeAsAny for opt-in duck typed serialization by @adriangb in https://github.com/pydantic/pydantic/pull/6162
  • Improve pydantic/_internal/_generate_schema.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6149
  • Improve pydantic/_internal/_internal_dataclass.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6152
  • correct PrivateAttr docs by @samuelcolvin in https://github.com/pydantic/pydantic/pull/6164
  • Allow setting type for values in __pydantic_extra__ by @adriangb in https://github.com/pydantic/pydantic/pull/6139
  • Improve pydantic/_internal/_model_construction.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6166
  • Improve pydantic/_internal/_schema_generation_shared.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6168
  • Improve pydantic/functional_validators.py docstring by @hramezani in https://github.com/pydantic/pydantic/pull/6169
  • ✅ Try reproducing rebuilding recursive schema with a ForwardRef by @lig in https://github.com/pydantic/pydantic/pull/6159
  • Make unannotated private attrs into private attrs by @dmontagu in https://github.com/pydantic/pydantic/pull/6111
  • Add Examples annotation and re-organize existing annotations by @adriangb in https://github.com/pydantic/pydantic/pull/6174
  • Improve pydantic/main.py docstrings by @hramezani in https://github.com/pydantic/pydantic/pull/6173
  • V2 migration guide updates by @dmontagu in https://github.com/pydantic/pydantic/pull/6006
  • 📝 Improve documentation on fields.md by @Kludex in https://github.com/pydantic/pydantic/pull/6137
  • Prepare for v2.0b3 by @dmontagu in https://github.com/pydantic/pydantic/pull/6176

New Contributors

  • @mgorny made their first contribution in https://github.com/pydantic/pydantic/pull/5994
  • @cpratt34 made their first contribution in https://github.com/pydantic/pydantic/pull/5982
  • @Phantom1472 made their first contribution in https://github.com/pydantic/pydantic/pull/6061

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.0b2...v2.0b3

- Python
Published by dmontagu almost 3 years ago

pydantic - V1.10.9

What's Changed

  • Add Pydantic classifier by @hramezani in https://github.com/pydantic/pydantic/pull/5847
  • 📌 Use Cython < v3 by @lig in https://github.com/pydantic/pydantic/pull/5845
  • [cherry-pick] Fix mypy plugin for 1.4.0 (#5927) by @cdce8p in https://github.com/pydantic/pydantic/pull/5928
  • Add future and past date hypothesis strategies by @bschoenmaeckers in https://github.com/pydantic/pydantic/pull/5850
  • [Backport] Fix Decimal trailing zero handling by @hramezani in https://github.com/pydantic/pydantic/pull/5968
  • Prepare for 1.10.9 by @hramezani in https://github.com/pydantic/pydantic/pull/6034

New Contributors

  • @bschoenmaeckers made their first contribution in https://github.com/pydantic/pydantic/pull/5850

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.8...v1.10.9

- Python
Published by hramezani almost 3 years ago

pydantic - v2.0b2 2023-06-03

What's Changed

  • Improve test coverage for pydantic.dataclasses by @hramezani in https://github.com/pydantic/pydantic/pull/5973
  • ✅ Improve coverage for pydantic/main.py by @lig in https://github.com/pydantic/pydantic/pull/5977
  • Increase coverage for _generate_schema.py by @Kludex in https://github.com/pydantic/pydantic/pull/5966
  • Docstrings for main by @tpdorsey in https://github.com/pydantic/pydantic/pull/5976
  • Increase coverage for _generate_schema.py by @Kludex in https://github.com/pydantic/pydantic/pull/5975
  • Add from_attributes to TypeAdapter.validate_python by @adriangb in https://github.com/pydantic/pydantic/pull/5983
  • Add from_attributesto BaseModel.validate_python by @adriangb in https://github.com/pydantic/pydantic/pull/5985
  • Prepare for v2.0b2 by @adriangb in https://github.com/pydantic/pydantic/pull/5986

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.0b1...v2.0b2

- Python
Published by adriangb almost 3 years ago

pydantic - v2.0b1 2023-06-01

What's Changed

  • Replace deprecated validator usage by @Viicos in https://github.com/pydantic/pydantic/pull/5712
  • Use typing.Self for @classmethod constructors by @Viicos in https://github.com/pydantic/pydantic/pull/5713
  • Improve usage errors by @hramezani in https://github.com/pydantic/pydantic/pull/5699
  • ⚡ Speedup ModelPrivateAttr by @lig in https://github.com/pydantic/pydantic/pull/5709
  • Updates model docstrings by @tpdorsey in https://github.com/pydantic/pydantic/pull/5715
  • Re-organize exports for new validators and serializers by @adriangb in https://github.com/pydantic/pydantic/pull/5641
  • Replace TypeError with ValidationError in forzen model by @hramezani in https://github.com/pydantic/pydantic/pull/5717
  • ✅ Improve internal validators test coverage by @lig in https://github.com/pydantic/pydantic/pull/5700
  • Generate separate JSON schema for inputs vs. outputs by @dmontagu in https://github.com/pydantic/pydantic/pull/5707
  • Add PastDatetime and FutureDatetime types by @hramezani in https://github.com/pydantic/pydantic/pull/5720
  • Uprev pydantic-core to 0.31.0 by @adriangb in https://github.com/pydantic/pydantic/pull/5727
  • Fix typo in error message by @hramezani in https://github.com/pydantic/pydantic/pull/5734
  • Fix use of None as type of private attribute by @dmontagu in https://github.com/pydantic/pydantic/pull/5735
  • Models usage docs revisions by @tpdorsey in https://github.com/pydantic/pydantic/pull/5738
  • Don't try to automatically handle subclasses of known types by @adriangb in https://github.com/pydantic/pydantic/pull/5737
  • ✅ Improve test coverage by @lig in https://github.com/pydantic/pydantic/pull/5710
  • Improve validation errors doc by @hramezani in https://github.com/pydantic/pydantic/pull/5733
  • Make usage errors code blocks testable. by @hramezani in https://github.com/pydantic/pydantic/pull/5743
  • Respect config.alias_generator in pydantic dataclass by @hramezani in https://github.com/pydantic/pydantic/pull/5673
  • Fix typo in error code by @hramezani in https://github.com/pydantic/pydantic/pull/5748
  • updates to errors and fields docstrings by @tpdorsey in https://github.com/pydantic/pydantic/pull/5746
  • correct deprecated warning message in copyandsetvalues method by @rmargar in https://github.com/pydantic/pydantic/pull/5753
  • ✅ Improve test coverage by @lig in https://github.com/pydantic/pydantic/pull/5742
  • Eliminate the undefined types warning by @dmontagu in https://github.com/pydantic/pydantic/pull/5754
  • Fixes typo in documentation by @halfdanrump in https://github.com/pydantic/pydantic/pull/5756
  • Do not try to automatically handle subclasses of mappings by @adriangb in https://github.com/pydantic/pydantic/pull/5744
  • Add lig to the reviewers list by @lig in https://github.com/pydantic/pydantic/pull/5759
  • Generate JSON schema for Sequence[T] as though it was List[T] by @dmontagu in https://github.com/pydantic/pydantic/pull/5706
  • Remove xfail from tests.test_edge_cases.test_custom_generic_validators by @dmontagu in https://github.com/pydantic/pydantic/pull/5764
  • Add pydantic-settings test to CI by @hramezani in https://github.com/pydantic/pydantic/pull/5758
  • stop BaseModel inheriting from _repr.Representation by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5740
  • Edits for Usage Error documentation by @tpdorsey in https://github.com/pydantic/pydantic/pull/5774
  • Add protected namespaces by @hramezani in https://github.com/pydantic/pydantic/pull/5768
  • More docstrings edits - json schema and functional serializers by @tpdorsey in https://github.com/pydantic/pydantic/pull/5762
  • add api docs for pydantic-core by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5695
  • Remove dead code by @adriangb in https://github.com/pydantic/pydantic/pull/5775
  • Copy edits for validation errors by @tpdorsey in https://github.com/pydantic/pydantic/pull/5777
  • 🔥 Remove _base_class_defined hack in favor of an empty bases check by @lig in https://github.com/pydantic/pydantic/pull/5761
  • Support recursive dataclasses by @dmontagu in https://github.com/pydantic/pydantic/pull/5760
  • Update typo in computed_fields.md by @john-g-g in https://github.com/pydantic/pydantic/pull/5786
  • Use uvicorn-style strings for ImportString by @dmontagu in https://github.com/pydantic/pydantic/pull/5776
  • Add v1 namespace inside pydantic by @hramezani in https://github.com/pydantic/pydantic/pull/5780
  • Add a convenience type to override JSON schema by @dmontagu in https://github.com/pydantic/pydantic/pull/5788
  • Add a signature for init_subclass to typecheck class kwargs by @dmontagu in https://github.com/pydantic/pydantic/pull/5791
  • BaseModel class attributes documented by @tpdorsey in https://github.com/pydantic/pydantic/pull/5787
  • Add note about dynamically created model pickling by @hramezani in https://github.com/pydantic/pydantic/pull/5781
  • Do not inherit config in model fields that are themselves of type model by @dmontagu in https://github.com/pydantic/pydantic/pull/5793
  • Replace class Config with model_config by @hramezani in https://github.com/pydantic/pydantic/pull/5799
  • Uprev pydantic-core to 0.32.0 by @adriangb in https://github.com/pydantic/pydantic/pull/5805
  • Make decoratorinfos attributes plural by @dmontagu in https://github.com/pydantic/pydantic/pull/5802
  • Rework __prepare_pydantic_annotations__ to make it easier to wrap "known" types by @adriangb in https://github.com/pydantic/pydantic/pull/5801
  • Remove various TODO comments by @dmontagu in https://github.com/pydantic/pydantic/pull/5806
  • Address more todo comments by @dmontagu in https://github.com/pydantic/pydantic/pull/5809
  • Add annotation that lets you skip validation by @dmontagu in https://github.com/pydantic/pydantic/pull/5583
  • ✨ Add RootModel support by @lig in https://github.com/pydantic/pydantic/pull/5765
  • Fix some issues with pydantic extra by @dmontagu in https://github.com/pydantic/pydantic/pull/5810
  • Move error handling to Error Messages by @tpdorsey in https://github.com/pydantic/pydantic/pull/5794
  • Fix json type json schema test by @dmontagu in https://github.com/pydantic/pydantic/pull/5808
  • Fix tests for create_model title and description by @hramezani in https://github.com/pydantic/pydantic/pull/5796
  • Improve typechecking, docs, and minor bugs with Field/FieldInfo by @dmontagu in https://github.com/pydantic/pydantic/pull/5800
  • Add a convenience type for transforming a core schema via annotation by @dmontagu in https://github.com/pydantic/pydantic/pull/5819
  • see what happens with cf pages by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5828
  • Do not automatically handle subclasses of Iterable by @dmontagu in https://github.com/pydantic/pydantic/pull/5834
  • Improve contribution guidelines by @tpdorsey in https://github.com/pydantic/pydantic/pull/5817
  • Use alias generator with computed fields by @dmontagu in https://github.com/pydantic/pydantic/pull/5836
  • Address root model feedback by @dmontagu in https://github.com/pydantic/pydantic/pull/5820
  • Ignore pytest warnings on 3.12 by @JelleZijlstra in https://github.com/pydantic/pydantic/pull/5849
  • Change pydantic to be compatible with typing-extension==4.6.1 by @hramezani in https://github.com/pydantic/pydantic/pull/5843
  • Add note about V1 PRs by @tpdorsey in https://github.com/pydantic/pydantic/pull/5855
  • Fix bug partial get core schema by @adriangb in https://github.com/pydantic/pydantic/pull/5856
  • Revise documentation landing page by @tpdorsey in https://github.com/pydantic/pydantic/pull/5835
  • Add Kludex to reviewer list by @Kludex in https://github.com/pydantic/pydantic/pull/5862
  • Use duration instead of time-delta type for timedelta on JSON schema by @Kludex in https://github.com/pydantic/pydantic/pull/5864
  • Add InstanceOf type/annotation by @dmontagu in https://github.com/pydantic/pydantic/pull/5778
  • Update pydantic-core to 0.34.0 by @adriangb in https://github.com/pydantic/pydantic/pull/5860
  • Add a test demonstrating initvar works with inheritance by @dmontagu in https://github.com/pydantic/pydantic/pull/5859
  • Disallow non-nested types as non-annotated values by @dmontagu in https://github.com/pydantic/pydantic/pull/5869
  • Handle validators on vanilla dataclass fields by @dmontagu in https://github.com/pydantic/pydantic/pull/5857
  • Refactor handling of Enum and IP types to homogenize known type handling by @adriangb in https://github.com/pydantic/pydantic/pull/5837
  • move ModelMetaclass to _internal._model_construction by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5865
  • Fix kw_only inheritance by @dmontagu in https://github.com/pydantic/pydantic/pull/5873
  • ⚡ Optimize kw_only inheritance by @lig in https://github.com/pydantic/pydantic/pull/5878
  • Fix dataclass stuff by @dmontagu in https://github.com/pydantic/pydantic/pull/5874
  • Update pydantic-core to 0.35.0 by @hramezani in https://github.com/pydantic/pydantic/pull/5846
  • Ensure __get_pydantic_json_schema__ always gets the schema passed down from a wrapping handler by @adriangb in https://github.com/pydantic/pydantic/pull/5876
  • Add hideinputin_errors config by @hramezani in https://github.com/pydantic/pydantic/pull/5879
  • ✅ Improve test coverage by @lig in https://github.com/pydantic/pydantic/pull/5885
  • 🐛 Config option allow_inf_nan doesn't work for Decimal by @lig in https://github.com/pydantic/pydantic/pull/5868
  • Allow __prepare_pydantic_annotations__ to exist without __get_pydantic_core_schema__ by @adriangb in https://github.com/pydantic/pydantic/pull/5886
  • Bump pyright to 1.1.310 by @adriangb in https://github.com/pydantic/pydantic/pull/5887
  • Fix botched merge, cleanup unused code by @adriangb in https://github.com/pydantic/pydantic/pull/5888
  • prevent _internal objects becoming public by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5892
  • Use __pydantic_private__ for storing private attributes by @dmontagu in https://github.com/pydantic/pydantic/pull/5891
  • fixing xfails by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5894
  • Fix @model_validator on nested models by @adriangb in https://github.com/pydantic/pydantic/pull/5889
  • Complete ConfigWrapper test coverage by @hramezani in https://github.com/pydantic/pydantic/pull/5900
  • ✅ Improve test coverage by @lig in https://github.com/pydantic/pydantic/pull/5895
  • Update typing-extensions to 4.6.1 by @adriangb in https://github.com/pydantic/pydantic/pull/5901
  • Enforce constraints on arbitrary types via functional validators by @adriangb in https://github.com/pydantic/pydantic/pull/5883
  • Add validators for TypedDict by @adriangb in https://github.com/pydantic/pydantic/pull/5877
  • Add test for default values in annotated schema by @adriangb in https://github.com/pydantic/pydantic/pull/5902
  • Uprev pydantic-core to 0.37.0 by @adriangb in https://github.com/pydantic/pydantic/pull/5905
  • 🐛 Fix AttributeError on deleting a field of a Model having a PrivateAttr defined by @lig in https://github.com/pydantic/pydantic/pull/5897
  • 💚 Move email tests to "tests with deps" job by @lig in https://github.com/pydantic/pydantic/pull/5904
  • Move model before validators by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5898
  • Feat/serialize import string by @ybressler in https://github.com/pydantic/pydantic/pull/5841
  • remove xfails from docs by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5910
  • add compatibility shim for __fields__ -> model_fields by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5912
  • improve coverage in main.py by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5913
  • Complete test coverage pydantic/internal/serializers.py by @hramezani in https://github.com/pydantic/pydantic/pull/5915
  • Add lenient_issubclass and lenient_isinstance to DEPRECATED_MOVED_IN_V2 by @Kludex in https://github.com/pydantic/pydantic/pull/5916
  • Improve test coverage for pydantic.internal.utils by @hramezani in https://github.com/pydantic/pydantic/pull/5917
  • Add most used imports to DEPRECATED_MOVED_IN_V2 by @Kludex in https://github.com/pydantic/pydantic/pull/5926
  • Hide pydantic_* from @dataclass_transform by @dmontagu in https://github.com/pydantic/pydantic/pull/5923
  • Fix mypy plugin for 1.4.0 by @cdce8p in https://github.com/pydantic/pydantic/pull/5927
  • Improve test coverage for pydantic.internal.core_metadata by @hramezani in https://github.com/pydantic/pydantic/pull/5933
  • support for return_schema on functional serializers by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5920
  • Support TypeAliasType for generic and recursive type aliases by @adriangb in https://github.com/pydantic/pydantic/pull/5861
  • fix datetime parsing tests by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5938
  • Logo grid for pydantic users by @tpdorsey in https://github.com/pydantic/pydantic/pull/5880
  • Disallow passing config to TypeAdapter for models and implement config for TypedDict by @adriangb in https://github.com/pydantic/pydantic/pull/5939
  • fix dataclasses, uprev pydantic-core by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5942
  • Improve test coverage for pydantic.type_adapter by @hramezani in https://github.com/pydantic/pydantic/pull/5930
  • Improve test coverage of pydantic.internal.core_utils by @hramezani in https://github.com/pydantic/pydantic/pull/5936
  • Update docstrings - errors through functional serializers by @tpdorsey in https://github.com/pydantic/pydantic/pull/5940
  • ✅ More RootModel tests by @lig in https://github.com/pydantic/pydantic/pull/5943
  • Improve test coverage for pydantic.types by @hramezani in https://github.com/pydantic/pydantic/pull/5950
  • Update docstrings - alias_generators through dataclasses by @tpdorsey in https://github.com/pydantic/pydantic/pull/5932
  • Make instanceof schema work with arbitrary types by @dmontagu in https://github.com/pydantic/pydantic/pull/5947
  • Improve test coverage for pydantic.functional_validator by @hramezani in https://github.com/pydantic/pydantic/pull/5955
  • 🐛 Fix RootModel equality logic by @lig in https://github.com/pydantic/pydantic/pull/5948
  • Increase coverage for json_schema.py by @Kludex in https://github.com/pydantic/pydantic/pull/5934
  • Improve test coverage for pydantic._migration by @hramezani in https://github.com/pydantic/pydantic/pull/5964
  • Increase coverage for json_schema.py by @Kludex in https://github.com/pydantic/pydantic/pull/5963
  • Move pydantic.annotated to top level by @adriangb in https://github.com/pydantic/pydantic/pull/5954
  • Rename old analyzed type variables name in test by @hramezani in https://github.com/pydantic/pydantic/pull/5965
  • Fix Decimal trailing zero handling by @hramezani in https://github.com/pydantic/pydantic/pull/5962
  • Docstrings updates for validation by @tpdorsey in https://github.com/pydantic/pydantic/pull/5967
  • Prepare for Beta 1 release by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5969

New Contributors

  • @Viicos made their first contribution in https://github.com/pydantic/pydantic/pull/5712
  • @rmargar made their first contribution in https://github.com/pydantic/pydantic/pull/5753
  • @halfdanrump made their first contribution in https://github.com/pydantic/pydantic/pull/5756
  • @john-g-g made their first contribution in https://github.com/pydantic/pydantic/pull/5786
  • @JelleZijlstra made their first contribution in https://github.com/pydantic/pydantic/pull/5849

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.0a4...v2.0b1

- Python
Published by adriangb almost 3 years ago

pydantic - v1.10.8 2023-05-23

What's Changed

  • Fix a bug in Literal usage with typing-extension==4.6.0, #5826 by @hramezani
  • This solves the (closed) issue #3849 where aliased fields that use discriminated union fail to validate when the data contains the non-aliased field name, #5736 by @benwah
  • Update email-validator dependency to >=2.0.0post2, #5627 by @adriangb
  • update AnyClassMethod for changes in python/typeshed#9771, #5505 by @ITProKyle

New Contributors

  • @DimitriPapadopoulos made their first contribution in https://github.com/pydantic/pydantic/pull/5375
  • @ITProKyle made their first contribution in https://github.com/pydantic/pydantic/pull/5505
  • @benwah made their first contribution in https://github.com/pydantic/pydantic/pull/5736

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.7...v1.10.8

- Python
Published by dmontagu about 3 years ago

pydantic - v2.0a4 2023-05-05

What's Changed

  • Add pydantic.typing.evaluate_forwardref on the REMOVEDINV2 list by @Kludex in https://github.com/pydantic/pydantic/pull/5559
  • Move types documentation to usage/types and fix links by @tpdorsey in https://github.com/pydantic/pydantic/pull/5556
  • Fix bug caused by builtin generics not converting str to ForwardRef by @dmontagu in https://github.com/pydantic/pydantic/pull/5554
  • Add docstrings for decorators.py by @tpdorsey in https://github.com/pydantic/pydantic/pull/5565
  • Bump typing-extensions minimum version to 4.5.0 by @KanchiShimono in https://github.com/pydantic/pydantic/pull/5552
  • Add test for validate_call by @hramezani in https://github.com/pydantic/pydantic/pull/5574
  • Fix reviewer name on pyproject.toml by @Kludex in https://github.com/pydantic/pydantic/pull/5577
  • test for allow info with Decimal by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5585
  • raise TypeError in Field and PrivateAttr by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5587
  • Use only relative imports by @Kludex in https://github.com/pydantic/pydantic/pull/5576
  • Change bare-enum behavior for strict json by @adriangb in https://github.com/pydantic/pydantic/pull/5591
  • Json schema modify function as middleware by @adriangb in https://github.com/pydantic/pydantic/pull/5570
  • Fix bug with recursive models with multiple references to the same type by @dmontagu in https://github.com/pydantic/pydantic/pull/5555
  • Add a test for validation using context by @dmontagu in https://github.com/pydantic/pydantic/pull/5593
  • Support UUID serialization to JSON by @Kludex in https://github.com/pydantic/pydantic/pull/5564
  • Minor formatting fixes in docs by @tpdorsey in https://github.com/pydantic/pydantic/pull/5575
  • Add test that proves order is preserved by @Kludex in https://github.com/pydantic/pydantic/pull/5600
  • Uprev pydantic-core to 0.26.0 by @adriangb in https://github.com/pydantic/pydantic/pull/5602
  • Support more complex typing structures with Annotated by @Kludex in https://github.com/pydantic/pydantic/pull/5603
  • Improve consistency of error messages for Enum by @dmontagu in https://github.com/pydantic/pydantic/pull/5604
  • Make it possible to have a plain BaseModel field annotation by @dmontagu in https://github.com/pydantic/pydantic/pull/5609
  • Pydantic core 0.27.0 by @dmontagu in https://github.com/pydantic/pydantic/pull/5612
  • Support PathLike by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5589
  • Add test for exotic approaches to forward refs by @dmontagu in https://github.com/pydantic/pydantic/pull/5526
  • Add tests for date types by @Kludex in https://github.com/pydantic/pydantic/pull/5605
  • Use PDM for lockfiles & env management by @adriangb in https://github.com/pydantic/pydantic/pull/5610
  • Add datetime_parse module to the migration logic by @Kludex in https://github.com/pydantic/pydantic/pull/5617
  • Migration notes for optional and nullable fields by @tpdorsey in https://github.com/pydantic/pydantic/pull/5618
  • Fix dataclass module name by @adriangb in https://github.com/pydantic/pydantic/pull/5624
  • Create a GetCoreSchemaHandler class by @adriangb in https://github.com/pydantic/pydantic/pull/5619
  • Add modelvalidator to `pydantic.all_` by @dmontagu in https://github.com/pydantic/pydantic/pull/5633
  • using "mike" for documenting multiple versions by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5626
  • docs preview with CloudFlare pages by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5638
  • port alpha release blog post by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5637
  • fix blog images and devtools example by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5639
  • Attempt to fix CI python versions by @dmontagu in https://github.com/pydantic/pydantic/pull/5643
  • Add make help command by @dmontagu in https://github.com/pydantic/pydantic/pull/5634
  • Fix double-calling of json schema funcs w/ Annotated by @adriangb in https://github.com/pydantic/pydantic/pull/5647
  • remove unused info arguments from validator functions by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5653
  • set URL for errors by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5655
  • Add error message for unique_items parameter in conlist by @Kludex in https://github.com/pydantic/pydantic/pull/5650
  • Update copyonmodel_validation tests by @hramezani in https://github.com/pydantic/pydantic/pull/5658
  • Add missing types docs by @tpdorsey in https://github.com/pydantic/pydantic/pull/5616
  • Error more eagerly for proper subclasses of generics that we don't know how to validate by @dmontagu in https://github.com/pydantic/pydantic/pull/5629
  • Add alias generators to pydantic by @dmontagu in https://github.com/pydantic/pydantic/pull/5568
  • Expand alias generator docstrings by @tpdorsey in https://github.com/pydantic/pydantic/pull/5669
  • Expand validate_call docstring by @tpdorsey in https://github.com/pydantic/pydantic/pull/5670
  • Remove xfail from tests.test_edge_cases.test_int_subclass as it is expected behavior by @hramezani in https://github.com/pydantic/pydantic/pull/5665
  • 🐛 Sequence[str] does not raise on str by @lig in https://github.com/pydantic/pydantic/pull/5599
  • Delegate equality checks for BaseModel by @dmontagu in https://github.com/pydantic/pydantic/pull/5662
  • Pin urllib3 in CI by @adriangb in https://github.com/pydantic/pydantic/pull/5675
  • Add deprecated on BaseModel methods by @Kludex in https://github.com/pydantic/pydantic/pull/5646
  • Fix walk and apply by @adriangb in https://github.com/pydantic/pydantic/pull/5652
  • Add job to create a tweet on release by @Kludex in https://github.com/pydantic/pydantic/pull/5567
  • Add support for * to field_validator by @Kludex in https://github.com/pydantic/pydantic/pull/5657
  • Re-add schema_extra functionality removed from config by @dmontagu in https://github.com/pydantic/pydantic/pull/5676
  • Revise models docs to indicate attributes are copied for validation by @tpdorsey in https://github.com/pydantic/pydantic/pull/5632
  • ✨ Add Base64 and a general Encoded types by @lig in https://github.com/pydantic/pydantic/pull/5615
  • Remove Kludex from hooky temporarily by @dmontagu in https://github.com/pydantic/pydantic/pull/5678
  • rename tests/internal.py -> tests/test_internal.py by @adriangb in https://github.com/pydantic/pydantic/pull/5684
  • Rename AnalyzedType to TypeAdapter by @hramezani in https://github.com/pydantic/pydantic/pull/5689
  • Move errors docs to top nav by @tpdorsey in https://github.com/pydantic/pydantic/pull/5685
  • Add __prepare_pydantic_annotations__ for custom types by @adriangb in https://github.com/pydantic/pydantic/pull/5674
  • Fix botched merge w/ rename of AnalyzedType -> TypeAdapter by @adriangb in https://github.com/pydantic/pydantic/pull/5692
  • Use pydantic core main by @adriangb in https://github.com/pydantic/pydantic/pull/5680
  • Test: Add test for variadic generic by @caniko in https://github.com/pydantic/pydantic/pull/5625
  • 🔥 Remove Hypothesis plugin for now by @lig in https://github.com/pydantic/pydantic/pull/5691
  • Use pydantic_serializer for serializing Any fields by @dmontagu in https://github.com/pydantic/pydantic/pull/5578
  • Add a test demonstrating how to integrate with a third-party type by @dmontagu in https://github.com/pydantic/pydantic/pull/5620
  • Pydantic settings docs by @tpdorsey in https://github.com/pydantic/pydantic/pull/5682
  • Add UrlConstraints.__hash__ by @madkinsz in https://github.com/pydantic/pydantic/pull/5697
  • Add custom init support by @dmontagu in https://github.com/pydantic/pydantic/pull/5703
  • Bump version to 2.0a4 by @dmontagu in https://github.com/pydantic/pydantic/pull/5704

New Contributors

  • @KanchiShimono made their first contribution in https://github.com/pydantic/pydantic/pull/5552
  • @lig made their first contribution in https://github.com/pydantic/pydantic/pull/5599
  • @caniko made their first contribution in https://github.com/pydantic/pydantic/pull/5625
  • @madkinsz made their first contribution in https://github.com/pydantic/pydantic/pull/5697

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.0a3...v2.0a4

- Python
Published by dmontagu about 3 years ago

pydantic - v2.0a3 2023-04-20

What's Changed

  • Preserve maxlen attribute on validated deques by @dmontagu in https://github.com/pydantic/pydantic/pull/5458
  • Defer evaluation of dataclasses for test 2162 by @dmontagu in https://github.com/pydantic/pydantic/pull/5462
  • Remove __all__ from private modules by @Kludex in https://github.com/pydantic/pydantic/pull/5467
  • pydantic-core v0.24.0 by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5464
  • validate_call to replace validate_arguments by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5342
  • Add BaseConfig back to the pydantic.config module by @Kludex in https://github.com/pydantic/pydantic/pull/5479
  • Docs page for validation errors by @tpdorsey in https://github.com/pydantic/pydantic/pull/5459
  • Fix handling of default values of BaseModel subclasses in JSON schema by @dmontagu in https://github.com/pydantic/pydantic/pull/5368
  • Use cached BaseModel core schema to hopefully improve model building performance when a model is reused by @dmontagu in https://github.com/pydantic/pydantic/pull/5485
  • Split __get_pydantic_core_schema__ into __modify_pydantic_core_schema__ and __get_pydantic_core_schema__ by @adriangb in https://github.com/pydantic/pydantic/pull/5472
  • Refactor dataclasses, and get simple generics working by @dmontagu in https://github.com/pydantic/pydantic/pull/5473
  • Add docstring coverage for dataclasses by @tpdorsey in https://github.com/pydantic/pydantic/pull/5471
  • Move logic from generateschema.py to annotated_arguments.py by @adriangb in https://github.com/pydantic/pydantic/pull/5491
  • Move tools module to deprecated namespace by @Kludex in https://github.com/pydantic/pydantic/pull/5483
  • Rework __get_pydantic_core_schema__ APIs by @adriangb in https://github.com/pydantic/pydantic/pull/5490
  • Add AliasPath and AliasPathChoices and use them in validation_alias type by @hramezani in https://github.com/pydantic/pydantic/pull/5500
  • Uprev pydantic-core to 0.24.1 by @adriangb in https://github.com/pydantic/pydantic/pull/5494
  • feat: allow accessing attributes as strings by @dijonkitchen in https://github.com/pydantic/pydantic/pull/5501
  • Add docstring coverage for fields by @tpdorsey in https://github.com/pydantic/pydantic/pull/5469
  • add codspell to pre-commit by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5516
  • improve some coverage by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5518
  • No case enum by @dmontagu in https://github.com/pydantic/pydantic/pull/5506
  • Fix / rewrite xfail tests in docs by @adriangb in https://github.com/pydantic/pydantic/pull/5503
  • Add docstring coverage for errors by @tpdorsey in https://github.com/pydantic/pydantic/pull/5482
  • docs: fix spelling and wording by @dijonkitchen in https://github.com/pydantic/pydantic/pull/5525
  • Computed Fields by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5502
  • Fix a couple of bugs in @model_validator by @adriangb in https://github.com/pydantic/pydantic/pull/5529
  • Add test showing that missing abstractmethods error for all decorators by @dmontagu in https://github.com/pydantic/pydantic/pull/5530
  • Add migration error messages to V2 by @Kludex in https://github.com/pydantic/pydantic/pull/5480
  • Add support for Hashable by @dmontagu in https://github.com/pydantic/pydantic/pull/5489
  • Change errors URL for next release by @dmontagu in https://github.com/pydantic/pydantic/pull/5538
  • Prepare for 2.0a3 release by @dmontagu in https://github.com/pydantic/pydantic/pull/5540
  • Revert "feat: allow accessing attributes as strings" by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5541

New Contributors

  • @dijonkitchen made their first contribution in https://github.com/pydantic/pydantic/pull/5501

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.0a2...v2.0a3

- Python
Published by dmontagu about 3 years ago

pydantic - v2.0a2 2023-04-12

What's Changed

  • Convert schema_of to use AnalyzedType by @adriangb in https://github.com/pydantic/pydantic/pull/5355
  • Return hramezani back to the reviewers list by @hramezani in https://github.com/pydantic/pydantic/pull/5374
  • Remove apparently-unnecessary model_rebuild by @dmontagu in https://github.com/pydantic/pydantic/pull/5371
  • Add auto generate conversion table to doc by @hramezani in https://github.com/pydantic/pydantic/pull/5324
  • Remove contuple from types by @hramezani in https://github.com/pydantic/pydantic/pull/5384
  • Prevent multiple field serializers for a field in same class by @hramezani in https://github.com/pydantic/pydantic/pull/5378
  • Handle functools.partial/partialmethod in validators by @adriangb in https://github.com/pydantic/pydantic/pull/5362
  • Add support for frozen and final fields by @dmontagu in https://github.com/pydantic/pydantic/pull/5366
  • Make types hashable by @hramezani in https://github.com/pydantic/pydantic/pull/5392
  • Error URLs by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5356
  • Fix root validators & subclasses by @adriangb in https://github.com/pydantic/pydantic/pull/5390
  • Only call pydanticpostinit with positional arguments by @dmontagu in https://github.com/pydantic/pydantic/pull/5382
  • Move generic metadata into a typeddict by @dmontagu in https://github.com/pydantic/pydantic/pull/5361
  • Rework allow_reuse in decorators by @adriangb in https://github.com/pydantic/pydantic/pull/5398
  • Reorganize .gitignore file by @dmontagu in https://github.com/pydantic/pydantic/pull/5404
  • Add typesnamespace argument to model_rebuild by @dmontagu in https://github.com/pydantic/pydantic/pull/5385
  • Break out types into individual topics by @tpdorsey in https://github.com/pydantic/pydantic/pull/5372
  • Add pre-commit hooks installation to Contribute page by @tpdorsey in https://github.com/pydantic/pydantic/pull/5403
  • support pydantic-core v0.23 by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5396
  • Use pyright for type checking; fix errors and add type ignores by @adriangb in https://github.com/pydantic/pydantic/pull/5399
  • make typecheck should run even if there are no changed files by @adriangb in https://github.com/pydantic/pydantic/pull/5407
  • add docstring to _ModelNamespaceDict by @adriangb in https://github.com/pydantic/pydantic/pull/5408
  • new ConfigWrapper by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5411
  • fix type checking for python 3.7 and simplify ForwardRef wrapper by @adriangb in https://github.com/pydantic/pydantic/pull/5415
  • Convert internal classes into dataclasses by @adriangb in https://github.com/pydantic/pydantic/pull/5416
  • Add pydanticinitsubclass classmethod by @dmontagu in https://github.com/pydantic/pydantic/pull/5386
  • Add @model_validator by @adriangb in https://github.com/pydantic/pydantic/pull/5379
  • Rename internal dataclass decorator by @adriangb in https://github.com/pydantic/pydantic/pull/5417
  • Implement Annotated validators by @adriangb in https://github.com/pydantic/pydantic/pull/5364
  • Fix reference in _decorators.py by @adriangb in https://github.com/pydantic/pydantic/pull/5418
  • Add test for validators with underscores in their names by @adriangb in https://github.com/pydantic/pydantic/pull/5420
  • add pydantic-core to version-info by @samuelcolvin in https://github.com/pydantic/pydantic/pull/5424
  • Make Extra a literal by @adriangb in https://github.com/pydantic/pydantic/pull/5431
  • Add Migration Guide page by @tpdorsey in https://github.com/pydantic/pydantic/pull/5429
  • Clean up and add tests for extra and serialization by @adriangb in https://github.com/pydantic/pydantic/pull/5428
  • Remove unused fixture and args in test_serializer.py by @adriangb in https://github.com/pydantic/pydantic/pull/5410
  • Add substance to migration guide section on validator decorators by @adriangb in https://github.com/pydantic/pydantic/pull/5438
  • Uprev pydantic-core to 0.23.1 by @adriangb in https://github.com/pydantic/pydantic/pull/5439
  • Add Kludex to list of reviewers by @Kludex in https://github.com/pydantic/pydantic/pull/5445
  • Clean up Field parameters by @hramezani in https://github.com/pydantic/pydantic/pull/5425
  • Pin the version of pydantic-core by @dmontagu in https://github.com/pydantic/pydantic/pull/5451
  • Fix mypy issue by @dmontagu in https://github.com/pydantic/pydantic/pull/5450
  • Fix aliases and add validation_alias and serialization_alias to Field by @hramezani in https://github.com/pydantic/pydantic/pull/5433
  • Fix more tests by @adriangb in https://github.com/pydantic/pydantic/pull/5455
  • Build API docs with mkdocstrings by @tpdorsey in https://github.com/pydantic/pydantic/pull/5427
  • Prep for v2.0a2 by @dmontagu in https://github.com/pydantic/pydantic/pull/5456

Full Changelog: https://github.com/pydantic/pydantic/compare/v2.0a1...v2.0a2

- Python
Published by dmontagu about 3 years ago

pydantic - v2.0a1 2023-04-03

First pre-release of Pydantic V2!

See this post for more details.

New Contributors

  • @treylav made their first contribution in https://github.com/pydantic/pydantic/pull/4512
  • @zunzara made their first contribution in https://github.com/pydantic/pydantic/pull/4533
  • @zachkirsch made their first contribution in https://github.com/pydantic/pydantic/pull/4593
  • @Natim made their first contribution in https://github.com/pydantic/pydantic/pull/4596
  • @ischaojie made their first contribution in https://github.com/pydantic/pydantic/pull/4616
  • @webknjaz made their first contribution in https://github.com/pydantic/pydantic/pull/4615
  • @morian made their first contribution in https://github.com/pydantic/pydantic/pull/4690
  • @Evorage0 made their first contribution in https://github.com/pydantic/pydantic/pull/4711
  • @mnixry made their first contribution in https://github.com/pydantic/pydantic/pull/4734
  • @VolkerH made their first contribution in https://github.com/pydantic/pydantic/pull/4743
  • @iudeen made their first contribution in https://github.com/pydantic/pydantic/pull/4764
  • @pmithrandir made their first contribution in https://github.com/pydantic/pydantic/pull/4758
  • @lieryan made their first contribution in https://github.com/pydantic/pydantic/pull/4777
  • @rifatrakib made their first contribution in https://github.com/pydantic/pydantic/pull/4855
  • @jimkring made their first contribution in https://github.com/pydantic/pydantic/pull/4843
  • @gr8jam made their first contribution in https://github.com/pydantic/pydantic/pull/4876
  • @florianfischer91 made their first contribution in https://github.com/pydantic/pydantic/pull/4889
  • @danielkjellid made their first contribution in https://github.com/pydantic/pydantic/pull/4931
  • @kennethreitz made their first contribution in https://github.com/pydantic/pydantic/pull/4934
  • @sudouser777 made their first contribution in https://github.com/pydantic/pydantic/pull/4920
  • @mwgamble made their first contribution in https://github.com/pydantic/pydantic/pull/4912
  • @ybressler made their first contribution in https://github.com/pydantic/pydantic/pull/4901
  • @tiwilliam made their first contribution in https://github.com/pydantic/pydantic/pull/4869
  • @pgiraud made their first contribution in https://github.com/pydantic/pydantic/pull/5001
  • @glebmxyz made their first contribution in https://github.com/pydantic/pydantic/pull/5004
  • @bgoldstone made their first contribution in https://github.com/pydantic/pydantic/pull/4870
  • @ddneilson made their first contribution in https://github.com/pydantic/pydantic/pull/5010
  • @antonagestam made their first contribution in https://github.com/pydantic/pydantic/pull/5075
  • @theonlykingpin made their first contribution in https://github.com/pydantic/pydantic/pull/5139
  • @andreyrcdias made their first contribution in https://github.com/pydantic/pydantic/pull/5210
  • @tpdorsey made their first contribution in https://github.com/pydantic/pydantic/pull/5268

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.2...v2.0a1

- Python
Published by samuelcolvin about 3 years ago

pydantic - v1.10.7 2023-03-22

What's Changed

  • Fix creating schema from model using ConstrainedStr with regex as dict key, #5223 by @matejetz
  • Address bug in mypy plugin caused by explicitpackagebases=True, #5191 by @dmontagu
  • Add implicit defaults in the mypy plugin for Field with no default argument, #5190 by @dmontagu
  • Fix schema generated for Enum values used as Literals in discriminated unions, #5188 by @javibookline
  • Fix mypy failures caused by the pydantic mypy plugin when users define from_orm in their own classes, #5187 by @dmontagu
  • Fix InitVar usage with pydantic dataclasses, mypy version 1.1.1 and the custom mypy plugin, #5162 by @cdce8p

New Contributors

  • @javibookline made their first contribution in https://github.com/pydantic/pydantic/pull/5188
  • @matejetz made their first contribution in https://github.com/pydantic/pydantic/pull/5223

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.6...v1.10.7

- Python
Published by dmontagu about 3 years ago

pydantic - v1.10.6 2023-03-02

What's Changed

  • Implement logic to support creating validators from non standard callables by using defaults to identify them and unwrapping functools.partial and functools.partialmethod when checking the signature, #5126 by @JensHeinrich
  • Fix mypy plugin for v1.1.1, and fix dataclass_transform decorator for pydantic dataclasses, #5111 by @cdce8p
  • Raise ValidationError, not ConfigError, when a discriminator value is unhashable, #4773 by @kurtmckee

New Contributors

  • @mrmammadov made their first contribution in https://github.com/pydantic/pydantic/pull/5074
  • @JensHeinrich made their first contribution in https://github.com/pydantic/pydantic/pull/5127
  • @kurtmckee made their first contribution in https://github.com/pydantic/pydantic/pull/5132

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.5...v1.10.6

- Python
Published by dmontagu about 3 years ago

pydantic - v1.10.5 (2023-02-15)

  • Fix broken parametrized bases handling with GenericModels with complex sets of models, #5052 by @MarkusSintonen
  • Invalidate mypy cache if plugin config changes, #5007 by @cdce8p
  • Fix RecursionError when deep-copying dataclass types wrapped by pydantic, #4949 by @mbillingr
  • Fix X | Y union syntax breaking GenericModel, #4146 by @thenx
  • Switch coverage badge to show coverage for this branch/release, #5060 by @samuelcolvin

New Contributors

  • @thenx made their first contribution in https://github.com/pydantic/pydantic/pull/4977
  • @mbillingr made their first contribution in https://github.com/pydantic/pydantic/pull/4963
  • @MarkusSintonen made their first contribution in https://github.com/pydantic/pydantic/pull/5052

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.4...v1.10.5

- Python
Published by samuelcolvin over 3 years ago

pydantic - v1.10.4 (2022-12-30)

  • Change dependency to typing-extensions>=4.2.0, #4885 by @samuelcolvin

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.3...v1.10.4

- Python
Published by samuelcolvin over 3 years ago

pydantic - v1.10.3 (2022-12-29)

  • fix parsing of custom root models, #4883 by @gou177
  • fix: use dataclass proxy for frozen or empty dataclasses, #4878 by @PrettyWood
  • Fix schema and schema_json on models where a model instance is a one of default values, #4781 by @Bobronium
  • Add Jina AI to sponsors on docs index page, #4767 by @samuelcolvin
  • fix: support assignment on DataclassProxy, #4695 by @PrettyWood
  • Add postgresql+psycopg as allowed scheme for PostgreDsn to make it usable with SQLAlchemy 2, #4689 by @morian
  • Allow dict schemas to have both patternProperties and additionalProperties, #4641 by @jparise
  • Fixes error passing None for optional lists with unique_items, #4568 by @mfulgo
  • Fix GenericModel with Callable param raising a TypeError, #4551 by @mfulgo
  • Fix field regex with StrictStr type annotation, #4538 by @sisp
  • Correct dataclass_transform keyword argument name from field_descriptors to field_specifiers, #4500 by @samuelcolvin
  • fix: avoid multiple calls of __post_init__ when dataclasses are inherited, #4487 by @PrettyWood
  • Reduce the size of binary wheels, #2276 by @samuelcolvin

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.2...v1.10.3

- Python
Published by samuelcolvin over 3 years ago

pydantic - v1.10.2 (2022-09-05)

  • Revert Change: Revert percent encoding of URL parts which was originally added in #4224, #4470 by @samuelcolvin
  • Prevent long (length > 4_300) strings/bytes as input to int fields, see python/cpython#95778 and CVE-2020-10735, #1477 by @samuelcolvin
  • fix: dataclass wrapper was not always called, #4477 by @PrettyWood
  • Use tomllib on Python 3.11 when parsing mypy configuration, #4476 by @hauntsaninja
  • Basic fix of GenericModel cache to detect order of arguments in Union models, #4474 by @sveinugu
  • Fix mypy plugin when using bare types like list and dict as default_factory, #4457 by @samuelcolvin

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.1...v1.10.2

- Python
Published by samuelcolvin over 3 years ago

pydantic - v1.10.1 (2022-08-31)

  • Add __hash__ method to pydancic.color.Color class, #4454 by @czaki

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.10.0...v1.10.1

- Python
Published by samuelcolvin over 3 years ago

pydantic - v1.10.0 (2022-08-30)

See #4419 for feedback and discussion, docs are live at pydantic-docs.helpmanual.io.

  • 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, #2557 by @PrettyWood

    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, #4407 by @tlambert03
  • Allow for custom parsing of environment variables via parse_env_var in Config, #4406 by @acmiyaguchi
  • Rename master to main, #4405 by @hramezani
  • Fix StrictStr does not raise ValidationError when max_length is present in Field, #4388 by @hramezani
  • Make SecretStr and SecretBytes hashable, #4387 by @chbndrhnns
  • Fix StrictBytes does not raise ValidationError when max_length is present in Field, #4380 by @JeanArhancet
  • Add support for bare type, #4375 by @hramezani
  • Support Python 3.11, including binaries for 3.11 in PyPI, #4374 by @samuelcolvin
  • Add support for re.Pattern, #4366 by @hramezani
  • Fix __post_init_post_parse__ is incorrectly passed keyword arguments when no __post_init__ is defined, #4361 by @hramezani
  • Fix implicitly importing ForwardRef and Callable from pydantic.typing instead of typing and also expose MappingIntStrAny, #4358 by @aminalaee
  • remove Any types from the dataclass decorator so it can be used with the disallow_any_expr mypy option, #4356 by @DetachHead
  • moved repo to pydantic/pydantic, #4348 by @yezz123
  • fix "extra fields not permitted" error when dataclass with Extra.forbid is validated multiple times, #4343 by @detachhead
  • Add Python 3.9 and 3.10 examples to docs, #4339 by @Bobronium
  • Discriminated union models now use oneOf instead of anyOf when generating OpenAPI schema definitions, #4335 by @MaxwellPayne
  • 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, #4332 by @Bobronium
  • Allow empty string aliases by using a alias is not None check, rather than bool(alias), #4253 by @sergeytsaplin
  • Update ForwardRefs in Field.outer_type_, #4249 by @JacobHayes
  • 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, #4241 by @multimeric
  • Use parent model's Config when validating nested NamedTuple fields, #4219 by @synek
  • Update BaseModel.construct to work with aliased Fields, #4192 by @kylebamos
  • Catch certain raised errors in smart_deepcopy and revert to deepcopy if so, #4184 by @coneybeare
  • Add Config.anystr_upper and to_upper kwarg to constr and conbytes, #4165 by @satheler
  • Fix JSON schema for set and frozenset when they include default values, #4155 by @aminalaee
  • Teach the mypy plugin that methods decorated by @validator are classmethods, #4102 by @DMRobertson
  • Improve mypy plugin's ability to detect required fields, #4086 by @richardxia
  • Support fields of type Type[] in schema, #4051 by @aminalaee
  • Add default value in JSON Schema when const=True, #4031 by @aminalaee
  • Adds reserved word check to signature generation logic, #4011 by @strue36
  • Fix Json strategy failure for the complex nested field, #4005 by @sergiosim
  • Add JSON-compatible float constraint allow_inf_nan, #3994 by @tiangolo
  • Remove undefined behaviour when env_prefix had characters in common with env_nested_delimiter, #3975 by @arsenron
  • Support generics model with create_model, #3945 by @hot123s
  • allow submodels to overwrite extra field info, #3934 by @PrettyWood
  • Document and test structural pattern matching (PEP 636) on BaseModel, #3920 by @irgolic
  • 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"), #3899 by @07pepa
  • Fix validation of discriminated union fields with an alias when passing a model instance, #3846 by @chornsby
  • Add a CockroachDsn type to validate CockroachDB connection strings. The type supports the following schemes: cockroachdb, cockroachdb+psycopg2 and cockroachdb+asyncpg, #3839 by @blubber
  • Fix MyPy plugin to not override pre-existing __init__ method in models, #3824 by @patrick91
  • Fix mypy version checking, #3783 by @KotlinIsland
  • support overwriting dunder attributes of BaseModel instances, #3777 by @PrettyWood
  • Added ConstrainedDate and condate, #3740 by @hottwaj
  • Support kw_only in dataclasses, #3670 by @detachhead
  • Add comparison method for Color class, #3646 by @aminalaee
  • Drop support for python3.6, associated cleanup, #3605 by @samuelcolvin
  • created new function to_lower_camel() for "non pascal case" camel case, #3463 by @schlerp
  • Add checks to default and default_factory arguments in Mypy plugin, #3430 by @klaa97
  • fix mangling of inspect.signature for BaseModel, #3413 by @fix-inspect-signature
  • Adds the SecretField abstract class so that all the current and future secret fields like SecretStr and SecretBytes will derive from it, #3409 by @expobrain
  • Support multi hosts validation in PostgresDsn, #3337 by @rglsk
  • Fix parsing of very small numeric timedelta values, #3315 by @samuelcolvin
  • Update SecretsSettingsSource to respect config.case_sensitive, #3273 by @JeanArhancet
  • Add MongoDB network data source name (DSN) schema, #3229 by @snosratiershad
  • Add support for multiple dotenv files, #3222 by @rekyungmin
  • Raise an explicit ConfigError when multiple fields are incorrectly set for a single validator, #3215 by @SunsetOrange
  • Allow ellipsis on Fields inside Annotated for TypedDicts required, #3133 by @ezegomez
  • Catch overflow errors in int_validator, #3112 by @ojii
  • Adds a __rich_repr__ method to Representation class which enables pretty printing with Rich, #3099 by @willmcgugan
  • Add percent encoding in AnyUrl and descendent types, #3061 by @FaresAhmedb
  • validate_arguments decorator now supports alias, #3019 by @MAD-py
  • Avoid __dict__ and __weakref__ attributes in AnyUrl and IP address fields, #2890 by @nuno-andre
  • Add ability to use Final in a field type annotation, #2766 by @uriyyo
  • Update requirement to typing_extensions>=4.1.0 to guarantee dataclass_transform is available, #4424 by @commonism
  • Add Explosion and AWS to main sponsors, #4413 by @samuelcolvin
  • Update documentation for copy_on_model_validation to reflect recent changes, #4369 by @samuelcolvin
  • Runtime warning if __slots__ is passed to create_model, __slots__ is then ignored, #4432 by @samuelcolvin
  • Add type hints to BaseSettings.Config to avoid mypy errors, also correct mypy version compatibility notice in docs, #4450 by @samuelcolvin

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.9.0...v1.10.0

- Python
Published by samuelcolvin over 3 years ago

pydantic - v1.10.0b1 (2022-08-24)

  • Runtime warning if __slots__ is passed to create_model, __slots__ is then ignored, #4432 by @samuelcolvin

Full Changelog https://github.com/pydantic/pydantic/compare/v1.10.0a2...v1.10.0b1

- Python
Published by samuelcolvin almost 4 years ago

pydantic - v1.10.0a2 (2022-08-24)

Docs for this pre-release are available here

  • Update requirement to typing_extensions>=4.1.0 to guarantee dataclass_transform is available, #4424 by @commonism
  • Add Explosion and AWS to main sponsors, #4413 by @samuelcolvin
  • Update documentation for copy_on_model_validation to reflect recent changes, #4369 by @samuelcolvin

Full Changelog https://github.com/pydantic/pydantic/compare/v1.10.0a1...v1.10.0a2

- Python
Published by samuelcolvin almost 4 years ago

pydantic - v1.10.0a1 (2022-08-22)

Docs for this pre-release are available here!

  • 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, #2557 by @PrettyWood 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, #4407 by @tlambert03
  • Rename master to main, #4405 by @hramezani
  • Fix StrictStr does not raise ValidationError when max_length is present in Field, #4388 by @hramezani
  • Make SecretStr and SecretBytes hashable, #4387 by @chbndrhnns
  • Fix StrictBytes does not raise ValidationError when max_length is present in Field, #4380 by @JeanArhancet
  • Add support for bare type, #4375 by @hramezani
  • Support Python 3.11, including binaries for 3.11 in PyPI, #4374 by @samuelcolvin
  • Add support for re.Pattern, #4366 by @hramezani
  • Fix __post_init_post_parse__ is incorrectly passed keyword arguments when no __post_init__ is defined, #4361 by @hramezani
  • Fix implicitly importing ForwardRef and Callable from pydantic.typing instead of typing and also expose MappingIntStrAny, #4358 by @aminalaee
  • remove Any types from the dataclass decorator so it can be used with the disallow_any_expr mypy option, #4356 by @DetachHead
  • moved repo to pydantic/pydantic, #4348 by @yezz123
  • fix "extra fields not permitted" error when dataclass with Extra.forbid is validated multiple times, #4343 by @detachhead
  • Add Python 3.9 and 3.10 examples to docs, #4339 by @Bobronium
  • Discriminated union models now use oneOf instead of anyOf when generating OpenAPI schema definitions, #4335 by @MaxwellPayne
  • 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, #4332 by @Bobronium
  • Allow empty string aliases by using a alias is not None check, rather than bool(alias), #4253 by @sergeytsaplin
  • Update ForwardRefs in Field.outer_type_, #4249 by @JacobHayes
  • 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, #4241 by @multimeric
  • Use parent model's Config when validating nested NamedTuple fields, #4219 by @synek
  • Update BaseModel.construct to work with aliased Fields, #4192 by @kylebamos
  • Catch certain raised errors in smart_deepcopy and revert to deepcopy if so, #4184 by @coneybeare
  • Add Config.anystr_upper and to_upper kwarg to constr and conbytes, #4165 by @satheler
  • Fix JSON schema for set and frozenset when they include default values, #4155 by @aminalaee
  • Teach the mypy plugin that methods decorated by @validator are classmethods, #4102 by @DMRobertson
  • Improve mypy plugin's ability to detect required fields, #4086 by @richardxia
  • Support fields of type Type[] in schema, #4051 by @aminalaee
  • Add default value in JSON Schema when const=True, #4031 by @aminalaee
  • Adds reserved word check to signature generation logic, #4011 by @strue36
  • Fix Json strategy failure for the complex nested field, #4005 by @sergiosim
  • Add JSON-compatible float constraint allow_inf_nan, #3994 by @tiangolo
  • Remove undefined behaviour when env_prefix had characters in common with env_nested_delimiter, #3975 by @arsenron
  • Support generics model with create_model, #3945 by @hot123s
  • allow submodels to overwrite extra field info, #3934 by @PrettyWood
  • Document and test structural pattern matching (PEP 636) on BaseModel, #3920 by @irgolic
  • 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"), #3899 by @07pepa
  • Fix validation of discriminated union fields with an alias when passing a model instance, #3846 by @chornsby
  • Add a CockroachDsn type to validate CockroachDB connection strings. The type supports the following schemes: cockroachdb, cockroachdb+psycopg2 and cockroachdb+asyncpg, #3839 by @blubber
  • Fix MyPy plugin to not override pre-existing __init__ method in models, #3824 by @patrick91
  • Fix mypy version checking, #3783 by @KotlinIsland
  • support overwriting dunder attributes of BaseModel instances, #3777 by @PrettyWood
  • Added ConstrainedDate and condate, #3740 by @hottwaj
  • Support kw_only in dataclasses, #3670 by @detachhead
  • Add comparison method for Color class, #3646 by @aminalaee
  • Drop support for python3.6, associated cleanup, #3605 by @samuelcolvin
  • created new function to_lower_camel() for "non pascal case" camel case, #3463 by @schlerp
  • Add checks to default and default_factory arguments in Mypy plugin, #3430 by @klaa97
  • fix mangling of inspect.signature for BaseModel, #3413 by @fix-inspect-signature
  • Adds the SecretField abstract class so that all the current and future secret fields like SecretStr and SecretBytes will derive from it, #3409 by @expobrain
  • Support multi hosts validation in PostgresDsn, #3337 by @rglsk
  • Fix parsing of very small numeric timedelta values, #3315 by @samuelcolvin
  • Update SecretsSettingsSource to respect config.case_sensitive, #3273 by @JeanArhancet
  • Add MongoDB network data source name (DSN) schema, #3229 by @snosratiershad
  • Add support for multiple dotenv files, #3222 by @rekyungmin
  • Raise an explicit ConfigError when multiple fields are incorrectly set for a single validator, #3215 by @SunsetOrange
  • Allow ellipsis on Fields inside Annotated for TypedDicts required, #3133 by @ezegomez
  • Catch overflow errors in int_validator, #3112 by @ojii
  • Adds a __rich_repr__ method to Representation class which enables pretty printing with Rich, #3099 by @willmcgugan
  • Add percent encoding in AnyUrl and descendent types, #3061 by @FaresAhmedb
  • validate_arguments decorator now supports alias, #3019 by @MAD-py
  • Avoid __dict__ and __weakref__ attributes in AnyUrl and IP address fields, #2890 by @nuno-andre
  • Add ability to use Final in a field type annotation, #2766 by @uriyyo

Full Changelog: https://github.com/pydantic/pydantic/compare/v1.9.0...v1.10a1

- Python
Published by samuelcolvin almost 4 years ago

pydantic - v1.9.2 (2022-08-11)

Revert Breaking Change: v1.9.1 introduced a breaking change where model fields were deep copied by default, this release reverts the default behaviour to match v1.9.0 and before, while also allow deep-copy behaviour via copy_on_model_validation = 'deep'. See #4092 for more information.

  • Allow for shallow copies of model fields, Config.copy_on_model_validation is now a str which must be 'none', 'deep', or 'shallow' corresponding to not copying, deep copy & shallow copy; default 'shallow', #4093 by @timkpaine

- Python
Published by samuelcolvin almost 4 years ago

pydantic - v1.9.1 (2022-05-19)

Thank you to pydantic's sponsors: @tiangolo, @stellargraph, @JonasKs, @grillazz, @Mazyod, @kevinalh, @chdsbd, @povilasb, @povilasb, @jina-ai, @mainframeindustries, @robusta-dev, @SendCloud, @rszamszur, @jodal, @hardbyte, @corleyma, @daddycocoaman, @Rehket, @jokull, @reillysiemens, @westonsteimel, @primer-io, @koxudaxi, @browniebroke, @stradivari96, @adriangb, @kamalgill, @jqueguiner, @dev-zero, @datarootsio, @RedCarpetUp for their kind support.

  • Limit the size of generics._generic_types_cache and generics._assigned_parameters to avoid unlimited increase in memory usage, #4083 by @samuelcolvin
  • Add Jupyverse and FPS as Jupyter projects using pydantic, #4082 by @davidbrochart
  • Speedup __isinstancecheck__ on pydantic models when the type is not a model, may also avoid memory "leaks", #4081 by @samuelcolvin
  • Fix in-place modification of FieldInfo that caused problems with PEP 593 type aliases, #4067 by @adriangb
  • Add support for autocomplete in VS Code via __dataclass_transform__ when using pydantic.dataclasses.dataclass, #4006 by @giuliano-oliveira
  • Remove benchmarks from codebase and docs, #3973 by @samuelcolvin
  • Typing checking with pyright in CI, improve docs on vscode/pylance/pyright, #3972 by @samuelcolvin
  • Fix nested Python dataclass schema regression, #3819 by @himbeles
  • Update documentation about lazy evaluation of sources for Settings, #3806 by @garyd203
  • Prevent subclasses of bytes being converted to bytes, #3706 by @samuelcolvin
  • Fixed "error checking inheritance of" when using PEP585 and PEP604 type hints, #3681 by @aleksul
  • Allow self referencing ClassVars in models, #3679 by @samuelcolvin
  • Fix issue with self-referencing dataclass, #3675 by @uriyyo
  • Include non-standard port numbers in rendered URLs, #3652 by @dolfinus
  • Config.copy_on_model_validation does a deep copy and not a shallow one, #3641 by @PrettyWood
  • fix: clarify that discriminated unions do not support singletons, #3636 by @tommilligan
  • Add read_text(encoding='utf-8') for setup.py, #3625 by @hswong3i
  • Fix JSON Schema generation for Discriminated Unions within lists, #3608 by @samuelcolvin

- Python
Published by samuelcolvin about 4 years ago

pydantic - v1.9.0 (2021-12-31)

Thank you to pydantic's sponsors: @sthagen, @timdrijvers, @toinbis, @koxudaxi, @ginomempin, @primer-io, @and-semakin, @westonsteimel, @reillysiemens, @es3n1n, @jokull, @JonasKs, @Rehket, @corleyma, @daddycocoaman, @hardbyte, @datarootsio, @jodal, @aminalaee, @rafsaf, @jqueguiner, @chdsbd, @kevinalh, @Mazyod, @grillazz, @JonasKs, @simw, @leynier, @xfenix for their kind support.

Highlights

  • add python 3.10 support, #2885 by @PrettyWood
  • Discriminated unions, #619 by @PrettyWood
  • Config.smart_union for better union logic, #2092 by @PrettyWood
  • Binaries for Macos M1 CPUs, #3498 by @samuelcolvin
  • Complex types can be set via nested environment variables, e.g. foo___bar, #3159 by @Air-Mark
  • add a dark mode to pydantic documentation, #2913 by @gbdlin
  • Add support for autocomplete in VS Code via __dataclass_transform__, #2721 by @tiangolo
  • Add "exclude" as a field parameter so that it can be configured using model config, #660 by @daviskirk

v1.9.0 (2021-12-31) Changes

  • Apply update_forward_refs to Config.json_encodes prevent name clashes in types defined via strings, #3583 by @samuelcolvin
  • Extend pydantic's mypy plugin to support mypy versions 0.910, 0.920, 0.921 & 0.930, #3573 & #3594 by @PrettyWood, @christianbundy, @samuelcolvin

v1.9.0a2 (2021-12-24) Changes

  • support generic models with discriminated union, #3551 by @PrettyWood
  • keep old behaviour of json() by default, #3542 by @PrettyWood
  • Removed typing-only __root__ attribute from BaseModel, #3540 by @layday
  • Build Python 3.10 wheels, #3539 by @mbachry
  • Fix display of extra fields with model __repr__, #3234 by @cocolman
  • models copied via Config.copy_on_model_validation always have all fields, #3201 by @PrettyWood
  • nested ORM from nested dictionaries, #3182 by @PrettyWood
  • fix link to discriminated union section by @PrettyWood

v1.9.0a1 (2021-12-18) Changes

  • Add support for Decimal-specific validation configurations in Field(), additionally to using condecimal(), to allow better support from editors and tooling, #3507 by @tiangolo
  • Add arm64 binaries suitable for MacOS with an M1 CPU to PyPI, #3498 by @samuelcolvin
  • Fix issue where None was considered invalid when using a Union type containing Any or object, #3444 by @tharradine
  • When generating field schema, pass optional field argument (of type pydantic.fields.ModelField) to __modify_schema__() if present, #3434 by @jasujm
  • Fix issue when pydantic fail to parse typing.ClassVar string type annotation, #3401 by @uriyyo
  • Mention Python >= 3.9.2 as an alternative to typing_extensions.TypedDict, #3374 by @BvB93
  • Changed the validator method name in the Custom Errors example to more accurately describe what the validator is doing; changed from name_must_contain_space to value_must_equal_bar, #3327 by @michaelrios28
  • Add AmqpDsn class, #3254 by @kludex
  • Always use Enum value as default in generated JSON schema, #3190 by @joaommartins
  • Add support for Mypy 0.920, #3175 by @christianbundy
  • validate_arguments now supports extra customization (used to always be Extra.forbid), #3161 by @PrettyWood
  • Complex types can be set by nested environment variables, #3159 by @Air-Mark
  • Fix mypy plugin to collect fields based on pydantic.utils.is_valid_field so that it ignores untyped private variables, #3146 by @hi-ogawa
  • fix validate_arguments issue with Config.validate_all, #3135 by @PrettyWood
  • avoid dict coercion when using dict subclasses as field type, #3122 by @PrettyWood
  • add support for object type, #3062 by @PrettyWood
  • Updates pydantic dataclasses to keep _special properties on parent classes, #3043 by @zulrang
  • Add a TypedDict class for error objects, #3038 by @matthewhughes934
  • Fix support for using a subclass of an annotation as a default, #3018 by @JacobHayes
  • make create_model_from_typeddict mypy compliant, #3008 by @PrettyWood
  • Make multiple inheritance work when using PrivateAttr, #2989 by @hmvp
  • Parse environment variables as JSON, if they have a Union type with a complex subfield, #2936 by @cbartz
  • Prevent StrictStr permitting Enum values where the enum inherits from str, #2929 by @samuelcolvin
  • Make SecretsSettingsSource parse values being assigned to fields of complex types when sourced from a secrets file, just as when sourced from environment variables, #2917 by @davidmreed
  • add a dark mode to pydantic documentation, #2913 by @gbdlin
  • Make pydantic-mypy plugin compatible with pyproject.toml configuration, consistent with mypy changes. See the doc for more information, #2908 by @jrwalk
  • add python 3.10 support, #2885 by @PrettyWood
  • Correctly parse generic models with Json[T], #2860 by @geekingfrog
  • Update contrib docs re: python version to use for building docs, #2856 by @paxcodes
  • Clarify documentation about pydantic's support for custom validation and strict type checking, despite pydantic being primarily a parsing library, #2855 by @paxcodes
  • Fix schema generation for Deque fields, #2810 by @sergejkozin
  • fix an edge case when mixing constraints and Literal, #2794 by @PrettyWood
  • Fix postponed annotation resolution for NamedTuple and TypedDict when they're used directly as the type of fields within Pydantic models, #2760 by @jameysharp
  • Fix bug when mypy plugin fails on construct method call for BaseSettings derived classes, #2753 by @uriyyo
  • Add function overloading for a pydantic.create_model function, #2748 by @uriyyo
  • Fix mypy plugin issue with self field declaration, #2743 by @uriyyo
  • The colon at the end of the line "The fields which were supplied when user was initialised:" suggests that the code following it is related. Changed it to a period, #2733 by @krisaoe
  • Renamed variable schema to schema_ to avoid shadowing of global variable name, #2724 by @shahriyarr
  • Add support for autocomplete in VS Code via __dataclass_transform__, #2721 by @tiangolo
  • add missing type annotations in BaseConfig and handle max_length = 0, #2719 by @PrettyWood
  • Change orm_mode checking to allow recursive ORM mode parsing with dicts, #2718 by @nuno-andre
  • Add episode 313 of the Talk Python To Me podcast, where Michael Kennedy and Samuel Colvin discuss pydantic, to the docs, #2712 by @RatulMaharaj
  • fix JSON schema generation when a field is of type NamedTuple and has a default value, #2707 by @PrettyWood
  • Enum fields now properly support extra kwargs in schema generation, #2697 by @sammchardy
  • Make serialization of referenced pydantic models possible, #2650 by @PrettyWood
  • Add uniqueItems option to ConstrainedList, #2618 by @nuno-andre
  • Try to evaluate forward refs automatically at model creation, #2588 by @uriyyo
  • Switch docs preview and coverage display to use smokeshow, #2580 by @samuelcolvin
  • Add __version__ attribute to pydantic module, #2572 by @paxcodes
  • Add postgresql+asyncpg, postgresql+pg8000, postgresql+psycopg2, postgresql+psycopg2cffi, postgresql+py-postgresql and postgresql+pygresql schemes for PostgresDsn, #2567 by @postgres-asyncpg
  • Enable the Hypothesis plugin to generate a constrained decimal when the decimal_places argument is specified, #2524 by @cwe5590
  • Allow collections.abc.Callable to be used as type in python 3.9, #2519 by @daviskirk
  • Documentation update how to custom compile pydantic when using pip install, small change in setup.py to allow for custom CFLAGS when compiling, #2517 by @peterroelants
  • remove side effect of default_factory to run it only once even if Config.validate_all is set, #2515 by @PrettyWood
  • Add lookahead to ip regexes for AnyUrl hosts. This allows urls with DNS labels looking like IPs to validate as they are perfectly valid host names, #2512 by @sbv-csis
  • Set minItems and maxItems in generated JSON schema for fixed-length tuples, #2497 by @PrettyWood
  • Add strict argument to conbytes, #2489 by @koxudaxi
  • Support user defined generic field types in generic models, #2465 by @daviskirk
  • Add an example and a short explanation of subclassing GetterDict to docs, #2463 by @nuno-andre
  • add KafkaDsn type, HttpUrl now has default port 80 for http and 443 for https, #2447 by @MihanixA
  • Add PastDate and FutureDate types, #2425 by @Kludex
  • Support generating schema for Generic fields with subtypes, #2375 by @maximberg
  • fix(encoder): serialize NameEmail to str, #2341 by @alecgerona
  • add Config.smart_union to prevent coercion in Union if possible, see the doc for more information, #2092 by @PrettyWood
  • Add ability to use typing.Counter as a model field type, #2060 by @uriyyo
  • Add parameterised subclasses to __bases__ when constructing new parameterised classes, so that A <: B => A[int] <: B[int], #2007 by @diabolo-dan
  • Create FileUrl type that allows URLs that conform to RFC 8089. Add host_required parameter, which is True by default (AnyUrl and subclasses), False in RedisDsn, FileUrl, #1983 by @vgerak
  • add confrozenset(), analogous to conset() and conlist(), #1897 by @PrettyWood
  • stop calling parent class root_validator if overridden, #1895 by @PrettyWood
  • Add repr (defaults to True) parameter to Field, to hide it from the default representation of the BaseModel, #1831 by @fnep
  • Accept empty query/fragment URL parts, #1807 by @xavier

- Python
Published by samuelcolvin over 4 years ago

pydantic - v1.9.0a2 (2021-12-24)

  • support generic models with discriminated union, #3551 by @PrettyWood
  • keep old behaviour of json() by default, #3542 by @PrettyWood
  • Removed typing-only __root__ attribute from BaseModel, #3540 by @layday
  • Build Python 3.10 wheels, #3539 by @mbachry
  • Fix display of extra fields with model __repr__, #3234 by @cocolman
  • models copied via Config.copy_on_model_validation always have all fields, #3201 by @PrettyWood
  • nested ORM from nested dictionaries, #3182 by @PrettyWood
  • fix link to discriminated union section by @PrettyWood

Full Changelog: https://github.com/samuelcolvin/pydantic/compare/v1.9.0a1...v1.9.0a2

Discussion and feedback: #3538

- Python
Published by samuelcolvin over 4 years ago

pydantic - v1.9.0a1 (2021-12-18)

See Changelog.

Thank you to pydantic's sponsors: @timdrijvers, @toinbis, @koxudaxi, @ginomempin, @primer-io, @and-semakin, @westonsteimel, @reillysiemens, @es3n1n, @jokull, @JonasKs, @Rehket, @corleyma, @daddycocoaman, @hardbyte, @datarootsio, @jodal, @aminalaee, @rafsaf, @jqueguiner, @chdsbd, @kevinalh, @Mazyod, @grillazz, @JonasKs for their kind support.

Highlights

  • add python 3.10 support, #2885 by @PrettyWood
  • Discriminated unions, #619 by @PrettyWood
  • Config.smart_union for better union logic, #2092 by @PrettyWood
  • Binaries for Macos M1 CPUs, #3498 by @samuelcolvin
  • Complex types can be set via nested environment variables, e.g. foo___bar, #3159 by @Air-Mark
  • add a dark mode to pydantic documentation, #2913 by @gbdlin
  • Add support for autocomplete in VS Code via __dataclass_transform__, #2721 by @tiangolo

Changes

  • Add support for Decimal-specific validation configurations in Field(), additionally to using condecimal(), to allow better support from editors and tooling, #3507 by @tiangolo
  • Add arm64 binaries suitable for MacOS with an M1 CPU to PyPI, #3498 by @samuelcolvin
  • Fix issue where None was considered invalid when using a Union type containing Any or object, #3444 by @tharradine
  • When generating field schema, pass optional field argument (of type pydantic.fields.ModelField) to __modify_schema__() if present, #3434 by @jasujm
  • Fix issue when pydantic fail to parse typing.ClassVar string type annotation, #3401 by @uriyyo
  • Mention Python >= 3.9.2 as an alternative to typing_extensions.TypedDict, #3374 by @BvB93
  • Changed the validator method name in the Custom Errors example to more accurately describe what the validator is doing; changed from name_must_contain_space to value_must_equal_bar, #3327 by @michaelrios28
  • Add AmqpDsn class, #3254 by @kludex
  • Always use Enum value as default in generated JSON schema, #3190 by @joaommartins
  • Add support for Mypy 0.920, #3175 by @christianbundy
  • validate_arguments now supports extra customization (used to always be Extra.forbid), #3161 by @PrettyWood
  • Complex types can be set by nested environment variables, #3159 by @Air-Mark
  • Fix mypy plugin to collect fields based on pydantic.utils.is_valid_field so that it ignores untyped private variables, #3146 by @hi-ogawa
  • fix validate_arguments issue with Config.validate_all, #3135 by @PrettyWood
  • avoid dict coercion when using dict subclasses as field type, #3122 by @PrettyWood
  • add support for object type, #3062 by @PrettyWood
  • Updates pydantic dataclasses to keep _special properties on parent classes, #3043 by @zulrang
  • Add a TypedDict class for error objects, #3038 by @matthewhughes934
  • Fix support for using a subclass of an annotation as a default, #3018 by @JacobHayes
  • make create_model_from_typeddict mypy compliant, #3008 by @PrettyWood
  • Make multiple inheritance work when using PrivateAttr, #2989 by @hmvp
  • Parse environment variables as JSON, if they have a Union type with a complex subfield, #2936 by @cbartz
  • Prevent StrictStr permitting Enum values where the enum inherits from str, #2929 by @samuelcolvin
  • Make SecretsSettingsSource parse values being assigned to fields of complex types when sourced from a secrets file, just as when sourced from environment variables, #2917 by @davidmreed
  • add a dark mode to pydantic documentation, #2913 by @gbdlin
  • Make pydantic-mypy plugin compatible with pyproject.toml configuration, consistent with mypy changes. See the doc for more information, #2908 by @jrwalk
  • add python 3.10 support, #2885 by @PrettyWood
  • Correctly parse generic models with Json[T], #2860 by @geekingfrog
  • Update contrib docs re: python version to use for building docs, #2856 by @paxcodes
  • Clarify documentation about pydantic's support for custom validation and strict type checking, despite pydantic being primarily a parsing library, #2855 by @paxcodes
  • Fix schema generation for Deque fields, #2810 by @sergejkozin
  • fix an edge case when mixing constraints and Literal, #2794 by @PrettyWood
  • Fix postponed annotation resolution for NamedTuple and TypedDict when they're used directly as the type of fields within Pydantic models, #2760 by @jameysharp
  • Fix bug when mypy plugin fails on construct method call for BaseSettings derived classes, #2753 by @uriyyo
  • Add function overloading for a pydantic.create_model function, #2748 by @uriyyo
  • Fix mypy plugin issue with self field declaration, #2743 by @uriyyo
  • The colon at the end of the line "The fields which were supplied when user was initialised:" suggests that the code following it is related. Changed it to a period, #2733 by @krisaoe
  • Renamed variable schema to schema_ to avoid shadowing of global variable name, #2724 by @shahriyarr
  • Add support for autocomplete in VS Code via __dataclass_transform__, #2721 by @tiangolo
  • add missing type annotations in BaseConfig and handle max_length = 0, #2719 by @PrettyWood
  • Change orm_mode checking to allow recursive ORM mode parsing with dicts, #2718 by @nuno-andre
  • Add episode 313 of the Talk Python To Me podcast, where Michael Kennedy and Samuel Colvin discuss pydantic, to the docs, #2712 by @RatulMaharaj
  • fix JSON schema generation when a field is of type NamedTuple and has a default value, #2707 by @PrettyWood
  • Enum fields now properly support extra kwargs in schema generation, #2697 by @sammchardy
  • Make serialization of referenced pydantic models possible, #2650 by @PrettyWood
  • Add uniqueItems option to ConstrainedList, #2618 by @nuno-andre
  • Try to evaluate forward refs automatically at model creation, #2588 by @uriyyo
  • Switch docs preview and coverage display to use smokeshow, #2580 by @samuelcolvin
  • Add __version__ attribute to pydantic module, #2572 by @paxcodes
  • Add postgresql+asyncpg, postgresql+pg8000, postgresql+psycopg2, postgresql+psycopg2cffi, postgresql+py-postgresql and postgresql+pygresql schemes for PostgresDsn, #2567 by @postgres-asyncpg
  • Enable the Hypothesis plugin to generate a constrained decimal when the decimal_places argument is specified, #2524 by @cwe5590
  • Allow collections.abc.Callable to be used as type in python 3.9, #2519 by @daviskirk
  • Documentation update how to custom compile pydantic when using pip install, small change in setup.py to allow for custom CFLAGS when compiling, #2517 by @peterroelants
  • remove side effect of default_factory to run it only once even if Config.validate_all is set, #2515 by @PrettyWood
  • Add lookahead to ip regexes for AnyUrl hosts. This allows urls with DNS labels looking like IPs to validate as they are perfectly valid host names, #2512 by @sbv-csis
  • Set minItems and maxItems in generated JSON schema for fixed-length tuples, #2497 by @PrettyWood
  • Add strict argument to conbytes, #2489 by @koxudaxi
  • Support user defined generic field types in generic models, #2465 by @daviskirk
  • Add an example and a short explanation of subclassing GetterDict to docs, #2463 by @nuno-andre
  • add KafkaDsn type, HttpUrl now has default port 80 for http and 443 for https, #2447 by @MihanixA
  • Add PastDate and FutureDate types, #2425 by @Kludex
  • Support generating schema for Generic fields with subtypes, #2375 by @maximberg
  • fix(encoder): serialize NameEmail to str, #2341 by @alecgerona
  • add Config.smart_union to prevent coercion in Union if possible, see the doc for more information, #2092 by @PrettyWood
  • Add ability to use typing.Counter as a model field type, #2060 by @uriyyo
  • Add parameterised subclasses to __bases__ when constructing new parameterised classes, so that A <: B => A[int] <: B[int], #2007 by @diabolo-dan
  • Create FileUrl type that allows URLs that conform to RFC 8089. Add host_required parameter, which is True by default (AnyUrl and subclasses), False in RedisDsn, FileUrl, #1983 by @vgerak
  • add confrozenset(), analogous to conset() and conlist(), #1897 by @PrettyWood
  • stop calling parent class root_validator if overridden, #1895 by @PrettyWood
  • Add repr (defaults to True) parameter to Field, to hide it from the default representation of the BaseModel, #1831 by @fnep
  • Accept empty query/fragment URL parts, #1807 by @xavier
  • Add "exclude" as a field parameter so that it can be configured using model config instead of purely at .dict / .json export time, #660 by @daviskirk

Full List of changes: https://github.com/samuelcolvin/pydantic/compare/v1.8.2...v1.9.0a1

- Python
Published by samuelcolvin over 4 years ago

pydantic - v1.8.2 (2021-05-11)

See Changelog.

Warning

A security vulnerability, level "moderate" is fixed in v1.8.2. Please upgrade ASAP. See security advisory CVE-2021-29510.

Changes

  • Security fix: Fix date and datetime parsing so passing either 'infinity' or float('inf') (or their negative values) does not cause an infinite loop, see security advisory CVE-2021-29510
  • fix schema generation with Enum by generating a valid name, #2575 by @PrettyWood
  • fix JSON schema generation with a Literal of an enum member, #2536 by @PrettyWood
  • Fix bug with configurations declarations that are passed as keyword arguments during class creation, #2532 by @uriyyo
  • Allow passing json_encoders in class kwargs, #2521 by @layday
  • support arbitrary types with custom __eq__, #2483 by @PrettyWood
  • support Annotated in validate_arguments and in generic models with python 3.9, #2483 by @PrettyWood

- Python
Published by samuelcolvin about 5 years ago

pydantic - v1.7.4 (2021-05-11)

Security fix: Fix date and datetime parsing so passing either 'infinity' or float('inf') (or their negative values) does not cause an infinite loop, see security advisory CVE-2021-29510.

- Python
Published by samuelcolvin about 5 years ago

pydantic - v1.6.2 (2021-05-11)

Security fix: Fix date and datetime parsing so passing either 'infinity' or float('inf') (or their negative values) does not cause an infinite loop, see security advisory CVE-2021-29510.

- Python
Published by samuelcolvin about 5 years ago

pydantic - v1.8.1 (2021-03-03)

See Changelog.

Bug fixes for regressions and new features in v1.8

  • allow elements of Config.field to update elements of a Field, #2461 by @samuelcolvin
  • fix validation with a BaseModel field and a custom root type, #2449 by @PrettyWood
  • expose Pattern encoder to fastapi, #2444 by @PrettyWood
  • enable the Hypothesis plugin to generate a constrained float when the multiple_of argument is specified, #2442 by @tobi-lipede-oodle
  • Avoid RecursionError when using some types like Enum or Literal with generic models, #2436 by @PrettyWood
  • do not overwrite declared __hash__ in subclasses of a model, #2422 by @PrettyWood
  • fix mypy complaints on Path and UUID related custom types, #2418 by @PrettyWood
  • Support properly variable length tuples of compound types, #2416 by @PrettyWood

- Python
Published by samuelcolvin about 5 years ago