Skip to content

Commit 172a878

Browse files
author
Curtis Mason
committed
fix master merge conflict
Signed-off-by: Curtis Mason <cumason@google.com>
2 parents 8083a26 + e027fa3 commit 172a878

13 files changed

+72
-403
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Expected Behavior
2+
3+
4+
## Actual Behavior
5+
6+
7+
## Steps to Reproduce the Problem
8+
9+
1.
10+
2.
11+
3.
12+
13+
## Specifications
14+
15+
- Platform:
16+
- Python Version:

.github/pull_request_template.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
- Link to issue this resolves
1+
Fixes #<issuelink>
22

3-
- What I did
3+
## Changes
44

5-
- How I did it
65

7-
- How to verify it
6+
## One line description for the changelog
87

9-
- One line description for the changelog
8+
9+
- [ ] Tests pass
10+
- [ ] Appropriate changes to README are included in PR

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ This SDK is still considered a work in progress, therefore things might (and
66
will) break with every update.
77

88
This SDK current supports the following versions of CloudEvents:
9+
910
- v1.0
1011
- v0.3
11-
- v0.2
12-
- v0.1
1312

1413
## Python SDK
1514

@@ -116,7 +115,6 @@ In this topic you'd find various example how to integrate an SDK with various HT
116115

117116
One of popular framework is [`requests`](http://docs.python-requests.org/en/master/).
118117

119-
120118
#### CloudEvent to request
121119

122120
The code below shows how integrate both libraries in order to convert a CloudEvent into an HTTP request:
@@ -155,27 +153,29 @@ Complete example of turning a CloudEvent into a request you can find [here](samp
155153
#### Request to CloudEvent
156154

157155
The code below shows how integrate both libraries in order to create a CloudEvent from an HTTP request:
156+
158157
```python
159158
response = requests.get(url)
160159
response.raise_for_status()
161160
headers = response.headers
162161
data = io.BytesIO(response.content)
163-
event = v02.Event()
162+
event = v1.Event()
164163
http_marshaller = marshaller.NewDefaultHTTPMarshaller()
165164
event = http_marshaller.FromRequest(
166165
event, headers, data, json.load)
167166

168167
```
169-
Complete example of turning a CloudEvent into a request you can find [here](samples/python-requests/request_to_cloudevent.py).
170168

169+
Complete example of turning a CloudEvent into a request you can find [here](samples/python-requests/request_to_cloudevent.py).
171170

172171
## SDK versioning
173172

174173
The goal of this package is to provide support for all released versions of CloudEvents, ideally while maintaining
175174
the same API. It will use semantic versioning with following rules:
176-
* MAJOR version increments when backwards incompatible changes is introduced.
177-
* MINOR version increments when backwards compatible feature is introduced INCLUDING support for new CloudEvents version.
178-
* PATCH version increments when a backwards compatible bug fix is introduced.
175+
176+
- MAJOR version increments when backwards incompatible changes is introduced.
177+
- MINOR version increments when backwards compatible feature is introduced INCLUDING support for new CloudEvents version.
178+
- PATCH version increments when a backwards compatible bug fix is introduced.
179179

180180
## Community
181181

cloudevents/sdk/converters/binary.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
from cloudevents.sdk import exceptions
1818
from cloudevents.sdk.converters import base
1919
from cloudevents.sdk.event import base as event_base
20-
from cloudevents.sdk.event import v02, v03, v1
20+
from cloudevents.sdk.event import v03, v1
2121

2222

2323
class BinaryHTTPCloudEventConverter(base.Converter):
2424

2525
TYPE = "binary"
26-
SUPPORTED_VERSIONS = [v02.Event, v03.Event, v1.Event]
26+
SUPPORTED_VERSIONS = [v03.Event, v1.Event]
2727

2828
def can_read(self, content_type: str) -> bool:
2929
return True

cloudevents/sdk/event/v01.py

Lines changed: 0 additions & 137 deletions
This file was deleted.

cloudevents/sdk/event/v02.py

Lines changed: 0 additions & 88 deletions
This file was deleted.

cloudevents/tests/data.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# License for the specific language governing permissions and limitations
1313
# under the License.
1414

15-
from cloudevents.sdk.event import v02, v03, v1
15+
from cloudevents.sdk.event import v03, v1
1616

1717
contentType = "application/json"
1818
ce_type = "word.found.exclamation"
@@ -22,14 +22,6 @@
2222
body = '{"name":"john"}'
2323

2424
headers = {
25-
v02.Event: {
26-
"ce-specversion": "1.0",
27-
"ce-type": ce_type,
28-
"ce-id": ce_id,
29-
"ce-time": eventTime,
30-
"ce-source": source,
31-
"Content-Type": contentType,
32-
},
3325
v03.Event: {
3426
"ce-specversion": "1.0",
3527
"ce-type": ce_type,
@@ -49,14 +41,6 @@
4941
}
5042

5143
json_ce = {
52-
v02.Event: {
53-
"specversion": "1.0",
54-
"type": ce_type,
55-
"id": ce_id,
56-
"time": eventTime,
57-
"source": source,
58-
"contenttype": contentType,
59-
},
6044
v03.Event: {
6145
"specversion": "1.0",
6246
"type": ce_type,

0 commit comments

Comments
 (0)