Skip to content

Commit f1f1eb3

Browse files
authored
Merge branch 'main' into release-please--branches--main--changes--next
2 parents 6bce206 + 0b8edd4 commit f1f1eb3

4 files changed

Lines changed: 187 additions & 17 deletions

File tree

.github/workflows/semgrep.yml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,31 @@
1+
name: Semgrep OSS scan
12
on:
3+
pull_request: {}
4+
push:
5+
branches: [main, master]
26
workflow_dispatch: {}
37
schedule:
4-
- cron: '0 4 * * *'
5-
name: Semgrep config
8+
- cron: '0 0 15 * *'
9+
concurrency:
10+
group: semgrep-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
11+
cancel-in-progress: true
12+
permissions:
13+
contents: read
614
jobs:
715
semgrep:
8-
name: semgrep/ci
9-
runs-on: ubuntu-latest
10-
env:
11-
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
12-
SEMGREP_URL: https://cloudflare.semgrep.dev
13-
SEMGREP_APP_URL: https://cloudflare.semgrep.dev
14-
SEMGREP_VERSION_CHECK_URL: https://cloudflare.semgrep.dev/api/check-version
15-
container:
16-
image: returntocorp/semgrep
16+
name: semgrep-oss
17+
runs-on: ubuntu-slim
18+
timeout-minutes: 25
1719
steps:
18-
- uses: actions/checkout@v4
19-
- run: semgrep ci
20+
- uses: actions/checkout@v5
21+
with:
22+
fetch-depth: 1
23+
- id: cache-semgrep
24+
uses: actions/cache@v5
25+
with:
26+
path: ~/.local
27+
key: semgrep-1.160.0-${{ runner.os }}
28+
- if: steps.cache-semgrep.outputs.cache-hit != 'true'
29+
run: pip install --user semgrep==1.160.0
30+
- run: echo "$HOME/.local/bin" >> "$GITHUB_PATH"
31+
- run: semgrep scan --config=auto

