Skip to content

Commit a0c3885

Browse files
committed
Use updated te branch, add core schema
1 parent bcee7bd commit a0c3885

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ classifiers = [
3636
'Typing :: Typed',
3737
]
3838
dependencies = [
39-
'typing-extensions@git+https://github.com/python/typing_extensions',
39+
'typing-extensions@git+https://github.com/HexDecimal/typing_extensions@conforming-sentinel',
4040
]
4141
dynamic = ['license', 'readme', 'version']
4242

python/pydantic_core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class MultiHostHost(_TypedDict):
145145
"""The port part of this host, or `None`."""
146146

147147

148-
UNSET = Sentinel('UNSET')
148+
UNSET = Sentinel('UNSET', module_name='pydantic_core')
149149
"""A singleton indicating a field value was not set during validation.
150150
151151
This singleton can be used a default value, as an alternative to `None` when it has

python/pydantic_core/core_schema.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,16 @@ class Color(Enum):
13411341
)
13421342

13431343

1344+
class UnsetSentinelSchema(TypedDict, total=False):
1345+
type: Required[Literal['unset-sentinel']]
1346+
1347+
1348+
def unset_sentinel_schema() -> UnsetSentinelSchema:
1349+
"""Returns a schema for the [`UNSET`][pydantic_core.UNSET] sentinel."""
1350+
1351+
return {'type': 'unset-sentinel'}
1352+
1353+
13441354
# must match input/parse_json.rs::JsonType::try_from
13451355
JsonType = Literal['null', 'bool', 'int', 'float', 'str', 'list', 'dict']
13461356

uv.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)