[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-05-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: I suppose that when the input iterator is exhausted, we could poison the currkey to make the subordinate iterator ends as well: def __next__(self): while self.currkey == self.tgtkey: try: self.currvalue = next(self

[issue30181] Correct the parsing of a test case docstring.

2017-05-11 Thread R. David Murray
R. David Murray added the comment: Our tooling and workflow is indeed dependent on github. We should repurpose the current 'remote hg repo' to allow the entry of a non-github git repo, but someone will have to write that code. In the meantime, if you upload a patch generated from your branch

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-05-11 Thread INADA Naoki
Changes by INADA Naoki : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-li

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-05-11 Thread INADA Naoki
INADA Naoki added the comment: New changeset 5e94dedcddf5e09164bf20f18a3c701eeb96c71e by INADA Naoki in branch '3.5': bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1547) https://github.com/python/cpython/commit/5e94dedcddf5e09164bf20f18a3c701eeb96c71e --

[issue30181] Correct the parsing of a test case docstring.

2017-05-11 Thread Ben Finney
Ben Finney added the comment: > No, your contribution will not be rejected by "you don't maintain the repo on > GitHub", everyone can send the patch (PR) to python/cpython. I am glad to know that. I won't be maintaining a GitHub account because I disagree with the terms of service. > Ben, if

[issue30181] Correct the parsing of a test case docstring.

2017-05-11 Thread Ben Finney
Ben Finney added the comment: Apparently there is some consternation about my bugs.python.org identity. This is Ben Finney of WSP Digital, in Melbourne, Australia. A GitHub account is wholly irrelevant to this account. A GitHub account is wholly irrelevant to accepting the PSF CLA. This bugs.

[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-05-11 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: normal -> low ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-05-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: FYI, the CPython behavior matches the pure python implementation show in the docs: Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "copyright", "credits" or "license()" for more information.

[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-11 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: -Python 2.7, Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: IDLE currently completes global names, attributes after ., and filename segments after / or \ within a string. In the later two cases, a box will pop up automatically after a user selected time after typing . or /\ and nothing thereafter. The filename segmen

[issue30347] itertools.groupby() can fail a C assert()

2017-05-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Do you have a suggested fix? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue30019] IDLE freezes when opening a file with astral characters

2017-05-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Eryk> I tried print(transurrogate(s)) from editor and it worked!, printing '🔫 🔪' (though not near as pretty as here in Firefox. I have previously thought of scanning strings before inserting into Text widgets and converting astral chars to \U000n form, wit

[issue30347] itertools.groupby() can fail a C assert()

2017-05-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> rhettinger components: +Extension Modules -Interpreter Core nosy: +rhettinger, serhiy.storchaka stage: -> needs patch versions: +Python 3.5, Python 3.6 ___ Python tracker

[issue30347] itertools.groupby() can fail a C assert()

2017-05-11 Thread Armin Rigo
New submission from Armin Rigo: This triggers an assert() failure on debug-mode Python (or a leak in release Python): from itertools import groupby def f(n): print("enter:", n) if n == 5: list(b) print("leave:", n) return n != 6 for (k, b) in groupby(range(10), f):

[issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO

2017-05-11 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: So the issue wasn't restricted to a specific gdb version or distro release, as due to some issues dependency issues the gdb binary wasn't pulled in the buildroot which makes test_gdb to get skipped. So I was able to reproduce it on my system by installi

[issue22559] [backport] ssl.MemoryBIO

2017-05-11 Thread Geert Jansen
Geert Jansen added the comment: Glyph, if this is just for Twisted you could ship the "sslcompat" module that I'm shipping with Gruvi. It backports the async IO stuff and a few other pieces through an extension module. https://github.com/geertj/gruvi/blob/master/src/sslcompat.c and https://g

[issue30219] webbrowser.open outputs xdg-open deprecation warning

2017-05-11 Thread desbma
desbma added the comment: > For example, thanks to stdout/stderr, you noticed the warning. Without > stdout/stderr, the warning should be hidden. That is true, but as a Python user, it don't need to see that warning, only the xdg-utils developers do. I would have never seen it, and it would ne

[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-05-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue30336] Pull Requests need more detail

2017-05-11 Thread Brett Cannon
Brett Cannon added the comment: OK, since Victor has verified my thinking wasn't totally off-target, I'm going to close this. Thanks for the idea and taking the time for the PR, Jensen. If you do want to file issues or PRs against the devguide, the repo is at https://github.com/python/devguid

[issue22559] [backport] ssl.MemoryBIO

2017-05-11 Thread Glyph Lefkowitz
Glyph Lefkowitz added the comment: For what it's worth, it would still be great if this could be merged. It could help a lot with 2/3 migrations of async code that uses Twisted and wants to adopt some asyncio parts. Right now the stdlib SSL module is de-facto useless in those scenarios and d

[issue30346] Odd behavior when unpacking `itertools.groupby`

2017-05-11 Thread Matt Gilson
New submission from Matt Gilson: There is some odd behavior when unpacking the groups from an itertools.groupby result. For example: from itertools import groupby from operator import itemgetter inputs = ((x > 5, x) for x in range(10)) (_, a), (_, b) = groupby(inputs, key=item

[issue30327] Version may be out of date in travis.yml

2017-05-11 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue30327] Version may be out of date in travis.yml

2017-05-11 Thread Brett Cannon
Brett Cannon added the comment: I agree with Victor since that's why I set up the Travis file that way. :) Thanks to this issue, though, I have added a comment to .travis.yml to explain why the version is what it is. -- ___ Python tracker

[issue30327] Version may be out of date in travis.yml

2017-05-11 Thread Brett Cannon
Changes by Brett Cannon : -- pull_requests: +1648 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue30338] LC_ALL=en_US + io.open() => LookupError: (osx)

2017-05-11 Thread Ronald Oussoren
Ronald Oussoren added the comment: On macOS 10.12: ronald$ LC_ALL=en_US python2.7 -c 'import locale; print(repr(locale.getpreferredencoding()))' '' ronald$ LC_ALL=en_US python3.6 -c 'import locale; print(repr(locale.getpreferredencoding()))' 'UTF-8' getpreferredencoding uses the CODESET path

[issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO

2017-05-11 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Note: test_gdb is skipped on later Fedora's actually (possibly due to gdb package no being dragged at the minimal buildroot) so the issue might still be there, so the gdb version might have no effect on that. Will investigate further. -- _

[issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO

2017-05-11 Thread STINNER Victor
STINNER Victor added the comment: I created https://github.com/python/cpython/pull/1549 to update test_gdb.py and python-gdb.py in Python 3.6. I don't know if it will fix the issus, but it shouldn't hurt :-) -- ___ Python tracker

[issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO

2017-05-11 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1647 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO

2017-05-11 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: All the dependencies dragged. gdb is of version 7.11. The failures do not happen with gdb 7.12 (which exists in later Fedora releases). -- Added file: http://bugs.python.org/file46857/root.log ___ Python trac

[issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO

2017-05-11 Thread Charalampos Stratakis
Charalampos Stratakis added the comment: Full build log -- nosy: +cstratak Added file: http://bugs.python.org/file46856/build.log ___ Python tracker ___ _

[issue30340] Optimize out non-capturing groups

2017-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch Josh! This return was temporary added for debugging, the function should actually uniqify. -- ___ Python tracker ___ _

[issue30345] test_gdb fails on Python 3.6 when built with LTO+PGO

2017-05-11 Thread STINNER Victor
New submission from STINNER Victor: cstratak reported the following test failure on Fedora 24 when building Python 3.6 with LTO + PGO: == FAIL: test_threads (test.test_gdb.PyBtTests) Verify that "py-bt" indicates threads that a

[issue21261] Teach IDLE to Autocomplete dictionary keys

2017-05-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think it would be unusual for tab completion to work on non-strings and would create a weird feel to the API. -- ___ Python tracker ___ __

[issue30340] Optimize out non-capturing groups

2017-05-11 Thread Josh Rosenberg
Josh Rosenberg added the comment: The PR includes defining and using a _uniq function that is actually a no-op function (it doesn't uniquify, the first line returns the argument, so the rest is skipped). Was that supposed to be removed, or should it actually uniqify? -- nosy: +josh.r

[issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC

2017-05-11 Thread STINNER Victor
STINNER Victor added the comment: > Sorry if I misunderstood how the bug tracker works, but why did you delete > version 3.4 ? Python 3.4 is also affected. Right, but Python 3.4 doesn't accept bug fixes anymore: https://docs.python.org/devguide/#status-of-python-branches -- __

[issue30308] Add code coverage for argument in random.shuffle

2017-05-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you for the patch. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ _

[issue30308] Add code coverage for argument in random.shuffle

2017-05-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset f111fd2e65ef7aefd4ebeadbb48e84d609bf3733 by Raymond Hettinger (csabella) in branch 'master': bpo-30308: Code coverage for argument in random.shuffle (#1504) https://github.com/python/cpython/commit/f111fd2e65ef7aefd4ebeadbb48e84d609bf3733 ---

[issue30260] sock_dealloc() may call __repr__ when socket class is already collected by GC

2017-05-11 Thread asterite
asterite added the comment: Sorry if I misunderstood how the bug tracker works, but why did you delete version 3.4 ? Python 3.4 is also affected. -- ___ Python tracker ___ _

[issue30344] test_multiprocessing.test_notify_all(): AssertionError: 6 != 5 on x86 Windows XP 2.7

2017-05-11 Thread STINNER Victor
New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Windows%20XP%202.7/builds/150/steps/test/logs/stdio 0:19:29 [214/402/1] test_multiprocessing crashed -- running: test_mmap (43 sec) [0, 0.0] [76985 refs] test test_multiprocessing failed -- Traceback (most recent

[issue30337] Vague wording of pkgutil.walk_packages parameter 'prefix'

2017-05-11 Thread Sam Silberstein
Sam Silberstein added the comment: Hi there! This is my first submission to the bug tracker, so I apologize if I'm missing some formatting here. I've found what's either vague documentation for the 'prefix' parameter of `pgkutil.walk_packages` or a bug. The method implies that it will only i

[issue30337] Vague wording of pkgutil.walk_packages parameter 'prefix'

2017-05-11 Thread Sam Silberstein
Changes by Sam Silberstein : -- components: +Library (Lib) -Documentation versions: -Python 2.7 ___ Python tracker ___ ___ Python-bug

[issue30343] Subclassed json.JSONEncoder does not respect default method for supported types

2017-05-11 Thread Christopher Harrison
New submission from Christopher Harrison: If you subclass `json.JSONEncoder` to enable serialisation of custom types beyond those supported, you are meant to transform values of said type into a serialisable version within an overridden `default` method. For example: class MyJSONEncoder(js

[issue27240] 'UnstructuredTokenList' object has no attribute '_fold_as_ew'

2017-05-11 Thread Arthur Gutman
Changes by Arthur Gutman : -- nosy: +archibald ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-05-11 Thread INADA Naoki
INADA Naoki added the comment: New changeset 3dc7c52a9f4fb83be3e26e31e2c7cd9dc1cb41a2 by INADA Naoki in branch '3.6': bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1546) https://github.com/python/cpython/commit/3dc7c52a9f4fb83be3e26e31e2c7cd9dc1cb41a2 --

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-05-11 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +1646 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-05-11 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +1645 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue30048] If a task is canceled at the right moment, the cancellation is ignored

2017-05-11 Thread INADA Naoki
INADA Naoki added the comment: New changeset 991adca012f5e106c2d4040ce619c696ba6f9c46 by INADA Naoki in branch 'master': bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1097) https://github.com/python/cpython/commit/991adca012f5e106c2d4040ce619c696ba6f9c46 -- _

[issue30219] webbrowser.open outputs xdg-open deprecation warning

2017-05-11 Thread STINNER Victor
STINNER Victor added the comment: > Why do you think this isn't a good idea? If the command fails, you simplify have no idea of what happened. For example, thanks to stdout/stderr, you noticed the warning. Without stdout/stderr, the warning should be hidden. webbrowser is already able to dete

[issue30219] webbrowser.open outputs xdg-open deprecation warning

2017-05-11 Thread desbma
desbma added the comment: Why do you think this isn't a good idea? As a user, what am supposed to do with that warning: * about a program I have no idea I was calling (the webbrowser module abstraction is here so I don't have to think about it) * I have no control about it's invocation * the ou

[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-11 Thread STINNER Victor
STINNER Victor added the comment: > I had to remove this decorator from test_tools_buildbot_test() since > sysconfig.is_python_build() is false on Python 2.7 built with VS 2008 my > Windows VM, whereas I didn't install Python!? I don't know why. I opened bpo-30342 for this bug. > Oh, test_reg

[issue28787] Out of tree --with--dtrace builds fail with a traceback

2017-05-11 Thread STINNER Victor
STINNER Victor added the comment: Thank you Charalampos, I merged your fixes for branches 3.6 and master (3.7). -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue28787] Out of tree --with--dtrace builds fail with a traceback

2017-05-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset a4465a5bd08f232cf097893006118c82975c3402 by Victor Stinner (stratakis) in branch '3.6': [3.6] bpo-28787: Fix out of tree --with-dtrace builds (GH-135) (#1543) https://github.com/python/cpython/commit/a4465a5bd08f232cf097893006118c82975c3402

[issue30341] Add an explaining comment in _PyTrash_thread_destroy_chain()

2017-05-11 Thread Xiang Zhang
Changes by Xiang Zhang : -- pull_requests: +1644 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue30342] [2.7] sysconfig.is_python_build() doesn't work if Python is built with VS 2008

2017-05-11 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1643 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30342] [2.7] sysconfig.is_python_build() doesn't work if Python is built with VS 2008

2017-05-11 Thread STINNER Victor
STINNER Victor added the comment: See also bpo-30313: Tests of Python 2.7 VS9.0 buildbots must be run with -uall -rwW options. The PR also contains a fix for test_regrtest, see: http://bugs.python.org/issue30283#msg293476 -- ___ Python tracker

[issue30342] [2.7] sysconfig.is_python_build() doesn't work if Python is built with VS 2008

2017-05-11 Thread STINNER Victor
New submission from STINNER Victor: When Python 2.7 is compiled by VS 2008 using PC/VS9.0/ solution, the executable is PC/VS9.0/{amd64,x86}/python(_d).exe. sysconfig.is_python_build() handles PC/VS7.1/ and PCbuild/ builds, but not PC/VS9.0/ builds. Attached PR fixes is_python_build() for VS 20

[issue30341] Add an explaining comment in _PyTrash_thread_destroy_chain()

2017-05-11 Thread Xiang Zhang
New submission from Xiang Zhang: Studying how trashcan works I get puzzled about why increasing trash_delete_nesting in _PyTrash_thread_destroy_chain. I asked Antoine privately (thought he was the author). Antoine told me the reason and suggested add a comment here to help understand. -

[issue28787] Out of tree --with--dtrace builds fail with a traceback

2017-05-11 Thread Charalampos Stratakis
Changes by Charalampos Stratakis : -- pull_requests: +1642 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue25260] python -m test --coverage doesn't work on Windows

2017-05-11 Thread STINNER Victor
Changes by STINNER Victor : -- Removed message: http://bugs.python.org/msg293482 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-11 Thread STINNER Victor
STINNER Victor added the comment: -@unittest.skipUnless(sysconfig.is_python_build(), - 'test.bat script is not installed') I had to remove this decorator from test_tools_buildbot_test() since sysconfig.is_python_build() is false on Python 2.7 built with VS 2008 my W

[issue25260] python -m test --coverage doesn't work on Windows

2017-05-11 Thread STINNER Victor
STINNER Victor added the comment: -@unittest.skipUnless(sysconfig.is_python_build(), - 'test.bat script is not installed') I had to remove this decorator from test_tools_buildbot_test() since sysconfig.is_python_build() is false on Python 2.7 built with VS 2008 my W

[issue30340] Optimize out non-capturing groups

2017-05-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +1641 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30340] Optimize out non-capturing groups

2017-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: $ ./python -m timeit -s "import re; p = re.compile(r'[a-z]|[0-9]'); s = ' '*1+'x'" "p.search(s)" Unpatched: 500 loops, best of 5: 732 usec per loop Patched:1000 loops, best of 5: 279 usec per loop -- ___

[issue30313] Tests of Python 2.7 VS9.0 buildbots must be run with -uall -rwW options

2017-05-11 Thread STINNER Victor
STINNER Victor added the comment: Another issue with Python built using VS 2008, test_regrtest has to check two tests in that case, see: http://bugs.python.org/issue30283#msg293476 -- ___ Python tracker __

[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset a5bb62436e25614276ac4b8e252a87f3fcc946cd by Victor Stinner in branch '2.7': [2.7] bpo-30283: regrtest: backport test_slow_interrupted() and test_coverage() (#1541) https://github.com/python/cpython/commit/a5bb62436e25614276ac4b8e252a87f3fcc946cd

[issue25260] python -m test --coverage doesn't work on Windows

2017-05-11 Thread STINNER Victor
STINNER Victor added the comment: New changeset a5bb62436e25614276ac4b8e252a87f3fcc946cd by Victor Stinner in branch '2.7': [2.7] bpo-30283: regrtest: backport test_slow_interrupted() and test_coverage() (#1541) https://github.com/python/cpython/commit/a5bb62436e25614276ac4b8e252a87f3fcc946cd

[issue30340] Optimize out non-capturing groups

2017-05-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch makes the regular expression parser produce more optimal tree, mainly due to getting rid of non-capturing groups. This allows to apply an optimization that was forbidden before and makes the regular expression compiler producing more efficie

[issue30283] [2.7] Backport test_regrtest (partially) on Python 2.7

2017-05-11 Thread STINNER Victor
STINNER Victor added the comment: > Oh, test_regrtest still fails on x86 Windows XP VS9.0 2.7. PCbuild/rt.bat doesn't work on VS9.0 since VS9.0 creates python(_d).exe in PC/VS9.0/{amd64,x86}/, not in PCbuild/{amd64,x86}/. My new https://github.com/python/cpython/pull/1541 patch serie now start

[issue30287] cpython and Clang Static Analyzer

2017-05-11 Thread Mark Dickinson
Mark Dickinson added the comment: > I guess return -1 instead of bits=0 will silent both gcc and the static > analyzer warning. That's a possibility, though we should also set an exception in that case (since returning an error value without setting an exception is also something that might b

[issue15786] IDLE code completion window can hang or misbehave with mouse

2017-05-11 Thread Louie Lu
Louie Lu added the comment: Additional info for Windows platform: when creating autocompletewindow, it will bind "" to winconfig, this cause a problem, when showing up the acw, it will misbehavior calling multiple times about . The result is, tk will not able to response to Double-ButtonReleas