8000 Merge remote-tracking branch 'origin/drop-python3.8' into drop-python3.8 · cloudevents/sdk-python@4cd705d · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit 4cd705d

Browse files
committed
Merge remote-tracking branch 'origin/drop-python3.8' into drop-python3.8
2 parents 705e7cc + 971dbb4 commit 4cd705d

34 files changed

+61
-37
lines changed

cloudevents/conversion.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@
1616
import json
1717
import typing
1818

19+
from cloudevents import exceptions as cloud_exceptions
1920
from cloudevents.abstract import AnyCloudEvent
2021
from cloudevents.sdk import converters, marshaller, types
2122
from cloudevents.sdk.converters import is_binary
2223
from cloudevents.sdk.event import v1, v03
2324

24-
from cloudevents import exceptions as cloud_exceptions
25-
2625

2726
def _best_effort_serialize_to_json( # type: ignore[no-untyped-def]
2827
value: typing.Any, *args, **kwargs

cloudevents/http/event.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
import uuid
1818

1919
import cloudevents.exceptions as cloud_exceptions
20-
from cloudevents.sdk.event import v1, v03
21-
2220
from cloudevents import abstract
21+
from cloudevents.sdk.event import v1, v03
2322

2423
_required_by_version = {
2524
"1.0": v1.Event._ce_required_fields,

cloudevents/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.sdk.converters import is_binary as _moved_is_binary
1719
from cloudevents.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

cloudevents/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.abstract import AnyCloudEvent
1820
from cloudevents.conversion import to_binary as _moved_to_binary
1921from cloudevents.conversion import to_structured as _moved_to_structured
2022
from cloudevents.http.conversion import from_http as _moved_from_http
2123
from cloudevents.http.event import CloudEvent
2224
from cloudevents.sdk import types
23-
from deprecation import deprecated
2425

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

cloudevents/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.abstract import AnyCloudEvent
1820
from cloudevents.conversion import to_json as _moved_to_json
1921
from cloudevents.http import CloudEvent
2022
from cloudevents.http.conversion import from_json as _moved_from_json
2123
from cloudevents.sdk import types
22-
from deprecation import deprecated
2324

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

cloudevents/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.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

cloudevents/kafka/conversion.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@
1515
import json
1616
import typing
1717

18+
from cloudevents import exceptions as cloud_exceptions
19+
from cloudevents import http
1820
from cloudevents.abstract import AnyCloudEvent
1921
from cloudevents.kafka.exceptions import KeyMapperError
2022
from cloudevents.sdk import types
2123

22-
from cloudevents import exceptions as cloud_exceptions
23-
from cloudevents import http
24-
2524
JSON_MARSHALLER: types.MarshallerType = json.dumps
2625
JSON_UNMARSHALLER: types.UnmarshallerType = json.loads
2726
IDENTITY_MARSHALLER = IDENTITY_UNMARSHALLER = lambda x: x

cloudevents/pydantic/v1/event.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@
3232
"Install it using pip install cloudevents[pydantic]"
3333
)
3434

35+
from cloudevents import abstract, conversion, http
3536
from cloudevents.exceptions import IncompatibleArgumentsError
3637
from cloudevents.sdk.event import attribute
3738

38-
from cloudevents import abstract, conversion, http
39-
4039

4140
def _ce_json_dumps( # type: ignore[no-untyped-def]
4241
obj: typing.Dict[str, typing.Any],

cloudevents/pydantic/v2/event.py

Lines changed: 3 additions & 3 deletions
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.exceptions import PydanticFeatureNotInstalled
2123
from cloudevents.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
@@ -29,11 +30,10 @@
2930
"Install it using pip install cloudevents[pydantic]"
3031
)
3132

33+
from cloudevents import abstract, conversion
3234
from cloudevents.exceptions import IncompatibleArgumentsError
3335
from cloudevents.sdk.event import attribute
3436

35-
from cloudevents import abstract, conversion
36-
3737

3838
class CloudEvent(abstract.CloudEvent, BaseModel): # type: ignore
3939
"""

cloudevents/tests/test_backwards_compatability.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# License for the specific language governing permissions and limitations
1313
# under the License.
1414
import pytest
15+
1516
from cloudevents.conversion import _best_effort_serialize_to_json
1617
from cloudevents.http import CloudEvent
1718

0 commit comments

Comments
 (0)
0