Skip to content

Commit 40b2aaa

Browse files
authored
Merge branch 'master' into channels
2 parents 68802e2 + 302ea89 commit 40b2aaa

36 files changed

+356
-155
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.8", "3.9", "3.10", "3.11.4"]
20-
19+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
2120
steps:
2221
- uses: actions/checkout@v2
2322
- name: Set up Python ${{ matrix.python-version }}

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build:
77

88
python:
99
install:
10-
- requirements: requirements.txt
10+
- requirements: docs/requirements.txt
1111
- method: pip
1212
path: .
1313
extra_requirements:

CHANGELOG.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
Changelog
22
---------
33

4-
v0.4.15
4+
v0.4.16
55
=======
6-
- Websockets (https://github.com/python-websockets/websockets) server support
76
- Channels (django) (https://github.com/django/channels) server support
87

8+
v0.4.15
9+
=======
10+
- Websockets server support (https://github.com/python-websockets/websockets)
11+
- AsyncWebsockets client support (https://github.com/Fuyukai/asyncwebsockets)
12+
913
v0.4.14
1014
=======
1115
- GraphQL: Use async methods for query resolvers. Fixed using mutation methods and passing variables.

README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,22 @@ pip install rsocket
1212

1313
You may also install using some **extras**:
1414

15-
| Extra | Functionality | Documentation |
16-
|-------------|---------------------------------------------------------------------------------------|---------------------------------------------------------------------|
17-
| rx | ReactiveX (v3) integration | [Tutorial](https://rsocket.io/guides/rsocket-py/tutorial/reactivex) |
18-
| reactivex | ReactiveX (v4) integration | [Tutorial](https://rsocket.io/guides/rsocket-py/tutorial/reactivex) |
19-
| aiohttp | Websocket transport (server/client) | [Tutorial](https://rsocket.io/guides/rsocket-py/tutorial/websocket) |
20-
| quart | Websocket transport (server only) | |
21-
| channels | Websocket transport (server only) using channels (django) | |
22-
| quic | [QUIC](https://github.com/aiortc/aioquic) transport | |
23-
| websockets | [Websockets](https://github.com/python-websockets/websockets) transport (server only) | |
24-
| cli | Command line | [Tutorial](https://rsocket.io/guides/rsocket-py/cli) |
25-
| optimized | Frame parse/serialize optimizations | |
26-
| cloudevents | CloudEvents integration | |
27-
| graphql | GraphQL integration | |
15+
| Extra | Functionality | Documentation |
16+
|-----------------|--------------------------------------------------------------------------------------------|---------------------------------------------------------------------|
17+
| rx | ReactiveX ([v3](https://pypi.org/project/Rx/)) integration | [Tutorial](https://rsocket.io/guides/rsocket-py/tutorial/reactivex) |
18+
| reactivex | [ReactiveX](https://reactivex.io/) ([v4](https://pypi.org/project/reactivex/)) integration | [Tutorial](https://rsocket.io/guides/rsocket-py/tutorial/reactivex) |
19+
| aiohttp | [aiohttp](https://docs.aiohttp.org/en/stable/) Websocket transport (server/client) | [Tutorial](https://rsocket.io/guides/rsocket-py/tutorial/websocket) |
20+
| channels | Websocket transport (server only) using channels (django) | |
21+
| quart | [Quart](https://pgjones.gitlab.io/quart/) Websocket transport (server only) | |
22+
| quic | [QUIC](https://github.com/aiortc/aioquic) transport | |
23+
| websockets | [Websockets](https://github.com/python-websockets/websockets) transport (server only) | |
24+
| asyncwebsockets | [Websockets](https://github.com/Fuyukai/asyncwebsockets) transport (client only) | |
25+
| cli | Command line | [Tutorial](https://rsocket.io/guides/rsocket-py/cli) |
26+
| optimized | Frame parse/serialize optimizations | |
27+
| cloudevents | [CloudEvents](https://cloudevents.io/) integration | |
28+
| graphql | [GraphQL](https://graphql.org/) integration | [Tutorial](https://rsocket.io/guides/rsocket-py/graphql) |
29+
30+
For example:
2831

2932
```shell
3033
pip install rsocket[reactivex]

docs/api.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ Handler
2525
:members:
2626

2727

28+
Enums
29+
-----
30+
31+
.. automodule:: rsocket.extensions.mimetypes
32+
:members:
33+
34+
2835
Models
2936
------
3037

@@ -51,4 +58,10 @@ Subscription
5158
~~~~~~~~~~~~
5259

5360
.. automodule:: reactivestreams.subscription
54-
:members:
61+
:members:
62+
63+
Transports
64+
----------
65+
66+
.. automodule:: rsocket.transports.transport
67+
:members:

docs/conf.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@
5151
# The theme to use for HTML and HTML Help pages. See the documentation for
5252
# a list of builtin themes.
5353
#
54-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
55-
56-
if on_rtd:
57-
html_theme = 'default'
58-
else:
59-
html_theme = 'sphinx_rtd_theme'
54+
# on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
55+
#
56+
# if on_rtd:
57+
# html_theme = 'default'
58+
# else:
59+
html_theme = 'sphinx_rtd_theme'
6060

6161
html_sidebars = {
6262
'**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'],

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sphinx-rtd-theme==2.0.0

examples/java/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<dependency>
4242
<groupId>ch.qos.logback</groupId>
4343
<artifactId>logback-classic</artifactId>
44-
<version>1.2.10</version>
44+
<version>1.3.12</version>
4545
</dependency>
4646
<dependency>
4747
<groupId>io.rsocket</groupId>

requirements.txt

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
Rx==3.2.0
2-
aiohttp==3.8.6
3-
aioquic==0.9.21
2+
aiohttp==3.9.1
3+
aioquic==0.9.23
44
asyncclick==8.1.3.4
55
asyncstdlib==3.10.9
66
coverage==6.5.0
77
coveralls==3.3.1
8-
decoy==2.1.0
8+
decoy==2.1.1
99
flake8==6.1.0
1010
pytest-asyncio==0.21.1
1111
pytest-cov==4.1.0
1212
pytest-profiling==1.7.0
13-
pytest-rerunfailures==12.0
13+
pytest-rerunfailures==13.0
1414
pytest-timeout==2.2.0
15-
pytest-xdist==3.3.1
16-
pytest==7.4.2
17-
quart==0.19.3
15+
pytest-xdist==3.5.0
16+
pytest==7.4.3
17+
quart==0.19.4
1818
reactivex==4.0.4
19-
starlette==0.31.1
20-
cbitstruct==1.0.9
21-
cloudevents==1.10.0
19+
starlette==0.33.0
20+
cbitstruct==1.1.0
21+
cloudevents==1.10.1
2222
pydantic==1.10.13
23-
Werkzeug==3.0.0
23+
Werkzeug==3.0.1
2424
graphql-core==3.2.3
2525
gql==3.4.1
26-
websockets==11.0.3
27-
channels==4.0.0
26+
channels==4.0.0
27+
websockets==12.0
28+
asyncwebsockets==0.9.4

rsocket/cli/command.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
from importlib.metadata import version as get_version
88
from typing import Optional, Type, Collection, List, Callable
99

10-
import aiohttp
1110
import asyncclick as click
12-
from werkzeug.routing import Map
1311

1412
from rsocket.awaitable.awaitable_rsocket import AwaitableRSocket
1513
from rsocket.extensions.helpers import route, composite, authenticate_simple, authenticate_bearer
@@ -20,7 +18,7 @@
2018
from rsocket.payload import Payload
2119
from rsocket.rsocket_client import RSocketClient
2220
from rsocket.transports.abstract_messaging import AbstractMessagingTransport
23-
from rsocket.transports.aiohttp_websocket import TransportAioHttpClient
21+
2422
from rsocket.transports.tcp import TransportTCP
2523

2624

@@ -68,12 +66,13 @@ def parse_uri(uri: str) -> RSocketUri:
6866
@asynccontextmanager
6967
async def transport_from_uri(uri: RSocketUri,
7068
verify_ssl=True,
71-
headers: Optional[Map] = None,
69+
headers: Optional = None,
7270
trust_cert: Optional[str] = None) -> Type[AbstractMessagingTransport]:
7371
if uri.schema == 'tcp':
7472
connection = await asyncio.open_connection(uri.host, uri.port)
7573
yield TransportTCP(*connection)
7674
elif uri.schema in ['wss', 'ws']:
75+
import aiohttp
7776
async with aiohttp.ClientSession() as session:
7877
if trust_cert is not None:
7978
ssl_context = ssl.create_default_context(cafile=trust_cert)
@@ -84,6 +83,8 @@ async def transport_from_uri(uri: RSocketUri,
8483
verify_ssl=verify_ssl,
8584
ssl_context=ssl_context,
8685
headers=headers) as websocket:
86+
from rsocket.transports.aiohttp_websocket import TransportAioHttpClient
87+
8788
yield TransportAioHttpClient(websocket=websocket)
8889
else:
8990
raise Exception('Unsupported schema in CLI')

0 commit comments

Comments
 (0)