[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 _

[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] 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).

[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 ___ ___

[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

[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

[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

[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 ___ __

[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

[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 ___ ___

[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 _

[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

[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

[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

[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

[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/msg209143 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[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

[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

[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 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 _

[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

[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

[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: 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

[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
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 ___

[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

[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

[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

[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

[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

[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

[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: How about this? I'm going to do a rollup patch today with three fixes: this, #20381, and changing the default filename for the "file" destination. -- Added file: http://bugs.python.org/file33693/larry.clinic.rollup.jan.24.diff.1.txt _

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: How about this? I'm going to do a rollup patch today with three fixes: this, #20385, and changing the default filename for the "file" destination. -- Added file: http://bugs.python.org/file33692/larry.clinic.rollup.jan.24.diff.1.txt _

[issue20386] socket.SocketType is different in Python 3.4

2014-01-24 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': Python 2.7 >>> import socket >>> socket.SocketType >>> s = socket.socket() >>> isinstance(s, socket.SocketType) True >>> Python 3.4 >>> socket.SocketType >>> s = socket.socket() >>> isinstance(s, socket.SocketType) False >>> SocketType was already p

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: It's considered bad form to catch Exception. We should catch the minimum necessary. If there are exceptions we forgot, people will complain and then we'll add those. Also, I want to make sure (if possible) that the value round-trips correctly through eval a

[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-24 Thread Tal Einat
Tal Einat added the comment: +1 for that as well, I've written quite a few self converters for that reason. -- ___ Python tracker ___

[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: Way ahead of you. The "class" directive will have to change: class name typedef type_object On the other hand, this means that Argument Clinic can automatically give the right type to the default self converter. So most people won't have to write custom

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Zachary Ware
Zachary Ware added the comment: How does this one strike you? Somewhat reversed logic compared to the first patch, but with this one we get either success or a nicely formatted fail message, no more tracebacks. -- Added file: http://bugs.python.org/file33691/issue20381.v2.diff __

[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-24 Thread Tal Einat
Tal Einat added the comment: Great. Most of the classes in itertools could use this. BTW, you'll need to supply a way to supply the C name of the type, to use in the type check. -- ___ Python tracker

[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: I think it's a bug that they don't do the subclass check. In practice, nobody subclasses range and itertools.tee. But they should probably still be fixed. -- ___ Python tracker

[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-24 Thread Tal Einat
Tal Einat added the comment: In general, that sounds like a reasonable suggestion to me. A quick search shows that most classes that call _PyArg_NoKeywords check the type first. I think we should strive for uniformity in this respect, so I'm +1 for your suggestion. I do see some classes which

[issue20379] help(bound_builtin_class) does not display self

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: Huh. So inspect.getfullargspec is the code ignoring whether or not a function is bound. Well, help(x) should be consistent, whether x is a bound builtin class instance or a bound Python class instance. Right now it isn't; it displays the "self" for the Pyth

[issue20209] Deprecate PROTOCOL_SSLv2

2014-01-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue20209] Deprecate PROTOCOL_SSLv2

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: I agree. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: How about I add the "if type == " checks as per #1486663? -- ___ Python tracker ___ ___ Python-bugs-

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: Let's not catch Exception there. Does catching NameError make the problem go away? And, #20189 changed the rules for simple expressions. Now names you want from the local module should not have the name of the module in front. You wouldn't have to do this

[issue20385] Argument Clinic: Support for __new__ not checking _PyArg_NoKeywords for sub-classes

2014-01-24 Thread Tal Einat
New submission from Tal Einat: To quote issue20294 where Larry Hastings added AC support for __new__ and __init__: " * __init__ and __new__ always take kwargs. * if the function signature doesn't accept keyword arguments, it calls _PyArg_NoKeywords(). " However, due to issue1486663, many

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Zachary Ware
Zachary Ware added the comment: Removing 'winreg.' gives the very similar traceback: Error in file "PC\winreg.c" on line 1351: Exception raised during parsing: Traceback (most recent call last): File "Tools\clinic\clinic.py", line 1541, in parse parser.parse(block) File "Tools\clinic\cli

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: Remove the winreg. On Jan 24, 2014 8:02 AM, Zachary Ware wrote: > > > New submission from Zachary Ware: > > The fix for #20189 broke simple expression defaults.  Specifically, with the > latest #20172 patch applied, Clinic fails on winreg.c at winreg line 135

[issue20379] help(bound_builtin_class) does not display self

2014-01-24 Thread Zachary Ware
Zachary Ware added the comment: I don't think there's any danger of changing inspect.Signature's behavior here; it's doing the right thing. What we're concerned with here is just making sure that the output of 'help(some_kind_of_method)' is equivalent to the output of 'help(some_kind_of_metho

[issue20384] os.open() exception doesn't contain file name on Windows

2014-01-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- title: open() exception doesn't contain file name on Windows -> os.open() exception doesn't contain file name on Windows ___ Python tracker ___

[issue20384] open() exception doesn't contain file name on Windows

2014-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, thank you. It is alredy fixed in 38a50d8102be (thanks Arfrever). -- ___ Python tracker ___ __

[issue20384] open() exception doesn't contain file name on Windows

2014-01-24 Thread Mark Lawrence
Mark Lawrence added the comment: I think there's a typo in the patch, test = 'xxx' but after the check for platform and mode, text = ''. -- ___ Python tracker ___ __

[issue20384] open() exception doesn't contain file name on Windows

2014-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 69d885ac042d by Serhiy Storchaka in branch '3.3': Issue #20384: Fix the test_tarfile test on Windows. http://hg.python.org/cpython/rev/69d885ac042d -- nosy: +python-dev ___ Python tracker

[issue20384] open() exception doesn't contain file name on Windows

2014-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, here is os.open() raises an exception. Thank you Mark. On Linux it raises an exception with file name. >>> import os; os.open('non-existing', os.O_RDONLY | getattr(os, 'O_BINARY', >>> 0), 0x666) Traceback (most recent call last): File "", line 1, in F

[issue20378] Implement `Signature.__repr__`

2014-01-24 Thread Ram Rachum
Ram Rachum added the comment: My impression is that the `__repr__` method of any object is intended to describe that object, hopefully in a succinct way, possibly in a REPL-friendly way (like `list.__repr__` for example) but if not then at least human-friendly. This is for easy introspection.

[issue20384] open() exception doesn't contain file name on Windows

2014-01-24 Thread Mark Lawrence
Mark Lawrence added the comment: Two attempts, one with the pipe "|" symbol in the mode, one without. >>> import tarfile; tarfile.open('non-existing', 'r|') Traceback (most recent call last): File "", line 1, in File "C:\Python33\lib\tarfile.py", line 1594, in open stream = _Stream(name

[issue20378] Implement `Signature.__repr__`

2014-01-24 Thread Terry J. Reedy
New submission from Terry J. Reedy: Signature.__repr__ already exits. It is inherited from object. So you must be proposing to override the inherited method. For what purpose? With what outcome? Without reading the signature PEP, I believe the current difference between str and repr is intenti

[issue20384] open() exception doesn't contain file name on Windows

2014-01-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +brian.curtin, tim.golden ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20384] open() exception doesn't contain file name on Windows

2014-01-24 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- components: +Windows ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue20384] open() exception doesn't contain file name on Windows

2014-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Mark, could you please try following commands? import tarfile; tarfile.open('non-existing', 'r|') -- ___ Python tracker ___ _

[issue20384] open() exception doesn't contain file name on Windows

2014-01-24 Thread Mark Lawrence
Mark Lawrence added the comment: Not on my system, so what's changed? Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:18:40) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> open('non-existing', 'rb') Traceback (most recent call

[issue20384] open() exception doesn't contain file name on Windows

2014-01-24 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: On Linux for 2.7, 3.3 and 3.4 the open of non-existing file raises an exception which contains file name. Python 2.7: >>> open('non-existing', 'rb') Traceback (most recent call last): File "", line 1, in IOError: [Errno 2] No such file or directory: 'no

[issue20379] help(bound_builtin_class) does not display self

2014-01-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: What matters to other programs is what the inspect functions return, not what help() does or does not do to the returned string before displaying it. So I see the issue as the discrepancy in this. class C: def foo(self, a): pass c = C() import inspect pr

[issue20209] Deprecate PROTOCOL_SSLv2

2014-01-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the insight. Then I suggest to close this issue as postponed or rejected. -- ___ Python tracker ___

[issue20209] Deprecate PROTOCOL_SSLv2

2014-01-24 Thread Derek Wilson
Derek Wilson added the comment: sslv2 should not be deprecated yet. in the field of security research it is highly valuable to locate servers that are still using sslv2 because it is a security risk. i'm fine with making it not used by default, but there is no reason to remove the capability

[issue19077] More robust TemporaryDirectory cleanup

2014-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here are updated patches for 3.3 and 3.4. Changed tests for 3.4, a patch for 3.3 is changed more. Unfortunately in 3.3 exceptions still can be raised when try to emit a warning during shutdown. Is there any way to determine the shutdown mode? -- Add

[issue20376] Argument Clinic: backslashes in docstrings are not escaped

2014-01-24 Thread Zachary Ware
Zachary Ware added the comment: This should do it, correct? -- keywords: +patch nosy: +zach.ware Added file: http://bugs.python.org/file33688/issue20376.diff ___ Python tracker _

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Zachary Ware
Zachary Ware added the comment: This also prevents a vanilla trunk build (as of 85710aa396ef) from succeeding at 'Tools/clinic/clinic.py --make': Error in file ".\Modules\_sre.c" on line 574: Unsupported expression as default value: 'sys.maxsize' I think the only reasonable check we can do is

[issue20367] concurrent.futures.as_completed() fails when given duplicate Futures

2014-01-24 Thread Glenn Langford
Glenn Langford added the comment: Thanks for the feedback. The new patch is modified for PEP8 with naming consistent with other concurrent tests. assertEqual I think is clearer by checking list length, so it is not changed. The docstring is updated. I suggest asyncio be handled separately. --

[issue20382] Typo in cStringIO tp_name

2014-01-24 Thread STINNER Victor
STINNER Victor added the comment: I don't think that it is a typo. cStringIO.StringIO(str) returns a "StringI" object, whereas cStringIO.StringIO() returns a "StringO" object. $ python Python 2.7.5 (default, Nov 12 2013, 16:45:54) [GCC 4.8.2 20131017 (Red Hat 4.8.2-1)] on linux2 Type "help", "

[issue20383] Add a keyword-only spec argument to types.ModuleType

2014-01-24 Thread Brett Cannon
New submission from Brett Cannon: Would allow for the name attribute to be optional since it can be grabbed from the spec. Since having module.__spec__ set is now expected we should help ensure that by supporting it in the constructor. -- components: Library (Lib) messages: 209100 nosy

[issue20382] Typo in cStringIO tp_name

2014-01-24 Thread mailination
New submission from mailination: python/Modules/cStringIO.c:648 "cStringIO.StringI",/*tp_name*/ maybe Should be "cStringIO.StringIO",/*tp_name*/ -- components: Library (Lib) messages: 209099 nosy: mailination priority: normal severit

[issue20374] Failure to compile with readline-6.3-rc1

2014-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5e42e5764ac6 by Benjamin Peterson in branch '2.7': new plan: just remove typecasts (closes #20374) http://hg.python.org/cpython/rev/5e42e5764ac6 New changeset fc62fcd8e990 by Benjamin Peterson in branch '3.3': new plan: just remove typecasts (closes

[issue20374] Failure to compile with readline-6.3-rc1

2014-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > With your patch, _readline.so again builds correctly. Yes, this is what I wanted to know. Sorry for the awkward formulation. Type casting is dangerous because it may hide the signature mismatch, which can cause problems later in run time. It is better to r

[issue20374] Failure to compile with readline-6.3-rc1

2014-01-24 Thread Benjamin Peterson
Benjamin Peterson added the comment: Okay then. Off we go. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue20374] Failure to compile with readline-6.3-rc1

2014-01-24 Thread Ned Deily
Ned Deily added the comment: Serhiy, I'm not sure I understand your question. libedit includes a GNU readline compatibility layer and that is what _readline.so builds and links with on OS X systems (with an ABI of 10.5 and later) since OS X does not ship with GNU readline. This is also the c

[issue20381] Argument Clinic: expression default arguments broken

2014-01-24 Thread Zachary Ware
New submission from Zachary Ware: The fix for #20189 broke simple expression defaults. Specifically, with the latest #20172 patch applied, Clinic fails on winreg.c at winreg line 1351 with this traceback: Error in file "PC\winreg.c" on line 1351: Exception raised during parsing: Traceback (mo

[issue20367] concurrent.futures.as_completed() fails when given duplicate Futures

2014-01-24 Thread STINNER Victor
STINNER Victor added the comment: Hum, you should also modify the documentation to explicit the behaviour. Example: "Duplicates futures are only yielded once". You may add the same sentence in the asyncio.as_completed() documentation. It looks like asyncio tests doesn't test as_completed() with

[issue20260] Argument Clinic: add unsigned integers converters

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: I can start citing data points if you like. socket.if_indextoname just calls PyLong_AsUnsignedLong(). Not sure what that throws. -- ___ Python tracker __

[issue20367] concurrent.futures.as_completed() fails when given duplicate Futures

2014-01-24 Thread Glenn Langford
Glenn Langford added the comment: > Could you please try to write a unit test. Revised patch with unit test for as_completed(). -- Added file: http://bugs.python.org/file33685/issue20367.patch ___ Python tracker _

[issue20355] -W command line options should have higher priority than PYTHONWARNINGS environmental variable

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: Okay, then yes, let's save this for 3.5. Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue20355] -W command line options should have higher priority than PYTHONWARNINGS environmental variable

2014-01-24 Thread Brett Cannon
Brett Cannon added the comment: I agree with Antoine; this can wait for Python 3.5. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue20380] __defaults__ changed by *args

2014-01-24 Thread Ram Rachum
Ram Rachum added the comment: My mistake. Thanks for the clarification. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue20380] __defaults__ changed by *args

2014-01-24 Thread Ram Rachum
Ram Rachum added the comment: Though perhaps a note in the documentation would be helpful for future confused people. -- ___ Python tracker ___ _

[issue20380] __defaults__ changed by *args

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: That's because in f, y is after *args, so it is a keyword-only parameter. Its default value is in __kwdefaults__. If you move y to before *args, its default will be in __defaults__. This is working as designed. -- nosy: +larry resolution: -> invali

[issue20380] __defaults__ changed by *args

2014-01-24 Thread Ram Rachum
New submission from Ram Rachum: Check the following example out. Putting *args in a function makes its __defaults__ be empty. Python 3.4.0b2 (v3.4.0b2:ba32913eb13e, Jan 5 2014, 16:13:26) [MSC v.1600 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more inf

[issue20367] concurrent.futures.as_completed() fails when given duplicate Futures

2014-01-24 Thread STINNER Victor
STINNER Victor added the comment: > Proposed patch for as_completed(). Could you please try to write a unit test. The unit test should fail without the patch, and fail with the patch. Then create a new patch including the patch. If it's tricky to write a reliable test reproducing the race cond

[issue20367] concurrent.futures.as_completed() fails when given duplicate Futures

2014-01-24 Thread Glenn Langford
Glenn Langford added the comment: Proposed patch for as_completed(). #20369 fixes wait(), and behaviour is consistent between the two. -- keywords: +patch Added file: http://bugs.python.org/file33684/issue20367.patch ___ Python tracker

[issue20223] inspect.signature does not support new functools.partialmethod

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: The patch from #20189 has landed. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue17481] inspect.getfullargspec should use __signature__

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: The patch from #20189 has landed. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue20189] inspect.Signature doesn't recognize all builtin types

2014-01-24 Thread Roundup Robot
Roundup Robot added the comment: New changeset 85710aa396ef by Larry Hastings in branch 'default': Issue #20189: Four additional builtin types (PyTypeObject, http://hg.python.org/cpython/rev/85710aa396ef -- nosy: +python-dev ___ Python tracker

[issue20189] inspect.Signature doesn't recognize all builtin types

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: Phew! Thanks again, everybody! -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___

[issue20379] help(bound_builtin_class) does not display self

2014-01-24 Thread Larry Hastings
New submission from Larry Hastings: For an object O that are bound to something (either a class or an instance), help(O) traditionally shows the bound argument. For this code: class C: def foo(self, a): pass c = C() help(c.foo) would show the signature as "(self, a)", even t

[issue20378] Implement `Signature.__repr__`

2014-01-24 Thread Ram Rachum
Changes by Ram Rachum : -- components: Library (Lib) nosy: cool-RR priority: normal severity: normal status: open title: Implement `Signature.__repr__` versions: Python 3.5 ___ Python tracker __

[issue17481] inspect.getfullargspec should use __signature__

2014-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: Another case of "don't land it until Larry has dealt with the builtins". The patch itself looks fine, though :) -- dependencies: +inspect.Signature doesn't recognize all builtin types ___ Python tracker

[issue20189] inspect.Signature doesn't recognize all builtin types

2014-01-24 Thread Larry Hastings
Larry Hastings added the comment: I just realized, I forgot to fix the bug Zach reported, where help(bound_thing) should still show the class or self parameter. I'm going to check this in anyway, and file a fresh bug on myself to address that. -- ___

[issue20189] inspect.Signature doesn't recognize all builtin types

2014-01-24 Thread Nick Coghlan
Nick Coghlan added the comment: There are probably still ways to do it, but we don't *support* doing it (and I'm pretty sure we've fixed them all in the builtins and stdlib). However, yes, that's another good reason to be conservative in only doing the split into signature+doc at attribute loo

  1   2   >