[issue20330] PEP 342 is outdated

2014-01-25 Thread Nick Coghlan
Nick Coghlan added the comment: David is correct, most PEPs are historical records of design decisions that cease to be updated once completed. The language reference is the normative guide for current behaviour. The exception is "informational" and "process" PEPs, which cover things that are

[issue20317] ExitStack hang if enough nested exceptions

2014-01-25 Thread Nick Coghlan
Changes by Nick Coghlan : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___ Pyt

[issue20075] help(open) eats first line

2014-01-25 Thread Nick Coghlan
Changes by Nick Coghlan : -- dependencies: +Argument Clinic should use a non-error-prone syntax to mark text signatures ___ Python tracker ___ __

[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Georg Brandl
Georg Brandl added the comment: Since the test is still failing on at least 3 stable buildbots, I've reverted the 3.3 changes for 3.3.4rc1. -- nosy: +georg.brandl ___ Python tracker ___

[issue20264] Update patchcheck to looks for files with clinic comments

2014-01-25 Thread Nick Coghlan
Nick Coghlan added the comment: Having clinic work like reindent on "make patchcheck" would be very nice. As a second line of defence, we should also have a server side equivalent of the whitespace check as a repo hook in Mercurial (i.e. don't allow a push when clinic output is out of date).

[issue20388] Argument Clinic generates wrong signature for module level functions

2014-01-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Argument Clinic generates wrong signature for module level functions. For example for the following declaration /*[clinic input] binascii.a2b_uu ascii: ascii_buffer / Decode a line of uuencoded data. [clinic start generated code]*/ Argument Clini

[issue20151] Derby: Convert the binascii module to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Argument Clinic generates wrong signature for module level functions ___ Python tracker ___ _

[issue20388] Argument Clinic generates wrong signature for module level functions

2014-01-25 Thread Zachary Ware
Zachary Ware added the comment: That's by design (of #20189); inspect.Signature.from_builtin strips out the 'module' param. -- nosy: +zach.ware resolution: -> invalid status: open -> pending ___ Python tracker __

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

2014-01-25 Thread Tal Einat
Tal Einat added the comment: I've found two bugs: 1) In the type check, a '&' needs to be added before the type name. 2) Setting template_dict['self_type_object'] fails for module functions -- ___ Python tracker _

[issue20388] Argument Clinic generates wrong signature for module level functions

2014-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What if function already has the "module" parameter? E.g. _warnings.warn_explicit. -- status: pending -> open ___ Python tracker ___

[issue20151] Derby: Convert the binascii module to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Argument Clinic: backslashes in docstrings are not escaped ___ Python tracker ___ ___

[issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords

2014-01-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- priority: normal -> high ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

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

2014-01-25 Thread Tal Einat
Tal Einat added the comment: Also, I believe the the type of the first argument passed to a method is a pointer to the typedef object, so a '*' needs to be added after the typedef name wherever it is used in such functions. -- ___ Python tracker

[issue20388] Argument Clinic doesn't handle module level functions with module parameter well

2014-01-25 Thread Zachary Ware
Zachary Ware added the comment: Ahh, that is a good point, though the real problem with that is in compilation rather than the Python signature. I believe there's a fix in the works, somewhere in Larry's to-do list. _winapi also has a function that takes a 'module' parameter, though being un

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

2014-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- assignee: -> zach.ware stage: -> commit review ___ Python tracker ___ ___ Python-bugs-l

[issue20151] Derby: Convert the binascii module to use Argument Clinic

2014-01-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 21f8abfe459a by Serhiy Storchaka in branch 'default': Issue #20151: The binascii module now uses Argument Clinic. http://hg.python.org/cpython/rev/21f8abfe459a -- nosy: +python-dev ___ Python tracker

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

2014-01-25 Thread Zachary Ware
Zachary Ware added the comment: Done! -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ __

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

2014-01-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 381c9d592cc8 by Zachary Ware in branch 'default': Issue #20376: Argument Clinic now escapes backslashes in docstrings. http://hg.python.org/cpython/rev/381c9d592cc8 -- nosy: +python-dev ___ Python tracker

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

2014-01-25 Thread Tal Einat
Tal Einat added the comment: My last comment was wrong. There is a bug regarding the first argument to new methods; It should just remain a PyTypeObject*. -- ___ Python tracker

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

2014-01-25 Thread Larry Hastings
Larry Hastings added the comment: 1) That's not a bug, that's the API. If you used the dynamic API to create a type it wouldn't take the &. So I can't guess in advance what type it is, nor can I assume I always add the &. 2) Will fix. -- ___ Pyth

[issue20388] Argument Clinic doesn't handle module level functions with module parameter well

2014-01-25 Thread Larry Hastings
Larry Hastings added the comment: If you use a self converter you can name your first parameter anything you like. -- ___ Python tracker ___ _

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

2014-01-25 Thread Nick Coghlan
Nick Coghlan added the comment: Attached patch shows the new test case I'm using to ensure that all callable builtins have signatures, and once we get it that way, it stays that way. Preliminary goal is signatures for all the non-type objects, and once I get to that point, I'll propose it for

[issue20151] Derby: Convert the binascii module to use Argument Clinic

2014-01-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 76a3cc6f3aca by Serhiy Storchaka in branch 'default': Fixed converting errors in the binascii module (issue20151). http://hg.python.org/cpython/rev/76a3cc6f3aca -- ___ Python tracker

[issue20133] Derby: Convert the audioop module to use Argument Clinic

2014-01-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset d4099b8a7d0f by Serhiy Storchaka in branch 'default': Issue #20133: The audioop module now uses Argument Clinic. http://hg.python.org/cpython/rev/d4099b8a7d0f -- nosy: +python-dev ___ Python tracker

[issue20151] Derby: Convert the binascii module to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: -Argument Clinic doesn't handle module level functions with module parameter well resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue20133] Derby: Convert the audioop module to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue20388] Argument Clinic doesn't handle module level functions with module parameter well

2014-01-25 Thread Larry Hastings
Larry Hastings added the comment: So, are you still claiming there's a bug here? Or can we close this? -- ___ Python tracker ___ ___

[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0a3e02251bd6 by Serhiy Storchaka in branch 'default': Issue #20193: The _bz2 module now uses Argument Clinic. http://hg.python.org/cpython/rev/0a3e02251bd6 -- nosy: +python-dev ___ Python tracker

[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Nadeem. In committed patch fixed the docstring for BZ2Compressor.__init__, and renamed module name "bz2" in clinic declaration is renamed to "_bz2". Here is updated patch for the _lzma module which addresses Nadeem's comment and renames the "lzma"

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

2014-01-25 Thread Larry Hastings
Larry Hastings added the comment: The logic of the patch is hard to follow. However, it's still examining the size of args, and now it's examining the size of kwargs, and behaving differently based on these sizes is exactly what I don't want. I've attached an example patch of how I would chan

[issue20348] Argument Clinic HOWTO listed multiple times in HOWTO index

2014-01-25 Thread Larry Hastings
Larry Hastings added the comment: You should only put one line of equals signs? I'll try to remember that in the future. LGTM. Shall I commit it? -- ___ Python tracker ___ __

[issue20346] Argument Clinic: missing entry in table mapping legacy convertors to real AC converters

2014-01-25 Thread Larry Hastings
Larry Hastings added the comment: If two issues are created on the tracker for the same issue, surely it's the *older* issue that is preserved, and the new one marked as duplicate and closed? -- ___ Python tracker

[issue20388] Argument Clinic doesn't handle module level functions with module parameter well

2014-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, if originally reported behavior is by design, and there is other open issue for the "module" parameter, we can close this. -- ___ Python tracker __

[issue20388] Argument Clinic doesn't handle module level functions with module parameter well

2014-01-25 Thread Larry Hastings
Changes by Larry Hastings : -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7ba9642fc800 by Serhiy Storchaka in branch 'default': Issue #20193: The _lzma module now uses Argument Clinic. http://hg.python.org/cpython/rev/7ba9642fc800 -- ___ Python tracker

[issue20346] Argument Clinic: missing entry in table mapping legacy convertors to real AC converters

2014-01-25 Thread Georg Brandl
Georg Brandl added the comment: Only if the older issue actually has more relevant content, which is not always the case. -- nosy: +georg.brandl ___ Python tracker ___ _

[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch for _lzma was applied without converting LZMACompressor.__init__. Here is a patch for zlib, which doesn't use neither optional groups, nor "unspecified" defaults. Three builtins, decompress(), decompressobj() and Decompress.flush() are left not conver

[issue20389] clarify meaning of xbar and mu in pvariance/variance of statistics module

2014-01-25 Thread Julian Taylor
New submission from Julian Taylor: the pvariance and variance functions take the argument mu and xbar to pass the population and sample mean to avoid some recomputation. I assume the keyword arguments are different because the two means accepted are different, but the docstring does not indica

[issue20389] clarify meaning of xbar and mu in pvariance/variance of statistics module

2014-01-25 Thread Julian Taylor
Julian Taylor added the comment: xbar is the *sample* mean of course maybe with proper docstrings the two functions could also use the same keyword argument? -- ___ Python tracker

[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, previous patch didn't contain generated file. -- Added file: http://bugs.python.org/file33700/zlib_clinic_2.patch ___ Python tracker __

[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file33699/zlib_clinic_2.patch ___ Python tracker ___ ___ Python-bugs-list m

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

2014-01-25 Thread Mark Lawrence
Mark Lawrence added the comment: msg209063 from Larry states "My concern is that itertools.repeat doesn't parse its arguments like other Python functions." From my viewpoint the only long term option is to bring repeat (and other functions that you may have found exhibiting this behaviour dur

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

2014-01-25 Thread Larry Hastings
Larry Hastings added the comment: I think you've understood it. The problem is, in order to deprecate the behavior, we first must provide the new behavior. (That's official policy, in PEP 5.) It's untenable to say "you'll have to stop using 'times=-1' in the future, but you can't use 'times

[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 900a1ff323bb by Victor Stinner in branch '3.3': Issue #20311: Revert 033137c12d88, select.epoll.poll() rounds again the timeout http://hg.python.org/cpython/rev/900a1ff323bb New changeset caab3e191485 by Victor Stinner in branch 'default': (Merge 3.

[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 90354a4c9dde by Victor Stinner in branch 'default': Issue #20311: Revert e042ea77a152 and 7ce7295393c2, PollSelector.select() and http://hg.python.org/cpython/rev/90354a4c9dde -- ___ Python tracker

[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3b8a2281d323 by Victor Stinner in branch 'default': Issue #20311: selectors: Add a resolution attribute to BaseSelector. http://hg.python.org/cpython/rev/3b8a2281d323 New changeset 4bc550c66228 by Victor Stinner in branch 'default': Issue #20311: as

[issue20320] select.select(timeout) and select.kqueue.control(timeout) must round the timeout to the upper bound

2014-01-25 Thread STINNER Victor
STINNER Victor added the comment: I reverted my changes on poll and epoll: the kernel may "round" the timeout differently because it uses a different clock, so Python cannot guarantee that it will wait "at least" timeout seconds. My initial concern was a performance issue in asyncio, I fixed t

[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread STINNER Victor
STINNER Victor added the comment: I revert all changes in select an selectors, the timeout is rounded again towards zero, as it was before. I applied my asyncio_granularity.patch: - selectors.BaseSelector has a new abstract "resolution" property - asyncio.BaseEventLoop has a new granularity att

[issue20325] Argument Clinic: self converters are not preserved when cloning functions

2014-01-25 Thread Larry Hastings
Larry Hastings added the comment: You didn't give me a test case, and I can't reproduce this. Either it was accidentally fixed already, or there's something else going on in your test case. I'm closing this for now as unreproducable. If you see the problem again, please reopen this issue.

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

2014-01-25 Thread Nick Coghlan
Nick Coghlan added the comment: More comprehensive patch uploaded - all the non-type callables implemented in bltinmodule.c have been converted or classified with a reason for not being converted yet (see the new test in test_inspect.py for details, as well as the AC 3.4 and AC 3.5 comments in

[issue20348] Argument Clinic HOWTO listed multiple times in HOWTO index

2014-01-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1eec62cf3675 by Ezio Melotti in branch 'default': #20348: fix headers markup in Argument Clinic howto. Patch by Moritz Neeb. http://hg.python.org/cpython/rev/1eec62cf3675 -- nosy: +python-dev ___ Python

[issue20348] Argument Clinic HOWTO listed multiple times in HOWTO index

2014-01-25 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the patch! -- assignee: larry -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement ___ Python tracker

[issue20390] Argument Clinic rollup patch, 2014/01/25

2014-01-25 Thread Larry Hastings
New submission from Larry Hastings: Rollup patch with a bunch of small fixes in it. Can I get a quick turnaround review on this? I'd like it to go in before today's beta is cut. Definitely the core change has to go in, but that's uncontroversial. Core: * _PyType_GetDocFromInternalDoc()

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

2014-01-25 Thread Larry Hastings
Larry Hastings added the comment: The bug you cited is fixed in today's rollup patch, #20390. (I don't know how to denote the dependency between the two issues, maybe someone else can do that for me?) -- ___ Python tracker

[issue20231] Argument Clinic accepts no-default args after default args

2014-01-25 Thread Larry Hastings
Larry Hastings added the comment: The bug you cited is fixed in today's rollup patch, #20390. (I don't know how to denote the dependency between the two issues, maybe someone else can do that for me?) -- ___ Python tracker

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

2014-01-25 Thread Mark Lawrence
Mark Lawrence added the comment: >From a user perspective the docs say this "itertools.repeat(object[, times]) - >Make an iterator that returns object over and over again. Runs indefinitely >unless the times argument is specified." So to me the use of "Times=None" in >the "equivalent to" sect

[issue20390] Argument Clinic rollup patch, 2014/01/25

2014-01-25 Thread Nick Coghlan
Nick Coghlan added the comment: LGTM, but I'm not familiar with Clinic's own code... -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue19023] ctypes docs: Unimplemented and undocumented features

2014-01-25 Thread Adam Knight
Adam Knight added the comment: Can someone add this in? What needs to be done to make it happen? Kind of need this for a project I'm working on... -- nosy: +ahknight ___ Python tracker ___

[issue20325] Argument Clinic: self converters are not preserved when cloning functions

2014-01-25 Thread Tal Einat
Tal Einat added the comment: You're right, this issue does indeed seem to have been resolved since I created this issue. I just checked this on Objects/bytesobject.c with the latest version and get the desired output. So you've done right to close this issue. I'd like to note that I most cert

[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Charles-François Natali
Charles-François Natali added the comment: > If the patch is accepted, my changes on Python 3.3 should also be reverted. I'm sorry, but I'm not convinced. The selector's granularity is an implementation detail, and I don't think it should be exposed. Furthermore, it's not a mere function of the

[issue20325] Argument Clinic: self converters are not preserved when cloning functions

2014-01-25 Thread Larry Hastings
Larry Hastings added the comment: You didn't supply a test case, nor is there any code checked in that reproduced the issue. I had to make a test case by hand. -- ___ Python tracker __

[issue20391] windows python launcher should support explicit 64-bit version

2014-01-25 Thread Thomas Heller
New submission from Thomas Heller: The windows python launcher supports the '-3.3' resp. '-3.3-32' command line switches to ask for 'the best 3.3' version resp. 'the 32-bit 3.3' version, but does not support a '-3.3-64' switch to explicitely request the 64-bit version of Python. I suggest tha

[issue20331] Fix various fd leaks

2014-01-25 Thread Charles-François Natali
Charles-François Natali added the comment: LGTM. -- nosy: +neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue20390] Argument Clinic rollup patch, 2014/01/25

2014-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Don't forget to use "hg mv" to rename existing side files. -- ___ Python tracker ___ ___ Python-bu

[issue20331] Fix various fd leaks

2014-01-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20392] Inconsistency with uppercase file extensions in MimeTypes.guess_type

2014-01-25 Thread Rodrigo Parra
New submission from Rodrigo Parra: The functions looks up for the file extension in three maps: types_map, suffix_map and encodings_map. Lookup in types_map is case insensitive (by calling lower() first). Lookup in both suffix_map and encodings_map is case sensitive. These can lead to some see

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

2014-01-25 Thread Tal Einat
Tal Einat added the comment: I'm still seeing the first argument to a __new__ function as "groupbyobject *" instead of "PyTypeObject *". This causes the following error (for example): ./Modules/itertoolsmodule.c:112:34: error: no member named 'tp_alloc' in 'groupbyobject' gbo = (groupbyobj

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

2014-01-25 Thread Tal Einat
Tal Einat added the comment: To clarify my previous comment, I was referring to the first argument passed to the generated 'impl' function. Context: I'm attempting to convert 'itertools.groupby' in Modules/itertoolsmodule.c. -- ___ Python tracker

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

2014-01-25 Thread Tal Einat
Tal Einat added the comment: Also, I'm seeing this in the generated code for __new__ methods: if (({self_name} == {self_type_object}) && -- ___ Python tracker ___ __

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

2014-01-25 Thread Tal Einat
Tal Einat added the comment: To make reproducing these bugs easier, I'm attaching my partially converted version of Modules/itertoolsmodules.c, which has the buggy generated code inside. "Partially converted" means that I've only converted some of the functions requiring conversion. This file

[issue20331] Fix various fd leaks

2014-01-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6548f894b590 by Serhiy Storchaka in branch '2.7': Issue #20331: Fixed possible FD leaks in various modules: http://hg.python.org/cpython/rev/6548f894b590 New changeset 2766320bdb10 by Serhiy Storchaka in branch '3.3': Issue #20331: Fixed possible FD

[issue20331] Fix various fd leaks

2014-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Charles-François. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ _

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

2014-01-25 Thread Ned Deily
Ned Deily added the comment: FYI, removing the cast causes the following new warnings when compiling 3.3 with gcc-4.2 on OS X 10.5 and 10.6 (haven't checked elsewhere): Modules/readline.c: In function 'setup_readline': Modules/readline.c:939: warning: assignment from incompatible pointer type M

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

2014-01-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: It doesn't complain on Linux. I suppose if we don't want any warnings, we'd have to do something like the originally proposed patch. -- ___ Python tracker _

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

2014-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm surprised that warnings are emitted at lines 939 and 941, but not 944. I think that instead type casting, the more robust way is to change hook functions signatures for on_startup_hook and on_pre_input_hook. static int #ifdef _RL_FUNCTION_TYPEDEF /* or m

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

2014-01-25 Thread Nikolaus Rath
Nikolaus Rath added the comment: Let me be more precise: My suggestion is not to remove `unconsumed_tail` entirely, but I think its value needs to be defined only when the end of the compressed stream has been reached. In other words, you could still do: while not decomp.eof # ... if deco

[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2014-01-25 Thread Jon Parise
Changes by Jon Parise : -- nosy: -jon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/m

[issue20283] Wrong keyword parameter name in regex pattern methods

2014-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is patch for 3.3 which adds alternative parameter name. Now both keyword names are allowed, but deprecation warning is emitted if old keyword name is used. >>> import re >>> p = re.compile('') >>> p.match() Traceback (most recent call last): File "",

[issue20390] Argument Clinic rollup patch, 2014/01/25

2014-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: _PyType_GetDocFromInternalDoc and _PyType_GetTextSignatureFromInternalDoc declarations are too long. could you please wrap them around? First parameter of class methods (e.g. dict.fromkeys) now has a type of object (PyDictObject *) instead of PyTypeObject *

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

2014-01-25 Thread Ethan Furman
Ethan Furman added the comment: Here's a patch for the test. -- Added file: http://bugs.python.org/file33706/issue20386.stoneleaf.test.patch.01 ___ Python tracker ___ ___

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

2014-01-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > Please find a better name for the type enum and document the new enums. Why should new enums be documented and how are they useful? IMO socket module adopted enum module only to provide a better representation of AF_* and SOCK_* constants on repr(), which

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

2014-01-25 Thread Georg Brandl
Georg Brandl added the comment: > Why should new enums be documented and how are they useful? Because they are a new public class(-like object) in the module. When renaming them to a non-public name, as you suggest, that could be left out. -- ___ Py

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

2014-01-25 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: But as a user when are you gonna need to use AddressFamily container? Before enum we didn't have something like: AddressFamily = (AF_INET, AF_INET6, ...) Basically because we didn't need it. Sorry if I'm missing something here. -- _

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

2014-01-25 Thread Georg Brandl
Georg Brandl added the comment: I'm not saying the enums are necessary (argue about that with Eli), but that if they *are* in the module as a public attribute, they *have* to be documented, period. -- ___ Python tracker

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

2014-01-25 Thread Ethan Furman
Ethan Furman added the comment: Complete patch with new test, fixed tests, and regression fix. Doc patch still needed. -- stage: test needed -> patch review Added file: http://bugs.python.org/file33707/issue20386.stoneleaf.patch.02 ___ Python tracker

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

2014-01-25 Thread Ethan Furman
Ethan Furman added the comment: The containers are there to help with discoverability. If you want to know what all the (common) AF values are you can either do [name for name in dir(socket) if name.isupper() and name.startswith('AF_')] or list(socket.AddressFamily) --

[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread STINNER Victor
STINNER Victor added the comment: Hi, 2014-01-25 Charles-François Natali : > I'm sorry, but I'm not convinced. > The selector's granularity is an implementation detail, and I don't think > it should be exposed. I disagre, it's not a detail because it causes bugs, knowing the resolution matters.

[issue20393] Docs: mark deprecated items in the TOC

2014-01-25 Thread Zearin
New submission from Zearin: When exploring the docs for the standard library, it’s frustrating to have an idea and look for the answer only to find out that an entire module (or package) has been deprecated _after_ I click on it. Can we have links to deprecated items on the Standard Library’s

[issue20393] Docs: mark deprecated items in the TOC

2014-01-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

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

2014-01-25 Thread Eli Bendersky
Eli Bendersky added the comment: Yep, the overriding of the type name was inadvertent. Nothing sacred about it, so Ethan's SocketKind is just as good. -- ___ Python tracker ___

[issue20369] concurrent.futures.wait() blocks forever when given duplicate Futures

2014-01-25 Thread Glenn Langford
Glenn Langford added the comment: Updated patch with a test case, and added a minor note to the docstring to clarify behaviour. The use of sleep() in the test is not great, but it is the most obvious way to test and it is consistent with the approach used in other concurrent test cases. -

[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch for zlib reverts reverted decompress(), decompressobj() and Decompress.flush(). It get rids from DEF_WBITS and use MAX_WBITS instead, exposes DEF_BUF_SIZE (former DEFAULTALLOC) to Python level. -- Added file: http://bugs.python.org/file

[issue20193] Derby: Convert the zlib, _bz2 and _lzma modules to use Argument Clinic

2014-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I suppose that zdict=b'' have same effect as not specifying zdict. Am I right? -- ___ Python tracker ___ _

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

2014-01-25 Thread Ethan Furman
Ethan Furman added the comment: How do we feel about SockType instead? (Just a short round of bike-shedding, promise! ;) -- ___ Python tracker ___ _

[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Charles-François Natali
Charles-François Natali added the comment: > > Once again, what's wrong with your initial approach of ceiling the timeout? > > It looks like changing the rounding method doesn't solve anything. > selector.select(timeout) may still take less than timeout, so it > doesn't give any guarantee. But w

[issue19944] Make importlib.find_spec load packages as needed

2014-01-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 665f1ba77b57 by Eric Snow in branch 'default': Issue 19944: Fix importlib.find_spec() so it imports parents as needed. http://hg.python.org/cpython/rev/665f1ba77b57 -- nosy: +python-dev ___ Python tracker

[issue19944] Make importlib.find_spec load packages as needed

2014-01-25 Thread Eric Snow
Changes by Eric Snow : -- resolution: -> fixed stage: -> committed/rejected status: open -> pending type: -> enhancement ___ Python tracker ___ ___

[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Eric Snow
Eric Snow added the comment: Looks like 3b8a2281d323aa9abf497192b01cf906b98ed3d8 broke the buildbots. e.g. http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/1533 -- nosy: +eric.snow ___ Python tracker

[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Eric Snow
Eric Snow added the comment: FYI: on my local box I saw only the 2 failed tests in test_telnetlib. -- ___ Python tracker ___ ___ Pytho

[issue20311] epoll.poll(timeout) and PollSelector.select(timeout) must round the timeout to the upper bound

2014-01-25 Thread Eric Snow
Eric Snow added the comment: A better example: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.0%203.x/builds/1538 -- ___ Python tracker ___ ___

  1   2   >