[issue31672] string.Template should use re.ASCII flag

2017-11-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: @inada.naoki - I think changing this to ?a will make things more clear. I submitted a PR for that, and then once it lands, we can close this issue. -- ___ Python tracker _

[issue32100] IDLE: PathBrowser isn't working

2017-11-20 Thread Cheryl Sabella
Change by Cheryl Sabella : -- keywords: +patch pull_requests: +4421 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Dubslow
Dubslow added the comment: Note that this follows a bit of discussion on python-ideas, in two threads: https://mail.python.org/pipermail/python-ideas/2017-November/047920.html https://mail.python.org/pipermail/python-ideas/2017-November/047989.html I agree the zip_longest-derived solution is

[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset 09f3a8a1249308a104a89041d82fe99e6c087043 by Victor Stinner in branch 'master': bpo-32089: Fix warnings filters in dev mode (#4482) https://github.com/python/cpython/commit/09f3a8a1249308a104a89041d82fe99e6c087043 -- ___

[issue32030] PEP 432: Rewrite Py_Main()

2017-11-20 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4422 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-20 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue25711] Rewrite zipimport from scratch

2017-11-20 Thread Brett Cannon
Brett Cannon added the comment: zipimport.py would be frozen just like importlib, so there's no bootstrapping issue if that's what you're asking. -- ___ Python tracker ___ ___

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Dubslow
Dubslow added the comment: Regarding the current bug more specifically, I think a few comments would go a long way to helping readers understand the code. And also, I do think the (1, +1, -1) is less readable, simply because it doesn't follow the most common usage patterns of range, where you

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Dubslow
Dubslow added the comment: Perhaps the loop variable could be renamed to "len_minus_1" or some such something which is more semantic to the algorithm. -- ___ Python tracker __

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Dubslow
Dubslow added the comment: Er, in my first message, make that "(yield from tup for tup in zip_longest(*iters, usefill=False))" -- ___ Python tracker ___ __

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-20 Thread Nick Coghlan
Nick Coghlan added the comment: While they're definitely closely related, I don't think this and issue 32086 are actually duplicates: this issue is "fix the current Py_DecodeLocale regression in 3.7 by reverting back to the 3.6 behaviour", while issue 32086 is "Should we deprecate our implied

[issue32086] C API: Clarify which C functions are safe to be called before Py_Initialize()

2017-11-20 Thread Nick Coghlan
Nick Coghlan added the comment: Issue 32096 covers reverting the change to PyDecode_Locale specifically for 3.7. We can use this issue to ask the broader question "Do we want to *deprecate* our previously implied support for calling PyDecode_Locale() before Py_Initialize()?" If the answer is

[issue32030] PEP 432: Rewrite Py_Main()

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset 25420fe290b98171e6d30edf9350292c21ef700e by Victor Stinner in branch 'master': bpo-32030: Add more options to _PyCoreConfig (#4485) https://github.com/python/cpython/commit/25420fe290b98171e6d30edf9350292c21ef700e -- __

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: docs@python -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue32078] string result of str(bytes()) in Python3

2017-11-20 Thread Arno-Can Uestuensoez
Arno-Can Uestuensoez added the comment: I got your point, missed it before, sorry. So just for completeness. My issue was basically about the ambiguity of the str()-constructor and the str()-built-in-function. Therefore the len/type prints. It works with parameters: (3.6.2) [acue@lap001 Deskt

[issue32101] Add PYTHONDEVMODE=1 to enable the developer mode

2017-11-20 Thread STINNER Victor
New submission from STINNER Victor : In the review of the PR 4478, Antoine Pitrou proposed to add an environment variable to enable the new Python "developer mode" to inherit the developer mode in child Python processes. I proposed to add PYTHONDEVMODE=1. Nick Coghlan proposed PYTHONXOPTIONS=d

[issue32043] Add a new -X dev option: "developer mode"

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: I created bpo-32101: Add PYTHONDEVMODE=1 to enable the developer mode. -- ___ Python tracker ___ _

[issue32101] Add PYTHONDEVMODE=1 to enable the developer mode

2017-11-20 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +4423 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue32043] Add a new -X dev option: "developer mode"

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset bc9b6e29cb52f8da15613f9174af2f603131b56d by Victor Stinner in branch 'master': bpo-32043: Rephrase -X dev documentation (#4478) https://github.com/python/cpython/commit/bc9b6e29cb52f8da15613f9174af2f603131b56d -- __

[issue32043] Add a new -X dev option: "developer mode"

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: While the discussion is not done, I close this issue to focus on other more specific issues. I completed the documentation and fixed warnings filters (bpo-32089). The option now also enables asyncio debug mode (bpo-32047). It was proposed to add an environme

[issue32078] string result of str(bytes()) in Python3

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: I'm sorry but the bug tracker is not the right place to ask such question. There are plenty of resources on the Internet explaining how to write code compatible with Python 2 and Python 3. -- ___ Python tracker

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: IMO, George Sakkis's original version is better than the TJR's proposed revision which has three separate adjustments by one and adds to extraneous functions which aren't central to the example. Dubslow's alternative at least avoids the three offsets by o

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Tim Peters
Tim Peters added the comment: I agree the current recipe strikes a very nice balance among competing interests, and is educational on several counts. s/pending/numactive/ # Remove the iterator we just exhausted from the cycle. numactive -= 1 nexts = cycle(islice(nexts, numactive))

[issue32101] Add PYTHONDEVMODE=1 to enable the developer mode

2017-11-20 Thread Nick Coghlan
Nick Coghlan added the comment: Another argument against PYTHONXOPTIONS is that each implementation is free to decide which -X options it wants to support, and we don't really define what they're supposed to do with options they don't recognise. By contrast, there's an established behaviour f

[issue25144] 3.5 Win install fails with "TARGETDIR"

2017-11-20 Thread Steve Dower
Steve Dower added the comment: > Got the same issue with the 3.6 installer You've got a different issue, but I can't tell what it is without all of the logs. Can you look in your %TEMP% directory for the file you attached, and then also include those with the same prefix? -- ___

[issue25144] 3.5 Win install fails with "TARGETDIR"

2017-11-20 Thread Felipe
Change by Felipe : -- nosy: -fov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mail

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +4424 stage: needs patch -> patch review ___ Python tracker ___ ___

[issue32102] Add "capture_output=True" option to subprocess.run

2017-11-20 Thread Nick Coghlan
New submission from Nick Coghlan : I'm hesitant to suggest adding yet-another-option to any subprocess API, but I'm thinking it may be worth it in this case. The idea is to make it possible to replace: result = subprocess.run(cmd, stdout=PIPE, stderr=PIPE) with: result = subprocess.r

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: roundrobin() has quadratic computational complexity. For example list(roundrobin(*([[1]]*N))). Is there a way to make it with linear complexity? -- nosy: +serhiy.storchaka ___ Python tracker

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Serhiy, I think you're focusing on an irrelevant edge case and reading too much into the recipe. You could create an underlying binary tree with O(n) iteration and O(log n) deletion but then that completely misses the point of the itertools recipes and wo

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Raymond Hettinger
Change by Raymond Hettinger : -- Removed message: https://bugs.python.org/msg306629 ___ Python tracker ___ ___ Python-bugs-list maili

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree that using binary tree would be excessively here. I just wondering if there is a simple way to get rid of the quadratic complexity. In any case this does not matter much until you work with many hundreds or thousands of iterables. -- _

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually I tried to test if this implementation can cause a crash due to using deeply nested iterators (like in issue14010). For example in next(roundrobin(*([[]]*N + [[1]]))). But if there is such problem here, roundrobin() becomes unusable due to quadrati

[issue32086] C API: Clarify which C functions are safe to be called before Py_Initialize()

2017-11-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is there a *need* to break existing code? What is the benefit and how large it in comparison with the necessary of rewriting every code that embeds Python (and supporting both ways for long time)? -- nosy: +serhiy.storchaka

[issue32098] Hardcoded value in Lib/test/test_os.py:L1324:URandomTests.get_urandom_subprocess()

2017-11-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Tests keywords: +easy stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list

[issue32097] doctest does not consider \r\n a

2017-11-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It considers `\r\n` as a blank line. It just doesn't consider `\r\n` as `\n` in a non-blank line. If add `\r` after `some text` the test will pass. Or use NORMALIZE_WHITESPACE. -- nosy: +serhiy.storchaka ___ Pyth

<    1   2