Skip to content

Commit dd87a77

Browse files
authored
Ingest Python library: migration guidance (#573)
1 parent 64d6a81 commit dd87a77

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

ingestion/python-ingest.mdx

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,33 @@ import AzureAPIPyV2 from '/snippets/destination_connectors/azure.v2.py.mdx';
7676

7777
To learn how to use the Unstructured Ingest Python library to work with a specific source (input) and destination (output) location, see the Python code examples for the [source](/ingestion/source-connectors/overview) and [destination](/ingestion/destination-connectors/overview) connectors that are available for you to choose from.
7878

79-
See also the [ingest configuration](/ingestion/ingest-configuration/overview) settings that enable you to further control how batches are sent and processed.
79+
See also the [ingest configuration](/ingestion/ingest-configuration/overview) settings that enable you to further control how batches are sent and processed.
80+
81+
## Migration guide
82+
83+
The Unstructured Ingest Python library introduced breaking changes in version 0.7.0 as follows:
84+
85+
- The library has moved the calling pattern (formerly commonly referred to as "v2") up one level in the package. If you are using this calling pattern
86+
in your existing code, beginning with version 0.7.0 you must remove `.v2` from your related `from...import` statements. For example, if you previously had statments
87+
such as these:
88+
89+
```python
90+
from unstructured_ingest.v2.pipeline.pipeline import Pipeline
91+
from unstructured_ingest.v2.interfaces import ProcessorConfig
92+
```
93+
94+
Beginning with version 0.7.0, you must change to these by removing `.v2`:
95+
96+
```python
97+
from unstructured_ingest.pipeline.pipeline import Pipeline
98+
from unstructured_ingest.interfaces import ProcessorConfig
99+
```
100+
101+
If you do not make these changes beginning with version 0.7.0, your existing code will no longer work. To run your existing code
102+
without making these changes, you must pin your installed library version to 0.6.4 or earlier.
103+
104+
- The earlier calling pattern (commonly referred to as "v1") has been deprecated and removed from the library and will no longer work beginning with version 0.7.0. If you are using this earlier "v1" calling pattern in your code, you must
105+
either manually migrate your code to the new calling pattern (formerly commonly referred to as "v2"), or pin your installed library version to 0.6.4 or earlier to keep using this earlier "v1" calling pattern.
106+
107+
To learn how to use the new calling pattern (formerly commonly referred to as "v2"), see the code examples in the
108+
[source connectors](/ingestion/source-connectors/overview) and [destination connectors](/ingestion/destination-connectors/overview) documentation.

0 commit comments

Comments
 (0)