You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MIGRATION.md
-67Lines changed: 0 additions & 67 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,75 +4,8 @@ This document is meant to provide a guide for migrating from Haystack v2.X to v3
4
4
5
5
---
6
6
7
-
## How to Document a Breaking Change
8
-
9
-
When you merge a breaking change into the v3 branch, add an entry to this file under the appropriate section below.
10
-
Follow this structure:
11
-
12
-
### Entry template
13
-
14
-
```markdown
15
-
### <Shorttitledescribingwhatchanged>
16
-
17
-
**What changed:** One or two sentences describing the change — what was removed, renamed, or altered.
18
-
19
-
**Why:** Brief motivation (e.g. simplification, API consistency, dependency reduction).
20
-
21
-
**How to migrate:**
22
-
23
-
Before (v2.x):
24
-
\`\`\`python
25
-
# example using the old API
26
-
from haystack.components.foo import OldComponent
27
-
component = OldComponent(old_param="value")
28
-
\`\`\`
29
-
30
-
After (v3.0):
31
-
\`\`\`python
32
-
# example using the new API
33
-
from haystack.components.foo import NewComponent
34
-
component = NewComponent(new_param="value")
35
-
\`\`\`
36
-
```
37
-
38
-
### Tips
39
-
40
-
-**One entry per breaking change.** Don't bundle unrelated changes into a single entry.
41
-
-**Include a working code example** for every rename, removal, or signature change.
42
-
-**Link to the PR** when extra context would help (e.g. `See [#1234](https://github.com/deepset-ai/haystack/pull/1234)`).
43
-
-**Components moved to external packages** don't need a full entry: add a row to the table in
44
-
[Components Moved to External Packages](#components-moved-to-external-packages) instead.
45
-
46
-
---
47
-
48
7
## Breaking Changes
49
8
50
-
<!-- Add entries here as v3 development progresses. Example below shows the expected format. -->
51
-
52
-
### Example entry: `Document.dataframe` field removed
53
-
54
-
**What changed:** The `dataframe` field on `Document` and the `ExtractedTableAnswer` dataclass have been removed. `pandas` is no longer a required dependency.
55
-
56
-
**Why:** Reduces the default installation footprint. Components that need `pandas` will raise an informative error prompting the user to install it explicitly.
# Store tabular data as plain content or create a custom component that returns pandas DataFrames as needed.
71
-
from haystack.dataclasses import Document
72
-
73
-
doc = Document(content="col\n1\n2\n3")
74
-
```
75
-
76
9
### `GeneratedAnswer` and `ExtractedAnswer` serialization format
77
10
78
11
**What changed:**`GeneratedAnswer.to_dict()` and `ExtractedAnswer.to_dict()` now return a flat dictionary of the object's fields instead of wrapping them in a `{"type": ..., "init_parameters": {...}}` envelope. `from_dict()` still accepts the old wrapped format, so existing serialized artifacts keep loading.
0 commit comments