Skip to content

gh-110850: Cleanup PyTime API: PyTime_t are nanoseconds #115753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 21, 2024

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Feb 21, 2024

PyTime_t no longer uses an arbitrary unit, it's always a number of nanoseconds (64-bit signed integer).

  • Rename _PyTime_FromNanosecondsObject() to _PyTime_FromLong().
  • Rename _PyTime_AsNanosecondsObject() to _PyTime_AsLong().
  • Remove pytime_from_nanoseconds().
  • Remove pytime_as_nanoseconds().
  • Remove _PyTime_FromNanoseconds().

PyTime_t no longer uses an arbitrary unit, it's always a number of
nanoseconds (64-bit signed integer).

* Rename _PyTime_FromNanosecondsObject() to _PyTime_FromLong().
* Rename _PyTime_AsNanosecondsObject() to _PyTime_AsLong().
* Remove pytime_from_nanoseconds().
* Remove pytime_as_nanoseconds().
* Remove _PyTime_FromNanoseconds().
@vstinner vstinner merged commit e4c34f0 into python:main Feb 21, 2024
@vstinner vstinner deleted the pytime_ns branch February 21, 2024 10:46
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
…#115753)

PyTime_t no longer uses an arbitrary unit, it's always a number of
nanoseconds (64-bit signed integer).

* Rename _PyTime_FromNanosecondsObject() to _PyTime_FromLong().
* Rename _PyTime_AsNanosecondsObject() to _PyTime_AsLong().
* Remove pytime_from_nanoseconds().
* Remove pytime_as_nanoseconds().
* Remove _PyTime_FromNanoseconds().
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
…#115753)

PyTime_t no longer uses an arbitrary unit, it's always a number of
nanoseconds (64-bit signed integer).

* Rename _PyTime_FromNanosecondsObject() to _PyTime_FromLong().
* Rename _PyTime_AsNanosecondsObject() to _PyTime_AsLong().
* Remove pytime_from_nanoseconds().
* Remove pytime_as_nanoseconds().
* Remove _PyTime_FromNanoseconds().
LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this pull request Jan 22, 2025
…#115753)

PyTime_t no longer uses an arbitrary unit, it's always a number of
nanoseconds (64-bit signed integer).

* Rename _PyTime_FromNanosecondsObject() to _PyTime_FromLong().
* Rename _PyTime_AsNanosecondsObject() to _PyTime_AsLong().
* Remove pytime_from_nanoseconds().
* Remove pytime_as_nanoseconds().
* Remove _PyTime_FromNanoseconds().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant