Skip to content

Conversation

@lbonn
Copy link
Contributor

@lbonn lbonn commented Dec 17, 2025

Updated (and fixed) version of #1144.

Before these changes, nanobind would silently accept datetime objects with timezone information and treat them as local time.

In the naive timestamp case (tzinfo=None), the cost should be small.

@wjakob
Copy link
Owner

wjakob commented Dec 18, 2025

cc @oremanj

Also needs a changelog explaining how it changes the behavior of the existing type caster. My understanding is that this fixes basically buggy/nonintuitive behavior and so could also be merged as part of a minor version bump. Is that correct?

Before these changes, nanobind would silently accept datetime objects
with timezone information and treat them as local time.
@lbonn
Copy link
Contributor Author

lbonn commented Dec 18, 2025

Updated the changelog and fixed a memory leak in the limited api implementation.

Indeed, the previous behavior was documented but I don't think there was any case where it is actually desirable so it can probably be included in a minor version bump.

@wjakob wjakob force-pushed the master branch 3 times, most recently from 1235f9a to 4ba51fc Compare December 19, 2025 10:00
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