<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Modules/_datetimemodule.c, branch 3.10</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Modules/_datetimemodule.c?h=3.10</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Modules/_datetimemodule.c?h=3.10'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2022-08-04T13:15:01Z</updated>
<entry>
<title>gh-91838: Resolve HTTP links which redirect to HTTPS (GH-95642)</title>
<updated>2022-08-04T13:15:01Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-08-04T13:15:01Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=be30a6dc4d7aa998526b1beb101995aa3691145f'/>
<id>urn:sha1:be30a6dc4d7aa998526b1beb101995aa3691145f</id>
<content type='text'>
It updates links which redirect to HTTPS with different authority or
path.
(cherry picked from commit d0d0154443cafb2f0a2cdfb6a1267d80cce8388e)

Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;</content>
</entry>
<entry>
<title>Check result of utc_to_seconds and skip fold probe in pure Python (GH-91582)</title>
<updated>2022-05-14T15:01:53Z</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2022-05-14T15:01:53Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=36d42e701f8a4040e7daf70138217038bfde3c78'/>
<id>urn:sha1:36d42e701f8a4040e7daf70138217038bfde3c78</id>
<content type='text'>
The `utc_to_seconds` call can fail, here's a minimal reproducer on
Linux:

TZ=UTC python -c "from datetime import *; datetime.fromtimestamp(253402300799 + 1)"

The old behavior still raised an error in a similar way, but only
because subsequent calculations happened to fail as well. Better to fail
fast.

This also refactors the tests to split out the `fromtimestamp` and
`utcfromtimestamp` tests, and to get us closer to the actual desired
limits of the functions. As part of this, we also changed the way we
detect platforms where the same limits don't necessarily apply (e.g.
Windows).

As part of refactoring the tests to hit this condition explicitly (even
though the user-facing behvior doesn't change in any way we plan to
guarantee), I noticed that there was a difference in the places that
`datetime.utcfromtimestamp` fails in the C and pure Python versions, which
was fixed by skipping the "probe for fold" logic for UTC specifically —
since UTC doesn't have any folds or gaps, we were never going to find a
fold value anyway. This should prevent some failures in the pure python
`utcfromtimestamp` method on timestamps close to 0001-01-01.

There are two separate news entries for this because one is a
potentially user-facing change, the other is an internal code
correctness change that, if anything, changes some error messages. The
two happen to be coupled because of the test refactoring, but they are
probably best thought of as independent changes.

Fixes GH-91581
(cherry picked from commit 83c0247d47b99f4571e35ea95361436e1d2a61cd)

Co-authored-by: Paul Ganssle &lt;1377457+pganssle@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>[3.10] [codemod] Fix non-matching bracket pairs (GH-28473) (GH-28511)</title>
<updated>2021-09-21T23:33:59Z</updated>
<author>
<name>Łukasz Langa</name>
<email>lukasz@langa.pl</email>
</author>
<published>2021-09-21T23:33:59Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8c1e1da565bca9cec792323eb728e288715ef7c4'/>
<id>urn:sha1:8c1e1da565bca9cec792323eb728e288715ef7c4</id>
<content type='text'>
Co-authored-by: Terry Jan Reedy &lt;tjreedy@udel.edu&gt;
Co-authored-by: Serhiy Storchaka &lt;storchaka@gmail.com&gt;
Co-authored-by: Łukasz Langa &lt;lukasz@langa.pl&gt;
(cherry picked from commit 8f943ca25732d548cf9f0b0393ba8d582fb93e29)

