Skip to content
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

[3.8] bpo-31327: Update time documentation to reflect possible errors (GH-31460) #31827

Merged
merged 1 commit into from Mar 16, 2022

Conversation

Copy link
Contributor

@miss-islington miss-islington commented Mar 11, 2022

As per the comments, this mirrors the datetime documentation.

>>> import time
>>> time.localtime(999999999999999999999)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: timestamp out of range for platform time_t
>>> time.localtime(-3600)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument 

(cherry picked from commit c83fc9c)

Co-authored-by: slateny 46876382+slateny@users.noreply.github.com

…onGH-31460)

As per the comments, this mirrors the [datetime documentation](https://docs.python.org/3/library/datetime.htmlGH-datetime.datetime.fromtimestamp).

```
>>> import time
>>> time.localtime(999999999999999999999)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: timestamp out of range for platform time_t
>>> time.localtime(-3600)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 22] Invalid argument
```
(cherry picked from commit c83fc9c)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
@miss-islington
Copy link
Contributor Author

@miss-islington miss-islington commented Mar 11, 2022

@slateny: Status check is done, and it's a success .

@iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Mar 16, 2022

@ambv I don't know what your view is on backporting doc enhancements to 3.8.

See also #31460 (comment)

@ambv ambv merged commit 4d8e08b into python:3.8 Mar 16, 2022
10 checks passed
@miss-islington miss-islington deleted the backport-c83fc9c-3.8 branch Mar 16, 2022
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.

None yet

6 participants