Skip to content

Commit fcde281

Browse files
committed
prepare 0.9.0 release
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
1 parent 2c6692f commit fcde281

18 files changed

Lines changed: 109 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
We follow [Common Changelog](https://common-changelog.org/) formatting for this document.
44

5-
## Unreleased
5+
## [0.9.0] - 2026-02-11
6+
7+
_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
68

79
### Fixed
810

@@ -94,6 +96,8 @@ _If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
9496

9597
- **Breaking:** Added service-to-service request/response mechanism ([!9](https://github.com/INTERSECT-SDK/python-sdk/pull/9)) (Michael Brim, Lance Drane)
9698

99+
[0.9.0]: https://github.com/INTERSECT-SDK/python-sdk/releases/tag/0.9.0
100+
[0.8.4]: https://github.com/INTERSECT-SDK/python-sdk/releases/tag/0.8.4
97101
[0.8.3]: https://github.com/INTERSECT-SDK/python-sdk/releases/tag/0.8.3
98102
[0.8.2]: https://github.com/INTERSECT-SDK/python-sdk/releases/tag/0.8.2
99103
[0.8.1]: https://github.com/INTERSECT-SDK/python-sdk/releases/tag/0.8.1

UPGRADING.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,94 @@
22

33
This document describes breaking changes and how to upgrade. For a complete list of changes including minor and patch releases, please refer to the [changelog](CHANGELOG.md).
44

5+
## 0.9.0
6+
7+
Note that SDK 0.9.0 is completely incompatible with any version <0.9.0 , due to backend message structure changes.
8+
9+
### Event declaration change
10+
11+
The SDK no longer use the `@intersect_event` decorator for event, and also does not use the `events` attribute on the `@intersect_message` decorator anymore. Instead, create a dictionary of event names to `IntersectEventDefinitions` as the class variable `intersect_sdk_events` on your Capability. This class variable should not be mutated after the IntersectService has been initialized with the Capability.
12+
13+
---
14+
15+
An example of the old way of doing events:
16+
17+
```python
18+
from intersect_sdk import intersect_event, intersect_message, IntersectBaseCapabilityImplementation, IntersectEventDefinition
19+
20+
class Capability(IntersectBaseCapabilityImplementation):
21+
intersect_sdk_capability_name = 'example_capability'
22+
23+
@intersect_event(events={'integer_event': IntersectEventDefinition(event_type=int)})
24+
def response_event_function_1(self):
25+
self.intersect_sdk_emit_event('integer_event', 1)
26+
27+
@intersect_event(events={'integer_event': IntersectEventDefinition(event_type=int)}) # note event duplication
28+
def response_event_function_2(self):
29+
self.intersect_sdk_emit_event('integer_event', 2)
30+
31+
@intersect_message(events={'pig_latin': IntersectEventDefinition(event_type=str)})
32+
def emit_event_from_message(self, input_val: str) -> str:
33+
if len(input_val) < 2:
34+
resp = f'{input_val}ay'
35+
else:
36+
resp = f'{input_val[1:]}{input_val[0]}ay'
37+
self.intersect_sdk_emit_event('pig_latin', resp)
38+
return resp
39+
```
40+
41+
Changed to the new way, this becomes:
42+
43+
```python
44+
from intersect_sdk import intersect_message, IntersectBaseCapabilityImplementation, IntersectEventDefinition
45+
46+
class Capability(IntersectBaseCapabilityImplementation):
47+
intersect_sdk_capability_name = 'example_capability'
48+
intersect_sdk_events = {
49+
'integer_event': IntersectEventDefinition(event_type=int),
50+
'pig_latin': IntersectEventDefinition(event_type=str),
51+
}
52+
53+
# decorators are no longer needed
54+
def response_event_function_1(self):
55+
self.intersect_sdk_emit_event('integer_event', 1)
56+
57+
def response_event_function_2(self):
58+
self.intersect_sdk_emit_event('integer_event', 2)
59+
60+
# "events" property no longer needed
61+
@intersect_message()
62+
def emit_event_from_message(self, input_val: str) -> str:
63+
if len(input_val) < 2:
64+
resp = f'{input_val}ay'
65+
else:
66+
resp = f'{input_val[1:]}{input_val[0]}ay'
67+
self.intersect_sdk_emit_event('pig_latin', resp)
68+
return resp
69+
```
70+
71+
Also note that this change allows you to use a Capability object and call `capability.intersect_sdk_emit_event('integer_event', 1)` without explicitly creating a function to doing so; the old way had a bug which prevented this pattern.
72+
73+
### Content-Type specification
74+
75+
The `IntersectMimeType` enumerated class requirement for the `request_content_type` and `response_content_type` properties of the `@intersect_message` decorator, and the `content_type` field of the `IntersectEventDefinition` class, has been removed and replaced with a freeform string value; by default, this value is always `application/json`. Unless you are returning binary data, you do not need to set these fields yourself.
76+
77+
The SDK no longer requires single values to be JSON serializable; however, receiving/returning multiple values simultaneously still has the expectation that all binary values are Base64-encoded.
78+
79+
If you are using a value _other_ than `application/json` (i.e. you are just returning raw image data), then the return type or `event_type` of the IntersectEventDefinition MUST be `bytes`. Also note that no automatic validation of inputs will occur, you will have to do manual validation yourself.
80+
81+
### Installing optional dependencies
82+
83+
The `amqp` optional dependency group has been removed, by default AMQP support is required and included when installing `intersect-sdk`.
84+
85+
### Dropped Python 3.8 and 3.9 support
86+
87+
Older Python versions which are officially end-of-life are not supported by INTERSECT-SDK. Please update your Python version to at least 3.10 .
88+
89+
### MQTT support change
90+
91+
We no longer support MQTT 3.1.1 and now support MQTT 5.0 instead; for any `IntersectServiceConfig` or `IntersectClientConfig` configurations, you will need to change `mqtt3.1.1` to `mqtt5.0` .
92+
593
## 0.8.0
694

795
### Service-2-Service callback function

examples/1_hello_world/hello_service_schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"asyncapi": "2.6.0",
3-
"x-intersect-version": "0.8.4",
3+
"x-intersect-version": "0.9.0",
44
"info": {
55
"title": "hello-organization.hello-facility.hello-system.hello-subsystem.hello-service",
66
"description": "INTERSECT schema",

examples/1_hello_world_amqp/hello_service_schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"asyncapi": "2.6.0",
3-
"x-intersect-version": "0.8.4",
3+
"x-intersect-version": "0.9.0",
44
"info": {
55
"title": "hello-organization.hello-facility.hello-system.hello-subsystem.hello-service",
66
"description": "INTERSECT schema",

examples/1_hello_world_events/hello_service_schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"asyncapi": "2.6.0",
3-
"x-intersect-version": "0.8.4",
3+
"x-intersect-version": "0.9.0",
44
"info": {
55
"title": "hello-organization.hello-facility.hello-system.hello-subsystem.hello-service",
66
"description": "INTERSECT schema",

examples/1_hello_world_minio/hello_service_schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"asyncapi": "2.6.0",
3-
"x-intersect-version": "0.8.4",
3+
"x-intersect-version": "0.9.0",
44
"info": {
55
"title": "hello-organization.hello-facility.hello-system.hello-subsystem.hello-service",
66
"description": "INTERSECT schema",

examples/2_counting/counting_service_schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"asyncapi": "2.6.0",
3-
"x-intersect-version": "0.8.4",
3+
"x-intersect-version": "0.9.0",
44
"info": {
55
"title": "counting-organization.counting-facility.counting-system.counting-subsystem.counting-service",
66
"description": "INTERSECT schema",

examples/2_counting_events/counting_service_schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"asyncapi": "2.6.0",
3-
"x-intersect-version": "0.8.4",
3+
"x-intersect-version": "0.9.0",
44
"info": {
55
"title": "counting-organization.counting-facility.counting-system.counting-subsystem.counting-service",
66
"description": "INTERSECT schema",

examples/3_ping_pong_events/ping_service_schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"asyncapi": "2.6.0",
3-
"x-intersect-version": "0.8.4",
3+
"x-intersect-version": "0.9.0",
44
"info": {
55
"title": "p-ng-organization.p-ng-facility.p-ng-system.p-ng-subsystem.ping-service",
66
"description": "INTERSECT schema",

examples/3_ping_pong_events/pong_service_schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"asyncapi": "2.6.0",
3-
"x-intersect-version": "0.8.4",
3+
"x-intersect-version": "0.9.0",
44
"info": {
55
"title": "p-ng-organization.p-ng-facility.p-ng-system.p-ng-subsystem.pong-service",
66
"description": "INTERSECT schema",

0 commit comments

Comments
 (0)