From report at bugs.python.org Fri Sep 1 00:01:34 2017 From: report at bugs.python.org (elmar) Date: Fri, 01 Sep 2017 04:01:34 +0000 Subject: [issue31318] Windows importlib.util.find_spec("re") results in AttributeError: module 'importlib' has no attribute 'util' Message-ID: <1504238494.92.0.410752076324.issue31318@psf.upfronthosting.co.za> New submission from elmar: Hi There, I found the following bug, but have now idea where to search to fix this: On Windows calling a python script from the command line with the line importlib.util.find_spec("re") in it or using the standard python shell and executing importlib.util.find_spec("re") causes an AttributeError: module 'importlib' has no attribute 'util'. Surprisingly using ipython and calling the same script with %run or executing importlib.util.find_spec("re") in the ipython shell works fine. C:\Users\buchere>python Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import importlib >>> importlib.util.find_spec("re") Traceback (most recent call last): File "", line 1, in AttributeError: module 'importlib' has no attribute 'util' >>> exit() ipython: C:\Users\buchere>ipython Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)] Type 'copyright', 'credits' or 'license' for more information IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import importlib In [2]: importlib.util.find_spec("re") Out[2]: ModuleSpec(name='re', loader=<_frozen_importlib_external.SourceFileLoade r object at 0x01EB6750>, origin='c:\\users\\buchere\\appdata\\local\\programs\\p ython\\python36-32\\lib\\re.py') In [3]: The same code works fine in the Darwin and Linux standard python shell. This error is really specific to the Windows standard python shell. ---------- messages: 301083 nosy: bue priority: normal severity: normal status: open title: Windows importlib.util.find_spec("re") results in AttributeError: module 'importlib' has no attribute 'util' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 00:04:07 2017 From: report at bugs.python.org (elmar) Date: Fri, 01 Sep 2017 04:04:07 +0000 Subject: [issue31318] On Windows importlib.util.find_spec("re") results in AttributeError: module 'importlib' has no attribute 'util' In-Reply-To: <1504238494.92.0.410752076324.issue31318@psf.upfronthosting.co.za> Message-ID: <1504238647.23.0.796447280522.issue31318@psf.upfronthosting.co.za> Changes by elmar : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware title: Windows importlib.util.find_spec("re") results in AttributeError: module 'importlib' has no attribute 'util' -> On Windows importlib.util.find_spec("re") results in AttributeError: module 'importlib' has no attribute 'util' type: -> compile error versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 00:58:19 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 01 Sep 2017 04:58:19 +0000 Subject: [issue31170] expat: utf8_toUtf8 cannot properly handle exhausting buffer In-Reply-To: <1502340505.45.0.797067466934.issue31170@psf.upfronthosting.co.za> Message-ID: <1504241899.98.0.601426410685.issue31170@psf.upfronthosting.co.za> Benjamin Peterson added the comment: We can put expat 2.2.4 in 2.7.14 final. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 02:10:20 2017 From: report at bugs.python.org (Steve Dower) Date: Fri, 01 Sep 2017 06:10:20 +0000 Subject: [issue31318] On Windows importlib.util.find_spec("re") results in AttributeError: module 'importlib' has no attribute 'util' In-Reply-To: <1504238494.92.0.410752076324.issue31318@psf.upfronthosting.co.za> Message-ID: <1504246220.97.0.419802976462.issue31318@psf.upfronthosting.co.za> Steve Dower added the comment: util is a submodule of importlib, and so it should always be imported before using it. Other platforms may import it for various other reasons, but that is not part of the API. You should fix it by typing (note that the first line is different from yours): >>> import importlib.util >>> importlib.util.find_spec("re") ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 02:56:13 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 01 Sep 2017 06:56:13 +0000 Subject: [issue31319] Add __main__.py to IDLE Message-ID: <1504248973.71.0.350017401117.issue31319@psf.upfronthosting.co.za> New submission from Raymond Hettinger: Currently, I start IDLE with: $ python -m idlelib.idle It would be nice add __main__.py to simplify this to: $ python -m idlelib And perhaps, more boldly rename the directory so that we get: $ python -m idle ---------- assignee: terry.reedy components: IDLE messages: 301086 nosy: rhettinger, terry.reedy priority: normal severity: normal status: open title: Add __main__.py to IDLE type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 03:11:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 01 Sep 2017 07:11:42 +0000 Subject: [issue31319] Add __main__.py to IDLE In-Reply-To: <1504248973.71.0.350017401117.issue31319@psf.upfronthosting.co.za> Message-ID: <1504249902.78.0.607737059843.issue31319@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a duplicate of issue24212. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Idle, 2.7, backport idlelib.__main__, enable py -m idlelib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 04:22:09 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 01 Sep 2017 08:22:09 +0000 Subject: [issue31319] Rename idlelib to just idle In-Reply-To: <1504248973.71.0.350017401117.issue31319@psf.upfronthosting.co.za> Message-ID: <1504254129.35.0.911013846199.issue31319@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I would also like Terry to consider renaming or aliasing idlelib to idle. That would further simplify the startup and it is a more appropriate name given that IDLE is used as an application rather than as a library. ---------- resolution: duplicate -> stage: resolved -> status: closed -> open title: Add __main__.py to IDLE -> Rename idlelib to just idle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 05:09:25 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 01 Sep 2017 09:09:25 +0000 Subject: [issue31313] Feature Add support of os.chflags() on Linux platform In-Reply-To: <1504173301.11.0.484917875166.issue31313@psf.upfronthosting.co.za> Message-ID: <1504256965.19.0.552070746644.issue31313@psf.upfronthosting.co.za> ???? ????????? added the comment: Well, it seems, you are right. But there are another ioctls (maybe they are the same, I haven't checked): FS_IOC_SETFLAGS FS_IOC_GETFLAGS http://man7.org/tlpi/code/online/book/files/chiflag.c.html (also attached) ---------- Added file: http://bugs.python.org/file47115/chiflag.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 05:18:26 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Sep 2017 09:18:26 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504257506.84.0.652999601549.issue31217@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > It makes sure that you get a single object in memory for the same integer, and not only for Python "small integer singletons"? Yes. > About the -1000..1000 range: if a function leaks more than 1 memory block or more than 1 reference, there is already something wrong no? Well, the current code can still hide it, for example if a function leaks [1000, 0, 1000, 1000, 1000] references, the code says it's ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 05:26:35 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Sep 2017 09:26:35 +0000 Subject: [issue31313] Feature Add support of os.chflags() on Linux platform In-Reply-To: <1504173301.11.0.484917875166.issue31313@psf.upfronthosting.co.za> Message-ID: <1504257995.78.0.659234203648.issue31313@psf.upfronthosting.co.za> Antoine Pitrou added the comment: On Ubuntu 16.04 I get the following values: EXT2_IOC_SETFLAGS = 0x40086602, FS_IOC_GETFLAGS = 0x80086601 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 05:27:54 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Sep 2017 09:27:54 +0000 Subject: [issue31313] Feature Add support of os.chflags() on Linux platform In-Reply-To: <1504173301.11.0.484917875166.issue31313@psf.upfronthosting.co.za> Message-ID: <1504258074.52.0.185445200698.issue31313@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Uh, of course, we care about SETFLAGS here. Which gives: EXT2_IOC_SETFLAGS = 0x40086602, FS_IOC_SETFLAGS = 0x40086602 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 05:50:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 09:50:51 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504259451.73.0.0865667756567.issue31217@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 06:25:58 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Fri, 01 Sep 2017 10:25:58 +0000 Subject: [issue11410] Use GCC visibility attrs in PyAPI_* In-Reply-To: <1299391945.72.0.037942723875.issue11410@psf.upfronthosting.co.za> Message-ID: <1504261558.81.0.52639831137.issue11410@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Was this actually fixed, or did everyone just get tired and give up on the original patch? ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 07:05:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 11:05:29 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504263929.83.0.521107759286.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6c2feabc5dac2f3049b15134669e9ad5af573193 by Victor Stinner in branch 'master': bpo-31217: Fix regrtest -R for small integer (#3260) https://github.com/python/cpython/commit/6c2feabc5dac2f3049b15134669e9ad5af573193 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 08:26:22 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Sep 2017 12:26:22 +0000 Subject: [issue24212] Idle, 2.7, backport idlelib.__main__, enable py -m idlelib In-Reply-To: <1431812813.24.0.960232018759.issue24212@psf.upfronthosting.co.za> Message-ID: <1504268782.53.0.791966678003.issue24212@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #27099 converts extensions, including autocomplete and calltips, to features. Buggy versions of the patch had similar import problems. After the PR is merged, I may try this again, and perhaps try moving the __main__ import into the functions that use it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 08:31:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 12:31:33 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504269093.72.0.0506239912631.issue31217@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3304 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 08:36:59 2017 From: report at bugs.python.org (Gustavo Serra Scalet) Date: Fri, 01 Sep 2017 12:36:59 +0000 Subject: [issue30102] improve performance of libSSL usage on hashing In-Reply-To: <1492625768.04.0.0441991699383.issue30102@psf.upfronthosting.co.za> Message-ID: <1504269419.37.0.324327017492.issue30102@psf.upfronthosting.co.za> Gustavo Serra Scalet added the comment: Is there any news on this issue? The PR 3112 also seems to be frozen at the moment. Is there some kind of code freeze happening at the moment that no reviews are taking place? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 08:46:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 12:46:09 +0000 Subject: [issue31250] test_asyncio leaks dangling threads In-Reply-To: <1503333236.01.0.923722915126.issue31250@psf.upfronthosting.co.za> Message-ID: <1504269969.24.0.0371751670402.issue31250@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 16432beadb8eba079c9786cc0c0eaacfd9fd2f7b by Victor Stinner in branch 'master': bpo-31250, test_asyncio: fix dangling threads (#3252) https://github.com/python/cpython/commit/16432beadb8eba079c9786cc0c0eaacfd9fd2f7b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 08:46:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 12:46:46 +0000 Subject: [issue31249] test_concurrent_futures leaks dangling threads In-Reply-To: <1503331453.05.0.480625711508.issue31249@psf.upfronthosting.co.za> Message-ID: <1504270006.32.0.689994561497.issue31249@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 60f3f1fb5cbf5354c3081138be806c56cb04153f by Victor Stinner in branch '3.6': bpo-31249: Fix ref cycle in ThreadPoolExecutor (#3253) https://github.com/python/cpython/commit/60f3f1fb5cbf5354c3081138be806c56cb04153f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 08:49:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 12:49:12 +0000 Subject: [issue31249] test_concurrent_futures leaks dangling threads In-Reply-To: <1503331453.05.0.480625711508.issue31249@psf.upfronthosting.co.za> Message-ID: <1504270152.75.0.559730843068.issue31249@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 08:52:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 12:52:46 +0000 Subject: [issue31250] test_asyncio leaks dangling threads In-Reply-To: <1503333236.01.0.923722915126.issue31250@psf.upfronthosting.co.za> Message-ID: <1504270366.98.0.423684678371.issue31250@psf.upfronthosting.co.za> STINNER Victor added the comment: I picked the safe option: only modify unit tests. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 09:04:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 13:04:49 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504271089.57.0.534536849114.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 98c849a2f32f6727239b4cce38b8f0ff8adeef22 by Victor Stinner in branch '3.6': bpo-31217: Fix regrtest -R for small integer (#3260) (#3261) https://github.com/python/cpython/commit/98c849a2f32f6727239b4cce38b8f0ff8adeef22 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 09:13:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 13:13:53 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504271633.11.0.870155474738.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, this issue was really insane. Thank you very much Antoine Pitrou for explaning me the root bug ("int - int") and for the fix. The bug is now fixed in Python 3.6 and master (3.7). I checked manually the applied fix on the Gentoo Refleak 3.x buildbot using test_code and test_sys run in a loop: no failure after 30 runs. *Hopefully*, it was a bug in the test, not in the code ;-) The fix should help to detect real memory leaks, and maybe we can now replace again all() with any() in libregrtest/refleak.py to detect more leaks: see bpo-30776. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 09:18:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 13:18:22 +0000 Subject: [issue30776] regrtest: change -R/--huntrleaks rule to decide if a test leaks references In-Reply-To: <1498513763.26.0.144257056209.issue30776@psf.upfronthosting.co.za> Message-ID: <1504271902.43.0.226329881358.issue30776@psf.upfronthosting.co.za> STINNER Victor added the comment: The commit 6c2feabc5dac2f3049b15134669e9ad5af573193 of bpo-31217 fixed a major random bug in the memory block check. So maybe we can start again to look to detect more bugs by replacing all() with any() again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 09:51:36 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Sep 2017 13:51:36 +0000 Subject: [issue31316] Frequent *** stack smashing detected *** with Python 3.6.2/meinheld WSGI server In-Reply-To: <1504198887.45.0.0502110179306.issue31316@psf.upfronthosting.co.za> Message-ID: <1504273896.29.0.161470588781.issue31316@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Judging by the stacktrace, the stack smashing occurs in Meinheld, so you should report the issue to the Meinheld developers. ---------- nosy: +pitrou resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 09:58:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 13:58:22 +0000 Subject: [issue31316] Frequent *** stack smashing detected *** with Python 3.6.2/meinheld WSGI server In-Reply-To: <1504198887.45.0.0502110179306.issue31316@psf.upfronthosting.co.za> Message-ID: <1504274302.47.0.163523987234.issue31316@psf.upfronthosting.co.za> STINNER Victor added the comment: Set PYTHONMALLOC=debug environment variable to try to detect stack overflows ;-) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 09:58:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 13:58:36 +0000 Subject: [issue31316] Frequent *** stack smashing detected *** with Python 3.6.2/meinheld WSGI server In-Reply-To: <1504198887.45.0.0502110179306.issue31316@psf.upfronthosting.co.za> Message-ID: <1504274316.48.0.670937371801.issue31316@psf.upfronthosting.co.za> STINNER Victor added the comment: https://docs.python.org/dev/using/cmdline.html#envvar-PYTHONMALLOC ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:00:34 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Sep 2017 14:00:34 +0000 Subject: [issue31319] Rename idlelib to just idle In-Reply-To: <1504248973.71.0.350017401117.issue31319@psf.upfronthosting.co.za> Message-ID: <1504274434.3.0.045839264856.issue31319@psf.upfronthosting.co.za> Terry J. Reedy added the comment: idlelib.__main__ was added in 3.3: Patch was d543f2b8b0b66af330aae6764e53495cda48fd4e Author: Andrew Svetlov Date: 3/26/2012 3:11:46 PM Message: IDLE can be launched as python -m ildelib [misspelled] #24212 was about backporting the addition to 2.7. I opened it after PEP 434 clearly made this permitted. The attempt had the problems described therein. --- I quite agree that 'python -m idle' would be nicer than 'python -m idlelib', just as the latter is nicer than idlelib.idle or idlelib.pyshell. However, switching would break every text (and program) that tell people about any of the latter three. That would include many of my (and other people's) Stackoverflow comments and answers. I am therefore neither inclined to do this, nor do I think I am allowed to by out back-compatibility policies. My impression is that the directory name linking needed to make both work without two copies is OS specific and not something that can be done in the repository. I don't even know how to do it properly on Windows. I am not going to try to get all installer makers to agree to make a change. ---------- superseder: Idle, 2.7, backport idlelib.__main__, enable py -m idlelib -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:39:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 14:39:37 +0000 Subject: [issue31320] test_ssl logs a traceback Message-ID: <1504276777.85.0.978024096958.issue31320@psf.upfronthosting.co.za> New submission from STINNER Victor: It would be nice to not log such traceback: haypo at selma$ ./python -m test test_ssl -m test.test_ssl.ThreadedTests.test_echo Run tests sequentially 0:00:00 load avg: 0.69 [1/1] test_ssl Exception in thread Thread-16: Traceback (most recent call last): File "/home/haypo/prog/python/master/Lib/threading.py", line 917, in _bootstrap_inner self.run() File "/home/haypo/prog/python/master/Lib/test/test_ssl.py", line 1936, in run if not self.wrap_conn(): File "/home/haypo/prog/python/master/Lib/test/test_ssl.py", line 1881, in wrap_conn self.sock, server_side=True) File "/home/haypo/prog/python/master/Lib/ssl.py", line 401, in wrap_socket _context=self, _session=session) File "/home/haypo/prog/python/master/Lib/ssl.py", line 808, in __init__ self.do_handshake() File "/home/haypo/prog/python/master/Lib/ssl.py", line 1061, in do_handshake self._sslobj.do_handshake() File "/home/haypo/prog/python/master/Lib/ssl.py", line 683, in do_handshake self._sslobj.do_handshake() OSError: [Errno 0] Error 1 test OK. Total duration: 205 ms Tests result: SUCCESS ---------- components: Tests messages: 301107 nosy: alex, christian.heimes, dstufft, haypo, janssen priority: normal severity: normal status: open title: test_ssl logs a traceback versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:40:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 14:40:23 +0000 Subject: [issue31320] test_ssl logs a traceback In-Reply-To: <1504276777.85.0.978024096958.issue31320@psf.upfronthosting.co.za> Message-ID: <1504276823.1.0.157216943826.issue31320@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 2.7 doesn't seem to be affected. ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:40:34 2017 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 Sep 2017 14:40:34 +0000 Subject: [issue31315] assertion failure in imp.create_dynamic(), when spec.name is not a string In-Reply-To: <1504207978.72.0.836682730626.issue31315@psf.upfronthosting.co.za> Message-ID: Eric Snow added the comment: On Thu, Aug 31, 2017 at 1:32 PM, Brett Cannon wrote: > I think throwing a TypeError is valid if it's triggering an assertion error that is already there. +1 > P.S. Thanks for all the fuzz testing you're doing, Oren! Also a big +1. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:47:17 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Sep 2017 14:47:17 +0000 Subject: [issue31320] test_ssl logs a traceback In-Reply-To: <1504276777.85.0.978024096958.issue31320@psf.upfronthosting.co.za> Message-ID: <1504277237.97.0.730993210766.issue31320@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't get such traceback here (Ubuntu 16.04, OpenSSL 1.0.2g). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:50:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 14:50:17 +0000 Subject: [issue31321] traceback.clear_frames() doesn't clear *all* frames Message-ID: <1504277417.4.0.438645016632.issue31321@psf.upfronthosting.co.za> New submission from STINNER Victor: traceback.clear_frames(): "Clears the local variables of all the stack frames in a traceback tb by calling the clear() method of each frame object." https://docs.python.org/dev/library/traceback.html#traceback.clear_frames That's wrong: it only calls frame.clear() on the top frame of each traceback object. Output of attached clear_frames_bug.py script: --- locals: frame locals {'z': 3} frame locals {'y': 2} frame locals {'x': 1} clear_frames() locals: frame locals {} frame locals {'y': 2} frame locals {'x': 1} --- As you can see, only the locals of the func3() frame, where the exception was raised, is clear. Locals of other frames are not cleared. Attached PR fixes the issue. Output with the fix: --- locals: frame locals {'z': 3} frame locals {'y': 2} frame locals {'x': 1} clear_frames() locals: frame locals {} frame locals {} frame locals {} --- ---------- messages: 301111 nosy: haypo priority: normal severity: normal status: open title: traceback.clear_frames() doesn't clear *all* frames versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:51:16 2017 From: report at bugs.python.org (Pritish Patil) Date: Fri, 01 Sep 2017 14:51:16 +0000 Subject: [issue31322] SimpleNamespace deep copy Message-ID: <1504277476.43.0.203831960923.issue31322@psf.upfronthosting.co.za> New submission from Pritish Patil: I am new here and not sure how I can suggest this properly. When using nested SimpleNamespaces, a making a copy by using new_NS=SimpleNamespace(**namespace.__dict__.copy()) only copies the highest level namespace. This is expected in python as shallow copies are preferred. But, a nested deep copy function would be nice, and will allow easier use. I suggest a simple def my_namespace_copy(namespace): '''Recursively deep copies nested namespaces''' new_NS=SimpleNamespace(**namespace.__dict__.copy()) for i in new_NS.__dict__.keys(): if(type(new_NS.__dict__[i]) == types.SimpleNamespace): new_NS.__setattr__(i, my_namespace_copy(new_NS.__getattribute__(i))) return new_NS I am not sure of the exact implementation of the class and guess this would need some appropriate modifications. I suggest this be added at SimpleNameSpace.__copy__ or at SimpleNameSpace.__deepcopy__ ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 301112 nosy: Pritish Patil, docs at python priority: normal severity: normal status: open title: SimpleNamespace deep copy type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:51:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 14:51:21 +0000 Subject: [issue31321] traceback.clear_frames() doesn't clear *all* frames In-Reply-To: <1504277417.4.0.438645016632.issue31321@psf.upfronthosting.co.za> Message-ID: <1504277481.7.0.638361353251.issue31321@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3305 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:52:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 14:52:12 +0000 Subject: [issue31321] traceback.clear_frames() doesn't clear *all* frames In-Reply-To: <1504277417.4.0.438645016632.issue31321@psf.upfronthosting.co.za> Message-ID: <1504277532.87.0.481007520012.issue31321@psf.upfronthosting.co.za> STINNER Victor added the comment: Would it be ok to backport such change to Python 3.6? It's a bugfix, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:52:47 2017 From: report at bugs.python.org (Pritish Patil) Date: Fri, 01 Sep 2017 14:52:47 +0000 Subject: [issue31322] SimpleNamespace deep copy In-Reply-To: <1504277476.43.0.203831960923.issue31322@psf.upfronthosting.co.za> Message-ID: <1504277567.14.0.586359913163.issue31322@psf.upfronthosting.co.za> Changes by Pritish Patil : ---------- components: +Extension Modules -Documentation, Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:53:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 14:53:07 +0000 Subject: [issue31321] traceback.clear_frames() doesn't clear *all* frames In-Reply-To: <1504277417.4.0.438645016632.issue31321@psf.upfronthosting.co.za> Message-ID: <1504277587.56.0.577278201293.issue31321@psf.upfronthosting.co.za> STINNER Victor added the comment: traceback.clear_frames() was added by bpo-1565525: commit 173a157e725579eec1f28f8c9d53d6761ba6c79f. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:53:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 14:53:27 +0000 Subject: [issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted Message-ID: <1504277606.99.0.481677569583.issue1565525@psf.upfronthosting.co.za> STINNER Victor added the comment: traceback.clear_frames() doesn't really clear all frames: see bpo-31321. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:53:54 2017 From: report at bugs.python.org (Pritish Patil) Date: Fri, 01 Sep 2017 14:53:54 +0000 Subject: [issue31322] SimpleNamespace deep copy In-Reply-To: <1504277476.43.0.203831960923.issue31322@psf.upfronthosting.co.za> Message-ID: <1504277634.74.0.963551168235.issue31322@psf.upfronthosting.co.za> Changes by Pritish Patil : ---------- nosy: +yselivanov -docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:54:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 14:54:07 +0000 Subject: [issue31321] traceback.clear_frames() doesn't clear *all* frames In-Reply-To: <1504277417.4.0.438645016632.issue31321@psf.upfronthosting.co.za> Message-ID: <1504277647.43.0.883912956819.issue31321@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file47116/clear_frames_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:54:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 14:54:31 +0000 Subject: [issue31321] traceback.clear_frames() doesn't clear *all* frames In-Reply-To: <1504277417.4.0.438645016632.issue31321@psf.upfronthosting.co.za> Message-ID: <1504277671.5.0.687798007187.issue31321@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:58:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 14:58:24 +0000 Subject: [issue31323] test_ssl: reference cycle between ThreadedEchoServer and its ConnectionHandler Message-ID: <1504277904.95.0.0934980312796.issue31323@psf.upfronthosting.co.za> New submission from STINNER Victor: While testing bpo-31234 fix, I noticed that some test_ssl tests using ThreadedEchoServer create reference cycles with ConnectionHandler: ConnectionHandler fills ThreadedEchoServer.conn_errors with exceptions, but exceptions keep an alive traceback object which contains frame locals. I tried to use traceback.clear_frames(), but this function is broken: see bpo-31321. Attached PR works around the issue by storing errors are text rather than objects. The PR prevents warnings about dangling threads. ---------- components: Tests messages: 301116 nosy: haypo priority: normal severity: normal status: open title: test_ssl: reference cycle between ThreadedEchoServer and its ConnectionHandler type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:59:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 14:59:45 +0000 Subject: [issue31321] traceback.clear_frames() doesn't clear *all* frames In-Reply-To: <1504277417.4.0.438645016632.issue31321@psf.upfronthosting.co.za> Message-ID: <1504277985.6.0.99241595799.issue31321@psf.upfronthosting.co.za> STINNER Victor added the comment: See bpo-31323 where I wanted to use traceback.clear_frames() to manually break a reference cycle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 10:59:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 14:59:51 +0000 Subject: [issue31323] test_ssl: reference cycle between ThreadedEchoServer and its ConnectionHandler In-Reply-To: <1504277904.95.0.0934980312796.issue31323@psf.upfronthosting.co.za> Message-ID: <1504277991.21.0.834983304574.issue31323@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3306 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 11:01:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 15:01:59 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1504278119.91.0.437488401139.issue31234@psf.upfronthosting.co.za> STINNER Victor added the comment: test_ssl still emits a warning: see bpo-31323. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 11:05:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 15:05:03 +0000 Subject: [issue31320] test_ssl logs a traceback In-Reply-To: <1504276777.85.0.978024096958.issue31320@psf.upfronthosting.co.za> Message-ID: <1504278303.96.0.0900020865932.issue31320@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm running Fedora 26: haypo at selma$ ./python -m test.pythoninfo|grep -E 'ssl|platform' platform.architecture: 32bit ELF platform.platform: Linux-4.12.5-300.fc26.x86_64-x86_64-with-fedora-26-Twenty_Six platform.python_implementation: CPython ssl.HAS_SNI: True ssl.OPENSSL_VERSION: OpenSSL 1.1.0f-fips 25 May 2017 ssl.OPENSSL_VERSION_INFO: (1, 1, 0, 6, 15) ssl.OP_ALL: -0x7fffffac ssl.OP_NO_TLSv1_1: 0x10000000 sys.platform: linux ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 11:06:19 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 01 Sep 2017 15:06:19 +0000 Subject: [issue31322] SimpleNamespace deep copy In-Reply-To: <1504277476.43.0.203831960923.issue31322@psf.upfronthosting.co.za> Message-ID: <20170901150610.GD13110@ando.pearwood.info> Steven D'Aprano added the comment: > When using nested SimpleNamespaces, a making a copy by using > > new_NS=SimpleNamespace(**namespace.__dict__.copy()) In general, you shouldn't call or directly access dunder attributes. There are exceptions, but generally they're for Python's use only. For example, the public interface for getting __dict__ is to call vars(namespace). But there's no need to do this by hand. Use the copy module instead. copy.copy(namespace) # copy one level only copy.deepcopy(namespace) # copy all the way down seem to work for me. Does this solve your problem? If so, we'll close this issue. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 11:08:12 2017 From: report at bugs.python.org (Eric Snow) Date: Fri, 01 Sep 2017 15:08:12 +0000 Subject: [issue31322] SimpleNamespace deep copy In-Reply-To: <1504277476.43.0.203831960923.issue31322@psf.upfronthosting.co.za> Message-ID: <1504278492.01.0.65006482317.issue31322@psf.upfronthosting.co.za> Eric Snow added the comment: Hmm. What problems are you seeing with deep copies? copy.deepcopy() should work since SimpleNamespace is picklable. [1][2] I don't have any problems: >>> import types, copy >>> ns = types.SimpleNamespace(x=1, y=2) >>> copied = copy.deepcopy(ns) >>> copied namespace(x=1, y=2) >>> ns = types.SimpleNamespace(x=types.SimpleNamespace(a=1), y=types.SimpleNamespace(b=2)) >>> copied = copy.deepcopy(ns) >>> copied namespace(x=namespace(a=1), y=namespace(b=2)) >>> ns.x is copied.x False [1] issue #15022 [2] https://docs.python.org/3/library/copy.html ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 11:11:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 15:11:02 +0000 Subject: [issue31324] support._match_test() used by test.bisect is very inefficient Message-ID: <1504278662.09.0.172151395724.issue31324@psf.upfronthosting.co.za> New submission from STINNER Victor: support._match_test() uses a nested loop calling fnmatch.fnmatchcase(). This function creates a temporary regular expression object. The cache of the re module works around the performance... if the length of support.match_tests fits into the cache. But when the list is longer, the function becomes dead slow... def _match_test(test): global match_tests if match_tests is None: return True test_id = test.id() for match_test in match_tests: if fnmatch.fnmatchcase(test_id, match_test): return True for name in test_id.split("."): if fnmatch.fnmatchcase(name, match_test): return True return False Maybe we should build a giant regex matching test_id at each, but cache the regex since support.match_tests can be modified anytime. I implemented this once, but I lost the code :-) Currently, it's possible to match 3 things: * test method name: test_exit * test class name: SysModuleTest * full test id: test.test_sys.SysModuleTest.test_exit It's also possible to use "*" joker character in a test name. I would like to keep these convenient CLI. ---------- messages: 301122 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: support._match_test() used by test.bisect is very inefficient versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 11:12:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 15:12:27 +0000 Subject: [issue31324] support._match_test() used by test.bisect is very inefficient In-Reply-To: <1504278662.09.0.172151395724.issue31324@psf.upfronthosting.co.za> Message-ID: <1504278747.87.0.864746026585.issue31324@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 11:13:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 15:13:14 +0000 Subject: [issue31324] support._match_test() used by test.bisect is very inefficient In-Reply-To: <1504278662.09.0.172151395724.issue31324@psf.upfronthosting.co.za> Message-ID: <1504278794.11.0.991101987536.issue31324@psf.upfronthosting.co.za> STINNER Victor added the comment: Example of the performance issue: $ ./python -m test.bisect --fail-env-changed -o bisect test_asyncio [+] Iteration 1: run 756 tests/1512 (...) The first iteration takes forever because it runs tests with support.match_tests which contains 756 patterns. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 11:13:27 2017 From: report at bugs.python.org (Pritish Patil) Date: Fri, 01 Sep 2017 15:13:27 +0000 Subject: [issue31322] SimpleNamespace deep copy In-Reply-To: <1504277476.43.0.203831960923.issue31322@psf.upfronthosting.co.za> Message-ID: <1504278807.68.0.430681595885.issue31322@psf.upfronthosting.co.za> Pritish Patil added the comment: Yes. copy.deepcopy() works. Didn't think of it! ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 11:14:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 15:14:42 +0000 Subject: [issue31324] support._match_test() used by test.bisect is very inefficient In-Reply-To: <1504278662.09.0.172151395724.issue31324@psf.upfronthosting.co.za> Message-ID: <1504278882.97.0.450838617086.issue31324@psf.upfronthosting.co.za> STINNER Victor added the comment: Workaround to run test.bisect on test_asyncio: diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 522804be60..201d0665b2 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -1911,15 +1911,7 @@ def _match_test(test): if match_tests is None: return True test_id = test.id() - - for match_test in match_tests: - if fnmatch.fnmatchcase(test_id, match_test): - return True - - for name in test_id.split("."): - if fnmatch.fnmatchcase(name, match_test): - return True - return False + return (test_id in match_tests) def run_unittest(*classes): With this patch, running 756 tests takes 12 seconds, as expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 11:15:22 2017 From: report at bugs.python.org (Robin) Date: Fri, 01 Sep 2017 15:15:22 +0000 Subject: [issue31325] req_rate is a namedtuple type rather than instance Message-ID: <1504278922.84.0.0240979311873.issue31325@psf.upfronthosting.co.za> New submission from Robin: > Finally, urllib/robotparser.py appears to contain a bug in the > following: > > req_rate = collections.namedtuple('req_rate', > 'requests seconds') > entry.req_rate = req_rate > entry.req_rate.requests = int(numbers[0]) > entry.req_rate.seconds = int(numbers[1]) > > As I read it, this should fail as the req_rate is immutable. Ref: https://news.ycombinator.com/item?id=15136961 They are mistaken in the nature of the bug, which is that req_rate is a namedtuple type, rather than an instance. As such, it is actually mutable, causing the assignments to not fail. Every entry creates a separate req_rate type, so it all works, but not in the way it should. ---------- components: Library (Lib) messages: 301127 nosy: gvx priority: normal pull_requests: 3307 severity: normal status: open title: req_rate is a namedtuple type rather than instance 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 Sep 1 11:33:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 15:33:30 +0000 Subject: [issue31324] support._match_test() used by test.bisect is very inefficient In-Reply-To: <1504278662.09.0.172151395724.issue31324@psf.upfronthosting.co.za> Message-ID: <1504280010.98.0.373907166894.issue31324@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, by the way, -m test -m TestCaseName doesn't work fully on test_asyncio. It only works if I pass the full test identifier. With TestCaseName, no test is run: haypo at selma$ ./python -m test -u all test_asyncio --fail-env-changed -m PollEventLoopTests Run tests sequentially 0:00:00 load avg: 6.97 [1/1] test_asyncio 1 test OK. Total duration: 458 ms Tests result: SUCCESS With a full test identifier, a test is run: haypo at selma$ ./python -m test -u all test_asyncio --fail-env-changed -m test.test_asyncio.test_events.PollEventLoopTests.test_create_datagram_endpoint_sock Run tests sequentially 0:00:00 load avg: 7.06 [1/1] test_asyncio Warning -- threading_cleanup() detected 1 leaked threads (count: 1, dangling: 2) test_asyncio failed (env changed) 1 test altered the execution environment: test_asyncio Total duration: 561 ms Tests result: ENV CHANGED ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 11:34:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 15:34:03 +0000 Subject: [issue31324] support._match_test() used by test.bisect is very inefficient In-Reply-To: <1504278662.09.0.172151395724.issue31324@psf.upfronthosting.co.za> Message-ID: <1504280043.48.0.631983493658.issue31324@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops. Ignore my previous comment, I was using my temporary workaround! (msg301126) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 11:44:39 2017 From: report at bugs.python.org (elmar) Date: Fri, 01 Sep 2017 15:44:39 +0000 Subject: [issue31318] On Windows importlib.util.find_spec("re") results in AttributeError: module 'importlib' has no attribute 'util' In-Reply-To: <1504238494.92.0.410752076324.issue31318@psf.upfronthosting.co.za> Message-ID: <1504280679.56.0.839374612688.issue31318@psf.upfronthosting.co.za> elmar added the comment: thank you Steve for the explanation! I was not aware that I should import sub modules explicitly like this. especial because it worked on my development machine without doing so. now I know. Elmar ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 11:55:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 15:55:41 +0000 Subject: [issue31250] test_asyncio leaks dangling threads In-Reply-To: <1503333236.01.0.923722915126.issue31250@psf.upfronthosting.co.za> Message-ID: <1504281341.76.0.110213093087.issue31250@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, EventLoopTestsMixin.tearDown() still has a bug. I reopen the issue. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 11:55:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 15:55:46 +0000 Subject: [issue31250] test_asyncio leaks dangling threads In-Reply-To: <1503333236.01.0.923722915126.issue31250@psf.upfronthosting.co.za> Message-ID: <1504281346.77.0.926315353286.issue31250@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3308 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 12:00:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 16:00:26 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1504281626.52.0.835203185504.issue31234@psf.upfronthosting.co.za> STINNER Victor added the comment: Remaining issues: * test_asyncio: https://github.com/python/cpython/pull/3264 of bpo-31250 * test_thread: test_forkinthread() spawns a thread using thread.start_new_thread() without waiting until the thread completes * test_concurrent_futures: warnings raised when running "./python -u -m test -j0 -rW -u all --fail-env-changed", but not when running only test_concurrent_futures. It looks like a race condition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 12:04:09 2017 From: report at bugs.python.org (Marcel Plch) Date: Fri, 01 Sep 2017 16:04:09 +0000 Subject: [issue30403] PEP 547: Running extension modules using -m switch In-Reply-To: <1495192842.98.0.357031276673.issue30403@psf.upfronthosting.co.za> Message-ID: <1504281849.2.0.759693143952.issue30403@psf.upfronthosting.co.za> Marcel Plch added the comment: Sorry for not responding for so long, I didn't work on Python through the summer because of some other matters. Re-execution of the module is not possible, because there is a check on the C level, If you call exec_in_module() on an already initialized module, it'll raise ImportError. Also, because of this check, there is the restriction for py_mod_create. "Modules" defining this slot might not be module objects at all, so they might not have the module state pointer (which is used to flag if the module was initialized). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 12:19:43 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 01 Sep 2017 16:19:43 +0000 Subject: [issue31325] req_rate is a namedtuple type rather than instance In-Reply-To: <1504278922.84.0.0240979311873.issue31325@psf.upfronthosting.co.za> Message-ID: <1504282783.71.0.412214556777.issue31325@psf.upfronthosting.co.za> Raymond Hettinger added the comment: * The named tuple class should begin with a capital letter and be fully self-documenting: "RequestRate". * The creation of the named tuple class should be done only once, not on every call. Instead only a new instance should be creating on every call: entry.req_rate = req_rate(RequestRate) * There needs to be a test. * The docstring should be updated to include the name of the class refer to the term named tuple instead of the namedtuple() factory function: - Returns the contents of the ``Request-rate`` parameter from - ``robots.txt`` in the form of a :func:`~collections.namedtuple` - ``(requests, seconds)``. If there is no such parameter or it doesn't + Returns the contents of the ``Request-rate`` parameter from + ``robots.txt`` as a :term:`named tuple` ``RequestRate(requests, seconds)``. + If there is no such parameter or it doesn't ---------- assignee: -> berker.peksag nosy: +berker.peksag, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 12:20:04 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 01 Sep 2017 16:20:04 +0000 Subject: [issue31325] req_rate is a namedtuple type rather than instance In-Reply-To: <1504278922.84.0.0240979311873.issue31325@psf.upfronthosting.co.za> Message-ID: <1504282804.04.0.28762661308.issue31325@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 12:45:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 16:45:47 +0000 Subject: [issue31326] concurrent.futures: ProcessPoolExecutor.shutdown(wait=True) should wait for the call queue thread Message-ID: <1504284347.13.0.276187725111.issue31326@psf.upfronthosting.co.za> New submission from STINNER Victor: concurrent.futures.ProcessPoolExecutor.shutdown(wait=True) doesn't wait for the call queue thread, and so test_concurrent_futures randomly emits warnings about dangling threads, especially with PR 3138 of bpo-31234. Attached PR fixes the issue. ---------- messages: 301135 nosy: haypo priority: normal severity: normal status: open title: concurrent.futures: ProcessPoolExecutor.shutdown(wait=True) should wait for the call queue thread type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 12:49:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 16:49:08 +0000 Subject: [issue31326] concurrent.futures: ProcessPoolExecutor.shutdown(wait=True) should wait for the call queue thread In-Reply-To: <1504284347.13.0.276187725111.issue31326@psf.upfronthosting.co.za> Message-ID: <1504284548.37.0.585328759418.issue31326@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3309 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 12:54:02 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Sep 2017 16:54:02 +0000 Subject: [issue27144] concurrent.futures.as_completed() memory inefficiency In-Reply-To: <1464441935.81.0.0559700033116.issue27144@psf.upfronthosting.co.za> Message-ID: <1504284842.11.0.0473741011655.issue27144@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 97e1b1c81458d2109b2ffed32ffa1eb643a6c3b9 by Antoine Pitrou (Grzegorz Grzywacz) in branch 'master': bpo-27144: concurrent.futures as_complete and map iterators do not keep reference to returned object (#1560) https://github.com/python/cpython/commit/97e1b1c81458d2109b2ffed32ffa1eb643a6c3b9 ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 13:01:08 2017 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 01 Sep 2017 17:01:08 +0000 Subject: [issue31319] Rename idlelib to just idle In-Reply-To: <1504248973.71.0.350017401117.issue31319@psf.upfronthosting.co.za> Message-ID: <1504285268.51.0.290698197241.issue31319@psf.upfronthosting.co.za> ?ric Araujo added the comment: What about adding a simple Lib/idle.py that imports and runs the main function from idlelib? ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 13:01:59 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Sep 2017 17:01:59 +0000 Subject: [issue27144] concurrent.futures.as_completed() memory inefficiency In-Reply-To: <1464441935.81.0.0559700033116.issue27144@psf.upfronthosting.co.za> Message-ID: <1504285319.0.0.102243407227.issue27144@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +3310 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 13:02:49 2017 From: report at bugs.python.org (Jakub Wilk) Date: Fri, 01 Sep 2017 17:02:49 +0000 Subject: [issue31301] Python 2.7 SIGSEGV In-Reply-To: <1504005631.03.0.301240495014.issue31301@psf.upfronthosting.co.za> Message-ID: <1504285369.58.0.227886312718.issue31301@psf.upfronthosting.co.za> Jakub Wilk added the comment: I can't reproduce it here: Python 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ast >>> s = open('id%3A000000,sig%3A11,src%3A000000,op%3Ahavoc,rep%3A32').read() >>> ast.parse(s) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/ast.py", line 37, in parse return compile(source, filename, mode, PyCF_ONLY_AST) TypeError: compile() expected string without null bytes ---------- nosy: +jwilk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 13:03:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 17:03:45 +0000 Subject: [issue31326] concurrent.futures: ProcessPoolExecutor.shutdown(wait=True) should wait for the call queue thread In-Reply-To: <1504284347.13.0.276187725111.issue31326@psf.upfronthosting.co.za> Message-ID: <1504285425.7.0.672433776367.issue31326@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-31249 and commit bc61315377056fe362b744d9c44e17cd3178ce54: "Fix ref cycle in ThreadPoolExecutor". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 13:05:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 01 Sep 2017 17:05:37 +0000 Subject: [issue31324] support._match_test() used by test.bisect is very inefficient In-Reply-To: <1504278662.09.0.172151395724.issue31324@psf.upfronthosting.co.za> Message-ID: <1504285537.1.0.631389991787.issue31324@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: _match_test1 = re.compile('|'.join(map(fnmatch.translate, match_tests)), re.I).match def _match_test(test): test_id = test.id() return bool(_match_test1(test_id) or any(map(_match_test1, test_id.split("."))) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 13:16:49 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Sep 2017 17:16:49 +0000 Subject: [issue27144] concurrent.futures.as_completed() memory inefficiency In-Reply-To: <1464441935.81.0.0559700033116.issue27144@psf.upfronthosting.co.za> Message-ID: <1504286209.74.0.129026368137.issue27144@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset ea767915f7476c1fe97f7b1a53304d57f105bdd2 by Antoine Pitrou in branch '3.6': [3.6] bpo-27144: concurrent.futures as_complete and map iterators do not keep reference to returned object (GH-1560) (#3266) https://github.com/python/cpython/commit/ea767915f7476c1fe97f7b1a53304d57f105bdd2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 13:20:37 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Sep 2017 17:20:37 +0000 Subject: [issue27144] concurrent.futures.as_completed() memory inefficiency In-Reply-To: <1464441935.81.0.0559700033116.issue27144@psf.upfronthosting.co.za> Message-ID: <1504286437.4.0.909682603274.issue27144@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've merged the PR to master and backported it to 3.6. Thank you Grzegorz for contributing this! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 13:24:09 2017 From: report at bugs.python.org (Jerry Kramskoy) Date: Fri, 01 Sep 2017 17:24:09 +0000 Subject: [issue31327] bug in dateutil\tz\tz.py Message-ID: <1504286649.82.0.482783873664.issue31327@psf.upfronthosting.co.za> New submission from Jerry Kramskoy: Running python 3.6.2 on Windows 10. The following method causes presents a timetstamp value of -3600 (i.e. DST adjustment of one hour) which causes time.localtime() to raise an OS Errno 22. def _naive_is_dst(self, dt): timestamp = _datetime_to_timestamp(dt) return time.localtime(timestamp + time.timezone).tm_isdst Reproduce with python shell... import time z=time.localtime(-3600) Traceback (most recent call last): Python Shell, prompt 7, line 1 builtins.OSError: [Errno 22] Invalid argument The documentation doesn't specify a legal value range for input to localtime. Unfortunately,this causes AWS boto3 support for dynamodb to crash. Cheers, Jerry ---------- components: Library (Lib) messages: 301143 nosy: jerrykramskoy priority: normal severity: normal status: open title: bug in dateutil\tz\tz.py type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 14:09:59 2017 From: report at bugs.python.org (Segev Finer) Date: Fri, 01 Sep 2017 18:09:59 +0000 Subject: [issue31328] _sha3 is missing from Setup.dist Message-ID: <1504289399.64.0.916435234758.issue31328@psf.upfronthosting.co.za> New submission from Segev Finer: _sha3 is missing a commented out line from Setup.dist like the rest of the modules. It's really only used if someone wants to edit Setup.dist to build with the _sha3 module statically. Mostly a trivial change to add it in. ---------- components: Build, Extension Modules messages: 301144 nosy: Segev Finer priority: normal severity: normal status: open title: _sha3 is missing from Setup.dist type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 14:10:11 2017 From: report at bugs.python.org (Segev Finer) Date: Fri, 01 Sep 2017 18:10:11 +0000 Subject: [issue31328] _sha3 is missing from Setup.dist In-Reply-To: <1504289399.64.0.916435234758.issue31328@psf.upfronthosting.co.za> Message-ID: <1504289411.12.0.18711095687.issue31328@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +3311 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 15:05:55 2017 From: report at bugs.python.org (Chris Wilcox) Date: Fri, 01 Sep 2017 19:05:55 +0000 Subject: [issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors In-Reply-To: <1496753379.54.0.823104830335.issue30581@psf.upfronthosting.co.za> Message-ID: <1504292755.96.0.235317043575.issue30581@psf.upfronthosting.co.za> Changes by Chris Wilcox : ---------- pull_requests: +3312 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 15:24:07 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Sep 2017 19:24:07 +0000 Subject: [issue31329] Add idlelib module entry to doc Message-ID: <1504293847.95.0.524257228924.issue31329@psf.upfronthosting.co.za> New submission from Terry J. Reedy: If this were a new section in idle.rst, it would appear with the IDLE doc displayed by Help IDLE. Being present there has its +s and -s. Would have to see how it works here as well as online. In any case, it would be good to have something indexed under I in Modules index. Content: Document python -m idlelib as command line start up. List other entry points. Otherwise describe as 'private implementation modules', as in idlelib.__init__. ---------- messages: 301145 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Add idlelib module entry to doc type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 15:28:49 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Sep 2017 19:28:49 +0000 Subject: [issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors In-Reply-To: <1496753379.54.0.823104830335.issue30581@psf.upfronthosting.co.za> Message-ID: <1504294129.06.0.964033644442.issue30581@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 58521fdba1657f6553a1ead5cbaa100967a167b3 by Antoine Pitrou (Christopher Wilcox) in branch '3.6': bpo-30581: Windows: os.cpu_count() returns wrong number of processors (#2934) (#3267) https://github.com/python/cpython/commit/58521fdba1657f6553a1ead5cbaa100967a167b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 15:29:13 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Sep 2017 19:29:13 +0000 Subject: [issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors In-Reply-To: <1496753379.54.0.823104830335.issue30581@psf.upfronthosting.co.za> Message-ID: <1504294153.76.0.839030193514.issue30581@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Backport merged. Thanks Chris! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 15:32:00 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 01 Sep 2017 19:32:00 +0000 Subject: [issue31325] req_rate is a namedtuple type rather than instance In-Reply-To: <1504278922.84.0.0240979311873.issue31325@psf.upfronthosting.co.za> Message-ID: <1504294320.95.0.310085106571.issue31325@psf.upfronthosting.co.za> Berker Peksag added the comment: Good catch and thank you for turning the bug report in the HN thread to a pull request! I agree with all of Raymond's comments. I have two more comments: * Please follow our commit style at https://devguide.python.org/committing/#commit-messages * We need a NEWS entry. You can find details at https://devguide.python.org/committing/#what-s-new-and-news-entries (we don't need to add an entry in Doc/whatsnew/ so you can safely ignore it) ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 15:48:23 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 01 Sep 2017 19:48:23 +0000 Subject: [issue31307] ConfigParser.read silently fails if filenames argument is a byte string In-Reply-To: <1504102547.11.0.362577067596.issue31307@psf.upfronthosting.co.za> Message-ID: <1504295303.45.0.654372566019.issue31307@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Good catch. Supporting bytes passed as a path is a reasonable request since the builtin `open()` supports this, too. Go ahead and create a pull request! We only need to modify line 690 to also list `bytes`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 15:52:24 2017 From: report at bugs.python.org (tzickel) Date: Fri, 01 Sep 2017 19:52:24 +0000 Subject: [issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors In-Reply-To: <1496753379.54.0.823104830335.issue30581@psf.upfronthosting.co.za> Message-ID: <1504295544.93.0.959220157183.issue30581@psf.upfronthosting.co.za> tzickel added the comment: One should be careful with this modification because of the Windows definition of process groups. For example, if multi-threaded code thinks that by reading the value of the new os.cpu_count() it can use all the cores returned, by default it cannot as in windows processes by default can run only in a single process group (how it worked before). We can see such code builtin python stdlib itself: https://github.com/python/cpython/blob/bc61315377056fe362b744d9c44e17cd3178ce54/Lib/concurrent/futures/thread.py#L102 I think even .NET still uses the old way that python did until now: https://github.com/dotnet/corefx/blob/aaaffdf7b8330846f6832f43700fbcc060460c9f/src/System.Runtime.Extensions/src/System/Environment.Windows.cs#L71 Although some of this stuff is used in code for python multiprocess code which that might actually get a boost (since different process can get scheduled to different groups) https://msdn.microsoft.com/en-us/library/windows/desktop/dd405503(v=vs.85).aspx ---------- nosy: +tzickel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 16:08:32 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Sep 2017 20:08:32 +0000 Subject: [issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors In-Reply-To: <1496753379.54.0.823104830335.issue30581@psf.upfronthosting.co.za> Message-ID: <1504296512.44.0.422957984307.issue30581@psf.upfronthosting.co.za> Antoine Pitrou added the comment: os.cpu_count() is specified to return the total number of processors, not the number of usable processors. See e.g. https://bugs.python.org/issue26692 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 16:22:48 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 01 Sep 2017 20:22:48 +0000 Subject: [issue31325] req_rate is a namedtuple type rather than instance In-Reply-To: <1504278922.84.0.0240979311873.issue31325@psf.upfronthosting.co.za> Message-ID: <1504297368.22.0.454809247473.issue31325@psf.upfronthosting.co.za> Raymond Hettinger added the comment: There was a typo in my previous message. The instantiation code should be: entry.req_rate = RequestRate(int(numbers[0]), int(numbers[1])) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 16:24:32 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 01 Sep 2017 20:24:32 +0000 Subject: [issue31329] Add idlelib module entry to doc In-Reply-To: <1504293847.95.0.524257228924.issue31329@psf.upfronthosting.co.za> Message-ID: <1504297472.86.0.458881928258.issue31329@psf.upfronthosting.co.za> Raymond Hettinger added the comment: See also: http://bugs.python.org/issue31319 A cleaner command-line startup would be: python -m idle ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 18:25:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 22:25:13 +0000 Subject: [issue31326] concurrent.futures: ProcessPoolExecutor.shutdown(wait=True) should wait for the call queue thread In-Reply-To: <1504284347.13.0.276187725111.issue31326@psf.upfronthosting.co.za> Message-ID: <1504304713.64.0.949623552038.issue31326@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b713adf27a76b5df95e3ee5f85f9064a2763ae35 by Victor Stinner in branch 'master': bpo-31326: ProcessPoolExecutor waits for the call queue thread (#3265) https://github.com/python/cpython/commit/b713adf27a76b5df95e3ee5f85f9064a2763ae35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 18:25:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 22:25:42 +0000 Subject: [issue31250] test_asyncio leaks dangling threads In-Reply-To: <1503333236.01.0.923722915126.issue31250@psf.upfronthosting.co.za> Message-ID: <1504304742.08.0.665871529871.issue31250@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e8a533fbc734af6eeb389202ba6c6e9c2548027f by Victor Stinner in branch 'master': bpo-31250, test_asyncio: fix EventLoopTestsMixin.tearDown() (#3264) https://github.com/python/cpython/commit/e8a533fbc734af6eeb389202ba6c6e9c2548027f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 18:26:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 22:26:19 +0000 Subject: [issue31323] test_ssl: reference cycle between ThreadedEchoServer and its ConnectionHandler In-Reply-To: <1504277904.95.0.0934980312796.issue31323@psf.upfronthosting.co.za> Message-ID: <1504304779.6.0.202828244871.issue31323@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 868710158910fa38e285ce0e6d50026e1d0b2a8c by Victor Stinner in branch 'master': bpo-31323: Fix reference leak in test_ssl (#3263) https://github.com/python/cpython/commit/868710158910fa38e285ce0e6d50026e1d0b2a8c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 19:20:06 2017 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 01 Sep 2017 23:20:06 +0000 Subject: [issue29996] Use terminal width by default in pprint In-Reply-To: <1491409756.85.0.158082896832.issue29996@psf.upfronthosting.co.za> Message-ID: <1504308006.9.0.872984806384.issue29996@psf.upfronthosting.co.za> ?ric Araujo added the comment: I was about to open the same issue! I tend to print nested data structures for debugging; having lists take up a lot of vertical screen estate and leave unused all the horizontal space is an annoyance, so that I regularly have to go back and add the width param. Contrary to Fred, I think my tools tend to use the available width, but then I think that auto-width is a good behaviour for a tool, but maybe not a good change for a general library. Raymond?s note about students is also an important point. I don?t like adding envvars to control the behaviour of a module function at a distance, or magic constants; if I can pass a constant, I can pass a number (for quick debugging) or handle getting the terminal width at a higher layer (in a real command-line program). For my debugging use case, maybe it?s time I switch to q (on PyPI) and save even more typing. Even though I was about to request the same feature, I?m now -0. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 20:57:30 2017 From: report at bugs.python.org (Eryk Sun) Date: Sat, 02 Sep 2017 00:57:30 +0000 Subject: [issue23057] [Windows] asyncio: support signal handlers on Windows (feature request) In-Reply-To: <1418674256.87.0.827009141117.issue23057@psf.upfronthosting.co.za> Message-ID: <1504313850.5.0.13964629531.issue23057@psf.upfronthosting.co.za> Changes by Eryk Sun : ---------- stage: -> needs patch versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 23:19:37 2017 From: report at bugs.python.org (Antony Lee) Date: Sat, 02 Sep 2017 03:19:37 +0000 Subject: [issue31330] argparse.RawTextHelpFormatter does not maintain lines separated by more than one newline Message-ID: <1504322377.77.0.797544251654.issue31330@psf.upfronthosting.co.za> New submission from Antony Lee: The doc for argparse.RawTextHelpFormatter states that it "maintains whitespace for all sorts of help text, including argument descriptions." But the following example (which outputs "Foo", "Bar", and "Baz", each separated by exactly one empty line) shows that paragraphs separated by more than one empty line will only be separated in the output text by a single empty line. import argparse parser = argparse.ArgumentParser( prog='PROG', formatter_class=argparse.RawTextHelpFormatter, description='''\ Foo Bar Baz''') parser.print_help() ---------- components: Library (Lib) messages: 301158 nosy: Antony.Lee priority: normal severity: normal status: open title: argparse.RawTextHelpFormatter does not maintain lines separated by more than one newline versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 23:38:08 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 02 Sep 2017 03:38:08 +0000 Subject: [issue27099] IDLE: turn built-in extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1504323488.35.0.89362646365.issue27099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I believe PR2494 is about ready to merge. It is a big, complicated patch, so before merging, I would prefer to have it pass a full -uGUI test on something other than Windows. ---------- dependencies: -IDLE: configdialog - add tests for ConfigDialog GUI. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 1 23:42:00 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 02 Sep 2017 03:42:00 +0000 Subject: [issue27099] IDLE: turn built-in extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1504323720.87.0.602021555207.issue27099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I expect to polish the General page in a follow-up. I expect it will soon need to be split. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 03:46:16 2017 From: report at bugs.python.org (Elena Oat) Date: Sat, 02 Sep 2017 07:46:16 +0000 Subject: [issue31330] argparse.RawTextHelpFormatter does not maintain lines separated by more than one newline In-Reply-To: <1504322377.77.0.797544251654.issue31330@psf.upfronthosting.co.za> Message-ID: <1504338376.47.0.994329911051.issue31330@psf.upfronthosting.co.za> Elena Oat added the comment: It maintains *whitespace*, not the new lines. I've tested this using whitespaces and I think it keeps them according to the original description. See the image attached. ---------- nosy: +Elena.Oat Added file: http://bugs.python.org/file47117/Screen Shot 2017-09-02 at 10.45.48.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 05:36:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 02 Sep 2017 09:36:01 +0000 Subject: [issue31315] assertion failure in imp.create_dynamic(), when spec.name is not a string In-Reply-To: <1504196755.68.0.337811894425.issue31315@psf.upfronthosting.co.za> Message-ID: <1504344961.64.0.862944937082.issue31315@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> patch review versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 10:22:48 2017 From: report at bugs.python.org (R. David Murray) Date: Sat, 02 Sep 2017 14:22:48 +0000 Subject: [issue31330] argparse.RawTextHelpFormatter does not maintain lines separated by more than one newline In-Reply-To: <1504322377.77.0.797544251654.issue31330@psf.upfronthosting.co.za> Message-ID: <1504362168.25.0.737892916612.issue31330@psf.upfronthosting.co.za> R. David Murray added the comment: If that is the intended definition of "whitespace" in this context (I have no opinion on that so far), then the docs need amplification, because in general "whitespace" includes newlines. On the other hand, this might be considered a bug in the code and not the docs. However, changing it has backward compatibility implications, so we might go for a doc fix regardless. ---------- nosy: +paul.j3, r.david.murray versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 11:48:45 2017 From: report at bugs.python.org (paul j3) Date: Sat, 02 Sep 2017 15:48:45 +0000 Subject: [issue31330] argparse.RawTextHelpFormatter does not maintain lines separated by more than one newline In-Reply-To: <1504322377.77.0.797544251654.issue31330@psf.upfronthosting.co.za> Message-ID: <1504367325.42.0.694020212997.issue31330@psf.upfronthosting.co.za> paul j3 added the comment: I've seen this before, either in another bug/issue or a Stackoverflow question. The basic change in RawTextHelpFormatter is to turn off the line wrapping for texts like the description. Multiple newlines are preserved at this step. But after assembling all the pieces (usage, description, help, epilog) the formatter strips out duplicate newlines. This is needed because the process of assembly freely inserts newlines between the pieces, regardless of whether they are blank or not. It can't, or at least doesn't try to, distinguish between newlines within a block like the description, and newlines between blocks. If someone could come up with a simple patch, great. Or a simple change to the doc wording. But I don't think this issue merits a larger fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 12:19:07 2017 From: report at bugs.python.org (paul j3) Date: Sat, 02 Sep 2017 16:19:07 +0000 Subject: [issue31330] argparse.RawTextHelpFormatter does not maintain lines separated by more than one newline In-Reply-To: <1504322377.77.0.797544251654.issue31330@psf.upfronthosting.co.za> Message-ID: <1504369147.43.0.944866657398.issue31330@psf.upfronthosting.co.za> paul j3 added the comment: http://bugs.python.org/issue17113 argparse.RawDescriptionHelpFormatter should not delete blank lines This provides more details on why this is happening. I suggest using adding a space between newlines, thus: '\n \n'. HelpFormatter.format_help is just looking for '\n\n'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 12:24:37 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 02 Sep 2017 16:24:37 +0000 Subject: [issue10746] ctypes c_long & c_bool have incorrect PEP-3118 type codes In-Reply-To: <1292888248.06.0.197043159654.issue10746@psf.upfronthosting.co.za> Message-ID: <1504369477.18.0.748604885242.issue10746@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 990b2d043cdfaafc3378550f7d27259410a6b918 by Antoine Pitrou (Pauli Virtanen) in branch '2.7': [2.7] bpo-10746: Fix ctypes PEP 3118 type codes for c_long, c_bool, c_int (GH-31) (#3242) https://github.com/python/cpython/commit/990b2d043cdfaafc3378550f7d27259410a6b918 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 12:24:58 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 02 Sep 2017 16:24:58 +0000 Subject: [issue10746] ctypes c_long & c_bool have incorrect PEP-3118 type codes In-Reply-To: <1292888248.06.0.197043159654.issue10746@psf.upfronthosting.co.za> Message-ID: <1504369498.21.0.961288411132.issue10746@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 12:37:28 2017 From: report at bugs.python.org (paul j3) Date: Sat, 02 Sep 2017 16:37:28 +0000 Subject: [issue30421] argparse: relative include of config files In-Reply-To: <1495354542.35.0.729762114821.issue30421@psf.upfronthosting.co.za> Message-ID: <1504370248.02.0.70663904693.issue30421@psf.upfronthosting.co.za> Changes by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 14:05:24 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 02 Sep 2017 18:05:24 +0000 Subject: [issue31144] add initializer to concurrent.futures.ProcessPoolExecutor In-Reply-To: <1502200949.97.0.102357103627.issue31144@psf.upfronthosting.co.za> Message-ID: <1504375524.33.0.309192461657.issue31144@psf.upfronthosting.co.za> Antoine Pitrou added the comment: That would sound like a reasonable addition, yes. ---------- nosy: +pitrou versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 14:09:21 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 02 Sep 2017 18:09:21 +0000 Subject: [issue31144] add initializer to concurrent.futures.ProcessPoolExecutor In-Reply-To: <1502200949.97.0.102357103627.issue31144@psf.upfronthosting.co.za> Message-ID: <1504375761.93.0.289708897132.issue31144@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Actually, looks like this was already proposed in issue 21423. Closing as duplicate. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> concurrent.futures.ThreadPoolExecutor/ProcessPoolExecutor should accept an initializer argument _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 14:16:53 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 02 Sep 2017 18:16:53 +0000 Subject: [issue21009] Potential deadlock in concurrent futures when garbage collection occurs during Queue.get In-Reply-To: <1395416846.85.0.759574712799.issue21009@psf.upfronthosting.co.za> Message-ID: <1504376213.73.0.412511492932.issue21009@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't really understand this issue. How is concurrent.futures supposed to be the culprit here? Can you elaborate which weakref callback you are talking about? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 14:21:37 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 02 Sep 2017 18:21:37 +0000 Subject: [issue22281] ProcessPoolExecutor/ThreadPoolExecutor should provide introspection APIs In-Reply-To: <1409104603.02.0.0732918756664.issue22281@psf.upfronthosting.co.za> Message-ID: <1504376497.01.0.432640658221.issue22281@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Dan, not sure you're still interested on working on this? Looking at the API, IMHO it should be consolidated as a simple stats() method, which allows for a consistent snapshot. ---------- nosy: +pitrou stage: -> needs patch versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 14:25:42 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 02 Sep 2017 18:25:42 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1504376742.62.0.573881754333.issue14976@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Just a random thought: if there was a SimpleQueue class with very basic functionality (only FIFO, only get(), put() and empty(), no size limit, no task management), it would be easier to make it reentrant using C. (FTR, multiprocessing also has a light-weight SimpleQueue) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 15:17:13 2017 From: report at bugs.python.org (Georg Sauthoff) Date: Sat, 02 Sep 2017 19:17:13 +0000 Subject: [issue1346874] httplib simply ignores CONTINUE Message-ID: <1504379833.71.0.743597154095.issue1346874@psf.upfronthosting.co.za> Changes by Georg Sauthoff : ---------- nosy: +gms _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 15:30:11 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 02 Sep 2017 19:30:11 +0000 Subject: [issue31329] Add idlelib module entry to doc In-Reply-To: <1504293847.95.0.524257228924.issue31329@psf.upfronthosting.co.za> Message-ID: <1504380611.44.0.097040246623.issue31329@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Also document in idle doc that 'import idlelib.idle' is the programmatic API, and that icons and context menus may be available. In any case, add more information on 'How to start IDLE'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 15:51:23 2017 From: report at bugs.python.org (Dan O'Reilly) Date: Sat, 02 Sep 2017 19:51:23 +0000 Subject: [issue22281] ProcessPoolExecutor/ThreadPoolExecutor should provide introspection APIs In-Reply-To: <1409104603.02.0.0732918756664.issue22281@psf.upfronthosting.co.za> Message-ID: <1504381883.98.0.815589093636.issue22281@psf.upfronthosting.co.za> Dan O'Reilly added the comment: Unfortunately, I don't really have time to continue working on this anymore (or any of the other proposed patches I had submitted around 2014). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 16:01:06 2017 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 02 Sep 2017 20:01:06 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1504376742.62.0.573881754333.issue14976@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Agreed; the Queue class has a bunch of rarely used functionality rolled in... Why was task management ever added? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 16:22:27 2017 From: report at bugs.python.org (desbma) Date: Sat, 02 Sep 2017 20:22:27 +0000 Subject: [issue29212] Python 3.6 logging thread name regression with concurrent.future threads In-Reply-To: <1483938963.09.0.315595404976.issue29212@psf.upfronthosting.co.za> Message-ID: <1504383747.59.0.516758550768.issue29212@psf.upfronthosting.co.za> desbma added the comment: Gregory, please don't forget to backport the fix in the 3.6 branch, so that it is released with Python 3.6.3. Thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 17:43:23 2017 From: report at bugs.python.org (Tim Peters) Date: Sat, 02 Sep 2017 21:43:23 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1504388603.6.0.967909560508.issue14976@psf.upfronthosting.co.za> Tim Peters added the comment: [Guido] > Why was task management ever added? Raymond published a "joinable" queue class as a recipe here: http://code.activestate.com/recipes/475160-taskqueue/ and later folded it into the standard Python queue. So the usual answer applies: "it was easy to add and sometimes useful, so it seemed like a good idea at the time" ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 18:38:55 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 02 Sep 2017 22:38:55 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1504391935.61.0.414976320588.issue14976@psf.upfronthosting.co.za> Raymond Hettinger added the comment: [Guido] > Why was task management ever added? See http://bugs.python.org/issue1455676 Problem being solved: How can a requestor of a service get notified when that service is complete given that the work is being done by a daemon thread that never returns. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 19:52:22 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 02 Sep 2017 23:52:22 +0000 Subject: [issue31331] IDLE: Move prompts with input. Message-ID: <1504396342.39.0.90441409742.issue31331@psf.upfronthosting.co.za> New submission from Terry J. Reedy: When this program (from thread by Steven D'Aprano) on python-list is run import time from threading import Timer def do_work(): x = 2 + 2 print("It is", time.asctime(), "and 2+2 is", x) def go(): Timer(10, do_work, ()).start() # schedule it in one minute The response, if it occurs while one in entering a statement, 'pushes down' the entry in progress. ======================= RESTART: F:\Python\mypy\tem.py ======================= >>> go() >>> It is Sat Sep 2 19:42:10 2017 and 2+2 is 4 #<== output a = ( 12, # <== 2nd line of entry in progress The prompt should be pushed down too. ---------- assignee: terry.reedy components: IDLE messages: 301177 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE: Move prompts with input. type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 20:30:08 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 03 Sep 2017 00:30:08 +0000 Subject: [issue27099] IDLE: turn built-in extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1504398608.42.0.118403059609.issue27099@psf.upfronthosting.co.za> Cheryl Sabella added the comment: The test pass on Ubuntu. I'm getting a warning, but it's not because of this change. test_init (idlelib.idle_test.test_tree.TreeTest) ... invalid command name "140245621847896timer_event" while executing "140245621847896timer_event" ("after" script) invalid command name "140245613968200font_timer_event" while executing "140245613968200font_timer_event" ("after" script) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 2 23:40:17 2017 From: report at bugs.python.org (Tatsunori Uchino) Date: Sun, 03 Sep 2017 03:40:17 +0000 Subject: [issue31332] Building modules by Clang with Microsoft CodeGen Message-ID: <1504410017.01.0.560044317715.issue31332@psf.upfronthosting.co.za> New submission from Tatsunori Uchino: Microsoft released a new compiler for VC++ that complies with more of modern C++ than the standard compiler. https://blogs.msdn.microsoft.com/vcblog/2016/03/31/clang-with-microsoft-codegen-march-2016-released/ Is it possible to support it by creating a new script based on Lib/distutils/msvccompiler.py to Lib/distutils and adding a new item in the following dictionary in Lib/distutils/ccompiler.py? compiler_class = { 'unix': ('unixccompiler', 'UnixCCompiler', "standard UNIX-style compiler"), 'msvc': ('_msvccompiler', 'MSVCCompiler', "Microsoft Visual C++"), 'cygwin': ('cygwinccompiler', 'CygwinCCompiler', "Cygwin port of GNU C Compiler for Win32"), 'mingw32': ('cygwinccompiler', 'Mingw32CCompiler', "Mingw32 port of GNU C Compiler for Win32"), 'bcpp': ('bcppcompiler', 'BCPPCompiler', "Borland C++ Compiler"), } The executable of it is at C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ClangC2\bin\amd64. The help message of it is: OVERVIEW: clang LLVM compiler USAGE: clang.exe [options] OPTIONS: -### Print (but do not run) the commands to run for this compilation --analyze Run the static analyzer -arcmt-migrate-emit-errors Emit ARC errors even if the migrator can fix them -arcmt-migrate-report-output Output path for the plist report -B2 Location of backend dll -bigobj Generate extended COFF format --cuda-device-only Do device-side CUDA compilation only --cuda-host-only Do host-side CUDA compilation only --cuda-path= CUDA installation path -cxx-isystem Add directory to the C++ SYSTEM include search path -c Only run preprocess, compile, and assemble steps -d2 Additional arguments to forward to the backend -dD Print macro definitions in -E mode in addition to normal output -dependency-dot Filename to write DOT-formatted header dependencies to -dependency-file Filename (or -) to write dependency output to -dM Print macro definitions in -E mode instead of normal output -emit-ast Emit Clang AST files for source inputs -emit-llvm Use the LLVM representation for assembler and object files -E Only run the preprocessor -faltivec Enable AltiVec vector initializer syntax -fansi-escape-codes Use ANSI escape codes for diagnostics -fapple-kext Use Apple's kernel extensions ABI -fapple-pragma-pack Enable Apple gcc-compatible #pragma pack handling -fapplication-extension Restrict code to those available for App Extensions -fasync-exceptions Catch SEH exceptions in catch-alls -fblocks Enable the 'blocks' language feature -fborland-extensions Accept non-standard constructs supported by the Borland compiler -fbuild-session-file= Use the last modification time of as the build session timestamp -fbuild-session-timestamp=