<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython-git.git/Modules/timemodule.c, branch fix-misc-acks</title>
<subtitle>github.com: python/cpython.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/'/>
<entry>
<title>bpo-36205: Fix the rusage implementation of time.process_time() (GH-15538)</title>
<updated>2019-08-27T04:31:27+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2019-08-27T04:31:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=1bf672f53a83c471e6fc4599d2d5149fd6842ff2'/>
<id>1bf672f53a83c471e6fc4599d2d5149fd6842ff2</id>
<content type='text'>
(cherry picked from commit 8bf5fef8737fdd12724b9340d76a4ed391c4ad8a)

Co-authored-by: vrajivk &lt;3413293+vrajivk@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 8bf5fef8737fdd12724b9340d76a4ed391c4ad8a)

Co-authored-by: vrajivk &lt;3413293+vrajivk@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-36779: time.tzname returns empty string on Windows if default cod… (GH-13073)</title>
<updated>2019-06-13T13:42:46+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2019-06-13T13:42:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=6a433f5ae63de72a85d20b05ff826c6f72d529b7'/>
<id>6a433f5ae63de72a85d20b05ff826c6f72d529b7</id>
<content type='text'>
Calling setlocale(LC_CTYPE, "") on a system where GetACP() returns CP_UTF8 results in empty strings in _tzname[].

This causes time.tzname to be an empty string.
I have reported the bug to the UCRT team and will follow up, but it will take some time get a fix into production.

In the meantime one possible workaround is to temporarily change the locale by calling setlocale(LC_CTYPE, "C") before calling _tzset and restore the current locale after if the GetACP() == CP_UTF8 or CP_UTF7

@zooba

https://bugs.python.org/issue36779
(cherry picked from commit b4c7defe58695a6670a8fdeaef67a638bbb47e42)

Co-authored-by: Paul Monson &lt;paulmon@users.noreply.github.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Calling setlocale(LC_CTYPE, "") on a system where GetACP() returns CP_UTF8 results in empty strings in _tzname[].

This causes time.tzname to be an empty string.
I have reported the bug to the UCRT team and will follow up, but it will take some time get a fix into production.

In the meantime one possible workaround is to temporarily change the locale by calling setlocale(LC_CTYPE, "C") before calling _tzset and restore the current locale after if the GetACP() == CP_UTF8 or CP_UTF7

@zooba

https://bugs.python.org/issue36779
(cherry picked from commit b4c7defe58695a6670a8fdeaef67a638bbb47e42)

Co-authored-by: Paul Monson &lt;paulmon@users.noreply.github.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-24643: Fix "GH-define timezone _timezone" clashes on Windows (GH-12019)</title>
<updated>2019-02-26T00:15:04+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2019-02-26T00:15:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=0b3019a02e60171e9b7edb261e1234109001819c'/>
<id>0b3019a02e60171e9b7edb261e1234109001819c</id>
<content type='text'>
(cherry picked from commit 6673decfa0fb078f60587f5cb5e98460eea137c2)

Co-authored-by: Zackery Spytz &lt;zspytz@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 6673decfa0fb078f60587f5cb5e98460eea137c2)

Co-authored-by: Zackery Spytz &lt;zspytz@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35550: Fix incorrect Solaris define guards (GH-11275)</title>
<updated>2018-12-31T02:39:00+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2018-12-31T02:39:00+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=d82344378ad8e471b8ed12fb99807f68351c5412'/>
<id>d82344378ad8e471b8ed12fb99807f68351c5412</id>
<content type='text'>
Python source code uses on several places ifdef sun or defined(sun) without the underscores, which is not standard compliant and shouldn't be used.

Defines should check for __sun instead. Reference: http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_systemGH-Solaris

https://bugs.python.org/issue35550
(cherry picked from commit 6f9bc72c79c3262e5d0f2c0e96b016477399cfb1)

Co-authored-by: Jakub Kulík &lt;Kulikjak@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Python source code uses on several places ifdef sun or defined(sun) without the underscores, which is not standard compliant and shouldn't be used.

Defines should check for __sun instead. Reference: http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_systemGH-Solaris

https://bugs.python.org/issue35550
(cherry picked from commit 6f9bc72c79c3262e5d0f2c0e96b016477399cfb1)

Co-authored-by: Jakub Kulík &lt;Kulikjak@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-35214: MSan workarounds for socket, time, and test_faulthandler. (GH-11375) (GH-11378)</title>
<updated>2018-12-31T01:59:19+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2018-12-31T01:59:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=01b9664740307b39c2907bd84cbb0b2c35be9df4'/>
<id>01b9664740307b39c2907bd84cbb0b2c35be9df4</id>
<content type='text'>
Add Clang Memory Sanitizer build instrumentation to work around
false positives from the socket and time modules as well as skipping
a couple test_faulthandler tests.
(cherry picked from commit b474e6774d60fa67d5373e361a0ed53c18b24f53)

Co-authored-by: Gregory P. Smith &lt;greg@krypto.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add Clang Memory Sanitizer build instrumentation to work around
false positives from the socket and time modules as well as skipping
a couple test_faulthandler tests.
(cherry picked from commit b474e6774d60fa67d5373e361a0ed53c18b24f53)

