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
fix: Update version when passing narwhals objects in from_native (#3515)
* add v2 to stable/__init__:__all__
* ref: test_init_already_narwhals duplicate test
in tests/translate/from_native_test.py
test_init_already_narwhals and test_init_already_narwhals_unstable
have the exact same source code, when the former should verify behavior
in a stable version.
This function used to test this, but seemed to have been mistakenly
edited.
* fix: from_native updates a passed nw.DataFrame with the passed version
from_native on a narwhals.{DataFrame,Series} would always return
the same object even if the DataFrame._version and the version
passed into from_native disagreed.
Now, if the versions mismatch we create a new narwhals object
with the appropriate version. If the versions match, we short cut
and return the same object.
* fix nw.LazyFrame missing _version ClassVar
* add Series objects in to_stable/to_unstable tests
* ignore var-annotated in tests/translate/from_native init_already to {stable,unstable}
0 commit comments