Skip to content

use backend= instead of deprecated native_namespace= in nw.from_dict#381

Merged
elephaint merged 1 commit intoNixtla:mainfrom
MarcoGorelli:nw-deprecation
Jul 11, 2025
Merged

use backend= instead of deprecated native_namespace= in nw.from_dict#381
elephaint merged 1 commit intoNixtla:mainfrom
MarcoGorelli:nw-deprecation

Conversation

@MarcoGorelli
Copy link
Contributor

@MarcoGorelli MarcoGorelli commented Jul 11, 2025

native_namespace in nw.from_dict is deprecated since Narwhals 1.27, which is already your minimum version

requirements = numpy, numba, pandas>=2.1.0, scikit-learn>=1.2, quadprog, clarabel, matplotlib, narwhals>=1.27.0, utilsforecast>=0.2.12, intel-cmplr-lib-rt ; platform_system!="Darwin" and platform_machine=="x86_64"

so is safe to do even for the oldest versions

For future reference, I'd also suggest using narwhals.stable.v1 to guard against API changes https://narwhals-dev.github.io/narwhals/backcompat/

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@elephaint
Copy link
Collaborator

Thanks, makes sense!

Agree wrt stable API, but we need functions that are not in v1, so then it doesn't work, right?

@MarcoGorelli
Copy link
Contributor Author

thanks!

yup, true - do you remember which non-v1 functions you need?

(btw, we're close to having v2 🥳 )

@elephaint
Copy link
Collaborator

thanks!

yup, true - do you remember which non-v1 functions you need?

(btw, we're close to having v2 🥳 )

I think it was the pivot function. Nice to see v2 coming! I want to start moving the rest of our libs to Narwhals too, but it'll be a big effort.

@elephaint elephaint merged commit 9d10729 into Nixtla:main Jul 11, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants