Skip to content

Commit e086d95

Browse files
committed
chore: do not rely on re-exported cloudevents types in examples
Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>
1 parent 4efb292 commit e086d95

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

samples/http-image-cloudevents/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
import requests
1818

1919
from cloudevents.core.bindings.http import (
20-
CloudEvent,
2120
to_binary_event,
2221
to_structured_event,
2322
)
23+
from cloudevents.core.v1.event import CloudEvent
2424

2525
resp = requests.get(
2626
"https://raw.githubusercontent.com/cncf/artwork/master/projects/cloudevents/horizontal/color/cloudevents-horizontal-color.png" # noqa

samples/http-image-cloudevents/image_sample_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
from PIL import Image
2323

2424
from cloudevents.core.bindings.http import (
25-
CloudEvent,
2625
from_http_event,
2726
to_binary_event,
2827
to_structured_event,
2928
)
29+
from cloudevents.core.v1.event import CloudEvent
3030

3131
image_fileobj = io.BytesIO(image_bytes)
3232
image_expected_shape = (1880, 363)

samples/http-json-cloudevents/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
import requests
1818

1919
from cloudevents.core.bindings.http import (
20-
CloudEvent,
2120
to_binary_event,
2221
to_structured_event,
2322
)
23+
from cloudevents.core.v1.event import CloudEvent
2424

2525

2626
def send_binary_cloud_event(url):

samples/http-json-cloudevents/json_sample_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
from json_sample_server import app
1717

1818
from cloudevents.core.bindings.http import (
19-
CloudEvent,
2019
to_binary_event,
2120
to_structured_event,
2221
)
22+
from cloudevents.core.v1.event import CloudEvent
2323

2424

2525
@pytest.fixture

0 commit comments

Comments
 (0)