Skip to content

Commit 630c44b

Browse files
authored
chore: cleanup instructions in MIGRATION file (#11975)
1 parent 91c4bc6 commit 630c44b

1 file changed

Lines changed: 0 additions & 67 deletions

File tree

MIGRATION.md

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -4,75 +4,8 @@ This document is meant to provide a guide for migrating from Haystack v2.X to v3
44

55
---
66

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-
### <Short title describing what changed>
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-
487
## Breaking Changes
498

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.
57-
58-
**How to migrate:**
59-
60-
Before (v2.x):
61-
```python
62-
from haystack.dataclasses import Document
63-
import pandas as pd
64-
65-
doc = Document(content=pd.DataFrame({"col": [1, 2, 3]}))
66-
```
67-
68-
After (v3.0):
69-
```python
70-
# 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-
769
### `GeneratedAnswer` and `ExtractedAnswer` serialization format
7710

7811
**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

Comments
 (0)