Since Narwhals 1.9.0 (release last month), nw.Datetime has time_unit and time_zone metadata, which means that hash(nw.Datetime) has changed.
This change only affects the main Narwhals namespace - the narwhals.stable.v1 namespace (which you're using 🙌 ) is unaffected
The fact that having narwhals.stable.v1 allowed us to make this change without it affecting any users is a pretty good feeling 😄
I've rewritten the dtype comparison from
elif dtype in {nw.Datetime, nw.Date}:
to
elif dtype == nw.Datetime or dtype == nw.Date:
so that it will also work in the same way if and when you decide to move to narwhals.stable.v2 (when we get there). There'll be no obligation to perform such a move of course, we'll keep stable.v1 working as-is, so either way, there's no impact on users
Since Narwhals 1.9.0 (release last month),
nw.Datetime
hastime_unit
andtime_zone
metadata, which means thathash(nw.Datetime)
has changed. This change only affects the main Narwhals namespace - thenarwhals.stable.v1
namespace (which you're using 🙌 ) is unaffectedThe fact that having
narwhals.stable.v1
allowed us to make this change without it affecting any users is a pretty good feeling 😄I've rewritten the dtype comparison from
to
so that it will also work in the same way if and when you decide to move to
narwhals.stable.v2
(when we get there). There'll be no obligation to perform such a move of course, we'll keepstable.v1
working as-is, so either way, there's no impact on usersSee the second bullet point at https://narwhals-dev.github.io/narwhals/backcompat/#after-stablev1 for more context