Skip to content

Commit 92ceb15

Browse files
committed
chore(dependencies): reorganize deprecation imports across deprecated v1 modules for consistency
Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>
1 parent 5cd2757 commit 92ceb15

5 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/cloudevents/v1/http/event_type.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
# under the License.
1414
import typing
1515

16+
from deprecation import deprecated
17+
1618
from cloudevents.v1.sdk.converters import is_binary as _moved_is_binary
1719
from cloudevents.v1.sdk.converters import is_structured as _moved_is_structured
18-
from deprecation import deprecated
1920

2021
# THIS MODULE IS DEPRECATED, YOU SHOULD NOT ADD NEW FUNCTIONALLY HERE
2122

src/cloudevents/v1/http/http_methods.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@
1414

1515
import typing
1616

17+
from deprecation import deprecated
18+
1719
from cloudevents.v1.abstract import AnyCloudEvent
1820
from cloudevents.v1.conversion import to_binary as _moved_to_binary
1921
from cloudevents.v1.conversion import to_structured as _moved_to_structured
2022
from cloudevents.v1.http.conversion import from_http as _moved_from_http
2123
from cloudevents.v1.http.event import CloudEvent
2224
from cloudevents.v1.sdk import types
23-
from cloudevents.v1 import deprecated
2425

2526
# THIS MODULE IS DEPRECATED, YOU SHOULD NOT ADD NEW FUNCTIONALLY HERE
2627

src/cloudevents/v1/http/json_methods.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414

1515
import typing
1616

17+
from deprecation import deprecated
18+
1719
from cloudevents.v1.abstract import AnyCloudEvent
1820
from cloudevents.v1.conversion import to_json as _moved_to_json
1921
from cloudevents.v1.http import CloudEvent
2022
from cloudevents.v1.http.conversion import from_json as _moved_from_json
2123
from cloudevents.v1.sdk import types
22-
from deprecation import deprecated
2324

2425
# THIS MODULE IS DEPRECATED, YOU SHOULD NOT ADD NEW FUNCTIONALLY HERE
2526

src/cloudevents/v1/http/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
# under the License.
1414
import typing
1515

16+
from deprecation import deprecated
17+
1618
from cloudevents.v1.conversion import (
1719
_best_effort_serialize_to_json as _moved_default_marshaller,
1820
)
19-
from deprecation import deprecated
2021

2122
# THIS MODULE IS DEPRECATED, YOU SHOULD NOT ADD NEW FUNCTIONALLY HERE
2223

src/cloudevents/v1/pydantic/v2/event.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
import typing
1818
from typing import Any
1919

20+
from pydantic.deprecated import parse as _deprecated_parse
21+
2022
from cloudevents.v1.exceptions import PydanticFeatureNotInstalled
2123
from cloudevents.v1.pydantic.fields_docs import FIELD_DESCRIPTIONS
22-
from pydantic.deprecated import parse as _deprecated_parse
2324

2425
try:
2526
from pydantic import BaseModel, ConfigDict, Field, model_serializer

0 commit comments

Comments
 (0)