Skip to content

bpo-37205: time.time() cannot fail with fatal error#23314

Merged
vstinner merged 2 commits intopython:masterfrom
vstinner:time_fatal_error
Nov 16, 2020
Merged

bpo-37205: time.time() cannot fail with fatal error#23314
vstinner merged 2 commits intopython:masterfrom
vstinner:time_fatal_error

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented Nov 16, 2020

time.time(), time.perf_counter() and time.monotonic() functions can
no longer fail with a Python fatal error, instead raise a regular
Python exception on failure.

https://bugs.python.org/issue37205

time.time(), time.perf_counter() and time.monotonic() functions can
no longer fail with a Python fatal error, instead raise a regular
Python exception on failure.

Remove _PyTime_Init(): don't check system, monotonic and perf counter
clocks at startup anymore.

On error, _PyTime_GetSystemClock(), _PyTime_GetMonotonicClock() and
_PyTime_GetPerfCounter() now silently ignore the error and return 0.
They cannot fail with a Python fatal error anymore.

Add py_mach_timebase_info() and win_perf_counter_frequency()
sub-functions.
@vstinner vstinner merged commit ae6cd7c into python:master Nov 16, 2020
@vstinner vstinner deleted the time_fatal_error branch November 16, 2020 15:08
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
time.time(), time.perf_counter() and time.monotonic() functions can
no longer fail with a Python fatal error, instead raise a regular
Python exception on failure.

Remove _PyTime_Init(): don't check system, monotonic and perf counter
clocks at startup anymore.

On error, _PyTime_GetSystemClock(), _PyTime_GetMonotonicClock() and
_PyTime_GetPerfCounter() now silently ignore the error and return 0.
They cannot fail with a Python fatal error anymore.

Add py_mach_timebase_info() and win_perf_counter_frequency()
sub-functions.
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.

3 participants