Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/release-github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Python 3.11 and uv
- name: Set up Python 3.15 and uv
uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
with:
version: "0.13.10"
python-version: "3.11"
python-version: "3.15"

- name: Generate Docs
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release-with-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Python 3.11 and uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
- name: Set up Python 3.15 and uv
uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
with:
version: "0.12.8"
python-version: "3.11"
version: "0.13.10"
python-version: "3.15"

- name: Run unittest with coverage
run: |
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.14"]
python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"]

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -32,11 +32,11 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up Python 3.11 and uv
- name: Set up Python 3.15 and uv
uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
with:
version: "0.13.10"
python-version: "3.11"
python-version: "3.15"

- name: Sync locked environment
run: uv sync --locked
Expand All @@ -46,6 +46,7 @@ jobs:

- name: Inspect distribution metadata and payload
run: |
uv run --locked twine check --strict dist/*
uv run --locked python - <<'EOF'
import email.parser
import pathlib
Expand Down Expand Up @@ -98,7 +99,12 @@ jobs:
)

expected_dependencies = set(map(Requirement, project["dependencies"]))
assert Requirement("certifi>=2026.10.19") in expected_dependencies
required_http_dependencies = {
Requirement("certifi>=2026.10.19"),
Requirement("requests>=2.33.0,<3"),
Requirement("urllib3>=2.8.0,<3"),
}
assert required_http_dependencies <= expected_dependencies
assert {"Documentation", "Issue Tracker"} <= project["urls"].keys()
for metadata in (wheel_metadata, sdist_metadata):
assert metadata["Name"] == "ringcentral"
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11
3.15
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ __[Voice](https://developer.ringcentral.com/api-products/voice), [SMS/MMS](https

### 1.0.0

- The SDK requires CPython 3.11 or later.
- The SDK requires CPython 3.11 or later. CI tests CPython 3.11 through 3.15.
- WebSocket subscriptions match server responses to requests, report changes after the server confirms them, and prevent duplicate subscription creation.
- The WebSocket client reports receive-handler errors without interrupting other handlers and clears its ready state when the receive loop ends.
- The SDK supports `websockets` versions 15 through 17. See [Subscribing for server events](#subscribing-for-server-events) if you use the underlying connection directly.
- Upgraded to `observable` 1.x while preserving SDK callback registration and dispatch behavior.
- Apps configured for the OAuth client credentials grant can call `login()` without arguments.
- This release carries forward the 0.9.3 certificate bundle fix by requiring `certifi>=2026.10.19`.
- Development and release checks use a locked uv environment.
- Installation requires Requests 2.33.0 or later and urllib3 2.8.0 or later within their 2.x series to pick up security fixes in existing environments.
- Development defaults to Python 3.15. Development and release checks use a locked uv environment.

### Earlier releases

Expand Down
43 changes: 33 additions & 10 deletions dev-notes.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
## Install uv

This repository uses [uv](https://docs.astral.sh/uv/) for Python interpreter management, dependency locking, command execution, and package building. Install it with:
This repository uses [uv](https://docs.astral.sh/uv/) for Python interpreter management, dependency locking, command execution, and package building. CI and the release workflow use uv 0.13.10. Install uv with:

```
curl -LsSf https://astral.sh/uv/install.sh | sh
```

## Install Python

The repository requests CPython 3.11 (the package's minimum supported version) in `.python-version`. Install it with uv — it is managed by uv and kept separate from your operating-system Python:
The repository defaults to CPython 3.15, the newest stable series, in `.python-version`. The SDK supports CPython 3.11 and later, and CI tests CPython 3.11 through 3.15. Install the project interpreter with uv:

```
uv python install
```

If you already have an older 3.15 patch installed, upgrade it and check the
project interpreter:

```
uv python upgrade 3.15
uv run --locked python --version
```

When a new stable CPython series ships, update the local default, CI test matrix,
single-interpreter jobs, and these instructions together.

## Synchronize dependencies

uv owns the project virtual environment (`.venv/`); manual activation is optional and not part of the canonical workflow. Install the locked dependencies with:
Expand All @@ -32,8 +43,8 @@ uv run --locked python -m unittest discover . --pattern '*test.py'

## Run unit tests with coverage report

CI runs this check on CPython 3.11 and 3.14. Add `--python 3.14` after
`uv run --locked` in both commands to select the second CI interpreter locally.
CI runs this check on CPython 3.11 through 3.15. Add `--python 3.11` after
`uv run --locked` in both commands to exercise the oldest supported version locally.

```
uv run --locked coverage run -m unittest discover . --pattern '*test.py'
Expand Down Expand Up @@ -99,7 +110,7 @@ uv sync --locked
Unit tests and the local WebSocket transport check require no RingCentral credentials.
The transport check opens a real connection to a loopback server through the SDK.
When changing the supported websockets range, run the WebSocket tests for each
proposed major on CPython 3.11 and 3.14. For example, to check websockets 16.1.1:
proposed major on the supported stable CPython series. For example, to check websockets 16.1.1 on Python 3.11:

```bash
uv run --locked --python 3.11 --with 'websockets==16.1.1' python -m unittest discover -s ringcentral/websocket -t . -p '*test.py'
Expand Down Expand Up @@ -162,27 +173,38 @@ The WebSocket subscription demo (`demo_subscription.py`) requires an application

After the integrated checks pass, use a clean checkout of the tested commit on
`master`. Confirm that the README and release notes describe the changes in that
commit. Set the intended tag below and build both artifacts into a fresh directory.
commit. Use uv 0.13.10 and CPython 3.15, as in the tag workflow. Set the intended
version below, run the release tests, build both artifacts into a fresh directory,
and check both artifacts with strict Twine validation and metadata inspection.

```sh
release_version=1.0.0
release_commit=$(git rev-parse HEAD) &&
release_dist=$(mktemp -d) &&
uv sync --locked --python 3.11 &&
uv sync --locked --python 3.15 &&
uv run --locked coverage run -m unittest discover . --pattern '*test.py' &&
uv run --locked coverage report &&
uv build --no-sources --out-dir "$release_dist" &&
uv run --locked twine check "$release_dist"/* &&
uv run --locked twine check --strict "$release_dist"/* &&
uv run --locked python -E - "$release_version" "$release_dist" <<'PY'
import sys
from email.parser import BytesParser
from pathlib import Path
from tarfile import open as open_tar
from zipfile import ZipFile

from packaging.requirements import Requirement

version, directory = sys.argv[1:]
dist = Path(directory)
stem = f"ringcentral-{version}"
wheel_path, = dist.glob(f"{stem}-*.whl")
sdist_path = dist / f"{stem}.tar.gz"
required_http_dependencies = {
Requirement("certifi>=2026.10.19"),
Requirement("requests>=2.33.0,<3"),
Requirement("urllib3>=2.8.0,<3"),
}

with ZipFile(wheel_path) as wheel, open_tar(sdist_path, "r:gz") as sdist:
wheel_metadata = wheel.read(f"{stem}.dist-info/METADATA")
Expand All @@ -192,7 +214,8 @@ with ZipFile(wheel_path) as wheel, open_tar(sdist_path, "r:gz") as sdist:
assert metadata["Name"] == "ringcentral", path
assert metadata["Version"] == version, (path, metadata["Version"])
assert metadata["Requires-Python"] == ">=3.11", path
assert "certifi>=2026.10.19" in metadata.get_all("Requires-Dist", []), path
dependencies = set(map(Requirement, metadata.get_all("Requires-Dist", [])))
assert required_http_dependencies <= dependencies, (path, dependencies)
print(f"Verified {path.name} ({metadata['Version']})")
PY
```
Expand Down Expand Up @@ -220,7 +243,7 @@ Check a fresh install from PyPI outside the repository.
```sh
(
cd "${release_dist:?}" &&
uv run --no-project --isolated --python 3.11 --with "ringcentral==${release_version:?}" \
uv run --no-project --isolated --python 3.15 --with "ringcentral==${release_version:?}" \
python -I -c 'from importlib.metadata import version; import ringcentral; print(version("ringcentral"))'
)
```
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ requires-python = ">=3.11"
dependencies = [
"certifi>=2026.10.19",
"observable~=1.0.3",
"requests==2.*",
"requests>=2.33.0,<3",
"urllib3>=2.8.0,<3",
"websockets>=15,<18",
]
classifiers = [
Expand Down
Loading