Staging
v0.5.1
https://github.com/python/cpython
Revision 4d8c8c0ad6163c24136d3419eb04f310b31f7e64 authored by Paul Ganssle on 27 April 2019, 19:39:40 UTC, committed by Berker Peksag on 27 April 2019, 19:39:40 UTC
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.
1 parent 5c403b2
Raw File
Tip revision: 4d8c8c0ad6163c24136d3419eb04f310b31f7e64 authored by Paul Ganssle on 27 April 2019, 19:39:40 UTC
bpo-36025: Fix PyDate_FromTimestamp API (GH-11922)
Tip revision: 4d8c8c0
prebuild-checks.yml
steps:
- checkout: self
  fetchDepth: 5

- script: echo "##vso[task.setvariable variable=diffTarget]HEAD~1"
  displayName: Set default diff target

- script: |
    git fetch -q origin $(System.PullRequest.TargetBranch)
    echo "##vso[task.setvariable variable=diffTarget]HEAD \$(git merge-base HEAD FETCH_HEAD)"
  displayName: Fetch comparison tree
  condition: and(succeeded(), variables['System.PullRequest.TargetBranch'])

- script: |
   if ! git diff --name-only $(diffTarget) | grep -qE '(\.rst$|^Doc|^Misc)'
   then
     echo "No docs were updated: docs.run=false"
     echo "##vso[task.setvariable variable=run;isOutput=true]false"
   else
     echo "Docs were updated: docs.run=true"
     echo "##vso[task.setvariable variable=run;isOutput=true]true"
   fi
  displayName: Detect documentation changes
  name: docs

- script: |
   if ! git diff --name-only $(diffTarget) | grep -qvE '(\.rst$|^Doc|^Misc)'
   then
     echo "Only docs were updated: tests.run=false"
     echo "##vso[task.setvariable variable=run;isOutput=true]false"
   else
     echo "Code was updated: tests.run=true"
     echo "##vso[task.setvariable variable=run;isOutput=true]true"
   fi
  displayName: Detect source changes
  name: tests
back to top