Skip to content

gh-94757: Fix documentation to include possible Exception for datetime.timestamp()#94818

Merged
pganssle merged 1 commit intopython:mainfrom
yourlefthandman:add_documentation_for_possible_error_in_datetime_timestamp
Jul 18, 2022
Merged

gh-94757: Fix documentation to include possible Exception for datetime.timestamp()#94818
pganssle merged 1 commit intopython:mainfrom
yourlefthandman:add_documentation_for_possible_error_in_datetime_timestamp

Conversation

@yourlefthandman
Copy link
Contributor

@yourlefthandman yourlefthandman commented Jul 13, 2022

The function _PyTime_localtime may raise the OSError exception for windows when the datetime overflows

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@bedevere-bot bedevere-bot added the docs Documentation in the Doc dir label Jul 13, 2022
Copy link

@Vinalti Vinalti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit

@pganssle
Copy link
Member

I would be mildly inclined to catch the OSError and reraise it as something else, but I guess we can at least include it in the documentation for backports.

@pganssle pganssle added 3.11 only security fixes 3.10 only security fixes 3.9 (EOL) end of life 3.8 (EOL) end of life 3.7 (EOL) end of life 3.12 only security fixes labels Jul 18, 2022
@pganssle pganssle merged commit fc0dc92 into python:main Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.7 (EOL) end of life 3.8 (EOL) end of life 3.9 (EOL) end of life 3.10 only security fixes 3.11 only security fixes 3.12 only security fixes docs Documentation in the Doc dir skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants