Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pydantiv2.4.0 compat #738

Merged
merged 13 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion faststream/__about__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Simple and fast framework to create message brokers based microservices"""
__version__ = "0.1.1"
__version__ = "0.1.2"


INSTALL_YAML = """
Expand Down
2 changes: 1 addition & 1 deletion faststream/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def raise_fastapi_validation_error(errors: List[Any], body: AnyDict) -> Never:

if PYDANTIC_V2:
from pydantic import ConfigDict as ConfigDict
from pydantic._internal._annotated_handlers import (
from pydantic.annotated_handlers import (
GetJsonSchemaHandler as GetJsonSchemaHandler,
)
from pydantic_core import CoreSchema as CoreSchema
Expand Down
6 changes: 2 additions & 4 deletions faststream/asyncapi/schema/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
from faststream._compat import PYDANTIC_V2
from faststream.asyncapi.schema.utils import (
ExternalDocs,
ExternalDocsDict,
Tag,
TagDict,
)


Expand Down Expand Up @@ -72,8 +70,8 @@ class Message(BaseModel):
# examples
# traits

tags: Optional[List[Union[Tag, TagDict, Dict[str, Any]]]] = None
externalDocs: Optional[Union[ExternalDocs, ExternalDocsDict, Dict[str, Any]]] = None
tags: Optional[List[Union[Tag, Dict[str, Any]]]] = None # TODO: weird TagDict behavior
externalDocs: Optional[Union[ExternalDocs, Dict[str, Any]]] = None # TODO: weird ExternalDocsDict behavior

if PYDANTIC_V2:
model_config = {"extra": "allow"}
Expand Down
Loading