@@ -15,8 +15,6 @@ Read this as the migration guide for the generated-surface major release, not as
1515 - [ Python 3.10+ is now required] ( #python-310-is-now-required )
1616 - [ ` client_id ` is only required for flows that use it] ( #client_id-is-only-required-for-flows-that-use-it )
1717 - [ Legacy client modules were removed] ( #legacy-client-modules-were-removed )
18- - [ SDK exceptions now come from ` workos ` , not ` workos.exceptions ` ] ( #sdk-exceptions-now-come-from-workos-not-workosexceptions )
19- - [ Models no longer live under ` workos.types.* ` ] ( #models-no-longer-live-under-workostypes )
2018 - [ SDK models are no longer Pydantic models] ( #sdk-models-are-no-longer-pydantic-models )
2119 - [ ` client.connect ` was split into explicit resources] ( #clientconnect-was-split-into-explicit-resources )
2220 - [ ` client.directory_sync ` was split into directories, groups, and users] ( #clientdirectory_sync-was-split-into-directories-groups-and-users )
@@ -36,7 +34,7 @@ Read this as the migration guide for the generated-surface major release, not as
3634
37351 . Upgrade to Python 3.10 or newer.
38362 . Update to the v6 release.
39- 3 . Replace legacy imports from ` workos.client ` , ` workos.async_client ` , ` workos.exceptions ` , and ` workos.types.* ` .
37+ 3 . Replace legacy imports from ` workos.client ` and ` workos.async_client ` .
40384 . Update any uses of ` connect ` , ` portal ` , ` directory_sync ` , ` fga ` , ` authorization ` permission helpers, and old ` user_management ` convenience helpers.
41395 . Run your tests and look specifically for import errors, missing methods, and model serialization issues.
4240
@@ -105,52 +103,6 @@ client = WorkOSClient(api_key="sk_test_123", client_id="client_123")
105103** Affected users:** Anyone importing ` SyncClient ` , ` AsyncClient ` , or other client classes from legacy client modules
106104** Migration:** Import clients from the top-level ` workos ` package instead of ` workos.client ` or ` workos.async_client `
107105
108- ### SDK exceptions now come from ` workos ` , not ` workos.exceptions `
109-
110- ** 5.x (old):**
111-
112- ``` python
113- from workos.exceptions import BaseRequestException
114-
115- try :
116- client.organizations.get_organization(" org_123" )
117- except BaseRequestException as exc:
118- print (exc.request_id)
119- ```
120-
121- ** 6.x (new):**
122-
123- ``` python
124- from workos import BaseRequestException
125-
126- try :
127- client.organizations.get(" org_123" )
128- except BaseRequestException as exc:
129- print (exc.request_id)
130- ```
131-
132- ** Affected users:** Anyone importing exception classes from ` workos.exceptions `
133- ** Migration:** Import exception classes directly from ` workos `
134-
135- ### Models no longer live under ` workos.types.* `
136-
137- ** 5.x (old):**
138-
139- ``` python
140- from workos.types.organizations import Organization
141- from workos.types.connect import ConnectApplication
142- ```
143-
144- ** 6.x (new):**
145-
146- ``` python
147- from workos.organizations.models import Organization
148- from workos.applications.models import ConnectApplication
149- ```
150-
151- ** Affected users:** Anyone importing SDK models from ` workos.types.* `
152- ** Migration:** Import models from the generated ` workos.<resource>.models ` packages
153-
154106### SDK models are no longer Pydantic models
155107
156108** 5.x (old):**
@@ -456,7 +408,7 @@ organization = client.organizations.get("org_123")
456408
4574091 . Upgrade Python to 3.10+.
4584102 . Review which flows need ` client_id ` and either pass it explicitly or configure it on the client / environment.
459- 3 . Fix imports from ` workos.client ` , ` workos.async_client ` , ` workos.exceptions ` , and ` workos.types.* ` .
411+ 3 . Fix imports from ` workos.client ` and ` workos.async_client ` .
4604124 . Replace old namespaces: ` connect ` , ` directory_sync ` , ` portal ` , ` fga ` , and handwritten ` user_management ` helpers.
4614135 . Move permission CRUD from ` client.authorization ` to ` client.permissions ` .
4624146 . Update model serialization code away from Pydantic helpers.
@@ -466,8 +418,6 @@ organization = client.organizations.get("org_123")
466418
467419- No imports from ` workos.client `
468420- No imports from ` workos.async_client `
469- - No imports from ` workos.exceptions `
470- - No imports from ` workos.types.* `
471421- Client-ID-based flows explicitly pass ` client_id ` or configure it on the client / environment
472422- No remaining uses of ` client.connect `
473423- No remaining uses of ` client.directory_sync `
0 commit comments