Co-authored-by: Mohamad Mansour &lt;66031317+mohamadmansourX@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>bpo-41798: Allocate the _datetime.datetime_CAPI on the heap memory (GH-24096)</title>
<updated>2021-01-06T19:47:19Z</updated>
<author>
<name>Hai Shi</name>
<email>shihai1992@gmail.com</email>
</author>
<published>2021-01-06T19:47:19Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=1ab045933b90d1954af983cc08d1bf0bc46b6240'/>
<id>urn:sha1:1ab045933b90d1954af983cc08d1bf0bc46b6240</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bpo-1635741: Enhance _datetime error handling (GH-23139)</title>
<updated>2020-11-20T10:39:40Z</updated>
<author>
<name>Mohamed Koubaa</name>
<email>koubaa.m@gmail.com</email>
</author>
<published>2020-11-20T10:39:40Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=2db8e35489d63b976a463fb1d2a6c29f4f965c21'/>
<id>urn:sha1:2db8e35489d63b976a463fb1d2a6c29f4f965c21</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bpo-42161: Modules/ uses _PyLong_GetZero() and _PyLong_GetOne() (GH-22998)</title>
<updated>2020-10-27T16:12:53Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-10-27T16:12:53Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=37834136d0afe51d274bfc79d8705514cbe73727'/>
<id>urn:sha1:37834136d0afe51d274bfc79d8705514cbe73727</id>
<content type='text'>
Use _PyLong_GetZero() and _PyLong_GetOne() in Modules/ directory.

_cursesmodule.c and zoneinfo.c are now built with
Py_BUILD_CORE_MODULE macro defined.</content>
</entry>
<entry>
<title>bpo-41867: List options for timespec in docstrings of isoformat methods (GH-22418)</title>
<updated>2020-10-03T10:43:47Z</updated>
<author>
<name>Ram Rachum</name>
<email>ram@rachum.com</email>
</author>
<published>2020-10-03T10:43:47Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=52301312bb9de2299b0c42468fd1936d869e651c'/>
<id>urn:sha1:52301312bb9de2299b0c42468fd1936d869e651c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bpo-30155: Add macros to get tzinfo from datetime instances (GH-21633)</title>
<updated>2020-09-23T18:43:45Z</updated>
<author>
<name>Zackery Spytz</name>
<email>zspytz@gmail.com</email>
</author>
<published>2020-09-23T18:43:45Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=2e4dd336e5b50fd30947fdecb605ddcd71f7f6f5'/>
<id>urn:sha1:2e4dd336e5b50fd30947fdecb605ddcd71f7f6f5</id>
<content type='text'>
Add PyDateTime_DATE_GET_TZINFO() and PyDateTime_TIME_GET_TZINFO()
macros.</content>
</entry>
<entry>
<title>bpo-40989: PyObject_INIT() becomes an alias to PyObject_Init() (GH-20901)</title>
<updated>2020-06-15T23:28:07Z</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@python.org</email>
</author>
<published>2020-06-15T23:28:07Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=04fc4f2a46b2fd083639deb872c3a3037fdb47d6'/>
<id>urn:sha1:04fc4f2a46b2fd083639deb872c3a3037fdb47d6</id>
<content type='text'>
The PyObject_INIT() and PyObject_INIT_VAR() macros become aliases to,
respectively, PyObject_Init() and PyObject_InitVar() functions.

Rename _PyObject_INIT() and _PyObject_INIT_VAR() static inline
functions to, respectively, _PyObject_Init() and _PyObject_InitVar(),
and move them to pycore_object.h. Remove their return value:
their return type becomes void.

The _datetime module is now built with the Py_BUILD_CORE_MODULE macro
defined.

Remove an outdated comment on _Py_tracemalloc_config.</content>
</entry>
<entry>
<title>bpo-40777: Initialize PyDateTime_IsoCalendarDateType.tp_base at run-time (GH-20493)</title>
<updated>2020-05-28T16:14:46Z</updated>
<author>
<name>Petr Viktorin</name>
<email>encukou@gmail.com</email>
</author>
<published>2020-05-28T16:14:46Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=459acc551656785bc4a3363d65c7a60f822da8e3'/>
<id>urn:sha1:459acc551656785bc4a3363d65c7a60f822da8e3</id>
<content type='text'>
Recent changes to _datetimemodule broke compilation on mingw; see the comments in this change for details.

FWIW, @corona10: this issue is why `PyType_FromModuleAndSpec` &amp; friends take the `bases` argument at run time.</content>
</entry>
</feed>