CHANGELOG.md

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,123 @@ Full Changelog: [v5.0.0-beta.2...v5.0.0-beta.3](https://github.com/cloudflare/cl
5858

5959
* add Authentication section to README ([70d934a](https://github.com/cloudflare/cloudflare-python/commit/70d934abd91cfa8f8444e0651ac97012c1d0edcf))
6060

61+
## 5.0.0 (2026-04-30)
62+
63+
Full Changelog: [v4.3.1...v5.0.0](https://github.com/cloudflare/cloudflare-python/compare/v4.3.1...v5.0.0)
64+
65+
This is a major release of the Cloudflare Python SDK. It drops support for
66+
Python 3.8, adds 11 new API services, introduces optional aiohttp backend
67+
support for improved async concurrency, and includes hundreds of type and
68+
method updates across the entire API surface.
69+
70+
Please review the breaking changes below before upgrading. A migration guide
71+
is available at [docs/migration-guides/v5.0.0-migration-guide.md](./docs/migration-guides/v5.0.0-migration-guide.md).
72+
73+
---
74+
75+
#### Breaking Changes
76+
77+
- **Python 3.8 is no longer supported.** The minimum required version is now Python 3.9. ([pyproject.toml](https://github.com/cloudflare/cloudflare-python/compare/v4.3.1...v5.0.0))
78+
- **`typing-extensions` minimum version bumped** from `>=4.10` to `>=4.14`.
79+
80+
Additionally, the following resources have breaking changes:
81+
82+
- `abusereports`
83+
- `acm.totaltls`
84+
- `apigateway.configurations`
85+
- `cloudforceone.threatevents`
86+
- `d1.database`
87+
- `intel.indicatorfeeds`
88+
- `logpush.edge`
89+
- `origintlsclientauth.hostnames`
90+
- `queues.consumers`
91+
- `radar.bgp`
92+
- `rulesets.rules`
93+
- `schemavalidation.schemas`
94+
- `snippets`
95+
- `zerotrust.dlp`
96+
- `zerotrust.networks`
97+
98+
See the [v5.0.0 Migration Guide](./docs/migration-guides/v5.0.0-migration-guide.md) for upgrade instructions and resource-specific guidance.
99+
100+
---
101+
102+
#### Features
103+
104+
* **aiohttp backend support:** The async client now supports an optional `aiohttp` HTTP backend for improved concurrency performance. Install with `pip install cloudflare[aiohttp]` and use `DefaultAioHttpClient()` as the `http_client` parameter.
105+
* **Python 3.13 and 3.14 support** added as tested classifiers.
106+
107+
##### New Services
108+
109+
The following top-level resources are new in this release:
110+
111+
* **AISearch** (`aisearch`): AI-powered search capabilities
112+
* **Connectivity** (`connectivity`): Connectivity testing and diagnostics
113+
* **EmailSending** (`email_sending`): Email send and send_raw endpoints
114+
* **Fraud** (`fraud`): Fraud detection and prevention
115+
* **GoogleTagGateway** (`google_tag_gateway`): Google Tag Gateway management
116+
* **Organizations** (`organizations`): Organization audit logs and management
117+
* **R2DataCatalog** (`r2_data_catalog`): R2 Data Catalog operations
118+
* **RealtimeKit** (`realtime_kit`): Realtime communication (Calls/TURN)
119+
* **ResourceTagging** (`resource_tagging`): Resource tagging and labeling
120+
* **TokenValidation** (`token_validation`): Token validation configuration and rules
121+
* **VulnerabilityScanner** (`vulnerability_scanner`): Vulnerability scanning, credential sets, and target environments
122+
123+
##### New Endpoints on Existing Services
124+
125+
* **accounts:** update generated types and methods
126+
* **api_gateway:** add labels endpoints (WAM-1196)
127+
* **billing:** add billable usage PayGo endpoint
128+
* **brand_protection:** add v2 endpoints
129+
* **browser_rendering:** add devtools methods (BRAPI-1051)
130+
* **cache:** add origin cloud regions resource
131+
* **custom_origin_trust_store:** enable custom origin trust store
132+
* **dns:** add dns_records/usage endpoints (DNS-12466)
133+
* **email_security:** add phishguard reports endpoint
134+
* **iam:** add user_groups and user_group_members resources
135+
* **radar:** add Botnet Threat Feed and Post-Quantum endpoints
136+
* **workers:** add Observability Destinations resources (WO-989)
137+
* **zero_trust:** add Access Users endpoint (AUTH-7071), DEX rules, Device IP Profile, Device Subnet, WARP Connector connections and failover endpoints, WARP Subnet endpoints, Gateway PAC files (GIN-1439)
138+
* **zones:** add zone environments endpoints
139+
140+
##### Updated Services
141+
142+
Nearly every existing service received type and method updates through
143+
composite API spec refreshes. Notable updates include:
144+
145+
* **email_security:** remove deprecated type definitions
146+
* **radar:** restructured to use per-resource api.md sub-files (no client path changes)
147+
* **workers_for_platforms:** update generated types
148+
* **r2:** update generated types
149+
* **fraud:** update generated types and methods
150+
151+
152+
#### Bug Fixes
153+
154+
* **_models:** add `polymorphic_serialization` parameter to `model_dump` overrides ([342b5a8](https://github.com/cloudflare/cloudflare-python/commit/342b5a84daaf5c09e3e1612809d956d916a43621))
155+
* **pipelines:** add `BaseModel` base to response `SchemaFieldStruct`/`SchemaFieldList` stubs ([d33af8b](https://github.com/cloudflare/cloudflare-python/commit/d33af8b5d5c1705fde4ae73efdbe3bfe3ba321df))
156+
* **dlp:** add missing `model_rebuild`/`update_forward_refs` for `SharedEntryCustomEntry` classes ([25ec10c](https://github.com/cloudflare/cloudflare-python/commit/25ec10c814d138f8dea08a79f9984b70abb58477))
157+
* **workers:** make `RunQueryParametersNeedleValue` a `BaseModel` with `arbitrary_types_allowed` ([6b7efbc](https://github.com/cloudflare/cloudflare-python/commit/6b7efbc51e6189ba18225c57637015f050060683))
158+
* **stream:** remove duplicate `notification_url` field in webhook response types ([fc9fb2f](https://github.com/cloudflare/cloudflare-python/commit/fc9fb2f895c5de968f67c62bb599a6792be9fa8f))
159+
* resolve pre-existing codegen type errors ([fed88d6](https://github.com/cloudflare/cloudflare-python/commit/fed88d6c5a5e482a9de595a1431915320fa11d23))
160+
* **radar:** fix `type: ignore[call-arg]` placement for mypy compatibility ([fac9404](https://github.com/cloudflare/cloudflare-python/commit/fac9404ebfa1eb5383a3d3c54f49e4120eb8cd11))
161+
* fix broken reference for the queues `consumer` model ([3f5cf39](https://github.com/cloudflare/cloudflare-python/commit/3f5cf39405b6b38fc594ce348d93a6e7da92c276))
162+
163+
164+
#### Chores
165+
166+
* **build:** migrate from rye to uv for project management ([2f283c2](https://github.com/cloudflare/cloudflare-python/commit/2f283c29584b49e7c000f5e04aa5edc62db36ab9))
167+
* **ci:** pin single Python version and pydantic v2 for test runs ([86676bc](https://github.com/cloudflare/cloudflare-python/commit/86676bca670d38d5947041bc5677138640dd6d92))
168+
* **typing:** add mypy configuration with strict mode ([pyproject.toml](https://github.com/cloudflare/cloudflare-python/compare/v4.3.1...v5.0.0))
169+
* **api:** 80+ composite API spec updates across the release cycle
170+
171+
172+
#### Documentation
173+
174+
* add Authentication section to README ([70d934a](https://github.com/cloudflare/cloudflare-python/commit/70d934abd91cfa8f8444e0651ac97012c1d0edcf))
175+
* add aiohttp backend usage instructions to README
176+
* add MCP server integration badges (Cursor, VS Code)
177+
61178
## 5.0.0-beta.2 (2026-04-20)
62179

63180
Full Changelog: [v5.0.0-beta.1...v5.0.0-beta.2](https://github.com/cloudflare/cloudflare-python/compare/v5.0.0-beta.1...v5.0.0-beta.2)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The REST API documentation can be found on [developers.cloudflare.com](https://d
2626

2727
```sh
2828
# install from PyPI
29-
pip install --pre cloudflare
29+
pip install cloudflare
3030
```
3131

3232
## Usage
@@ -90,7 +90,7 @@ You can enable this by installing `aiohttp`:
9090

9191
```sh
9292
# install from PyPI
93-
pip install --pre cloudflare[aiohttp]
93+
pip install cloudflare[aiohttp]
9494
```
9595

9696
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:

docs/v5-migration-guide.md renamed to docs/migration-guides/v5.0.0-migration-guide.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,50 @@ This guide helps you migrate your code from v4.3.1 to v5 of the Cloudflare Pytho
66

77
Version 5 introduces several breaking changes across multiple resources. This guide provides detailed migration instructions for each affected resource.
88

9-
**Important**: This is a beta release. APIs and types may change before the final v5.0.0 release.
9+
## Broad Breaking Changes
1010

11-
## Quick Reference
11+
### 1. Python 3.8 is no longer supported
12+
13+
**What changed:**
14+
The minimum required Python version is now 3.9. Python 3.8 reached end-of-life
15+
in October 2024.
16+
17+
**Impact:**
18+
If you are running Python 3.8, your application will fail to install or run
19+
with cloudflare v5.0.0.
20+
21+
**Actions Needed:**
22+
1. Upgrade to Python 3.9 or later (3.12+ recommended).
23+
2. Update any CI/CD pipelines or Docker images that pin Python 3.8.
24+
3. Review your `pyproject.toml` or `setup.py` for `python_requires` constraints.
25+
26+
**Before (v4.x):**
27+
```
28+
requires-python = ">= 3.8"
29+
```
30+
31+
**After (v5.0.0):**
32+
```
33+
requires-python = ">= 3.9"
34+
```
35+
36+
### 2. typing-extensions minimum version bumped
37+
38+
**What changed:**
39+
The minimum version of `typing-extensions` was raised from `>=4.10` to `>=4.14`.
40+
41+
**Impact:**
42+
If you pin `typing-extensions` to a version below 4.14, dependency resolution
43+
will fail.
44+
45+
**Actions Needed:**
46+
1. Update any version pins on `typing-extensions` to `>=4.14`.
47+
2. Run `pip install --upgrade typing-extensions` or let your dependency
48+
resolver handle it.
49+
50+
---
51+
52+
## Quick Reference for Resource Changes
1253

1354
Resources with breaking changes:
1455

0 commit comments

Comments
 (0)