Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.11", "3.12", "3.13", "3.14"]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![CI](https://github.com/uSpike/rpcx/actions/workflows/main.yml/badge.svg)](https://github.com/uSpike/rpcx/actions/workflows/main.yml)

Asynchronous RPC server/client for Python 3.10+ with streaming support.
Asynchronous RPC server/client for Python 3.11+ with streaming support.

- Async backend implemented by `anyio` providing support for `asyncio` and `trio`.
- Generic stream support for transport includes Websockets.
Expand Down
6 changes: 3 additions & 3 deletions examples/websockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
from websockets.exceptions import ConnectionClosed

if TYPE_CHECKING:
from websockets.legacy.client import WebSocketClientProtocol
from websockets.asyncio.client import ClientConnection


@dataclass
class WebSocketsStream(ObjectStream[bytes]):
"""
Wrapper for WebSocketClientProtocol to appear as an anyio ObjectStream.
Wrapper for ClientConnection to appear as an anyio ObjectStream.
"""

websocket: "WebSocketClientProtocol"
websocket: "ClientConnection"

async def receive(self) -> bytes:
try:
Expand Down
309 changes: 152 additions & 157 deletions poetry.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,35 @@ packages = [
]

[tool.poetry.dependencies]
python = "^3.10"
python = ">=3.11"
anyio = "^4"
msgpack = "^1"

[tool.poetry.dev-dependencies]
msgpack-types = "^0.8.0"
msgpack-types = { version = "^0.8.0", python = ">=3.11,<4.0" }
pytest = "^9.0.0"
mypy = "^2.0.0"
pytest-cov = "^7.0.0"
trio = "^0.34.0"
pytest-mock = "^3.7"
tox = "^4.4"
asyncstdlib = "^3.10"
exceptiongroup = { version = "^1.1.3", python = "<3.11" }
websockets = ">=10, <16"
asyncstdlib = { version = "^3.10", python = ">=3.11,<4.0" }
websockets = ">=17, <18"

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.mypy]
python_version = "3.10"
python_version = "3.11"
strict = true
show_column_numbers = true
show_error_codes = true
files = "src/**/*.py"

[tool.ruff]
line-length = 120
target-version = "py311"

[tool.ruff.lint]
select = ["A", "B", "C4", "ERA", "F", "I", "PT", "S", "TC", "UP"]
Expand Down
4 changes: 0 additions & 4 deletions tests/test_server.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import logging
import math
import sys
from collections.abc import Generator
from contextlib import contextmanager

Expand All @@ -11,9 +10,6 @@
from rpcx import RPCManager, RPCServer
from rpcx.message import Message, Request, RequestCancel, Response, ResponseStatus, message_to_bytes

if sys.version_info < (3, 11):
from exceptiongroup import BaseExceptionGroup

pytestmark = pytest.mark.anyio


Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
minversion = 3.7.0
envlist = py310, py311, py312, py313, py314
envlist = py311, py312, py313, py314
skip_missing_interpreters = true
isolated_build = true

Expand Down