Skip to content

Commit

Permalink
Bump v1 version stub to v1.10.18 (pydantic#10214)
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-runkle authored Aug 22, 2024
1 parent 5511876 commit 0672da1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
7 changes: 7 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,13 @@ See [this post](https://docs.pydantic.dev/blog/pydantic-v2-alpha/) for more deta

<!-- package description limit -->

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

* 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

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

* Advertise Python 3.12 for 1.10.x! Part Deux by @vfazio in https://github.com/pydantic/pydantic/pull/9644
Expand Down
6 changes: 5 additions & 1 deletion pydantic/v1/mypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,11 @@ def add_construct_method(self, fields: List['PydanticModelField']) -> None:
tvd = TypeVarType(
self_tvar_name,
tvar_fullname,
TypeVarId(-1),
(
TypeVarId(-1, namespace=ctx.cls.fullname + '.construct')
if MYPY_VERSION_TUPLE >= (1, 11)
else TypeVarId(-1)
),
[],
obj_type,
AnyType(TypeOfAny.from_omitted_generics), # type: ignore[arg-type]
Expand Down
2 changes: 1 addition & 1 deletion pydantic/v1/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ def field_singleton_sub_fields_schema(
discriminator_models_refs[discriminator_value] = discriminator_model_ref['$ref']

s['discriminator'] = {
'propertyName': field.discriminator_alias,
'propertyName': field.discriminator_alias if by_alias else field.discriminator_key,
'mapping': discriminator_models_refs,
}

Expand Down
1 change: 1 addition & 0 deletions pydantic/v1/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
'almost_equal_floats',
'get_model',
'to_camel',
'to_lower_camel',
'is_valid_field',
'smart_deepcopy',
'PyObjectStr',
Expand Down
2 changes: 1 addition & 1 deletion pydantic/v1/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__all__ = 'compiled', 'VERSION', 'version_info'

VERSION = '1.10.17'
VERSION = '1.10.18'

try:
import cython # type: ignore
Expand Down

0 comments on commit 0672da1

Please sign in to comment.