Co-authored-by: Gregory P. Smith &lt;greg@krypto.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[3.7] bpo-35373: Fix PyInit_timezone() error handling (GH-10864)</title>
<updated>2018-12-03T23:09:02+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-12-03T23:09:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=5eb78c75128187a36d8e983027632fa51cc2ff4d'/>
<id>5eb78c75128187a36d8e983027632fa51cc2ff4d</id>
<content type='text'>
* bpo-35373: Fix PyInit_timezone() error handling

PyInit_timezone() now returns -1 at exit if an exception is raised.
Check also explicitly PyUnicode_DecodeLocale() and Py_BuildValue()
errors.

* bpo-35373: Fix PyInit_time() error handling (GH-10865)

* PyInit_time() now returns NULL if an exception is raised.
* Rename PyInit_timezone() to init_timezone(). "PyInit_" prefix is
  a special prefix for function initializing a module.
  init_timezone() doesn't initialize a module and the function is not
  exported.

(cherry picked from commit 3bb150d8148e3cc08418077a58f43e064b9fde61)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* bpo-35373: Fix PyInit_timezone() error handling

PyInit_timezone() now returns -1 at exit if an exception is raised.
Check also explicitly PyUnicode_DecodeLocale() and Py_BuildValue()
errors.

* bpo-35373: Fix PyInit_time() error handling (GH-10865)

* PyInit_time() now returns NULL if an exception is raised.
* Rename PyInit_timezone() to init_timezone(). "PyInit_" prefix is
  a special prefix for function initializing a module.
  init_timezone() doesn't initialize a module and the function is not
  exported.

(cherry picked from commit 3bb150d8148e3cc08418077a58f43e064b9fde61)
</pre>
</div>
</content>
</entry>
<entry>
<title>get_gmtoff() now returns time_t (GH-10838) (GH-10839)</title>
<updated>2018-12-01T00:24:21+00:00</updated>
<author>
<name>Victor Stinner</name>
<email>vstinner@redhat.com</email>
</author>
<published>2018-12-01T00:24:21+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=38c06d9193b874fd440a874bf34227d837cb49c0'/>
<id>38c06d9193b874fd440a874bf34227d837cb49c0</id>
<content type='text'>
get_gmtoff() now returns time_t instead of int to fix the following
Visual Studio warning:

    Modules\timemodule.c(1183): warning C4244: 'return':
    conversion from 'time_t' to 'int', possible loss of data

(cherry picked from commit 503ce5c482cb267b0770bc46c315d5cf822bdca9)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
get_gmtoff() now returns time_t instead of int to fix the following
Visual Studio warning:

    Modules\timemodule.c(1183): warning C4244: 'return':
    conversion from 'time_t' to 'int', possible loss of data

(cherry picked from commit 503ce5c482cb267b0770bc46c315d5cf822bdca9)</pre>
</div>
</content>
</entry>
<entry>
<title>closes bpo-35025: Properly guard the `CLOCK_GETTIME` et al macros in timemodule.c. (GH-9961)</title>
<updated>2018-10-21T00:41:38+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2018-10-21T00:41:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=002aef3f66a9f8da635e20860622f2e539a0b611'/>
<id>002aef3f66a9f8da635e20860622f2e539a0b611</id>
<content type='text'>
Guard the `CLOCK_GETTIME` et al macros in `timemodule` based on the availability of the parent functions
(cherry picked from commit 94451182ccd6729c11338926d8a3d11645e86626)

Co-authored-by: Max Bélanger &lt;aeromax@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Guard the `CLOCK_GETTIME` et al macros in `timemodule` based on the availability of the parent functions
(cherry picked from commit 94451182ccd6729c11338926d8a3d11645e86626)

Co-authored-by: Max Bélanger &lt;aeromax@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-34735: Fix a memory leak in Modules/timemodule.c (GH-9418)</title>
<updated>2018-09-21T07:41:50+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2018-09-21T07:41:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=975f3cb1f25406a9be019906227d53b23852f415'/>
<id>975f3cb1f25406a9be019906227d53b23852f415</id>
<content type='text'>
There was a missing PyMem_Free(format) in time_strftime().
(cherry picked from commit 91e6c8717b7dcbcc46b189509de5f2d335819f37)

Co-authored-by: Zackery Spytz &lt;zspytz@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There was a missing PyMem_Free(format) in time_strftime().
(cherry picked from commit 91e6c8717b7dcbcc46b189509de5f2d335819f37)

Co-authored-by: Zackery Spytz &lt;zspytz@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>bpo-13312: Avoid int underflow in time year. (GH-8912)</title>
<updated>2018-08-25T05:53:00+00:00</updated>
<author>
<name>Miss Islington (bot)</name>
<email>31488909+miss-islington@users.noreply.github.com</email>
</author>
<published>2018-08-25T05:53:00+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/cpython-git.git/commit/?id=d5f017bbd65f37ac53fd3c6c439a53155eef2475'/>
<id>d5f017bbd65f37ac53fd3c6c439a53155eef2475</id>
<content type='text'>
Avoids an integer underflow in the time module's year handling code.
(cherry picked from commit 76be0fffff8b7dbe649ad4821144461800ffb0d0)

Co-authored-by: Gregory P. Smith &lt;greg@krypto.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Avoids an integer underflow in the time module's year handling code.
(cherry picked from commit 76be0fffff8b7dbe649ad4821144461800ffb0d0)

Co-authored-by: Gregory P. Smith &lt;greg@krypto.org&gt;</pre>
</div>
</content>
</entry>
</feed>
