From report at bugs.python.org Sat Jul 1 13:42:59 2017 From: report at bugs.python.org (morris wang) Date: Sat, 01 Jul 2017 17:42:59 +0000 Subject: [New-bugs-announce] [issue30823] os.startfile("") craches Python 2.7, 3.4, 3.5 Message-ID: <1498930979.02.0.689634433232.issue30823@psf.upfronthosting.co.za> New submission from morris wang: try... except... won't catch it. import os try: os.startfile("") except: pass crashes python, resulting in error message "python has stopped working" ---------- messages: 297487 nosy: morris wang priority: normal severity: normal status: open title: os.startfile("") craches Python 2.7, 3.4, 3.5 type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 15:31:36 2017 From: report at bugs.python.org (Pierre Quentel) Date: Sat, 01 Jul 2017 19:31:36 +0000 Subject: [New-bugs-announce] [issue30824] Add mimetype for extension .json Message-ID: <1498937496.5.0.283718177471.issue30824@psf.upfronthosting.co.za> New submission from Pierre Quentel: I propose to add a mapping of file extension .json to mime type "application/json". This is registered in https://www.iana.org/assignments/media-types ---------- components: Library (Lib) messages: 297494 nosy: quentel, r.david.murray priority: normal severity: normal status: open title: Add mimetype for extension .json type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 1 17:23:44 2017 From: report at bugs.python.org (Max Vorobev) Date: Sat, 01 Jul 2017 21:23:44 +0000 Subject: [New-bugs-announce] [issue30825] csv.Sniffer does not detect lineterminator Message-ID: <1498944224.71.0.636990812421.issue30825@psf.upfronthosting.co.za> New submission from Max Vorobev: Line terminator defaults to '\r\n' while detecting dialect in csv.Sniffer ---------- components: Library (Lib) messages: 297497 nosy: Max Vorobev priority: normal severity: normal status: open title: csv.Sniffer does not detect lineterminator type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 00:19:59 2017 From: report at bugs.python.org (Anmol Gupta) Date: Sun, 02 Jul 2017 04:19:59 +0000 Subject: [New-bugs-announce] [issue30826] More details in reference 'Looping through a list in Python and modifying it' Message-ID: <1498969199.07.0.0494223329583.issue30826@psf.upfronthosting.co.za> Changes by Anmol Gupta : ---------- assignee: docs at python components: Documentation nosy: Anmol Gupta, docs at python priority: normal severity: normal status: open title: More details in reference 'Looping through a list in Python and modifying it' type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 05:50:54 2017 From: report at bugs.python.org (Sarge Borsch) Date: Sun, 02 Jul 2017 09:50:54 +0000 Subject: [New-bugs-announce] [issue30827] Tweak order of links in https://www.python.org/downloads/source/ Message-ID: <1498989054.7.0.635942220914.issue30827@psf.upfronthosting.co.za> New submission from Sarge Borsch: Right now, there are these links in https://www.python.org/downloads/source/: Latest Python 2 Release - Python 2.7.13 Latest Python 3 Release - Python 3.6.1 Python 3 should be the first, because it's the real Python now, and Python 2 is deprecated and legacy. ---------- assignee: docs at python components: Documentation, Installation messages: 297510 nosy: Sarge Borsch, docs at python priority: normal severity: normal status: open title: Tweak order of links in https://www.python.org/downloads/source/ type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 08:24:37 2017 From: report at bugs.python.org (Ned Williamson) Date: Sun, 02 Jul 2017 12:24:37 +0000 Subject: [New-bugs-announce] [issue30828] Out of bounds write in _asyncio_Future_remove_done_callback Message-ID: <1498998277.02.0.104703912354.issue30828@psf.upfronthosting.co.za> New submission from Ned Williamson: This is very similar to the issue reported in https://bugs.python.org/issue28963 - this function is still buggy when items are pushed onto the done callbacks, as the new list is assumed to be large enough. The issue was pointed out on the code review page here: http://www.psf.upfronthosting.co.za/review/28963/ but it seems it was missed. ``` import asyncio fut = asyncio.Future() fut.add_done_callback(str) for _ in range(63): fut.add_done_callback(id) class evil: def __eq__(self, other): fut.add_done_callback(id) return False fut.remove_done_callback(evil()) ``` This testcase leads to a crash due to the out of bounds access: ``` ASAN:DEADLYSIGNAL ================================================================= ==21457==ERROR: AddressSanitizer: SEGV on unknown address 0x00010f99fc90 (pc 0x00010f99fc90 bp 0x7fff53c18f70 sp 0x7fff53c18eb8 T0) #0 0x10f99fc8f () #1 0x10c2675cb in _PyEval_EvalFrameDefault ceval.c:2330 #2 0x10c03f19f in function_code_fastcall call.c:282 #3 0x10c03cf2f in _PyFunction_FastCallDict call.c:328 #4 0x10c040acf in _PyObject_FastCall_Prepend call.c:844 #5 0x10c12de9c in slot_tp_richcompare typeobject.c:1473 #6 0x10c0edc46 in PyObject_RichCompare object.c:671 #7 0x10c0ee101 in PyObject_RichCompareBool object.c:741 #8 0x1100dc593 in _asyncio_Future_remove_done_callback _asynciomodule.c:531 #9 0x10c0403e3 in _PyMethodDef_RawFastCallKeywords call.c:630 #10 0x10c04f659 in _PyMethodDescr_FastCallKeywords descrobject.c:287 #11 0x10c27f77f in call_function ceval.c:4854 #12 0x10c26b0e8 in _PyEval_EvalFrameDefault ceval.c:3336 #13 0x10c281b6b in _PyEval_EvalCodeWithName ceval.c:678 #14 0x10c264603 in PyEval_EvalCode ceval.c:4221 #15 0x10c3175f7 in PyRun_FileExFlags pythonrun.c:982 #16 0x10c315cc0 in PyRun_SimpleFileExFlags pythonrun.c:398 #17 0x10c3622b5 in Py_Main main.c:341 #18 0x10bfe6a60 in main python.c:102 #19 0x7fff96740234 in start (libdyld.dylib+0x5234) ``` In order to fix this, I recommend just banning returning an error when the user attempts to append to the done callbacks while removing one. See the attached patch (may need fixing for style/consistency with error messages). ---------- components: asyncio files: fix.patch keywords: patch messages: 297513 nosy: Ned Williamson, yselivanov priority: normal severity: normal status: open title: Out of bounds write in _asyncio_Future_remove_done_callback type: crash versions: Python 3.7 Added file: http://bugs.python.org/file46987/fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 2 19:23:29 2017 From: report at bugs.python.org (Anderson) Date: Sun, 02 Jul 2017 23:23:29 +0000 Subject: [New-bugs-announce] [issue30829] 'Cannot serialize socket object' after ssl_wrap Message-ID: <1499037809.64.0.235569319557.issue30829@psf.upfronthosting.co.za> New submission from Anderson: --------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python3.6/socketserver.py", line 317, in _handle_request_noblock self.process_request(request, client_address) File "/opt/storage_server/server_tcp.py", line 121, in process_request self.pipes[self.proc_turn][1].send((request, client_address)) File "/usr/local/lib/python3.6/multiprocessing/connection.py", line 206, in send self._send_bytes(_ForkingPickler.dumps(obj)) File "/usr/local/lib/python3.6/multiprocessing/reduction.py", line 51, in dumps cls(buf, protocol).dump(obj) File "/usr/local/lib/python3.6/socket.py", line 185, in __getstate__ raise TypeError("Cannot serialize socket object") TypeError: Cannot serialize socket object --------------------------------------- I am trying to send a ssl wrapped socket object (server side) into a pipe to another process using multiprocessing. Btw, without ssl_wrap it works. Basically this: newsocket, fromaddr = self.socket.accept() connstream = ssl.wrap_socket(newsocket, server_side=True, certfile=self.certfile, keyfile=self.keyfile) pipe = multiprocessing.Pipe() proc = multiprocessing.Process(target=proc_run, args=(pipe[0],), daemon=False) proc.start() #Error here pipe[1].send((connstream, fromaddr)) I am sorry if this is intentional. ---------- assignee: christian.heimes components: SSL messages: 297526 nosy: Anderseta, christian.heimes priority: normal severity: normal status: open title: 'Cannot serialize socket object' after ssl_wrap versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:09:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 08:09:05 +0000 Subject: [New-bugs-announce] [issue30830] HTTPHandlerTest of test_logging leaks a "dangling" thread Message-ID: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> New submission from STINNER Victor: test_output (test.test_logging.HTTPHandlerTest) ... ok Warning -- threading_cleanup() failed to cleanup -1 threads after 3 sec (count: 0, dangling: 1) See also the previous test_logging threads issue, bpo-30131. ---------- components: Tests keywords: buildbot messages: 297540 nosy: haypo, koobs priority: normal severity: normal status: open title: HTTPHandlerTest of test_logging leaks a "dangling" thread type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:13:39 2017 From: report at bugs.python.org (Daisuke Miyakawa) Date: Mon, 03 Jul 2017 08:13:39 +0000 Subject: [New-bugs-announce] [issue30831] Inconsistent or wrong documentation around Asynchronous Context Manager Message-ID: <1499069619.82.0.462830851571.issue30831@psf.upfronthosting.co.za> New submission from Daisuke Miyakawa: I was reading the following doc and got confused. https://docs.python.org/3.7/reference/datamodel.html#object.__aenter__ According to the API doc itself (and original PEP 492), __aenter__() "is semantically similar to the __enter__(), with only difference that it must return an awaitable." __aexit__() has similar sentence that confuses me too. PEP 492 also implies the (awaitable) object returned from obj.__aenter__() will be awaited immediately. In same manner, the (awaitable) object returned from obj.__aexit__() will be awaited too. (From PEP 492) > async with EXPR as VAR: > BLOCK > > which is semantically equivalent to: > > mgr = (EXPR) > aexit = type(mgr).__aexit__ > aenter = type(mgr).__aenter__(mgr) > exc = True > > VAR = await aenter > try: > BLOCK > except: > if not await aexit(mgr, *sys.exc_info()): > raise > else: > await aexit(mgr, None, None, None) On the other hand, actual CPython implementation won't do that; it won't await the returned objects. Moreover, the example shown in the API doc (AsyncContextManager) does NOT return awaitable as the doc itself suggests, but just await inside __aenter__() (and __aexit__()). > class AsyncContextManager: > async def __aenter__(self): > await log('entering context') > > async def __aexit__(self, exc_type, exc, tb): > await log('exiting context') I'm not sure which is true; the doc saying "__aenter__() must return awaitable" is just incorrect, or CPython implementation has a bug. Actual source implies former. _ContextManagerMixin in asyncio.locks does not return awaitable at all, for example. Anyway, I believe there are inconsistencies around here. ---------- assignee: docs at python components: Documentation messages: 297542 nosy: dmiyakawa, docs at python priority: normal severity: normal status: open title: Inconsistent or wrong documentation around Asynchronous Context Manager versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 04:23:53 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Mon, 03 Jul 2017 08:23:53 +0000 Subject: [New-bugs-announce] [issue30832] Remove own implementation for thread-local storage Message-ID: <1499070233.45.0.628514473579.issue30832@psf.upfronthosting.co.za> New submission from Masayuki Yamamoto: CPython has provided the own implementation for thread-local storage (TLS) on Python/thread.c, it's used in the case which a platform has not supplied native TLS. However, currently all supported platforms (NT and pthreads) have provided native TLS and defined the Py_HAVE_NATIVE_TLS macro with unconditional in any case. Therefore, I'd propose removing outdated code. python-dev: https://mail.python.org/pipermail/python-dev/2017-July/148534.html ---------- components: Interpreter Core messages: 297543 nosy: haypo, masamoto priority: normal severity: normal status: open title: Remove own implementation for thread-local storage type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:08:57 2017 From: report at bugs.python.org (d doe) Date: Mon, 03 Jul 2017 10:08:57 +0000 Subject: [New-bugs-announce] [issue30833] UnloadUserprofile displays the error "The handle is invalid" Message-ID: <1499076537.12.0.759755100608.issue30833@psf.upfronthosting.co.za> New submission from d doe: UnloadUserprofile displays the error "The handle is invalid" the second time it is called. The script in attachment gives reproduction steps. The issue have been found on Windows 2008r2, windows 2012r2. It exists with python 2.7 and python 3.7. (script done for 2.7) ---------- components: Windows files: issue.py messages: 297550 nosy: d doe, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: UnloadUserprofile displays the error "The handle is invalid" versions: Python 2.7, Python 3.7 Added file: http://bugs.python.org/file46988/issue.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 06:36:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 10:36:07 +0000 Subject: [New-bugs-announce] [issue30834] Warning -- files was modified by test_import, After: ['@test_4852_tmp.pyc'] Message-ID: <1499078167.36.0.142114160693.issue30834@psf.upfronthosting.co.za> New submission from STINNER Victor: Python 3.5 on Windows emits the following warning when running test_import, but I'm unable to reproduce it :-/ Warning -- files was modified by test_import Before: [] After: ['@test_4852_tmp.pyc'] ---------- components: Tests, Windows messages: 297552 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Warning -- files was modified by test_import, After: ['@test_4852_tmp.pyc'] versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:37:03 2017 From: report at bugs.python.org (Andrew Donnellan) Date: Mon, 03 Jul 2017 13:37:03 +0000 Subject: [New-bugs-announce] [issue30835] AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding Message-ID: <1499089023.06.0.76757916564.issue30835@psf.upfronthosting.co.za> New submission from Andrew Donnellan: Parsing an email containing a multipart Content-Type, along with a Content-Transfer-Encoding containing an invalid (non-ASCII-decodable) byte will fail. email.feedparser.FeedParser._parsegen() calls "self._cur.get('content-transfer-encoding', '8bit')" to get the header. It then tries to check whether the C-T-E is in the allowable set of ('7bit', '8bit', 'binary'), and to do so case-insensitively, it tries to convert the header to lowercase. However, because there's an invalid character in there, it's dealing with a Header object rather than a str. Hence it throws an AttributeError. Correct behaviour would be to convert the Header to a str, see that it's not valid, and continue on to handle the defect as usual. Thanks to Daniel Axtens for finding this bug as he was running the AFL fuzzer on the email parsing code in Patchwork (https://github.com/getpatchwork/patchwork). Pull request incoming. ---------- components: Library (Lib), email files: testprog.py messages: 297584 nosy: Andrew Donnellan, barry, r.david.murray priority: normal severity: normal status: open title: AttributeError when parsing multipart email with invalid non-decodable Content-Transfer-Encoding type: behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file46989/testprog.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 09:57:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 13:57:36 +0000 Subject: [New-bugs-announce] [issue30836] test_c_locale_coercion fails on AIX Message-ID: <1499090256.88.0.435528352442.issue30836@psf.upfronthosting.co.za> New submission from STINNER Victor: One example: http://buildbot.python.org/all/builders/PPC64%20AIX%203.x/builds/957/steps/test/logs/stdio 0:08:55 [ 91/406/2] test_c_locale_coercion failed -- running: test_importlib (41 sec) skipped 'No C-with-UTF-8 locale available' test_LC_ALL_set_to_C (test.test_c_locale_coercion.LocaleCoercionTests) ... test_PYTHONCOERCECLOCALE_not_zero (test.test_c_locale_coercion.LocaleCoercionTests) ... test_PYTHONCOERCECLOCALE_set_to_warn (test.test_c_locale_coercion.LocaleCoercionTests) ... test_PYTHONCOERCECLOCALE_set_to_zero (test.test_c_locale_coercion.LocaleCoercionTests) ... test_test_PYTHONCOERCECLOCALE_not_set (test.test_c_locale_coercion.LocaleCoercionTests) ... ====================================================================== FAIL: test_LC_ALL_set_to_C (test.test_c_locale_coercion.LocaleCoercionTests) (env_var='LANG', nominal_locale='', PYTHONCOERCECLOCALE=None) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_c_locale_coercion.py", line 309, in _check_c_locale_coercion coercion_expected) File "/home/shager/cpython-buildarea/3.x.edelsohn-aix-ppc64/build/Lib/test/test_c_locale_coercion.py", line 202, in _check_child_encoding_details self.assertEqual(encoding_details, expected_details) AssertionError: {'fsencoding': 'iso8859-1', 'stdin_info': 'iso8859-1:surr[140 chars] 'c'} != {'fsencoding': 'ascii', 'stdin_info': 'ascii:surrogateesc[124 chars] 'c'} - {'fsencoding': 'iso8859-1', ? ^^^^^^^^ + {'fsencoding': 'ascii', ? +++ ^ 'lang': '', 'lc_all': 'c', 'lc_ctype': '', - 'stderr_info': 'iso8859-1:backslashreplace', ? ^^^^^^^^ + 'stderr_info': 'ascii:backslashreplace', ? +++ ^ - 'stdin_info': 'iso8859-1:surrogateescape', ? ^^^^^^^^ + 'stdin_info': 'ascii:surrogateescape', ? +++ ^ - 'stdout_info': 'iso8859-1:surrogateescape'} ? ^^^^^^^^ + 'stdout_info': 'ascii:surrogateescape'} ? +++ ^ ---------- components: Tests messages: 297587 nosy: haypo, ncoghlan priority: normal severity: normal status: open title: test_c_locale_coercion fails on AIX versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 10:39:01 2017 From: report at bugs.python.org (Joshua) Date: Mon, 03 Jul 2017 14:39:01 +0000 Subject: [New-bugs-announce] [issue30837] Mac OS High Sierra Beta - Python Crash Message-ID: <1499092741.8.0.363302866556.issue30837@psf.upfronthosting.co.za> New submission from Joshua: Process: Python [13106] Path: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: 2.7.10 (2.7.10) Code Type: X86-64 (Native) Parent Process: Python [13070] Responsible: Python [13106] User ID: 501 Date/Time: 2017-07-03 10:28:23.591 -0400 OS Version: Mac OS X 10.13 (17A291m) Report Version: 12 Anonymous UUID: C76645A8-C44A-EAB5-D937-2BD69A20A0A9 Time Awake Since Boot: 18000 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: Namespace OBJC, Code 0x1 Application Specific Information: crashed on child side of fork pre-exec objc[13106]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fffbded33d6 __abort_with_payload + 10 1 libsystem_kernel.dylib 0x00007fffbdecdf71 abort_with_payload_wrapper_internal + 89 2 libsystem_kernel.dylib 0x00007fffbdecdf18 abort_with_reason + 22 3 libobjc.A.dylib 0x00007fffbd1a99f2 _objc_fatalv(unsigned long long, unsigned long long, char const*, __va_list_tag*) + 108 4 libobjc.A.dylib 0x00007fffbd1a98a4 _objc_fatal(char const*, ...) + 135 5 libobjc.A.dylib 0x00007fffbd1aa4cb performForkChildInitialize(objc_class*, objc_class*) + 341 6 libobjc.A.dylib 0x00007fffbd19ae8f lookUpImpOrForward + 228 7 libobjc.A.dylib 0x00007fffbd19a914 _objc_msgSend_uncached + 68 8 com.apple.CoreFoundation 0x00007fff96aa2a92 CFDateCreate + 34 9 com.apple.CoreFoundation 0x00007fff96aa0168 __CFBinaryPlistCreateObjectFiltered + 1608 10 com.apple.CoreFoundation 0x00007fff96aa1947 __CFBinaryPlistCreateObjectFiltered + 7719 11 com.apple.CoreFoundation 0x00007fff96a86b1b __CFTryParseBinaryPlist + 187 12 com.apple.CoreFoundation 0x00007fff96a864b1 _CFPropertyListCreateWithData + 97 13 com.apple.CoreFoundation 0x00007fff96a863a0 CFPropertyListCreateWithData + 80 14 com.apple.CoreFoundation 0x00007fff96a9f08b -[CFPrefsPlistSource handleReply:toRequestNewDataMessage:onConnection:retryCount:error:] + 683 15 com.apple.CoreFoundation 0x00007fff96a9edb3 __93-[CFPrefsSearchListSource handleReply:toRequestNewDataMessage:onConnection:retryCount:error:]_block_invoke + 147 16 libxpc.dylib 0x00007fffbe040d71 xpc_array_apply + 57 17 com.apple.CoreFoundation 0x00007fff96a9ecec -[CFPrefsSearchListSource handleReply:toRequestNewDataMessage:onConnection:retryCount:error:] + 300 18 com.apple.CoreFoundation 0x00007fff96c2644c __80-[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:]_block_invoke_3.139 + 76 19 com.apple.CoreFoundation 0x00007fff96c4d3e4 -[_CFXPreferences withConnectionForRole:performBlock:] + 36 20 com.apple.CoreFoundation 0x00007fff96c263f5 __80-[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:]_block_invoke_2.138 + 117 21 libsystem_trace.dylib 0x00007fffbe01f1ab _os_activity_initiate_impl + 53 22 com.apple.CoreFoundation 0x00007fff96c26352 __80-[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:]_block_invoke.136 + 114 23 com.apple.CoreFoundation 0x00007fff96c25c97 CFPREFERENCES_IS_WAITING_FOR_USER_CFPREFSD + 39 24 com.apple.CoreFoundation 0x00007fff96c25eec -[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:] + 348 25 com.apple.CoreFoundation 0x00007fff96a9d476 -[CFPrefsSearchListSource alreadylocked_copyDictionary] + 326 26 com.apple.CoreFoundation 0x00007fff96a9cff3 -[CFPrefsSearchListSource alreadylocked_copyValueForKey:] + 67 27 com.apple.CoreFoundation 0x00007fff96be1465 -[CFPrefsSource copyValueForKey:] + 53 28 com.apple.CoreFoundation 0x00007fff96c4c040 __76-[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:]_block_invoke + 32 29 com.apple.CoreFoundation 0x00007fff96c2730f __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 287 30 com.apple.CoreFoundation 0x00007fff96c27185 -[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 341 31 com.apple.CoreFoundation 0x00007fff96c4bfe3 -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 131 32 com.apple.SystemConfiguration 0x00007fffa3022745 SCDynamicStoreCopyProxiesWithOptions + 155 33 _scproxy.so 0x000000010503092a 0x105030000 + 2346 34 org.python.python 0x00007fffa1339280 PyEval_EvalFrameEx + 3676 35 org.python.python 0x00007fffa133e256 0x7fffa12b8000 + 549462 36 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 37 org.python.python 0x00007fffa133e256 0x7fffa12b8000 + 549462 38 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 39 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 40 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 41 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 42 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 43 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 44 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 45 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 46 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 47 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 48 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 49 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 50 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 51 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 52 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 53 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 54 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 55 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 56 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 57 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 58 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 59 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 60 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 61 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 62 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 63 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 64 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 65 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 66 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 67 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 68 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 69 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 70 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 71 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 72 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 73 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 74 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 75 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 76 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 77 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 78 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 79 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 80 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 81 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 82 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 83 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 84 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 85 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 86 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 87 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 88 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 89 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 90 org.python.python 0x00007fffa133e256 0x7fffa12b8000 + 549462 91 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 92 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 93 org.python.python 0x00007fffa12df935 0x7fffa12b8000 + 162101 94 org.python.python 0x00007fffa12c2581 PyObject_Call + 97 95 org.python.python 0x00007fffa12ccc9e 0x7fffa12b8000 + 85150 96 org.python.python 0x00007fffa12c2581 PyObject_Call + 97 97 org.python.python 0x00007fffa1307c78 0x7fffa12b8000 + 326776 98 org.python.python 0x00007fffa1303434 0x7fffa12b8000 + 308276 99 org.python.python 0x00007fffa12c2581 PyObject_Call + 97 100 org.python.python 0x00007fffa1338f76 PyEval_EvalFrameEx + 2898 101 org.python.python 0x00007fffa133e256 0x7fffa12b8000 + 549462 102 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 103 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 104 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 105 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 106 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 107 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 108 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 109 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 110 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 111 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 112 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 113 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 114 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 115 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 116 org.python.python 0x00007fffa133e2b4 0x7fffa12b8000 + 549556 117 org.python.python 0x00007fffa1338b45 PyEval_EvalFrameEx + 1825 118 org.python.python 0x00007fffa1338232 PyEval_EvalCodeEx + 1551 119 org.python.python 0x00007fffa1337c1d PyEval_EvalCode + 32 120 org.python.python 0x00007fffa1356ad1 0x7fffa12b8000 + 649937 121 org.python.python 0x00007fffa1356b78 PyRun_FileExFlags + 130 122 org.python.python 0x00007fffa13566fa PyRun_SimpleFileExFlags + 706 123 org.python.python 0x00007fffa136796c Py_Main + 3064 124 libdyld.dylib 0x00007fffbdd85ff9 start + 1 Thread 1: 0 libsystem_kernel.dylib 0x00007fffbded477a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fffbe00523e _pthread_wqthread + 995 2 libsystem_pthread.dylib 0x00007fffbe004e49 start_wqthread + 13 Thread 2: 0 libsystem_kernel.dylib 0x00007fffbded477a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fffbe005440 _pthread_wqthread + 1509 2 libsystem_pthread.dylib 0x00007fffbe004e49 start_wqthread + 13 Thread 3: 0 libsystem_kernel.dylib 0x00007fffbded477a __workq_kernreturn + 10 1 libsystem_pthread.dylib 0x00007fffbe00523e _pthread_wqthread + 995 2 libsystem_pthread.dylib 0x00007fffbe004e49 start_wqthread + 13 Thread 4: 0 libsystem_pthread.dylib 0x00007fffbe004e3c start_wqthread + 0 1 ??? 0x00007fffc6497930 OBJC_METACLASS_$_OS_xpc_date + 40 Thread 5: 0 libsystem_pthread.dylib 0x00007fffbe004e3c start_wqthread + 0 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000002000209 rbx: 0x0000000000000001 rcx: 0x00007fff5b0d6d88 rdx: 0x0000000000000000 rdi: 0x0000000000000008 rsi: 0x0000000000000001 rbp: 0x00007fff5b0d6de0 rsp: 0x00007fff5b0d6d88 r8: 0x00007f8ac94a1580 r9: 0x0000000000000080 r10: 0x0000000000000000 r11: 0x0000000000000246 r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000000000008 r15: 0x0000000000000080 rip: 0x00007fffbded33d6 rfl: 0x0000000000000246 cr2: 0x0000000105307000 Logical CPU: 0 Error Code: 0x02000209 Trap Number: 133 Binary Images: 0x104b24000 - 0x104b25fff org.python.python (2.7.10 - 2.7.10) /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python 0x104c75000 - 0x104c76fff _locale.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so 0x104d1b000 - 0x104d29ff3 _io.so (109) <526F3EF7-B2F2-3C2F-B5CD-A4E036EDB467> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so 0x104d7b000 - 0x104d7cff3 time.so (109) <49823D6E-8D71-3422-AC22-733FFD1C1222> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/time.so 0x104d83000 - 0x104d86fff _struct.so (109) <85CB389D-9633-3E2F-A156-8C5724E30130> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_struct.so 0x104d8d000 - 0x104d8fffb _collections.so (109) <7FC827A0-DADC-3E27-BC28-18320D233C9B> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so 0x104d96000 - 0x104d99fff operator.so (109) <31D86F5C-F6ED-3DD3-8599-946A9AD9DE52> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so 0x104da0000 - 0x104da4fff itertools.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so 0x104dae000 - 0x104daffff _heapq.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_heapq.so 0x104df5000 - 0x104df5fff grp.so (109) <91EACFC1-80D7-3875-A162-3BF87386E212> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/grp.so 0x104dfa000 - 0x104dfcfff binascii.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/binascii.so 0x104e01000 - 0x104e02fff cStringIO.so (109) <0B2343A8-D8FA-3B19-BB66-772DD7867510> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cStringIO.so 0x104e08000 - 0x104e0bffb strop.so (109) <2D4AACCA-6009-3952-B094-7E662227693A> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/strop.so 0x104e11000 - 0x104e13fff zlib.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/zlib.so 0x104e19000 - 0x104e1afff _functools.so (109) <9D1729E8-F073-3594-8A6B-6ABFB3C90328> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_functools.so 0x104e5f000 - 0x104e68ff3 datetime.so (109) <3C599449-8111-397F-AE22-61E845E7C119> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/datetime.so 0x104f72000 - 0x104f75ffb math.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/math.so 0x104f7c000 - 0x104f7dfff _hashlib.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_hashlib.so 0x104f83000 - 0x104f84ffb _random.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_random.so 0x104f89000 - 0x104f90ff3 _socket.so (109) <9FF3C3DB-2910-3D91-B8FF-6C5CDFB7E362> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so 0x104f9b000 - 0x104fa4ffb _ssl.so (109) <8BEB8BFA-B11A-352C-BB0A-DEB69464E22C> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so 0x105030000 - 0x105030fff _scproxy.so (109) <16BC3D97-2B73-3133-B802-855A5995C7B8> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_scproxy.so 0x105087000 - 0x105088fff fcntl.so (109) <2DB86420-5982-32CF-8D6C-61BC28F9DC87> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/fcntl.so 0x10508d000 - 0x105094fff parser.so (109) <63168D6B-E4A2-37A4-8162-396B0F4E56A0> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/parser.so 0x1050da000 - 0x1050dfffb pyexpat.so (109) <80E1C5D4-6A3D-3EFB-A5ED-DB63ED09EF66> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/pyexpat.so 0x1051a7000 - 0x1051a9fff select.so (109) <1D095B7D-A935-326A-A485-E954F047EAD4> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so 0x1051b0000 - 0x1051b2fff _multiprocessing.so (109) <37AC3F99-B7A7-315B-9C71-9BC4A34078D7> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_multiprocessing.so 0x1051b8000 - 0x1051c3ffb cPickle.so (109) <7C5E649B-4D48-3E4C-ABDB-7282076A9EEB> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cPickle.so 0x10524a000 - 0x10524bfff termios.so (109) <9067E25A-DC89-3123-BC27-11DA5C570518> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/termios.so 0x105251000 - 0x10525afff _curses.so (109) <18410BC2-054C-358F-AABF-196DC9456562> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_curses.so 0x1052a2000 - 0x1052a6fff array.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/array.so 0x1052ed000 - 0x1052f1ffb _json.so (109) /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_json.so 0x1052f7000 - 0x1052f7fff syslog.so (109) <7DF711A4-4A2E-304B-8D4F-C6D33D41B89B> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/syslog.so 0x1052fc000 - 0x1052fcfff +strxor.so (0) <7C94EC76-54AF-3261-8A19-2DF755B766A9> /Library/Python/2.7/site-packages/Crypto/Util/strxor.so 0x1052ff000 - 0x105300fff +_counter.so (0) <47FF0AA5-CCD7-3B20-990A-18B66F1583B9> /Library/Python/2.7/site-packages/Crypto/Util/_counter.so 0x105303000 - 0x105303fff +_constant_time.so (0) <16DCFBC5-3563-3A31-8C51-64B3478F6D8A> /Library/Python/2.7/site-packages/cryptography/hazmat/bindings/_constant_time.so 0x1055e2000 - 0x1055e7fff +_AES.so (0) <703B60CE-55E2-3177-A92E-03BE7A013EDE> /Library/Python/2.7/site-packages/Crypto/Cipher/_AES.so 0x1056aa000 - 0x1056c4ff7 +_cffi_backend.so (???) <2CE78FC0-02E7-3D62-A4D0-D6DA09165D92> /Library/Python/2.7/site-packages/_cffi_backend.so 0x1056da000 - 0x1056e8fff _ctypes.so (109) <4BB0D26B-4F10-381A-95EE-87BCDAC110B0> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ctypes.so 0x1058b4000 - 0x1058c5fff +_commoncrypto.so (0) /Library/Python/2.7/site-packages/cryptography/hazmat/bindings/_commoncrypto.so 0x1059e3000 - 0x105a87ff7 unicodedata.so (109) <63579D07-3CF7-30D1-9E07-DD8221ECF17D> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/unicodedata.so 0x105b0f000 - 0x105b0ffff _bisect.so (109) <3CF35421-B794-3462-9DF4-47940D7DBA06> /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_bisect.so 0x105b54000 - 0x105d799f7 +_openssl.so (0) <2B4985A2-EBC1-3EC5-8720-5AC83CD083FC> /Library/Python/2.7/site-packages/cryptography/hazmat/bindings/_openssl.so 0x1062e3000 - 0x1062eafff crypto.so (46) <91F370CB-2821-3BE3-8D90-73D7D84D7204> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/OpenSSL/crypto.so 0x1062f9000 - 0x1062f9fff rand.so (46) <328AFE5A-23F9-317F-9906-111A56D31090> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/OpenSSL/rand.so 0x1062fe000 - 0x106303fff SSL.so (46) <488EB6DB-1131-389A-A1ED-EBB93B52D679> /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/OpenSSL/SSL.so 0x10dc53000 - 0x10dc9b37f dyld (513.2) /usr/lib/dyld 0x7fff930df000 - 0x7fff930dffff com.apple.Accelerate (1.11 - Accelerate 1.11) <903090ED-25F4-3715-9707-0D7775831390> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff930f7000 - 0x7fff935effc7 com.apple.vImage (8.1 - ???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage 0x7fff935f0000 - 0x7fff9374afc3 libBLAS.dylib (1211) <5924ECE5-7788-308F-86A2-589181677DAB> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 0x7fff9374b000 - 0x7fff93778fef libBNNS.dylib (30) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib 0x7fff93779000 - 0x7fff93b39ff7 libLAPACK.dylib (1211) <4560987F-B203-366F-B2CA-3291BCFB511A> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib 0x7fff93b3a000 - 0x7fff93b4fff7 libLinearAlgebra.dylib (1211) <3ECB936A-1D5A-3BEE-A9A2-248EF132CE3F> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib 0x7fff93b50000 - 0x7fff93b55ff3 libQuadrature.dylib (3) <680BCCDA-0F73-331E-B5F3-1E50A4B4E762> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib 0x7fff93b56000 - 0x7fff93bb4fff libSparse.dylib (76) <43168B0F-42F2-3CEB-B90D-45C4BC977647> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib 0x7fff93bb5000 - 0x7fff93bc8fff libSparseBLAS.dylib (1211) <547C43FB-0243-340A-9B9B-AE8E5A5653BA> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib 0x7fff93bc9000 - 0x7fff93d5ffcb libvDSP.dylib (619) <2AFFCEAD-4CAA-3C1C-A000-61D84ECF6025> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib 0x7fff93d60000 - 0x7fff93e10feb libvMisc.dylib (619) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib 0x7fff93e11000 - 0x7fff93e11fff com.apple.Accelerate.vecLib (3.11 - vecLib 3.11) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff94f8c000 - 0x7fff94f8cfff com.apple.ApplicationServices (48 - 50) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 0x7fff94f8d000 - 0x7fff94ff3fff com.apple.ApplicationServices.ATS (377 - 440) <3924CF93-5AE7-392A-AE3F-DC6A14BA1943> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS 0x7fff9508c000 - 0x7fff951b1fff libFontParser.dylib (216) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib 0x7fff951b2000 - 0x7fff951fcfff libFontRegistry.dylib (215) <4642AF86-D1BB-33A4-B03E-9C04D95FCED1> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib 0x7fff9533e000 - 0x7fff95342ff3 com.apple.ColorSyncLegacy (1.0 - 1) <551CA2A5-39A2-3ADE-B1AD-B756150D2C35> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSyncLegacy.framework/Versions/A/ColorSyncLegacy 0x7fff953e2000 - 0x7fff95434ff3 com.apple.HIServices (1.22 - 618) <3E0CA915-F1CE-324B-9E5B-29475233066C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices 0x7fff95435000 - 0x7fff95443fff com.apple.LangAnalysis (1.7.0 - 1.7.0) <095FB990-EF6F-39F3-906D-C736A9092697> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis 0x7fff95444000 - 0x7fff95490fff com.apple.print.framework.PrintCore (13 - 500) <465C52E7-1FC0-30B6-8C8A-52FE53FC4EAE> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore 0x7fff95491000 - 0x7fff954cbfff com.apple.QD (3.12 - 403) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD 0x7fff954cc000 - 0x7fff954d8ff7 com.apple.speech.synthesis.framework (7.0.12 - 7.0.12) <3779590C-AE9E-3E73-86AA-7561EDDC9E59> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff954d9000 - 0x7fff95760fff com.apple.audio.toolbox.AudioToolbox (1.14 - 1.14) <72215CA9-AA2A-3DC7-90A8-83414B9ABDBF> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff95a77000 - 0x7fff95de4ff7 com.apple.CFNetwork (861.1 - 861.1) <2FAFBC01-0DE7-3E81-9625-355BA99633CB> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork 0x7fff96300000 - 0x7fff963b8fff com.apple.ColorSync (4.13.0 - 530) /System/Library/Frameworks/ColorSync.framework/Versions/A/ColorSync 0x7fff9653f000 - 0x7fff965d2ff7 com.apple.audio.CoreAudio (4.3.0 - 4.3.0) <52753110-84F3-3FDC-A086-A3F1FB68A84A> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff96662000 - 0x7fff969a2ff7 com.apple.CoreData (120 - 832) <218BCBC3-2598-3ADE-B3F1-62A8316031A7> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fff969a3000 - 0x7fff96a62ff7 com.apple.CoreDisplay (1.0 - 64) /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay 0x7fff96a63000 - 0x7fff96f05fff com.apple.CoreFoundation (6.9 - 1433) <1CA2CF01-91A0-337B-BA7C-0F8AAE8A08B3> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x7fff96f07000 - 0x7fff97511fe7 com.apple.CoreGraphics (2.0 - 1107) <7269184D-67E0-33BD-ACD3-7AB7E35BC737> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff97513000 - 0x7fff977a9fff com.apple.CoreImage (13.0.0 - 547) <9D57B874-DBCD-3859-9844-675696DD413F> /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage 0x7fff97b82000 - 0x7fff97b82fff com.apple.CoreServices (815.2 - 815.2) <6173EB59-5DB2-380B-8AAB-1DAA7FCEC499> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff97b83000 - 0x7fff97bf7ff3 com.apple.AE (732 - 732) <3D0C6733-F36E-3F84-9576-1DF4A8439455> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x7fff97bf8000 - 0x7fff97ecfff7 com.apple.CoreServices.CarbonCore (1176 - 1176) <6C43CB0E-5ADB-3273-BC0C-052FE01565E2> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x7fff97ed0000 - 0x7fff97f03ff7 com.apple.DictionaryServices (1.2 - 282) <126FFF25-96D3-37D3-AD6E-FBC8552BE334> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices 0x7fff97f04000 - 0x7fff97f0cff7 com.apple.CoreServices.FSEvents (1237 - 1237) <4551E5F7-1FC9-3753-8DC9-4CB37F0CDBD9> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents 0x7fff97f0d000 - 0x7fff980c2ff7 com.apple.LaunchServices (815.2 - 815.2) <7C80BB19-BF10-3BF3-9806-8CF300385BC3> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices 0x7fff980c3000 - 0x7fff98171ff3 com.apple.Metadata (10.7.0 - 1163.3) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata 0x7fff98172000 - 0x7fff981cfff7 com.apple.CoreServices.OSServices (815.2 - 815.2) <6981E9D6-C397-364A-A482-ECEB082F0860> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices 0x7fff981d0000 - 0x7fff9823efff com.apple.SearchKit (1.4.0 - 1.4.0) <5135CBBF-F0EF-3553-9672-4D474725CA8A> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit 0x7fff9823f000 - 0x7fff98262fff com.apple.coreservices.SharedFileList (64.1 - 64.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList 0x7fff98506000 - 0x7fff98651fff com.apple.CoreText (352.0 - 569.1) <20751940-98D8-3538-9129-D98C47C0AD4A> /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText 0x7fff98652000 - 0x7fff9868bffb com.apple.CoreVideo (1.8 - 272.0) <78805556-EE16-325A-9D83-74AA48EDF265> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff9898d000 - 0x7fff98992fff com.apple.DiskArbitration (2.7 - 2.7) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration 0x7fff98b51000 - 0x7fff98f0eff7 com.apple.Foundation (6.9 - 1433.14) <89F8CCE7-A405-34CF-9EDC-0803077AD3A8> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff98f7e000 - 0x7fff98faeffb com.apple.GSS (4.0 - 2.0) /System/Library/Frameworks/GSS.framework/Versions/A/GSS 0x7fff9921f000 - 0x7fff992b9fff com.apple.framework.IOKit (2.0.2 - 1428) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff992bb000 - 0x7fff992c1fff com.apple.IOSurface (196 - 196) <029E1524-F89F-39B0-A88C-2F8985E9A4A4> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface 0x7fff99315000 - 0x7fff99482fef com.apple.ImageIO.framework (3.3.0 - 1669) /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO 0x7fff99483000 - 0x7fff99487ffb libGIF.dylib (1669) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff99488000 - 0x7fff9956ffff libJP2.dylib (1669) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib 0x7fff99570000 - 0x7fff99593ff7 libJPEG.dylib (1669) <971C01B3-3E71-3D36-BF45-9D9815AB9860> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff9986e000 - 0x7fff99894feb libPng.dylib (1669) <7F9C9079-0203-3264-8289-A9ED37B29326> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff99895000 - 0x7fff99897ffb libRadiance.dylib (1669) <2997A82D-0EDA-3E07-8EB0-6B4C02CF210C> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff99898000 - 0x7fff998e5fff libTIFF.dylib (1669) <41D558A1-C9FA-3E44-945D-C1347C0BB7CD> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff9a609000 - 0x7fff9a622ff3 com.apple.Kerberos (3.0 - 1) <0D34094D-C667-327A-BF2F-062D8EE6C48C> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff9b311000 - 0x7fff9b38fff7 com.apple.Metal (120.1 - 120.1) /System/Library/Frameworks/Metal.framework/Versions/A/Metal 0x7fff9b3aa000 - 0x7fff9b3bffff com.apple.MetalPerformanceShaders.MPSCore (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSCore.framework/Versions/A/MPSCore 0x7fff9b3c0000 - 0x7fff9b42afef com.apple.MetalPerformanceShaders.MPSImage (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSImage.framework/Versions/A/MPSImage 0x7fff9b42b000 - 0x7fff9b44affb com.apple.MetalPerformanceShaders.MPSMatrix (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSMatrix.framework/Versions/A/MPSMatrix 0x7fff9b44b000 - 0x7fff9b4b3fff com.apple.MetalPerformanceShaders.MPSNeuralNetwork (1.0 - 1) /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSNeuralNetwork.framework/Versions/A/MPSNeuralNetwork 0x7fff9b4b4000 - 0x7fff9b4b4ff7 com.apple.MetalPerformanceShaders.MetalPerformanceShaders (1.0 - 1) <8DBFE620-D4CB-3F20-B7D1-1C0C90104AE2> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders 0x7fff9c44b000 - 0x7fff9c452fff com.apple.NetFS (6.0 - 4.0) /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS 0x7fff9f2af000 - 0x7fff9f2fcffb com.apple.opencl (2.8.8 - 2.8.8) <0B0EA163-0B17-3395-8493-EE998380580A> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL 0x7fff9f2fd000 - 0x7fff9f318ff3 com.apple.CFOpenDirectory (10.13 - 204) <2008AE0C-7B0D-3EFA-88D5-A26BF8163224> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory 0x7fff9f319000 - 0x7fff9f324fff com.apple.OpenDirectory (10.13 - 204) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory 0x7fffa04a3000 - 0x7fffa04a5fff libCVMSPluginSupport.dylib (15.0.38) <17634196-ABE3-3264-AFA9-458FAE88D5DD> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib 0x7fffa04a6000 - 0x7fffa04a9ff7 libCoreFSCache.dylib (160.7) <421E3EF9-0ACB-3605-8A7A-1D676A853527> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib 0x7fffa04aa000 - 0x7fffa04aefff libCoreVMClient.dylib (160.7) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib 0x7fffa04af000 - 0x7fffa04b8ff7 libGFXShared.dylib (15.0.38) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib 0x7fffa04b9000 - 0x7fffa04c4fff libGL.dylib (15.0.38) <13F21B8B-EADA-3B03-8E84-813A3FB42A73> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fffa04c5000 - 0x7fffa0500fe7 libGLImage.dylib (15.0.38) <90484321-5B93-391A-A938-66FA77DC2A7F> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib 0x7fffa066e000 - 0x7fffa06acffb libGLU.dylib (15.0.38) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x7fffa1024000 - 0x7fffa1032ffb com.apple.opengl (15.0.38 - 15.0.38) <1A02DE70-8930-3DDB-B196-04D2D588228E> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fffa12b8000 - 0x7fffa13a7ff7 org.python.python (2.7.10 - 2.7.10) /System/Library/Frameworks/Python.framework/Versions/2.7/Python 0x7fffa1e71000 - 0x7fffa208dfff com.apple.QuartzCore (1.11 - 544) <5DAA37C8-5BE1-3652-A567-8AC1EB80A2D1> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fffa28b7000 - 0x7fffa2bbcfff com.apple.security (7.0 - 58241.0.0.1.1) /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fffa2bbd000 - 0x7fffa2c46ff7 com.apple.securityfoundation (6.0 - 55183) <9E497B33-EDEB-3A52-8BCD-8FAC98397E1C> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation 0x7fffa2c75000 - 0x7fffa2c78ff3 com.apple.xpc.ServiceManagement (1.0 - 1) /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement 0x7fffa301b000 - 0x7fffa308bffb com.apple.SystemConfiguration (1.17 - 1.17) <4F0BBE4D-F8EC-3FD1-9BF1-782A008153CA> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x7fffa5c65000 - 0x7fffa5c7dfe7 com.apple.APFS (1.0 - 1) /System/Library/PrivateFrameworks/APFS.framework/Versions/A/APFS 0x7fffa69bc000 - 0x7fffa6a04fff com.apple.AppleJPEG (1.0 - 1) /System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG 0x7fffa6a3f000 - 0x7fffa6a67fff com.apple.applesauce (1.0 - ???) <3545BBCF-8FF3-3B74-9A3F-92CFC1A01289> /System/Library/PrivateFrameworks/AppleSauce.framework/Versions/A/AppleSauce 0x7fffa7210000 - 0x7fffa7217fff com.apple.coreservices.BackgroundTaskManagement (1.0 - 57.1) <8FAB0EF3-7F2A-3C46-A30E-F3342A5940C6> /System/Library/PrivateFrameworks/BackgroundTaskManagement.framework/Versions/A/BackgroundTaskManagement 0x7fffa8be2000 - 0x7fffa8bebffb com.apple.CommonAuth (4.0 - 2.0) <1ACD12C4-783F-3B3F-9EB5-399940FDB3DD> /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth 0x7fffa95cb000 - 0x7fffa95dbff7 com.apple.CoreEmoji (1.0 - 65) /System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/CoreEmoji 0x7fffaa92e000 - 0x7fffaa932ff7 com.apple.DSExternalDisplay (3.1 - 380) <476A7E1A-AB8F-358A-8424-B34FBEFAB2F4> /System/Library/PrivateFrameworks/DSExternalDisplay.framework/Versions/A/DSExternalDisplay 0x7fffab89e000 - 0x7fffabcccfff com.apple.vision.FaceCore (3.3.2 - 3.3.2) <6E154CD6-4762-32A5-A48F-B999441A517B> /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore 0x7fffafc9d000 - 0x7fffafcacfff com.apple.GraphVisualizer (1.0 - 5) /System/Library/PrivateFrameworks/GraphVisualizer.framework/Versions/A/GraphVisualizer 0x7fffafcff000 - 0x7fffafd73ff3 com.apple.Heimdal (4.0 - 2.0) <9921343D-4CDB-359C-B6E2-FD8E75F46946> /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal 0x7fffb05d3000 - 0x7fffb05daff7 com.apple.IOAccelerator (358 - 358) <6F656737-5EE3-3817-AAF1-527C0575B9DB> /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator 0x7fffb05de000 - 0x7fffb05f4ff7 com.apple.IOPresentment (1.0 - 32.1) /System/Library/PrivateFrameworks/IOPresentment.framework/Versions/A/IOPresentment 0x7fffb0c5b000 - 0x7fffb0d4dff7 com.apple.LanguageModeling (1.0 - 152) <76D222F3-C960-320B-97F1-E063C2747742> /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling 0x7fffb0d4e000 - 0x7fffb0d93fff com.apple.Lexicon-framework (1.0 - 28) <54325E87-E536-3FEA-9CD4-882059B797F8> /System/Library/PrivateFrameworks/Lexicon.framework/Versions/A/Lexicon 0x7fffb1948000 - 0x7fffb19adfff com.apple.gpusw.MetalTools (1.0 - 1) <76937F06-7C1B-3620-9078-FD5073F0CC4A> /System/Library/PrivateFrameworks/MetalTools.framework/Versions/A/MetalTools 0x7fffb1bb6000 - 0x7fffb1bdeff3 com.apple.MultitouchSupport.framework (431 - 431) /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport 0x7fffb1e3e000 - 0x7fffb1e49fff com.apple.NetAuth (6.2 - 6.2) /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth 0x7fffb7c20000 - 0x7fffb7eb2ff3 com.apple.SkyLight (1.600.0 - 286) <9ED9DEED-8A5F-33EA-9EB1-C38FD3A57C92> /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight 0x7fffb9707000 - 0x7fffb970efff com.apple.TCC (1.0 - 1) <6CDAEC6B-05D1-3DF8-9BC5-683EFD0A1437> /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC 0x7fffb9a6c000 - 0x7fffb9a6dfff com.apple.TrustEvaluationAgent (2.0 - 31) <39F533B2-211E-3635-AF47-23F27749FF4A> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent 0x7fffbb44e000 - 0x7fffbb450ff7 com.apple.loginsupport (1.0 - 1) <2AE0AB82-6613-3B2E-A967-C880DEDAD628> /System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport 0x7fffbb756000 - 0x7fffbb78ffff libCRFSuite.dylib (41) <823C0426-8EB2-3437-BEA5-B8435EFB4B1C> /usr/lib/libCRFSuite.dylib 0x7fffbb790000 - 0x7fffbb79bfff libChineseTokenizer.dylib (28) <625D4CE0-9C6A-3857-AA15-AD30D50B650E> /usr/lib/libChineseTokenizer.dylib 0x7fffbb82d000 - 0x7fffbb82eff7 libDiagnosticMessagesClient.dylib (103) <495B43F1-F21B-3CA1-8F95-59B8F36A79A2> /usr/lib/libDiagnosticMessagesClient.dylib 0x7fffbb865000 - 0x7fffbba2fff3 libFosl_dynamic.dylib (17.6) <92B9E75B-4A2B-34F8-BAAF-AF5897B247D6> /usr/lib/libFosl_dynamic.dylib 0x7fffbba67000 - 0x7fffbba67fff libOpenScriptingUtil.dylib (172) /usr/lib/libOpenScriptingUtil.dylib 0x7fffbbb95000 - 0x7fffbbb96ff3 libSystem.B.dylib (1252) /usr/lib/libSystem.B.dylib 0x7fffbbc29000 - 0x7fffbbc29fff libapple_crypto.dylib (97.0.0.0.1) <0865224F-F38B-392B-8DBB-84E582C54D7F> /usr/lib/libapple_crypto.dylib 0x7fffbbc2a000 - 0x7fffbbc40ff3 libapple_nghttp2.dylib (1.20.3) /usr/lib/libapple_nghttp2.dylib 0x7fffbbc41000 - 0x7fffbbc6bff3 libarchive.2.dylib (54) <0B7FD7AD-0CFD-3F2C-88F0-ACBCBE8ECC2C> /usr/lib/libarchive.2.dylib 0x7fffbbcf1000 - 0x7fffbbcf1ff3 libauto.dylib (187) /usr/lib/libauto.dylib 0x7fffbbcf2000 - 0x7fffbbd9dff7 libboringssl.dylib (97.0.0.0.1) <90BBDFFB-9517-331B-AC61-C9B31547DE9D> /usr/lib/libboringssl.dylib 0x7fffbbd9e000 - 0x7fffbbdadff3 libbsm.0.dylib (39) <8423D62C-DA49-3581-8018-9CF1983A6EEE> /usr/lib/libbsm.0.dylib 0x7fffbbdae000 - 0x7fffbbdbbffb libbz2.1.0.dylib (38) <0A5086BB-4724-3C14-979D-5AD4F26B5B45> /usr/lib/libbz2.1.0.dylib 0x7fffbbdbc000 - 0x7fffbbe12fff libc++.1.dylib (400.9) /usr/lib/libc++.1.dylib 0x7fffbbe13000 - 0x7fffbbe37ff7 libc++abi.dylib (400.7) <217656D5-BC40-37FF-B322-91CB2AAD4F34> /usr/lib/libc++abi.dylib 0x7fffbbe39000 - 0x7fffbbe49fff libcmph.dylib (6) /usr/lib/libcmph.dylib 0x7fffbbe4a000 - 0x7fffbbe60fd3 libcompression.dylib (44) /usr/lib/libcompression.dylib 0x7fffbc11b000 - 0x7fffbc133ff7 libcoretls.dylib (154) /usr/lib/libcoretls.dylib 0x7fffbc134000 - 0x7fffbc135ffb libcoretls_cfhelpers.dylib (154) /usr/lib/libcoretls_cfhelpers.dylib 0x7fffbc2ce000 - 0x7fffbc45efff libcrypto.35.dylib (22) <067CFC21-249D-392D-ADE1-785100BF0F83> /usr/lib/libcrypto.35.dylib 0x7fffbc605000 - 0x7fffbc65affb libcups.2.dylib (457) <5FAD96AA-8F31-3B76-B2F1-3D7F3392DB79> /usr/lib/libcups.2.dylib 0x7fffbc798000 - 0x7fffbc798fff libenergytrace.dylib (16) /usr/lib/libenergytrace.dylib 0x7fffbc799000 - 0x7fffbc7b1ffb libexpat.1.dylib (15) /usr/lib/libexpat.1.dylib 0x7fffbc7bf000 - 0x7fffbc7c0fff libffi.dylib (18.1) <02011073-8CB7-362F-BC52-43B4E83687B0> /usr/lib/libffi.dylib 0x7fffbc7ce000 - 0x7fffbc7d3ffb libheimdal-asn1.dylib (518) /usr/lib/libheimdal-asn1.dylib 0x7fffbc7ff000 - 0x7fffbc8f0ff7 libiconv.2.dylib (51) <0772997F-4109-38A1-91ED-0F3F16AE99E5> /usr/lib/libiconv.2.dylib 0x7fffbc8f1000 - 0x7fffbcb17ffb libicucore.A.dylib (59108.0.1) <7F51EA4C-8285-3714-A5C0-B775725707FD> /usr/lib/libicucore.A.dylib 0x7fffbcb64000 - 0x7fffbcb65fff liblangid.dylib (128) <39C39393-0D05-301D-93B2-F224FC4949AA> /usr/lib/liblangid.dylib 0x7fffbcb66000 - 0x7fffbcb7fffb liblzma.5.dylib (10) <3D419A50-961F-37D2-8A01-3DC7AB7B8D18> /usr/lib/liblzma.5.dylib 0x7fffbcb80000 - 0x7fffbcb96ff7 libmarisa.dylib (9) /usr/lib/libmarisa.dylib 0x7fffbcc47000 - 0x7fffbce76ff7 libmecabra.dylib (770) /usr/lib/libmecabra.dylib 0x7fffbce7b000 - 0x7fffbceabffb libncurses.5.4.dylib (53) <030DF747-F71B-367A-83EE-2F30B7947929> /usr/lib/libncurses.5.4.dylib 0x7fffbd04e000 - 0x7fffbd11dff3 libnetwork.dylib (1196.0.0.1.1) /usr/lib/libnetwork.dylib 0x7fffbd193000 - 0x7fffbd5817f7 libobjc.A.dylib (720) /usr/lib/libobjc.A.dylib 0x7fffbd594000 - 0x7fffbd598fff libpam.2.dylib (22) <7B4D2CE2-1438-387A-9802-5CEEFBF26F86> /usr/lib/libpam.2.dylib 0x7fffbd59b000 - 0x7fffbd5cffff libpcap.A.dylib (77) /usr/lib/libpcap.A.dylib 0x7fffbd64f000 - 0x7fffbd66bffb libresolv.9.dylib (65) /usr/lib/libresolv.9.dylib 0x7fffbd6bb000 - 0x7fffbd849ffb libsqlite3.dylib (266) <0009E8DA-7879-3920-B2D1-A5552DE3735C> /usr/lib/libsqlite3.dylib 0x7fffbd8a5000 - 0x7fffbd8f8ffb libssl.35.dylib (22) <4D77B502-E065-3794-90E7-39E83F9683F6> /usr/lib/libssl.35.dylib 0x7fffbda18000 - 0x7fffbda4ffff libusrtcp.dylib (1196.0.0.1.1) <61712622-6D7B-3D04-B90B-03C06A51C5A8> /usr/lib/libusrtcp.dylib 0x7fffbda50000 - 0x7fffbda53ffb libutil.dylib (51) <58C59F00-031B-3798-B697-A8A4C58E70AA> /usr/lib/libutil.dylib 0x7fffbda54000 - 0x7fffbda61fff libxar.1.dylib (400) /usr/lib/libxar.1.dylib 0x7fffbda65000 - 0x7fffbdb4cfff libxml2.2.dylib (31.5) <7679E85C-C3F0-302A-AE40-5F7FEE879AAC> /usr/lib/libxml2.2.dylib 0x7fffbdb4d000 - 0x7fffbdb75ffb libxslt.1.dylib (15.9) /usr/lib/libxslt.1.dylib 0x7fffbdb76000 - 0x7fffbdb87ff7 libz.1.dylib (68) <3DDAEFB9-66FA-3E2D-8C0F-5A18AB8150A6> /usr/lib/libz.1.dylib 0x7fffbdc1e000 - 0x7fffbdc22ff7 libcache.dylib (79) <1457D615-F582-3A52-A546-28C1A26A8FE0> /usr/lib/system/libcache.dylib 0x7fffbdc23000 - 0x7fffbdc2dff3 libcommonCrypto.dylib (60117) /usr/lib/system/libcommonCrypto.dylib 0x7fffbdc2e000 - 0x7fffbdc35fff libcompiler_rt.dylib (62) <2C282262-54F9-3A67-B53E-CB5F7418DD21> /usr/lib/system/libcompiler_rt.dylib 0x7fffbdc36000 - 0x7fffbdc3efff libcopyfile.dylib (146) <6FC59A4F-7A15-3BD0-9C24-477B5B7A982D> /usr/lib/system/libcopyfile.dylib 0x7fffbdc3f000 - 0x7fffbdcc3ffb libcorecrypto.dylib (551) /usr/lib/system/libcorecrypto.dylib 0x7fffbdd4a000 - 0x7fffbdd84ff7 libdispatch.dylib (893) <50BBCB27-E361-3929-8513-70FEB437A61F> /usr/lib/system/libdispatch.dylib 0x7fffbdd85000 - 0x7fffbdda0ffb libdyld.dylib (513.2) /usr/lib/system/libdyld.dylib 0x7fffbdda1000 - 0x7fffbdda1ffb libkeymgr.dylib (28) /usr/lib/system/libkeymgr.dylib 0x7fffbdda2000 - 0x7fffbddaeff7 libkxld.dylib (4481.0.0.1.1) <024232DE-7D70-370F-BB4C-A07DFE1363C6> /usr/lib/system/libkxld.dylib 0x7fffbddaf000 - 0x7fffbddafff7 liblaunch.dylib (1173) <7FBD9B64-07C1-3EF6-974E-70C107B0E793> /usr/lib/system/liblaunch.dylib 0x7fffbddb0000 - 0x7fffbddb4ffb libmacho.dylib (900) <58A84A1F-7C96-3CD5-9637-C4AD35FC856A> /usr/lib/system/libmacho.dylib 0x7fffbddb5000 - 0x7fffbddb7ff3 libquarantine.dylib (86) <6FAC40D2-BA20-3BE8-AB51-7B552F4F6103> /usr/lib/system/libquarantine.dylib 0x7fffbddb8000 - 0x7fffbddb9ff3 libremovefile.dylib (45) <3193FFE3-1254-3C3D-B6D4-198644BCF995> /usr/lib/system/libremovefile.dylib 0x7fffbddba000 - 0x7fffbddd1ff3 libsystem_asl.dylib (356) /usr/lib/system/libsystem_asl.dylib 0x7fffbddd2000 - 0x7fffbddd2fff libsystem_blocks.dylib (67) /usr/lib/system/libsystem_blocks.dylib 0x7fffbddd3000 - 0x7fffbde5cfe7 libsystem_c.dylib (1230) /usr/lib/system/libsystem_c.dylib 0x7fffbde5d000 - 0x7fffbde60ffb libsystem_configuration.dylib (951) <31DA1200-2A3C-3D55-982E-4BA3050B6038> /usr/lib/system/libsystem_configuration.dylib 0x7fffbde61000 - 0x7fffbde64ffb libsystem_coreservices.dylib (50) <277C9353-70E0-3FB6-B137-EDD6D32FEDD5> /usr/lib/system/libsystem_coreservices.dylib 0x7fffbde65000 - 0x7fffbde66ff3 libsystem_darwin.dylib (1230) <843F09DC-D5E8-3EF3-90A9-B211578138D3> /usr/lib/system/libsystem_darwin.dylib 0x7fffbde67000 - 0x7fffbde6dff7 libsystem_dnssd.dylib (869) /usr/lib/system/libsystem_dnssd.dylib 0x7fffbde6e000 - 0x7fffbdeb7ff7 libsystem_info.dylib (513) <9F729295-12B6-34FC-84C2-C341BC47DCC6> /usr/lib/system/libsystem_info.dylib 0x7fffbdeb8000 - 0x7fffbdeddff7 libsystem_kernel.dylib (4481.0.0.1.1) <6D4CA4C4-82D1-3C58-B383-B6FD3C789DE7> /usr/lib/system/libsystem_kernel.dylib 0x7fffbdede000 - 0x7fffbdf29fcb libsystem_m.dylib (3145) /usr/lib/system/libsystem_m.dylib 0x7fffbdf2a000 - 0x7fffbdf49fff libsystem_malloc.dylib (135) /usr/lib/system/libsystem_malloc.dylib 0x7fffbdf4a000 - 0x7fffbdfe4ff7 libsystem_network.dylib (1196.0.0.1.1) <9C77C0C9-A18F-3BA0-868D-7469E6A39CF1> /usr/lib/system/libsystem_network.dylib 0x7fffbdfe5000 - 0x7fffbdfefffb libsystem_networkextension.dylib (739) /usr/lib/system/libsystem_networkextension.dylib 0x7fffbdff0000 - 0x7fffbdff9ff3 libsystem_notify.dylib (170) <4C874E44-8D5F-35FA-8BE6-26E5CB04FF59> /usr/lib/system/libsystem_notify.dylib 0x7fffbdffa000 - 0x7fffbe001ff7 libsystem_platform.dylib (158) /usr/lib/system/libsystem_platform.dylib 0x7fffbe002000 - 0x7fffbe00dfff libsystem_pthread.dylib (293) <5EDB59B9-556E-3AD3-871A-BB634DFB8020> /usr/lib/system/libsystem_pthread.dylib 0x7fffbe00e000 - 0x7fffbe011ffb libsystem_sandbox.dylib (745.0.0.0.1) /usr/lib/system/libsystem_sandbox.dylib 0x7fffbe012000 - 0x7fffbe013ff3 libsystem_secinit.dylib (29) /usr/lib/system/libsystem_secinit.dylib 0x7fffbe014000 - 0x7fffbe01bffb libsystem_symptoms.dylib (787) <437DF646-70A9-3CFE-AF3B-EEBDD569A104> /usr/lib/system/libsystem_symptoms.dylib 0x7fffbe01c000 - 0x7fffbe02ffff libsystem_trace.dylib (793) <28C3B223-F0EE-315D-82B7-1B6529AEA58A> /usr/lib/system/libsystem_trace.dylib 0x7fffbe031000 - 0x7fffbe036ff7 libunwind.dylib (35.3) <05D93F98-913F-315C-9817-B6CEE7741CE4> /usr/lib/system/libunwind.dylib 0x7fffbe037000 - 0x7fffbe062fff libxpc.dylib (1173) /usr/lib/system/libxpc.dylib External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 48961 thread_create: 0 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=290.6M resident=0K(0%) swapped_out_or_unallocated=290.6M(100%) Writable regions: Total=135.9M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=135.9M(100%) VIRTUAL REGION REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Activity Tracing 256K 2 Dispatch continuations 16.0M 2 Kernel Alloc Once 8K 2 MALLOC 83.6M 23 MALLOC guard page 32K 9 STACK GUARD 56.0M 7 Stack 18.6M 9 Stack Guard 8K 3 VM_ALLOCATE 17.3M 32 __DATA 15.0M 229 __FONT_DATA 4K 2 __LINKEDIT 186.6M 49 __TEXT 104.0M 229 __UNICODE 556K 2 shared memory 60K 7 =========== ======= ======= TOTAL 497.9M 592 Model: MacBookPro11,4, BootROM MBP114.0172.B16, 4 processors, Intel Core i7, 2.2 GHz, 16 GB, SMC 2.29f24 Graphics: Intel Iris Pro, Intel Iris Pro, Built-In Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343147533642465238412D50422020 Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D54343147533642465238412D50422020 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x152), Broadcom BCM43xx 1.0 (7.77.28.0.1a2) Bluetooth: Version 6.0.0d47, 3 services, 27 devices, 1 incoming serial ports Network Service: Thunderbolt Ethernet Slot 3, Ethernet, en7 Network Service: Wi-Fi, AirPort, en0 PCI Card: pci1b73,1100, USB eXtensible Host Controller, Thunderbolt at 194,0,0 PCI Card: ethernet, Ethernet Controller, Thunderbolt at 193,0,0 PCI Card: pci1b73,1100, USB eXtensible Host Controller, Thunderbolt at 192,0,0 PCI Card: pci11c1,5901, IEEE 1394 Open HCI, Thunderbolt at 191,0,0 Serial ATA Device: OWC Aura SSD, 960.04 GB Serial ATA Device: MARVELL VIRTUAL USB Device: USB 3.0 Bus USB Device: Internal Memory Card Reader USB Device: Apple Internal Keyboard / Trackpad USB Device: Bluetooth USB Host Controller USB Device: USB 3.0 Bus USB Device: USB audio CODEC USB Device: USB 3.0 Bus USB Device: USB Receiver Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1 Thunderbolt Device: Thunderbolt 2 Dock, Other World Computing, Inc., 1, 25.1 ---------- components: macOS messages: 297598 nosy: ayesjm, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Mac OS High Sierra Beta - Python Crash type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 11:39:29 2017 From: report at bugs.python.org (David Lord) Date: Mon, 03 Jul 2017 15:39:29 +0000 Subject: [New-bugs-announce] [issue30838] re \w does not match some valid Unicode characters Message-ID: <1499096369.93.0.459837201925.issue30838@psf.upfronthosting.co.za> New submission from David Lord: This came up while writing a regex to match characters that are valid in Python identifiers for Jinja. https://github.com/pallets/jinja/pull/731 `\w` matches all valid identifier characters except for 4 special cases: import unicodedata import re import sys cre = re.compile(r'\w') for cp in range(sys.maxunicode + 1): s = chr(cp) if s.isidentifier() and not cre.match(s): print(hex(cp), unicodedata.name(s)) 0x1885 MONGOLIAN LETTER ALI GALI BALUDA 0x1886 MONGOLIAN LETTER ALI GALI THREE BALUDA 0x2118 SCRIPT CAPITAL P 0x212e ESTIMATED SYMBOL Python < 3.6 matches the two Mongolian characters, not sure why 3.6 stopped matching them. For our case, we just added them to a character set, `[\w\u1885\u1886\u2118\u212e]`. It can cause unexpected behavior when using `\b`, since that's defined as the transition from `\w` to `\W` and those 4 characters aren't in `\w`. `re.match(r'\b[\w\u212e', '?')` fails to match. ---------- components: Regular Expressions, Unicode messages: 297603 nosy: davidism, ezio.melotti, haypo, mrabarnett priority: normal severity: normal status: open title: re \w does not match some valid Unicode characters type: behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 13:59:26 2017 From: report at bugs.python.org (Maarten ter Huurne) Date: Mon, 03 Jul 2017 17:59:26 +0000 Subject: [New-bugs-announce] [issue30839] Larger and/or configurable _MAX_LENGTH for unittest messages Message-ID: <1499104766.61.0.0657645860519.issue30839@psf.upfronthosting.co.za> New submission from Maarten ter Huurne: In a unit test for one of my projects I am comparing tree-structured objects using assertEqual(). Because there can be a few nested levels, the repr() string can exceed the _MAX_LENGTH which is just 80 characters. Not by much, but enough to get shortened and therefore requiring extra effort to figure out where the difference is. I think it is useful to shorten the messages at some point, to avoid accidentally spamming the log with pages of output that no-one is going to read. However, 80 characters is a length that someone debugging a failing test case can easily deal with. So I think the limit could be set an order of magnitude larger. Making the maximum length configurable would also solve the issue, but still it would be good to increase the default maximum then, in my opinion. The discussion of #27432 mentions _MAX_LENGTH customization, but that issue is not primarily about _MAX_LENGTH. ---------- components: Library (Lib) messages: 297605 nosy: maarten-treewalker priority: normal severity: normal status: open title: Larger and/or configurable _MAX_LENGTH for unittest messages type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 15:14:52 2017 From: report at bugs.python.org (Malcolm Smith) Date: Mon, 03 Jul 2017 19:14:52 +0000 Subject: [New-bugs-announce] [issue30840] Contrary to documentation, relative imports cannot pass through the top level Message-ID: <1499109292.04.0.970471813466.issue30840@psf.upfronthosting.co.za> New submission from Malcolm Smith: https://docs.python.org/3/reference/simple_stmts.html#the-import-statement defers the full specification of relative imports to PEP 328. PEP 328 gives the example "from ...sys import path" in a second-level package, and notes "while that last case is legal, it is certainly discouraged". However, in the current implementation it actually isn't legal. Using a stdlib second-level package to test: Python 3.5.3 (default, Apr 10 2017, 07:53:16) [GCC 6.3.0 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import xml.dom >>> __package__ = "xml.dom" >>> from . import minidom # Works fine >>> from ...sys import path Traceback (most recent call last): File "", line 1, in ValueError: attempted relative import beyond top-level package Either the documentation or the implementation should be fixed. ---------- components: Interpreter Core messages: 297608 nosy: Malcolm Smith priority: normal severity: normal status: open title: Contrary to documentation, relative imports cannot pass through the top level type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 15:21:00 2017 From: report at bugs.python.org (Yuan Chao Chou) Date: Mon, 03 Jul 2017 19:21:00 +0000 Subject: [New-bugs-announce] [issue30841] A shadowing variable naming emitted for Python-ast.c Message-ID: <1499109660.71.0.721864284128.issue30841@psf.upfronthosting.co.za> New submission from Yuan Chao Chou: When Parser/asdl_c.py is composing the content of Python/Python-ast.c, it uses "value" to name the variables in inner blocks, which can shadow the variables named the same in outer blocks. It would be a good practice to avoid the shadowing naming to prevent the variables from being misused. ---------- components: Interpreter Core messages: 297609 nosy: OswinC priority: normal severity: normal status: open title: A shadowing variable naming emitted for Python-ast.c type: compile error versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 15:36:47 2017 From: report at bugs.python.org (Arnon Sela) Date: Mon, 03 Jul 2017 19:36:47 +0000 Subject: [New-bugs-announce] [issue30842] pyenv activate for bash and tcsh Message-ID: <1499110607.19.0.325548288138.issue30842@psf.upfronthosting.co.za> New submission from Arnon Sela: Remove hard coded path in activate family of virtualenv scripts. Currently, VIRTUAL_ENV is set hard coded. Event after --relocatable Instead, change to have is defined dynamically: E.g. bash: called=$_ [[ $called != $0 ]] && fullpath="${BASH_SOURCE[@]}" || fullpath=$0 fullpath=$(readlink -f $fullpath) VIRTUAL_ENV=$(dirname $(dirname $fullpath)) E.g. tcsh: set sourced=($_) if ("$sourced" != "") then set fullpath="$sourced[2]" endif if ("$0" != "tcsh") then set fullpath="$0" endif set fullpath=`readlink -f $fullpath` set binpath=`dirname $fullpath` setenv VIRTUAL_ENV `dirname $binpath` ---------- messages: 297611 nosy: PyAcrisel priority: normal severity: normal status: open title: pyenv activate for bash and tcsh type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 3 18:14:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Jul 2017 22:14:29 +0000 Subject: [New-bugs-announce] [issue30843] Lib/test/site.py conflicts with Lib/site.py when running tests Message-ID: <1499120069.02.0.752757937577.issue30843@psf.upfronthosting.co.za> New submission from STINNER Victor: I added Lib/test/bisect.py in the commit d7955b8196578306e9d86f6c61c9cb3ee72edab0, bpo-29512. When a test is loaded by Lib/test/regrtest.py when regrtest.py runs with "python -m test", test files like Lib/test/test_bisect.py are created with __package__ = ['test']. In this case, "import bisect" loads Lib/test/bisect.py rather than Lib/bisect.py. For test_bisect.py, I worked around the issue using "from __future__ import absolute_import". But then I saw this bug: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%202.7/builds/159/steps/test/logs/stdio Run tests in parallel using 2 child processes (...) 0:02:41 [144/403/1] test_multiprocessing failed test test_multiprocessing failed -- Traceback (most recent call last): File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/test/test_multiprocessing.py", line 1669, in test_connection self.assertEqual(poll(TIMEOUT1), True) AssertionError: False != True (...) Re-running test 'test_multiprocessing' in verbose mode (...) ====================================================================== ERROR: test_array (test.test_multiprocessing.WithProcessesTestArray) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/test/test_multiprocessing.py", line 1027, in test_array arr = self.Array('i', seq) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/__init__.py", line 260, in Array return Array(typecode_or_type, size_or_initializer, **kwds) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/sharedctypes.py", line 120, in Array obj = RawArray(typecode_or_type, size_or_initializer) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/sharedctypes.py", line 93, in RawArray result = _new_value(type_) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/sharedctypes.py", line 68, in _new_value wrapper = heap.BufferWrapper(size) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/heap.py", line 243, in __init__ block = BufferWrapper._heap.malloc(size) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/heap.py", line 223, in malloc (arena, start, stop) = self._malloc(size) File "/usr/home/buildbot/python/2.7.koobs-freebsd-current.nondebug/build/Lib/multiprocessing/heap.py", line 115, in _malloc i = bisect.bisect_left(self._lengths, size) AttributeError: 'module' object has no attribute 'bisect_left' The wrong bisect module was picked when test_multiprocessing was run for the second time. The first run was done in a slave process. The second run was done in the main regrtest process. ---------- components: Tests messages: 297618 nosy: haypo priority: normal severity: normal status: open title: Lib/test/site.py conflicts with Lib/site.py when running tests versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 03:50:02 2017 From: report at bugs.python.org (Pim Klanke) Date: Tue, 04 Jul 2017 07:50:02 +0000 Subject: [New-bugs-announce] [issue30844] selector_events.py lacks exceptional event support Message-ID: <1499154602.34.0.512316587852.issue30844@psf.upfronthosting.co.za> New submission from Pim Klanke: To be able to use GPIO Sysfs Interface on our embedded platforms we require exceptional event support. ---------- components: asyncio messages: 297629 nosy: pklanke, yselivanov priority: normal severity: normal status: open title: selector_events.py lacks exceptional event support type: enhancement versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 06:19:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 10:19:07 +0000 Subject: [New-bugs-announce] [issue30845] [3.5] test_first_completed_some_already_completed() of test_concurrent_futures.ProcessPoolWaitTests: time.sleep() fails with "sleep length must be non-negative" in setUp() on x86 Tiger 3.5 Message-ID: <1499163547.99.0.882941259602.issue30845@psf.upfronthosting.co.za> New submission from STINNER Victor: Code of the setUp() method: class ExecutorMixin: worker_count = 5 def setUp(self): self.t1 = time.time() try: self.executor = self.executor_type(max_workers=self.worker_count) except NotImplementedError as e: self.skipTest(str(e)) self._prime_executor() def _prime_executor(self): # Make sure that the executor is ready to do work before running the # tests. This should reduce the probability of timeouts in the tests. futures = [self.executor.submit(time.sleep, 0.1) for _ in range(self.worker_count)] for f in futures: f.result() I don't understand how the child process can fail with ValueError("sleep length must be non-negative") when running time.sleep(0.1). Code of the sleep function: static PyObject * time_sleep(PyObject *self, PyObject *obj) { _PyTime_t secs; if (_PyTime_FromSecondsObject(&secs, obj, _PyTime_ROUND_CEILING)) return NULL; if (secs < 0) { PyErr_SetString(PyExc_ValueError, "sleep length must be non-negative"); return NULL; } if (pysleep(secs) != 0) return NULL; Py_INCREF(Py_None); return Py_None; } Can it be a major rounding issue in time_sleep()? Or concurrent.futures failed completely to serialized the floating point number 0.1? http://buildbot.python.org/all/builders/x86%20Tiger%203.5/builds/324/steps/test/logs/stdio 0:27:59 load avg: 1.54 [211/398/1] test_concurrent_futures test_cancel (test.test_concurrent_futures.FutureTests) ... ok test_cancelled (test.test_concurrent_futures.FutureTests) ... ok test_done (test.test_concurrent_futures.FutureTests) ... ok test_done_callback_already_cancelled (test.test_concurrent_futures.FutureTests) ... ok test_done_callback_already_failed (test.test_concurrent_futures.FutureTests) ... ok test_done_callback_already_successful (test.test_concurrent_futures.FutureTests) ... ok test_done_callback_raises (test.test_concurrent_futures.FutureTests) ... ok test_done_callback_with_cancel (test.test_concurrent_futures.FutureTests) ... ok test_done_callback_with_exception (test.test_concurrent_futures.FutureTests) ... ok test_done_callback_with_result (test.test_concurrent_futures.FutureTests) ... ok test_exception_with_success (test.test_concurrent_futures.FutureTests) ... ok test_exception_with_timeout (test.test_concurrent_futures.FutureTests) ... ok test_repr (test.test_concurrent_futures.FutureTests) ... ok test_result_with_cancel (test.test_concurrent_futures.FutureTests) ... ok test_result_with_success (test.test_concurrent_futures.FutureTests) ... ok test_result_with_timeout (test.test_concurrent_futures.FutureTests) ... ok test_running (test.test_concurrent_futures.FutureTests) ... ok test_duplicate_futures (test.test_concurrent_futures.ProcessPoolAsCompletedTests) ... 2.20s ok test_no_timeout (test.test_concurrent_futures.ProcessPoolAsCompletedTests) ... 0.18s ok test_zero_timeout (test.test_concurrent_futures.ProcessPoolAsCompletedTests) ... 2.20s ok test_killed_child (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.21s ok test_map (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.20s ok test_map_chunksize (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.21s ok test_map_exception (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.19s ok test_map_timeout (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 6.18s ok test_max_workers_negative (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.21s ok test_no_stale_references (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.20s ok test_shutdown_race_issue12456 (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.19s ok test_submit (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.18s ok test_submit_keyword (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.21s ok test_traceback (test.test_concurrent_futures.ProcessPoolExecutorTest) ... 0.20s ok test_context_manager_shutdown (test.test_concurrent_futures.ProcessPoolShutdownTest) ... 0.10s ok test_del_shutdown (test.test_concurrent_futures.ProcessPoolShutdownTest) ... 0.10s ok test_hang_issue12364 (test.test_concurrent_futures.ProcessPoolShutdownTest) ... 1.09s ok test_interpreter_shutdown (test.test_concurrent_futures.ProcessPoolShutdownTest) ... 2.13s ok test_processes_terminate (test.test_concurrent_futures.ProcessPoolShutdownTest) ... 0.09s ok test_run_after_shutdown (test.test_concurrent_futures.ProcessPoolShutdownTest) ... 0.00s ok test_all_completed (test.test_concurrent_futures.ProcessPoolWaitTests) ... 0.20s ok test_first_completed (test.test_concurrent_futures.ProcessPoolWaitTests) ... 1.69s ok test_first_completed_some_already_completed (test.test_concurrent_futures.ProcessPoolWaitTests) ... ERROR test_first_exception (test.test_concurrent_futures.ProcessPoolWaitTests) ... 3.20s ok test_first_exception_one_already_failed (test.test_concurrent_futures.ProcessPoolWaitTests) ... 2.20s ok test_first_exception_some_already_complete (test.test_concurrent_futures.ProcessPoolWaitTests) ... 1.70s ok test_timeout (test.test_concurrent_futures.ProcessPoolWaitTests) ... 6.18s ok test_duplicate_futures (test.test_concurrent_futures.ThreadPoolAsCompletedTests) ... 2.11s ok test_no_timeout (test.test_concurrent_futures.ThreadPoolAsCompletedTests) ... 0.11s ok test_zero_timeout (test.test_concurrent_futures.ThreadPoolAsCompletedTests) ... 2.10s ok test_default_workers (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.10s ok test_map (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.11s ok test_map_exception (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.11s ok test_map_submits_without_iteration (test.test_concurrent_futures.ThreadPoolExecutorTest) Tests verifying issue 11777. ... 0.11s ok test_map_timeout (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 6.10s ok test_max_workers_negative (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.10s ok test_no_stale_references (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.10s ok test_shutdown_race_issue12456 (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.11s ok test_submit (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.10s ok test_submit_keyword (test.test_concurrent_futures.ThreadPoolExecutorTest) ... 0.10s ok test_context_manager_shutdown (test.test_concurrent_futures.ThreadPoolShutdownTest) ... 0.01s ok test_del_shutdown (test.test_concurrent_futures.ThreadPoolShutdownTest) ... 0.01s ok test_hang_issue12364 (test.test_concurrent_futures.ThreadPoolShutdownTest) ... 1.04s ok test_interpreter_shutdown (test.test_concurrent_futures.ThreadPoolShutdownTest) ... 1.74s ok test_run_after_shutdown (test.test_concurrent_futures.ThreadPoolShutdownTest) ... 0.00s ok test_threads_terminate (test.test_concurrent_futures.ThreadPoolShutdownTest) ... 0.00s ok test_all_completed (test.test_concurrent_futures.ThreadPoolWaitTests) ... 0.11s ok test_first_completed (test.test_concurrent_futures.ThreadPoolWaitTests) ... 1.60s ok test_first_completed_some_already_completed (test.test_concurrent_futures.ThreadPoolWaitTests) ... 1.60s ok test_first_exception (test.test_concurrent_futures.ThreadPoolWaitTests) ... 3.10s ok test_first_exception_one_already_failed (test.test_concurrent_futures.ThreadPoolWaitTests) ... 2.10s ok test_first_exception_some_already_complete (test.test_concurrent_futures.ThreadPoolWaitTests) ... 1.60s ok test_pending_calls_race (test.test_concurrent_futures.ThreadPoolWaitTests) ... 0.90s ok test_timeout (test.test_concurrent_futures.ThreadPoolWaitTests) ... 6.10s ok ====================================================================== ERROR: test_first_completed_some_already_completed (test.test_concurrent_futures.ProcessPoolWaitTests) ---------------------------------------------------------------------- concurrent.futures.process._RemoteTraceback: """ Traceback (most recent call last): File "/Users/db3l/buildarea/3.5.bolen-tiger/build/Lib/concurrent/futures/process.py", line 175, in _process_worker r = call_item.fn(*call_item.args, **call_item.kwargs) ValueError: sleep length must be non-negative """ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/db3l/buildarea/3.5.bolen-tiger/build/Lib/test/test_concurrent_futures.py", line 71, in setUp self._prime_executor() File "/Users/db3l/buildarea/3.5.bolen-tiger/build/Lib/test/test_concurrent_futures.py", line 87, in _prime_executor f.result() File "/Users/db3l/buildarea/3.5.bolen-tiger/build/Lib/concurrent/futures/_base.py", line 398, in result return self.__get_result() File "/Users/db3l/buildarea/3.5.bolen-tiger/build/Lib/concurrent/futures/_base.py", line 357, in __get_result raise self._exception ValueError: sleep length must be non-negative ---------------------------------------------------------------------- Ran 71 tests in 65.994s FAILED (errors=1) Warning -- multiprocessing.process._dangling was modified by test_concurrent_futures Before: <_weakrefset.WeakSet object at 0x1491884> After: <_weakrefset.WeakSet object at 0x1567f14> Warning -- threading._dangling was modified by test_concurrent_futures Before: <_weakrefset.WeakSet object at 0x149161c> After: <_weakrefset.WeakSet object at 0x120db24> test test_concurrent_futures failed ---------- components: Tests, macOS messages: 297639 nosy: bquinlan, haypo, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: [3.5] test_first_completed_some_already_completed() of test_concurrent_futures.ProcessPoolWaitTests: time.sleep() fails with "sleep length must be non-negative" in setUp() on x86 Tiger 3.5 versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 07:10:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 11:10:14 +0000 Subject: [New-bugs-announce] [issue30846] test_rapid_restart() of test_multiprocessing_fork fails randomly on AMD64 Debian PGO 3.6 Message-ID: <1499166614.41.0.795338423823.issue30846@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Debian%20PGO%203.6/builds/517/steps/test/logs/stdio ====================================================================== ERROR: test_rapid_restart (test.test_multiprocessing_fork.WithProcessesTestManagerRestart) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.6.gps-debian-profile-opt.nondebug/build/Lib/test/_test_multiprocessing.py", line 2410, in test_rapid_restart manager.start() File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.6.gps-debian-profile-opt.nondebug/build/Lib/multiprocessing/managers.py", line 517, in start self._address = reader.recv() File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.6.gps-debian-profile-opt.nondebug/build/Lib/multiprocessing/connection.py", line 250, in recv buf = self._recv_bytes() File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.6.gps-debian-profile-opt.nondebug/build/Lib/multiprocessing/connection.py", line 407, in _recv_bytes buf = self._recv(4) File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.6.gps-debian-profile-opt.nondebug/build/Lib/multiprocessing/connection.py", line 383, in _recv raise EOFError EOFError (...) Re-running test 'test_multiprocessing_fork' in verbose mode (...) test_rapid_restart (test.test_multiprocessing_fork.WithManagerTestManagerRestart) ... ok ---------- components: Library (Lib) messages: 297641 nosy: davin, haypo priority: normal severity: normal status: open title: test_rapid_restart() of test_multiprocessing_fork fails randomly on AMD64 Debian PGO 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 09:51:23 2017 From: report at bugs.python.org (Pim Klanke) Date: Tue, 04 Jul 2017 13:51:23 +0000 Subject: [New-bugs-announce] [issue30847] asyncio: selector_events: add_excepter(), 3rd argument of select.select() Message-ID: <1499176283.3.0.750942928243.issue30847@psf.upfronthosting.co.za> New submission from Pim Klanke: depends on bpo-30844 ---------- components: asyncio messages: 297652 nosy: pklanke, yselivanov priority: normal severity: normal status: open title: asyncio: selector_events: add_excepter(), 3rd argument of select.select() type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 11:10:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 15:10:18 +0000 Subject: [New-bugs-announce] [issue30848] test_multiprocessing_forkserver hangs on AMD64 FreeBSD CURRENT Debug 3.x Message-ID: <1499181018.19.0.70320374178.issue30848@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/546/steps/test/logs/stdio ... 0:23:06 load avg: 0.73 [402/406] test_multiprocessing_fork passed (84 sec) -- running: test_multiprocessing_forkserver (287 sec) 0:23:06 load avg: 0.73 [403/406] test_yield_from passed -- running: test_multiprocessing_forkserver (288 sec) 0:23:07 load avg: 0.73 [404/406] test_codecencodings_kr passed -- running: test_multiprocessing_forkserver (288 sec) 0:23:09 load avg: 0.84 [405/406] test_urllib2_localnet passed -- running: test_multiprocessing_forkserver (291 sec) command timed out: 1200 seconds without output running ['make', 'buildbottest', 'TESTOPTS=-j2', 'TESTPYTHONOPTS=', 'TESTTIMEOUT=900'], attempting to kill process killed by signal 9 program finished with exit code -1 elapsedTime=2591.955936 ---------- components: Tests messages: 297671 nosy: haypo priority: normal severity: normal status: open title: test_multiprocessing_forkserver hangs on AMD64 FreeBSD CURRENT Debug 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 11:16:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 15:16:51 +0000 Subject: [New-bugs-announce] [issue30849] test_stress_delivery_dependent() randomly fails on AMD64 Debian root 3.6 Message-ID: <1499181411.1.0.541300647507.issue30849@psf.upfronthosting.co.za> New submission from STINNER Victor: Antoine: I told you that such stess-test is going to require work to polish it. So here is another example of failure. Enjoy :-) http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.6/builds/534/steps/test/logs/stdio == CPython 3.6.2rc1+ (heads/3.6:580cd5c, Jul 5 2017, 00:47:42) [GCC 4.9.2] == Linux-3.16.0-4-amd64-x86_64-with-debian-8.7 little-endian ... == CPU count: 1 ... Run tests in parallel using 2 child processes 0:11:40 load avg: 1.29 [383/405/1] test_signal failed -- running: test_datetime (38 sec) ... ====================================================================== FAIL: test_stress_delivery_dependent (test.test_signal.StressTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.6.angelico-debian-amd64/build/Lib/test/test_signal.py", line 1053, in test_stress_delivery_dependent self.assertEqual(len(sigs), N, "Some signals were lost") AssertionError: 4602 != 10000 : Some signals were lost ====================================================================== FAIL: test_stress_delivery_simultaneous (test.test_signal.StressTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.6.angelico-debian-amd64/build/Lib/test/test_signal.py", line 1086, in test_stress_delivery_simultaneous self.assertEqual(len(sigs), N, "Some signals were lost") AssertionError: 8206 != 10000 : Some signals were lost ---------- assignee: pitrou components: Tests messages: 297674 nosy: haypo, pitrou priority: normal severity: normal status: open title: test_stress_delivery_dependent() randomly fails on AMD64 Debian root 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 11:20:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Jul 2017 15:20:07 +0000 Subject: [New-bugs-announce] [issue30850] [2.7] bsddb3: test01_basic_replication() of test_bsddb3 fails randomly on AMD64 Windows8.1 Refleaks 2.7 Message-ID: <1499181607.72.0.534776800166.issue30850@psf.upfronthosting.co.za> New submission from STINNER Victor: See also bpo-30778: "test_bsddb3 crash on x86 Windows XP 2.7". http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%202.7/builds/40/steps/test/logs/stdio 1:07:30 [145/403/1] test_bsddb3 failed -- running: test_weakref (4038 sec), test_io (2487 sec), test_mmap (1406 sec) test_bsddb3 still working, be patient... test_bsddb3 still working, be patient... test_bsddb3 still working, be patient... Berkeley DB 4.7.25: (May 15, 2008) Test path prefix: d:\temp\z-test_bsddb3-5156 XXX: timeout happened beforestartup was confirmed - see issue 3892 test test_bsddb3 failed -- Traceback (most recent call last): File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\bsddb\test\test_replication.py", line 384, in test01_basic_replication self.assertTrue(time.time() _______________________________________ From report at bugs.python.org Tue Jul 4 21:25:39 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 01:25:39 +0000 Subject: [New-bugs-announce] [issue30851] IDLE: configdialog -- fix tkinter Variables Message-ID: <1499217939.06.0.00487588238252.issue30851@psf.upfronthosting.co.za> New submission from Terry J. Reedy: As part of #30777, Cheryl Sabella listed Variables defined for a tab page, and the use thereof, in the docstring for the tab page. This revealed some anomalies. Duplicate: font_name is defined on font and highlight pages. The first StringVariable should be attached to a widget before the name is rebound. We should investigate after there are tests for the two pages. Unused: for anything deleted, make sure that there is no corresponding trace function left. binding_target (keys) sounds like something that was never an external option but just an internal implementation detail; delete. encoding (general) *is* an external option, but I believe used only by 2.x. Recheck (in config.py also) and probably delete. user_help_browser and help_browser (general) may have once been options. We now use the system browser, which, at least on some systems, users can set. Delete. ---------- assignee: terry.reedy components: IDLE messages: 297692 nosy: csabella, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: configdialog -- fix tkinter Variables type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 4 23:49:48 2017 From: report at bugs.python.org (=?utf-8?b?55ub6IyC5a62?=) Date: Wed, 05 Jul 2017 03:49:48 +0000 Subject: [New-bugs-announce] [issue30852] _PyObject_GC_UNTRACK corruption when call a lambda function with C API Message-ID: <1499226588.16.0.740981062292.issue30852@psf.upfronthosting.co.za> New submission from ???: This corruption is so strange that I can't even reappear it. (gdb) bt #0 0x00000000006d7e9f in func_dealloc.lto_priv () at Objects/funcobject.c:451 #1 0x00000000005c730b in ask (printException=true, okIfFunctionNull=, errorPrefix=0x884bca "", pArgs=0x300dd440, pFunction=0x1d1f1de8) at script.cpp:758 #2 Script::call(_object*, _object*, char const*, bool) (pFunction=0x1d1f1de8, pArgs=0x300dd440, errorPrefix=0x884bca "", okIfFunctionNull=) at /home/smj/original/bwengine/src/lib/pyscript/script.ipp:25 now I know that in _PyObject_GC_UNTRACK, (gdb) x/40x op 0x1d1f1da8: 0x6d 0x6f 0x6e 0x5f 0x73 0x65 0x72 0x76 0x1d1f1db0: 0x65 0x72 0x2f 0x72 0x75 0x6e 0x5f 0x73 0x1d1f1db8: 0x63 0x72 0x69 0x70 0x74 0x2e 0x70 0x79 0x1d1f1dc0: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x1d1f1dc8: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 -> mov -0x20(%rdi),%rax -> %rax = 0 0x1d1f1dd0: 0xf8 0x4d 0xc5 0x2a 0x00 0x00 0x00 0x00 -> mov -0x18(%rdi),%rdx -> %rdx = 0x2ac54df8 0x1d1f1dd8: 0xfe 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x1d1f1de0: 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0x1d1f1de8: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 <--PyFunctionObject ob_refcnt 0 %rdi 0x1d1f1df0: 0x00 0xff 0xba 0x00 0x00 0x00 0x00 0x00 -> _typeobject* -> name function 0x1d1f1df8: 0x30 0x1e 0x78 0x21 0x00 0x00 0x00 0x00 0x1d1f1e00: 0x28 0xaa 0xba 0x24 0x00 0x00 0x00 0x00 0x1d1f1e08: 0x10 0x53 0xfb 0x2f 0x00 0x00 0x00 0x00 When corruption, the ob_refcnt is 0, the gc_refs is _PyGC_REFS_UNTRACKED, the gc_next is NULL but gc_prev is not. How can it be? Is there some unknown bug in GC? ---------- components: Interpreter Core messages: 297696 nosy: ??? priority: normal severity: normal status: open title: _PyObject_GC_UNTRACK corruption when call a lambda function with C API type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 02:03:26 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Jul 2017 06:03:26 +0000 Subject: [New-bugs-announce] [issue30853] IDLE: configdialog -- factor out Variable subclass Message-ID: <1499234606.42.0.386871261381.issue30853@psf.upfronthosting.co.za> New submission from Terry J. Reedy: configdialog.ConfigDialog creates about 20 tk Variables corresponding to configuration options. It defines a var_changed_xyz callback for each xyz variable. 6 have a common template. ConfigDialog turns tracing on in attach_var_callbacks and off in remove_var_callbacks. Each of these two functions has the callbacks set hard-coded. Proposal: Factor out what can. Register callbacks in set when var created. Iterate register to attach and remove callbacks. Something like def IVariable: changes = # set externally somehow var = set() def register(self, callback) if isinstance(callback, tuple): self.callback = default_callback self.args = callback else: self.callback = callback self.vars.add() def default_callback(self): # Used for 6 vars. changes.add_item(*self.args, self.get()) @classmethod def attach(cls): for var in cls.vars: var.trace_add('write', self.callback) @classmethod def remove(cls): for var in cls.vars: var.trace_remove('write', var.trace_info()[0][1]) cls.vars = set() To get String/Int/BooleanVars, maybe this will work. (I have only toyed with multiple inheritance.) class IString(tk.StringVar, IVariable): def __init__(self, callback). StringVar.__init() # Possibly not needed with no value to pass. self.register(callback) ---------- assignee: terry.reedy components: IDLE messages: 297703 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE: configdialog -- factor out Variable subclass type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 03:53:20 2017 From: report at bugs.python.org (Masayuki Yamamoto) Date: Wed, 05 Jul 2017 07:53:20 +0000 Subject: [New-bugs-announce] [issue30854] Compile error on Python/ceval.c Message-ID: <1499241200.52.0.677511540864.issue30854@psf.upfronthosting.co.za> New submission from Masayuki Yamamoto: I found a syntax error when compiling without threads. In that place, the colon has been used instead of semicolon at end of statement. build commands and error log: $ uname -a Linux masayuki-P35-DS3 4.4.0-83-generic #106-Ubuntu SMP Mon Jun 26 17:54:25 UTC 2017 i686 i686 i686 GNU/Linux $ git checkout master $ ./configure --without-threads && LC_ALL=C make -j2 (snip) gcc -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I. -I./Include -DPy_BUILD_CORE -o Python/ceval.o Python/ceval.c Python/ceval.c: In function 'Py_MakePendingCalls': Python/ceval.c:551:23: error: expected ';' before ':' token goto error: ^ Makefile:1551: recipe for target 'Python/ceval.o' failed make: *** [Python/ceval.o] Error 1 related changeset: 3024c0529077f5cff0b32dc84b5923c8fba99a87 [3.6] bpo-30703: Improve signal delivery (GH-2415) (#2527) c08177a1ccad2ed0d50898c2731b518c631aed14 bpo-30703: Improve signal delivery (#2415) I open one line change PR that replaces colon with semicolon for master branch right away. ---------- components: Build messages: 297711 nosy: masamoto, pitrou priority: normal severity: normal status: open title: Compile error on Python/ceval.c type: compile error versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 08:18:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 12:18:47 +0000 Subject: [New-bugs-announce] [issue30855] test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 Message-ID: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Windows8%203.5/builds/323/steps/test/logs/stdio ====================================================================== ERROR: test_use (tkinter.test.test_tkinter.test_widgets.ToplevelTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\3.5.bolen-windows8\build\lib\tkinter\test\test_tkinter\test_widgets.py", line 95, in test_use widget2 = self.create(use=wid) File "D:\buildarea\3.5.bolen-windows8\build\lib\tkinter\test\test_tkinter\test_widgets.py", line 70, in create return tkinter.Toplevel(self.root, **kwargs) File "D:\buildarea\3.5.bolen-windows8\build\lib\tkinter\__init__.py", line 2191, in __init__ BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra) File "D:\buildarea\3.5.bolen-windows8\build\lib\tkinter\__init__.py", line 2148, in __init__ (widgetName, self._w) + extra + self._options(cnf)) _tkinter.TclError: integer value too large to represent ---------- components: Tkinter, Windows messages: 297727 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 09:56:36 2017 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 05 Jul 2017 13:56:36 +0000 Subject: [New-bugs-announce] [issue30856] unittest.TestResult.addSubTest should be called immediately after subtest finishes Message-ID: <1499262996.04.0.921631870961.issue30856@psf.upfronthosting.co.za> New submission from Sergey Fedoseev: Currently TestResult.addSubTest() is called just before TestResult.stopTest(), but docs says that addSubTest is "Called when a subtest finishes". IMO that means that it will be called immediately after subtest finishes, but not after indefinite time. Test is attached. ---------- files: test_subtest.py messages: 297756 nosy: sir-sigurd priority: normal severity: normal status: open title: unittest.TestResult.addSubTest should be called immediately after subtest finishes type: behavior Added file: http://bugs.python.org/file46990/test_subtest.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 10:05:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 05 Jul 2017 14:05:25 +0000 Subject: [New-bugs-announce] [issue30857] test_bsddb3 hangs longer than 37 minutes on x86 Tiger 2.7 Message-ID: <1499263525.13.0.741673625602.issue30857@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Tiger%202.7/builds/227/steps/test/logs/stdio ... running: test_bsddb3 (2204 sec), test_itertools (30 sec) 0:50:54 [394/403] test_itertools passed (42 sec) -- running: test_bsddb3 (2217 sec) 0:51:00 [395/403] test_telnetlib passed -- running: test_bsddb3 (2223 sec) 0:51:06 [396/403] test_urllibnet passed -- running: test_bsddb3 (2228 sec) 0:51:07 [397/403] test_xrange passed -- running: test_bsddb3 (2230 sec) 0:51:07 [398/403] test_buffer passed -- running: test_bsddb3 (2230 sec) 0:51:08 [399/403] test_sys_setprofile passed -- running: test_bsddb3 (2231 sec) 0:51:09 [400/403] test_sysconfig passed -- running: test_bsddb3 (2232 sec) [21696 refs] [21696 refs] 0:51:10 [401/403] test_pkg passed -- running: test_bsddb3 (2233 sec) 0:51:13 [402/403] test_capi passed -- running: test_bsddb3 (2236 sec) command timed out: 1800 seconds without output running ['make', 'buildbottest', 'TESTOPTS=-j2', 'TESTPYTHONOPTS=', 'TESTTIMEOUT=1500'], attempting to kill process killed by signal 9 program finished with exit code -1 elapsedTime=4880.023461 ---------- components: Tests, macOS messages: 297758 nosy: haypo, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: test_bsddb3 hangs longer than 37 minutes on x86 Tiger 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 13:21:20 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Wed, 05 Jul 2017 17:21:20 +0000 Subject: [New-bugs-announce] [issue30858] Keyword can't be an expression? Message-ID: <1499275280.43.0.372385518137.issue30858@psf.upfronthosting.co.za> New submission from Vedran ?a?i?: Look at this (from https://www.quora.com/Is-end1-a-keyword-in-Python-3-6-1): print(end1 + end2 + end3 + end4 + end5 + end6 + end=' ') ^ SyntaxError: keyword can't be an expression Wouldn't it be better if the message said "keyword for an argument must be a simple name"? Or something like that. Newbies, when they think of keywords, they think something from keyword.kwlist, not something used to pass arguments to a function in a particular way. ---------- messages: 297772 nosy: veky priority: normal severity: normal status: open title: Keyword can't be an expression? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 15:23:15 2017 From: report at bugs.python.org (Joe Jacobs) Date: Wed, 05 Jul 2017 19:23:15 +0000 Subject: [New-bugs-announce] [issue30859] Can't install Python for Windows 3.6.1 on multiple profiles Message-ID: <1499282595.77.0.384129179383.issue30859@psf.upfronthosting.co.za> New submission from Joe Jacobs: Windows 7 Ultimate: SP1. Fully pathed as of July 4th, 2017 My Windows 7 install has multiple user accounts. The main install account is set up with "Administrator" privledges. Some point in the past I had installed Python 3.6.1 on the main account. Did not install for all users. That put the python files inside the %appdata% folder. I was then trying to go through the Python Minecraft book with my daughter. We had logged in as my daughters login and tried to install Python 3.6.1 for her. Got an error stating Python was already installed, even though she couldn't access it for her Windows login. Ultimately, had to uninstall Python 3.6, and reinstall for "All users". Would think that multiple users could install Python in their own folder regardless of versions that other people have installed. ---------- components: Windows messages: 297776 nosy: Joe Jacobs, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Can't install Python for Windows 3.6.1 on multiple profiles type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 16:30:30 2017 From: report at bugs.python.org (Eric Snow) Date: Wed, 05 Jul 2017 20:30:30 +0000 Subject: [New-bugs-announce] [issue30860] Consolidate stateful C globals under a single struct. Message-ID: <1499286630.32.0.878971862649.issue30860@psf.upfronthosting.co.za> New submission from Eric Snow: CPython's C code makes extensive use of global variables. The globals fall into one of several categories: * (effectively) constants (incl. static types) * freelists, caches, and counters * used exclusively in main or in REPL * process-global state * module state * Python runtime state Those in the last category are not explicitly organized nor easily discoverable. Among other things, this has an impact on efforts that change the runtime (e.g. my multi-core Python project). To improve the situation I'd like to do the following: 1. group the (stateful) runtime globals into various topical structs 2. consolidate the topical structs under a single top-level _PyRuntimeState struct 3. add a check-c-globals.py script that helps identify runtime globals One side effect of consolidating these globals is a significant performance improvement of CPython. Presumably this is due to the caching behavior of a single struct vs. that of dozens of separate globals. I have a patch and will put up a PR momentarily. ---------- assignee: eric.snow messages: 297780 nosy: eric.snow, haypo, ncoghlan, yselivanov priority: normal severity: normal stage: patch review status: open title: Consolidate stateful C globals under a single struct. type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 16:55:08 2017 From: report at bugs.python.org (pfreixes) Date: Wed, 05 Jul 2017 20:55:08 +0000 Subject: [New-bugs-announce] [issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption Message-ID: <1499288108.18.0.207232280352.issue30861@psf.upfronthosting.co.za> New submission from pfreixes: Current implementation of StreamReader does not take care of the status of the buffer, once an exception has been set via `set_exception` any call to the read methods won't be able to get the missing data still pending to be processed. >From the point of view of the developer, if there is no scheduled task for waiting data into the Streamreader between a network data gets into the buffer socket and a closing connection by the other peer arrives, the developer won't be able to gather the previous data. ---------- components: asyncio messages: 297781 nosy: pfreixes, yselivanov priority: normal severity: normal status: open title: StreamReader does not return reamaing and ready data buffer before raise the Exeption versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 5 21:06:28 2017 From: report at bugs.python.org (TaoQingyun) Date: Thu, 06 Jul 2017 01:06:28 +0000 Subject: [New-bugs-announce] [issue30862] parent logger should also check the level Message-ID: <1499303188.28.0.222364614313.issue30862@psf.upfronthosting.co.za> Changes by TaoQingyun <845767657 at qq.com>: ---------- components: Library (Lib) nosy: qingyunha priority: normal severity: normal status: open title: parent logger should also check the level type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 03:53:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Jul 2017 07:53:21 +0000 Subject: [New-bugs-announce] [issue30863] Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() Message-ID: <1499327601.89.0.422030261957.issue30863@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Since Python 3.3 PyUnicode_AsUnicodeAndSize() is deprecated in favour of PyUnicode_AsWideChar() and PyUnicode_AsWideCharString(). But the latter two are implemented using PyUnicode_AsUnicodeAndSize(). This prevents adding the deprecation compiler warning for PyUnicode_AsUnicodeAndSize(). Other side effect -- PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() cache the wchar_t* representation of the PyUnicode object increasing its memory consumption. Proposed patch reimplements PyUnicode_AsWideChar(), PyUnicode_AsWideCharString() and PyUnicode_AsUnicodeAndSize() using two common helper functions. PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() no longer cache the wchar_t* representation. ---------- components: Interpreter Core, Unicode messages: 297813 nosy: ezio.melotti, haypo, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Rewrite PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 04:36:05 2017 From: report at bugs.python.org (Riccardo Magliocchetti) Date: Thu, 06 Jul 2017 08:36:05 +0000 Subject: [New-bugs-announce] [issue30864] Compile failure for linux socket CAN support Message-ID: <1499330165.39.0.665036659676.issue30864@psf.upfronthosting.co.za> New submission from Riccardo Magliocchetti: I have an issue related to this while trying to compile statically Python 3.6.1 (but latest master looks the same) against a static musl. The problem is that i have AF_CAN defined because it's defined in linux/socket.h but by not having HAVE_LINUX_CAN_H defined in pyconfig.h the header which contains the definition of struct sockaddr_can is not included. I think (at least for linux) using AF_CAN for the conditionals is wrong and the HAVE_LINUX_CAN_H should be used instead. I think the same applies for CAN_RAW and CAN_BCM because they are defined in the generic linux/can.h and not in a feature specific header. Reference: http://bugs.python.org/issue10141 ---------- components: IO messages: 297816 nosy: Riccardo Magliocchetti priority: normal severity: normal status: open title: Compile failure for linux socket CAN support versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 05:51:02 2017 From: report at bugs.python.org (=?utf-8?q?Adrien_Pr=C3=A9?=) Date: Thu, 06 Jul 2017 09:51:02 +0000 Subject: [New-bugs-announce] [issue30865] python cannot import module located on a "VOLUME" directory Message-ID: <1499334662.04.0.074611059565.issue30865@psf.upfronthosting.co.za> New submission from Adrien Pr?: This issue created on python-docker project https://github.com/docker-library/python/issues/210 indicates that python cannot import a module if it is located on a docker-volume. yosifkit's comment suggest there is an issue in the UNC resolution with paths starting with `\\?\` Thesre is probably a fix to do in Lib\ntpath.py, however I am not sure how to fix that. Steps to reproduce the issues are here: https://github.com/apre/windows-volume-issue ---------- components: Library (Lib) messages: 297820 nosy: Adrien Pr? priority: normal severity: normal status: open title: python cannot import module located on a "VOLUME" directory type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 06:51:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Jul 2017 10:51:19 +0000 Subject: [New-bugs-announce] [issue30866] Add _testcapi.stack_pointer() to measure the C stack consumption Message-ID: <1499338279.97.0.650027004501.issue30866@psf.upfronthosting.co.za> New submission from STINNER Victor: In issues bpo-28870, bpo-29227, bpo-29233 and bpo-29234, I worked on reducing the C stack consumption. I now would to add the _testcapi.stack_pointer() that I used to be able to easily measure the stack consumption. Try for example attached stack_overflow-3.py to measure the maximum number of C calls before a C stack overflow. The script also computes the average stack usage per C call for a specific kind of C call. ---------- files: stack_overflow-3.py messages: 297822 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: Add _testcapi.stack_pointer() to measure the C stack consumption versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file46992/stack_overflow-3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 07:37:12 2017 From: report at bugs.python.org (signal1587) Date: Thu, 06 Jul 2017 11:37:12 +0000 Subject: [New-bugs-announce] [issue30867] Add necessary macro `HAVE_OPENSSL_VERIFY_PARAM` to avoid invalid declaration Message-ID: <1499341032.83.0.909280464114.issue30867@psf.upfronthosting.co.za> New submission from signal1587: Compile Python (2.7.13) on platform which has OpenSSL (<0.9.8) will met error: /opt/Python-2.7.13/Modules/_ssl.c:177: error: syntax error before ?*? token Since return type `X509_VERIFY_PARAM` got added to OpenSSL in version 0.9.8. Surround the implementation of function `X509_STORE_get0_param` in (#ifdef HAVE_OPENSSL_VERIFY_PARAM ... #endif) guarantee to solve this problem. ---------- assignee: christian.heimes components: SSL files: _ssl.patch keywords: patch messages: 297825 nosy: christian.heimes, signal1587 priority: normal severity: normal status: open title: Add necessary macro `HAVE_OPENSSL_VERIFY_PARAM` to avoid invalid declaration type: compile error versions: Python 2.7 Added file: http://bugs.python.org/file46993/_ssl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 22:56:35 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Jul 2017 02:56:35 +0000 Subject: [New-bugs-announce] [issue30868] IDLE: Improve configuration tests with mock Save. Message-ID: <1499396195.9.0.947887140078.issue30868@psf.upfronthosting.co.za> New submission from Terry J. Reedy: When writing tests for config and configdialog, I blocked the user configs from hitting the filesystem by passing '' as the file name. This disables the Save function. To know that Save is called, a mock is needed. To know what would have been written to disk, the mock could write to a StringIO. Since there are 4 files and 4 config parsers, there are 4 save functions. I would mock each separately so it can be determined that the right one was called. I plan to create a specialized version of idle_mock.Func with a simplified version of Save's body in the __call__ method. ---------- assignee: terry.reedy components: IDLE messages: 297854 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Improve configuration tests with mock Save. type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 6 23:21:06 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 07 Jul 2017 03:21:06 +0000 Subject: [New-bugs-announce] [issue30869] regrtest: Add .idlerc to saved_test_environment Message-ID: <1499397666.15.0.337246084117.issue30869@psf.upfronthosting.co.za> New submission from Louie Lu: In bpo #30780, there is a mistake of tearDownModule didn't restore the use rCfg. To prevent future mistake, Adding .idlerc to regrtest saved_test_environment, so that `--fail-env-changed` option can detect .idlerc been changed in IDLE test. ---------- components: Library (Lib) messages: 297856 nosy: haypo, louielu, terry.reedy priority: normal severity: normal status: open title: regrtest: Add .idlerc to saved_test_environment versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 03:51:29 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 07 Jul 2017 07:51:29 +0000 Subject: [New-bugs-announce] [issue30870] IDLE: configdialog/fonts: change font when select by key up/down Message-ID: <1499413889.4.0.644010415829.issue30870@psf.upfronthosting.co.za> New submission from Louie Lu: Add event for KeyRelease-Up and KeyRelease-Down to change sample font. Current code only changed font when using button-click on listbox. ---------- assignee: terry.reedy components: IDLE messages: 297867 nosy: louielu, terry.reedy priority: normal severity: normal status: open title: IDLE: configdialog/fonts: change font when select by key up/down versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 10:48:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 07 Jul 2017 14:48:35 +0000 Subject: [New-bugs-announce] [issue30871] Add a "python info" command somewhere to dump versions of all dependencies Message-ID: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> New submission from STINNER Victor: While discussing how to dump the readline version in regrtest or test_readline in bpo-29854, I proposed to add a new buildbot step to dump any kinds of debug information. It would avoid to pollute test output with useless information. For example, while the hash implementation is useful for unit tests on the hash function, I dislike always dumping it in the regrtest header. The idea would be to get a phpinfo-like report: http://php.net/phpinfo We can start with an hardcoded list using "try: import xxx except ImportError: pass else: ...", but later we may it more "pluggable" somehow? Maybe define a protocol (function with a specific name, maybe a private function?) for each module, add a command which can dump info on a single module, or all modules. Maybe start with an hardcoded list of modules, but later discover automatically all stdlib modules? I don't expect a regular list of information, but more like a long key-value list. Attached pythoninfo.py is an example of such script. It works on Python 2.7-3.7. Example of Python 3.7 output on my Linux PC: --- cpu_count: 4 cwd: /home/haypo/prog/GIT/misc/python filesystem_encoding: utf-8 filesystem_errors: surrogateescape gdb_version: GNU gdb (GDB) Fedora 7.12.1-48.fc25 hash algorithm: ('siphash24', '64bit') locale_encoding: UTF-8 platform: Linux-4.11.6-201.fc25.x86_64-x86_64-with-fedora-25-Twenty_Five python_implementation: CPython readline_library_version: 6.3 readline_runtime_version: 0x603 readline_version: 0x603 sys.byteorder: little sys.flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0) sys.maxsize: 9223372036854775807 sys.version: 3.7.0a0 (heads/testcapi_stack_pointer_master:81dd3fb, Jul 6 2017, 13:10:36) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] tcl_version: 8.6 --- Later, we may add a JSON output format, to allow to collect informations of all buildbots. For example, check all tested readline versions. ---------- components: Tests files: pythoninfo.py messages: 297885 nosy: haypo priority: normal severity: normal status: open title: Add a "python info" command somewhere to dump versions of all dependencies type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file46994/pythoninfo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 11:14:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Jul 2017 15:14:13 +0000 Subject: [New-bugs-announce] [issue30872] Update curses docs to Python 3 Message-ID: <1499440453.75.0.308646182968.issue30872@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The curses libraries works with strings and characters. But what are strings? In different functions this means different: Unicode strings, byte strings or any. Proposed PR explains this. It also unifies the documentation of boolean arguments, and fixes some references and formatting. ---------- assignee: docs at python components: Documentation messages: 297892 nosy: docs at python, r.david.murray, serhiy.storchaka, twouters priority: normal severity: normal stage: patch review status: open title: Update curses docs to Python 3 type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 22:29:24 2017 From: report at bugs.python.org (ppperry) Date: Sat, 08 Jul 2017 02:29:24 +0000 Subject: [New-bugs-announce] [issue30873] `SystemError: returned NULL without setting an error` from imp.create_builtin Message-ID: <1499480964.67.0.223894670164.issue30873@psf.upfronthosting.co.za> New submission from ppperry: The following rather long code, reduced from the same example as issue30626, produces a SystemError: import builtins from importlib.machinery import PathFinder import importlib import sys import _imp from functools import partial def copy_module(module): new = type(sys)(module.__name__) new.__dict__.update(module.__dict__) return new _absent = object() def new_exec(code, globals=_absent, locals=_absent, *, new_builtins): if globals == _absent: frame = sys._getframe(2) globals = frame.f_globals locals = frame.f_locals elif locals == _absent: locals = globals globals.setdefault("__builtins__", new_builtins); return exec(code, globals, locals) dct={} dct["__builtins__"] = b = copy_module(builtins) b.exec = partial(new_exec, new_builtins=b) spec = PathFinder.find_spec("_bootstrap",importlib.__path__) source_bootstrap = type(sys)("_bootstrap"); spec.loader.exec_module(source_bootstrap); external_spec = PathFinder.find_spec("_bootstrap_external",importlib.__path__) source_bootstrap_external = type(sys)("_bootstrap_external"); external_spec.loader.exec_module(source_bootstrap_external); source_bootstrap.__name__ = "importlib._bootstrap"; source_bootstrap_external.__name__ = "importlib._bootstrap_external"; new_sys = copy_module(sys) new_sys.path_importer_cache = {} new_sys.path_hooks = [] new_sys.meta_path = [] new_sys.modules = { "importlib._bootstrap":source_bootstrap, "importlib._bootstrap_external":source_bootstrap_external, } for mod in new_sys.modules.values(): mod.__builtins__ = b b.__import__ = source_bootstrap.__import__ source_bootstrap._install(new_sys,_imp) exec("import _pickle", dct) ---------- components: Interpreter Core, Library (Lib) messages: 297924 nosy: brett.cannon, eric.snow, ncoghlan, ppperry priority: normal severity: normal status: open title: `SystemError: returned NULL without setting an error` from imp.create_builtin type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 23:03:49 2017 From: report at bugs.python.org (Alessandro Cannini) Date: Sat, 08 Jul 2017 03:03:49 +0000 Subject: [New-bugs-announce] [issue30874] unittest execute tests twice in some conditions Message-ID: <1499483029.13.0.269254590088.issue30874@psf.upfronthosting.co.za> New submission from Alessandro Cannini: Unittest execute the tests twice in some conditions. You can see the log here: https://travis-ci.org/ale5000-git/test/builds/251382617 based on this code: https://github.com/ale5000-git/test/tree/7a64f24a8bfea0579e30346ba993744272aa9c36 The code to load tests is this: def custom_test_suite(): import unittest return unittest.TestLoader().discover("tests", pattern="*_test.py") ---------- messages: 297927 nosy: Alessandro Cannini priority: normal severity: normal status: open title: unittest execute tests twice in some conditions type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 7 23:07:40 2017 From: report at bugs.python.org (john Forgue) Date: Sat, 08 Jul 2017 03:07:40 +0000 Subject: [New-bugs-announce] [issue30875] round(number[, digits]) does not return value with >12 decimal places Message-ID: <1499483260.9.0.266536317438.issue30875@psf.upfronthosting.co.za> New submission from john Forgue: I have a sensor that returns float with 15 decimal places. Using "round(number[, digits])" in a program I get no rounding Using the same command in the terminal interpreter it returns ... (3 periods) then hangs requiring ^C to continue. I'm using Python 3.4.2 on RasPi Jessie. ---------- components: Library (Lib) messages: 297928 nosy: john Forgue priority: normal severity: normal status: open title: round(number[, digits]) does not return value with >12 decimal places versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 01:07:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Jul 2017 05:07:16 +0000 Subject: [New-bugs-announce] [issue30876] SystemError on import Message-ID: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: It is possible to get SystemError on import (see attached archive). $ ./python -c 'import package.module1' Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/package/module1.py", line 3, in from . import module2 SystemError: Parent module 'package' not loaded, cannot perform relative import SystemError means a programming error in interpreter core or extension. It is comparable to an assert in C code, but without immediate crashing. Since this situation can be provoked by user code, it should be replaced with other exception (KeyError, RuntimeError, ImportError, etc). ---------- components: Interpreter Core files: import-systemerror.zip messages: 297940 nosy: brett.cannon, eric.snow, ncoghlan, serhiy.storchaka priority: normal severity: normal status: open title: SystemError on import type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file46997/import-systemerror.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 02:48:08 2017 From: report at bugs.python.org (PilatFirst) Date: Sat, 08 Jul 2017 06:48:08 +0000 Subject: [New-bugs-announce] [issue30877] possibe typo in json/scanner.py Message-ID: <1499496488.53.0.464628157168.issue30877@psf.upfronthosting.co.za> New submission from PilatFirst: Should "py_make_scanner" return "scan_once" function rather than "_scan_once"? ---------- components: Library (Lib) messages: 297945 nosy: PilatFirst priority: normal severity: normal status: open title: possibe typo in json/scanner.py type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 03:00:06 2017 From: report at bugs.python.org (Kay Hayen) Date: Sat, 08 Jul 2017 07:00:06 +0000 Subject: [New-bugs-announce] [issue30878] The staticmethod doesn't properly reject keyword arguments Message-ID: <1499497206.26.0.40333592604.issue30878@psf.upfronthosting.co.za> New submission from Kay Hayen: Check out this: python3.6 -c "staticmethod(function=1)" Traceback (most recent call last): File "", line 1, in TypeError: staticmethod expected 1 arguments, got 0 python3.6 -c "staticmethod()" Traceback (most recent call last): File "", line 1, in TypeError: staticmethod expected 1 arguments, got 0 python3.6 -c "staticmethod(f=1)" Traceback (most recent call last): File "", line 1, in TypeError: staticmethod expected 1 arguments, got 0 I believe Python 2.7 behaves the same. What should happen is more like this: python3.6 -c "range(f=1)" Traceback (most recent call last): File "", line 1, in TypeError: range() does not take keyword arguments While statically optimizing, I came across this as a first. At least "classmethod" behaves the same. I suppose it is because these are not intended for manual use anymore. I would recommend to fix up the argument parsing to either indicate its rejection of keyword arguments, or to accept "function = " for input (preferred). Thanks, Kay Hayen ---------- components: Interpreter Core messages: 297946 nosy: kayhayen priority: normal severity: normal status: open title: The staticmethod doesn't properly reject keyword arguments versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 12:27:45 2017 From: report at bugs.python.org (Armin Rigo) Date: Sat, 08 Jul 2017 16:27:45 +0000 Subject: [New-bugs-announce] [issue30879] os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes Message-ID: <1499531265.54.0.318966689253.issue30879@psf.upfronthosting.co.za> New submission from Armin Rigo: The ``os`` functions generally accept any buffer-supporting object as file names, and interpret it as if ``bytes()`` had been called on it. However, ``os.listdir(x)`` uses the type of ``x`` to know if it should return a list of bytes or a list of unicodes---and the condition seems to be ``isinstance(x, bytes)``. So we get this kind of inconsistent behaviour: >>> os.listdir(b".") [b'python', b'Include', b'python-config.py', ...] >>> os.listdir(bytearray(b".")) ['python', 'Include', 'python-config.py', ...] ---------- components: Library (Lib) messages: 297960 nosy: arigo priority: normal severity: normal status: open title: os.listdir(bytes) gives a list of bytes, but os.listdir(buffer) gives a list of unicodes type: behavior versions: Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 13:14:16 2017 From: report at bugs.python.org (Evelyn Mitchell) Date: Sat, 08 Jul 2017 17:14:16 +0000 Subject: [New-bugs-announce] [issue30880] PCG random number generator Message-ID: <1499534056.83.0.338813805746.issue30880@psf.upfronthosting.co.za> New submission from Evelyn Mitchell: John Cook tested the quality of the PCG Random Number generator (http://www.pcg-random.org/index.html) and it appears to have good performance. His report is at: https://www.johndcook.com/blog/2017/07/07/testing-the-pcg-random-number-generator/ This is a suggestion to add a PCG implementation. ---------- messages: 297961 nosy: Evelyn Mitchell priority: normal severity: normal status: open title: PCG random number generator type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 8 19:58:09 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 08 Jul 2017 23:58:09 +0000 Subject: [New-bugs-announce] [issue30881] IDLE: add docstrings to browser.py Message-ID: <1499558289.01.0.144008987806.issue30881@psf.upfronthosting.co.za> New submission from Cheryl Sabella: Add docstrings to browser.py to aid to unit test creation. ---------- assignee: terry.reedy components: IDLE messages: 297973 nosy: csabella, terry.reedy priority: normal severity: normal status: open title: IDLE: add docstrings to browser.py type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 13:53:28 2017 From: report at bugs.python.org (Christoph Deil) Date: Sun, 09 Jul 2017 17:53:28 +0000 Subject: [New-bugs-announce] [issue30882] Built-in list disappeared from Python 2.7 intersphinx inventory Message-ID: <1499622808.04.0.381858845257.issue30882@psf.upfronthosting.co.za> New submission from Christoph Deil: We have a project where we sub-class `list`. Since recently our docs build is failing because the intersphinx inventory entry for `list` on Python 2.7 doesn't exist any more. I think this is a regression, because Python 2.7 is supposed to be stable and other functions and classes here are still there, just "list" is missing: https://docs.python.org/2.7/library/functions.html#func-list Just in case someone else sees this issue, the Sphinx warning looks like this: ``` docs/api/pyregion.ShapeList.rst:7: WARNING: py:class reference target not found: list ``` if you have something like ``` class ShapeList(list): """My list sub-class""" ``` ---------- assignee: docs at python components: Documentation messages: 297993 nosy: Christoph.Deil, docs at python priority: normal severity: normal status: open title: Built-in list disappeared from Python 2.7 intersphinx inventory versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 16:48:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Jul 2017 20:48:59 +0000 Subject: [New-bugs-announce] [issue30883] test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address Message-ID: <1499633339.94.0.136665886268.issue30883@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/s390x%20Debian%203.6/builds/530/steps/test/logs/stdio ERROR: test_ftp (test.test_urllib2net.OtherNetworkTests) (url='ftp://ftp.debian.org/debian/README') ERROR: test_ftp_basic (test.test_urllib2net.TimeoutTest) ERROR: test_ftp_default_timeout (test.test_urllib2net.TimeoutTest) ... ftplib.error_temp: 421 There are too many connections from your internet address. ... urllib.error.URLError: ERROR: test_ftp_no_timeout (test.test_urllib2net.TimeoutTest) ERROR: test_ftp_timeout (test.test_urllib2net.TimeoutTest) ---------- components: Tests messages: 297995 nosy: haypo priority: normal severity: normal status: open title: test_urllib2net failed on s390x Debian 3.6: ftp.debian.org error, too many connections from your internet address versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 17:11:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Jul 2017 21:11:20 +0000 Subject: [New-bugs-announce] [issue30884] regrtest -jN --timeout=TIMEOUT should kill child process running longer than TIMEOUT seconds Message-ID: <1499634680.38.0.350592946082.issue30884@psf.upfronthosting.co.za> New submission from STINNER Victor: "regrtest -jN --timeout=TIMEOUT" should kill a child process if it runs longer than TIMEOUT seconds. Maybe not exactly TIMEOUT, but TIMEOUT x 1.2? Example: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x/builds/44/steps/test/logs/stdio running: test_mmap (3165 sec), test_subprocess (8003 sec) 3:03:20 [405/406/1] test_mmap passed (3186 sec) -- running: test_subprocess (8026 sec) beginning 6 repetitions 123456 ...... running: test_subprocess (8056 sec) running: test_subprocess (8086 sec) running: test_subprocess (8116 sec) running: test_subprocess (8146 sec) running: test_subprocess (8176 sec) ... running: test_subprocess (307672 sec) running: test_subprocess (307702 sec) running: test_subprocess (307732 sec) running: test_subprocess (307762 sec) ... ---------- messages: 297998 nosy: haypo priority: normal severity: normal status: open title: regrtest -jN --timeout=TIMEOUT should kill child process running longer than TIMEOUT seconds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 17:58:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Jul 2017 21:58:44 +0000 Subject: [New-bugs-announce] [issue30885] test_subprocess hangs on AMD64 Windows8.1 Refleaks 3.x Message-ID: <1499637524.07.0.247905249864.issue30885@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x/builds/44/steps/test/logs/stdio running: test_mmap (3165 sec), test_subprocess (8003 sec) 3:03:20 [405/406/1] test_mmap passed (3186 sec) -- running: test_subprocess (8026 sec) beginning 6 repetitions 123456 ...... running: test_subprocess (8056 sec) running: test_subprocess (8086 sec) running: test_subprocess (8116 sec) running: test_subprocess (8146 sec) running: test_subprocess (8176 sec) ... running: test_subprocess (307672 sec) running: test_subprocess (307702 sec) running: test_subprocess (307732 sec) running: test_subprocess (307762 sec) ... ---------- components: Tests, Windows messages: 298001 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test_subprocess hangs on AMD64 Windows8.1 Refleaks 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 19:48:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 09 Jul 2017 23:48:51 +0000 Subject: [New-bugs-announce] [issue30886] test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x Message-ID: <1499644131.94.0.651028703754.issue30886@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/557/steps/test/logs/stdio test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ... Warning -- threading_cleanup() failed to cleanup -1 threads after 3 sec (count: 0, dangling: 1) ok ---------- components: Tests messages: 298008 nosy: haypo priority: normal severity: normal status: open title: test_handle_called_with_mp_queue() of test_logging leaks a thread on AMD64 FreeBSD 10.x Shared 3.x type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 20:18:29 2017 From: report at bugs.python.org (David) Date: Mon, 10 Jul 2017 00:18:29 +0000 Subject: [New-bugs-announce] [issue30887] Syntax checking confuses Try: class_instance_name as ... is used before glabal declaration Message-ID: <1499645909.77.0.25257565507.issue30887@psf.upfronthosting.co.za> New submission from David: when I do anything like this: import flask ... try: current_user except NameError: global current_user current_user = User(request.form['parameter1'], request.form['parameter2'], '') I get the error that the_user was 'used' before the global declaration. The try ... except ... is so when the user enters this route / function the first time, a class instance is instantiated, but if they return the second time, the existing class instance is updated in lines of code downstream rather than declared again with the same name, and therefore overwritten. ---------- components: Interpreter Core, macOS messages: 298012 nosy: Davidt, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Syntax checking confuses Try: class_instance_name as ... is used before glabal declaration type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 9 22:13:00 2017 From: report at bugs.python.org (=?utf-8?b?6YKx5Lyf55Wl?=) Date: Mon, 10 Jul 2017 02:13:00 +0000 Subject: [New-bugs-announce] [issue30888] import class not isinstance of the class Message-ID: <1499652780.91.0.730599557685.issue30888@psf.upfronthosting.co.za> New submission from ???: the working directory is like below: bug/ dirc/ __init__.py foo.py foo2.py __init__.py foo1.py in foo.py: ``` class Event(object): pass ``` in foo2.py: ``` from a.foo import Event def fun(): return Event() ``` in foo1.py: ``` from bug.a.foo import Event from bug.a.foo2 import fun assert isinstance(fun(), Event) ``` when i try to execute the code in foo1.py, i got an assertion error. but if i change foo2.py to: ``` from ..a.foo import Event def fun(): return Event() ``` the code in foo1.py can be done well without the assertion error. i think it's about the import mechanism. i have checked pep328 I think when i do "from a.foo import Event", python import Event by the package name "a.foo.Event", but "from ..a.foo import Event" is going to import Event by "bug.a.foo.Event". and it is totally different in python. is it kind of bug python should prevent? ---------- components: macOS messages: 298018 nosy: ned.deily, ronaldoussoren, ??? priority: normal severity: normal status: open title: import class not isinstance of the class type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 00:56:56 2017 From: report at bugs.python.org (Liu Cailiang) Date: Mon, 10 Jul 2017 04:56:56 +0000 Subject: [New-bugs-announce] [issue30889] distutils extra_link_args not working because it is added to cmd last. should before -llibs Message-ID: <1499662616.73.0.0979391647369.issue30889@psf.upfronthosting.co.za> New submission from Liu Cailiang: Following is the executed command line (g++ version 5): g++ -pthread -shared -L/conda/lib -Wl,-rpath=/conda/lib,--no-as-needed /tmp/tmp0lfzn4v9/home/ubuntu/pybind11_opencv_numpy/ndarray_converter.o /tmp/tmp0lfzn4v9/home/ubuntu/pybind11_opencv_numpy/.rendered.cpy.o -L/conda/lib -lopencv_core -lopencv_imgproc -lopencv_imgcodecs -lopencv_video -lopencv_videoio -lopencv_objdetect -lm -lz -lpython3.6m -o /tmp/tmp0lfzn4v9/cpy.cpython-36m-x86_64-linux-gnu.so -Wl,--as-needed -O3 -Wall If -Wl,--as-needed -O3 -Wall is before the .o files, the extra_args work. ---------- components: Installation messages: 298024 nosy: Liu Cailiang priority: normal severity: normal status: open title: distutils extra_link_args not working because it is added to cmd last. should before -llibs type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 02:33:39 2017 From: report at bugs.python.org (DelTos) Date: Mon, 10 Jul 2017 06:33:39 +0000 Subject: [New-bugs-announce] [issue30890] Comment error in Korean language Message-ID: <1499668419.76.0.67681471989.issue30890@psf.upfronthosting.co.za> New submission from DelTos: Like the attached image file, there is a little error in comments. If I write the comments with Korean, the last character is printed small and color is not applied. It can be fixed with pressing space bar once, but I hope it is solved in the editor. ---------- assignee: terry.reedy components: IDLE files: comments_error.png messages: 298028 nosy: DelTos, terry.reedy priority: normal severity: normal status: open title: Comment error in Korean language type: crash versions: Python 3.7 Added file: http://bugs.python.org/file46998/comments_error.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 05:44:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 09:44:24 +0000 Subject: [New-bugs-announce] [issue30891] Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 Message-ID: <1499679864.46.0.419806460775.issue30891@psf.upfronthosting.co.za> New submission from STINNER Victor: 1:36:32 [224/405/1] test_import failed -- running: test_mmap (2236 sec), test_io (2529 sec), test_venv (1437 sec) beginning 6 repetitions 123456 .....test test_import failed -- Traceback (most recent call last): File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\test_import\__init__.py", line 377, in test_concurrency raise exc File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\test_import\__init__.py", line 362, in run import package File "D:\buildarea\3.6.ware-win81-release.refleak\build\lib\test\test_import\data\package\__init__.py", line 2, in package.submodule AttributeError: module 'package' has no attribute 'submodule' ---------- components: Tests, Windows messages: 298044 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Sometimes, test_concurrency() of test_import fails with AttributeError: module 'package' has no attribute 'submodule' on AMD64 Windows8.1 Refleaks 3.6 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 12:47:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 10 Jul 2017 16:47:29 +0000 Subject: [New-bugs-announce] [issue30892] _elementtree: assertion error if stdlib copy module is overriden Message-ID: <1499705249.36.0.609429772513.issue30892@psf.upfronthosting.co.za> New submission from STINNER Victor: The _elementtree fails with an assertion error if the stdlib copy module is overriden by the user. haypo at selma$ mkdir copy/ haypo at selma$ touch copy/__init__.py haypo at selma$ ./python -c 'import _elementtree' python: Objects/abstract.c:153: PyObject_GetItem: Assertion `(item != NULL) ^ (PyErr_Occurred() != NULL)' failed. Aborted (core dumped) ---------- messages: 298073 nosy: haypo priority: normal severity: normal status: open title: _elementtree: assertion error if stdlib copy module is overriden versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 15:11:21 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 10 Jul 2017 19:11:21 +0000 Subject: [New-bugs-announce] [issue30893] Expose importlib._bootstrap._ModuleLockManager in importlib.machinery Message-ID: <1499713881.32.0.331223835576.issue30893@psf.upfronthosting.co.za> New submission from Brett Cannon: Based on all the work currently going into fixing the locking situation for imports, it's probably a good idea to expose it publicly so others can use it. ---------- components: Library (Lib) messages: 298077 nosy: brett.cannon priority: normal severity: normal status: open title: Expose importlib._bootstrap._ModuleLockManager in importlib.machinery type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 17:07:26 2017 From: report at bugs.python.org (George Gillan) Date: Mon, 10 Jul 2017 21:07:26 +0000 Subject: [New-bugs-announce] [issue30894] Python 3.6.1 String Literal Error Not Going to sys.stderr Message-ID: <1499720846.63.0.81780429971.issue30894@psf.upfronthosting.co.za> New submission from George Gillan: Python 3.6.1 String Literal Error Not Going to sys.stderr Using Windows 7 and Python 3.6.1. Attempting to redirect sys.stderr to a file. The application will be deployed via .pyw file instead of .py so the GUI application runs without a console window. Is this fixable or 'as-is' due to the nature of the way the interpreter scans the code? The following code worked as intended. #!/usr/bin/env python3.6 errfile = 'test_err.txt' import sys errorlog = open(errfile, 'w') sys.stderr = errorlog 1/0 The code above produced a file called test_err.txt with the following contents: Traceback (most recent call last): File "C:\Users\George\Coding\Python\test\mintest.py", line 8, in 1/0 ZeroDivisionError: division by zero The following code did not work as intended. #!/usr/bin/env python3.6 errfile = 'test_err.txt' import sys errorlog = open(errfile, 'w') sys.stderr = errorlog print("test) The code above did not create the file test_err.txt with the error going to the console window instead. Copy-paste from the Windows console. The successful test (first) showed nothing in the console window; the error was logged to the file as noted above. The unsuccessful test (second) did not create the file, instead the error was sent to the console. C:\Users\George\Coding\Python\test>mintest C:\Users\George\Coding\Python\test>mintest File "C:\Users\George\Coding\Python\test\mintest.py", line 8 print("test) ^ SyntaxError: EOL while scanning string literal C:\Users\George\Coding\Python\test> PS: This is my first bug/issue submission here. Please coach me as needed if I messed it up. ---------- components: Interpreter Core files: Python361_bug.txt messages: 298083 nosy: George Gillan priority: normal severity: normal status: open title: Python 3.6.1 String Literal Error Not Going to sys.stderr type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47001/Python361_bug.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 18:27:50 2017 From: report at bugs.python.org (Yelson Chevarrias Huaman) Date: Mon, 10 Jul 2017 22:27:50 +0000 Subject: [New-bugs-announce] [issue30895] Decimal arithmetic sum error Message-ID: <1499725670.5.0.432041397966.issue30895@psf.upfronthosting.co.za> New submission from Yelson Chevarrias Huaman: Decimal arithmetic sum error ---------- components: Interpreter Core files: csm.png messages: 298093 nosy: Yelson Chevarrias Huaman priority: normal severity: normal status: open title: Decimal arithmetic sum error type: performance versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file47002/csm.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 19:27:55 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Mon, 10 Jul 2017 23:27:55 +0000 Subject: [New-bugs-announce] [issue30896] BytesWarning in re module when compiling certain bytes patterns Message-ID: <1499729275.42.0.384122493933.issue30896@psf.upfronthosting.co.za> New submission from Jelle Zijlstra: This code in sre_parse (line 738 and down): warnings.warn( 'Flags not at the start of the expression %s%s' % ( source.string[:20], # truncate long regexes ' (truncated)' if len(source.string) > 20 else '', ), DeprecationWarning, stacklevel=7 ) triggers a BytesWarning if you do `_line_re = re.compile(br'^(.*?)$(?m)')`. The fix should be simple; I can try to get a PR in over the next few days. ---------- components: Library (Lib) messages: 298095 nosy: Jelle Zijlstra, ezio.melotti, serhiy.storchaka priority: normal severity: normal status: open title: BytesWarning in re module when compiling certain bytes patterns versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 10 22:35:10 2017 From: report at bugs.python.org (Cooper Lees) Date: Tue, 11 Jul 2017 02:35:10 +0000 Subject: [New-bugs-announce] [issue30897] Add a ismount() to pathlib Message-ID: <1499740510.8.0.375940091685.issue30897@psf.upfronthosting.co.za> New submission from Cooper Lees: It would be nice to have pathlib.Path objects to have a ismount() function to return a bool if it is a POSIX mount point, similar to `os.path.ismount(path)` ---------- components: Library (Lib) messages: 298104 nosy: cooperlees priority: normal severity: normal status: open title: Add a ismount() to pathlib type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 02:02:02 2017 From: report at bugs.python.org (Ben Johnston) Date: Tue, 11 Jul 2017 06:02:02 +0000 Subject: [New-bugs-announce] [issue30898] SSL cert failure running make test during Python 3.6 install Message-ID: <1499752922.62.0.288067889565.issue30898@psf.upfronthosting.co.za> New submission from Ben Johnston: Installing Python 3.6.1 from Python-3.6.1.tar.xz on Ubuntu 16.04.2 LTS, the following tests are failing: ERROR: test_logincapa_with_client_certfile (test.test_imaplib.RemoteIMAP_SSLTest) ERROR: test_logincapa_with_client_ssl_context (test.test_imaplib.RemoteIMAP_SSLTest) ./configure make make test I also tried running ./configure --enable-optimizations, however the tests still failed with identical results. I have uploaded the stdout of the test process, verbose mode during testing also didnt work and reported this error ModuleNotFoundError: No module named 'test.test_that_failed' 1 test failed again: test_that_failed Total duration: 131 ms Tests result: FAILURE make: *** [test] Error 1 Makefile:1018: recipe for target 'test' failed ---------- components: Tests files: test_log.log messages: 298125 nosy: Ben Johnston priority: normal severity: normal status: open title: SSL cert failure running make test during Python 3.6 install type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47005/test_log.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 02:12:54 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 11 Jul 2017 06:12:54 +0000 Subject: [New-bugs-announce] [issue30899] IDLE: Add idle config parser unittest Message-ID: <1499753574.2.0.472414190179.issue30899@psf.upfronthosting.co.za> New submission from Louie Lu: Add IdleConfParser and IdleUserConfParser unittest. ---------- assignee: terry.reedy components: IDLE messages: 298126 nosy: louielu, terry.reedy priority: normal severity: normal status: open title: IDLE: Add idle config parser unittest versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 03:05:27 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 11 Jul 2017 07:05:27 +0000 Subject: [New-bugs-announce] [issue30900] IDLE: Fix configdialog should use wm_withdraw Message-ID: <1499756727.57.0.0640134785598.issue30900@psf.upfronthosting.co.za> New submission from Louie Lu: Introduce in #30728, commit bac7d3363b099d, `self.wm_withdraw` has been changed into `self.withdraw`. This make #30870 un-testable since it using `self.withdraw` will block out `event_generate`. This issue revert `self.widthdraw` to `self.wm_withdraw`. ---------- assignee: terry.reedy components: IDLE messages: 298136 nosy: csabella, louielu, terry.reedy priority: normal severity: normal status: open title: IDLE: Fix configdialog should use wm_withdraw versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 03:23:15 2017 From: report at bugs.python.org (Alexander Kamyanskiy) Date: Tue, 11 Jul 2017 07:23:15 +0000 Subject: [New-bugs-announce] [issue30901] "503 HTTP ERROR" on attempt to access some points of python library documentation Message-ID: <1499757795.27.0.716846714623.issue30901@psf.upfronthosting.co.za> New submission from Alexander Kamyanskiy: I found that some points in Python Library reference documentation are not accessible, I got 503 http error. The problem starts from this link and some points below the 29.14 point of doc list: https://docs.python.org/3/library/fpectl.html Also now I got 503: https://docs.python.org/3/library/custominterp.html https://docs.python.org/3/library/zipimport.html https://docs.python.org/3/library/pkgutil.html https://docs.python.org/3/library/symbol.html https://docs.python.org/3/library/token.html ... In fact I can't say for example that "31. Importing Modules" all inaccessible - I can't access 31.3. modulefinder ? Find modules used by a script 31.4. runpy ? Locating and executing Python modules 31.5. importlib ? The implementation of import but cannot (I got 503 http response): 31.1. zipimport ? Import modules from Zip archives 31.2. pkgutil ? Package extension utility P.S. I've tried to access documentation from absolutely another place and I'm sure it's not my local settings in browser or local firewall or smth like this. ---------- assignee: docs at python components: Documentation messages: 298139 nosy: Alexander Kamyanskiy, docs at python priority: normal severity: normal status: open title: "503 HTTP ERROR" on attempt to access some points of python library documentation type: resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 07:06:26 2017 From: report at bugs.python.org (Joshua) Date: Tue, 11 Jul 2017 11:06:26 +0000 Subject: [New-bugs-announce] [issue30902] Python-Redmine plugin not seeing python install MacOS Message-ID: <1499771186.94.0.447036971017.issue30902@psf.upfronthosting.co.za> New submission from Joshua: trying to install the following on macos sierra 10.12.5. I am trying to install the python-redmine module. i ran the following: sudo easy_install pip pip install python-redmine i get the following output when trying to run a python script: Joshuas-MacBook-Pro:~ joshuaayes$ ./changelog.py Traceback (most recent call last): File "./changelog.py", line 2, in from redmine import Redmine ImportError: No module named redmine Joshuas-MacBook-Pro:~ joshuaayes$ pip install python-redmine Requirement already satisfied: python-redmine in /Library/Python/2.7/site-packages Joshuas-MacBook-Pro:~ joshuaayes$ anyone have any insight why this is not working? ---------- components: Extension Modules messages: 298149 nosy: ayesjm priority: normal severity: normal status: open title: Python-Redmine plugin not seeing python install MacOS versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 08:39:42 2017 From: report at bugs.python.org (Abhijit Mamarde) Date: Tue, 11 Jul 2017 12:39:42 +0000 Subject: [New-bugs-announce] [issue30903] IPv4Network's hostmask attribute doesn't returns string value as mentioned in Documentation. Message-ID: <1499776782.68.0.13911603646.issue30903@psf.upfronthosting.co.za> New submission from Abhijit Mamarde: documentation mentions hostmask attribute of IPv4Network class returns a `string`, but in actual it is returning the object of class IPv4Address URL to official doc: https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Network.hostmask PFA program file to show the actual issue. ---------- assignee: docs at python components: Documentation files: ipaddress_doc_bug.py messages: 298153 nosy: Abhijit Mamarde, docs at python priority: normal severity: normal status: open title: IPv4Network's hostmask attribute doesn't returns string value as mentioned in Documentation. type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47007/ipaddress_doc_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 10:11:00 2017 From: report at bugs.python.org (Leon Helwerda) Date: Tue, 11 Jul 2017 14:11:00 +0000 Subject: [New-bugs-announce] [issue30904] Python 3 logging HTTPHandler sends duplicate Host header Message-ID: <1499782260.84.0.538162652134.issue30904@psf.upfronthosting.co.za> New submission from Leon Helwerda: The logging HTTPHandler sends two Host headers which confuses certain servers. Tested versions: Python 3.6.1 lighttpd/1.4.45 Steps to reproduce (MWE): 1) Set up a lighttpd server which is to act as the logging host (we do not actually implement anything that accepts the input here). Optionally enable the debug settings from https://redmine.lighttpd.net/projects/1/wiki/DebugVariables (specifically, add debug.log-condition-handling = "enable" to /etc/lighttpd/lighttpd.conf) to follow what is happening inside the server. 2) In python3: import logging import logging.handlers handler = logging.handlers.HTTPHandler('localhost', '/') logging.getLogger().setLevel(logging.INFO) logging.getLogger().addHandler(handler) logging.info('hello world') 3) Notice that the access logs in /var/log/lighttpd/access.log show a 400 response for the request (in Python, the response is ignored). If the debugging from 1) is enabled, then /var/log/lighttpd/error.log contains a line "duplicate Host-header -> 400". This is not a bug in lighttpd. The server adheres to RFC7320 (sec. 5.4, p. 44): "A server MUST respond with a 400 (Bad Request) status code [...] to any request message that contains more than one Host header field". A workaround is to put the full URL in the second argument of HTTPRequest: handler = logging.handlers.HTTPHandler('localhost', 'http://localhost/') Then lighttpd follows RFC2616 (sec. 5.2, p. 37): "If Request-URI is an absoluteURI, the host is part of the Request-URI. Any Host header field value in the request MUST be ignored." The origin of this issue is that the http.client.HTTPConnection.putrequest method (called by HTTPHandler.emit) already adds a Host header unless skip_host=True is given. Thus the manual addition of a Host header is duplicate. Other versions like Python 2.7 might also be affected but I did not test. ---------- components: Library (Lib) messages: 298161 nosy: lhelwerd priority: normal severity: normal status: open title: Python 3 logging HTTPHandler sends duplicate Host header type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 10:34:17 2017 From: report at bugs.python.org (Stephen Kelly) Date: Tue, 11 Jul 2017 14:34:17 +0000 Subject: [New-bugs-announce] [issue30905] Embedding should have public API for interactive mode Message-ID: <1499783657.19.0.814858997931.issue30905@psf.upfronthosting.co.za> New submission from Stephen Kelly: Consider the following three snippets: 1) const char* sourceCode = "a = 9\n" "a"; // This is OK! Python runs both lines. // BUT: The value of 'a' is not printed PyRun_StringFlags(sourceCode, Py_file_input, localDictionary, localDictionary, 0); 2) // This is OK! We run one statement at a time: PyRun_StringFlags("a = 9", Py_single_input, localDictionary, localDictionary, 0); // Python prints the value of 'a' because we use Py_single_input! PyRun_StringFlags("a", Py_single_input, localDictionary, localDictionary, 0); 3) const char* sourceCode = "a = 9\n" "a"; // This is NOT OK! Python throws a SyntaxError because we used Py_single_input. PyRun_StringFlags(sourceCode, Py_single_input, localDictionary, localDictionary, 0); The intention is to be able to run script code in an interpreter built into an application, and to maintain two user features: 1) The behavior is the same as the standard python interpreter with regard to printing values automatically without requiring the print() statement. 2) It is allowed to copy/paste possibly multiple lines/statements and execute them These two requirements are in conflict, because while Py_single_input enables the first, it forbids the second. I have worked around this by using internal API in Python-ast.h and setting `mod->kind = Interactive_kind;` before calling `PyAST_CompileEx`, but that should not be needed. ---------- components: Interpreter Core messages: 298162 nosy: steveire priority: normal severity: normal status: open title: Embedding should have public API for interactive mode versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 11 16:43:54 2017 From: report at bugs.python.org (mesheb82) Date: Tue, 11 Jul 2017 20:43:54 +0000 Subject: [New-bugs-announce] [issue30906] os.path.join misjoins paths Message-ID: <1499805834.64.0.51742284415.issue30906@psf.upfronthosting.co.za> New submission from mesheb82: I'm trying to join paths on Windows with data taken from a user generated file. In doing so, I came across: >>> os.path.join('dir1', '/dir2') '/dir2' I'd expect an error or: 'dir1\\dir2' This has been tested and is consistent with Python 2.7.13 and 3.6.1. ---------- components: Library (Lib), Windows messages: 298181 nosy: mesheb82, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: os.path.join misjoins paths versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 09:15:31 2017 From: report at bugs.python.org (Wouter Bolsterlee) Date: Wed, 12 Jul 2017 13:15:31 +0000 Subject: [New-bugs-announce] [issue30907] speed up comparisons to self for built-in containers Message-ID: <1499865331.17.0.239728084792.issue30907@psf.upfronthosting.co.za> New submission from Wouter Bolsterlee: when comparing instances of the built-in container types (dict, list, and others) python assumes that "identity implies equality". this is documented (and assumed) behaviour: "In enforcing reflexivity of elements, the comparison of collections assumes that for a collection element x, x == x is always true. Based on that assumption, element identity is compared first, and element comparison is performed only for distinct elements." https://docs.python.org/3/reference/expressions.html#value-comparisons because of this, various operations such as rich comparison of lists can be sped up by checking for identity first, and only falling back to (possibly) much slower rich comparisons on container elements when two elements are not identical (i.e. id(a) == id(b)). because identity implies equality, comparing a container instance to itself is guaranteed to be true. currently, comparing a list to itself takes O(n) time, which can be measured easily: >>> x = list(range(1000)) >>> %timeit x == x 2.95 ?s ? 19.2 ns per loop (mean ? std. dev. of 7 runs, 100000 loops each) >>> y = list(range(100000)) >>> %timeit y == y 293 ?s ? 3.35 ?s per loop (mean ? std. dev. of 7 runs, 1000 loops each) the second example is 100 times as slow. i will shortly submit a few pull request to make "compare to self" run in O(1) time instead for a few of the built-in containers. ---------- components: Interpreter Core messages: 298213 nosy: wbolster priority: normal severity: normal status: open title: speed up comparisons to self for built-in containers versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 09:26:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 12 Jul 2017 13:26:16 +0000 Subject: [New-bugs-announce] [issue30908] test_os.TestSendfile.test_keywords() leaks dangling threads Message-ID: <1499865976.69.0.386624022037.issue30908@psf.upfronthosting.co.za> New submission from STINNER Victor: The test_keywords() test of test_os.TestSendfile emits a warning about dangling threads: haypo at selma$ ./python -m test --fail-env-changed -R 3:3 test_os -m test.test_os.TestSendfile.test_keywords Run tests sequentially 0:00:00 load avg: 0.53 [1/1] test_os Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) beginning 6 repetitions 123456 Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) .Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) .Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) .Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) .Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) .Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) . test_os failed (env changed) 1 test altered the execution environment: test_os Total duration: 21 sec Tests result: ENV CHANGED ---------- components: Tests messages: 298217 nosy: haypo priority: normal severity: normal status: open title: test_os.TestSendfile.test_keywords() leaks dangling threads type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 11:22:13 2017 From: report at bugs.python.org (Alex Corcoles) Date: Wed, 12 Jul 2017 15:22:13 +0000 Subject: [New-bugs-announce] [issue30909] ServerProxy should not make requests with malformed XML Message-ID: <1499872933.79.0.21578188594.issue30909@psf.upfronthosting.co.za> New submission from Alex Corcoles: https://docs.python.org/3.7/library/xmlrpc.client.html says: """ When passing strings, characters special to XML such as <, >, and & will be automatically escaped. However, it?s the caller?s responsibility to ensure that the string is free of characters that aren?t allowed in XML, such as the control characters with ASCII values between 0 and 31 (except, of course, tab, newline and carriage return); failing to do this will result in an XML-RPC request that isn?t well-formed XML. If you have to pass arbitrary bytes via XML-RPC, use bytes or bytearray classes or the Binary wrapper class described below. """ The XML-RPC spec at http://xmlrpc.scripting.com/spec.html says: """ What characters are allowed in strings? Non-printable characters? Null characters? Can a "string" be used to hold an arbitrary chunk of binary data? Any characters are allowed in a string except < and &, which are encoded as < and &. A string can be used to encode binary data. """ I believe strings should be XML-escaped correctly or at the very least, an assertion should be made to ensure no malformed XML is ever generated. ---------- components: XML messages: 298226 nosy: Alex Corcoles priority: normal severity: normal status: open title: ServerProxy should not make requests with malformed XML type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 12:13:57 2017 From: report at bugs.python.org (Bruno Rosa) Date: Wed, 12 Jul 2017 16:13:57 +0000 Subject: [New-bugs-announce] [issue30910] Add -fexception to ppc64le build Message-ID: <1499876037.27.0.944341854308.issue30910@psf.upfronthosting.co.za> New submission from Bruno Rosa: To correctly throw and catch exceptions in code that is written in both C and C++, the -fexception is needed. This issue was also reported downstream on Debian and Ubuntu: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=862925 ---------- messages: 298231 nosy: brunoalr priority: normal severity: normal status: open title: Add -fexception to ppc64le build versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 13:28:06 2017 From: report at bugs.python.org (Segev Finer) Date: Wed, 12 Jul 2017 17:28:06 +0000 Subject: [New-bugs-announce] [issue30911] Warning in _json.c on platforms where char is unsigned Message-ID: <1499880486.29.0.525155298935.issue30911@psf.upfronthosting.co.za> New submission from Segev Finer: Shows in buildbots: /home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Modules/_json.c: In function ?scanner_new?: /home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Modules/_json.c:1212:5: warning: comparison is always false due to limited range of data type [-Wtype-limits] if (s->strict < 0) ^ This means that the error check doesn't work right. ---------- components: Extension Modules messages: 298239 nosy: Segev Finer priority: normal severity: normal status: open title: Warning in _json.c on platforms where char is unsigned type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 15:51:39 2017 From: report at bugs.python.org (Shlomi Fish) Date: Wed, 12 Jul 2017 19:51:39 +0000 Subject: [New-bugs-announce] [issue30912] python 3 git master fails to find libffi and build _ctypes on Mageia v6 x86-64 Message-ID: <1499889099.43.0.350164863962.issue30912@psf.upfronthosting.co.za> New submission from Shlomi Fish: Running "make" in cpython git master on mageia linux v6 x86-64 gives me this problem with ffi: <<<<<<<< running build running build_ext Header file /usr/include/ffi.h does not define LIBFFI_H or ffi_wrapper_h INFO: Could not locate ffi libs and/or headers The following modules found by detect_modules() in setup.py, have been built by the Makefile instead, as configured by the Setup files: atexit pwd time Failed to build these modules: _ctypes running build_scripts copying and adjusting /home/shlomif/Download/unpack/prog/python/cpython/Tools/scripts/pydoc3 -> build/scripts-3.7 copying and adjusting /home/shlomif/Download/unpack/prog/python/cpython/Tools/scripts/idle3 -> build/scripts-3.7 copying and adjusting /home/shlomif/Download/unpack/prog/python/cpython/Tools/scripts/2to3 -> build/scripts-3.7 copying and adjusting /home/shlomif/Download/unpack/prog/python/cpython/Tools/scripts/pyvenv -> build/scripts-3.7 changing mode of build/scripts-3.7/pydoc3 from 644 to 755 changing mode of build/scripts-3.7/idle3 from 644 to 755 changing mode of build/scripts-3.7/2to3 from 644 to 755 changing mode of build/scripts-3.7/pyvenv from 644 to 755 renaming build/scripts-3.7/pydoc3 to build/scripts-3.7/pydoc3.7 renaming build/scripts-3.7/idle3 to build/scripts-3.7/idle3.7 renaming build/scripts-3.7/2to3 to build/scripts-3.7/2to3-3.7 renaming build/scripts-3.7/pyvenv to build/scripts-3.7/pyvenv-3.7 >>>>>>> <<<<<< commit d1cc037d1442cc35d1b194ec8e50901514360949 Author: Victor Stinner Date: Wed Jul 12 16:05:43 2017 +0200 bpo-30908: Fix dangling thread in test_os.TestSendfile (#2680) tearDown() now clears explicitly the self.server variable to make sure that the thread is completely cleared when tearDownClass() checks if all threads have been cleaned up. Fix the following warning: $ ./python -m test --fail-env-changed -m test.test_os.TestSendfile.test_keywords -R 3:1 test_os (...) Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2) (...) Tests result: ENV CHANGED >>>>> The problem is that my /usr/include/ffi.h looks like this: <<<< #define _MULTIARCH_HEADER ffi.h #include >>>> ---------- components: Build messages: 298243 nosy: shlomif, zach.ware priority: normal severity: normal status: open title: python 3 git master fails to find libffi and build _ctypes on Mageia v6 x86-64 type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 16:10:51 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 12 Jul 2017 20:10:51 +0000 Subject: [New-bugs-announce] [issue30913] IDLE: Document tk Vars, attributes, methods by tab page Message-ID: <1499890251.06.0.648387967688.issue30913@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Among other things, #30777 added docstrings to configdialog. Those for create_page_x methods included a list of 'Configuration attributes' (Tk Variables) with an annotation as to what the Var represents. The list for the font tab already helped when writing tests for the tab. Although the list is redundant with the code, and creates a slight maintenance problem if names are changed, I want to add more lists. The information collected together will be helpful even if not 100% perfect. Beside tests, it will help with configdialog maintenance and refactoring, including extracting more classes from ConfigDialog. Rename 'Configuration attributes' to 'Tk Variables'. For each page, add 'Data attributes' (other than the Vars). The annotation can briefly say what it is. Add 'Methods' (other than the tk var trace methods) related to that one page and if needed, *briefly* what it does (not the whole first line of its docstring). Add 'Widgets bound to self' and the widget class. Most widget names are not bound to self; the ones that are should be the ones that need to be referenced elsewhere, whether in other methods or tests. Expand the single line docstring for create_action_buttons as appropriate. Date attributes include globals help_common and help_pages. Methods include the click handlers. I would like a note on what outside data structure is accessed by the click handlers. Expand the single line create_widgets docstring to include multi-page information. 'Page interactions' would have things like "Font vars trigger redrawing of highlights sample text." Such interactions will have to be accounted for if we create page classes. 'Tracer Methods' would include the methods that affect all tracer methods. 'Other methods' should include anything else, unless addition methods groups are defined. ConfigDialog currently has 71 methods defined by def statements. (There is 1 nested def in ConfigDialog and 4 other defs at the end of the file for 76 total in the file.) I would like all 64 methods other than __init__ and the 6 create_ methods to be accounted for in 1 of the 6 create_ docstrings. I expect this issue to have multiple PRs. ---------- assignee: terry.reedy components: IDLE messages: 298244 nosy: csabella, louielu, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Document tk Vars, attributes, methods by tab page type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 16:21:09 2017 From: report at bugs.python.org (Nir Soffer) Date: Wed, 12 Jul 2017 20:21:09 +0000 Subject: [New-bugs-announce] [issue30914] test_alpn_protocols (test.test_ssl.ThreadedTests) fails on Fedora 26 Message-ID: <1499890869.88.0.0921166346405.issue30914@psf.upfronthosting.co.za> New submission from Nir Soffer: To reproduce: checkout https://github.com/nirs/cpython/commit/9648088e6ccd6d0cc04f450f55628fd8eda3784c mkdir debug cd debug ../configure --with-pydebug make make test ... ====================================================================== FAIL: test_alpn_protocols (test.test_ssl.ThreadedTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/nsoffer/buildbot/worker/fedora26_py36/build/Lib/test/test_ssl.py", line 3272, in test_alpn_protocols self.assertIsInstance(stats, ssl.SSLError) AssertionError: {'compression': None, 'cipher': ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256), 'peercert': {}, 'client_alpn_protocol': None, 'client_npn_protocol': None, 'version': 'TLSv1.2', 'session_reused': False, 'session': <_ssl.Session object at 0x7f8f65a191f8>, 'server_alpn_protocols': [None], 'server_npn_protocols': [None], 'server_shared_ciphers': [[('ECDHE-ECDSA-AES256-GCM-SHA384', 'TLSv1.2', 256), ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES128-GCM-SHA256', 'TLSv1.2', 128), ('ECDHE-RSA-AES128-GCM-SHA256', 'TLSv1.2', 128), ('ECDHE-ECDSA-CHACHA20-POLY1305', 'TLSv1.2', 256), ('ECDHE-RSA-CHACHA20-POLY1305', 'TLSv1.2', 256), ('DHE-DSS-AES256-GCM-SHA384', 'TLSv1.2', 256), ('DHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256), ('DHE-DSS-AES128-GCM-SHA256', 'TLSv1.2', 128), ('DHE-RSA-AES128-GCM-SHA256', 'TLSv1.2', 128), ('DHE-RSA-CHACHA20-POLY1305', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-CCM8', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-CCM', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-SHA384', 'TLSv1.2', 256), ('ECDHE-RSA-AES256-SHA384', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-SHA', 'TLSv1.0', 256), ('ECDHE-RSA-AES256-SHA', 'TLSv1.0', 256), ('DHE-RSA-AES256-CCM8', 'TLSv1.2', 256), ('DHE-RSA-AES256-CCM', 'TLSv1.2', 256), ('DHE-RSA-AES256-SHA256', 'TLSv1.2', 256), ('DHE-DSS-AES256-SHA256', 'TLSv1.2', 256), ('DHE-RSA-AES256-SHA', 'SSLv3', 256), ('DHE-DSS-AES256-SHA', 'SSLv3', 256), ('ECDHE-ECDSA-AES128-CCM8', 'TLSv1.2', 128), ('ECDHE-ECDSA-AES128-CCM', 'TLSv1.2', 128), ('ECDHE-ECDSA-AES128-SHA256', 'TLSv1.2', 128), ('ECDHE-RSA-AES128-SHA256', 'TLSv1.2', 128), ('ECDHE-ECDSA-AES128-SHA', 'TLSv1.0', 128), ('ECDHE-RSA-AES128-SHA', 'TLSv1.0', 128), ('DHE-RSA-AES128-CCM8', 'TLSv1.2', 128), ('DHE-RSA-AES128-CCM', 'TLSv1.2', 128), ('DHE-RSA-AES128-SHA256', 'TLSv1.2', 128), ('DHE-DSS-AES128-SHA256', 'TLSv1.2', 128), ('DHE-RSA-AES128-SHA', 'SSLv3', 128), ('DHE-DSS-AES128-SHA', 'SSLv3', 128), ('ECDHE-ECDSA-CAMELLIA256-SHA384', 'TLSv1.2', 256), ('ECDHE-RSA-CAMELLIA256-SHA384', 'TLSv1.2', 256), ('ECDHE-ECDSA-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('ECDHE-RSA-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('DHE-RSA-CAMELLIA256-SHA256', 'TLSv1.2', 256), ('DHE-DSS-CAMELLIA256-SHA256', 'TLSv1.2', 256), ('DHE-RSA-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('DHE-DSS-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('DHE-RSA-CAMELLIA256-SHA', 'SSLv3', 256), ('DHE-DSS-CAMELLIA256-SHA', 'SSLv3', 256), ('DHE-RSA-CAMELLIA128-SHA', 'SSLv3', 128), ('DHE-DSS-CAMELLIA128-SHA', 'SSLv3', 128), ('AES256-GCM-SHA384', 'TLSv1.2', 256), ('AES128-GCM-SHA256', 'TLSv1.2', 128), ('AES256-CCM8', 'TLSv1.2', 256), ('AES256-CCM', 'TLSv1.2', 256), ('AES128-CCM8', 'TLSv1.2', 128), ('AES128-CCM', 'TLSv1.2', 128), ('AES256-SHA256', 'TLSv1.2', 256), ('AES128-SHA256', 'TLSv1.2', 128), ('AES256-SHA', 'SSLv3', 256), ('AES128-SHA', 'SSLv3', 128), ('CAMELLIA256-SHA256', 'TLSv1.2', 256), ('CAMELLIA128-SHA256', 'TLSv1.2', 128), ('CAMELLIA256-SHA', 'SSLv3', 256), ('CAMELLIA128-SHA', 'SSLv3', 128)]]} is not an instance of Not sure if this is a python issue or Fedora, posting here for now. ---------- components: Tests messages: 298245 nosy: Nir Soffer priority: normal severity: normal status: open title: test_alpn_protocols (test.test_ssl.ThreadedTests) fails on Fedora 26 versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 17:43:23 2017 From: report at bugs.python.org (moxian) Date: Wed, 12 Jul 2017 21:43:23 +0000 Subject: [New-bugs-announce] [issue30915] distutils sometimes assumes wrong C compiler Message-ID: <1499895803.65.0.564820520089.issue30915@psf.upfronthosting.co.za> New submission from moxian: https://github.com/python/cpython/blob/2.7/Lib/distutils/unixccompiler.py#L229 In unixcompiler.py runtime_library_dir_option() function, we get the name of active C compiler the following way: `compiler = os.path.basename(sysconfig.get_config_var("CC"))` This works fine usually, but this gets the compiler that was used while building python itself, which might be different from the one used to build python extension right now. I.e. if we've built the cpython with clang, but want to build some other extension with gcc, we would run `CC=gcc python setup.py build`, passing gcc as the environment variable. The environment variable would be picked up, and override the ones used for compilation of cpython here: https://github.com/python/cpython/blob/2.7/Lib/distutils/sysconfig.py#L179 , so that the compiler binary will be set to "gcc". But the options passed to the compiler will still assume it to be clang, and, e.g. runtime_library_dir_option() mentioned above would fall back to returning catch-all `"-R" + dir` option, since `compiler` is not overriden by environment vars. This breaks compilation, since gcc does not understand how to treat "-R" flag. Example from trying to build bsddb3: gcc-5.4.0 -shared -Wl,-O1 -Wl,--as-needed -O2 -pipe -march=native -ggdb -fno-strict-aliasing /var/tmp/portage/dev-python/bsddb3-6.1.1/work/bsddb3-6.1.1-python2_7/build/temp.linux-x86_64-2.7/Modules/_bsddb.o -L/usr/lib64 -L/usr/lib64 -R/usr/lib64 -ldb-5.3 -lpython2.7 -o /var/tmp/portage/dev-python/bsddb3-6.1.1/work/bsddb3-6.1.1-python2_7/build/lib/bsddb3/_pybsddb.so gcc-5.4.0: error: unrecognized command line option ?-R? I've personally only encountered it with runtime_library_dir_option(), but I presume there are other occurences that get overriden by environment variables only in sysconfig.py, but not in other places. The problem is present in 2.7 and *I think* in 3.6 as well. I think the correct fix would be for get_config_vars() to always respect environment variables, but I don't know enough about the code to feel confident about that. ---------- messages: 298248 nosy: moxian priority: normal severity: normal status: open title: distutils sometimes assumes wrong C compiler versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 12 18:37:45 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 12 Jul 2017 22:37:45 +0000 Subject: [New-bugs-announce] [issue30916] Pre-build OpenSSL and Tcl/Tk for Windows Message-ID: <1499899065.59.0.916676241363.issue30916@psf.upfronthosting.co.za> New submission from Steve Dower: To save time and improve reliability while building CPython, we should pre-build and sign OpenSSL and Tcl/Tk binaries and make it a binary dependency. Our slightly-patched sources will still be available, and it will be relatively easy for people to download and rebuild them, but for most cases (particularly CI/buildbots) we will be able to reuse prebuilt binaries. Since they need to be signed, this basically means it's my responsibility to update the GitHub repo whenever we update Tcl, Tk, Tix or OpenSSL versions. As is usual whenever I get a job, I promise to find a way to mostly automate it :) ---------- assignee: steve.dower components: Build, Windows messages: 298249 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Pre-build OpenSSL and Tcl/Tk for Windows type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 02:40:58 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 13 Jul 2017 06:40:58 +0000 Subject: [New-bugs-announce] [issue30917] IDLE: Add idlelib.config.IdleConf unittest Message-ID: <1499928058.78.0.086484162853.issue30917@psf.upfronthosting.co.za> New submission from Louie Lu: Add idlelib.config.IdleConf unittest. ---------- assignee: terry.reedy components: IDLE messages: 298266 nosy: louielu, terry.reedy priority: normal severity: normal status: open title: IDLE: Add idlelib.config.IdleConf unittest versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 09:49:20 2017 From: report at bugs.python.org (dongdong) Date: Thu, 13 Jul 2017 13:49:20 +0000 Subject: [New-bugs-announce] [issue30918] Unable to launch IDLE in windows 7 Message-ID: <1499953760.37.0.96893907451.issue30918@psf.upfronthosting.co.za> New submission from dongdong: "unable to create user config directory Z:\.idlerc check path and permisssion" It through out this error, when I try to launch the IDLE not as an adminnistrator acount. There is an networed disk memory Z: on my computer this error is caused by configHandler.py script in the Lib/idlelib directory. Here is a solution: https://www.experts-exchange.com/questions/24006687/Invalid-Python-config-directory.html ---------- messages: 298284 nosy: trencyclo priority: normal severity: normal status: open title: Unable to launch IDLE in windows 7 type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 10:03:22 2017 From: report at bugs.python.org (Dimitar Tasev) Date: Thu, 13 Jul 2017 14:03:22 +0000 Subject: [New-bugs-announce] [issue30919] Shared Array Memory Allocation Regression Message-ID: <1499954602.09.0.350222249447.issue30919@psf.upfronthosting.co.za> New submission from Dimitar Tasev: Hello, I have noticed a significant performance regression when allocating a large shared array in Python 3.x versus Python 2.7. The affected module seems to be `multiprocessing`. The function I used for benchmarking: from timeit import timeit timeit('sharedctypes.Array(ctypes.c_float, 500*2048*2048)', 'from multiprocessing import sharedctypes; import ctypes', number=1) And the results from executing it: Python 3.5.2 Out[2]: 182.68500420999771 ------------------- Python 2.7.12 Out[6]: 2.124835968017578 I will try to provide any information you need. Right now I am looking at callgrind/cachegrind without Debug symbols, and can post that, in the meantime I am building Python with Debug and will re-run the callgrind/cachegrind. Allocating the same-size array with numpy doesn't seem to have a difference between Python versions. The numpy command used was `numpy.full((500,2048,2048), 5.0)`. Allocating the same number of list members also doesn't have a difference - `arr = [5.0]*(500*2048*2048)` ---------- files: shared_array_alloc.py messages: 298285 nosy: dtasev priority: normal severity: normal status: open title: Shared Array Memory Allocation Regression type: performance versions: Python 2.7, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file47009/shared_array_alloc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 11:05:55 2017 From: report at bugs.python.org (Syam) Date: Thu, 13 Jul 2017 15:05:55 +0000 Subject: [New-bugs-announce] [issue30920] Sequence Matcher from diff lib is not implementing longest common substring problem correctly Message-ID: <1499958355.33.0.434945478304.issue30920@psf.upfronthosting.co.za> New submission from Syam: Was seeing this lib from difflib import SequenceMatcher not returning the biggest common substring always.. try the example from attachment.. it is returning wrong value, not the biggest substring ---------- components: Build files: script.py messages: 298287 nosy: Syam Mohan priority: normal severity: normal status: open title: Sequence Matcher from diff lib is not implementing longest common substring problem correctly type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file47010/script.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 11:20:19 2017 From: report at bugs.python.org (Sanket) Date: Thu, 13 Jul 2017 15:20:19 +0000 Subject: [New-bugs-announce] [issue30921] Process in not get killed using subprocess.call() in python thread Message-ID: <1499959219.01.0.510047470999.issue30921@psf.upfronthosting.co.za> New submission from Sanket: import threading import subprocess def B(): while True: break cmd="ps -ef | grep 'shell' | awk '{print $2}' | xargs kill -9" subprocess.call(cmd, shell=True) def A(): th = threading.Thread(target=B) th.start() In above code, process with name "shell" have to killed, but its not working. While same when I do in simple without thread, its working ---------- components: Library (Lib) messages: 298288 nosy: sanky8793 priority: normal severity: normal status: open title: Process in not get killed using subprocess.call() in python thread type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 11:46:08 2017 From: report at bugs.python.org (Sanket) Date: Thu, 13 Jul 2017 15:46:08 +0000 Subject: [New-bugs-announce] [issue30922] Process in not get killed using subprocess.call() in python thread Message-ID: <1499960768.83.0.441889883415.issue30922@psf.upfronthosting.co.za> New submission from Sanket: import threading import subprocess def B(): while True: break cmd="ps -ef | grep 'shell' | awk '{print $2}' | xargs kill -9" subprocess.call(cmd, shell=True) def A(): th = threading.Thread(target=B) th.start() In above code, process with name "shell" has to be killed, but its not working. While same when I do in simple without thread, its working Why you are not answering here,at last I just had to deal with answer whether its getting here or else where ---------- components: Library (Lib) messages: 298293 nosy: gvanrossum, sanky8793 priority: normal severity: normal status: open title: Process in not get killed using subprocess.call() in python thread type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 12:36:00 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 13 Jul 2017 16:36:00 +0000 Subject: [New-bugs-announce] [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? Message-ID: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> New submission from St?phane Wirtel: Hi all, Since I use the last version of Fedora 26 with gcc-7.1.1, I have these warnings (see output.txt file) We could add -Wimplicit-fallthrough=0 to Makefile ? it will disable the fallthrough of the coed. What do you think about that ? What's your feedback on this option and can we use it in the case of CPython ? Thank you ---------- files: output.txt messages: 298299 nosy: matrixise priority: normal severity: normal status: open title: Add -Wimplicit-fallthrough=0 to Makefile ? versions: Python 3.7 Added file: http://bugs.python.org/file47012/output.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 13:50:00 2017 From: report at bugs.python.org (John 'Warthog9' Hawley) Date: Thu, 13 Jul 2017 17:50:00 +0000 Subject: [New-bugs-announce] [issue30924] RPM build doc_files needs files separated into separate lines Message-ID: <1499968200.32.0.508510692032.issue30924@psf.upfronthosting.co.za> New submission from John 'Warthog9' Hawley: doc-files should break files up into multiple lines, as per RPM expectation when using %doc section of the RPM spec, it expects multiple files to be listed each on their own line. Currently what gets passed in is: %doc file1 file2 file3 which throws: error: More than one file on a line: file1 error: More than one file on a line: file2 error: More than one file on a line: file3 Expectation is to break the files up into separate lines: %doc file1 file2 file3 which then works as expected with multiple files. ---------- messages: 298301 nosy: warthog9 priority: normal pull_requests: 2761 severity: normal status: open title: RPM build doc_files needs files separated into separate lines versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 13:58:48 2017 From: report at bugs.python.org (John 'Warthog9' Hawley) Date: Thu, 13 Jul 2017 17:58:48 +0000 Subject: [New-bugs-announce] [issue30925] RPM build lacks ability to include other files similar to doc_files Message-ID: <1499968728.03.0.295292899472.issue30925@psf.upfronthosting.co.za> New submission from John 'Warthog9' Hawley: Duplicate doc-files functionality, to inject files into bdist_rpm Enhancement to allow for files that are built outside of what's expected in setup.py to be injected into the bdist files_rpm listing so they are included in the resulting RPM. This effectively duplicates the doc-files functionality, but adds it as additional files to be included. ---------- messages: 298303 nosy: warthog9 priority: normal pull_requests: 2762 severity: normal status: open title: RPM build lacks ability to include other files similar to doc_files type: enhancement versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 16:46:43 2017 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 13 Jul 2017 20:46:43 +0000 Subject: [New-bugs-announce] [issue30926] KeyError with cgitb inspecting exception in generator expression Message-ID: <1499978803.4.0.623875729197.issue30926@psf.upfronthosting.co.za> New submission from Jason R. Coombs: Consider this script, which runs successfully on Python 3: import cgitb import sys def fiter(): assert False yield 1, 1 yield 2, 2 yield 3, 3 try: x = set(id_ for id_, _ in fiter()) except: print cgitb.html(sys.exc_info()) Run the same script on Python 2.7.13 and you get this error: Traceback (most recent call last): File "test.py", line 15, in print(cgitb.html(sys.exc_info())) File ".../cgitb.py", line 130, in html formatvalue=lambda value: '=' + pydoc.html.repr(value)) File ".../inspect.py", line 887, in formatargvalues specs.append(strseq(args[i], convert, join)) File ".../inspect.py", line 840, in strseq return join(map(lambda o, c=convert, j=join: strseq(o, c, j), object)) File ".../inspect.py", line 840, in return join(map(lambda o, c=convert, j=join: strseq(o, c, j), object)) File ".../inspect.py", line 842, in strseq return convert(object) File ".../inspect.py", line 884, in convert return formatarg(name) + formatvalue(locals[name]) KeyError: 'id_' Wrap the generator expression in [] and it also succeeds. Given that the issue only exists on Python 2.7, it may not need to be addressed, but I wanted to log the issue nonetheless. ---------- components: Interpreter Core, Library (Lib) messages: 298314 nosy: jason.coombs priority: normal severity: normal status: open title: KeyError with cgitb inspecting exception in generator expression versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 17:27:56 2017 From: report at bugs.python.org (Robert) Date: Thu, 13 Jul 2017 21:27:56 +0000 Subject: [New-bugs-announce] [issue30927] re.sub() does not work correctly on '.' pattern and \n Message-ID: <1499981276.43.0.226905822671.issue30927@psf.upfronthosting.co.za> New submission from Robert: When running the command re.sub(r'X.', '+', '-X\n-', re.DOTALL) you get '-X\n-' instead of '-+-'. Curiously findall works correctly: re.findall(r'X.', '-X\n-', re.DOTALL) => ['X\n'] ---------- components: Regular Expressions messages: 298316 nosy: ezio.melotti, mrabarnett, mrh1997 priority: normal severity: normal status: open title: re.sub() does not work correctly on '.' pattern and \n type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 13 23:51:28 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Jul 2017 03:51:28 +0000 Subject: [New-bugs-announce] [issue30928] Copy modified blurbs to idlelib/NEWS.txt Message-ID: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> New submission from Terry J. Reedy: As I prepare blurbs, I copy to a private file, replacing 'IDLE' with bpo-nnnnn. And maybe edit a bit more, maybe not. I occasionally copy batches to idlelib/NEWS.txt. The first 2 times with git, I marked PR as trivial, but decided to open this continuing issue to record merges. A script could be written to do this automatically, but it would have to be run just before the blurbs are moved into Python's NEWS. ---------- assignee: terry.reedy components: IDLE messages: 298333 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Copy modified blurbs to idlelib/NEWS.txt type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 08:05:10 2017 From: report at bugs.python.org (Evgeny Boytsov) Date: Fri, 14 Jul 2017 12:05:10 +0000 Subject: [New-bugs-announce] [issue30929] AttributeErrors after import in multithreaded environment Message-ID: <1500033910.01.0.46976407762.issue30929@psf.upfronthosting.co.za> New submission from Evgeny Boytsov: Hello everybody! We are using Python 3.4 running at CentOS 7 x64 and experiencing some problems with simulatenous import of modules from different threads of execution. The attached archive contains simple example, which demonstrates the issue. There is python package called "mod". It contains two sub-packages called "foo" and "bar". They, in turn, contain modules "foo" and "bar" respectively. Another package called "threader" contains function "run_threads()", which runs two threads of execution (using threading) and joins them. First thread of execution imports "mod.foo.foo" from "mod" and calls its function. The second thread does the same, but for module "mod.bar.bar". Finally, there is module "test.py" which calls "threader.run_threads()" and when it returns, tries to import "mod.foo.foo" and call its function. To reproduce the bug you need to run "test.py" for several times. Most of the launches complete successfully. But sometimes we encounter AttributeError during import like that: 'module' object has no attribute 'foo' We've done some investigation in order to clarify this behaviour and added import hook (you can see it in test.py), which logs all import that take place. When the launch completes successfully, the order of imports looks like that: $ python3 test.py [py][import] threader [py][import] threading [py][import] time [py][import] traceback [py][import] linecache [py][import] tokenize [py][import] collections [py][import] _collections [py][import] operator [py][import] _operator [py][import] keyword [py][import] heapq [py][import] itertools [py][import] _heapq [py][import] reprlib [py][import] re [py][import] sre_compile [py][import] _sre [py][import] sre_parse [py][import] sre_constants [py][import] _locale [py][import] copyreg [py][import] token [py][import] mod [py][import] mod.foo [py][import] mod.bar [py][import] mod.foo.foo [py][import] mod.bar.bar print from foo print from bar When the issue arises we see the following: $ python3 test.py [py][import] threader [py][import] threading [py][import] time [py][import] traceback [py][import] linecache [py][import] tokenize [py][import] collections [py][import] _collections [py][import] operator [py][import] _operator [py][import] keyword [py][import] heapq [py][import] itertools [py][import] _heapq [py][import] reprlib [py][import] re [py][import] sre_compile [py][import] _sre [py][import] sre_parse [py][import] sre_constants [py][import] _locale [py][import] copyreg [py][import] token [py][import] mod [py][import] mod.foo [py][import] mod [py][import] mod.bar [py][import] mod.foo.foo [py][import] mod.bar.bar thread of foo: import error 'module' object has no attribute 'foo' print from bar That is when the issue arises there are two imports of package "mod". And the most confusing thing about this scenario is that even after completion of "run_threads()" interpreter can not import "mod.foo.foo" and gives the same AttributeErrors in for-loop inside test.py. ---------- components: Interpreter Core files: mod.zip messages: 298349 nosy: boytsovea priority: normal severity: normal status: open title: AttributeErrors after import in multithreaded environment type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file47014/mod.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 09:21:15 2017 From: report at bugs.python.org (Ivan Marroquin) Date: Fri, 14 Jul 2017 13:21:15 +0000 Subject: [New-bugs-announce] [issue30930] Element wise multiplication issue Message-ID: <1500038475.92.0.561127078607.issue30930@psf.upfronthosting.co.za> New submission from Ivan Marroquin: Hi all, I am using an anaconda 4.3.18 64 bits installation on windows 7. the version of python is 3.6.1 and numpy version is 1.12.1 In Python, I have this element wise multiplication: import numpy as np #read the input data from an ascii file into the attributes_data #variable def rankorder(attribute): sorted_items= np.sort(attribute, axis= 0, kind= 'mergesort') sorted_ids= np.argsort(attribute,axis= 0, kind= 'mergesort') # Find where are repetitions repeat_ids= (np.diff(sorted_items) == 0).astype(int) t_repeat_ids= [0] t_repeat_ids.extend(repeat_ids) # Rank with tieds with/withou skipping rankNoSkip= np.logical_not(t_repeat_ids).astype(int) rankNoSkip= np.cumsum(rankNoSkip) # Pre-allocate rank rank= np.arange(1, len(attribute) + 1) # Adjust for tieds (and skips) for i in range(0, len(rank)): if (t_repeat_ids[i] == 1): rank[i]= rankNoSkip[i] new_rank= np.zeros((len(attribute),1), np.int) for i in range(0, len(rank)): new_rank[sorted_ids[i]]= rank[i] return new_rank rows= np.shape(attributes_data)[0] R= rankorder(attributes_data[:,0]) S= rankorder(attributes_data[:,1]) A= np.zeros((rows), np.float64) A= (R - 1) * (R - 2) * (S - 1) * (S - 2) which for the first 20 and last 20 lines, I get: [[ -490512836 -2014671888 45454500 88877908 168997500 -999033092 234376500 -1459172492 274758300 -1621798592 302597100 -1745619092 323687100 -1807113092 337229100 -1843876292 345487500 -1819378592 339970800 -1782548792]] [[ 269791376 -882944896 -1010138236 -969282796 -132998296 -2128999336 62900136 25346184 1914059608 -1246247072 -2047681696 357533664 -1795623696 1896988000 767556900 757120 2046171488 365504 360674604 499699800 41184000]] In Octave, I have the equivalent script. However, the computed values right at this command line: A= (R - 1) .* (R - 2) .* (S - 1) .* (S - 2) I get these results: Columns 1 through 8: 1.6272e+011 1.0870e+010 4.5454e+007 8.6788e+009 1.6900e+008 7.5909e+009 2.3438e+008 7.1308e+009 Columns 9 through 16: 2.7476e+008 6.9681e+009 3.0260e+008 6.8443e+009 3.2369e+008 6.7828e+009 3.3723e+008 6.7461e+009 Columns 17 through 20: 3.4549e+008 6.7706e+009 3.3997e+008 6.8074e+009 ans = Columns 1 through 8: 4.5648e+009 3.4120e+009 3.2848e+009 3.3257e+009 4.1620e+009 2.1660e+009 6.2900e+007 2.5346e+007 Columns 9 through 16: 1.0504e+010 7.3437e+009 2.2473e+009 3.5753e+008 2.4993e+009 1.8970e+009 7.6756e+008 7.5712e+005 Columns 17 through 21: 6.3411e+009 4.2953e+009 4.6556e+009 4.9970e+008 4.1184e+007 For some reason the computed values in Python are wrong. Any suggestions? In the attached file, the first column corresponds to R variable and the second column corresponds to S variable. Many thanks, Ivan ---------- components: Interpreter Core files: Python_Multiplication.zip messages: 298353 nosy: ivan-marroquin priority: normal severity: normal status: open title: Element wise multiplication issue type: performance versions: Python 3.6 Added file: http://bugs.python.org/file47015/Python_Multiplication.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 12:44:08 2017 From: report at bugs.python.org (Jaume) Date: Fri, 14 Jul 2017 16:44:08 +0000 Subject: [New-bugs-announce] [issue30931] Race condition in asyncore wrongly closes channel Message-ID: <1500050648.86.0.0379661771518.issue30931@psf.upfronthosting.co.za> New submission from Jaume: If a socket is closed and polled here https://github.com/python/cpython/blob/0d0a32fb91cdfea1626e6c6b77a9bc44e15a2b8a/Lib/asyncore.py#L183 the flag returned will be select.POLLNVAL (note that this can happen despite dispatcher.close() being called). This wouldn't be a problem but before here https://github.com/python/cpython/blob/0d0a32fb91cdfea1626e6c6b77a9bc44e15a2b8a/Lib/asyncore.py#L185 a new socket may be created with the same fd (which wouldn't be strange since that fd is now available), so the retrieved socket will be the newly created one instead of the old one and the new one will be close. This is regularly happening to us, I could try to explain better, but that's really it. ---------- messages: 298359 nosy: walkhour priority: normal severity: normal status: open title: Race condition in asyncore wrongly closes channel versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 13:33:35 2017 From: report at bugs.python.org (ethn) Date: Fri, 14 Jul 2017 17:33:35 +0000 Subject: [New-bugs-announce] [issue30932] Identity comparison ("is") fails for floats in Python3 but works in Python2 Message-ID: <1500053615.55.0.91386955415.issue30932@psf.upfronthosting.co.za> New submission from ethn: The identity comparison fails in floats in Python3. >>> -7.3 is -7.3 False While in Python2 >>> -7.3 is -7.3 True ---------- components: Interpreter Core messages: 298363 nosy: ethn priority: normal severity: normal status: open title: Identity comparison ("is") fails for floats in Python3 but works in Python2 type: behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 14:25:23 2017 From: report at bugs.python.org (Bobblehead) Date: Fri, 14 Jul 2017 18:25:23 +0000 Subject: [New-bugs-announce] [issue30933] Python not IEEE 754 float compliant for various zero results Message-ID: <1500056723.71.0.547389061619.issue30933@psf.upfronthosting.co.za> New submission from Bobblehead: >>> (-0)**.5 0.0 Should return -0.0 "Except that squareRoot(?0) shall be ?0", IEEE 754-2008, Section 5.4.1 >>> 1/(-0.0) Traceback (most recent call last): File "", line 1, in ZeroDivisionError: float division by zero >>> 1/(0.0) Traceback (most recent call last): File "", line 1, in ZeroDivisionError: float division by zero Should return -inf, and inf respectively. "For division, when the divisor is zero and the dividend is a finite non-zero number, the sign of the infinity is the exclusive OR of the operands? signs", IEEE 754-2008, Section 7.3 ---------- components: Interpreter Core messages: 298368 nosy: Bobblehead priority: normal severity: normal status: open title: Python not IEEE 754 float compliant for various zero results type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 21:19:45 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Jul 2017 01:19:45 +0000 Subject: [New-bugs-announce] [issue30934] Document how to run coverage for repository idlelib files. Message-ID: <1500081585.35.0.923637622202.issue30934@psf.upfronthosting.co.za> New submission from Terry J. Reedy: I have been using coverage for a few years. Now that I am (again) not the only one writing IDLE tests (others did 3 and 4 years ago), I should document what I do and in particular the policy decision -- test with 'branch=True' -- and the IDLE-specific excludes: .*# htest # if not _utest: if _htest: ---------- assignee: terry.reedy components: IDLE messages: 298379 nosy: csabella, louielu, terry.reedy, wohlganger priority: normal severity: normal stage: needs patch status: open title: Document how to run coverage for repository idlelib files. type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 14 22:03:41 2017 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 15 Jul 2017 02:03:41 +0000 Subject: [New-bugs-announce] [issue30935] document the new behavior of get_event_loop() Python 3.6 Message-ID: <1500084221.73.0.556830879215.issue30935@psf.upfronthosting.co.za> New submission from Chris Jerdonek: Currently, the Python asyncio.get_event_loop() docs don't say that get_event_loop() returns the currently running event loop when it is called from a coroutine: https://docs.python.org/3/library/asyncio-eventloops.html#asyncio.get_event_loop https://docs.python.org/3/library/asyncio-eventloops.html#asyncio.AbstractEventLoopPolicy.get_event_loop This is new behavior that was introduced in Python 3.6 in this issue: https://github.com/python/asyncio/pull/452 Without this, the docs make it seem like get_event_loop() should return the loop that was last passed to set_event_loop(). This could be added with a "Changed in version 3.6" note. ---------- assignee: docs at python components: Documentation messages: 298380 nosy: chris.jerdonek, docs at python priority: normal severity: normal status: open title: document the new behavior of get_event_loop() Python 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 06:43:00 2017 From: report at bugs.python.org (Segev Finer) Date: Sat, 15 Jul 2017 10:43:00 +0000 Subject: [New-bugs-announce] [issue30936] json module ref leaks detected by test_json Message-ID: <1500115380.37.0.433383171828.issue30936@psf.upfronthosting.co.za> New submission from Segev Finer: >From builtbots: test_json leaked [4, 4, 4] references, sum=12 test_json leaked [3, 3, 3] memory blocks, sum=9 1 test failed again: test_json Probably unearthed by: https://github.com/python/cpython/pull/2692 https://github.com/python/cpython/pull/2693 ---------- components: Extension Modules messages: 298391 nosy: Segev Finer, haypo, serhiy.storchaka priority: normal severity: normal status: open title: json module ref leaks detected by test_json type: resource usage versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 10:48:05 2017 From: report at bugs.python.org (Pavel) Date: Sat, 15 Jul 2017 14:48:05 +0000 Subject: [New-bugs-announce] [issue30937] csv module examples miss newline='' when opening files Message-ID: <1500130085.47.0.354601054193.issue30937@psf.upfronthosting.co.za> New submission from Pavel: At the very beginning the csv module documentation (https://docs.python.org/3.7/library/csv.html) advises to open files passing newline='' parameter though three examples don't include it: Here are the examples: 1: >>> import csv >>> with open('names.csv') as csvfile: ... reader = csv.DictReader(csvfile) ... for row in reader: ... print(row['first_name'], row['last_name']) ... Eric Idle John Cleese >>> print(row) OrderedDict([('first_name', 'John'), ('last_name', 'Cleese')]) 2: import csv with open('names.csv', 'w') as csvfile: fieldnames = ['first_name', 'last_name'] writer = csv.DictWriter(csvfile, fieldnames=fieldnames) writer.writeheader() writer.writerow({'first_name': 'Baked', 'last_name': 'Beans'}) writer.writerow({'first_name': 'Lovely', 'last_name': 'Spam'}) writer.writerow({'first_name': 'Wonderful', 'last_name': 'Spam'}) 3: with open('example.csv') as csvfile: dialect = csv.Sniffer().sniff(csvfile.read(1024)) csvfile.seek(0) reader = csv.reader(csvfile, dialect) # ... process CSV file contents here ... ---------- assignee: docs at python components: Documentation messages: 298397 nosy: Pavel, docs at python priority: normal severity: normal status: open title: csv module examples miss newline='' when opening files versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 11:44:42 2017 From: report at bugs.python.org (David Rieger) Date: Sat, 15 Jul 2017 15:44:42 +0000 Subject: [New-bugs-announce] [issue30938] pdb lacks debugger command to list and show all user-defined variables Message-ID: <1500133482.03.0.381129247764.issue30938@psf.upfronthosting.co.za> New submission from David Rieger: IPython's "who" and "whos" command provide a way to list all user-defined variables and inspect them, respectively. At the moment, a way to work around this would be by either using e.g. "pp locals()" to list all local variables, this would however also display non-user-owned variables which makes the output less readable. Another option would be to open an ipython shell inside the pdb shell, this is however unintuitive, just to achieve such a simple task. pdb should offer a "who" command to list the names of all user-owned variables and a "whos" command to list all variables including their type and the assigned value, as known from ipython. ---------- components: Library (Lib) messages: 298398 nosy: David Rieger priority: normal severity: normal status: open title: pdb lacks debugger command to list and show all user-defined variables type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 15 15:19:13 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 15 Jul 2017 19:19:13 +0000 Subject: [New-bugs-announce] [issue30939] Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds Message-ID: <1500146353.65.0.778877813503.issue30939@psf.upfronthosting.co.za> New submission from Ned Deily: [..]/sphinx/util/compat.py:40: RemovedInSphinx17Warning: sphinx.util.compat.Directive is deprecated and will be removed in Sphinx 1.7, please use docutils' instead. RemovedInSphinx17Warning) The solution is to import Directive directly from docutils. PR to follow for master, needs to be cherrypicked to all maintenance branches and, ideally, all current security-only branches. ---------- assignee: docs at python components: Documentation messages: 298401 nosy: brett.cannon, docs at python, larry, ned.deily priority: normal severity: normal stage: patch review status: open title: Sphinx 1.6.3 deprecation warning for sphinx.util.compat.Directive in docs builds versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 12:51:58 2017 From: report at bugs.python.org (George K) Date: Sun, 16 Jul 2017 16:51:58 +0000 Subject: [New-bugs-announce] [issue30940] Documentation for round() is incorrect. Message-ID: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> New submission from George K: The documentation for round states "The return value is an integer if called with one argument, otherwise of the same type as number." This is not the case if the second argument is None. ---------- assignee: docs at python components: Documentation messages: 298442 nosy: George K, docs at python priority: normal severity: normal status: open title: Documentation for round() is incorrect. versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 16 14:24:33 2017 From: report at bugs.python.org (=?utf-8?q?Luc_Boug=C3=A9?=) Date: Sun, 16 Jul 2017 18:24:33 +0000 Subject: [New-bugs-announce] [issue30941] Missing line in example program Message-ID: <1500229473.42.0.394287716986.issue30941@psf.upfronthosting.co.za> New submission from Luc Boug?: On page , the following program is listed. It raises a syntactic error. An empty line is missing after "... n += val" to close the loop body. >>> # iteration >>> n = 0 >>> for val in values: ... n += val >>> print(n) 504 ---------- assignee: docs at python components: Documentation messages: 298445 nosy: docs at python, lucbouge priority: normal severity: normal status: open title: Missing line in example program type: resource usage versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 01:26:44 2017 From: report at bugs.python.org (=?utf-8?q?Andr=C3=A9_Rossi_Korol?=) Date: Mon, 17 Jul 2017 05:26:44 +0000 Subject: [New-bugs-announce] [issue30942] Implement lwalk(levelwalk) function on os.py Message-ID: <1500269204.65.0.629378826366.issue30942@psf.upfronthosting.co.za> New submission from Andr? Rossi Korol: I forked cpython and implemented an lwalk function on os.py. The lwalk funtion behaves exactly like walk(), except that it recurses only to a certain level of depth that can be selected by the user. More information on the lwalk function can be found on "os.py" in my cpython fork. It worked fine when I tested the funtion in a local virtual environment, but when I installed Python 3.7 with my lwalk function implemented in os.py I get an error when I try to test it in my recent Python installation: "TypeError: 'NoneType' object is not iterable". I'd like to know where else I need to add info about my lwalk function so it can be correctly used in a fresh Python installation and so than I can send a Pull Request. ---------- components: Library (Lib) files: os.py hgrepos: 369 messages: 298458 nosy: andrekorol priority: normal severity: normal status: open title: Implement lwalk(levelwalk) function on os.py type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file47017/os.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 04:34:41 2017 From: report at bugs.python.org (zaazbb) Date: Mon, 17 Jul 2017 08:34:41 +0000 Subject: [New-bugs-announce] [issue30943] printf-style Bytes Formatting sometimes do not worked. Message-ID: <1500280481.09.0.825798695797.issue30943@psf.upfronthosting.co.za> New submission from zaazbb: # works. >>> b'\x00\x08%(amount)b'% {b'amount':b'11111'} b'\x00\x0811111' # not work. >>> b'\x11\x00\x08%(amount)b'% {b'amount':b'11111'} b'\x11\x00\x08%(amount)b' # not work. >>> amount=bytearray(b'000000000010') >>> posnum=bytearray(b'423') >>> date_ =b'170717' >>> time_=b'160006' >>> b'\x02\x03\x13\x9f\x00\x00\x04NULL\x9f\x01\x00\x01\x02\x9f\x03\x00\x0c\xd6\xd0\xb9\xfa\xd2\xf8\xc1\xaa\xb2\xe2\xca\xd4\x9f\x04\x00\x0f307310083980007\x9f\x05\x00\x0814025520\x9f\x14\x00\x0200\x9f\x19\x00\x08\xbd\xbb\xd2\xd7\xb3\xc9\xb9\xa6\x9f\x07\x00\x0803072900\x9f\x08\x00\n0014243000\x9f\t\x00\x08\xbd\xf0\xbf\xa8\xd6\xd0\xd0\xc4\x9f\n\x00\x0800092900\x9f\r\x00\x06000145\x9f\x0e\x00\x06000081\x9f\x10\x00\x0c162246168268\x9f\x11\x00\x08%(date)s\x9f\x12\x00\x06%(time)s\x9f\x02\x00\x0c%(amount)s\x9f\x1b\x00\x040000\x9f\x0b\x00\x13622452*********2994\x9f\x0c\x00\x01S\x9f\x0f\x00\x00\x9f\x13\x00.FK:\xbb\xb7\xd3\xce\xd1\xc7\xcc\xab\xb3\xa9\xcf\xed\xd2\xf8\xc1\xaa\xd3\xc5\xbb\xdd\nZX:promo.unionpay.com\n\x9f\x1f\x00\x03%(posnum)s\x9f\x1a\x00\x00\x9f\xa1\x00\x01\x01\x9f\xa0\x00\x01\x01\x03\x00'% {b'amount': amount,b'date': date_,b'time': time_,b'posnum': posnum} b'\x02\x03\x13\x9f\x00\x00\x04NULL\x9f\x01\x00\x01\x02\x9f\x03\x00\x0c\xd6\xd0\xb9\xfa\xd2\xf8\xc1\xaa\xb2\xe2\xca\xd4\x9f\x04\x00\x0f307310083980007\x9f\x05\x00\x0814025520\x9f\x14\x00\x0200\x9f\x19\x00\x08\xbd\xbb\xd2\xd7\xb3\xc9\xb9\xa6\x9f\x07\x00\x0803072900\x9f\x08\x00\n0014243000\x9f\t\x00\x08\xbd\xf0\xbf\xa8\xd6\xd0\xd0\xc4\x9f\n\x00\x0800092900\x9f\r\x00\x06000145\x9f\x0e\x00\x06000081\x9f\x10\x00\x0c162246168268\x9f\x11\x00\x08%(date)s\x9f\x12\x00\x06%(time)s\x9f\x02\x00\x0c%(amount)s\x9f\x1b\x00\x040000\x9f\x0b\x00\x13622452*********2994\x9f\x0c\x00\x01S\x9f\x0f\x00\x00\x9f\x13\x00.FK:\xbb\xb7\xd3\xce\xd1\xc7\xcc\xab\xb3\xa9\xcf\xed\xd2\xf8\xc1\xaa\xd3\xc5\xbb\xdd\nZX:promo.unionpay.com\n\x9f\x1f\x00\x03%(posnum)s\x9f\x1a\x00\x00\x9f\xa1\x00\x01\x01\x9f\xa0\x00\x01\x01\x03\x00' Environment: Python 3.6.1 Windows 10 64bit. ---------- components: Library (Lib) messages: 298465 nosy: zaazbb priority: normal severity: normal status: open title: printf-style Bytes Formatting sometimes do not worked. type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 05:56:37 2017 From: report at bugs.python.org (Arie van Wingerden) Date: Mon, 17 Jul 2017 09:56:37 +0000 Subject: [New-bugs-announce] [issue30944] Python 32 bit install fails on Windows - BitDefender false positives Message-ID: <1500285397.03.0.674657550132.issue30944@psf.upfronthosting.co.za> New submission from Arie van Wingerden: I discovered that BitDefender somehow blocks part of the installation of Python 3.x on Windows, resulting in a completely broken installation. I found this after having turned my system inside out ... @!#$%^&^%$#@ So solving it is either: deinstall BitDefender exclude files from being marked as a virus Maybe this can be mentioned on the install page? ---------- components: Windows messages: 298472 nosy: Arie van Wingerden, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python 32 bit install fails on Windows - BitDefender false positives type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 06:04:34 2017 From: report at bugs.python.org (Cecile Tonglet) Date: Mon, 17 Jul 2017 10:04:34 +0000 Subject: [New-bugs-announce] [issue30945] loop.create_server does not detect if the interface is IPv6 enabled Message-ID: <1500285874.65.0.183073718331.issue30945@psf.upfronthosting.co.za> New submission from Cecile Tonglet: The IPv6 detection in asyncio.base_events.create_server only detect if IPv6 is available instead of checking if the interface can actually support it. I noticed that by using Python in a Docker container (example code to reproduce in attachment): docker run -it --rm -v /tmp/test_ipv6.py:/src/test_ipv6.py python:3.6 python /src/test_ipv6.py Will result in: Traceback (most recent call last): File "/usr/local/lib/python3.6/asyncio/base_events.py", line 1043, in create_server sock.bind(sa) OSError: [Errno 99] Cannot assign requested address During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/src/test_ipv6.py", line 11, in server = loop.run_until_complete(server_creation) File "/usr/local/lib/python3.6/asyncio/base_events.py", line 466, in run_until_complete return future.result() File "/usr/local/lib/python3.6/asyncio/base_events.py", line 1047, in create_server % (sa, err.strerror.lower())) OSError: [Errno 99] error while attempting to bind on address ('::1', 27015, 0, 0): cannot assign requested address By default Docker containers have only IPv4 enabled: 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever 38: eth0 at if39: mtu 1500 qdisc noqueue state UP group default link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff inet 172.17.0.2/16 scope global eth0 valid_lft forever preferred_lft forever I believe this detection mechanism should rely on the interface requested. I found this on the web for Python 2 that manage to get the info per interface: https://pastebin.com/VEnhF1Ht but it's using an external library. However if you change the hostname to 127.0.0.1 it works normally. ---------- components: asyncio files: test_ipv6.py messages: 298474 nosy: cecton, yselivanov priority: normal severity: normal status: open title: loop.create_server does not detect if the interface is IPv6 enabled type: behavior versions: Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file47019/test_ipv6.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 06:31:54 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Jul 2017 10:31:54 +0000 Subject: [New-bugs-announce] [issue30946] readline module has obsolete code Message-ID: <1500287514.28.0.548586494402.issue30946@psf.upfronthosting.co.za> New submission from Antoine Pitrou: The readline module has obsolete code for platforms where GNU readline is older than 2.1 or where select() is not available. ---------- components: Extension Modules messages: 298479 nosy: pitrou priority: low severity: normal stage: needs patch status: open title: readline module has obsolete code type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:18:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Jul 2017 14:18:15 +0000 Subject: [New-bugs-announce] [issue30947] Update embeded copy of libexpat to 2.2.2 Message-ID: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> New submission from STINNER Victor: libexpat released a new version 2.2.2 which seems to contain 2 or 3 security fixes. I'm not sure that Python is affected by these bugs. https://github.com/libexpat/libexpat/blob/R_2_2_2/expat/Changes#L5 Release 2.2.2 Wed July 12 2017 Security fixes: #43 Protect against compilation without any source of high quality entropy enabled, e.g. with CMake build system; commit ff0207e6076e9828e536b8d9cd45c9c92069b895 #60 Windows with _UNICODE: Unintended use of LoadLibraryW with a non-wide string resulted in failure to load advapi32.dll and degradation in quality of used entropy when compiled with _UNICODE for Windows; you can launch existing binaries with EXPAT_ENTROPY_DEBUG=1 in the environment to inspect the quality of entropy used during runtime; commits * 95b95032f907ef1cd17ee7a9a1768010a825d61d * 73a5a2e9c081f49f2d775cf7ced864158b68dc80 [MOX-006] Fix non-NULL parser parameter validation in XML_Parse; resulted in NULL dereference, previously; commit ac256dafdffc9622ab0dc2c62fcecb0dfcfa71fe Bug fixes: #69 Fix improper use of unsigned long long integer literals Other changes: #73 Start requiring a C99 compiler #49 Fix "==" Bashism in configure script #50 Fix too eager getrandom detection for Debian GNU/kFreeBSD #52 and macOS #51 Address lack of stdint.h in Visual Studio 2003 to 2008 #58 Address compile warnings #68 Fix "./buildconf.sh && ./configure" for some versions of Dash for /bin/sh #72 CMake: Ease use of Expat in context of a parent project with multipe CMakeLists.txt files #72 CMake: Resolve mistaken executable permissions #76 Address compile warning with -DNDEBUG (not recommended!) #77 Address compile warning about macro redefinition Special thanks to: Alexander Bluhm Ben Boeckel C?t?lin R?ceanu Kerin Millar L?szl? B?sz?rm?nyi S. P. Zeidler Segev Finer V?clav Slav?k Victor Stinner Viktor Szakats and Radically Open Security -- Previous issue for expat 2.2.1: issue #30694. ---------- messages: 298525 nosy: christian.heimes, gregory.p.smith, haypo, ned.deily priority: normal severity: normal status: open title: Update embeded copy of libexpat to 2.2.2 type: security versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:19:59 2017 From: report at bugs.python.org (Thomas Guettler) Date: Mon, 17 Jul 2017 14:19:59 +0000 Subject: [New-bugs-announce] [issue30948] Docs for __subclasses__(): Add hint that Python imports are lazy Message-ID: <1500301199.65.0.488290423611.issue30948@psf.upfronthosting.co.za> New submission from Thomas Guettler: AFAIK cls.__subclasses__() only returns the classes which the interpreter has already loaded. This means there can be more subclasses in modules where not imported by the current interpreter up to now. https://docs.python.org/3.7/library/stdtypes.html?highlight=subclasses#class.__subclasses__ I think it would be nice to add a hint to the docs that python imports are lazy. What do you think? ---------- messages: 298527 nosy: guettli priority: normal severity: normal status: open title: Docs for __subclasses__(): Add hint that Python imports are lazy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 10:36:43 2017 From: report at bugs.python.org (Daniel Watkins) Date: Mon, 17 Jul 2017 14:36:43 +0000 Subject: [New-bugs-announce] [issue30949] Provide assertion functions in unittest.mock Message-ID: <1500302203.03.0.925103147939.issue30949@psf.upfronthosting.co.za> New submission from Daniel Watkins: The convenience assertion methods on mock objects can be easily mistyped and if they are mistyped, they will silently pass. This can be quite user-hostile. Consider the following: >>> example = Mock() >>> example.assert_called_once() >>> example.assert_caled_once_with(...) This will not raise any exceptions, though the first feels natural and the latter is misspelt. To avoid using the methods, one can type: >>> example = Mock() >>> assert example.call_count == 1 >>> assert example.call_args_list == [call(...)] but the meaning of that latter statement is particularly non-obvious. Instead, it would be great if I could import the assertions from mock as functions, and call them with mock as the first argument: >>> from unittest.mock import assert_called_once # This will be an ImportError >>> example = Mock() >>> assert_caled_once_with(example, ...) # A NameError >>> assert_called_once_with(example, ...) # Great success! ---------- components: Tests messages: 298533 nosy: odd_bloke priority: normal severity: normal status: open title: Provide assertion functions in unittest.mock versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 11:47:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Jul 2017 15:47:25 +0000 Subject: [New-bugs-announce] [issue30950] Convert round() to Arument Clinic Message-ID: <1500306445.79.0.000834391811439.issue30950@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: When the builtins module was converted to Argument Clinic, round() was omitted because existing signature of round() wasn't supported with the inspect module. Now round() supports None as the value for the ndigits arguments, and this is the default value. round() now has the signature round(number, ndigits=None). Proposed PR converts round() to Argument Clinic. This has two benefits: 1. inspect.signature() now works with round. 2. Faster parsing keyword arguments. ---------- components: Interpreter Core messages: 298539 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Convert round() to Arument Clinic type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 13:29:35 2017 From: report at bugs.python.org (Alex Vig) Date: Mon, 17 Jul 2017 17:29:35 +0000 Subject: [New-bugs-announce] [issue30951] Documentation error in inspect module Message-ID: <1500312575.69.0.52467451771.issue30951@psf.upfronthosting.co.za> New submission from Alex Vig: The documentation for co_names in the inspect module is: "tuple of names of local variables" Local variable names are however in co_varnames while co_names contains global variable names. This description should read: "tuple of names of global variables" Relevant StackOverflow post here: https://stackoverflow.com/q/45147260/1953800 ---------- assignee: docs at python components: Documentation messages: 298545 nosy: Alex Vig, docs at python priority: normal severity: normal status: open title: Documentation error in inspect module versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 16:40:19 2017 From: report at bugs.python.org (Big Stone) Date: Mon, 17 Jul 2017 20:40:19 +0000 Subject: [New-bugs-announce] [issue30952] include Math extension in SQlite Message-ID: <1500324019.46.0.539377026115.issue30952@psf.upfronthosting.co.za> New submission from Big Stone: I would be interested in having SQLite shipped with the math extension in python-3.7. The log / exponential function are important for some sql use case like exp(sum(log(x))) ---------- components: Extension Modules messages: 298555 nosy: Big Stone priority: normal severity: normal status: open title: include Math extension in SQlite type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 17:24:58 2017 From: report at bugs.python.org (ppperry) Date: Mon, 17 Jul 2017 21:24:58 +0000 Subject: [New-bugs-announce] [issue30953] Fatal python error when jumping into except clause Message-ID: <1500326698.05.0.0587216442362.issue30953@psf.upfronthosting.co.za> New submission from ppperry: trying to execute the following code: import sys def trace(frame, event, arg): if event == "line" and frame.f_lineno > 12: frame.f_lineno = 12 return None return trace sys.settrace(trace) def error(): try: pass except: pass pass pass error() Produces a fatal error: Fatal Python error: XXX block stack underflow Current thread 0x00000af4 (most recent call first): File "jumpintoexception.py", line 12 in error File "jumpintoexception.py", line 15 in ---------- components: Interpreter Core, Library (Lib) messages: 298556 nosy: ppperry priority: normal severity: normal status: open title: Fatal python error when jumping into except clause type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 17:40:41 2017 From: report at bugs.python.org (Dan Lipsitt) Date: Mon, 17 Jul 2017 21:40:41 +0000 Subject: [New-bugs-announce] [issue30954] backport unittest.TestCase.assertLogs to 2.7? Message-ID: <1500327641.24.0.471974723495.issue30954@psf.upfronthosting.co.za> New submission from Dan Lipsitt: Would it be appropriate to backport unittest.TestCase.assertLogs to python 2.7? This would be a useful feature for me. ---------- components: Library (Lib) messages: 298558 nosy: Dan Lipsitt, ezio.melotti, michael.foord, rbcollins priority: normal severity: normal status: open title: backport unittest.TestCase.assertLogs to 2.7? type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 18:09:08 2017 From: report at bugs.python.org (Mital Ashok) Date: Mon, 17 Jul 2017 22:09:08 +0000 Subject: [New-bugs-announce] [issue30955] \\N in f-string causes next { to be literal if not escaped Message-ID: <1500329348.19.0.0660291861244.issue30955@psf.upfronthosting.co.za> New submission from Mital Ashok: Take this format python code: import unicodedata c = chr(0x012345) To print that character as a string literal, you would expect to do: print(f"'\\N{{{unicodedata.name(c)}}}'") Which should print a literal quote (`'`), a backwards slash (`\\` -> `\`), an `N`, and the two `{{` should escape and print `{`, followed by the f-expression `unicodedata.name(c)`, then the `}}` would print one `}`, and then another literal quote (`'`). However, this raises a `SyntaxError: f-string: single '}' is not allowed`. The way to do this without a syntax error is like so: print(f"'\\N{{unicodedata.name(c)}}}'") Which prints the expected: '\N{CUNEIFORM SIGN URU TIMES KI}' The shortest way to reproduce this is: f'\\N{' Which works, and: f'\\N{{' which raises an error, even though the first one should raise an error (`SyntaxError: f-string: expecting '}'`). ---------- messages: 298563 nosy: Mital Ashok priority: normal severity: normal status: open title: \\N in f-string causes next { to be literal if not escaped versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 17 19:05:28 2017 From: report at bugs.python.org (Arlo Clarke) Date: Mon, 17 Jul 2017 23:05:28 +0000 Subject: [New-bugs-announce] [issue30956] ftplib socket timeout can't be handled Message-ID: <1500332728.63.0.200349009774.issue30956@psf.upfronthosting.co.za> New submission from Arlo Clarke: Stack overflow question with full details: https://stackoverflow.com/questions/45150568/python-ftp-socket-timeout-handling Socket timeout in ftplib can't be handled; a program crash occurs even when the relevant code is wrapped in a general catch-all. ---------- components: IO messages: 298565 nosy: arloclarke priority: normal severity: normal status: open title: ftplib socket timeout can't be handled type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 02:40:11 2017 From: report at bugs.python.org (Simon Bernier St-Pierre) Date: Tue, 18 Jul 2017 06:40:11 +0000 Subject: [New-bugs-announce] [issue30957] pathlib: Path and PurePath cannot be subclassed Message-ID: <1500360011.44.0.112020885927.issue30957@psf.upfronthosting.co.za> New submission from Simon Bernier St-Pierre: Because of the special way Path and PurePath are instantiated, they can't be inherited like a normal class. Here's an example of the issue: >>> import pathlib >>> class MyPath(pathlib.Path): ... pass ... >>> p = MyPath('/home') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.5/pathlib.py", line 969, in __new__ self = cls._from_parts(args, init=False) File "/usr/lib/python3.5/pathlib.py", line 651, in _from_parts drv, root, parts = self._parse_args(args) File "/usr/lib/python3.5/pathlib.py", line 644, in _parse_args return cls._flavour.parse_parts(parts) AttributeError: type object 'MyPath' has no attribute '_flavour' A solution is to get the concrete type of Path via type(Path()) and inherit the class it yields, but it isn't pretty or intuitive. Perhaps a declaration that directs to the proper class could be added to the module. PlatformPath = WindowsPath if os.name == 'nt' else PosixPath PurePlatformPath = ... ---------- components: Library (Lib) messages: 298577 nosy: Simon Bernier St-Pierre priority: normal severity: normal status: open title: pathlib: Path and PurePath cannot be subclassed type: enhancement versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 04:00:43 2017 From: report at bugs.python.org (Leo kerr) Date: Tue, 18 Jul 2017 08:00:43 +0000 Subject: [New-bugs-announce] [issue30958] Scripts folder is empty Message-ID: <1500364843.66.0.331726740083.issue30958@psf.upfronthosting.co.za> New submission from Leo kerr: The Scripts folder is empty when i installed python. ---------- components: Installation messages: 298578 nosy: Onixiya priority: normal severity: normal status: open title: Scripts folder is empty type: performance versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 07:04:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Jul 2017 11:04:22 +0000 Subject: [New-bugs-announce] [issue30959] Constructor signature is duplicated in the help of namedtuples Message-ID: <1500375862.86.0.253059570638.issue30959@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The docstring of namedtuple class starts with the signature of the constructor. But pydoc now outputs the signature of the constructor for classes (see issue29338). As a result, the signature is duplicated in the output. For example: $ ./python -m pydoc functools._CacheInfo Help on class CacheInfo in functools: functools._CacheInfo = class CacheInfo(builtins.tuple) | functools._CacheInfo(hits, misses, maxsize, currsize) | | CacheInfo(hits, misses, maxsize, currsize) | | Method resolution order: ... ---------- components: Library (Lib) messages: 298582 nosy: ncoghlan, rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Constructor signature is duplicated in the help of namedtuples type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 10:35:07 2017 From: report at bugs.python.org (Megha HR) Date: Tue, 18 Jul 2017 14:35:07 +0000 Subject: [New-bugs-announce] [issue30960] Python script is failing to run Message-ID: <1500388507.9.0.411751437565.issue30960@psf.upfronthosting.co.za> New submission from Megha HR: Hi, We are facing below error message whenever we use python. Could you please let me know root cause and steps to overcome this problem. ./python32.sh Fatal Python error: Py_Initialize: Unable to get the locale encoding EOFError: EOF read where not expected Abort (core dumped) Python version: # ./python3.2 -V Python 3.2.2 root at atclvm820> ---------- components: Extension Modules messages: 298589 nosy: Megha priority: normal severity: normal status: open title: Python script is failing to run type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 11:44:55 2017 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 18 Jul 2017 15:44:55 +0000 Subject: [New-bugs-announce] [issue30961] Py_Decref a borrowed reference in _tracemalloc Message-ID: <1500392695.23.0.976097445476.issue30961@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- components: Extension Modules nosy: xiang.zhang priority: normal severity: normal stage: patch review status: open title: Py_Decref a borrowed reference in _tracemalloc versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 16:24:53 2017 From: report at bugs.python.org (Avram) Date: Tue, 18 Jul 2017 20:24:53 +0000 Subject: [New-bugs-announce] [issue30962] Add caching to logging.Logger.isEnabledFor() Message-ID: <1500409493.45.0.605739415496.issue30962@psf.upfronthosting.co.za> New submission from Avram: Checking to see if a log level is enabled can add non-insignificant time to programs with a large number of logging statements. This issue is to track a pull request which introduces caching to the logging module so checking to see if a log level is enabled takes half the current time. Benchmark code is in the referenced pull request ---------- components: Library (Lib) messages: 298612 nosy: aviso priority: normal pull_requests: 2811 severity: normal status: open title: Add caching to logging.Logger.isEnabledFor() type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 17:17:58 2017 From: report at bugs.python.org (Jim Jewett) Date: Tue, 18 Jul 2017 21:17:58 +0000 Subject: [New-bugs-announce] [issue30963] xxlimited.c XxoObject_Check should be XxoObject_CheckExact Message-ID: <1500412678.84.0.816991478409.issue30963@psf.upfronthosting.co.za> New submission from Jim Jewett: https://github.com/python/cpython/blob/master/Modules/xxlimited.c#L28 #define XxoObject_Check(v) (Py_TYPE(v) == Xxo_Type) assumes that the type cannot be subclassed, but does not say so. Since this is demo code, it would be better to use something like decimal: #define PyDec_CheckExact(v) (Py_TYPE(v) == &PyDec_Type) #define PyDec_Check(v) PyObject_TypeCheck(v, &PyDec_Type) I *believe* (but haven't verified) that would be: #define XxoObject_CheckExact(v) (Py_TYPE(v) == &Xxo_Type) #define XxoObject_Check(v) PyObject_TypeCheck(v, &Xxo_Type) ---------- components: Extension Modules messages: 298617 nosy: Jim.Jewett priority: normal severity: normal stage: needs patch status: open title: xxlimited.c XxoObject_Check should be XxoObject_CheckExact type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 18 20:48:01 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 19 Jul 2017 00:48:01 +0000 Subject: [New-bugs-announce] [issue30964] Mention ensurepip in package installation docs Message-ID: <1500425281.82.0.79058660024.issue30964@psf.upfronthosting.co.za> New submission from Nick Coghlan: The package installation docs at https://github.com/python/cpython/blob/master/Doc/installing/index.rst have a section on "Common Installation Issues": https://docs.python.org/3/installing/#common-installation-issues A new entry should be added to this section to cover the case where pip isn't installed by default (e.g. because it was deselected when running the installer), and to suggest trying "python -m ensurepip --default-pip" as a potential remedy. ---------- assignee: docs at python components: Documentation keywords: easy messages: 298622 nosy: docs at python, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Mention ensurepip in package installation docs type: enhancement versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 01:28:37 2017 From: report at bugs.python.org (Mihai Cara) Date: Wed, 19 Jul 2017 05:28:37 +0000 Subject: [New-bugs-announce] [issue30965] Unexpected behavior of operator "in" Message-ID: <1500442117.99.0.958324013572.issue30965@psf.upfronthosting.co.za> New submission from Mihai Cara: Unexpected behavior of operator "in" when checking if a list/tuple/etc. contains a value: >>> 1 in [1] is True False >>> (1 in [1]) is True True Is this a bug? If not, please explain why first variant return False. ---------- messages: 298633 nosy: mcara priority: normal severity: normal status: open title: Unexpected behavior of operator "in" type: behavior versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 04:53:22 2017 From: report at bugs.python.org (Armin Rigo) Date: Wed, 19 Jul 2017 08:53:22 +0000 Subject: [New-bugs-announce] [issue30966] multiprocessing.queues.SimpleQueue leaks 2 fds Message-ID: <1500454402.66.0.425527808924.issue30966@psf.upfronthosting.co.za> New submission from Armin Rigo: multiprocessing.queues.SimpleQueue should have a close() method. This is needed to explicitly release the two file descriptors of the Pipe used internally. Without it, the file descriptors leak if a reference to the SimpleQueue object happens to stay around for longer than expected (e.g. in a reference cycle, or with PyPy). I think the following would do: diff -r 0b72fd1a7641 lib-python/2.7/multiprocessing/queues.py --- a/lib-python/2.7/multiprocessing/queues.py Sun Jul 16 13:41:28 2017 +0200 +++ b/lib-python/2.7/multiprocessing/queues.py Wed Jul 19 10:45:03 2017 +0200 @@ -358,6 +358,11 @@ self._wlock = Lock() self._make_methods() + def close(self): + # PyPy extension: CPython doesn't have this method! + self._reader.close() + self._writer.close() + def empty(self): return not self._reader.poll() ---------- messages: 298645 nosy: arigo priority: normal severity: normal status: open title: multiprocessing.queues.SimpleQueue leaks 2 fds versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 05:46:46 2017 From: report at bugs.python.org (Thomas Mortensson) Date: Wed, 19 Jul 2017 09:46:46 +0000 Subject: [New-bugs-announce] [issue30967] Python core crash during os.fork() on CentOS 6.5 (Python 2.7.13) Message-ID: <1500457606.55.0.0362958437729.issue30967@psf.upfronthosting.co.za> New submission from Thomas Mortensson: Unsure how to re-produce. Have a CoreDump file with the below backtrace. Our module is socc, we were running a Twisted application and Python core dumped giving us the following backtrace. Looks like we failed to spawn a process wsing os.fork() due to a double free in PyThread_ReInitTLS. System Details: CentOS 6.5 Kernel - 2.6.32-696.el6.x86_64 Python 2.7.13 (default, Feb 6 2017, 15:27:35) [GCC 4.8.3 20140911 (Red Hat 4.8.3-10)] on linux2 GDB - GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-64.el6 File "/usr/local/lib/python2.7/site-packages/socc/cloudTransport/transport.py", line 128, in executeProcessInThread line +128 ret = reactor.spawnProcess(execProtocol, args[0], args, env=os.environ, childFDs={0: "w", 1: "r", 2: "r"}) Python backtrace: (gdb) py-bt Traceback (most recent call first): File "/usr/local/lib/python2.7/site-packages/twisted/internet/process.py", line 382, in _fork self.pid = os.fork() File "/usr/local/lib/python2.7/site-packages/twisted/internet/process.py", line 677, in __init__ self._fork(path, uid, gid, executable, args, environment, fdmap=fdmap) File "/usr/local/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 345, in spawnProcess processProtocol, uid, gid, childFDs) File "/usr/local/lib/python2.7/site-packages/socc/cloudTransport/transport.py", line 128, in executeProcessInThread File "/usr/local/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext return func(*args,**kw) File "/usr/local/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/usr/local/lib/python2.7/site-packages/twisted/python/threadpool.py", line 196, in _worker result = context.call(ctx, function, *args, **kwargs) File "/usr/local/lib/python2.7/threading.py", line 754, in run self.__target(*self.__args, **self.__kwargs) File "/usr/local/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/local/lib/python2.7/threading.py", line 774, in __bootstrap self.__bootstrap_inner() /* Forget everything not associated with the current thread id. * This function is called from PyOS_AfterFork(). It is necessary * because other thread ids which were in use at the time of the fork * may be reused for new threads created in the forked process. */ void PyThread_ReInitTLS(void) { long id = PyThread_get_thread_ident(); struct key *p, **q; if (!keymutex) return; /* As with interpreter_lock in PyEval_ReInitThreads() we just create a new lock without freeing the old one */ keymutex = PyThread_allocate_lock(); /* Delete all keys which do not match the current thread id */ q = &keyhead; while ((p = *q) != NULL) { if (p->id != id) { *q = p->next; free((void *)p); <-------------------------FAILED HERE /* NB This does *not* free p->value! */ } else q = &p->next; } } Installed python27-Logbook-debuginfo-0.9.1-1.el6_7.x86_64.rpm python27-PyYAML-debuginfo-3.12-1.x86_64.rpm python27-Twisted-debuginfo-14.0.0-1.x86_64.rpm python27-cffi-debuginfo-1.9.1-1.el6_7.x86_64.rpm python27-cryptography-debuginfo-1.7.2-1.el6_7.x86_64.rpm python27-debuginfo-2.7.13-2.el6_7.x86_64.rpm python27-psutil-debuginfo-5.1.3-1.x86_64.rpm python27-simplejson-debuginfo-3.10.0-1.el6_7.el6_7.x86_64.rpm python27-zope-interface-debuginfo-4.3.3-1.x86_64.rpm Backtrace is: #0 0x00007ffff6db0625 in raise () from /lib64/libc.so.6 #1 0x00007ffff6db1e05 in abort () from /lib64/libc.so.6 #2 0x00007ffff6dee537 in __libc_message () from /lib64/libc.so.6 #3 0x00007ffff6df3f4e in malloc_printerr () from /lib64/libc.so.6 #4 0x00007ffff6df6cad in _int_free () from /lib64/libc.so.6 #5 0x00007ffff7b082a9 in PyThread_ReInitTLS () at Python/thread.c:413 #6 0x00007ffff7b0fbb4 in PyOS_AfterFork () at Modules/signalmodule.c:1004 #7 0x00007ffff7b12cf6 in posix_fork (self=, noargs=) at Modules/posixmodule.c:3875 #8 0x00007ffff7ac8460 in call_function (oparg=, pp_stack=0x7fffdc043fb0) at Python/ceval.c:4336 #9 PyEval_EvalFrameEx (f=f at entry=0x36bb930, throwflag=throwflag at entry=0) at Python/ceval.c:2989 #10 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=, argcount=argcount at entry=7, kws=kws at entry=0x36b54d0, kwcount=1, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3584 #11 0x00007ffff7ac8800 in fast_function (nk=, na=7, n=, pp_stack=0x7fffdc0441f0, func=) at Python/ceval.c:4447 #12 call_function (oparg=, pp_stack=0x7fffdc0441f0) at Python/ceval.c:4372 #13 PyEval_EvalFrameEx (f=f at entry=0x36b5270, throwflag=throwflag at entry=0) at Python/ceval.c:2989 #14 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=args at entry=0x7fffdeaa5e38, argcount=10, kws=kws at entry=0x0, kwcount=kwcount at entry=0, defs=defs at entry=0x7fffeb543068, defcount=defcount at entry=3, closure=0x0) at Python/ceval.c:3584 #15 0x00007ffff7a40760 in function_call (func=0x7fffeb429398, arg=0x7fffdeaa5e20, kw=0x0) at Objects/funcobject.c:523 #16 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffeb429398, arg=arg at entry=0x7fffdeaa5e20, kw=kw at entry=0x0) at Objects/abstract.c:2547 #17 0x00007ffff7a1cec5 in instancemethod_call (func=0x7fffeb429398, arg=0x7fffdeaa5e20, kw=0x0) at Objects/classobject.c:2602 #18 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffdc068820, arg=arg at entry=0x7fffea19c2d0, kw=kw at entry=0x0) at Objects/abstract.c:2547 #19 0x00007ffff7a7c5bf in slot_tp_init (self=0x7fffdc059710, args=0x7fffea19c2d0, kwds=0x0) at Objects/typeobject.c:5806 #20 0x00007ffff7a78ecf in type_call (type=, args=0x7fffea19c2d0, kwds=0x0) at Objects/typeobject.c:765 #21 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0xb89410, arg=arg at entry=0x7fffea19c2d0, kw=kw at entry=0x0) at Objects/abstract.c:2547 #22 0x00007ffff7ac452e in do_call (nk=, na=, pp_stack=0x7fffdc044820, func=) at Python/ceval.c:4569 #23 call_function (oparg=, pp_stack=0x7fffdc044820) at Python/ceval.c:4374 #24 PyEval_EvalFrameEx (f=f at entry=0x36b0c00, throwflag=throwflag at entry=0) at Python/ceval.c:2989 #25 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=, argcount=argcount at entry=4, kws=kws at entry=0x36acac0, kwcount=2, defs=0x7fffedb795a8, defcount=7, closure=0x0) at Python/ceval.c:3584 #26 0x00007ffff7ac8800 in fast_function (nk=, na=4, n=, pp_stack=0x7fffdc044a60, func=) at Python/ceval.c:4447 #27 call_function (oparg=, pp_stack=0x7fffdc044a60) at Python/ceval.c:4372 #28 PyEval_EvalFrameEx (f=f at entry=0x36ac900, throwflag=throwflag at entry=0) at Python/ceval.c:2989 #29 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=args at entry=0x7fffdc068928, argcount=3, kws=kws at entry=0x7ffff7fa4068, kwcount=kwcount at entry=0, defs=defs at entry=0x0, ---Type to continue, or q to quit--- defcount=defcount at entry=0, closure=0x0) at Python/ceval.c:3584 #30 0x00007ffff7a40835 in function_call (func=0x7fffdc0af140, arg=0x7fffdc068910, kw=0x7fffdc060c58) at Objects/funcobject.c:523 #31 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffdc0af140, arg=arg at entry=0x7fffdc068910, kw=kw at entry=0x7fffdc060c58) at Objects/abstract.c:2547 #32 0x00007ffff7ac38d2 in ext_do_call (nk=, na=, flags=, pp_stack=0x7fffdc044d70, func=0x7fffdc0af140) at Python/ceval.c:4666 #33 PyEval_EvalFrameEx (f=f at entry=0x7fffdc078238, throwflag=throwflag at entry=0) at Python/ceval.c:3028 #34 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=args at entry=0x7fffdeac0ea0, argcount=6, kws=kws at entry=0x7ffff7fa4068, kwcount=kwcount at entry=0, defs=defs at entry=0x0, defcount=defcount at entry=0, closure=0x0) at Python/ceval.c:3584 #35 0x00007ffff7a40835 in function_call (func=0x7fffecf8f050, arg=0x7fffdeac0e88, kw=0x7fffdc07ad70) at Objects/funcobject.c:523 #36 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffecf8f050, arg=arg at entry=0x7fffdeac0e88, kw=kw at entry=0x7fffdc07ad70) at Objects/abstract.c:2547 #37 0x00007ffff7ac38d2 in ext_do_call (nk=, na=, flags=, pp_stack=0x7fffdc045070, func=0x7fffecf8f050) at Python/ceval.c:4666 #38 PyEval_EvalFrameEx (f=f at entry=0x7fffdc07b620, throwflag=throwflag at entry=0) at Python/ceval.c:3028 #39 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=args at entry=0x7fffdeac0f08, argcount=6, kws=kws at entry=0x7ffff7fa4068, kwcount=kwcount at entry=0, defs=defs at entry=0x0, defcount=defcount at entry=0, closure=0x0) at Python/ceval.c:3584 #40 0x00007ffff7a40835 in function_call (func=0x7fffecf8f230, arg=0x7fffdeac0ef0, kw=0x7fffdc054d70) at Objects/funcobject.c:523 #41 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffecf8f230, arg=arg at entry=0x7fffdeac0ef0, kw=kw at entry=0x7fffdc054d70) at Objects/abstract.c:2547 #42 0x00007ffff7ac38d2 in ext_do_call (nk=, na=, flags=, pp_stack=0x7fffdc045370, func=0x7fffecf8f230) at Python/ceval.c:4666 #43 PyEval_EvalFrameEx (f=f at entry=0x36ab6a0, throwflag=throwflag at entry=0) at Python/ceval.c:3028 #44 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=args at entry=0x7fffeb4344e8, argcount=1, kws=kws at entry=0x7ffff7fa4068, kwcount=kwcount at entry=0, defs=defs at entry=0x0, defcount=defcount at entry=0, closure=0x0) at Python/ceval.c:3584 #45 0x00007ffff7a40835 in function_call (func=0x7fffdc07f2a8, arg=0x7fffeb4344d0, kw=0x7fffdc061910) at Objects/funcobject.c:523 #46 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffdc07f2a8, arg=arg at entry=0x7fffeb4344d0, kw=kw at entry=0x7fffdc061910) at Objects/abstract.c:2547 #47 0x00007ffff7ac38d2 in ext_do_call (nk=, na=, flags=, pp_stack=0x7fffdc045670, func=0x7fffdc07f2a8) at Python/ceval.c:4666 #48 PyEval_EvalFrameEx (f=f at entry=0x7fffdc075cc8, throwflag=throwflag at entry=0) at Python/ceval.c:3028 #49 0x00007ffff7ac891b in fast_function (nk=, na=1, n=, pp_stack=0x7fffdc045800, func=) at Python/ceval.c:4437 #50 call_function (oparg=, pp_stack=0x7fffdc045800) at Python/ceval.c:4372 #51 PyEval_EvalFrameEx (f=f at entry=0x36aaa60, throwflag=throwflag at entry=0) at Python/ceval.c:2989 #52 0x00007ffff7ac891b in fast_function (nk=, na=1, n=, pp_stack=0x7fffdc0459a0, func=) at Python/ceval.c:4437 #53 call_function (oparg=, pp_stack=0x7fffdc0459a0) at Python/ceval.c:4372 #54 PyEval_EvalFrameEx (f=f at entry=0x7fffdc076e50, throwflag=throwflag at entry=0) at Python/ceval.c:2989 #55 0x00007ffff7ac9d0d in PyEval_EvalCodeEx (co=, globals=, locals=locals at entry=0x0, args=args at entry=0x7fffedb4e8e8, argcount=1, kws=kws at entry=0x0, kwcount=kwcount at entry=0, defs=defs at entry=0x0, defcount=defcount at entry=0, closure=0x0) at Python/ceval.c:3584 #56 0x00007ffff7a40760 in function_call (func=0x7fffed216c08, arg=0x7fffedb4e8d0, kw=0x0) at Objects/funcobject.c:523 #57 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffed216c08, arg=arg at entry=0x7fffedb4e8d0, kw=kw at entry=0x0) at Objects/abstract.c:2547 ---Type to continue, or q to quit--- #58 0x00007ffff7a1cec5 in instancemethod_call (func=0x7fffed216c08, arg=0x7fffedb4e8d0, kw=0x0) at Objects/classobject.c:2602 #59 0x00007ffff7a0e203 in PyObject_Call (func=func at entry=0x7fffdc068370, arg=arg at entry=0x7ffff7fa4050, kw=) at Objects/abstract.c:2547 #60 0x00007ffff7ac01c7 in PyEval_CallObjectWithKeywords (func=0x7fffdc068370, arg=0x7ffff7fa4050, kw=) at Python/ceval.c:4221 #61 0x00007ffff7b0d9c2 in t_bootstrap (boot_raw=0xdef990) at Modules/threadmodule.c:620 #62 0x00007ffff77a4aa1 in start_thread () from /lib64/libpthread.so.0 #63 0x00007ffff6e6693d in clone () from /lib64/libc.so.6 Core dump available upon request ---------- components: Interpreter Core messages: 298650 nosy: Thomas Mortensson priority: normal severity: normal status: open title: Python core crash during os.fork() on CentOS 6.5 (Python 2.7.13) type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 07:28:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Jul 2017 11:28:53 +0000 Subject: [New-bugs-announce] [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x Message-ID: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> New submission from STINNER Victor: The build only contains one change: commit f776eb0f0e046f2fa3a96540bb42d8cf970f6c55 bpo-30917: IDLE: Add config.IdleConf unittests (#2691) Patch by Louie Lu. http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/893/steps/test/logs/stdio ====================================================================== FAIL: test_get_font (idlelib.idle_test.test_config.IdleConfTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\idlelib\idle_test\test_config.py", line 605, in test_get_font (f['family'], 10 if f['size'] < 10 else f['size'], f['weight'])) AssertionError: Tuples differ: ('Courier New', 9, 'normal') != ('Courier New', 10, 'normal') First differing element 1: 9 10 - ('Courier New', 9, 'normal') ? ^ + ('Courier New', 10, 'normal') ? ^^ ---------- messages: 298668 nosy: haypo priority: normal severity: normal status: open title: test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 07:55:53 2017 From: report at bugs.python.org (Antti Haapala) Date: Wed, 19 Jul 2017 11:55:53 +0000 Subject: [New-bugs-announce] [issue30969] Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__` Message-ID: <1500465353.64.0.619810995706.issue30969@psf.upfronthosting.co.za> New submission from Antti Haapala: The doc reference/expressions.srt says that > For user-defined classes which do not define __contains__() but do > define __iter__(), x in y is True if some value z with x == z is > produced while iterating over y. If an exception is raised during the > iteration, it is as if in raised that exception. and > Lastly, the old-style iteration protocol is tried: if a class defines > __getitem__(), x in y is True if and only if there is a non-negative > integer index i such that x == y[i], and all lower integer indices do > not raise IndexError exception. (If any other exception is raised, it > is as if in raised that exception). The documentation doesn't match the implementation, which clearly does `x is y or x == y` to check if `x` is the element `y` from a container. Both the `__iter__` and the index-iteration method test the elements using `is` first. While the document says that `x is x` means that `x == x` should be true, it is not true for example in the case of `nan`: ---------- assignee: docs at python components: Documentation messages: 298671 nosy: docs at python, ztane priority: normal severity: normal status: open title: Docs should say that `x is z or x == z` is used for `x in y` in containers that do not implement `__contains__` type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 08:58:48 2017 From: report at bugs.python.org (=?utf-8?q?Mih=C3=A1ly_Mirk?=) Date: Wed, 19 Jul 2017 12:58:48 +0000 Subject: [New-bugs-announce] [issue30970] return-value of filecmp.dircmp.report_* Message-ID: <1500469128.89.0.457428406304.issue30970@psf.upfronthosting.co.za> New submission from Mih?ly Mirk: The functions: filecmp.dircmp.report() filecmp.dircmp.report_partial_closure() filecmp.dircmp.report_full_closure() do not have return values ---------- messages: 298673 nosy: Mih?ly Mirk priority: normal pull_requests: 2822 severity: normal status: open title: return-value of filecmp.dircmp.report_* type: enhancement versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 15:52:56 2017 From: report at bugs.python.org (Daniel Himmelstein) Date: Wed, 19 Jul 2017 19:52:56 +0000 Subject: [New-bugs-announce] [issue30971] Improve code readability of json.tool Message-ID: <1500493976.74.0.611723443059.issue30971@psf.upfronthosting.co.za> New submission from Daniel Himmelstein: In https://github.com/python/cpython/pull/2720, I propose code changes to the json.tool command line utility. These changes are entirely non-functional and instead focus on improving code readability, style, brevity, extensibility, and maintainability. These changes mainly came up during the implementation of two enhancements of json.tool: + https://github.com/python/cpython/pull/345 to add indentation / whitespace options (bpo-29636). + https://github.com/python/cpython/pull/201 to display non-ascii characters (bpo-27413). These issues and pull requests are currently awaiting further consensus around their design and desirability. Therefore, I wanted to separate the non-functional code improvements from these PRs into a distinct PR. This has the benefit of allowing the future enhancement PRs to focus solely on adding features rather than the readability changes. ---------- components: Library (Lib) messages: 298686 nosy: dhimmel priority: normal pull_requests: 2824 severity: normal status: open title: Improve code readability of json.tool versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 19 18:49:35 2017 From: report at bugs.python.org (Elvis Pranskevichus) Date: Wed, 19 Jul 2017 22:49:35 +0000 Subject: [New-bugs-announce] [issue30972] Event loop incorrectly inherited in child processes. Message-ID: <1500504575.06.0.700406850987.issue30972@psf.upfronthosting.co.za> New submission from Elvis Pranskevichus: The attached example shows that `asyncio.get_event_loop` still returns parent process' event loop in some cases. It appears that the fix in issue #29703 was incomplete: PARENT PID: 21947, LOOP: <_UnixSelectorEventLoop running=True closed=False debug=False> at 0x7f0fbe7cfd68 WORKER PID: 21948, LOOP: <_UnixSelectorEventLoop running=True closed=False debug=False> at 0x7f0fbe7cfd68 concurrent.futures.process._RemoteTraceback: """ Traceback (most recent call last): File "/usr/lib64/python3.6/concurrent/futures/process.py", line 175, in _process_worker r = call_item.fn(*call_item.args, **call_item.kwargs) File "test.py", line 13, in worker return loop.run_until_complete(worker_coro()) File "/usr/lib64/python3.6/asyncio/base_events.py", line 454, in run_until_complete self.run_forever() File "/usr/lib64/python3.6/asyncio/base_events.py", line 408, in run_forever raise RuntimeError('This event loop is already running') RuntimeError: This event loop is already running """ The above exception was the direct cause of the following exception: Traceback (most recent call last): File "test.py", line 25, in loop.run_until_complete(main()) File "/usr/lib64/python3.6/asyncio/base_events.py", line 466, in run_until_complete return future.result() File "test.py", line 21, in main return await loop.run_in_executor(executor, worker) RuntimeError: This event loop is already running ---------- components: asyncio files: test.py messages: 298693 nosy: Elvis.Pranskevichus, yselivanov priority: normal severity: normal status: open title: Event loop incorrectly inherited in child processes. type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47024/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 00:41:58 2017 From: report at bugs.python.org (T Trindad) Date: Thu, 20 Jul 2017 04:41:58 +0000 Subject: [New-bugs-announce] [issue30973] Regular expression "hangs" interpreter Message-ID: <1500525718.61.0.130114594968.issue30973@psf.upfronthosting.co.za> New submission from T Trindad: The following code "hangs" the interpreter: import re re.search(r"/\*\*((?:[^*]+|\*[^/])*)\*/", """ /** Copy Constructor **/ private EvaluationContext (EvaluationContext base) {""") Changing the regex to r"/\*\*((?:[^*]|\*[^/])*)\*/" makes it work normally. ---------- components: Regular Expressions messages: 298705 nosy: T Trindad, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: Regular expression "hangs" interpreter type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 04:07:10 2017 From: report at bugs.python.org (Marcel Partap) Date: Thu, 20 Jul 2017 08:07:10 +0000 Subject: [New-bugs-announce] [issue30974] os.samefile / shutil._samefile: following symlinks Message-ID: <1500538030.77.0.17785692497.issue30974@psf.upfronthosting.co.za> New submission from Marcel Partap: Don't know whether it should be considered a documentation or behavioral issue, but os.samefile calls os.stat() on given files, following symlinks. Does this really "test whether two pathnames reference the same actual file"? I'd consider os.lstat() more suited for that. This bites me every time I want to overwrite a symlink with its referenced file using ranger. ---------- messages: 298708 nosy: eMPee584 priority: normal severity: normal status: open title: os.samefile / shutil._samefile: following symlinks type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 07:29:48 2017 From: report at bugs.python.org (Mick Phillips) Date: Thu, 20 Jul 2017 11:29:48 +0000 Subject: [New-bugs-announce] [issue30975] Multiprocessing: Event.set() blocks indefinitely if a process waiting on it has died. Message-ID: <1500550188.97.0.422386846774.issue30975@psf.upfronthosting.co.za> New submission from Mick Phillips: If a process was waiting on an Event but dies for some reason, nothing else can set the Event. I think the Event._cond lock can not be acquired. See attached for a demonstration. I see the same behaviour in Python 2.7.5 and Python 3.5.2. Is this expected behaviour? ---------- components: Windows files: WaitersSleepers.py messages: 298713 nosy: Mick Phillips, davin, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Multiprocessing: Event.set() blocks indefinitely if a process waiting on it has died. type: behavior versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file47025/WaitersSleepers.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 10:58:52 2017 From: report at bugs.python.org (Mick Phillips) Date: Thu, 20 Jul 2017 14:58:52 +0000 Subject: [New-bugs-announce] [issue30976] multiprocessing.Process.is_alive can show True for dead processes Message-ID: <1500562732.45.0.832960980555.issue30976@psf.upfronthosting.co.za> New submission from Mick Phillips: multiprocessing.Process.is_alive() returns True for processes that have been killed. See attached for example. Workaround: also test against psutils.pid_exists. ---------- components: Windows files: alive.py messages: 298724 nosy: davin, mickp, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: multiprocessing.Process.is_alive can show True for dead processes versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file47028/alive.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 13:15:28 2017 From: report at bugs.python.org (Wouter Bolsterlee) Date: Thu, 20 Jul 2017 17:15:28 +0000 Subject: [New-bugs-announce] [issue30977] reduce uuid.UUID() memory footprint Message-ID: <1500570928.48.0.991848922118.issue30977@psf.upfronthosting.co.za> New submission from Wouter Bolsterlee: memory usage for uuid.UUID seems larger than it has to be. it seems that using __slots__ will save around ~100 bytes per instance, which is very significant, e.g. when dealing with large sets of uuids (which are often used as "primary keys" into external data stores). uuid.UUID has a __setattr__ that prevents any extra attributes to be set: def __setattr__(self, name, value): raise TypeError('UUID objects are immutable') ...so it seems to me not having __dict__ should not cause any problems? before (RES column): >>> import uuid >>> y = {uuid.uuid4() for _ in range(1000000)} PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command 23020 wbolster 20 0 315M 253M 7256 S 0.0 1.6 0:04.98 python with slots: >>> import uuid >>> y = {uuid.uuid4() for _ in range(1000000)} PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command 21722 wbolster 20 0 206M 145M 7348 S 0.0 0.9 0:05.03 python i will open a pr on github shortly. ---------- messages: 298738 nosy: wbolster priority: normal severity: normal status: open title: reduce uuid.UUID() memory footprint _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 15:53:55 2017 From: report at bugs.python.org (Akuli) Date: Thu, 20 Jul 2017 19:53:55 +0000 Subject: [New-bugs-announce] [issue30978] str.format_map() silences exceptions in __getitem__ Message-ID: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> New submission from Akuli: Example: class BrokenMapping: def __getitem__(self, key): 1/0 # this silences the ZeroDivisionError and raises KeyError('world') 'hello {world}'.format_map(BrokenMapping()) I have tried this on several different CPython versions on Ubuntu 14.04 (including the latest Python 3.7.0a0 from github) and they all do this. PyPy passes the ZeroDivisionError through correctly. ---------- messages: 298747 nosy: Akuli priority: normal severity: normal status: open title: str.format_map() silences exceptions in __getitem__ type: behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 18:32:04 2017 From: report at bugs.python.org (=?utf-8?b?QmVybsOhdCBHw6Fib3I=?=) Date: Thu, 20 Jul 2017 22:32:04 +0000 Subject: [New-bugs-announce] [issue30979] the winapi fails to run shortcuts (because considers a shortcut not a valid Win32App) Message-ID: <1500589924.87.0.691040995571.issue30979@psf.upfronthosting.co.za> New submission from Bern?t G?bor: Although python27.exe.lnk is callable from any command line tool, with any of its arguments the subprocess module thinks it's not a valid Win32 application. Proof, let there be python27.exe.lnk be a shortcut to python.exe: C:\Python27 ? ls python* python.exe* python27.exe.lnk* pythonw.exe* ? python.exe -c "import sys; print(sys.version)" 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] C:\Python27 ? python.exe -c "import subprocess; print(subprocess.call(['./python.exe', '-c', '\"import sys; print(sys.version)\"']))" 0 C:\Python27 ? python27.exe -c "import subprocess; print(subprocess.call(['./python27.exe.lnk', '-c', '\"import sys; print(sys.version)\"']))" Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\subprocess.py", line 168, in call return Popen(*popenargs, **kwargs).wait() File "C:\Python27\lib\subprocess.py", line 390, in __init__ errread, errwrite) File "C:\Python27\lib\subprocess.py", line 640, in _execute_child startupinfo) WindowsError: [Error 193] %1 is not a valid Win32 application ---------- components: Windows messages: 298752 nosy: Bern?t G?bor, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: the winapi fails to run shortcuts (because considers a shortcut not a valid Win32App) type: enhancement versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 19:23:23 2017 From: report at bugs.python.org (Nir Soffer) Date: Thu, 20 Jul 2017 23:23:23 +0000 Subject: [New-bugs-announce] [issue30980] Calling asyncore.file_wrapper.close twice may close unrelated file descriptor Message-ID: <1500593003.51.0.725099647676.issue30980@psf.upfronthosting.co.za> New submission from Nir Soffer: Commit 4d4c69dc35154a9c21fed1b6b4088e741fbc6ae6 added protection for double close in file_wrapper.close, but the test did not consider that fact that file_wrapper is dupping the file descriptor, making the test ineffective. >>> fd1, fd2 = os.pipe() >>> f = asyncore.file_wrapper(fd1) >>> os.close(f.fd) >>> f.close() Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.5/asyncore.py", line 621, in close os.close(self.fd) OSError: [Errno 9] Bad file descriptor >>> f.fd 4 >>> fd3, fd4 = os.pipe() >>> fd3 4 >>> f.close() >>> os.close(fd3) Traceback (most recent call last): File "", line 1, in OSError: [Errno 9] Bad file descriptor f.close() closed an unrelated file descriptor. ---------- messages: 298753 nosy: Nir Soffer, haypo priority: normal severity: normal status: open title: Calling asyncore.file_wrapper.close twice may close unrelated file descriptor versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 20 22:19:00 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Jul 2017 02:19:00 +0000 Subject: [New-bugs-announce] [issue30981] IDLE: Add config dialog font page tests Message-ID: <1500603540.53.0.577825019665.issue30981@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: terry.reedy components: IDLE nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Add config dialog font page tests type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 05:14:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 21 Jul 2017 09:14:54 +0000 Subject: [New-bugs-announce] [issue30982] AMD64 Windows8.1 Refleaks 3.x: compilation error, cannot open python37_d.dll Message-ID: <1500628494.4.0.575498765725.issue30982@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x/builds/55/steps/compile/logs/stdio D:\buildarea\3.x.ware-win81-release.refleak\build>"C:\Program Files (x86)\MSBuild\14.0\bin\\msbuild.exe" "D:\buildarea\3.x.ware-win81-release.refleak\build\PCbuild\\pythoncore.vcxproj" /t:KillPython /nologo /v:m /p:Configuration=Release /p:Platform=x64 /p:KillPython=true Killing any running python.exe instances... (...) D:\buildarea\3.x.ware-win81-release.refleak\build>"C:\Program Files (x86)\MSBuild\14.0\bin\\msbuild.exe" "D:\buildarea\3.x.ware-win81-release.refleak\build\PCbuild\\pythoncore.vcxproj" /t:KillPython /nologo /v:m /p:Configuration=Debug /p:Platform=x64 /p:KillPython=true Killing any running python_d.exe instances... (...) LINK : fatal error LNK1104: cannot open file 'D:\buildarea\3.x.ware-win81-release.refleak\build\PCBuild\amd64\python37_d.dll' [D:\buildarea\3.x.ware-win81-release.refleak\build\PCbuild\pythoncore.vcxproj] ---------- components: Tests messages: 298787 nosy: haypo, zach.ware priority: normal severity: normal status: open title: AMD64 Windows8.1 Refleaks 3.x: compilation error, cannot open python37_d.dll versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 09:02:35 2017 From: report at bugs.python.org (Bruno Penteado) Date: Fri, 21 Jul 2017 13:02:35 +0000 Subject: [New-bugs-announce] [issue30983] eval frame rename in pep 0523 broke gdp's python extension Message-ID: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> New submission from Bruno Penteado: pep 0523 renames PyEval_EvalFrameEx to _PyEval_EvalFrameDefault while the gdb python extension only looks for PyEval_EvalFrameEx to understand if it is dealing with a frame. Final effect is that attaching gdb to a python3.6 process doesnt resolve python objects. Eg. py-list and py-bt dont work properly ---------- messages: 298804 nosy: bcap priority: normal severity: normal status: open title: eval frame rename in pep 0523 broke gdp's python extension versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 11:32:50 2017 From: report at bugs.python.org (Jelle Zijlstra) Date: Fri, 21 Jul 2017 15:32:50 +0000 Subject: [New-bugs-announce] [issue30984] traceback.print_exc return value documentation Message-ID: <1500651170.07.0.787106480078.issue30984@psf.upfronthosting.co.za> New submission from Jelle Zijlstra: The documentation for traceback.format_tb says "Return a list of ?pre-processed? stack trace entries extracted from the traceback object tb. It is useful for alternate formatting of stack traces. The optional limit argument has the same meaning as for print_tb(). A ?pre-processed? stack trace entry is a 4-tuple (filename, line number, function name, text) representing the information that is usually printed for a stack trace." However, as of 3.5 it actually returns a StackSummary object, which is a subclass of list and contains FrameSummary objects. FrameSummary objects are not tuples. The documentation is accurate for 3.4 and earlier. I'm surprised this change was made because it seems like a compatibility break, but it's too late to do something about that now. The documentation should be changed to correct the return value and add a "versionchanged: 3.5" note. ---------- assignee: docs at python components: Documentation messages: 298807 nosy: Jelle Zijlstra, docs at python priority: normal severity: normal status: open title: traceback.print_exc return value documentation versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 12:06:42 2017 From: report at bugs.python.org (Jaume) Date: Fri, 21 Jul 2017 16:06:42 +0000 Subject: [New-bugs-announce] [issue30985] Set closing variable in asyncore at close Message-ID: <1500653202.45.0.597116986405.issue30985@psf.upfronthosting.co.za> Changes by Jaume : ---------- nosy: walkhour priority: normal severity: normal status: open title: Set closing variable in asyncore at close _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 21 18:06:13 2017 From: report at bugs.python.org (Segev Finer) Date: Fri, 21 Jul 2017 22:06:13 +0000 Subject: [New-bugs-announce] [issue30986] Add --include-py argument to Tools/msi/make_zip.py Message-ID: <1500674773.9.0.384713319634.issue30986@psf.upfronthosting.co.za> New submission from Segev Finer: Add an argument --include-py to Tools/msi/make_zip.py that allows including the Python modules sources and not only bytecode. I found it useful while running Twisted's test suite in PR 2318, since I got an error otherwise. I don't remember what that error was and wasn't able to reproduce it while trying to run Twisted's test suite again. ---------- components: Windows messages: 298826 nosy: Segev Finer, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Add --include-py argument to Tools/msi/make_zip.py type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 00:13:11 2017 From: report at bugs.python.org (Pier-Yves Lessard) Date: Sat, 22 Jul 2017 04:13:11 +0000 Subject: [New-bugs-announce] [issue30987] Support for ISO-TP protocol in SocketCAN Message-ID: <1500696791.75.0.683510511028.issue30987@psf.upfronthosting.co.za> New submission from Pier-Yves Lessard: PF_CAN socket using ISO-TP protocol cannot be used as getsockaddrarg only supports CAN_RAW and CAN_BCM for AF_CAN addresses. ---------- components: Library (Lib) messages: 298832 nosy: Pier-Yves Lessard priority: normal severity: normal status: open title: Support for ISO-TP protocol in SocketCAN type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 00:50:02 2017 From: report at bugs.python.org (Tim Bell) Date: Sat, 22 Jul 2017 04:50:02 +0000 Subject: [New-bugs-announce] [issue30988] Exception parsing invalid email address headers starting or ending with dot Message-ID: <1500699002.76.0.343337119039.issue30988@psf.upfronthosting.co.za> New submission from Tim Bell: Email addresses with a display name starting with a dot ("."), or ending with a dot without whitespace before the angle bracket trigger exceptions when accessing the header, after creating the message object with the "default" policy. For example: >>> import email >>> from email.policy import default >>> email.message_from_bytes(b'To: . Doe ')['to'] '. Doe ' >>> email.message_from_bytes(b'To: . Doe ', policy=default)['to'] Traceback (most recent call last): File "", line 1, in File "/Users/bhat/git/cpython/Lib/email/message.py", line 391, in __getitem__ return self.get(name) File "/Users/bhat/git/cpython/Lib/email/message.py", line 471, in get return self.policy.header_fetch_parse(k, v) File "/Users/bhat/git/cpython/Lib/email/policy.py", line 162, in header_fetch_parse return self.header_factory(name, value) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 586, in __call__ return self[name](name, value) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 197, in __new__ cls.parse(value, kwds) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 344, in parse for mb in addr.all_mailboxes])) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 344, in for mb in addr.all_mailboxes])) File "/Users/bhat/git/cpython/Lib/email/_header_value_parser.py", line 834, in display_name return self[0].display_name File "/Users/bhat/git/cpython/Lib/email/_header_value_parser.py", line 768, in display_name return self[0].display_name File "/Users/bhat/git/cpython/Lib/email/_header_value_parser.py", line 931, in display_name if res[0][0].token_type == 'cfws': AttributeError: 'str' object has no attribute 'token_type' >>> >>> email.message_from_bytes(b'To: John X.')['to'] 'John X.' >>> email.message_from_bytes(b'To: John X.', policy=default)['to'] Traceback (most recent call last): File "", line 1, in File "/Users/bhat/git/cpython/Lib/email/message.py", line 391, in __getitem__ return self.get(name) File "/Users/bhat/git/cpython/Lib/email/message.py", line 471, in get return self.policy.header_fetch_parse(k, v) File "/Users/bhat/git/cpython/Lib/email/policy.py", line 162, in header_fetch_parse return self.header_factory(name, value) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 586, in __call__ return self[name](name, value) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 197, in __new__ cls.parse(value, kwds) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 344, in parse for mb in addr.all_mailboxes])) File "/Users/bhat/git/cpython/Lib/email/headerregistry.py", line 344, in for mb in addr.all_mailboxes])) File "/Users/bhat/git/cpython/Lib/email/_header_value_parser.py", line 834, in display_name return self[0].display_name File "/Users/bhat/git/cpython/Lib/email/_header_value_parser.py", line 768, in display_name return self[0].display_name File "/Users/bhat/git/cpython/Lib/email/_header_value_parser.py", line 936, in display_name if res[-1][-1].token_type == 'cfws': AttributeError: 'str' object has no attribute 'token_type' ---------- components: email messages: 298836 nosy: barry, r.david.murray, timb07 priority: normal severity: normal status: open title: Exception parsing invalid email address headers starting or ending with dot type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 03:17:22 2017 From: report at bugs.python.org (Lovesh Harchandani) Date: Sat, 22 Jul 2017 07:17:22 +0000 Subject: [New-bugs-announce] [issue30989] Sort only when needed in TimedRotatingFileHandler's getFilesToDelete Message-ID: <1500707842.79.0.354493990388.issue30989@psf.upfronthosting.co.za> New submission from Lovesh Harchandani: At `/Lib/logging/handlers.py` in `TimedRotatingFileHandler`'s `getFilesToDelete` method, filenames are sorted using `result.sort()` regardless of `len(result)`, if `len(result)` < backupCount, sorting is not required. ---------- messages: 298839 nosy: Lovesh Harchandani priority: normal severity: normal status: open title: Sort only when needed in TimedRotatingFileHandler's getFilesToDelete versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 08:50:31 2017 From: report at bugs.python.org (ppperry) Date: Sat, 22 Jul 2017 12:50:31 +0000 Subject: [New-bugs-announce] [issue30990] Calls to C functions using `.__call__` don't get sent to profiler. Message-ID: <1500727831.57.0.777794469243.issue30990@psf.upfronthosting.co.za> New submission from ppperry: If you create a file called `inputtest.py` with the contents `input.__call__()`, and run the built-in profile module on it, it doesn't notice the call to `input`, and produces a report not including that call. 4 function calls in 0.000 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 0.000 0.000 0.000 0.000 :0(exec) 1 0.000 0.000 0.000 0.000 :0(setprofile) 1 0.000 0.000 0.000 0.000 inputtest.py:1() 1 0.000 0.000 0.000 0.000 profile:0( at 0x00000000029880C0, file "inputtest.py", line 1>) 0 0.000 0.000 profile:0(profiler) ---------- components: Interpreter Core, Library (Lib) messages: 298847 nosy: ppperry priority: normal severity: normal status: open title: Calls to C functions using `.__call__` don't get sent to profiler. type: behavior versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 10:32:25 2017 From: report at bugs.python.org (jonny) Date: Sat, 22 Jul 2017 14:32:25 +0000 Subject: [New-bugs-announce] [issue30991] test_ctypes , test_dbm and test_ssl fail on arm64 (aarch64) architecture Message-ID: <1500733945.72.0.618200195446.issue30991@psf.upfronthosting.co.za> New submission from jonny: I am running debian stretch on 64bit arm system. I am trying to install python 3.6.2. But facing errors in these tests while running make test. I have installed these libraries :: apt install liblzma-dev libz-dev libreadline-dev libncursesw5-dev libssl-dev libgdbm-dev libsqlite3-dev libbz2-dev tk-dev libc6-dev libdb-dev libmpdec-dev test_ctype test_pass_by_value is still a issue for aarch64 as I found here :: https://bugs.python.org/issue29804. So is with test_ssl as mentioned here :: https://bugs.python.org/issue30714 But I have no idea why test_dbm is failing as I have installed req. libraries as stated here :: http://bugs.python.org/issue14120 As test_ctypes test_pass_by_value has been fixed [https://github.com/python/cpython/commit/a86339b83fbd0932e0529a3c91935e997a234582#diff-8e60f1d7697d458dee7303f92bc5a5c0L250 ] in Python version 3.7.0 alpha 1 [https://github.com/python/cpython]. So I tried to build python 3.7.0. But this time only test_dbm and test_ssl failed showing same errors. Please guide me , how to resolve these. ---------- components: Tests files: python3.6.2 build aarch64 log.txt messages: 298855 nosy: jonny789 priority: normal severity: normal status: open title: test_ctypes ,test_dbm and test_ssl fail on arm64 (aarch64) architecture type: crash versions: Python 3.6 Added file: http://bugs.python.org/file47033/python3.6.2 build aarch64 log.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 11:53:23 2017 From: report at bugs.python.org (Chris White) Date: Sat, 22 Jul 2017 15:53:23 +0000 Subject: [New-bugs-announce] [issue30992] Invalid PGP Key Prevents Archive Validation Message-ID: <1500738803.82.0.333391248268.issue30992@psf.upfronthosting.co.za> New submission from Chris White: When trying to validate the Python 3.6.1 tgz using the ASC file, I can't import all the keys due to the following error: ``` gpg: Note: signatures using the MD5 algorithm are rejected gpg: key ED9D77D5: no valid user IDs gpg: this may be caused by a missing self-signature ``` This is using Ubuntu 16.04 and gpg (GnuPG) 1.4.20, running the command ``` wget https://www.python.org/static/files/pubkeys.txt gpg --import pubkeys.txt ``` If I take out the key ID manually out of the entire list and import the keys by their IDs instead it works. ---------- components: Installation messages: 298858 nosy: cwprogram priority: normal severity: normal status: open title: Invalid PGP Key Prevents Archive Validation type: security versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 15:07:43 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Jul 2017 19:07:43 +0000 Subject: [New-bugs-announce] [issue30993] IDLE: Document and fix configdialog font tests. Message-ID: <1500750463.77.0.902611947548.issue30993@psf.upfronthosting.co.za> New submission from Terry J. Reedy: This follows #30981 and the comments on PR 2805 after the close notice. * Causal chains in a directed acyclic graph link user actions to provisional entries in changes and and changes in the example displays. Explain these better in the docstring. Each font test function tests pieces of the graph. *test_font_set should run even if not run first. ---------- assignee: terry.reedy components: IDLE messages: 298862 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Document and fix configdialog font tests. type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 20:15:19 2017 From: report at bugs.python.org (Nir Soffer) Date: Sun, 23 Jul 2017 00:15:19 +0000 Subject: [New-bugs-announce] [issue30994] Asyncore does not need to copy map.items() before polling Message-ID: <1500768919.1.0.764948579908.issue30994@psf.upfronthosting.co.za> New submission from Nir Soffer: Asyncore is not thread safe, and cannot be called from multiple threads. Hence it does not need to copy the socket_map when preparing for poll or select. The copy was introduced in: commit d74900ebb5a22b387b49684990da1925e1d6bdc9 Author: Josiah Carlson Date: Mon Jul 7 04:15:08 2008 +0000 Committing Py3k version of changelist 64080 and 64257, along with updated tests for smtpd, which required updating with the new semantics. This is a huge patch, looks like port of asyncore to python 3, trying to keep the behavior of the python 2 code. Converting map.items() to list(map.items()) is correct, but on python 3 we can take advantage of the fact that items() does not copy anything. ---------- components: Library (Lib) messages: 298880 nosy: Nir Soffer, giampaolo.rodola, haypo priority: normal severity: normal status: open title: Asyncore does not need to copy map.items() before polling versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 22 21:29:55 2017 From: report at bugs.python.org (Mitar) Date: Sun, 23 Jul 2017 01:29:55 +0000 Subject: [New-bugs-announce] [issue30995] Support logging.getLogger(style='{') Message-ID: <1500773395.26.0.78055303667.issue30995@psf.upfronthosting.co.za> New submission from Mitar: Currently, using non-legacy formatting in logging message is really cumbersome. I think a new style could be supported much easier using the following: logger = logging.getLogger(style='{') logger.misc('User {} logged in', username} This is both backwards compatible, and does not interfere with 3rd party packages which might use a different logger with different style. You only have to make sure they do not use this logger without knowing about new format, which can be done in various ways (like prefixing the name of the logger, for example). See https://bugs.python.org/issue14031 for more information, where this has also been proposed but not really commented upon. ---------- components: Library (Lib) messages: 298883 nosy: mitar priority: normal severity: normal status: open title: Support logging.getLogger(style='{') type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 05:30:08 2017 From: report at bugs.python.org (Fengyuan Chen) Date: Sun, 23 Jul 2017 09:30:08 +0000 Subject: [New-bugs-announce] [issue30996] add coroutine AbstractEventLoop.sock_close Message-ID: <1500802208.0.0.551974338989.issue30996@psf.upfronthosting.co.za> New submission from Fengyuan Chen: I suppose asyncio lack async version of sock_close that can call loop.remove_reader and others before close socket and perhaps lack something like coroutine AbstractEventLoop.sock_make_blocking that can do some deregister job. switch constant in the script: * change CALL_REMOVE_READING_BEFORE_CLOSE to True will make script running smoothly * change USE_UVLOOP to True will make script use uvloop ---------- components: asyncio files: asyncio_wait_forever.py messages: 298894 nosy: cfy, yselivanov priority: normal severity: normal status: open title: add coroutine AbstractEventLoop.sock_close type: resource usage versions: Python 3.6 Added file: http://bugs.python.org/file47034/asyncio_wait_forever.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 06:47:19 2017 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 23 Jul 2017 10:47:19 +0000 Subject: [New-bugs-announce] [issue30997] TestCase.subTest and expectedFailure Message-ID: <1500806839.59.0.646969271653.issue30997@psf.upfronthosting.co.za> New submission from Ronald Oussoren: It would be nice if there were a way to mark a TestCase.subTest as an expected failure. I have a number of testcases that use the subTest feature and where a small subset of those tests are expected failures due to platform issues. It would be nice if it were possible to mark those tests as such. I'm currently using self.skipTest() to mark these subTests as special, but that's less than ideal. ---------- components: Library (Lib) messages: 298895 nosy: ezio.melotti, michael.foord, rbcollins, ronaldoussoren priority: low severity: normal status: open title: TestCase.subTest and expectedFailure type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 16:50:52 2017 From: report at bugs.python.org (Florian Bruhin) Date: Sun, 23 Jul 2017 20:50:52 +0000 Subject: [New-bugs-announce] [issue30998] faulthandler: Show C stacktrace Message-ID: <1500843052.8.0.470240287459.issue30998@psf.upfronthosting.co.za> New submission from Florian Bruhin: While faulthandler's output is already quite useful when dealing with crashes in C libraries, it'd be much more useful when it could also show a low-level C/C++ stack. glibc has functions to do that: https://www.gnu.org/software/libc/manual/html_node/Backtraces.html Windows seems to have something similar too: https://stackoverflow.com/a/5699483/2085149 ---------- components: Library (Lib) messages: 298914 nosy: The Compiler, haypo priority: normal severity: normal status: open title: faulthandler: Show C stacktrace type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 18:10:22 2017 From: report at bugs.python.org (gerion) Date: Sun, 23 Jul 2017 22:10:22 +0000 Subject: [New-bugs-announce] [issue30999] statistics module: add "key" keyword argument to median, mode, ... Message-ID: <1500847822.23.0.66362631161.issue30999@psf.upfronthosting.co.za> New submission from gerion: With Python 3.4 the statistics module was added. It would be cool, if the functions: median_low() median_high() mode() would have a "key" keyword argument, just like in max() and min(): ``` >>> median_low([(1, 2), (3, 3), (4, 1)], key=lambda elem: elem[0]) (3, 3) ``` This functions always choose a specific element of the list, so a "key" argument is meaningful. Maybe such a parameter makes sense for mean() as well, if the return value always is the result itself, but this is another point: ``` >>> mean([(1, 2), (3, 3), (4, 1)], key=lambda elem: elem[0]) 2.6666666666666665 ``` ---------- components: Library (Lib) messages: 298918 nosy: gerion priority: normal severity: normal status: open title: statistics module: add "key" keyword argument to median, mode, ... type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 23 19:17:58 2017 From: report at bugs.python.org (Larry Hastings) Date: Sun, 23 Jul 2017 23:17:58 +0000 Subject: [New-bugs-announce] [issue31000] Test failure in resource module on ZFS Message-ID: <1500851878.05.0.462798019219.issue31000@psf.upfronthosting.co.za> New submission from Larry Hastings: I use Linux (Ubuntu GNOME, 17.04, 64-bit) on all my computers, and I use ZFS for the /home partition. While releasing 3.4.7rc1 and 3.5.4rc1, I encountered this test failure: % ./python -m test test_resource 0:00:00 load avg: 0.40 [1/1] test_resource test test_resource failed -- Traceback (most recent call last): File "/home/larry/src/python/releases/test35/Lib/test/test_resource.py", line 55, in test_fsize_enforced f.write(b"X" * 1024) OSError: [Errno 27] File too large 1 test failed: test_resource Tests result: FAILURE If I run this test on another filesystem (e.g. ext4), with the exact same source tree, the test passes. I also didn't see this failure when releasing 3.4.6 and 3.5.3 earlier this year. This is probably caused by new behavior in an recent update to ZFS. So I'm not sure if this is a ZFS bug, and if it is I don't know whether or not we should work around it. But it's hard to imagine ZFS is behaving correctly here. I've confirmed that this happens in all four branches tagged (3.4 through 3.7). Since it causes test failures, I'm willing to consider accepting a PR for 3.4 and 3.5. Serhiy, I've tagged you since you were the last person to touch resource.getrlimit and resource.setrlimit. Are you interested / willing to look at this bug? Do you have a computer with a ZFS filesystem you can use to run experiments? ---------- assignee: serhiy.storchaka messages: 298919 nosy: larry, ned.deily, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Test failure in resource module on ZFS type: behavior versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 03:22:14 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 07:22:14 +0000 Subject: [New-bugs-announce] [issue31001] IDLE: Add tests for configdialog highlight tab Message-ID: <1500880934.92.0.27853522448.issue31001@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: terry.reedy components: IDLE nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Add tests for configdialog highlight tab type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 03:25:08 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 07:25:08 +0000 Subject: [New-bugs-announce] [issue31002] IDLE: Add tests for configdialog keys tab Message-ID: <1500881108.16.0.612715894746.issue31002@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: terry.reedy components: IDLE nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Add tests for configdialog keys tab type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 03:27:37 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 07:27:37 +0000 Subject: [New-bugs-announce] [issue31003] IDLE: Add tests for help sources on configdialog general tab Message-ID: <1500881257.72.0.111266502472.issue31003@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: terry.reedy components: IDLE nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Add tests for help sources on configdialog general tab type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 04:03:45 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 08:03:45 +0000 Subject: [New-bugs-announce] [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog Message-ID: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> New submission from Terry J. Reedy: I want to follow the safe way to refactor (from a blog post), rather than the hacker way of refactoring 'in place'. Step 0: Test code to be refactored. Finished in 30993. Step 1: Copy code to be refactored and modify as needed to isolate it from the working original. For configdialog, add 'class FontPage' below ConfigDialog and copy font/tab methods, now collected together, below that. For the test, copy class FontTest as FontPageTest and IndentTest as IndentOptionTest. The copies should pass as they will still be testing the original code. Commit. Step 2: Modify code as desired. Modify test copy to test code copy. For FontPage, this will require new tracer manager (#30853) to attach (activate) callbacks so tests will pass. Commit. Step 3: Switch from using original code to using modified code. For this issue, calling FontPage instead of create_page_font_tab may be enough. Skip original test; modify new test as needed to pass. Commit. Step 4: Once we are sure that we do not need the original code that has been replaced, delete it. Rerun tests. Commit. The separate commits will make review easier. Create or update PRs as desired. ---------- assignee: terry.reedy components: IDLE messages: 298933 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE, configdialog: Factor out FontTab class from ConfigDialog type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:05:19 2017 From: report at bugs.python.org (=?utf-8?q?Vojt=C4=9Bch_Fried?=) Date: Mon, 24 Jul 2017 09:05:19 +0000 Subject: [New-bugs-announce] [issue31005] caught and stored exception creates a reference cycle outside its traceback Message-ID: <1500887119.8.0.911984158836.issue31005@psf.upfronthosting.co.za> New submission from Vojt?ch Fried: I have this test case: import gc import sys import traceback def hold_world(): try: raise Exception("test1") except Exception as exc: print("exc caught in frame: ", exc.__traceback__.tb_frame) assert not exc.__traceback__.tb_next #exc.__traceback__ = None #ok tmp = exc traceback.clear_frames(exc.__traceback__) #not enough def use_obj( o ): hold_world() #o = None #needed to get rid of the reference in the frame def main(): o = ["survivor"] print(gc.get_referrers(o)) print(sys.getrefcount(o)) #2 use_obj( o ) print(gc.get_referrers(o)) print(sys.getrefcount(o)) #3 #o = None #needed to get rid of the reference in the frame if __name__ == '__main__': main() The outpus is: [] 2 exc caught in frame: [, ] 3 When either uncommenting the line "exc.__traceback__ = None" or uncommenting "o = None" lines, the output is like [] 2 exc caught in frame: [] 2 It seems that "hold_world" function somehow manages to (indirectly) add a reference to "o" object. So "o" is not cleared at "main" end, but rather garbage collected. Even though there is a reference cycle tmp -> traceback -> frame -> tmp, the frames outside "hold_world" should not be affected, but it looks like they are. ---------- components: Interpreter Core messages: 298936 nosy: vojtechfried priority: normal severity: normal status: open title: caught and stored exception creates a reference cycle outside its traceback type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:07:47 2017 From: report at bugs.python.org (Antony Lee) Date: Mon, 24 Jul 2017 09:07:47 +0000 Subject: [New-bugs-announce] [issue31006] typing.NamedTuple should add annotations to its constructor (__new__) parameters. Message-ID: <1500887267.27.0.393959457135.issue31006@psf.upfronthosting.co.za> New submission from Antony Lee: Currently, the fields, types and defaults used to define a typing.NamedTuple need to be retrieved from three different attributes: `_fields`, `_field_types`, and `_field_defaults` (the first two are combined in `__annotations__`, but that still misses the defaults). However, there is a place where all this information can be naturally combined: in the Signature of the constructor (as returned by `inspect.signature(cls)`). Currently, the Parameter objects in the signature have the information about the parameter names and defaults, but their annotation is not set. Thus, I would like to propose setting the annotation of the Parameters in the Signature object as well. ---------- components: Library (Lib) messages: 298937 nosy: Antony.Lee priority: normal severity: normal status: open title: typing.NamedTuple should add annotations to its constructor (__new__) parameters. versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:09:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:09:04 +0000 Subject: [New-bugs-announce] [issue31007] ERROR: test_pipe_handle (test.test_asyncio.test_windows_utils.PipeTests) expected ERROR_INVALID_HANDLE on x86 Windows7 3.x Message-ID: <1500887344.87.0.0437843877994.issue31007@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/905/steps/test/logs/stdio ... test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests) ... ok test_wait_for_handle_cancel (test.test_asyncio.test_windows_events.ProactorTests) ... ok test_pipe_handle (test.test_asyncio.test_windows_utils.PipeTests) ... ERROR test_pipe_overlapped (test.test_asyncio.test_windows_utils.PipeTests) ... ok test_popen (test.test_asyncio.test_windows_utils.PopenTests) ... ok ... ====================================================================== ERROR: test_pipe_handle (test.test_asyncio.test_windows_utils.PipeTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_asyncio\test_windows_utils.py", line 128, in test_pipe_handle raise RuntimeError('expected ERROR_INVALID_HANDLE') RuntimeError: expected ERROR_INVALID_HANDLE ---------- components: Tests, Windows, asyncio keywords: buildbot messages: 298938 nosy: haypo, paul.moore, steve.dower, tim.golden, yselivanov, zach.ware priority: normal severity: normal status: open title: ERROR: test_pipe_handle (test.test_asyncio.test_windows_utils.PipeTests) expected ERROR_INVALID_HANDLE on x86 Windows7 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:11:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:11:45 +0000 Subject: [New-bugs-announce] [issue31008] FAIL: test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests) on x86 Windows7 3.x Message-ID: <1500887505.08.0.647481409973.issue31008@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/905/steps/test/logs/stdio ... test_double_bind (test.test_asyncio.test_windows_events.ProactorTests) ... ok test_pipe (test.test_asyncio.test_windows_events.ProactorTests) ... ok test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests) ... FAIL test_wait_for_handle_cancel (test.test_asyncio.test_windows_events.ProactorTests) ... ok test_pipe_handle (test.test_asyncio.test_windows_utils.PipeTests) ... ok ... ====================================================================== FAIL: test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_asyncio\test_windows_events.py", line 121, in test_wait_for_handle self.assertTrue(0.48 < elapsed < 0.9, elapsed) AssertionError: False is not true : 0.4599999999627471 ---------- components: Tests, Windows, asyncio keywords: buildbot messages: 298939 nosy: haypo, paul.moore, steve.dower, tim.golden, yselivanov, zach.ware priority: normal severity: normal status: open title: FAIL: test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests) on x86 Windows7 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:15:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:15:12 +0000 Subject: [New-bugs-announce] [issue31009] test_multiprocessing_spawn hangs randomly on AMD64 Windows10 3.x Message-ID: <1500887712.38.0.66903662356.issue31009@psf.upfronthosting.co.za> New submission from STINNER Victor: Same question as usual: why regrtest doesn't display the "running: test_multiprocessing_spawn (319 sec)" update every 30 seconds? Is regrtest main process also stuck? http://buildbot.python.org/all/builders/AMD64%20Windows10%203.x/builds/973/steps/test/logs/stdio ... Run tests in parallel using 2 child processes ... 0:47:28 [403/406] test_buffer passed (119 sec) -- running: test_multiprocessing_spawn (319 sec) 0:47:30 [404/406] test_turtle passed -- running: test_multiprocessing_spawn (321 sec) 0:47:32 [405/406] test_dynamic passed -- running: test_multiprocessing_spawn (323 sec) command timed out: 1200 seconds without output running ['Tools\\buildbot\\test.bat', '-x64', '-j2', '--timeout', '900'], attempting to kill program finished with exit code 1 elapsedTime=4059.302000 ---------- components: Tests keywords: buildbot messages: 298940 nosy: davin, haypo, pitrou priority: normal severity: normal status: open title: test_multiprocessing_spawn hangs randomly on AMD64 Windows10 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 05:21:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 09:21:13 +0000 Subject: [New-bugs-announce] [issue31010] test_socketserver.test_ForkingTCPServer(): threading_cleanup() and reap_children() warnings on AMD64 FreeBSD 10.x Shared 3.x Message-ID: <1500888073.5.0.311417517305.issue31010@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/607/steps/test/logs/stdio test_ForkingTCPServer (test.test_socketserver.SocketServerTest) ... creating server ADDR = ('127.0.0.1', 42116) CLASS = server running test client 0 test client 1 test client 2 waiting for server done Warning -- threading_cleanup() failed to cleanup -1 threads after 4 sec (count: 0, dangling: 1) Warning -- reap_children() reaped child process 83130 ok ... 1 test altered the execution environment: test_socketserver ... Total duration: 11 min 56 sec Tests result: ENV CHANGED *** Error code 3 ---------- components: Tests keywords: buildbot messages: 298942 nosy: haypo priority: normal severity: normal status: open title: test_socketserver.test_ForkingTCPServer(): threading_cleanup() and reap_children() warnings on AMD64 FreeBSD 10.x Shared 3.x type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 08:59:40 2017 From: report at bugs.python.org (Debarshi Goswami) Date: Mon, 24 Jul 2017 12:59:40 +0000 Subject: [New-bugs-announce] [issue31011] Users (except from the one who installed) not able to see python in add remove programs. Message-ID: <1500901180.63.0.497561130002.issue31011@psf.upfronthosting.co.za> New submission from Debarshi Goswami: When Python (64 bit) is installed for all users from an admin account on Windows, it gets installed correctly for all users , but it does not appear in add remove program for users other than one who installed it. Command used : python-3.6.1-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 TargetDir=C:\apps\Python36 Work around: Repair the installation by launching Python installer again. ---------- components: Installation messages: 298965 nosy: Debarshi.Goswami priority: normal severity: normal status: open title: Users (except from the one who installed) not able to see python in add remove programs. type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 09:40:09 2017 From: report at bugs.python.org (Leon Avery) Date: Mon, 24 Jul 2017 13:40:09 +0000 Subject: [New-bugs-announce] [issue31012] suggestion: allow termination argument in argparse to be specified as argument Message-ID: <1500903609.87.0.148585957188.issue31012@psf.upfronthosting.co.za> New submission from Leon Avery: In the argparse module, the argument '--' is interpreted as a signal that everything after it is a positional argument. '--' is literally written into the argparse code, in _parse_known_args. This means that a user who wishes to use '--' in some other way is out of luck. I suggest the addition of an argument to __init__ (or a method call, or something) that allows '--' to be replaced with some string of the user's choice. ---------- components: Library (Lib) messages: 298967 nosy: Leon Avery priority: normal severity: normal status: open title: suggestion: allow termination argument in argparse to be specified as argument type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 10:15:36 2017 From: report at bugs.python.org (Gabriel Somlo) Date: Mon, 24 Jul 2017 14:15:36 +0000 Subject: [New-bugs-announce] [issue31013] gcc7 throws warning when pymem.h development header is used Message-ID: <1500905736.49.0.103266302575.issue31013@psf.upfronthosting.co.za> New submission from Gabriel Somlo: C programs using PyMem_MALLOC in pymem.h generate a warning when -Wint-in-bool-context is enabled (typically through -Wall). In places where -Werror is enabled (such as RPM build), this causes the build to fail with an error that looks like: ... In file included from /usr/include/python2.7/Python.h:78:0, from netnsmodule.c:16: netnsmodule.c: In function 'netns_nsexecvp': /usr/include/python2.7/pymem.h:97:30: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] ( (type *) PyMem_MALLOC((n) * sizeof(type)) ) ) ^ /usr/include/python2.7/pymem.h:75:15: note: in definition of macro 'PyMem_MALLOC' : malloc((n) ? (n) : 1)) ^ netnsmodule.c:61:10: note: in expansion of macro 'PyMem_NEW' argv = PyMem_NEW(char *, argc + 1); ^~~~~~~~~ cc1: all warnings being treated as errors error: command 'gcc' failed with exit status 1 ... I'm attaching a patch that fixes the issue, please consider applying! Thanks, --Gabriel ---------- files: Python-2.7.13-pymem-gcc7.patch keywords: patch messages: 298973 nosy: Gabriel Somlo priority: normal severity: normal status: open title: gcc7 throws warning when pymem.h development header is used versions: Python 2.7 Added file: http://bugs.python.org/file47035/Python-2.7.13-pymem-gcc7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 10:32:24 2017 From: report at bugs.python.org (John Still) Date: Mon, 24 Jul 2017 14:32:24 +0000 Subject: [New-bugs-announce] [issue31014] webbrowser._synthesize uses outdated calling signature for webbrowser.register Message-ID: <1500906744.5.0.485850012333.issue31014@psf.upfronthosting.co.za> New submission from John Still: The function `register` of the `webbrowser` module was updated a little while back to use the newish keyword-only argument syntax; however, the function `_synthesize` (also in `webbrowser`) is still using the outdated positional arguments only calling convention; leading a pair of tests in `Lib/tests/test_webbrowser.py` to fail. I've issued a PR that fixes the function call to use the more modern calling convention. ---------- components: Library (Lib) messages: 298976 nosy: jmsdvl priority: normal pull_requests: 2890 severity: normal status: open title: webbrowser._synthesize uses outdated calling signature for webbrowser.register type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 10:48:28 2017 From: report at bugs.python.org (Christian Aguilera) Date: Mon, 24 Jul 2017 14:48:28 +0000 Subject: [New-bugs-announce] [issue31015] PyErr_WriteUnraisable should be more verbose in Python 2.7 Message-ID: <1500907708.11.0.730292884872.issue31015@psf.upfronthosting.co.za> New submission from Christian Aguilera: When an exception is raised in a __del__ method or a finalizer (i.e. a weakref callback), only the exception name is printed out. Unfortunately, arbitrarily complex code can be involved which makes debugging quite tedious. It would be nice to display the full traceback, so that these errors are easier to diagnose. The same bug was reported in the past, but it was fixed for Python 3.3 onwards. Since it is trivial to get this fix in Python 2.7, I'm adding the patch for it here. ---------- components: Library (Lib) files: PyErr_WriteUnraisable.patch keywords: patch messages: 298979 nosy: christian.aguilera at foundry.com priority: normal severity: normal status: open title: PyErr_WriteUnraisable should be more verbose in Python 2.7 type: enhancement versions: Python 2.7 Added file: http://bugs.python.org/file47038/PyErr_WriteUnraisable.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 11:05:43 2017 From: report at bugs.python.org (Matthias Klose) Date: Mon, 24 Jul 2017 15:05:43 +0000 Subject: [New-bugs-announce] [issue31016] [Regression] sphinx shows an EOF error when using python2.7 from the trunk Message-ID: <1500908743.12.0.586455773708.issue31016@psf.upfronthosting.co.za> New submission from Matthias Klose: [forwarded from https://bugs.debian.org/869098 and] sphinx shows an EOF error when using python2.7 from the trunk. Last successful build was with the 2.7.13 release. It looks like this is triggered only when using the parallel mode in sphinx. I haven't yet worked on this issue, Sphinx is v1.4.9. sphinx-build -b html -d _build/doctrees -n -j 4 . _build/html Running Sphinx v1.4.9 making output directory... loading pickled environment... not yet created loading intersphinx inventory from https://docs.python.org/2/objects.inv... building [mo]: targets for 0 po files that are out of date building [html]: targets for 91 source files that are out of date updating environment: 91 added, 0 changed, 0 removed reading sources... [100%] test-repositories .. writing-tests waiting for workers... Exception occurred: File "/usr/lib/python2.7/dist-packages/sphinx/util/parallel.py", line 97, in _join_one exc, result = pipe.recv() EOFError ---------- components: Library (Lib) messages: 298980 nosy: doko priority: normal severity: normal status: open title: [Regression] sphinx shows an EOF error when using python2.7 from the trunk versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:07:49 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 24 Jul 2017 17:07:49 +0000 Subject: [New-bugs-announce] [issue31017] gcc 7 fallthrough warnings Message-ID: <1500916069.5.0.832452966963.issue31017@psf.upfronthosting.co.za> New submission from Charalampos Stratakis: On gcc 7 the new -Wimplicit-fallthrough option was introduced which produces warnings about switch cases that can fall through. The easiest way to silence these warnings is to add the comment /* Falls through. */ for those cases. More information here [0] Attaching the stderr output from compilation from the master branch. [0] https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/ ---------- files: fallthrough36 messages: 298996 nosy: cstratak priority: normal severity: normal status: open title: gcc 7 fallthrough warnings versions: Python 3.7 Added file: http://bugs.python.org/file47039/fallthrough36 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:20:41 2017 From: report at bugs.python.org (Segev Finer) Date: Mon, 24 Jul 2017 17:20:41 +0000 Subject: [New-bugs-announce] [issue31018] _tracemalloc frame_t packing optimization not working in Windows x64 Message-ID: <1500916841.59.0.00710376227878.issue31018@psf.upfronthosting.co.za> New submission from Segev Finer: ..\Modules\_tracemalloc.c(88): warning C4359: '': Alignment specifier is less than actual alignment (8), and will be ignored. For this to actually work we simply need to use #pragma pack instead. ---------- components: Extension Modules, Windows messages: 298999 nosy: Segev Finer, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: _tracemalloc frame_t packing optimization not working in Windows x64 type: enhancement versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 13:36:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Jul 2017 17:36:38 +0000 Subject: [New-bugs-announce] [issue31019] multiprocessing.Pool should join "dead" processes Message-ID: <1500917798.24.0.0382753367873.issue31019@psf.upfronthosting.co.za> New submission from STINNER Victor: With debug patches for bpo-26762, I noticed that some unit tests of test_multiprocessing_spawn leaks "dangling" processes: --- haypo at selma$ ./python -m test --fail-env-changed test_multiprocessing_spawn -v --match test.test_multiprocessing_spawn.WithProcessesTestPool.test_context == CPython 3.7.0a0 (heads/master:b364d9f, Jul 24 2017, 11:06:33) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] == Linux-4.11.9-200.fc25.x86_64-x86_64-with-fedora-25-Twenty_Five little-endian == hash algorithm: siphash24 64bit == cwd: /home/haypo/prog/python/master/build/test_python_20982 == CPU count: 4 == encodings: locale=UTF-8, FS=utf-8 Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0) Run tests sequentially 0:00:00 load avg: 0.16 [1/1] test_multiprocessing_spawn test_context (test.test_multiprocessing_spawn.WithProcessesTestPool) ... ok Warning -- Dangling processes: {} Dangling processes: {} ---------------------------------------------------------------------- Ran 1 test in 1.342s OK test_multiprocessing_spawn failed (env changed) 1 test altered the execution environment: test_multiprocessing_spawn Total duration: 1 sec Tests result: ENV CHANGED --- multiprocessing.Pool.terminate() doesn't call the join() method of a Process object if its is_alive() method returns false. But in practice, avoid the join() creates "dangling" processes. Attached pull request fixes the warning: Pool.terminate() now calls join() on all processes including "dead" processes. ---------- components: Library (Lib) messages: 299002 nosy: haypo priority: normal severity: normal status: open title: multiprocessing.Pool should join "dead" processes type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 17:05:21 2017 From: report at bugs.python.org (insomniacslk) Date: Mon, 24 Jul 2017 21:05:21 +0000 Subject: [New-bugs-announce] [issue31020] Add support for custom compressor in tarfile Message-ID: <1500930321.52.0.338757047173.issue31020@psf.upfronthosting.co.za> New submission from insomniacslk: Tarfile would benefit from exposing custom compressors. At the moment the only way to use something that is not gzip/bzip/lzma is to separate the archiving and compression steps. A possible approach is to pass a custom compression function to `tarfile.TarFile.open`. However the current interface is not clean enough to be exposed. I have made a very conservative change via a pull request on GitHub, see https://github.com/python/cpython/pull/2734 . Some additional considerations can be found there. A further step could require a simplified interface that only involves file name, file-like object and compression level, and returns a file-like object to read the compressed data from. For example: def my_compressor(name, fileobj=None, compresslevel=9): # compression happens here return filelike_object This further step is not captured in the pull request, but I can iterate and update the diff. ---------- components: Library (Lib) messages: 299017 nosy: insomniacslk priority: normal pull_requests: 2903 severity: normal status: open title: Add support for custom compressor in tarfile type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 17:50:50 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Jul 2017 21:50:50 +0000 Subject: [New-bugs-announce] [issue31021] Clarify programming faq. Message-ID: <1500933050.31.0.733502304217.issue31021@psf.upfronthosting.co.za> New submission from Terry J. Reedy: https://docs.python.org/3/faq/programming.html#why-does-22-10-return-3 "Why does -22 // 10 return -3? It?s primarily driven by the desire that i % j have the same sign as j. If you want that, and also want: i == (i // j) * j + (i % j) then integer division has to return the floor. C also requires that identity to hold, and then compilers that truncate i // j need to make i % j have the same sign as i. There are few real use cases for i % j when j is negative. When j is positive, there are many, and in virtually all of them it?s more useful for i % j to be >= 0. If the clock says 10 now, what did it say 200 hours ago? -190 % 12 == 2 is useful; -190 % 12 == -10 is a bug waiting to bite." A user noticed that '-190 % 12 == -10' is False, but would be True is '-' were inserted before '12', and posted https://github.com/python/cpython/pull/2768 to correct the presumed typo. It is not a typo, and I will close the issue, but the text as is is confusing. I propose replace "-190 % 12 == -10 is" with "if -190 % 12 were the mathematically equivalent -10, it would be" [a bug waiting to bite]. I don't like the 'bug' part because it would not be a bug, exactly, but it would be bug bait. I am not sure how to improve it though. ---------- assignee: docs at python components: Documentation messages: 299023 nosy: docs at python, terry.reedy priority: normal severity: normal stage: patch review status: open title: Clarify programming faq. type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 20:36:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 00:36:10 +0000 Subject: [New-bugs-announce] [issue31022] ERROR: testRegularFile (test.test_socket.SendfileUsingSendTest) random failure on AppVeyor Message-ID: <1500942970.9.0.437902553095.issue31022@psf.upfronthosting.co.za> New submission from STINNER Victor: https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.4809 (...) testNonRegularFile (test.test_socket.SendfileUsingSendTest) ... ok testOffset (test.test_socket.SendfileUsingSendTest) ... ok testRegularFile (test.test_socket.SendfileUsingSendTest) ... ERROR testWithTimeout (test.test_socket.SendfileUsingSendTest) ... ok testWithTimeoutTriggeredSend (test.test_socket.SendfileUsingSendTest) ... ok (...) ====================================================================== ERROR: testRegularFile (test.test_socket.SendfileUsingSendTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\projects\cpython\lib\test\test_socket.py", line 5225, in testRegularFile data = self.recv_data(conn) File "C:\projects\cpython\lib\test\test_socket.py", line 5201, in recv_data chunk = conn.recv(self.BUFSIZE) socket.timeout: timed out ---------------------------------------------------------------------- ---------- components: Tests messages: 299035 nosy: haypo priority: normal severity: normal status: open title: ERROR: testRegularFile (test.test_socket.SendfileUsingSendTest) random failure on AppVeyor versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 24 22:41:55 2017 From: report at bugs.python.org (svelankar) Date: Tue, 25 Jul 2017 02:41:55 +0000 Subject: [New-bugs-announce] [issue31023] Git Bootcamp and Cheat Sheet - Section 32.10 - Creating a Pull request needs an additional step Message-ID: <1500950515.8.0.297032298923.issue31023@psf.upfronthosting.co.za> New submission from svelankar: Section 32.10 - Creating a Pull Request Step 2 should be changed to Step 3 and so on. And a new step i.e. step 2 as "Press new pull request button" ---------- assignee: docs at python components: Documentation messages: 299039 nosy: docs at python, svelankar priority: normal severity: normal status: open title: Git Bootcamp and Cheat Sheet - Section 32.10 - Creating a Pull request needs an additional step _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 07:17:40 2017 From: report at bugs.python.org (=?utf-8?b?QmVybsOhdCBHw6Fib3I=?=) Date: Tue, 25 Jul 2017 11:17:40 +0000 Subject: [New-bugs-announce] [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv Message-ID: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> New submission from Bern?t G?bor: Hello, typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv which means that Sphinx fails to find these. Thanks, ---------- components: Library (Lib) messages: 299048 nosy: Bern?t G?bor priority: normal severity: normal status: open title: typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:03:58 2017 From: report at bugs.python.org (Arthur Darcet) Date: Tue, 25 Jul 2017 12:03:58 +0000 Subject: [New-bugs-announce] [issue31025] io.BytesIO: no way to get the length of the underlying buffer without copying data Message-ID: <1500984238.01.0.587335781014.issue31025@psf.upfronthosting.co.za> New submission from Arthur Darcet: If I'm not mistaken, a BytesIO buffer can be in three states: (1) `b = BytesIO(b'data')` -> free of any constraints (2) `d = b'data'; b = BytesIO(d)` -> cannot modify the underlying bytes without copying them (3) `b = BytesIO(b'data'); d = b.getbuffer()` -> cannot return a "bytes" representation of the data without copying it (the underlying buffer might change) My use-case is "how to get the length of the data currently in the BytesIO object". And right now, there are two solutions: (a) `len(b.getvalue())` (b) `len(b.getbuffer())` but, solution (a) is copying data if the buffer is in state (3) ; and solution (b) is copying data for state (2). And I don't see any way to distinguish between the three states from Python code. So as far as I understand it, there is no way to get the size of the buffer in Python that would reliably not copy any data Should I open a PR to add a `size()` method on the BytesIO class? (simply returning `PyLong_FromSsize_t(self->string_size)` ---------- components: IO messages: 299054 nosy: rthr priority: normal severity: normal status: open title: io.BytesIO: no way to get the length of the underlying buffer without copying data type: enhancement versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:10:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 12:10:17 +0000 Subject: [New-bugs-announce] [issue31026] test_bisect fails when run directly Message-ID: <1500984617.08.0.739686632306.issue31026@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: $ ./python Lib/test/test_dbm.py ..BDB0004 fop_read_meta: @test_29975_tmp_ndbm.db: unexpected file type or format ..EBDB3028 @test_29975_tmp.db: unable to flush: No such file or directory ..EBDB3028 @test_29975_tmp.db: unable to flush: No such file or directory .E......... ====================================================================== ERROR: test_anydbm_creation (__main__.TestCase-dbm.ndbm) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_dbm.py", line 73, in test_anydbm_creation self.read_helper(f) File "Lib/test/test_dbm.py", line 114, in read_helper self.assertEqual(self._dict[key], f[key.encode("ascii")]) KeyError: b'0' ====================================================================== ERROR: test_anydbm_modification (__main__.TestCase-dbm.ndbm) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_dbm.py", line 88, in test_anydbm_modification self.read_helper(f) File "Lib/test/test_dbm.py", line 114, in read_helper self.assertEqual(self._dict[key], f[key.encode("ascii")]) KeyError: b'0' ====================================================================== ERROR: test_anydbm_read (__main__.TestCase-dbm.ndbm) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_dbm.py", line 94, in test_anydbm_read self.read_helper(f) File "Lib/test/test_dbm.py", line 114, in read_helper self.assertEqual(self._dict[key], f[key.encode("ascii")]) KeyError: b'0' ---------------------------------------------------------------------- Ran 19 tests in 0.683s FAILED (errors=3) ---------- components: Tests messages: 299055 nosy: serhiy.storchaka priority: normal severity: normal status: open title: test_bisect fails when run directly type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:17:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 12:17:21 +0000 Subject: [New-bugs-announce] [issue31027] test_listcomps fails when run directly Message-ID: <1500985041.62.0.809402011924.issue31027@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: $ ./python Lib/test/test_listcomps.py doctest (test.test_listcomps) ... 33 tests with zero failures Traceback (most recent call last): File "Lib/test/test_listcomps.py", line 148, in test_main(verbose=True) File "Lib/test/test_listcomps.py", line 142, in test_main support.run_doctest(test_genexps, verbose) NameError: name 'test_genexps' is not defined ---------- components: Tests messages: 299057 nosy: serhiy.storchaka priority: normal severity: normal status: open title: test_listcomps fails when run directly type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:20:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 12:20:58 +0000 Subject: [New-bugs-announce] [issue31028] test_pydoc fails when run directly Message-ID: <1500985258.67.0.797354625815.issue31028@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: $ ./python Lib/test/test_pydoc.py ... ====================================================================== ERROR: test_mixed_case_module_names_are_lower_cased (__main__.PydocDocTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_pydoc.py", line 462, in test_mixed_case_module_names_are_lower_cased self.assertIn('xml.etree.elementtree', doc_link) File "/home/serhiy/py/cpython/Lib/unittest/case.py", line 1102, in assertIn if member not in container: TypeError: argument of type 'NoneType' is not iterable ---------------------------------------------------------------------- Ran 49 tests in 5.716s FAILED (errors=1, skipped=3) Traceback (most recent call last): File "Lib/test/test_pydoc.py", line 1106, in test_main() File "/home/serhiy/py/cpython/Lib/test/support/__init__.py", line 2071, in decorator return func(*args) File "Lib/test/test_pydoc.py", line 1100, in test_main PydocWithMetaClasses, File "/home/serhiy/py/cpython/Lib/test/support/__init__.py", line 1940, in run_unittest _run_suite(suite) File "/home/serhiy/py/cpython/Lib/test/support/__init__.py", line 1905, in _run_suite raise TestFailed(err) test.support.TestFailed: Traceback (most recent call last): File "Lib/test/test_pydoc.py", line 462, in test_mixed_case_module_names_are_lower_cased self.assertIn('xml.etree.elementtree', doc_link) File "/home/serhiy/py/cpython/Lib/unittest/case.py", line 1102, in assertIn if member not in container: TypeError: argument of type 'NoneType' is not iterable ---------- components: Tests messages: 299059 nosy: serhiy.storchaka priority: normal severity: normal status: open title: test_pydoc fails when run directly type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:25:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 12:25:22 +0000 Subject: [New-bugs-announce] [issue31029] test_tokenize fails when run directly Message-ID: <1500985522.57.0.56152485573.issue31029@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: $ ./python Lib/test/test_tokenize.py Traceback (most recent call last): File "Lib/test/test_tokenize.py", line 1607, in unittest.main() NameError: name 'unittest' is not defined ---------- components: Tests keywords: easy messages: 299062 nosy: serhiy.storchaka priority: normal severity: normal status: open title: test_tokenize fails when run directly type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:41:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 12:41:50 +0000 Subject: [New-bugs-announce] [issue31030] sys.executable can be not normalized Message-ID: <1500986510.69.0.620251860274.issue31030@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: test_executable in Lib/test/test_sys.py tests that sys.executable is absolute. But this test is too strong, it fails if sys.executable is not normalized. $ Lib/../python -m test test_sys Run tests sequentially 0:00:00 load avg: 0.39 [1/1] test_sys test test_sys failed -- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_sys.py", line 649, in test_executable self.assertEqual(os.path.abspath(sys.executable), sys.executable) AssertionError: '/home/serhiy/py/cpython/python' != '/home/serhiy/py/cpython/Lib/../python' - /home/serhiy/py/cpython/python + /home/serhiy/py/cpython/Lib/../python ? +++++++ test_sys failed 1 test failed: test_sys Total duration: 2 sec Tests result: FAILURE I don't know what is wrong: the value of sys.executable or the test. ---------- components: Interpreter Core, Tests messages: 299065 nosy: serhiy.storchaka priority: normal severity: normal status: open title: sys.executable can be not normalized type: behavior versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 08:48:04 2017 From: report at bugs.python.org (Niklas Fiekas) Date: Tue, 25 Jul 2017 12:48:04 +0000 Subject: [New-bugs-announce] [issue31031] Unify duplicate bits_in_digit and bit_length Message-ID: <1500986884.91.0.522602979941.issue31031@psf.upfronthosting.co.za> New submission from Niklas Fiekas: My previous patch to optimize bits_in_digit was rejected: http://bugs.python.org/issue29782 This leaves this issue open (mathmodule.c): /* XXX: This routine does more or less the same thing as * bits_in_digit() in Objects/longobject.c. Someday it would be nice to * consolidate them. On BSD, there's a library function called fls() * that we could use, and GCC provides __builtin_clz(). */ We could still deal with the code duplication without the complexity of the optimizations in the previous patch. ---------- components: Interpreter Core messages: 299069 nosy: louielu, mark.dickinson, niklasf priority: normal severity: normal status: open title: Unify duplicate bits_in_digit and bit_length type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:13:10 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 25 Jul 2017 13:13:10 +0000 Subject: [New-bugs-announce] [issue31032] test_ssl Message-ID: <1500988390.15.0.0705415261794.issue31032@psf.upfronthosting.co.za> New submission from St?phane Wirtel: Last commit on master commit ccfdb60af7b2db578c1aceb7742cec0330766667 (HEAD -> master, upstream/master, upstream/HEAD) Fedora 26 openssl-libs-1.1.0f-7.fc26.x86_64 openssl-devel-1.1.0f-7.fc26.x86_64 openssl-1.1.0f-7.fc26.x86_64 ``` Run tests sequentially 0:00:00 load avg: 1.07 [1/1] test_ssl Exception in thread Thread-85: Traceback (most recent call last): File "/home/stephane/src/github.com/python/cpython/Lib/threading.py", line 917, in _bootstrap_inner self.run() File "/home/stephane/src/github.com/python/cpython/Lib/test/test_ssl.py", line 1936, in run if not self.wrap_conn(): File "/home/stephane/src/github.com/python/cpython/Lib/test/test_ssl.py", line 1881, in wrap_conn self.sock, server_side=True) File "/home/stephane/src/github.com/python/cpython/Lib/ssl.py", line 401, in wrap_socket _context=self, _session=session) File "/home/stephane/src/github.com/python/cpython/Lib/ssl.py", line 808, in __init__ self.do_handshake() File "/home/stephane/src/github.com/python/cpython/Lib/ssl.py", line 1061, in do_handshake self._sslobj.do_handshake() File "/home/stephane/src/github.com/python/cpython/Lib/ssl.py", line 683, in do_handshake self._sslobj.do_handshake() OSError: [Errno 0] Error test test_ssl failed -- Traceback (most recent call last): File "/home/stephane/src/github.com/python/cpython/Lib/test/test_ssl.py", line 3273, in test_alpn_protocols self.assertIsInstance(stats, ssl.SSLError) AssertionError: {'compression': None, 'cipher': ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256), 'peercert': {}, 'client_alpn_protocol': None, 'client_npn_protocol': None, 'version': 'TLSv1.2', 'session_reused': False, 'session': <_ssl.Session object at 0x7f7ed8110a80>, 'server_alpn_protocols': [None], 'server_npn_protocols': [None], 'server_shared_ciphers': [[('ECDHE-ECDSA-AES256-GCM-SHA384', 'TLSv1.2', 256), ('ECDHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES128-GCM-SHA256', 'TLSv1.2', 128), ('ECDHE-RSA-AES128-GCM-SHA256', 'TLSv1.2', 128), ('ECDHE-ECDSA-CHACHA20-POLY1305', 'TLSv1.2', 256), ('ECDHE-RSA-CHACHA20-POLY1305', 'TLSv1.2', 256), ('DHE-DSS-AES256-GCM-SHA384', 'TLSv1.2', 256), ('DHE-RSA-AES256-GCM-SHA384', 'TLSv1.2', 256), ('DHE-DSS-AES128-GCM-SHA256', 'TLSv1.2', 128), ('DHE-RSA-AES128-GCM-SHA256', 'TLSv1.2', 128), ('DHE-RSA-CHACHA20-POLY1305', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-CCM8', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-CCM', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-SHA384', 'TLSv1.2', 256), ('ECDHE-RSA-AES256-SHA384', 'TLSv1.2', 256), ('ECDHE-ECDSA-AES256-SHA', 'TLSv1.0', 256), ('ECDHE-RSA-AES256-SHA', 'TLSv1.0', 256), ('DHE-RSA-AES256-CCM8', 'TLSv1.2', 256), ('DHE-RSA-AES256-CCM', 'TLSv1.2', 256), ('DHE-RSA-AES256-SHA256', 'TLSv1.2', 256), ('DHE-DSS-AES256-SHA256', 'TLSv1.2', 256), ('DHE-RSA-AES256-SHA', 'SSLv3', 256), ('DHE-DSS-AES256-SHA', 'SSLv3', 256), ('ECDHE-ECDSA-AES128-CCM8', 'TLSv1.2', 128), ('ECDHE-ECDSA-AES128-CCM', 'TLSv1.2', 128), ('ECDHE-ECDSA-AES128-SHA256', 'TLSv1.2', 128), ('ECDHE-RSA-AES128-SHA256', 'TLSv1.2', 128), ('ECDHE-ECDSA-AES128-SHA', 'TLSv1.0', 128), ('ECDHE-RSA-AES128-SHA', 'TLSv1.0', 128), ('DHE-RSA-AES128-CCM8', 'TLSv1.2', 128), ('DHE-RSA-AES128-CCM', 'TLSv1.2', 128), ('DHE-RSA-AES128-SHA256', 'TLSv1.2', 128), ('DHE-DSS-AES128-SHA256', 'TLSv1.2', 128), ('DHE-RSA-AES128-SHA', 'SSLv3', 128), ('DHE-DSS-AES128-SHA', 'SSLv3', 128), ('ECDHE-ECDSA-CAMELLIA256-SHA384', 'TLSv1.2', 256), ('ECDHE-RSA-CAMELLIA256-SHA384', 'TLSv1.2', 256), ('ECDHE-ECDSA-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('ECDHE-RSA-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('DHE-RSA-CAMELLIA256-SHA256', 'TLSv1.2', 256), ('DHE-DSS-CAMELLIA256-SHA256', 'TLSv1.2', 256), ('DHE-RSA-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('DHE-DSS-CAMELLIA128-SHA256', 'TLSv1.2', 128), ('DHE-RSA-CAMELLIA256-SHA', 'SSLv3', 256), ('DHE-DSS-CAMELLIA256-SHA', 'SSLv3', 256), ('DHE-RSA-CAMELLIA128-SHA', 'SSLv3', 128), ('DHE-DSS-CAMELLIA128-SHA', 'SSLv3', 128), ('AES256-GCM-SHA384', 'TLSv1.2', 256), ('AES128-GCM-SHA256', 'TLSv1.2', 128), ('AES256-CCM8', 'TLSv1.2', 256), ('AES256-CCM', 'TLSv1.2', 256), ('AES128-CCM8', 'TLSv1.2', 128), ('AES128-CCM', 'TLSv1.2', 128), ('AES256-SHA256', 'TLSv1.2', 256), ('AES128-SHA256', 'TLSv1.2', 128), ('AES256-SHA', 'SSLv3', 256), ('AES128-SHA', 'SSLv3', 128), ('CAMELLIA256-SHA256', 'TLSv1.2', 256), ('CAMELLIA128-SHA256', 'TLSv1.2', 128), ('CAMELLIA256-SHA', 'SSLv3', 256), ('CAMELLIA128-SHA', 'SSLv3', 128)]]} is not an instance of test_ssl failed 1 test failed: test_ssl Total duration: 1 sec Tests result: FAILURE ``` ---------- messages: 299075 nosy: christian.heimes, matrixise priority: normal severity: normal status: open title: test_ssl versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 09:21:40 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 25 Jul 2017 13:21:40 +0000 Subject: [New-bugs-announce] [issue31033] Add argument to .cancel() of Task and Future Message-ID: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> New submission from ???? ?????????: History: First, I tried to debug code around asyncio.Task() cancelling. So I wrote: ===== try: ... except Exception as e: print(e) ===== When task was cancelled, an empty string printed. I wondered why. So I change the code to ==== print(repr(e)) ==== and it printed 'CancelledError' as expected. Next, I tried: ==== print(Exception()) ==== It prints empty string too! So I came up to propose API change. I propose to add argument to the .cancel() methods (for Task and for Future). This argument should be passed to the CancelledError constructor. This will greatly improves debugging -- it allows to easily know why Future/Task was cancelled. Also, this change does not break current code. Argument must be optional. ---------- components: asyncio messages: 299079 nosy: socketpair, yselivanov priority: normal severity: normal status: open title: Add argument to .cancel() of Task and Future type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:11:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Jul 2017 15:11:10 +0000 Subject: [New-bugs-announce] [issue31034] test_subprocess_send_signal() of test_asyncio hangs if SIGHUP is ignored Message-ID: <1500995470.63.0.711892851496.issue31034@psf.upfronthosting.co.za> New submission from STINNER Victor: A colleague reported me that the Python test suite hangs on running test_subprocess_send_signal() of test_asyncio. After analysing the issue, it seems like the test hangs becaues the RPM package builder ignores SIGHUP using something like: def daemonize(): [...] signal.signal(signal.SIGHUP, signal.SIG_IGN) [...] While we should see if Koji (software used to build packages) can be patched to restore the default signal handler for SIGHUP, I would like to enhance test_asyncio to not depend on the current SIGHUP signal handler. I modified Lib/site.py to add "import signal; signal.signal(signal.SIGHUP, signal.SIG_IGN)": on 406 test files, only test_asyncio hangs. Attached PR fixes test_asyncio. ---------- components: Tests, asyncio messages: 299094 nosy: haypo, yselivanov priority: normal severity: normal status: open title: test_subprocess_send_signal() of test_asyncio hangs if SIGHUP is ignored versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:13:38 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 25 Jul 2017 15:13:38 +0000 Subject: [New-bugs-announce] [issue31035] Document order of firing callbacks added with Future.add_done_callback() Message-ID: <1500995618.96.0.99651815805.issue31035@psf.upfronthosting.co.za> New submission from ???? ?????????: Please document these two things: * Order of callbacks firing is not specified. (Is it True?) * All callbacks are called *BEFORE* await triggered: ==== f = asyncio.Future() f.add_done_callback(xxx) f.add_done_callback(yyy) try: await f except Exception: ... # all callbacks are called BEFORE entering that place (for example) * How exceptions in callbacks are handled ---------- assignee: docs at python components: Documentation, asyncio messages: 299095 nosy: docs at python, socketpair, yselivanov priority: normal severity: normal status: open title: Document order of firing callbacks added with Future.add_done_callback() type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:13:54 2017 From: report at bugs.python.org (Matthias Klose) Date: Tue, 25 Jul 2017 15:13:54 +0000 Subject: [New-bugs-announce] [issue31036] building the python docs requires the blurb module Message-ID: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> New submission from Matthias Klose: [Ned asked to submit that as a release blocker] the build of the documentation fails with at least the 3.5.4rc1. It adds a new build dependency (blurb), which is inconvenient to build on stable environments, or when pip is not available. Please could you consider including the blurb module itself in python for the stable branches? Also the build fails with the release tarballs. ---------- components: Build messages: 299096 nosy: benjamin.peterson, doko, georg.brandl, larry, ned.deily priority: release blocker severity: normal status: open title: building the python docs requires the blurb module versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 11:15:09 2017 From: report at bugs.python.org (Lisabel Leon) Date: Tue, 25 Jul 2017 15:15:09 +0000 Subject: [New-bugs-announce] [issue31037] Results in section 4.4 break and continue Message-ID: <1500995709.73.0.36567687409.issue31037@psf.upfronthosting.co.za> New submission from Lisabel Leon: The first example of this section shows different results if typed into the Python interpreter. This is the documentation (documentation.png) and these are the results as I type it into my environment (testresults.jpg). ---------- assignee: docs at python components: Documentation files: testresults.PNG messages: 299097 nosy: Lisabel Leon, docs at python priority: normal severity: normal status: open title: Results in section 4.4 break and continue versions: Python 3.6 Added file: http://bugs.python.org/file47040/testresults.PNG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 12:17:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Jul 2017 16:17:29 +0000 Subject: [New-bugs-announce] [issue31038] test_runpy causes running all Python tests when run directly Message-ID: <1500999449.61.0.732584715877.issue31038@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: $ ./python Lib/test/test_runpy.py .......................== CPython 3.7.0a0 (heads/master-dirty:39243779f4, Jul 25 2017, 14:32:21) [GCC 6.3.0 20170406] == Linux-4.10.0-28-generic-i686-athlon-with-debian-stretch-sid little-endian == hash algorithm: siphash24 32bit == cwd: /home/serhiy/py/cpython/build/test_python_31873 == CPU count: 2 == encodings: locale=UTF-8, FS=utf-8 Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0) Run tests sequentially 0:00:00 load avg: 0.85 [ 1/406] test_grammar 0:00:00 load avg: 0.85 [ 2/406] test_opcodes 0:00:00 load avg: 0.85 [ 3/406] test_dict 0:00:01 load avg: 0.85 [ 4/406] test_builtin 0:00:02 load avg: 0.85 [ 5/406] test_exceptions 0:00:02 load avg: 0.85 [ 6/406] test_types ... In isolated mode it runs normally. $ ./python -I Lib/test/test_runpy.py .............................. ---------------------------------------------------------------------- Ran 30 tests in 2.776s OK ---------- components: Tests messages: 299118 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: test_runpy causes running all Python tests when run directly type: behavior versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 14:31:26 2017 From: report at bugs.python.org (Alex Davies) Date: Tue, 25 Jul 2017 18:31:26 +0000 Subject: [New-bugs-announce] [issue31039] Python an android must use ashmem instead of shmem Message-ID: <1501007486.15.0.596931220228.issue31039@psf.upfronthosting.co.za> New submission from Alex Davies: ``` ERROR! Unexpected Exception: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770. ``` ---------- components: Build messages: 299130 nosy: Alex Davies, xdegaye priority: normal severity: normal status: open title: Python an android must use ashmem instead of shmem type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 15:25:41 2017 From: report at bugs.python.org (Daniel Watkins) Date: Tue, 25 Jul 2017 19:25:41 +0000 Subject: [New-bugs-announce] [issue31040] mimetypes.add_type should complain when you give it an undotted ext Message-ID: <1501010741.93.0.952054126016.issue31040@psf.upfronthosting.co.za> New submission from Daniel Watkins: ``` import mimetypes print(mimetypes.guess_type('foo.manifest')) mimetypes.add_type('text/plain', 'manifest') print(mimetypes.guess_type('foo.manifest')) ``` results in: ``` ('application/x-ms-manifest', None) ('application/x-ms-manifest', None) ``` I (mistakenly) expected the latter print to give me "('text/plain', None)". It doesn't because I should have prepended a . to the second add_type argument. I think add_type should error out when given an extension without a dot-prefix, because it's extremely unlikely that code that does so is behaving as intended with the current implementation. (At the very least, documentation should be updated to make this expectation clearer.) ---------- components: Library (Lib) messages: 299135 nosy: odd_bloke priority: normal severity: normal status: open title: mimetypes.add_type should complain when you give it an undotted ext _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 20:54:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 00:54:05 +0000 Subject: [New-bugs-announce] [issue31041] test_handle_called_with_mp_queue() of test_logging: threading_cleanup() failed to cleanup Message-ID: <1501030445.94.0.683702784342.issue31041@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/625/steps/test/logs/stdio (...) test_output (test.test_logging.UnixSocketHandlerTest) ... ok test_output (test.test_logging.UnixDatagramHandlerTest) ... ok test_output (test.test_logging.UnixSysLogHandlerTest) ... ok test__all__ (test.test_logging.MiscTestCase) ... ok test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ... Warning -- threading_cleanup() failed to cleanup -1 threads after 4 sec (count: 0, dangling: 1) ok test_handle_called_with_queue_queue (test.test_logging.QueueListenerTest) ... ok test_no_messages_in_queue_after_stop (test.test_logging.QueueListenerTest) ... ok (...) See also bpo-30830: "HTTPHandlerTest of test_logging leaks a "dangling" thread on AMD64 FreeBSD CURRENT Non-Debug 3.x". Previously fixed warnings: bpo-30131. ---------- components: Tests keywords: buildbot messages: 299180 nosy: haypo priority: normal severity: normal status: open title: test_handle_called_with_mp_queue() of test_logging: threading_cleanup() failed to cleanup type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 25 23:02:59 2017 From: report at bugs.python.org (Joseph Fox-Rabinovitz) Date: Wed, 26 Jul 2017 03:02:59 +0000 Subject: [New-bugs-announce] [issue31042] Inconsistency in documentation of operator.index Message-ID: <1501038179.61.0.173139487282.issue31042@psf.upfronthosting.co.za> New submission from Joseph Fox-Rabinovitz: The docs for [`operator.index`][1] and `operator.__index__` state that > Return *a* converted to an integer. Equivalent to `a.__index__()`. The first sentence is correct, but the second is not. First of all, we have the data model [docs][2]: > For custom classes, implicit invocations of special methods are only guaranteed to work correctly if defined on an object?s type, not in the object?s instance dictionary. Secondly, we can make a simple counter-example in code: ``` import operator class A: def __index__(self): return 0 a = A() a.__index__ = (lambda self: 1).__get__(a, type(a)) operator.index(a) ``` The result is of course zero and not one. I believe that the docs should read something more like one of the following to avoid being misleading: > Return *a* converted to an integer, if it is already an integral type. > Return *a* converted to an integer. Equivalent to `type(a).__index__(a)`. Or a combination of both: > Return *a* converted to an integer, if it is already an integral type. Equivalent to `type(a).__index__(a)`. [1]: https://docs.python.org/3/library/operator.html#operator.index [2]: https://docs.python.org/3/reference/datamodel.html#special-method-lookup ---------- assignee: docs at python components: Documentation messages: 299195 nosy: docs at python, madphysicist priority: normal severity: normal status: open title: Inconsistency in documentation of operator.index type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 06:20:49 2017 From: report at bugs.python.org (Utkarsh Upadhyay) Date: Wed, 26 Jul 2017 10:20:49 +0000 Subject: [New-bugs-announce] [issue31043] Tests running twice. Message-ID: <1501064449.34.0.054163573258.issue31043@psf.upfronthosting.co.za> New submission from Utkarsh Upadhyay: Due to a rebase artifact (sorry!), the tests for the datetime module are being run twice: test_datetime.py: [...] cls.tearDownClass = tearDownClass all_test_classes.extend(test_classes) all_test_classes.extend(test_classes) def test_main(): run_unittest(*all_test_classes) [...] Fix coming shortly. ---------- components: Tests messages: 299218 nosy: musically_ut priority: normal severity: normal status: open title: Tests running twice. type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 07:46:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Jul 2017 11:46:30 +0000 Subject: [New-bugs-announce] [issue31044] FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT Debug 3.x Message-ID: <1501069590.31.0.999059356649.issue31044@psf.upfronthosting.co.za> New submission from STINNER Victor: The test failed in the build 632 (Wed Jul 26 10:47:01 2017) for the first time. http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/632/steps/test/logs/stdio == CPython 3.7.0a0 (heads/master:ede9084476, Jul 26 2017, 20:49:33) [GCC 4.2.1 Compatible FreeBSD Clang 5.0.0 (trunk 308421)] == FreeBSD-12.0-CURRENT-amd64-64bit-ELF little-endian == hash algorithm: siphash24 64bit == cwd: /usr/home/buildbot/python/3.x.koobs-freebsd-current/build/build/test_python_23542 == CPU count: 2 == encodings: locale=US-ASCII, FS=ascii Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=1, verbose=0, bytes_warning=2, quiet=0, hash_randomization=1, isolated=0) Using random seed 9341910 ... ====================================================================== FAIL: test_makedev (test.test_posix.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_posix.py", line 543, in test_makedev self.assertEqual(posix.makedev(major, minor), dev) AssertionError: 1292118443 != 954774858155 ---------- components: Tests messages: 299220 nosy: haypo priority: normal severity: normal status: open title: FAIL: test_makedev (test.test_posix.PosixTester) on AMD64 FreeBSD CURRENT Debug 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 10:10:14 2017 From: report at bugs.python.org (Julien Palard) Date: Wed, 26 Jul 2017 14:10:14 +0000 Subject: [New-bugs-announce] [issue31045] Add a language switch to the Python documentation Message-ID: <1501078214.01.0.529111921671.issue31045@psf.upfronthosting.co.za> New submission from Julien Palard: A language switch, like the actual version switch, should allow to change from a translation to another. I mean jumping from docs.python.org/3/ to docs.python.org/fr/3/ and so on. It's already discussed in PEP 545. ---------- messages: 299234 nosy: mdk priority: normal pull_requests: 2947 severity: normal status: open title: Add a language switch to the Python documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 12:39:28 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 26 Jul 2017 16:39:28 +0000 Subject: [New-bugs-announce] [issue31046] ensurepip does not honour the value of $(prefix) Message-ID: <1501087168.72.0.253170854096.issue31046@psf.upfronthosting.co.za> New submission from Xavier de Gaye: When cross-compiling, the local Python interpreter that is used to run ensurepip may not have the same value of sys.prefix as the value of the 'prefix' variable that is set in the Makefile. With the following values used to install Python locally for a later copy to the files hierarchy owned by the 'termux' application on an Android device: DESTDIR=/tmp/android prefix=/data/data/com.termux/files/usr/local 'make install' causes ensurepip to install pip in $(DESTDIR)/usr/local instead of the expected $(DESTDIR)/$(prefix) where is installed the standard library. The attached patch fixes the problem. The patch was implemented assuming that pip uses distutils for the installation (note that setup.py also uses the --prefix option in the Makefile), but I know nothing about pip so forgive me if the patch is wrong and please just assume it is just a way to demonstrate the problem. ---------- components: Cross-Build files: ensurepip_prefix.diff keywords: patch messages: 299252 nosy: Alex.Willmer, dstufft, martin.panter, ncoghlan, xdegaye priority: normal severity: normal status: open title: ensurepip does not honour the value of $(prefix) type: behavior versions: Python 3.7 Added file: http://bugs.python.org/file47041/ensurepip_prefix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 12:47:29 2017 From: report at bugs.python.org (Christoph Reiter) Date: Wed, 26 Jul 2017 16:47:29 +0000 Subject: [New-bugs-announce] [issue31047] Windows: os.path.isabs(os.path.abspath(" ")) == False Message-ID: <1501087649.97.0.982453892523.issue31047@psf.upfronthosting.co.za> New submission from Christoph Reiter: On Windows os.path.abspath(" ") == " " While that's not a valid Windows path, similar invalid paths like "" or "?" etc all produce an absolute path. Tested on 2.7 and 3.6 ---------- components: Windows messages: 299253 nosy: lazka, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows: os.path.isabs(os.path.abspath(" ")) == False versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 13:44:32 2017 From: report at bugs.python.org (Segev Finer) Date: Wed, 26 Jul 2017 17:44:32 +0000 Subject: [New-bugs-announce] [issue31048] ResourceWarning in test_asyncio.test_events..ProactorEventLoopTests.test_create_server_ssl_verify_failed Message-ID: <1501091072.67.0.693498013368.issue31048@psf.upfronthosting.co.za> New submission from Segev Finer: >python -X tracemalloc=30 -m unittest test.test_asyncio.test_events.ProactorEventLoopTests.test_create_server_ssl_verify_failed Running Debug|x64 interpreter... lib\asyncio\sslproto.py:330: ResourceWarning: unclosed transport source=self) Object allocated at (most recent call first): File "lib\asyncio\sslproto.py", lineno 435 self, self._app_protocol) File "lib\asyncio\proactor_events.py", lineno 401 server_side, server_hostname) File "lib\asyncio\proactor_events.py", lineno 507 extra={'peername': addr}, server=server) File "lib\asyncio\events.py", lineno 122 self._callback(*self._args) File "lib\asyncio\base_events.py", lineno 1413 handle._run() File "lib\asyncio\base_events.py", lineno 420 self._run_once() File "lib\asyncio\base_events.py", lineno 453 self.run_forever() File "lib\test\test_asyncio\test_events.py", lineno 1099 self.loop.run_until_complete(f_c) File "lib\unittest\case.py", lineno 615 testMethod() File "lib\unittest\case.py", lineno 663 return self.run(*args, **kwds) File "lib\unittest\suite.py", lineno 122 test(result) File "lib\unittest\suite.py", lineno 84 return self.run(*args, **kwds) File "lib\unittest\suite.py", lineno 122 test(result) File "lib\unittest\suite.py", lineno 84 return self.run(*args, **kwds) File "lib\unittest\runner.py", lineno 176 test(result) File "lib\unittest\main.py", lineno 256 self.result = testRunner.run(self.test) File "lib\unittest\main.py", lineno 95 self.runTests() File "lib\unittest\__main__.py", lineno 18 main(module=None) File "lib\runpy.py", lineno 85 exec(code, run_globals) File "lib\runpy.py", lineno 193 "__main__", mod_spec) . ---------------------------------------------------------------------- Ran 1 test in 1.408s OK ---------- components: Tests, Windows messages: 299256 nosy: Segev Finer, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: ResourceWarning in test_asyncio.test_events..ProactorEventLoopTests.test_create_server_ssl_verify_failed type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 14:07:35 2017 From: report at bugs.python.org (Shea Craig) Date: Wed, 26 Jul 2017 18:07:35 +0000 Subject: [New-bugs-announce] [issue31049] macOS Python package receipts do not have version numbers Message-ID: <1501092455.87.0.102149463172.issue31049@psf.upfronthosting.co.za> New submission from Shea Craig: The Python installer package for macOS is versioned, however, the included sub packages have no version information. This results in the receipts having no version. Many enterprise software management tools rely on the receipt information to determine whether something is present and whether it's due for an update. We use Munki, are are currently working around this issue, but ideally the subpackages would have the version info included. $ for PKG in $(pkgutil --pkgs | grep org.python);do pkgutil --pkg-info $PKG;done package-id: org.python.Python.PythonApplications-3.6 version: 0 volume: / location: Applications install-time: 1494351483 package-id: org.python.Python.PythonDocumentation-3.6 version: 0 volume: / location: Library/Frameworks/Python.framework/Versions/3.6/Resources/English.lproj/Documentation install-time: 1494351483 package-id: org.python.Python.PythonFramework-3.6 version: 0 volume: / location: Library/Frameworks/Python.framework install-time: 1494351483 package-id: org.python.Python.PythonUnixTools-3.6 version: 0 volume: / location: usr/local/bin install-time: 1494351483 ---------- components: macOS messages: 299257 nosy: Shea Craig, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: macOS Python package receipts do not have version numbers versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 15:18:52 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 19:18:52 +0000 Subject: [New-bugs-announce] [issue31050] IDLE, configdialog: Factor out GenTab class from ConfigDialog Message-ID: <1501096732.49.0.178704546574.issue31050@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Followup to 31003, tests, and 30853, tracers, similar to 31004, FontTab. After creating new class, we can change names without worry about clashing with names elsewhere in ConfigDialog. ---------- messages: 299259 nosy: csabella, terry.reedy priority: normal severity: normal status: open title: IDLE, configdialog: Factor out GenTab class from ConfigDialog _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 16:26:38 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Jul 2017 20:26:38 +0000 Subject: [New-bugs-announce] [issue31051] IDLE, configdialog, General tab: re-arrange, test user entries Message-ID: <1501100798.06.0.368470665591.issue31051@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Fix bugs and enhance the page. The three little frames are too much, and in the wrong order. Proposal: Window to open at startup: O Shell O Editor Initial size: Width [_] Height [] When run code in editor: ... (see bpo-19042 for possible change) This compression will make room for former extension options (#27099). Tk variable startup_editor should be BooleanVar. Size vars should be IntVars. Accepting *and saving* 'nonsense' as a size is a bug (idlfConf issues a warning when reading). Sizes should be at least 1. Changing to spinbox would ensure this. Or validate entry on each char (only accept ascii digits). For helplist, Up and Down keys move selection indicator but *do not move the internal selection*. Delete key deletes the internal selection, not the item highlighted. Fix should be similar to fix for fontlist. ---------- assignee: terry.reedy components: IDLE messages: 299262 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE, configdialog, General tab: re-arrange, test user entries type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 19:43:32 2017 From: report at bugs.python.org (zoof) Date: Wed, 26 Jul 2017 23:43:32 +0000 Subject: [New-bugs-announce] [issue31052] smtplib not honoring bcc header Message-ID: <1501112612.68.0.83618950649.issue31052@psf.upfronthosting.co.za> New submission from zoof: When I try sending an email, using smtplib, with the bcc header set, the bcc header is included in messages send to the "to" and "cc" addresses. According to section 4.5.3 of rfc 822: > The contents of this field are not included in copies of the message sent to the primary and secondary recipients. So this behavior is incorrect. It should not be up to the mail client to ignore the bcc field. Here's a script that can replicate the problem: #!/usr/bin/env python import smtplib from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText body = "this is a test" #craft the message fromaddr = 'ned at example.com' server = smtplib.SMTP('smtp.example.com', 587) p = 'Hunter2!' subject = "test" toaddr = "foo at example.com" ccaddr = "bar at example.com" bccaddr = "baz at example.com" msg = MIMEMultipart() msg['cc'] = ccaddr msg['bcc'] = bccaddr msg['From'] = fromaddr msg['To'] = toaddr msg['Subject'] = subject msg.attach(MIMEText(body, 'plain')) #send the message server.starttls() server.login(fromaddr, p) text = msg.as_string() server.sendmail(fromaddr, toaddr, text) server.quit() ---------- components: Library (Lib) messages: 299278 nosy: zoof priority: normal severity: normal status: open title: smtplib not honoring bcc header type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 26 21:17:36 2017 From: report at bugs.python.org (KINEBUCHI Tomohiko) Date: Thu, 27 Jul 2017 01:17:36 +0000 Subject: [New-bugs-announce] [issue31053] Unnecessary argument in command example Message-ID: <1501118256.7.0.957994269182.issue31053@psf.upfronthosting.co.za> New submission from KINEBUCHI Tomohiko: The command example running venv module for Windows has an unnecessary argument. The following two command examples should be equivalent:: :: c:\>c:\Python35\python -m venv c:\path\to\myenv :: c:\>python -m venv myenv c:\path\to\myenv (from https://docs.python.org/3/library/venv.html#creating-virtual-environments) ---------- assignee: docs at python components: Documentation messages: 299282 nosy: cocoatomo, docs at python priority: normal severity: normal status: open title: Unnecessary argument in command example versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 03:32:14 2017 From: report at bugs.python.org (Ekrem Saban) Date: Thu, 27 Jul 2017 07:32:14 +0000 Subject: [New-bugs-announce] [issue31054] Python 2.7.8 Release does not update the system Path variable Message-ID: <1501140734.16.0.246037908584.issue31054@psf.upfronthosting.co.za> New submission from Ekrem Saban: The Python 2.7.8 installer should also modify the system path variable so that typing "python" in any command window would not result in an error: "The command "python" is either written wrong or could not be found." ---------- components: Installation messages: 299294 nosy: Ekrem Saban priority: normal severity: normal status: open title: Python 2.7.8 Release does not update the system Path variable type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 08:45:26 2017 From: report at bugs.python.org (Paul Hammant) Date: Thu, 27 Jul 2017 12:45:26 +0000 Subject: [New-bugs-announce] [issue31055] All Sphinx generated pages could have a new "Edit This Page" link adjacent to the existing "Show Source" Message-ID: <1501159526.11.0.527058516666.issue31055@psf.upfronthosting.co.za> New submission from Paul Hammant: Show Source links to: https://github.com/python/cpython/blob/path/to/resource.rst Edit This Page would link to https://github.com/python/cpython/edit/path/to/resource.rst And yes, GitHub does the right thing if you're not ordinarily permitted to change python/cpython ---------- assignee: docs at python components: Documentation messages: 299306 nosy: Paul Hammant, docs at python priority: normal severity: normal status: open title: All Sphinx generated pages could have a new "Edit This Page" link adjacent to the existing "Show Source" versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 10:56:35 2017 From: report at bugs.python.org (Joey DiGiorgio) Date: Thu, 27 Jul 2017 14:56:35 +0000 Subject: [New-bugs-announce] [issue31056] Import Module Not Working According To Documentation Python 3.6.2 Message-ID: <1501167395.04.0.978474352938.issue31056@psf.upfronthosting.co.za> New submission from Joey DiGiorgio: I am running Windows 7 and Python 3.6.2 trying to import module A from withing module B where both Module A and B are located in the same directory. I get the ModuleNotFoundError. I try the exact same setup with Python 3.5.2 and get no errors and I get the expected behavior. For more details about the exact process I went through and everything I tried, see the StackOverflow post I made about it here: https://stackoverflow.com/questions/45336678/python-3-import-module-not-working-according-to-docs?noredirect=1#comment77637921_45336678 ---------- components: Windows messages: 299316 nosy: MrJman006, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Import Module Not Working According To Documentation Python 3.6.2 type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 11:05:53 2017 From: report at bugs.python.org (Thomas Thurman) Date: Thu, 27 Jul 2017 15:05:53 +0000 Subject: [New-bugs-announce] [issue31057] pydoc for tempfile.TemporaryDirectory should say it returns the name Message-ID: <1501167953.07.0.778065697758.issue31057@psf.upfronthosting.co.za> New submission from Thomas Thurman: Currently the pydoc for tempfile.TemporaryDirectory begins "Create and return a temporary directory." It doesn't explain anywhere *what* it returns (in fact, it returns the name of the directory as a string). The return type is further obscured by TemporaryDirectory being a context manager. ---------- assignee: docs at python components: Documentation messages: 299317 nosy: Thomas Thurman, docs at python priority: normal severity: normal status: open title: pydoc for tempfile.TemporaryDirectory should say it returns the name type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 13:59:34 2017 From: report at bugs.python.org (Paul Goins) Date: Thu, 27 Jul 2017 17:59:34 +0000 Subject: [New-bugs-announce] [issue31058] FileFinder fails to find modules for import if modules are created at runtime and don't result in a directory mtime update Message-ID: <1501178374.54.0.548179478476.issue31058@psf.upfronthosting.co.za> New submission from Paul Goins: If modules are added to a package namespace at runtime, there is a chance that they will not be properly detected if adding the module does not also result in an update to the parent directory's st_mtime attribute. This manifests in not being able to import the module in question, despite it clearly existing on disk and despite being to import it via a new Python interpreter if a second one is opened in parallel. Attached is a SSCCE which reproduces this issue. On my Windows dev machine, it works flawlessly on Python 2.7 and 3.6. However, on a Linux VM, it works on Python 2.7 yet fails fairly consistently on Python 3.6. I'm working around the issue by walking sys.path_importer_cache and resetting FileFinder._path_mtime to 0, forcing the cache to be recreated on the next call to FileFinder.find_spec(). This bug is admittedly a bit of a corner case, but I did end up spend many hours trying to figure out what was going on, so whether or not this gets fixed, I hope this may be useful info to someone. Thanks for your attention. ---------- components: Library (Lib) files: import_tester.py messages: 299331 nosy: pdgoins priority: normal severity: normal status: open title: FileFinder fails to find modules for import if modules are created at runtime and don't result in a directory mtime update type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47042/import_tester.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 14:13:39 2017 From: report at bugs.python.org (Sergey Kostyuk) Date: Thu, 27 Jul 2017 18:13:39 +0000 Subject: [New-bugs-announce] [issue31059] asyncio.StreamReader.read hangs if n<0 Message-ID: <1501179219.52.0.217830379676.issue31059@psf.upfronthosting.co.za> New submission from Sergey Kostyuk: Good day Maybe I misunderstood something, but I'm failed to fetch any data by calling asyncio.StreamReader.read if `n` is less than zero (or left default). It just hangs in the loop forever (see line number 614 of asyncio/streams.py: https://github.com/python/cpython/blob/3e56ff0/Lib/asyncio/streams.py#L614). If `n` is equal to any positive value - coroutine works as expected and returns if there is any data in socket buffer. Even if available data size is less than `n` bytes. Expected behavior: collect all data from the buffer and return Current behavior: hangs in the loop forever if n < 0 My usage sample: https://git.io/v7nJq ---------- components: asyncio messages: 299332 nosy: Sergey Kostyuk, yselivanov priority: normal severity: normal status: open title: asyncio.StreamReader.read hangs if n<0 type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 14:37:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Jul 2017 18:37:03 +0000 Subject: [New-bugs-announce] [issue31060] IDLE: Finish rearranging ConfigDialog methods Message-ID: <1501180623.98.0.16109771975.issue31060@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Finish rearranging the methods of configdialog.ConfigDialog to group together methods pertaining to each tab and the button block. Doing so has and will help in writing tests. It is also preparation for splitting ConfigDialog, which currently has more than 70 methods, into multiple more maintainable classes. #30993, pr2831 moved the methods pertaining to the font tab right after create_font_tab. #31003, pr2859 did the same for methods pertaining to the general tab. In both case, the generated diff had a + block at the new location and - block at the old locations. When I did the same for the highlight tab for #31001, the number of methods and lines moved was perhaps doubled, which meant that more of the other lines changed position. The result was a huge diff, by default unrendered, that deleted and inserted most of the lines in the file. Adding real edits on top of this would result in a worse huge diff. So I decided instead to open this issue and finish method movement (for the dialog, button group, and keys group) to the extent I can now. (The order within groups may be adjusted later as tests are written and knowledge about the methods is gained.) ---------- assignee: terry.reedy components: IDLE messages: 299335 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Finish rearranging ConfigDialog methods type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 16:16:30 2017 From: report at bugs.python.org (Alexander Mohr) Date: Thu, 27 Jul 2017 20:16:30 +0000 Subject: [New-bugs-announce] [issue31061] asyncio segfault when using threadpool and "_asyncio" native module Message-ID: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> New submission from Alexander Mohr: I have a project in a prod environment which heavily uses asyncio and a threadpool. It uses the threadpool to run CPU heavy tasks (in this case populating a defaultdict) to avoid blocking the main thread (no async code in thread). For some time now my service has been randomly crashing at the same place in the thread which does the dict updating. I've finally got both the python and native stack traces, and based on the information presented it looked very similar to the issue found by the devs at home-assistant (https://github.com/home-assistant/home-assistant/issues/7752#issuecomment-305100009, which points to https://github.com/home-assistant/home-assistant/pull/7848). So I tried their fix of disabling the "_asyncio" module, and lo and behold python no longer segfaults. Per the stacktrace it's crashing in PyObject_GC_Del, and the only place this is used in the asyncio module seems to be here: https://github.com/python/cpython/blob/master/Modules/_asynciomodule.c#L996 does anyone have any idea why it's crashing on this line? Are there thread protections missing in this file? I'm trying to reproduce this in a testcase but it's proving very difficult as I'm guessing it's timing related. ---------- components: asyncio files: native___python_crash_stacks.txt messages: 299346 nosy: thehesiod, yselivanov priority: normal severity: normal status: open title: asyncio segfault when using threadpool and "_asyncio" native module type: crash versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file47043/native___python_crash_stacks.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 27 17:11:45 2017 From: report at bugs.python.org (Kevin Chen) Date: Thu, 27 Jul 2017 21:11:45 +0000 Subject: [New-bugs-announce] [issue31062] socket.makefile does not handle line buffering Message-ID: <1501189905.94.0.421716043749.issue31062@psf.upfronthosting.co.za> New submission from Kevin Chen: File objects generated with socket.makefile and that attempt to use line buffering appear to not actually use line buffering, at least for writing. In this example, the string does not appear to be written until the flush call. First, set up a socket: $ nc -l -U /tmp/foo Then: Python 3.6.2 (default, Jul 26 2017, 01:41:27) [GCC 4.8.4] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) >>> s.connect("/tmp/foo") >>> f = s.makefile("rw", buffering=1) >>> f.write("asdf\n") 5 >>> f.flush() The following patch appears to fix the problem: --- socket.py.orig 2017-07-25 21:41:39.974554944 -0400 +++ socket.py 2017-07-27 17:02:58.223353418 -0400 @@ -253,7 +253,11 @@ buffer = io.BufferedWriter(raw, buffering) if binary: return buffer - text = io.TextIOWrapper(buffer, encoding, errors, newline) + line_buffering = False + if buffering == 1: + line_buffering = True + text = io.TextIOWrapper(buffer, encoding, errors, newline, + line_buffering) text.mode = mode return text ---------- components: Library (Lib) messages: 299351 nosy: kchen priority: normal severity: normal status: open title: socket.makefile does not handle line buffering type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 01:10:01 2017 From: report at bugs.python.org (Hyun Jae Moon) Date: Fri, 28 Jul 2017 05:10:01 +0000 Subject: [New-bugs-announce] [issue31063] List Comprehension Bug Message-ID: <1501218601.65.0.342766588948.issue31063@psf.upfronthosting.co.za> New submission from Hyun Jae Moon: Please check the photo attached. This was tested on Python 3.6.0. It seems that there is a bug in list comprehension. The list b should include 84 as well according to the code I wrote. I believe this is a quite severe bug. Thank you very much. ---------- components: macOS files: Screen Shot 2017-07-27 at 9.59.40 PM.png messages: 299363 nosy: hyunjaemoon, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: List Comprehension Bug type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47044/Screen Shot 2017-07-27 at 9.59.40 PM.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 02:44:04 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 28 Jul 2017 06:44:04 +0000 Subject: [New-bugs-announce] [issue31064] test_ossaudiodev fails under padsp (Linux PulseAudio OSS emulation) Message-ID: <1501224244.81.0.688971970175.issue31064@psf.upfronthosting.co.za> New submission from Nick Coghlan: On current Fedora systems, test_ossaudiodev is implicitly skipped even when the audio resource is enabled due to the absence of the `/test/dsp` device: ``` $ ./python -m test -v -uaudio test_ossaudiodev [...] 0:00:00 load avg: 0.33 [1/1] test_ossaudiodev test_ossaudiodev skipped -- [Errno 2] No such file or directory: '/dev/dsp' test_ossaudiodev skipped 1 test skipped: test_ossaudiodev Total duration: 31 ms Tests result: SUCCESS ``` And while PulseAudio does provide an OpenSoundSystem emulation mode, it apparently isn't sufficient for the Python extension module's needs: ``` $ padsp ./python -m test -v -uaudio test_ossaudiodev [...] 0:00:00 load avg: 0.41 [1/1] test_ossaudiodev test_mixer_methods (test.test_ossaudiodev.OSSAudioDevTests) ... ok test_on_closed (test.test_ossaudiodev.OSSAudioDevTests) ... ok test_playback (test.test_ossaudiodev.OSSAudioDevTests) ... ERROR test_set_parameters (test.test_ossaudiodev.OSSAudioDevTests) ... ERROR test_with (test.test_ossaudiodev.OSSAudioDevTests) ... ok ====================================================================== ERROR: test_playback (test.test_ossaudiodev.OSSAudioDevTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ncoghlan/devel/cpython/Lib/test/test_ossaudiodev.py", line 148, in test_playback self.play_sound_file(*sound_info) File "/home/ncoghlan/devel/cpython/Lib/test/test_ossaudiodev.py", line 54, in play_sound_file dsp.bufsize() OSError: [Errno 22] Invalid argument ====================================================================== ERROR: test_set_parameters (test.test_ossaudiodev.OSSAudioDevTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/ncoghlan/devel/cpython/Lib/test/test_ossaudiodev.py", line 153, in test_set_parameters self.set_parameters(dsp) File "/home/ncoghlan/devel/cpython/Lib/test/test_ossaudiodev.py", line 103, in set_parameters if (dsp.setfmt(fmt) == fmt and OSError: [Errno 22] Invalid argument ---------------------------------------------------------------------- Ran 5 tests in 0.016s FAILED (errors=2) test test_ossaudiodev failed test_ossaudiodev failed 1 test failed: test_ossaudiodev Total duration: 55 ms Tests result: FAILURE [ncoghlan at thechalk cpython]$ padsp ./python -m test -uaudio test_ossaudiodev Run tests sequentially 0:00:00 load avg: 0.42 [1/1] test_ossaudiodev test test_ossaudiodev failed -- multiple errors occurred; run in verbose mode for details test_ossaudiodev failed 1 test failed: test_ossaudiodev Total duration: 35 ms Tests result: FAILURE ``` The reason I'm filing this here rather than downstream in Fedora is because I'm uncertain whether or not we actually need to worry about it: the module's presumably been broken in practice on Linux for years, and I only noticed it today due to a discussion about Python easter eggs that got me wondering why it had been so long since I'd heard the audio file of Guido speaking when running the tests with `-uall`. ---------- messages: 299369 nosy: barry, encukou, ncoghlan priority: normal severity: normal status: open title: test_ossaudiodev fails under padsp (Linux PulseAudio OSS emulation) type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 06:30:57 2017 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Jul 2017 10:30:57 +0000 Subject: [New-bugs-announce] [issue31065] Documentation for Popen.poll is unclear Message-ID: <1501237857.05.0.15004204926.issue31065@psf.upfronthosting.co.za> New submission from Mark Dickinson: The documentation for Popen.poll says: > Check if child process has terminated. Set and return returncode attribute. This requires the reader to guess that if the child process has not terminated, the call returns immediately, with a return value of ``None``. It would be good to be explicit about this. ---------- assignee: docs at python components: Documentation messages: 299378 nosy: docs at python, mark.dickinson priority: normal severity: normal status: open title: Documentation for Popen.poll is unclear versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 09:14:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 13:14:47 +0000 Subject: [New-bugs-announce] [issue31066] FAIL: test_last_modified (test.test_httpservers.SimpleHTTPServerTestCase), on AMD64 Windows8.1 Non-Debug 3.x Message-ID: <1501247687.43.0.10310040726.issue31066@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.x/builds/985/steps/test/logs/stdio ====================================================================== FAIL: test_last_modified (test.test_httpservers.SimpleHTTPServerTestCase) Checks that the datetime returned in Last-Modified response header ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\3.x.ware-win81-release\build\lib\test\test_httpservers.py", line 512, in test_last_modified self.assertEqual(last_modif_header, self.last_modif_header) AssertionError: 'Fri, 28 Jul 2017 01:20:09 GMT' != 'Fri, 28 Jul 2017 01:20:06 GMT' - Fri, 28 Jul 2017 01:20:09 GMT ? ^ + Fri, 28 Jul 2017 01:20:06 GMT ? ^ ---------- components: Tests messages: 299385 nosy: haypo priority: normal severity: normal status: open title: FAIL: test_last_modified (test.test_httpservers.SimpleHTTPServerTestCase), on AMD64 Windows8.1 Non-Debug 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 10:42:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 14:42:52 +0000 Subject: [New-bugs-announce] [issue31067] test_subprocess.test_leak_fast_process_del_killed() fails randomly on AMD64 FreeBSD 10.x Shared 3.6 Message-ID: <1501252972.97.0.198077467946.issue31067@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.6/builds/355/steps/test/logs/stdio ====================================================================== FAIL: test_leak_fast_process_del_killed (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.6.koobs-freebsd10/build/Lib/test/test_subprocess.py", line 2434, in test_leak_fast_process_del_killed self.assertRaises(OSError, os.waitpid, pid, 0) AssertionError: OSError not raised by waitpid ---------- components: Tests messages: 299390 nosy: haypo priority: normal severity: normal status: open title: test_subprocess.test_leak_fast_process_del_killed() fails randomly on AMD64 FreeBSD 10.x Shared 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 10:59:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 14:59:47 +0000 Subject: [New-bugs-announce] [issue31068] test_ttk_guionly hangs on AMD64 Windows8.1 Refleaks 2.7 Message-ID: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> New submission from STINNER Victor: Builds: * 52: build interrupted after 132 hours * 53: test_ttk_guionly passed * 54: test_ttk_guionly passed * 55: build interrupted after 14 hours Example: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%202.7/builds/52/steps/test/logs/stdio ... running: test_ttk_guionly (472605 sec) running: test_ttk_guionly (472635 sec) running: test_ttk_g command interrupted, attempting to kill program finished with exit code 1 elapsedTime=475847.190000 ---------- components: Tests, Tkinter messages: 299391 nosy: haypo priority: normal severity: normal status: open title: test_ttk_guionly hangs on AMD64 Windows8.1 Refleaks 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 11:02:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 15:02:05 +0000 Subject: [New-bugs-announce] [issue31069] test_multiprocessing_spawn leaked a process on AMD64 Windows8.1 Refleaks 3.x Message-ID: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> New submission from STINNER Victor: It's just a warning, but later I would like to make a buildbot fail on such warnings, so I would like to first fix all these warnings. http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x/builds/59/steps/test/logs/stdio 0:46:17 [119/406] test_multiprocessing_spawn passed (2667 sec) -- running: test_asyncio (290 sec), test_userstring (54 sec), test_regrtest (471 sec) beginning 6 repetitions 123456 ...Warning -- Dangling processes: {} ... ---------- components: Tests messages: 299392 nosy: haypo priority: normal severity: normal status: open title: test_multiprocessing_spawn leaked a process on AMD64 Windows8.1 Refleaks 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 11:03:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 28 Jul 2017 15:03:41 +0000 Subject: [New-bugs-announce] [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb on AMD64 Windows8.1 Refleaks 3.x Message-ID: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> New submission from STINNER Victor: See bpo-bpo-30891 and bpo-30876 for recent changes in importlib. http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x/builds/57/steps/test/logs/stdio 1:33:30 [312/406/2] test_threaded_import passed (30 sec) -- running: test_decimal (826 sec), test_set (84 sec), test_mmap (1151 sec) beginning 6 repetitions 123456 ...Exception ignored in: .cb at 0x000000813CA18EB8> Traceback (most recent call last): File "", line 176, in cb KeyError: ('random',) ... ---------- components: Tests messages: 299393 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: test_threaded_import: KeyError ignored in _get_module_lock..cb on AMD64 Windows8.1 Refleaks 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 12:03:22 2017 From: report at bugs.python.org (Stefan Pochmann) Date: Fri, 28 Jul 2017 16:03:22 +0000 Subject: [New-bugs-announce] [issue31071] Bad error message about maps not iterable Message-ID: <1501257802.36.0.460267167585.issue31071@psf.upfronthosting.co.za> New submission from Stefan Pochmann: Python 3.6 makes it sound like maps aren't iterable: >>> map(str, *map(int, [[]])) Traceback (most recent call last): File "", line 1, in map(str, *map(int, [[]])) TypeError: type object argument after * must be an iterable, not map More, including a likely explanation, in my question and its answer here: https://stackoverflow.com/q/45363330/1672429 Apparently the TypeError from int([]) gets mistaken for a TypeError indicating non-iterability of the map object. ---------- messages: 299402 nosy: Stefan Pochmann priority: normal severity: normal status: open title: Bad error message about maps not iterable type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 12:50:52 2017 From: report at bugs.python.org (Irmen de Jong) Date: Fri, 28 Jul 2017 16:50:52 +0000 Subject: [New-bugs-announce] [issue31072] add filter to zipapp Message-ID: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> New submission from Irmen de Jong: As briefly discussed on comp.lang.python, I propose to add an optional filter callback function to zipapp.create_archive. The function could perhaps work like the os.walk generator or maybe just lets you to return a simple boolean for every folder/file that it wants to include in the zip. My use case is that I sometimes don't want to include every file in the root folder into the zip file (I want to be able to skip temporary or irrelevant folders such as .git/.svn, .tox, .tmp and sometimes want to avoid including *.pyc/*.pyo files). Right now, I first have to manually clean up the folder before I can use zipapp.create_archive. (Instead of providing a filter callback fuction, another approach may be to provide your own dir/file generator instead, that fully replaces the internal file listing logic of zipapp.create_archive?) ---------- assignee: paul.moore components: Library (Lib) keywords: easy messages: 299409 nosy: irmen, paul.moore priority: normal severity: normal status: open title: add filter to zipapp type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 28 16:51:47 2017 From: report at bugs.python.org (Andrew Pinkham) Date: Fri, 28 Jul 2017 20:51:47 +0000 Subject: [New-bugs-announce] [issue31073] Change metadata handling in check command Message-ID: <1501275107.85.0.857178760457.issue31073@psf.upfronthosting.co.za> New submission from Andrew Pinkham: The new warehouse uses the author_email field to create a mailto link. Donald Stufft recommended leaving out the author_email field while still specifying the author field should a maintainer wish to have their name associated without their email. Conversation with Donald: https://github.com/pypa/warehouse/issues/2155 Unfortunately, specifying author but not author_email causes the `setup.py check` command to throw an error. "check: missing meta-data: if 'author' supplied, 'author_email' must be supplied too" I would like to remove that check from being performed given the recommended fix for warehouse. The logic that performs this check is currently in the distutils check command. https://github.com/python/cpython/blob/master/Lib/distutils/command/check.py Additionally, AFAICT, it is impossible to disable the metadata check in distutils. I would also like to add a negative option to allow the metadata check to be skipped. ---------- components: Distutils messages: 299436 nosy: dstufft, jambonrose, merwok priority: normal severity: normal status: open title: Change metadata handling in check command versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 02:36:00 2017 From: report at bugs.python.org (Eryk Sun) Date: Sat, 29 Jul 2017 06:36:00 +0000 Subject: [New-bugs-announce] [issue31074] Startup failure if executable is a \\?\ path on Windows Message-ID: <1501310160.44.0.769037276135.issue31074@psf.upfronthosting.co.za> New submission from Eryk Sun: search_for_prefix in PC/getpathp.c sets the wrong path when Python is started with a \\?\ path on Windows, which results in the following crash: >>> subprocess.call(r'"\\?\C:\Program Files\Python36\python.exe"') Fatal Python error: Py_Initialize: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' Current thread 0x00000b40 (most recent call first): 3221226505 The problem is due to the implementation of join(), which calls PathCchCombineEx, which strips the \\?\ prefix from the joined path. Consequently in gotlandmark(), setting `prefix[n] = '\0'` nulls the wrong index because the value of n includes the original \\?\ prefix. Breakpoint 0 hit python36_d!gotlandmark: 00000000`6cc1a920 48894c2408 mov qword ptr [rsp+8],rcx ss:000000c2`9a9ee920={python36_d!prefix (00000000`6cf697d0)} 1:005> du python36_d!prefix 00000000`6cf697d0 "\\?\C:\Program Files\Python36" 1:005> pc python36_d!gotlandmark+0x15: 00000000`6cc1a935 e8e60a0000 call python36_d!wcsnlen_s (00000000`6cc1b420) 1:005> pc python36_d!gotlandmark+0x2b: 00000000`6cc1a94b e890010000 call python36_d!join (00000000`6cc1aae0) 1:005> p python36_d!gotlandmark+0x30: 00000000`6cc1a950 33d2 xor edx,edx 1:005> du python36_d!prefix 00000000`6cf697d0 "C:\Program Files\Python36\lib\os" 00000000`6cf69810 ".py" 1:005> pt python36_d!gotlandmark+0x7b: 00000000`6cc1a99b c3 ret 1:005> du python36_d!prefix 00000000`6cf697d0 "C:\Program Files\Python36\lib" I think the simplest solution is to remove the \\?\ prefix from the executable path that's returned by GetModuleFileNameW in get_progpath(). AFAIK, no version of Windows can reliably run programs from long paths, and the current MAXPATHLEN (256) doesn't allow it anyway. The only reason to use \\?\ for the executable path would be to avoid the normal DOS/Windows path normalization rules -- e.g. removing trailing dots and spaces or using DOS device names such as "con.exe". That's not really a practical concern. ---------- components: Interpreter Core, Windows messages: 299459 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: test needed status: open title: Startup failure if executable is a \\?\ path on Windows type: crash versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 08:24:17 2017 From: report at bugs.python.org (Marcos Soutullo) Date: Sat, 29 Jul 2017 12:24:17 +0000 Subject: [New-bugs-announce] [issue31075] Collections - ChainMap - Documentation example wrong order line Message-ID: <1501331057.19.0.539549352975.issue31075@psf.upfronthosting.co.za> New submission from Marcos Soutullo: Hello, I have been taking a look into your ChainMap collections documentation (https://docs.python.org/3.6/library/collections.html?highlight=collections#collections.ChainMap), specifically the third code example on "8.3.1.1. ChainMap Examples and Recipes" that clearly describe and illustrate a use case for the ChainMap class. However, I found a very small code issue in regards to how the sample code (line 7) is presented to the reader. Please refer to the code compilation below: Line 7 >>> d['x'] # Get first key in the chain of contexts raise KeyError(key) KeyError: 'x' Line 8 >>> d['x'] d['x'] = 1 # Set value in current context The key named 'x' had not been initialised yet and of course, the compiler is complaining. It should be the other way around. Line 8 >>> d['x'] = 1 # Set value in current context Line 7 >>> d['x'] # Get first key in the chain of contexts Many thanks for the great work you do with Python, Marcos S. ---------- assignee: docs at python components: Documentation messages: 299465 nosy: Marcos Soutullo, docs at python priority: normal severity: normal status: open title: Collections - ChainMap - Documentation example wrong order line type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 10:15:08 2017 From: report at bugs.python.org (Tom Forbes) Date: Sat, 29 Jul 2017 14:15:08 +0000 Subject: [New-bugs-announce] [issue31076] http.server should correctly handle HTTP 1.1 responses without a content-length Message-ID: <1501337708.36.0.932974346055.issue31076@psf.upfronthosting.co.za> New submission from Tom Forbes: The builtin http.server module does not support HTTP keep-alive when sending a response without a content-length. This causes any clients to hang waiting on more response data, while the server hangs waiting for the client to send another request. This is documented (https://docs.python.org/3/library/http.server.html#http.server.BaseHTTPRequestHandler.protocol_version), but it is confusing. As far as I can tell the fix would be pretty simple: If no content-length header is set then close the connection regardless of the keep-alive header (Keep-alive is advisory and servers can close the connection at-will, regardless of what the client sends). If a response contains an inaccurate content-length header there is nothing we can do, but if none is present the server (and clients) should not just hang. ---------- components: Library (Lib) messages: 299471 nosy: Tom Forbes priority: normal severity: normal status: open title: http.server should correctly handle HTTP 1.1 responses without a content-length type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 12:43:13 2017 From: report at bugs.python.org (Damon Atkins) Date: Sat, 29 Jul 2017 16:43:13 +0000 Subject: [New-bugs-announce] [issue31077] Windows Installer Version Message-ID: <1501346593.98.0.592003481581.issue31077@psf.upfronthosting.co.za> New submission from Damon Atkins: The Windows installer for example titles the software as Display Name:Python 3.5.3 (64-bit) Display Version: 3.5.3150.0 The default install folder is C:\Program Files\Python35 There is no consistency It looks like the 3150 been shorten to 3 If you look at Python 2.7.2 it has a display version of 2.7.13150 Suggest Display Name:Python 3.5 (64-bit) Display Version: 3.5.3150.0 C:\Program Files\Python3.5 or C:\Program Files\Python3.5.3150 OR Display Name:Python 3.5.3150 (64-bit) Display Version: 3.5.3150.0 C:\Program Files\Python3.5.3150 OR Display Name:Python 3.5.3 (64-bit) Display Version: 3.5.3.3150 C:\Program Files\Python3.5.3 Alse seems that Python 3 installer is placing one entery in the 'Users' registry for uninstall and the rest of the entries in 'System' registry for uninstall I suggest if the files are installed in C:\Program Files then their should be no 'User' registry entries. ---------- components: Windows messages: 299475 nosy: Damon Atkins, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows Installer Version type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 29 17:02:07 2017 From: report at bugs.python.org (Segev Finer) Date: Sat, 29 Jul 2017 21:02:07 +0000 Subject: [New-bugs-announce] [issue31078] pdb's debug command (Pdb.do_debug) doesn't use rawinput even if the parent pdb uses rawinput Message-ID: <1501362127.96.0.48372316228.issue31078@psf.upfronthosting.co.za> New submission from Segev Finer: This is caused by https://github.com/python/cpython/blob/caa1280d1ee5f828f346b585169a7592371d3faa/Lib/pdb.py#L1096 which always passes our own current stdin and stdout, and this triggers the conditional in https://github.com/python/cpython/blob/caa1280d1ee5f828f346b585169a7592371d3faa/Lib/pdb.py#L144-L145. self.stdin and self.stdout are initialized to sys.stdin and sys.stdout respectively when not passed explicitly: https://github.com/python/cpython/blob/caa1280d1ee5f828f346b585169a7592371d3faa/Lib/cmd.py#L87-L94. See Also: https://github.com/ipython/ipython/pull/10721 ---------- components: Library (Lib) messages: 299485 nosy: Segev Finer priority: normal severity: normal status: open title: pdb's debug command (Pdb.do_debug) doesn't use rawinput even if the parent pdb uses rawinput type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 12:27:18 2017 From: report at bugs.python.org (vinsci) Date: Sun, 30 Jul 2017 16:27:18 +0000 Subject: [New-bugs-announce] [issue31079] mathematically wrong results from int and long bit_length methods Message-ID: <1501432038.15.0.969151408213.issue31079@psf.upfronthosting.co.za> New submission from vinsci: It takes as many bits to store the number 0 as the number 1, but the implementation claims it takes no bits at all to store a 0. >>> (1).bit_length() == (0).bit_length() and True or False False It takes one extra bit to store the sign for negative numbers, but this isn't reflected in the implementations. >>> (-1).bit_length() == 1 + (1).bit_length() and True or False False ---------- components: Library (Lib) messages: 299500 nosy: vinsci priority: normal severity: normal status: open title: mathematically wrong results from int and long bit_length methods type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 13:10:10 2017 From: report at bugs.python.org (Preston Landers) Date: Sun, 30 Jul 2017 17:10:10 +0000 Subject: [New-bugs-announce] [issue31080] Allow `logging.config.fileConfig` to accept kwargs Message-ID: <1501434610.41.0.267137622883.issue31080@psf.upfronthosting.co.za> New submission from Preston Landers: The function `logging.config.fileConfig` accepts `args` but it would be nice if it also accepted `kwargs`. A simple patch seems to do it: diff --git a/Lib/logging/config.py b/Lib/logging/config.py index d692514..4672b48 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -145,7 +145,9 @@ def _install_handlers(cp, formatters): klass = _resolve(klass) args = section["args"] args = eval(args, vars(logging)) - h = klass(*args) + kwargs = section.get("kwargs", '{}') + kwargs = eval(kwargs, vars(logging)) + h = klass(*args, **kwargs) if "level" in section: level = section["level"] h.setLevel(level) Unless there are any objections I plan to submit a pull request. In my use case I have a Pyramid service which uses `concurrent-log-handler` and it seems better to be able to name keyword args for file configuration. ---------- components: Library (Lib) messages: 299502 nosy: planders priority: normal severity: normal status: open title: Allow `logging.config.fileConfig` to accept kwargs type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 14:59:51 2017 From: report at bugs.python.org (Scott Colby) Date: Sun, 30 Jul 2017 18:59:51 +0000 Subject: [New-bugs-announce] [issue31081] Release Build Failure on Ubuntu 14.04 Message-ID: <1501441191.63.0.0444121805519.issue31081@psf.upfronthosting.co.za> New submission from Scott Colby: After downloading and decompressing the latest 3.6.2 source release, I attempted to build as follows: $ ./configure --enable-optimizations --enable-ipv6 # seems fine $ make -s -j$(nproc) At the end of the build I have this error reported: Failed to build these modules: _socket Following modules built successfully but were removed because they could not be imported: _asyncio _ssl Scrolling up, I see that the _asyncio and _ssl failures are due to _socket being missing. Scrolling up further, I see several warnings and errors, to wit: *a series of tests that seem to go okay* 0:05:14 load avg: 0.62 [161/405] test_hash 0:05:15 load avg: 0.65 [162/405] test_hashlib Fatal Python error: Segmentation fault Current thread 0x00002afbece8e380 (most recent call first): File "/usr/local/src/python/Python-3.6.2/Lib/test/support/__init__.py", line 1508 in gc_collect File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/save_env.py", line 271 in __exit__ File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/runtest.py", line 172 in runtest_inner File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/runtest.py", line 137 in runtest File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/main.py", line 374 in run_tests_sequential File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/main.py", line 454 in run_tests File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/main.py", line 530 in _main File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/main.py", line 504 in main File "/usr/local/src/python/Python-3.6.2/Lib/test/libregrtest/main.py", line 573 in main File "/usr/local/src/python/Python-3.6.2/Lib/test/regrtest.py", line 46 in _main File "/usr/local/src/python/Python-3.6.2/Lib/test/regrtest.py", line 50 in File "/usr/local/src/python/Python-3.6.2/Lib/runpy.py", line 85 in _run_code File "/usr/local/src/python/Python-3.6.2/Lib/runpy.py", line 193 in _run_module_as_main Segmentation fault (core dumped) After this, the build seems to think all the tests are done and continues with "Rebuilding with profile guided optimizations:". There are a lot of warnings here, mostly about missing execution counts, which I assume comes from 3/4 of the tests not being run. Later on, however, we have this gem: /usr/local/src/python/Python-3.6.2/Modules/socketmodule.c:7693:1: internal compiler error: in edge_badness, at ipa-inline.c:895 } ^ Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Preprocessed source stored into /tmp/ccMFxPIP.out file, please attach this to your bugreport. ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/_usr_lib_gcc_x86_64-linux-gnu_4.8_cc1.1000.crash' I have gcc (Ubuntu 4.8.4-2ubuntu~14.04.3) 4.8.4 I'm new to building Python and even newer to reporting bugs here, so please let me know what additional information I should provide or steps I should take. ---------- components: Build files: ccMFxPIP.out messages: 299507 nosy: scolby33 priority: normal severity: normal status: open title: Release Build Failure on Ubuntu 14.04 type: compile error versions: Python 3.6 Added file: http://bugs.python.org/file47048/ccMFxPIP.out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 17:06:27 2017 From: report at bugs.python.org (Stefan Pochmann) Date: Sun, 30 Jul 2017 21:06:27 +0000 Subject: [New-bugs-announce] [issue31082] reduce takes iterable, not just sequence Message-ID: <1501448787.5.0.80084797494.issue31082@psf.upfronthosting.co.za> New submission from Stefan Pochmann: functools.reduce has a parameter called "iterable" and it only needs to be an iterable, not a sequence. The paragraph documenting it says "sequence" instead of "iterable" six times: https://docs.python.org/3/library/functools.html#functools.reduce The help shown by executing "help(functools.reduce)" in Python additionally actually names the parameter "sequence" in the signature. ---------- assignee: docs at python components: Documentation messages: 299520 nosy: Stefan Pochmann, docs at python priority: normal severity: normal status: open title: reduce takes iterable, not just sequence type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 17:50:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Jul 2017 21:50:03 +0000 Subject: [New-bugs-announce] [issue31083] IDLE: document new TabPage(Frame) design for configdialog Message-ID: <1501451403.71.0.908658123964.issue31083@psf.upfronthosting.co.za> New submission from Terry J. Reedy: We are in the process of moving blocks of ConfigDialog methods pertaining to one tab page to a separate class. FontPage is more or less done. GenPage is in process. This issue is about documenting the generic structure of the classes in a comment block. The following is extracted from msg299519 of #31050. # class TabPage(Frame): # def __init__(self, master): # super().__init__(master) # self.create_page_tab() # self.load_tab_cfg() # def create_page_tab(): # ... The rest will be an adaptation of the description of the old design in the same message plus what we have actually done so far. This issue includes editing FontPage to conform to the documented design. ---------- assignee: terry.reedy components: IDLE messages: 299524 nosy: csabella, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: document new TabPage(Frame) design for configdialog type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 17:52:10 2017 From: report at bugs.python.org (favll) Date: Sun, 30 Jul 2017 21:52:10 +0000 Subject: [New-bugs-announce] [issue31084] QueueHandler not formatting messages Message-ID: <1501451530.82.0.0352443251136.issue31084@psf.upfronthosting.co.za> New submission from favll: QueueHandler does not seem to format messages when setting a Formatter and attaching the QueueHandler to a logger. See attachement for a concise example. According to the internal documentation of the QueueHandler's prepare method it is expected that self.format(record) will format the message and put the message into record.message. However, this is not the case and self.format(record) only returns the message. So this should be ab easy fix. ---------- components: Library (Lib) files: queue_handler_bug.py messages: 299525 nosy: favll priority: normal severity: normal status: open title: QueueHandler not formatting messages type: behavior versions: Python 3.7 Added file: http://bugs.python.org/file47052/queue_handler_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 21:05:54 2017 From: report at bugs.python.org (Isaac Morland) Date: Mon, 31 Jul 2017 01:05:54 +0000 Subject: [New-bugs-announce] [issue31085] Add option for namedtuple to name its result type automatically Message-ID: <1501463154.41.0.0907519926767.issue31085@psf.upfronthosting.co.za> New submission from Isaac Morland: I would like to have the possibility of creating a namedtuple type without explicitly giving it a name. I see two major use cases for this: 1) Automatic creation of namedtuples for things like CSV files with headers (see #1818) or SQL results (see #13299). In this case at the point of calling namedtuple I have column headings (or otherwise automatically-determined attribute names), but there probably isn't a specific class name that makes sense to use. 2) Subclassing from a namedtuple invocation; I obviously need to name my subclass, but the name passed to the namedtuple invocation is essentially useless. My idea is to allow giving None for the typename parameter of namedtuple, like this: class MyCustomBehaviourNamedtuple (namedtuple (None, ['a', 'b'])): ... In this case namedtuple will generate a name based on the field names. This should be backward compatible because right now passing None raises a TypeError. So there is no change if a non-None typename is passed, and an exception is replaced by computing a default typename if None is passed. Patch to follow. ---------- components: Library (Lib) messages: 299532 nosy: Isaac Morland priority: normal severity: normal status: open title: Add option for namedtuple to name its result type automatically type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 30 21:19:07 2017 From: report at bugs.python.org (Isaac Morland) Date: Mon, 31 Jul 2017 01:19:07 +0000 Subject: [New-bugs-announce] [issue31086] Add namedattrgetter function which acts like attrgetter but uses namedtuple Message-ID: <1501463947.14.0.101425417299.issue31086@psf.upfronthosting.co.za> New submission from Isaac Morland: This is meant to replace my proposal in #30020 to change attrgetter to use namedtuple. By creating a new function implemented in Python, I avoid making changes to the existing attrgetter, which means that both the need of implementing a C version and the risk of changing the performance or other characteristics of the existing function are eliminated. My suggestion is to put this in the collections module next to namedtuple. This eliminates the circular import problem and is a natural fit as it is an application of namedtuple. ---------- components: Library (Lib) messages: 299534 nosy: Isaac Morland priority: normal severity: normal status: open title: Add namedattrgetter function which acts like attrgetter but uses namedtuple type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 01:01:57 2017 From: report at bugs.python.org (Alex) Date: Mon, 31 Jul 2017 05:01:57 +0000 Subject: [New-bugs-announce] [issue31087] asyncio.create_subprocess_* do not honor `encoding` Message-ID: <1501477317.46.0.791551033282.issue31087@psf.upfronthosting.co.za> New submission from Alex: Regardless of the value of `encoding`, StreamReaders returned for the `asyncio.subprocess.Process`'s `stdout` and `stderr` would be in binary mode. import sys import asyncio import subprocess async def main(): sp = await asyncio.create_subprocess_exec('ls', '-la', stdin=None, stdout=subprocess.PIPE, encoding='utf8') await sp.wait() data = await sp.stdout.read() print(data) print(isinstance(data, bytes)) loop = asyncio.get_event_loop() loop.run_until_complete(main()) There are two naive solutions: - `create_subprocess_*` could explicitly raise when provided any `encoding` and `errors` (like it now does with `universal_newlines`). - or implement encoding conversions for StreamReaders (and StreamWriters), and forward those. Of course it would be better to have conversions, but I don't know how those will have to deal with decoding partially available data - e.g. returning in the middle of surrogate pair, or having only half a codepoint for UTF16. There should likely cache partial data to process at the next read, but this would require rewriting codecs to support partial decode... seems like it's not that easy :( ---------- messages: 299537 nosy: toriningen priority: normal severity: normal status: open title: asyncio.create_subprocess_* do not honor `encoding` _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 08:59:50 2017 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 31 Jul 2017 12:59:50 +0000 Subject: [New-bugs-announce] [issue31088] regrtest.py: "${test_file_name} skipped" message printed twice for each ${test_file_name} Message-ID: <1501505990.76.0.255583071807.issue31088@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis: Since some change during last 3 months, regrtest.py on 2.7 branch prints "${test_file_name} skipped" message twice for each ${test_file_name}, firstly directly after given ${test_file_name}, and secondly after the following test. Example: 0:00:06 [ 17/401] test_abc 0:00:06 [ 18/401] test_abstract_numbers 0:00:06 [ 19/401] test_aepack test_aepack skipped -- No module named aetypes 0:00:06 [ 20/401] test_aifc -- test_aepack skipped 0:00:06 [ 21/401] test_al test_al skipped -- No module named al 0:00:06 [ 22/401] test_anydbm -- test_al skipped 0:00:08 [ 23/401] test_applesingle test_applesingle skipped -- No module named MacOS 0:00:08 [ 24/401] test_argparse -- test_applesingle skipped 0:00:14 [ 25/401] test_array 0:00:15 [ 26/401] test_ascii_formatd 0:00:15 [ 27/401] test_ast ---------- assignee: haypo components: Tests messages: 299555 nosy: Arfrever, haypo priority: normal severity: normal status: open title: regrtest.py: "${test_file_name} skipped" message printed twice for each ${test_file_name} versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 10:43:18 2017 From: report at bugs.python.org (Robert) Date: Mon, 31 Jul 2017 14:43:18 +0000 Subject: [New-bugs-announce] [issue31089] email.utils.parseaddr fails on odd double quotes in multiline header Message-ID: <1501512198.85.0.996248445964.issue31089@psf.upfronthosting.co.za> New submission from Robert: email.utils.parseaddr() does not successfully parse a field value into a (comment, address) pair if the FROM header has 2 lines (or more) containing odd number of double quotes in each of them. The address in such tuple is not e-mail address but a part of comment. For example: "=?UTF-8?Q?Anita_=W4=86ieckli=C5=84ska_|_PATO_Nieruch?= =?UTF-8?Q?omo=C5=9Bci?=" is parsed into: ('', '=?UTF-8?Q?Anita_=W4=86ieckli=C5=84ska_|_PATO_Nieruch?=') Full example on Python 2.7.12, email 4.0.2: Python 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from email.utils import parseaddr >>> parseaddr('"=?UTF8?Q?Anita_=W4=86ieckli=C5=84ska_|_PATO_Nieruch?=\r\n =?UTF-8?Q?omo=C5=9Bci?=" ') ('', '=?UTF-8?Q?Anita_=W4=86ieckli=C5=84ska_|_PATO_Nieruch?=') When double quotes or \r\n are removed, header is parsed without problems. The same issue exists on python 3.5.2 and email 6.0.0a1. >From headers analysis I know that e-mail was made in Outlook 14.0 then send through Exim 4.87 to outlook.com servers. ---------- messages: 299558 nosy: robertus priority: normal severity: normal status: open title: email.utils.parseaddr fails on odd double quotes in multiline header versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 10:44:19 2017 From: report at bugs.python.org (Sriram) Date: Mon, 31 Jul 2017 14:44:19 +0000 Subject: [New-bugs-announce] [issue31090] import error for numpy Message-ID: <1501512259.67.0.420176146977.issue31090@psf.upfronthosting.co.za> New submission from Sriram: When i tried to import numpy for any program in VS 2017, it returns with Import Error. Traceback (most recent call last): File "C:\Program Files\Python36\lib\site-packages\numpy\core\__init__.py", line 16, in from . import multiarray ImportError: DLL load failed: The specified procedure could not be found. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Sriram Sudharsan\documents\visual studio 2017\Projects\TestApp1\TestApp1\TestApp1.py", line 1, in import numpy as np File "C:\Program Files\Python36\lib\site-packages\numpy\__init__.py", line 142, in from . import add_newdocs File "C:\Program Files\Python36\lib\site-packages\numpy\add_newdocs.py", line 13, in from numpy.lib import add_newdoc File "C:\Program Files\Python36\lib\site-packages\numpy\lib\__init__.py", line 8, in from .type_check import * File "C:\Program Files\Python36\lib\site-packages\numpy\lib\type_check.py", line 11, in import numpy.core.numeric as _nx File "C:\Program Files\Python36\lib\site-packages\numpy\core\__init__.py", line 26, in raise ImportError(msg) ImportError: Importing the multiarray numpy extension module failed. Most likely you are trying to import a failed build of numpy. If you're working with a numpy git repo, try `git clean -xdf` (removes all files not under version control). Otherwise reinstall numpy. Original error was: DLL load failed: The specified procedure could not be found. Press any key to continue . . . ---------- components: Library (Lib) files: Capture.JPG messages: 299559 nosy: SriramSudharsan priority: normal severity: normal status: open title: import error for numpy versions: Python 3.6 Added file: http://bugs.python.org/file47053/Capture.JPG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 15:24:27 2017 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 31 Jul 2017 19:24:27 +0000 Subject: [New-bugs-announce] [issue31091] remove dead code in PyErr_GivenExceptionMatches() Message-ID: <1501529067.63.0.557215021907.issue31091@psf.upfronthosting.co.za> New submission from Stefan Behnel: PyObject *exception, *value, *tb; PyErr_Fetch(&exception, &value, &tb); /* PyObject_IsSubclass() can recurse and therefore is not safe (see test_bad_getattr in test.pickletester). */ res = PyType_IsSubtype((PyTypeObject *)err, (PyTypeObject *)exc); /* This function must not fail, so print the error here */ if (res == -1) { PyErr_WriteUnraisable(err); res = 0; } PyErr_Restore(exception, value, tb); According to the comment, there was previously a call to PyObject_IsSubclass() involved which could fail, but since it was replaced with a call to PyType_IsSubtype(), it can no longer fail. See pull request. ---------- components: Interpreter Core messages: 299579 nosy: scoder priority: normal pull_requests: 3010 severity: normal status: open title: remove dead code in PyErr_GivenExceptionMatches() type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 31 16:05:27 2017 From: report at bugs.python.org (Prof Plum) Date: Mon, 31 Jul 2017 20:05:27 +0000 Subject: [New-bugs-announce] [issue31092] Potential multiprocessing.Manager() race condition Message-ID: <1501531527.32.0.713819847625.issue31092@psf.upfronthosting.co.za> New submission from Prof Plum: So I was writing code that had multiple write thread and read thread "groups" in a single pool (in a group a few write threads write to a queue that a read thread reads), and I ran into what I think is a race condition with the multiprocessing.Manager() class. It looks managed queues are returned from Manager() before they are actually initialized and safe to use, but it is only noticeable when making many managed queues in quick succession. I've attached a simple demo script to reproduce the bug, the reason I believe this is race condition is because while the sleep(0.5) line is commented out python crashes, but when it's not it doesn't. Also I'm on windows 10 and using 64 bit Python 3.5.2 ---------- files: bug_demo.py messages: 299582 nosy: Prof Plum priority: normal severity: normal status: open title: Potential multiprocessing.Manager() race condition type: crash versions: Python 3.5 Added file: http://bugs.python.org/file47054/bug_demo.py _______________________________________ Python tracker _______________________________________