Add _FromTimestamp methods to CAPI capsule (3.6 version)

Closed Bitbucket Importer requested to merge bitbucket/declined-pr-643 into branch/py3.6

Created originally on Bitbucket by pganssle (Paul G)

Changesets for this Pull Request have not been imported, because it had been already declined on Bitbucket. Marked as closed by the import user.

  • Add _FromTimestamp methods to CAPI capsule

    The CPython CAPI capsule includes fromtimestamp constructors, but the current cpyext implementation does not, which causes some problems for people writing C extensions that use the capsule directly rather than the C macros.

    Closes bitbucket issue #2986 (closed):

  • Use built-in UTC object in tzinfo test

    In Python 3.6, there is a built-in UTC object, so there is no need to make a custom one for this test.

This PR cherry-picks the commit from onto the py3.6 branch, plus one update to the tests.

Merge request reports