◐ Shell
clean mode source ↗

bpo-20177: Migrate datetime.date.fromtimestamp to Argument Clinic by timhoffm · Pull Request #8535 · python/cpython

@timhoffm

serhiy-storchaka

serhiy-storchaka

pganssle added a commit to pganssle/cpython that referenced this pull request

Apr 27, 2019
In the process of converting the date.fromtimestamp function to use
argument clinic in pythonGH-8535, the C API for PyDate_FromTimestamp was
inadvertently changed to expect a timestamp object rather than an
argument tuple.

This PR fixes this backwards-incompatible change by adding a new wrapper
function for the C API function that unwraps the argument tuple and
passes it to the underlying function.

This PR also adds tests for both PyDate_FromTimestamp and
PyDateTime_FromTimestamp to prevent any further regressions.

bpo-36025

berkerpeksag pushed a commit that referenced this pull request

Apr 27, 2019
In the process of converting the date.fromtimestamp function to use
argument clinic in GH-8535, the C API for PyDate_FromTimestamp was
inadvertently changed to expect a timestamp object rather than an
argument tuple.

This PR fixes this backwards-incompatible change by adding a new wrapper
function for the C API function that unwraps the argument tuple and
passes it to the underlying function.

This PR also adds tests for both PyDate_FromTimestamp and
PyDateTime_FromTimestamp to prevent any further regressions.