Skip to content

Conversation

adamchainz
Copy link
Owner

Trying an alternative approach to #531.

@adamchainz adamchainz changed the title Import datetime module once in C extension Import date/time modules once in C extension Aug 18, 2025
@adamchainz adamchainz removed the Build label Aug 18, 2025
@adamchainz adamchainz merged commit 65a214c into main Aug 18, 2025
14 checks passed
@adamchainz adamchainz deleted the import_once branch August 18, 2025 16:46
adamchainz added a commit that referenced this pull request Aug 19, 2025
Following #553, move all the other imports in the C extenion to only be done once:

* datetime class
* datetime.datetime.now
* datetime.datetime.utcnow
* time.clock_gettime
* time.clock_gettime_ns
* time.gmtime
* time.localtime
* time.monotonic
* time.monotonic_ns
* time.strftime
* time.time
* time.time_ns
adamchainz added a commit that referenced this pull request Aug 19, 2025
Following #553, move all the other imports in the C extenion to only be
done once:

* datetime class
* datetime.datetime.now
* datetime.datetime.utcnow
* time.clock_gettime
* time.clock_gettime_ns
* time.gmtime
* time.localtime
* time.monotonic
* time.monotonic_ns
* time.strftime
* time.time
* time.time_ns

Fixes #531 .
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.

1 participant