Commit 54bf3d3
authored
refactor: Cache, reuse
* docs: Remove outdated doc
I shoul've caught that in review (#2620 (comment))
* perf: Cache `Implementation._backend_version`
Mentioned in
- #2620 (comment)
- #1657 (reply in thread)
Now that validation happens **within** that call, we can remove it from every `Series`, `DataFrame`, `LazyFrame` constructor and stop passing it around
* perf: Remove `validate_backend_version`
* test: Update `test_to_native_namespace_min_version`
* refactor: Port over `EagerDataFrame`
`lazy()` and `collect()` between backends is really the only place we might need to preserve the current checks
* refactor: Port over `EagerSeries`
* refactor: Port `Eager(Expr|Then)`, `(Arrow|Pandas)Selector`
* refactor: Port `EagerNamespace`
* refactor: Port `EagerSeriesNamespace`
* refactor: No more `backend_version` eager utils!
* docs: Fix `how_it_works.md`
We don't need the version anymore
https://github.com/narwhals-dev/narwhals/actions/runs/15982913249/job/45081217959?pr=2764
* revert: Remove unused `EagerSeries._validate_backend_version`
https://github.com/narwhals-dev/narwhals/actions/runs/15982913252/job/45081168507
* ci: fix pandas cov
https://github.com/narwhals-dev/narwhals/actions/runs/15982913252/job/45081168507
* fix cov pattern
https://github.com/narwhals-dev/narwhals/actions/runs/15983209178/job/45082089100?pr=2764
* refactor: Port `LazyExpr` + friends
* refactor: Port `PolarsExpr`, `CompliantExpr`
* refactor: Port `PolarsSeries`, `_polars.utils`
* refactor: Port `_dask.utils`
Now `mypy` understands the same error as `pyright` 😏
* refactor: Port `CompliantNamespace` + friends
* refactor: Port `Compliant(Data|Lazy)Frame` + friends
* refactor: Move `_validate_backend_version` into a protocol
* chore: `polars` cov
* feat: Support `ibis` in `.lazy()`?
- Seemed the easiest way to get coverage
- Will split into another PR
- https://ibis-project.org/reference/expression-tables#ibis.memtable
* test: `from_arrow` coverage
* ignore spark cov
* chore: `get_dask` coverage
* fix imports and `import_check`
Was broken on windows
> UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 21406: character maps to <undefined>
* revert: just ignore `dask` cov
- https://github.com/narwhals-dev/narwhals/actions/runs/16004869123/job/45148957046
- 2de5910
* refactor: Cleaning up
* refactor: Replace more `parse_version`Implementation._backend_version (#2764)1 parent 3db4ab4 commit 54bf3d3
File tree
57 files changed
+536
-1015
lines changed- docs
- narwhals
- _arrow
- _compliant
- _dask
- _duckdb
- _ibis
- _pandas_like
- _polars
- _spark_like
- tests
- dependencies
- frame
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
57 files changed
+536
-1015
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
| |||
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
104 | | - | |
105 | 103 | | |
106 | 104 | | |
107 | 105 | | |
108 | 106 | | |
109 | 107 | | |
110 | 108 | | |
111 | 109 | | |
112 | | - | |
113 | 110 | | |
114 | 111 | | |
115 | 112 | | |
| |||
199 | 196 | | |
200 | 197 | | |
201 | 198 | | |
202 | | - | |
203 | 199 | | |
204 | 200 | | |
205 | 201 | | |
| |||
214 | 210 | | |
215 | 211 | | |
216 | 212 | | |
217 | | - | |
218 | 213 | | |
219 | 214 | | |
220 | 215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | | - | |
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
| |||
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | | - | |
| 47 | + | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
| |||
77 | 75 | | |
78 | 76 | | |
79 | 77 | | |
| 78 | + | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | 84 | | |
86 | 85 | | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
90 | 92 | | |
91 | | - | |
92 | | - | |
93 | 93 | | |
94 | | - | |
95 | 94 | | |
96 | 95 | | |
97 | | - | |
98 | | - | |
| 96 | + | |
| 97 | + | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
| |||
114 | 113 | | |
115 | 114 | | |
116 | 115 | | |
117 | | - | |
| 116 | + | |
118 | 117 | | |
119 | 118 | | |
120 | 119 | | |
| |||
128 | 127 | | |
129 | 128 | | |
130 | 129 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 130 | + | |
| 131 | + | |
138 | 132 | | |
139 | 133 | | |
140 | 134 | | |
141 | 135 | | |
142 | 136 | | |
143 | 137 | | |
144 | 138 | | |
145 | | - | |
| 139 | + | |
146 | 140 | | |
147 | 141 | | |
148 | 142 | | |
| |||
157 | 151 | | |
158 | 152 | | |
159 | 153 | | |
160 | | - | |
161 | | - | |
162 | | - | |
| 154 | + | |
163 | 155 | | |
164 | 156 | | |
165 | 157 | | |
| |||
175 | 167 | | |
176 | 168 | | |
177 | 169 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
| 170 | + | |
184 | 171 | | |
185 | 172 | | |
186 | 173 | | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 174 | + | |
191 | 175 | | |
192 | 176 | | |
193 | 177 | | |
| |||
536 | 520 | | |
537 | 521 | | |
538 | 522 | | |
539 | | - | |
540 | | - | |
541 | | - | |
| 523 | + | |
542 | 524 | | |
543 | 525 | | |
544 | 526 | | |
| |||
547 | 529 | | |
548 | 530 | | |
549 | 531 | | |
550 | | - | |
| 532 | + | |
551 | 533 | | |
552 | 534 | | |
553 | 535 | | |
554 | | - | |
555 | 536 | | |
556 | 537 | | |
557 | 538 | | |
558 | 539 | | |
559 | 540 | | |
560 | 541 | | |
561 | | - | |
| 542 | + | |
562 | 543 | | |
563 | 544 | | |
564 | 545 | | |
| |||
568 | 549 | | |
569 | 550 | | |
570 | 551 | | |
571 | | - | |
| 552 | + | |
572 | 553 | | |
573 | 554 | | |
| 555 | + | |
574 | 556 | | |
575 | 557 | | |
576 | 558 | | |
| |||
580 | 562 | | |
581 | 563 | | |
582 | 564 | | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
| 565 | + | |
587 | 566 | | |
588 | 567 | | |
589 | 568 | | |
590 | | - | |
591 | | - | |
592 | 569 | | |
593 | 570 | | |
594 | 571 | | |
595 | 572 | | |
596 | 573 | | |
597 | | - | |
| 574 | + | |
598 | 575 | | |
599 | 576 | | |
600 | 577 | | |
| |||
606 | 583 | | |
607 | 584 | | |
608 | 585 | | |
609 | | - | |
| 586 | + | |
610 | 587 | | |
611 | 588 | | |
612 | 589 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
| |||
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | | - | |
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
| |||
58 | 56 | | |
59 | 57 | | |
60 | 58 | | |
61 | | - | |
| 59 | + | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
65 | 63 | | |
66 | 64 | | |
67 | 65 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 66 | + | |
72 | 67 | | |
73 | 68 | | |
74 | 69 | | |
| |||
83 | 78 | | |
84 | 79 | | |
85 | 80 | | |
86 | | - | |
87 | 81 | | |
88 | 82 | | |
89 | 83 | | |
90 | 84 | | |
91 | | - | |
| 85 | + | |
92 | 86 | | |
93 | 87 | | |
94 | 88 | | |
| |||
103 | 97 | | |
104 | 98 | | |
105 | 99 | | |
106 | | - | |
107 | 100 | | |
108 | 101 | | |
109 | 102 | | |
110 | 103 | | |
111 | 104 | | |
112 | 105 | | |
113 | | - | |
114 | | - | |
115 | | - | |
| 106 | + | |
116 | 107 | | |
117 | 108 | | |
118 | 109 | | |
| |||
175 | 166 | | |
176 | 167 | | |
177 | 168 | | |
178 | | - | |
179 | 169 | | |
180 | 170 | | |
181 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 48 | + | |
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
| |||
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
62 | | - | |
63 | 61 | | |
64 | 62 | | |
65 | 63 | | |
| |||
78 | 76 | | |
79 | 77 | | |
80 | 78 | | |
81 | | - | |
82 | 79 | | |
83 | 80 | | |
84 | 81 | | |
| |||
168 | 165 | | |
169 | 166 | | |
170 | 167 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
| 168 | + | |
177 | 169 | | |
178 | 170 | | |
179 | 171 | | |
| |||
194 | 186 | | |
195 | 187 | | |
196 | 188 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
| 189 | + | |
203 | 190 | | |
204 | 191 | | |
205 | 192 | | |
| |||
262 | 249 | | |
263 | 250 | | |
264 | 251 | | |
265 | | - | |
266 | 252 | | |
267 | 253 | | |
268 | 254 | | |
| |||
0 commit comments