Repository navigation
release: v5.10.0 #2755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
release: v5.10.0 #2755
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| { | ||
| ".": "5.9.0" | ||
| ".": "5.10.0" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| configured_endpoints: 2718 | ||
| configured_endpoints: 2790 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,187 @@ | ||
| # Migration Guide: v5.9.0 to v5.10.0 | ||
|
|
||
| This guide covers user-visible breaking changes in Cloudflare Python SDK v5.10.0. | ||
|
|
||
| ## Removed Magic Cloud Networking | ||
|
|
||
| `client.magic_cloud_networking` has been removed entirely. Remove all usage of its sub-resources | ||
| (`catalog_syncs` and `catalog_syncs.prebuilt_policies`, `on_ramps` and `on_ramps.address_spaces`, | ||
| `cloud_integrations`, and `resources`) and drop any imports from `cloudflare.types.magic_cloud_networking`. | ||
| There is no drop-in replacement; these endpoints are no longer exposed by the SDK. | ||
|
|
||
| Before: | ||
|
|
||
| ```python | ||
| syncs = client.magic_cloud_networking.catalog_syncs.list(account_id="account-id") | ||
| ``` | ||
|
|
||
| After: | ||
|
|
||
| ```python | ||
| # No equivalent; remove the call and any magic_cloud_networking imports. | ||
| ``` | ||
|
|
||
| ## Removed Tenant Custom Nameservers | ||
|
|
||
| `client.tenant_custom_nameservers` has been removed, along with its `create()`, `delete()`, and `get()` methods | ||
| and the `TenantCustomNameserverCreateResponse`, `TenantCustomNameserverDeleteResponse`, and | ||
| `TenantCustomNameserverGetResponse` types. | ||
|
|
||
| Before: | ||
|
|
||
| ```python | ||
| client.tenant_custom_nameservers.get("tenant-tag") | ||
| ``` | ||
|
|
||
| After: | ||
|
|
||
| ```python | ||
| # No equivalent; remove the call and any tenant_custom_nameservers imports. | ||
| ``` | ||
|
|
||
| ## Tenants resource | ||
|
|
||
| `client.tenants.get()` has been removed, along with the `account_types`, `entitlements`, and `memberships` | ||
| sub-resources and the `Tenant` and `TenantAccount` types. `client.tenants.accounts.list()` now returns | ||
| `SyncV4PagePaginationArray[AccountListResponse]` instead of `SyncSinglePage[TenantAccount]`. | ||
|
|
||
| Before: | ||
|
|
||
| ```python | ||
| from cloudflare.types.tenants import TenantAccount | ||
|
|
||
| accounts: list[TenantAccount] = list(client.tenants.accounts.list()) | ||
| ``` | ||
|
|
||
| After: | ||
|
|
||
| ```python | ||
| from cloudflare.types.tenants import AccountListResponse | ||
|
|
||
| accounts: list[AccountListResponse] = list(client.tenants.accounts.list()) | ||
| ``` | ||
|
|
||
| ## User tenants listing | ||
|
|
||
| `client.user.tenants.list()` now returns `SyncSinglePage[TenantListResponse]` instead of | ||
| `SyncSinglePage[Organization]`. The `Organization` export was removed from `cloudflare.types.user`. | ||
|
|
||
| Before: | ||
|
|
||
| ```python | ||
| from cloudflare.types.user import Organization | ||
|
|
||
| orgs: list[Organization] = list(client.user.tenants.list()) | ||
| ``` | ||
|
|
||
| After: | ||
|
|
||
| ```python | ||
| from cloudflare.types.user import TenantListResponse | ||
|
|
||
| tenants: list[TenantListResponse] = list(client.user.tenants.list()) | ||
| ``` | ||
|
|
||
| ## Accounts | ||
|
|
||
| The `client.accounts.pay_bad_debt` sub-resource has been removed. Remove any calls to it. | ||
|
|
||
| `client.accounts.subscriptions.bulk.create()` now returns `BulkCreateResponse` directly instead of | ||
| `Optional[BulkCreateResponse]`; callers no longer need to handle `None`. | ||
|
|
||
| ## Registrar domains | ||
|
|
||
| The `client.registrar.domains` sub-resource has been removed. Use the top-level registrar methods instead. | ||
|
|
||
| ## Browser Rendering DevTools | ||
|
|
||
| `client.browser_rendering.devtools.browser.connect()` and `launch()` have been removed, along with the | ||
| `devtools.browser.page` sub-resource. Remove these calls; the remaining DevTools endpoints are unaffected. | ||
|
|
||
| ## AI Search instance identifier | ||
|
|
||
| The AI Search instance path identifier was renamed from `name` to `namespace` across every | ||
| `client.aisearch.namespaces.instances` method and its `items` and `jobs` sub-resources. | ||
|
|
||
| Before: | ||
|
|
||
| ```python | ||
| client.aisearch.namespaces.instances.list( | ||
| name="my-namespace", | ||
| account_id="account-id", | ||
| ) | ||
| ``` | ||
|
|
||
| After: | ||
|
|
||
| ```python | ||
| client.aisearch.namespaces.instances.list( | ||
| namespace="my-namespace", | ||
| account_id="account-id", | ||
| ) | ||
| ``` | ||
|
|
||
| A new `move()` method is also available to move an instance between namespaces. | ||
|
|
||
| ## Rulesets pagination removed | ||
|
|
||
| `client.rulesets.list()` is no longer paginated and now returns `RulesetListResponse` directly instead of | ||
| `SyncCursorPagination[RulesetListResponse]`. `client.rulesets.versions.list()` and | ||
| `client.rulesets.phases.versions.list()` now return `VersionListResponse` instead of | ||
| `SyncSinglePage[VersionListResponse]`. Stop iterating these as pages and read the returned object directly. | ||
|
|
||
| Before: | ||
|
|
||
| ```python | ||
| for ruleset in client.rulesets.list(zone_id="zone-id"): | ||
| print(ruleset.id) | ||
| ``` | ||
|
|
||
| After: | ||
|
|
||
| ```python | ||
| rulesets = client.rulesets.list(zone_id="zone-id") | ||
| for ruleset in rulesets.result: | ||
| print(ruleset.id) | ||
| ``` | ||
|
|
||
| ## Additional pagination changes | ||
|
|
||
| - `client.zero_trust.resource_library.applications.list()` and `categories.list()` now return | ||
| `SyncCursorPaginationAfter` instead of `SyncSinglePage`. | ||
| - `client.diagnostics.endpoint_healthchecks.list()` now returns | ||
| `SyncSinglePage[EndpointHealthcheckListResponse]` instead of `Optional[EndpointHealthcheckListResponse]`. | ||
|
|
||
| ## Vectorize get_by_ids | ||
|
|
||
| `client.vectorize.indexes.get_by_ids()` now issues a `GET` request and returns | ||
| `SyncSinglePage[IndexGetByIDsResponse]` instead of issuing `POST` and returning `object`. Iterate the paged | ||
| result instead of inspecting a raw object. | ||
|
|
||
| ## Response type replacements | ||
|
|
||
| - `client.zero_trust.access.users.last_seen_identity.get()` now returns `Optional[LastSeenIdentityGetResponse]`; | ||
| the `Identity` type was removed. | ||
| - `client.workers_for_platforms.dispatch.namespaces.scripts.tags.delete()` now returns `TagDeleteResponse` | ||
| instead of `object`. | ||
|
|
||
| ## Removed exports | ||
|
|
||
| Remove or replace imports of: | ||
|
|
||
| - `cloudflare.types.shared.LoadBalancerPreview` | ||
| - `cloudflare.types.magic_transit.WANStaticAddressingParam` | ||
| - `cloudflare.types.organizations.OrganizationProfileParam` | ||
| - `cloudflare.types.precursor.EnforcementRuleParam` | ||
|
|
||
| ## Summary | ||
|
|
||
| 1. Remove all `magic_cloud_networking` and `tenant_custom_nameservers` usage and imports. | ||
| 2. Update Tenants and User tenant listings to the new response types and paginators. | ||
| 3. Remove the `accounts.pay_bad_debt`, `registrar.domains`, and `browser_rendering.devtools.browser.page` | ||
| sub-resources and the removed DevTools methods. | ||
| 4. Rename AI Search `name=` arguments to `namespace=`. | ||
| 5. Stop paginating `rulesets.list()`, `rulesets.versions.list()`, and `rulesets.phases.versions.list()`. | ||
| 6. Update changed pagination, verb, and response annotations for Resource Library, diagnostics, Vectorize, | ||
| last-seen identity, and dispatch script tags. | ||
| 7. Replace renamed or removed exported types. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you delete this from github?