[issue20387] tokenize/untokenize roundtrip fails with tabs

2014-01-24 Thread Jason R. Coombs
New submission from Jason R. Coombs: Consider this simple unit test: def test_tokenize(): input = "if False:\n\tx=3\n\ty=3\n" g = list(generate_tokens(io.StringIO(input).readline)) assert untokenize(g) == input According to the docs, untokenize guarantees the output equals the input

[issue20387] tokenize/untokenize roundtrip fails with tabs

2014-01-24 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue20379] help(bound_builtin_class) does not display self

2014-01-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: I fully agree that help(bound method) should be consistent. I just feel that it should be consistently correct ;-). Help(ob) is intended for interactive use (Guido has said, but feel free to ask again), and indeed, is an optional interactive feature, and not a

[issue1243678] httplib gzip support

2014-01-24 Thread Buck Golemon
Buck Golemon added the comment: I believe this issue is still extant. The tip httplib client neither sends accept-encoding gzip nor supports content-encoding gzip. http://hg.python.org/cpython/file/tip/Lib/http/client.py#l1012 There is a diff to httplib in this attached patch, where there was

[issue6626] show Python mimetypes module some love

2014-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: Note that I still believe there are substantial improvements that could be made without a wholesale rewrite of the module that poses significant backwards compatibility risks (just improving the documentation regarding how the list of types is populated could li

[issue17481] inspect.getfullargspec should use __signature__

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: There's a major difference between getfullargspec/getargspec and inspect.signature: getfullargspec shows you the "self" parameter for bound methods, and inspect.signature does not. >>> class C: ...def foo(self, a): pass ... >>> c = C() >>> >>> import ins

[issue20379] help(instance_of_builtin_class.method) does not display self

2014-01-24 Thread Larry Hastings
Changes by Larry Hastings : -- title: help(bound_builtin_class) does not display self -> help(instance_of_builtin_class.method) does not display self ___ Python tracker ___

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Zachary Ware
Zachary Ware added the comment: This will still cause issue in _sre.c; repr(sys.maxsize) == '9223372036854775807' != 'sys.maxsize'. Yes, it's bad form to throw the net too wide, but for anything other than NameError, we fail out in the next block anyway. My (second) patch just makes for nice

[issue20379] help(instance_of_builtin_class.method) does not display self

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: Yeah, that's a good approach. By the way, I'm definitely going to check for "unspecified" there. Serhiy was using that to try and trick Argument Clinic into having optional parameters without default values. It didn't actually work--and indeed it would never

[issue20379] help(instance_of_builtin_class.method) does not display self

2014-01-24 Thread Zachary Ware
Zachary Ware added the comment: Larry, was that message meant for #20381? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue20379] help(instance_of_builtin_class.method) does not display self

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: Yup! Second time I've done that this week! -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: Yeah, that's a good approach. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Zachary Ware
Zachary Ware added the comment: Here's a patch with my last suggestion, and the check for unspecified. -- Added file: http://bugs.python.org/file33694/issue20381.v3.diff ___ Python tracker _

[issue19081] zipimport behaves badly when the zip file changes while the process is running

2014-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: I dunno Brett - have you read the extension module import code and the zipimport code lately? I don't think I'll be willing to claim to fully understand even the default importers until we've rewritten those as PEP 451 compliant Python code with a couple of esse

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 93afa651e074 by Zachary Ware in branch 'default': Issue #20381: Fix sanity checking on default arguments when c_default is http://hg.python.org/cpython/rev/93afa651e074 -- nosy: +python-dev ___ Python tra

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Zachary Ware
Zachary Ware added the comment: Done, thanks for the review! -- assignee: larry -> zach.ware resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker

[issue20379] help(instance_of_builtin_class.method) does not display self

2014-01-24 Thread Zachary Ware
Changes by Zachary Ware : -- Removed message: http://bugs.python.org/msg209143 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue20379] help(instance_of_builtin_class.method) does not display self

2014-01-24 Thread Zachary Ware
Changes by Zachary Ware : -- Removed message: http://bugs.python.org/msg209145 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue20379] help(instance_of_builtin_class.method) does not display self

2014-01-24 Thread Zachary Ware
Changes by Zachary Ware : -- Removed message: http://bugs.python.org/msg209144 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue15955] gzip, bz2, lzma: add option to limit output size

2014-01-24 Thread Nikolaus Rath
Nikolaus Rath added the comment: Is there any reason why unconsumed_tail needs to be exposted? I would suggest to instead introduce a boolean attribute data_ready than indicates that more decompressed data can be provided without additional compressed input. Example: # decomp = decompressor

[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2014-01-24 Thread Vajrasky Kok
Vajrasky Kok added the comment: Larry said, "It behaves differently depending on whether "times" is passed by position or by keyword." And that is the bug. It should be the same no matter whether we send times through positional or keyword. As Raymond has said earlier in this thread, "The pre

[issue20177] Derby #8: Convert 28 sites to Argument Clinic across 2 files

2014-01-24 Thread Nikolaus Rath
Nikolaus Rath added the comment: (I already sent this to python-dev, but maybe it makes more sense to have these thoughts together with the patch) After looking at the conversion of parse_time_t_args again, I think I lost track of what we're actually gaining with this procedure. If all we need

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think we should specify globals (=sys.modules) and locals (=module.__dict__) arguments to eval. -- nosy: +serhiy.storchaka ___ Python tracker _

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Hmm, no, we shouldn't use sys.modules, it's content is depended on modules used in Argument Clinic. -- ___ Python tracker ___ ___

[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)

2014-01-24 Thread Zachary Ware
Changes by Zachary Ware : Added file: http://bugs.python.org/file33695/24b1121e7d48.diff ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue20172] Derby #3: Convert 67 sites to Argument Clinic across 4 files (Windows)

2014-01-24 Thread Zachary Ware
Zachary Ware added the comment: Ok, v5 should be ready to go in, so long as you don't see anything scary. -- ___ Python tracker ___ __

[issue19145] Inconsistent behaviour in itertools.repeat when using negative times

2014-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Vajrasky's last patch (v3) in general LGTM. I'm not sure about documentation changes, sample Python implementation is only a demonstration, it shouldn't be exact equivalent. -- ___ Python tracker

[issue20386] Missing docs for SocketType and AddressFamily in socket module

2014-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: Because that's the way enums work (http://docs.python.org/dev/library/enum): >>> import socket >>> list(socket.SocketType) [, , , , , , ] >>> list(socket.AddressFamily) [, , , , , , , , , , , , , , , , , , , , , , , , , , , ] Marking as a docs issue

[issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files

2014-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: I'm going to specifically tackle the "bltinmodule" side of things using a test driven approach: adding a new test to test_inspect that checks all the builtin names have signatures (I'll explicitly exclude ones that are known not to be handled, like range and sli

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: Right. So my advice is: only use local symbols and symbols in preloaded modules. -- ___ Python tracker ___ ___

[issue20386] Missing docs for SocketType and AddressFamily in socket module

2014-01-24 Thread Georg Brandl
Georg Brandl added the comment: Um... changing the name "socket.SocketType" from type(socket) to an enum of SOCK_ constants is not a docs issue, but a regression. Eli, you introduced this change (inadvertently, I think, which can easily happen since SocketType is imported by "*" from _socket).

[issue20386] Missing docs for SocketType and AddressFamily in socket module

2014-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: Sorry, I misread Giampaolo's example as indicating that socket.SocketType wasn't there at all in Python 3.3. However, it's there, and with the same name as in Python 2, so I agree this is a regression. I suggest socket.SocketKind as an alternate name for the enu

[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

2014-01-24 Thread Nick Coghlan
Changes by Nick Coghlan : -- title: Missing docs for SocketType and AddressFamily in socket module -> socket.SocketType enum overwrites import of _socket.SocketType ___ Python tracker _

<    1   2