bpo-36779: time.tzname returns empty string on Windows if default cod…#13073
bpo-36779: time.tzname returns empty string on Windows if default cod…#13073miss-islington merged 5 commits into
Conversation
…epage is a Unicode codepage
|
This workaround enables time.tzname to work on Windows ARM32. |
Sorry, something went wrong.
|
Hi @paulmon I have edited the PR because that was the wrong BPO issue. Also, I have added this PR to the right bpo issue and removed it from the other one. |
Sorry, something went wrong.
|
Thank you! |
Sorry, something went wrong.
|
Definitely needs the tabs converted to spaces, and I wonder if there's a better (Windows-specific) way to get this value without changing the locale? If we're going to have an ifdef, we may as well use the proper APIs, provided the values come back the same (I have no idea what values to expect here). @pganssle may also have an opinion. Or perhaps not :) |
Sorry, something went wrong.
|
I'll try to get the timezone name without changing the locale. |
Sorry, something went wrong.
|
Regardless of the resolution, I think this needs a test. What is this supposed to return on Windows? What does it return with the workaround? I think you can definitely get the time zone and alt zone names without changing the locale. One way to get it is from the registry, which is how we do it in There may be a more convenient way as well. |
Sorry, something went wrong.
|
This is the fix for a failing test. It's supposed to return 'UTC-08:00' and it returns an empty string. FAIL: test_strptime (test.datetimetester.TestSubclassDateTime_Fast) Traceback (most recent call last): |
Sorry, something went wrong.
This is very confusing to me. This is the relevant test, and it seems like what it's doing is creating three strings: You can see what it's testing by running this script: import time
from datetime import datetime
for tzseconds, tzname in ((0, 'UTC'), (0, 'GMT'),
(-time.timezone, time.tzname[0])):
print("-----")
print(f"tzseconds: {tzseconds}; tzname: {tzname}")
if tzseconds < 0:
sign = '-'
seconds = -tzseconds
else:
sign ='+'
seconds = tzseconds
hours, minutes = divmod(seconds//60, 60)
dtstr = "{}{:02d}{:02d} {}".format(sign, hours, minutes, tzname)
print(dtstr)On my system, this returns: I am not sure where |
Sorry, something went wrong.
|
On Windows IoT Core on my dev machine (Windows 10 Enterprise) |
Sorry, something went wrong.
|
UTC-0800 is my local time zone This returns I tracked this this down to a bug in tzset() that sets _tzname[0] and _tzname[1] to empty strings when the default ANSI code page is set to CP_UTF8, or CP_UTF7. For more on the default ANSI code page see , see GetACP( ) The default ANSI code page on most Windows installs is not CP_UTF7, or CP_UTF8. On my dev machine for example it is 1252 (Code Page Identifiers). On Windows IoT Core the default ANSI code page is 65001 or CP_UTF8. So in line 2511 of datetimetester.py _time.tzname[0] is empty causing the test to fail. Another way to check what the default ANSI codepage on your system is to run this command |
Sorry, something went wrong.
I think it doesn't raise an exception because it's valid to use "" as parameter to a format string. |
Sorry, something went wrong.
This is what I expected, but I don't understand why the test was working in the first place, on Linux: >>> datetime.strptime("-0800 ", '%z %Z')
...
ValueError: time data '-0800 ' does not match format '%z %Z'
>>> datetime.strptime("-0800 Pacific Standard Time", "%z %Z")
...
ValueError: time data '-0800 Pacific Standard Time' does not match format '%z %Z'Is allowing empty format specifiers a Windows-specific thing? @paulmon If the two commands above don't fail for you, what do they return? What is |
Sorry, something went wrong.
|
Closing and re-opening to force azure pipelines to run again. |
Sorry, something went wrong.
There seems to be a connection between the value of time.tzname and the results of those two commands. Without the current GetTimeZoneInformation fix With the GetTimeZoneInformation fix |
Sorry, something went wrong.
|
The PR has been updated so that it doesn't change locale. |
Sorry, something went wrong.
|
@paulmon I think this one deserves a NEWS item - could you add it? |
Sorry, something went wrong.
|
Thanks @paulmon for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
Sorry, something went wrong.
GH-13073) (GH-14032) 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 b4c7def) Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
|
Thanks @paulmon for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7. |
Sorry, something went wrong.
pythonGH-13073) 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 b4c7def) Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
GH-13073) 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 b4c7def) Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
|
@paulmon Hey sorry I never followed up on this - this is belated, but for the record I agree with this change. Thank you for for doing this - particularly because I learned something new about how |
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 Debian root 3.8 has failed when building commit 0a9baec. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/211/builds/47 Click to see traceback logsReset branch '3.8'
libpython3.8d.a(bytesobject.o): In function `_Py_NewReference':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
libpython3.8d.a(exceptions.o): In function `_Py_NewReference':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
libpython3.8d.a(floatobject.o):/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: more undefined references to `_PyTraceMalloc_NewReference' follow
libpython3.8d.a(object.o): In function `_PyObject_AssertFailed':
/root/buildarea/3.8.angelico-debian-amd64/build/Objects/object.c:2190: undefined reference to `_PyMem_DumpTraceback'
libpython3.8d.a(object.o): In function `_Py_NewReference':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
libpython3.8d.a(obmalloc.o): In function `_PyObject_DebugDumpAddress':
/root/buildarea/3.8.angelico-debian-amd64/build/Objects/obmalloc.c:2507: undefined reference to `_PyMem_DumpTraceback'
libpython3.8d.a(sliceobject.o): In function `_Py_NewReference':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
libpython3.8d.a(tupleobject.o): In function `_Py_NewReference':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
libpython3.8d.a(typeobject.o): In function `_Py_NewReference':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
libpython3.8d.a(unicodeobject.o):/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: more undefined references to `_PyTraceMalloc_NewReference' follow
libpython3.8d.a(import.o): In function `find_frozen':
/root/buildarea/3.8.angelico-debian-amd64/build/Python/import.c:1268: undefined reference to `PyImport_FrozenModules'
libpython3.8d.a(marshal.o): In function `w_init_refs':
/root/buildarea/3.8.angelico-debian-amd64/build/Python/marshal.c:572: undefined reference to `_Py_hashtable_compare_direct'
/root/buildarea/3.8.angelico-debian-amd64/build/Python/marshal.c:572: undefined reference to `_Py_hashtable_hash_ptr'
/root/buildarea/3.8.angelico-debian-amd64/build/Python/marshal.c:572: undefined reference to `_Py_hashtable_new'
libpython3.8d.a(marshal.o): In function `w_clear_refs':
/root/buildarea/3.8.angelico-debian-amd64/build/Python/marshal.c:598: undefined reference to `_Py_hashtable_foreach'
/root/buildarea/3.8.angelico-debian-amd64/build/Python/marshal.c:599: undefined reference to `_Py_hashtable_destroy'
libpython3.8d.a(marshal.o): In function `w_ref':
/root/buildarea/3.8.angelico-debian-amd64/build/Python/marshal.c:308: undefined reference to `_Py_hashtable_get_entry'
/root/buildarea/3.8.angelico-debian-amd64/build/Python/marshal.c:326: undefined reference to `_Py_hashtable_set'
libpython3.8d.a(pylifecycle.o): In function `fatal_error':
/root/buildarea/3.8.angelico-debian-amd64/build/Python/pylifecycle.c:2123: undefined reference to `_PyFaulthandler_Fini'
libpython3.8d.a(pylifecycle.o): In function `Py_FinalizeEx':
/root/buildarea/3.8.angelico-debian-amd64/build/Python/pylifecycle.c:1257: undefined reference to `_PyTraceMalloc_Fini'
/root/buildarea/3.8.angelico-debian-amd64/build/Python/pylifecycle.c:1266: undefined reference to `_PyFaulthandler_Fini'
libpython3.8d.a(pylifecycle.o): In function `pyinit_main':
/root/buildarea/3.8.angelico-debian-amd64/build/Python/pylifecycle.c:932: undefined reference to `_PyFaulthandler_Init'
/root/buildarea/3.8.angelico-debian-amd64/build/Python/pylifecycle.c:949: undefined reference to `_PyTraceMalloc_Init'
libpython3.8d.a(config.o):(.data+0x128): undefined reference to `PyInit_faulthandler'
libpython3.8d.a(config.o):(.data+0x138): undefined reference to `PyInit__tracemalloc'
libpython3.8d.a(config.o):(.data+0x148): undefined reference to `PyInit__symtable'
libpython3.8d.a(config.o):(.data+0x158): undefined reference to `PyInit_xxsubtype'
libpython3.8d.a(gcmodule.o): In function `_Py_NewReference':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
libpython3.8d.a(_iomodule.o): In function `_io_open_impl':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:386: undefined reference to `PyFileIO_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:452: undefined reference to `PyBufferedRandom_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:454: undefined reference to `PyBufferedWriter_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:456: undefined reference to `PyBufferedReader_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:478: undefined reference to `PyTextIOWrapper_Type'
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:713: undefined reference to `PyBufferedIOBase_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_INCREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:459: undefined reference to `PyBufferedIOBase_Type'
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:713: undefined reference to `PyBufferedIOBase_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_DECREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyBufferedIOBase_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyBufferedIOBase_Type'
libpython3.8d.a(_iomodule.o):/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:473: more undefined references to `PyBufferedIOBase_Type' follow
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:714: undefined reference to `PyTextIOBase_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_INCREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:459: undefined reference to `PyTextIOBase_Type'
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:714: undefined reference to `PyTextIOBase_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_DECREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyTextIOBase_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyTextIOBase_Type'
libpython3.8d.a(_iomodule.o):/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:473: more undefined references to `PyTextIOBase_Type' follow
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:718: undefined reference to `PyFileIO_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:719: undefined reference to `PyFileIO_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_INCREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:459: undefined reference to `PyFileIO_Type'
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:719: undefined reference to `PyFileIO_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_DECREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyFileIO_Type'
libpython3.8d.a(_iomodule.o):/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: more undefined references to `PyFileIO_Type' follow
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:722: undefined reference to `PyBytesIO_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:722: undefined reference to `PyBufferedIOBase_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:723: undefined reference to `PyBytesIO_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_INCREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:459: undefined reference to `PyBytesIO_Type'
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:723: undefined reference to `PyBytesIO_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_DECREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyBytesIO_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyBytesIO_Type'
libpython3.8d.a(_iomodule.o):/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:473: more undefined references to `PyBytesIO_Type' follow
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:724: undefined reference to `_PyBytesIOBuffer_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:728: undefined reference to `PyStringIO_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:728: undefined reference to `PyTextIOBase_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:729: undefined reference to `PyStringIO_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_INCREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:459: undefined reference to `PyStringIO_Type'
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:729: undefined reference to `PyStringIO_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_DECREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyStringIO_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyStringIO_Type'
libpython3.8d.a(_iomodule.o):/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:473: more undefined references to `PyStringIO_Type' follow
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:738: undefined reference to `PyBufferedReader_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:738: undefined reference to `PyBufferedIOBase_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:739: undefined reference to `PyBufferedReader_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_INCREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:459: undefined reference to `PyBufferedReader_Type'
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:739: undefined reference to `PyBufferedReader_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_DECREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyBufferedReader_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyBufferedReader_Type'
libpython3.8d.a(_iomodule.o):/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:473: more undefined references to `PyBufferedReader_Type' follow
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:742: undefined reference to `PyBufferedWriter_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:742: undefined reference to `PyBufferedIOBase_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:743: undefined reference to `PyBufferedWriter_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_INCREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:459: undefined reference to `PyBufferedWriter_Type'
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:743: undefined reference to `PyBufferedWriter_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_DECREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyBufferedWriter_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyBufferedWriter_Type'
libpython3.8d.a(_iomodule.o):/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:473: more undefined references to `PyBufferedWriter_Type' follow
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:746: undefined reference to `PyBufferedRWPair_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:746: undefined reference to `PyBufferedIOBase_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:747: undefined reference to `PyBufferedRWPair_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_INCREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:459: undefined reference to `PyBufferedRWPair_Type'
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:747: undefined reference to `PyBufferedRWPair_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_DECREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyBufferedRWPair_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyBufferedRWPair_Type'
libpython3.8d.a(_iomodule.o):/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:473: more undefined references to `PyBufferedRWPair_Type' follow
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:750: undefined reference to `PyBufferedRandom_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:750: undefined reference to `PyBufferedIOBase_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:751: undefined reference to `PyBufferedRandom_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_INCREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:459: undefined reference to `PyBufferedRandom_Type'
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:751: undefined reference to `PyBufferedRandom_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_DECREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyBufferedRandom_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyBufferedRandom_Type'
libpython3.8d.a(_iomodule.o):/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:473: more undefined references to `PyBufferedRandom_Type' follow
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:754: undefined reference to `PyTextIOWrapper_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:754: undefined reference to `PyTextIOBase_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:755: undefined reference to `PyTextIOWrapper_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_INCREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:459: undefined reference to `PyTextIOWrapper_Type'
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:755: undefined reference to `PyTextIOWrapper_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_DECREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyTextIOWrapper_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:470: undefined reference to `PyTextIOWrapper_Type'
libpython3.8d.a(_iomodule.o):/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:473: more undefined references to `PyTextIOWrapper_Type' follow
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:758: undefined reference to `PyIncrementalNewlineDecoder_Type'
libpython3.8d.a(_iomodule.o): In function `_Py_INCREF':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:459: undefined reference to `PyIncrementalNewlineDecoder_Type'
libpython3.8d.a(_iomodule.o): In function `PyInit__io':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:758: undefined reference to `PyIncrementalNewlineDecoder_Type'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/_iomodule.c:758: undefined reference to `PyIncrementalNewlineDecoder_Type'
libpython3.8d.a(iobase.o): In function `_io__RawIOBase_readall_impl':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/iobase.c:975: undefined reference to `_PyIO_trap_eintr'
libpython3.8d.a(iobase.o): In function `_io__IOBase_writelines':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/iobase.c:788: undefined reference to `_PyIO_trap_eintr'
libpython3.8d.a(iobase.o): In function `_io__IOBase_readline_impl':
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/iobase.c:564: undefined reference to `_PyIO_trap_eintr'
/root/buildarea/3.8.angelico-debian-amd64/build/./Modules/_io/iobase.c:604: undefined reference to `_PyIO_trap_eintr'
libpython3.8d.a(classobject.o): In function `_Py_NewReference':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
libpython3.8d.a(complexobject.o): In function `_Py_NewReference':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
libpython3.8d.a(genobject.o): In function `_Py_NewReference':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
libpython3.8d.a(context.o): In function `_Py_NewReference':
/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: undefined reference to `_PyTraceMalloc_NewReference'
libpython3.8d.a(context.o):/root/buildarea/3.8.angelico-debian-amd64/build/./Include/object.h:439: more undefined references to `_PyTraceMalloc_NewReference' follow
collect2: error: ld returned 1 exit status
make: *** [python] Error 1 |
Sorry, something went wrong.
It looks like a different commit caused this buildbot failure. The only file changed in this commit is timemodule.c, and the build failures are all in _iomodule.c |
Sorry, something went wrong.
|
Welcome to the exciting universe of buildbots! |
Sorry, something went wrong.
pythonGH-13073) 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
pythonGH-13073) 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
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