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

2017-05-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 1568 and PR 1569 are two subvariants of #1. PR 1568 makes an inner iterator invalid and raising RuntimeError when used. PR 1569 makes an inner iterator exhausted. -- stage: -> patch review ___ Python tracker

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

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

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

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

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

2017-05-12 Thread Louie Lu
Louie Lu added the comment: Terry, the latest PR fix the problem both on Linux / MacOS and Windows, please help to review and test if there is any problem on different platform, thanks! -- ___ Python tracker _

[issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7

2017-05-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Test needed. import Tkinter as tk import tkFont as tkf root = tk.Tk() font = tkf.Font(root, size=20, family=u"MS \u30b4\u30b7\u30c3\u30af") reproduces the failure in Marc's example. File "C:\Programs\Python27\lib\lib-tk\tkFont.py", line 74, in __init__

[issue30359] A standard convention for annotating a function as returning an (async) context manager?

2017-05-12 Thread Nick Coghlan
Nick Coghlan added the comment: Given that we have contextlib.AbstractContextManager now, perhaps it should just set "f.__annotations__['return'] = AbstractContextManager"? (assuming no other return annotation is already set) -- ___ Python tracker

[issue30341] Add an explaining comment in _PyTrash_thread_destroy_chain()

2017-05-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Py

[issue30341] Add an explaining comment in _PyTrash_thread_destroy_chain()

2017-05-12 Thread Xiang Zhang
Xiang Zhang added the comment: New changeset a66f9c6bb134561a24374f10e8c35417d356ce14 by Xiang Zhang in branch 'master': bpo-30341: Improve _PyTrash_thread_destroy_chain() a little bit (#1545) https://github.com/python/cpython/commit/a66f9c6bb134561a24374f10e8c35417d356ce14 -- __

[issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7

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

[issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7

2017-05-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since the source of the unicode font family is Tkinter, I think it is better not encode it in Python, but pass it as unicode and allow Tkinter to convert a unicode to a Tcl value. -- ___ Python tracker

[issue30113] Allow helper functions to wrap sys.setprofile

2017-05-12 Thread Louie Lu
Louie Lu added the comment: PR-1212 Add an explicit test for dispatch_return's assertion, could @benjaminp, @tiran or @giampaolo help to review this? Thanks! -- nosy: +benjamin.peterson, christian.heimes, giampaolo.rodola ___ Python tracker

[issue30359] A standard convention for annotating a function as returning an (async) context manager?

2017-05-12 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue30359] A standard convention for annotating a function as returning an (async) context manager?

2017-05-12 Thread Nathaniel Smith
New submission from Nathaniel Smith: sphinxcontrib-trio [1] does a few things; one of them is to enhance sphinx's autodoc support by trying to sniff out the types of functions so that it can automatically determine that something is, say, a generator, or an async classmethod. This runs into p

[issue30358] Profile documentation - include sort argument for runctx

2017-05-12 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +1661 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30358] Profile documentation - include sort argument for runctx

2017-05-12 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- assignee: docs@python components: Documentation nosy: csabella, docs@python priority: normal severity: normal status: open title: Profile documentation - include sort argument for runctx type: enhancement versions: Python 3.7 __

[issue30291] Allow windows launcher to specify bit lengths with & without minor version

2017-05-12 Thread Steve Dower
Steve Dower added the comment: New changeset 870f6a11dd3b2d5455f7057ce0d9c2cd31acc2f2 by Steve Dower (Steve (Gadget) Barnes) in branch 'master': bpo-30291 Changes to launcher so as to allow py -3-32, -2.7-64, 3.10, etc. https://github.com/python/cpython/commit/870f6a11dd3b2d5455f7057ce0d9c2cd31

[issue18233] SSLSocket.getpeercertchain()

2017-05-12 Thread Chet Nichols III
Chet Nichols III added the comment: Oh yeah, definitely not trustworthy at all. In my case, I am not processing the peer chain to actually verify trust, but I am still interested in inspecting the chain. Dangerous or not, and regardless of what almost all people should *actually* be doing, SS

[issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7

2017-05-12 Thread Marc Culler
Marc Culler added the comment: The name of a Tk font family is a byte sequence obtained from the operating system. But, this being Python 2.7, there is no distinction between the str type and the bytes type. The byte sequence is definitely not ascii encoded on a Japanese Windows system. It

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-05-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: Yes, please do keep any proposed idlelib changes separate. Also, I don't any of these to be backported (it is stylistic and not about bugs). -- ___ Python tracker

[issue30315] test_ftplib.TestTLS_FTPClass: "[Errno 54] Connection reset by peer" on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot

2017-05-12 Thread STINNER Victor
STINNER Victor added the comment: Another error on AMD64 FreeBSD CURRENT Non-Debug 2.7: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%202.7/builds/92/steps/test/logs/stdio 0:04:23 [171/402/1] test_urllib2net failed test test_urllib2net failed -- Traceback (most r

[issue30357] test_thread.test_save_exception_state_on_error(): Unhandled exception in thread: AMD64 Debian root 2.7

2017-05-12 Thread STINNER Victor
New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Debian%20root%202.7/builds/154/steps/test/logs/stdio 0:04:59 [312/402/1] test_thread failed Traceback (most recent call last): File "/root/buildarea/2.7.angelico-debian-amd64/build/Lib/test/test_thread.py", li

[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2017-05-12 Thread STINNER Victor
New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/601/steps/test/logs/stdio == FAIL: test_mymanager_context (test.test_multiprocessing_spawn.WithManagerTestMyManager) --

[issue29367] python-gdb: display wrapper_call()

2017-05-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset d05f7fdf6cf77724bd3064fb5a0846ef5cfe0c88 by Victor Stinner in branch '3.6': [3.6] bpo-30345: Update test_gdb.py and python-gdb.py from master (#1549) https://github.com/python/cpython/commit/d05f7fdf6cf77724bd3064fb5a0846ef5cfe0c88 -- _

[issue29259] Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects

2017-05-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset d05f7fdf6cf77724bd3064fb5a0846ef5cfe0c88 by Victor Stinner in branch '3.6': [3.6] bpo-30345: Update test_gdb.py and python-gdb.py from master (#1549) https://github.com/python/cpython/commit/d05f7fdf6cf77724bd3064fb5a0846ef5cfe0c88 -- _

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

2017-05-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset d05f7fdf6cf77724bd3064fb5a0846ef5cfe0c88 by Victor Stinner in branch '3.6': [3.6] bpo-30345: Update test_gdb.py and python-gdb.py from master (#1549) https://github.com/python/cpython/commit/d05f7fdf6cf77724bd3064fb5a0846ef5cfe0c88 -- _

[issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported?

2017-05-12 Thread STINNER Victor
STINNER Victor added the comment: Anyway, I fixed some issues specific to VS9.0 recently, so things should be a little bit better now :-) For me, the last annoying issue is bpo-30313: re-run failed tests in verbose mode. I will try to implement proposed solution. -- ___

[issue18233] SSLSocket.getpeercertchain()

2017-05-12 Thread Dustin Oprea
Dustin Oprea added the comment: Thanks for expounding on this, Christian. Assuming your assertions are correct, this makes perfect sense. Can anyone listening close this? On May 12, 2017 17:45, "Christian Heimes" wrote: Christian Heimes added the comment: The ticket is dead for a very good r

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

2017-05-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: At first glance, the suggested PR looks fine. Unless there is a rush, I would like to hold-off spend more time thinking about Issue 30346 before moving forward with this one. -- ___ Python tracker

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

2017-05-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: > If I was to submit this as a PR, ... Please don't jump to writing code yet. We need to decide what should be done first. I'm not really excited about making a change at all. No users seem to have ever been affected by this. The CPython code matches

[issue18233] SSLSocket.getpeercertchain()

2017-05-12 Thread Christian Heimes
Christian Heimes added the comment: The ticket is dead for a very good reason. Past me was not clever enough and didn't know about the difference between the cert chain sent by the peer and the actual trust chain. The peer's cert chain is not trustworthy and must *only* be used to build the ac

[issue30312] Small correction in set code sample

2017-05-12 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- versions: -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue30352] The 'in' syntax should work with any object that implements __iter__

2017-05-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: -1 on this proposal. We haven't really seen a need for this in practice. And such as change would be likely create unforeseen consequences to existing code. The proposal is at odds with the existing design. Python internals work by checking for whethe

[issue30312] Small correction in set code sample

2017-05-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: English 'or' remains ambiguous, and often exclusive, even without 'either'. Hence jokes like Parent: "Cake or pie?" Smart kid: "Both!" I agree with replacing 'either' with 'or both'. -- nosy: +terry.reedy ___ Py

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

2017-05-12 Thread Matthew Gilson
Matthew Gilson added the comment: Tracking which group the grouper _should_ be on using an incrementing integer seems to work pretty well. In additional to the tests in `test_itertools.py`, I've gotten the following tests to pass: class TestGroupBy(unittest.TestCase): def test_unpacking(s

[issue30355] Unicode symbols crash lib2to3.parse

2017-05-12 Thread Yann Grisel
New submission from Yann Grisel: The code formatter YAPF relies on lib2to3 to parse the code before formatting it. The function "classify" from "lib2to3/pgen2/parse.py" returns a ParseError when encountering unicode variable names (like Δ), which it should not. -- components: 2to3 (2.x

[issue30310] tkFont.py assumes that all font families are encoded as ascii in Python 2.7

2017-05-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: Marc, In the future please copy and paste such text interactions instead of posting an image. A 'crash' on Windows is when one gets the Windows' Error messagebox 'You application has stopped working.' Since the exception comes from trying to encode non-ascii

[issue11681] -b option undocumented

2017-05-12 Thread Zachary Ware
Changes by Zachary Ware : -- pull_requests: +1660 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib

2017-05-12 Thread Terry J. Reedy
Terry J. Reedy added the comment: As I said on review, I want idlelib changes either not made or in a separate patch that can be backported as is. Partial backport/cherry-picks are a major nuisance. I don't know if anything else should be treated similarly. -- nosy: +terry.reedy ___

[issue18233] SSLSocket.getpeercertchain()

2017-05-12 Thread Chet Nichols III
Chet Nichols III added the comment: Is this dead at this point? Just stumbled upon it, and I'm hopeful that maybe there's still a chance, since it's still `open`. :) -- nosy: +chet ___ Python tracker _

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

2017-05-12 Thread desbma
desbma added the comment: The only issue with Python itself is that the output of a subprocess call hidden behind a high level abstraction is thrown into the user's face in an unexpected way. This just does not seem to be the right thing to do to me. The deprecation warning of xdg-open/gvfs-op

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

2017-05-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree and prefer #1. This will save users from incorrect using and us from reports about odd behavior. The implementation is simple. The groupby object generates an unique identifier when creates a new grouper. This may be a sequential integer, just object

[issue29863] Add a COMPACT constant to the json module

2017-05-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note also that using separators=COMPACT doesn't guarantee the most compact output. As Inada mentioned ensure_ascii=False may make JSON more compact. And you shouldn't use non-default indent! I don't understand effort spent for this issue. Even if add json.CO

[issue30354] Change data model documentation to zero-argument super()

2017-05-12 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +1659 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30354] Change data model documentation to zero-argument super()

2017-05-12 Thread Cheryl Sabella
New submission from Cheryl Sabella: Update data model documentaion to reflect the zero-argument form of super(). -- assignee: docs@python components: Documentation messages: 293566 nosy: csabella, docs@python priority: normal severity: normal status: open title: Change data model documen

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

2017-05-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I have no interest in #2. Itertools are all about *not* storing data in memory unless that is an intrinsic requirement for the operation (tee() and cycle() for example). Also, I would like any changes to be minimal and have the lowest possible risk of br

[issue29863] Add a COMPACT constant to the json module

2017-05-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: Having mulled this over for a while, I'm disinclined to go forward with this proposal. On the one hand, it is a relatively small change, so it doesn't affect the overall complexity much. However, API design principles suggest that this isn't the right thi

[issue27144] concurrent.futures.as_completed() memory inefficiency

2017-05-12 Thread Grzegorz Grzywacz
Grzegorz Grzywacz added the comment: > We just ran into the exact same issue here in Google using a > ThreadPoolExecutor.map call Looks like map got simillar issue. I created GitHub PR with map fixed. > Concurrent package was added in 3.2. How backport it 2.7? There is official, unofficial 2.7

[issue27144] concurrent.futures.as_completed() memory inefficiency

2017-05-12 Thread Grzegorz Grzywacz
Changes by Grzegorz Grzywacz : -- pull_requests: +1658 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted

2017-05-12 Thread R. David Murray
R. David Murray added the comment: I think we are leaning strongly toward making no change here. -- ___ Python tracker ___ ___ Python-

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

2017-05-12 Thread R. David Murray
R. David Murray added the comment: Ah, yes, that's a bug in our workflow we'll need to fix. The CLA signed on the bug tracker is the ultimate authority, so we need some way to manually bypass the bot for cases like this. A committer should be able to bypass the problem and get the patch pushe

[issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported?

2017-05-12 Thread Zachary Ware
Zachary Ware added the comment: Jeremy is correct. To further clarify, *all* 2.7 Windows builders *are* using VS 2008's compiler toolchain, but they're using VS 2015's MSBuild with VS 2010's description of 2008's compiler toolchain to build the projects described in PCbuild/. It's a mess, bu

[issue30353] ctypes: pass by value for structs broken on Cygwin/MinGW 64-bit

2017-05-12 Thread Erik Bray
Changes by Erik Bray : -- pull_requests: +1656 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue29573] NamedTemporaryFile with delete=True should not fail if file already deleted

2017-05-12 Thread Andrew Nester
Andrew Nester added the comment: any conclusion on this? looks like it's a bit stuck -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue29863] Add a COMPACT constant to the json module

2017-05-12 Thread Andrew Nester
Andrew Nester added the comment: any conclusion on this? looks like it's a bit stuck -- nosy: +andrewnester ___ Python tracker ___ ___

[issue29553] Argparser does not display closing parentheses in nested mutex groups

2017-05-12 Thread Andrew Nester
Andrew Nester added the comment: so any feedback on this? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue30353] ctypes: pass by value for structs broken on Cygwin/MinGW 64-bit

2017-05-12 Thread Erik Bray
New submission from Erik Bray: The test ctypes.test.test_structures.StructureTestCase.test_pass_by_value fails on 64-bit Cygwin and MinGW using the system libffi with: == FAIL: test_pass_by_value (ctypes.test.test_structures.St

[issue30276] import hashlib makes many programs slow

2017-05-12 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: Tracking this in https://bugzilla.opensuse.org/show_bug.cgi?id=1038906 now. It turned out to be a problem with (our?) openssl-1.0.2 which Debian stable does not have yet and Debian/9 (stretch) has openssl-1.1.0 without this problem The nicest python-based

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

2017-05-12 Thread Christopher Harrison
Christopher Harrison added the comment: I have written a proof-of-concept implementation and submitted a pull request. See the PR for details: https://github.com/python/cpython/pull/1558 (My CLA is pending; submitted around 2017-05-12T10:30:00Z+0100) -- ___

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

2017-05-12 Thread Christopher Harrison
Changes by Christopher Harrison : -- pull_requests: +1654 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

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

2017-05-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a Python implementation of the idea #2: from itertools import tee def groupby(iterable, key=None): if key is None: key = lambda x: x def grouper(currvalue, it, tgtkey): yield currvalue for currvalue in it: if

[issue30352] The 'in' syntax should work with any object that implements __iter__

2017-05-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: A further thought... looking at your example code, I believe that part of the __getattr__ is redundant. def __getattr__(self, item): try: return self.__getattribute__(item) except AttributeError: return self.f.__geta

[issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported?

2017-05-12 Thread Jeremy Kloth
Jeremy Kloth added the comment: A few things... First to Victor's comments on the devguide. The following sentence after the one quoted states: "To use the build files in the PCbuild directory you will also need Visual Studio 2010" In short, you need *both* VS2008 and VS2010 to compile the

[issue30352] The 'in' syntax should work with any object that implements __iter__

2017-05-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- nosy: +rhettinger, xiang.zhang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

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

2017-05-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 1557 implements the simplest fix -- remove the assert and use Py_XSETREF() instead of simple assignment. Since the resulting code in _grouper_next() is identical to the code in groupby_next(), it was shared between these two functions. -- stage:

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

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

[issue30352] The 'in' syntax should work with any object that implements __iter__

2017-05-12 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is not a small change, and will need careful thought. The problem is that in Python 3 (and in Python 2 for new-style classes), dunder methods are only called by the interpreter if they are defined on the class itself, not on the instance. That's an optim

[issue30352] The 'in' syntax should work with any object that implements __iter__

2017-05-12 Thread Edouard KLEIN
New submission from Edouard KLEIN: In this StackOverflow question: http://stackoverflow.com/questions/43935187/how-come-an-object-that-implements-iter-is-not-recognized-as-iterable/43935360#43935360 the question of why an object that implements __iter__ through __getattr__ does not work with t

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

2017-05-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This bug already is fixed in develop branch of xdg-open. But the version including that fix still is not released. There may be years until it be released and main distributives update xdg-open. -- ___ Python trac

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

2017-05-12 Thread STINNER Victor
STINNER Victor added the comment: I tested manually my change: it fixes the issue ;-) -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___ _

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

2017-05-12 Thread STINNER Victor
STINNER Victor added the comment: 2017-05-11 20:42 GMT+02:00 desbma : > Of course, because gvfs-open is precisely the cause of the deprecation warning I don't understand something. Why do you consider that it's a Python bug, whereas xdg-open redirects to the deprecated gvfs-open tool? Why not r

[issue30351] regrtest hangs on x86 Windows XP 2.7

2017-05-12 Thread STINNER Victor
New submission from STINNER Victor: The tests step was killed after a total of 55 min 54 sec, whereas it only took 38 min 40 sec on the previous build 150. regrtest was supposed to log "running: test_threading (xxx sec)" every 30 seconds, but it didn't!? I don't know if the main regrtest proce

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

2017-05-12 Thread STINNER Victor
STINNER Victor added the comment: Also failed on: http://buildbot.python.org/all/builders/x86%20Windows%20XP%20VS9.0%202.7/builds/147/steps/test/logs/stdio -- ___ Python tracker

[issue30003] Fix handling escape characters in HZ codec

2017-05-12 Thread Xiang Zhang
Changes by Xiang Zhang : -- stage: -> patch review title: Remove hz codec -> Fix handling escape characters in HZ codec versions: +Python 2.7, Python 3.5, Python 3.6 ___ Python tracker

[issue30003] Remove hz codec

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

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

2017-05-12 Thread STINNER Victor
STINNER Victor added the comment: The best "workaround" on Python 2.7 is to specify the encoding: replace io.open(filename) with io.open(filename, encoding="utf8"). It's always better to specify the encoding ;-) -- ___ Python tracker

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

2017-05-12 Thread STINNER Victor
STINNER Victor added the comment: Thanks for your bug report Anthony Sottile! It's now fixed! My backport was merged. New changeset 94a3694c3dda97e3bcb51264bf47d948c5424d84 by Victor Stinner in branch '2.7': bpo-6393: Fix locale.getprerredencoding() on macOS (#1555) https://github.com/python/

[issue30323] concurrent.futures.Executor.map() consumes all memory when big generators are used

2017-05-12 Thread Klamann
Klamann added the comment: Yes, I was wrong in my assumption that simply replacing the list comprehension with a generator expression would fix the issue. Nevertheless, there is no need to load the *entire* generator into memory by converting it to a list. All we have to read are the first n e

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

2017-05-12 Thread STINNER Victor
STINNER Victor added the comment: > Note that _pyio uses locale.getpreferedencoding(), not > locale.getpreferredencoding(False). Oh, it's a difference between Python 2.7 and Python 3. Python 3 calls setlocale(LC_CTYPE, "") at startup, so locale.getpreferredencoding(False) can be used in Pytho

[issue6393] OS X: python3 from python-3.1.dmg crashes at startup

2017-05-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset 94a3694c3dda97e3bcb51264bf47d948c5424d84 by Victor Stinner in branch '2.7': bpo-6393: Fix locale.getprerredencoding() on macOS (#1555) https://github.com/python/cpython/commit/94a3694c3dda97e3bcb51264bf47d948c5424d84 -- nosy: +haypo ___

[issue30350] devguide suggests to use VS 2008 to build Python 2.7, but VS 2008 is no more supported?

2017-05-12 Thread STINNER Victor
New submission from STINNER Victor: Steve Dower wrote this comment on my PR https://github.com/python/cpython/pull/1544 : "Ah, I see. This is fine then - I have very little interest in doing much work to support the old build files (as they are explicitly unsupported)." Copy of my reply: "I

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

2017-05-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset f2e894cfd9b6f5d6aacc276476262d481203030c by Victor Stinner in branch '2.7': bpo-30342: Fix sysconfig.is_python_build() on VS9.0 (#1544) https://github.com/python/cpython/commit/f2e894cfd9b6f5d6aacc276476262d481203030c -- ___

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

2017-05-12 Thread STINNER Victor
STINNER Victor added the comment: I created a PR to backport bpo-6393 to Python 2.7: https://github.com/python/cpython/pull/1555 -- ___ Python tracker ___ __

[issue6393] OS X: python3 from python-3.1.dmg crashes at startup

2017-05-12 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +1651 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

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

2017-05-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Does it make sense using a grouper after advancing the groupby iterator? Currently it is possible by accident: >>> from itertools import groupby, count >>> it = groupby(count(), lambda i: (i//10)%2) >>> _, even = next(it) >>> _, odd = next(it) >>> print(list(

[issue30349] Preparation for advanced set syntax in regular expressions

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

[issue30348] IDLE: Add fetch completions and get entity unittest

2017-05-12 Thread Louie Lu
Changes by Louie Lu : -- pull_requests: +1649 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue30348] IDLE: Add fetch completions and get entity unittest

2017-05-12 Thread Louie Lu
New submission from Louie Lu: Due to #21261, add relative unittest to test_autocomplete.py -- assignee: terry.reedy components: IDLE messages: 293531 nosy: louielu, terry.reedy priority: normal severity: normal status: open title: IDLE: Add fetch completions and get entity unittest type:

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

2017-05-12 Thread Matthew Gilson
Matthew Gilson added the comment: Oops. You don't need to pass `self.currvalue` to `_grouper`. I didn't end up using it in there... -- ___ Python tracker ___ __

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

2017-05-12 Thread Matthew Gilson
Matthew Gilson added the comment: I think that works to solve the problem that I pointed out. In my stack overflow question (http://stackoverflow.com/a/43926058/748858) it has been pointed out that there are other opportunities for weirdness here. Specifically, if if I skip processing 2 group

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

2017-05-12 Thread Ben Finney
Ben Finney added the comment: > if you upload a patch generated from your branch here, someone else will > create the github PR so we can get it processed. The branch has several commits. I have generated the patches, and am now uploading them as a tarball. It may be easier to simply merge fr

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

2017-05-12 Thread Brian May
Brian May added the comment: I have already created such a pull requests. It is bidirectionally linked to this ticket. However concerns have been raised that the automatic bot hasn't recognised that Ben Finney has signed the CLA. Hence it appears the pull request might be rejected. Sure ther