[issue19121] Documentation guidelines enhancements

2013-10-05 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue16195] Difficult or impossible to figure out how garbage collector and weak references should interact for user-defined extension types

2013-10-05 Thread Stefan Behnel
Stefan Behnel added the comment: Just as a quick update here: Cython has since then switched to only using PyObject_ClearWeakRefs() and otherwise leaves the handling of the weakref slot to CPython. -- ___ Python tracker

[issue19169] random.py : simple tidying

2013-10-05 Thread CliffM
New submission from CliffM: Standardising some name-shortening in the _randbelow() method. -- components: Extension Modules files: shorten.patch keywords: patch messages: 198984 nosy: CliffM priority: normal severity: normal status: open title: random.py : simple tidying type: enhancemen

[issue19121] Documentation guidelines enhancements

2013-10-05 Thread CliffM
CliffM added the comment: Improving documentation is a fine aim. However, finding the correct balance between reference, tuition and precis (i.e. overview) is tricky. I would like to see more documentation laid out with the code and tests. This at least binds the examples with running code.

[issue19169] random.py : simple tidying

2013-10-05 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +mark.dickinson, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue19170] telnetlib: use selectors

2013-10-05 Thread Charles-François Natali
New submission from Charles-François Natali: The patch attached uses selector in telnetlib. This removes a lot of duplicated code. -- components: Library (Lib) files: telnetlib_selectors.diff keywords: needs review, patch messages: 198986 nosy: neologix priority: normal severity: normal

[issue19129] 6.2.1. Regular Expression Syntax flags

2013-10-05 Thread Santosh Kumar
Changes by Santosh Kumar : -- keywords: +patch Added file: http://bugs.python.org/file31963/re_u.patch ___ Python tracker ___ ___ Pyth

[issue19171] pow() improvement on longs

2013-10-05 Thread Armin Rigo
New submission from Armin Rigo: The attached patch (which can be applied on both trunk and 2.7) gives a huge speed improvement for the case 'pow(huge_number, smallish_number, smallish_number)'. The improvement is unbounded: I get 20x with 'pow(x, y, z)' with the arguments 'x = 3 ** 1, y =

[issue19172] selectors: add keys() method

2013-10-05 Thread Charles-François Natali
New submission from Charles-François Natali: This adds a keys() method to selectors, to return all the registered keys. It's useful, because one often needs to loop until all registered file objects have been unregistered e.g. (inspired from subprocess, see #18923): while selector.keys(): fo

[issue18923] Use the new selectors module in the subprocess module

2013-10-05 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a patch updating subprocess to use selectors. (It depends on the new keys() method - issue #19172.) -- dependencies: +selectors: add keys() method keywords: +needs review, patch nosy: +neologix stage: -> patch review Added file: http://b

[issue19171] pow() improvement on longs

2013-10-05 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue19172] selectors: add keys() method

2013-10-05 Thread STINNER Victor
STINNER Victor added the comment: If you want to unregister while iterating on .keys(), just copy .keys(), as I do when removing items from a list or a dict while iterating on it. -- ___ Python tracker

[issue19171] pow() improvement on longs

2013-10-05 Thread Tim Peters
Tim Peters added the comment: Good idea! The patch looks almost ready to me: the comment block before the code block should be updated, since recomputing `base` is no longer being done _just_ to force `base` to a non-negative value. -- nosy: +tim.peters stage: -> patch review _

[issue19171] pow() improvement on longs

2013-10-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- type: -> performance versions: -Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue19173] Expose Queue maxsize parameter to multiprocessing.Pool class

2013-10-05 Thread noxdafox
New submission from noxdafox: As a developer I want the multiprocessing Pool class to expose the internal queue size limit in order to better control the task flow in my application. Consider the following scenarios: 1. The tasks I want to run into the pool require a considerably big amount of

[issue19173] Expose Queue maxsize parameter to multiprocessing.Pool class

2013-10-05 Thread noxdafox
noxdafox added the comment: Please ignore the first provided patch, doc changes where wrong -- Added file: http://bugs.python.org/file31968/maxqueuesize.patch ___ Python tracker

[issue19172] selectors: add keys() method

2013-10-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed it's easy enough to call list() or set() on the result if you need it. On the other hand, the problem with returning a dict view is that it makes the return type dependent on an implementation detail. Returning a simple iterator would be great, except t

[issue19171] pow() improvement on longs

2013-10-05 Thread Tim Peters
Tim Peters added the comment: A bit of history: last time I fiddled that code, I didn't worry about this, because for large enough exponents all internal numbers _eventually_ become less than `base`. But the patch can speed up the _startup_ costs by an arbitrary amount (for smaller exponents

[issue19171] pow() improvement on longs

2013-10-05 Thread Tim Peters
Tim Peters added the comment: Grr: should be: "all internal numbers _eventually_ become less than `modulus`", not "less than `base`". -- ___ Python tracker ___ ___

[issue19174] Add range to future_builtins

2013-10-05 Thread Peter
New submission from Peter: Much like how iterator style filter, map and zip are available via future_builtins (issue #2171), it would be natural to expect range to be there too, e.g. >>> from future_builtins import range >>> range(5) range(0, 5) The 2to3 fixers would need to be modified in th

[issue19087] bytearray front-slicing not optimized

2013-10-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 499a96611baa by Antoine Pitrou in branch 'default': Issue #19087: Improve bytearray allocation in order to allow cheap popping of data at the front (slice deletion). http://hg.python.org/cpython/rev/499a96611baa -- nosy: +python-dev __

[issue19172] selectors: add keys() method

2013-10-05 Thread STINNER Victor
STINNER Victor added the comment: Using .keys() to test if the selector is empty is surprising. To test if a str, list, tuple, dict, set, ..., is empty: if container: is enough. Or sometimes I write if len(container): ... Selector has no length? -- ___

[issue19087] bytearray front-slicing not optimized

2013-10-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: The commit produced compiled errors on Windows, but I've since fixed them. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue19173] Expose Queue maxsize parameter to multiprocessing.Pool class

2013-10-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.o

[issue19170] telnetlib: use selectors

2013-10-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +jackdied ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue19087] bytearray front-slicing not optimized

2013-10-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Side effect of this change is that bytearray's data now can be non-aligned. We should examine all places which relies on this. -- ___ Python tracker

[issue19087] bytearray front-slicing not optimized

2013-10-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Side effect of this change is that bytearray's data now can be > non-aligned. We should examine all places which relies on this. The C API makes no guarantees as to alignment of private data areas, so any external code relying on it would be incorrect. The re

[issue19171] pow() improvement on longs

2013-10-05 Thread Tim Peters
Tim Peters added the comment: New patch changes the comments to match the new code. -- Added file: http://bugs.python.org/file31969/pow.diff ___ Python tracker ___ __

[issue19060] docs: note that subprocess doesn't replace os.exec*

2013-10-05 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti stage: -> needs patch type: -> enhancement ___ Python tracker ___ ___ Python-bugs-l

[issue19068] Some built-in complex docstrings are not PEP-8 compatible

2013-10-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 54213ef5bb19 by Ezio Melotti in branch '3.3': #19068: use imperative mood in complex object docstrings. Patch by Marco Buttu. http://hg.python.org/cpython/rev/54213ef5bb19 New changeset c1abbeae5c8a by Ezio Melotti in branch 'default': #19068: merg

[issue19067] Built-in range docstrings are not PEP-8 compatible

2013-10-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5135a431f7b3 by Ezio Melotti in branch '3.3': #19067: use imperative mood in range object docstrings. Patch by Marco Buttu. http://hg.python.org/cpython/rev/5135a431f7b3 New changeset b2c752eff474 by Ezio Melotti in branch 'default': #19067: merge

[issue19067] Built-in range docstrings are not PEP-8 compatible

2013-10-05 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the patch! -- assignee: docs@python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue19068] Some built-in complex docstrings are not PEP-8 compatible

2013-10-05 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the patch! -- assignee: docs@python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.4 -Python 3.2 ___ Pyth

[issue19069] Built-in float docstrings are not PEP-8 compatible

2013-10-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset ca8e75190402 by Ezio Melotti in branch '2.7': #19069: use imperative mood in float object docstrings. Patch by Marco Buttu. http://hg.python.org/cpython/rev/ca8e75190402 New changeset 563074ace473 by Ezio Melotti in branch '3.3': #19069: use impera

[issue19069] Built-in float docstrings are not PEP-8 compatible

2013-10-05 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the patch! -- assignee: docs@python -> ezio.melotti nosy: +ezio.melotti resolution: duplicate -> fixed stage: -> committed/rejected versions: +Python 2.7, Python 3.4 -Python 3.2 ___ Python tracker

[issue19170] telnetlib: use selectors

2013-10-05 Thread Charles-François Natali
Charles-François Natali added the comment: Here's an updated patch (the previous one mistakenly removed a testcase). -- Added file: http://bugs.python.org/file31970/telnetlib_selectors-1.diff ___ Python tracker ___

[issue19074] Add PySide to GUI FAQ

2013-10-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset eddd46b5691a by Ezio Melotti in branch '2.7': #19074: mention PySide in the GUI FAQs. http://hg.python.org/cpython/rev/eddd46b5691a -- nosy: +python-dev ___ Python tracker

[issue19074] Add PySide to GUI FAQ

2013-10-05 Thread Ezio Melotti
Ezio Melotti added the comment: I backported the relevant text from ccfb5ba50a44. -- assignee: docs@python -> ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: -> enhancement versions: -Python 3.3, Python 3.4 _

[issue19172] selectors: add keys() method

2013-10-05 Thread Charles-François Natali
Charles-François Natali added the comment: > If you want to unregister while iterating on .keys(), just copy .keys(), as > I do when removing items from a list or a dict while iterating on it. Of course, but as noted by Antoine, it makes the return type dependent of an implementation detail (I d

[issue19171] pow() improvement on longs

2013-10-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset f34c59494420 by Tim Peters in branch '3.3': Issue #19171: speed some cases of 3-argument long pow(). http://hg.python.org/cpython/rev/f34c59494420 New changeset 6fcdd1657ee3 by Tim Peters in branch 'default': Issue #19171: speed some cases of 3-ar

[issue19171] pow() improvement on longs

2013-10-05 Thread Tim Peters
Changes by Tim Peters : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-10-05 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti versions: +Python 3.4 -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue19024] Document asterisk (*), splat or star operator

2013-10-05 Thread Ezio Melotti
Ezio Melotti added the comment: > 223 people + me out of 1422 disagree with you both. Note that those votes doesn't necessarily mean "I didn't know about the feature" -- they might mean "I find this feature useful/I like this feature". Features like decorators have even more votes and I don't

[issue19174] Add range to future_builtins

2013-10-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: This would have been a good idea, but that ship has sailed. The API for Python 2.7 is now set in stone. Sorry. -- nosy: +rhettinger resolution: -> rejected status: open -> closed ___ Python tracker

[issue19055] Regular expressions: * does not match as many repetitions as possible.

2013-10-05 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: -> docs@python components: +Documentation keywords: +easy nosy: +docs@python stage: -> needs patch type: behavior -> enhancement ___ Python tracker _

[issue19169] random.py : simple tidying

2013-10-05 Thread Ezio Melotti
Ezio Melotti added the comment: I'm not sure I understand the comment about the "overridden random() method" that was introduced in 770c3ec05685, but unless something unusual is happening there I think the patch looks OK (the first comment is a bit redundant, and the empty line added in the la

[issue19169] random.py : simple tidying

2013-10-05 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue19169] random.py : simple tidying

2013-10-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1f51867fe50e by Raymond Hettinger in branch 'default': Issue #19169: Micro refactoring with a micro benefit for brevity and speed. http://hg.python.org/cpython/rev/1f51867fe50e -- nosy: +python-dev ___ P

[issue19169] random.py : simple tidying

2013-10-05 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-10-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: I think the "Do not supply the 'int' argument" covers it well enough. This code has been around for a very long time and isn't causing any problems. -- status: open -> closed ___ Python tracker

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-10-05 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hi Raymond, Ezio provided some comments on improvements to the patch. Do you mind if Ezio or I take over task of improvement. Not cause problems != no need to improve. TIA. -- ___ Python tracker

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-10-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think there is an actual problem here to be solved. -- ___ Python tracker ___ ___ Python-

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-10-05 Thread Tim Peters
Tim Peters added the comment: I'm old, but I liked the docs better when they didn't mention "the int argument" at all. The "int=int" - or "_int=int" - argument is a CPython implementation detail. It has nothing to do with the API. And _of course_ users shouldn't mess with implementation det

[issue19169] random.py : simple tidying

2013-10-05 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: -> committed/rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-10-05 Thread Christopher Smith
Christopher Smith added the comment: I probably wouldn't have noticed it except I was working more intensely with the different random methods and saw that randrange had the note about not supplying the 'int' argument and shuffle (though it had the same sort of argument) did *not* have the commen

[issue19175] Erroneous reference to "integer" in format string grammar

2013-10-05 Thread David Chambers
New submission from David Chambers: I first raised this issue on Stack Overflow: http://stackoverflow.com/questions/19203194 The [replacement field grammar][1] states that an [integer][2] is a valid field_name, but this is inaccurate: >>> '{0}'.format('zero') 'zero' >>> '{0x0}.for

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-10-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset b1e94e332ec8 by Raymond Hettinger in branch '2.7': Issue 14927: Minor clean-up of function parameters in random(). http://hg.python.org/cpython/rev/b1e94e332ec8 -- ___ Python tracker

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-10-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Py3.3: http://hg.python.org/cpython/rev/0899960835f5 Py3.4: http://hg.python.org/cpython/rev/8494d2c8ef54 -- ___ Python tracker ___ _

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-10-05 Thread Christopher Smith
Christopher Smith added the comment: In 3.3 and 3.4 I would just change the shuffle arg from `int=int` to `_int=int` and delete the comment in docstring regarding not supplying the value. (In both you *removed* the argument and internally added `_int=int`.) Note that (as far as I can see) in 3.3

[issue17618] base85 encoding

2013-10-05 Thread Jason Stokes
Jason Stokes added the comment: What issues are there with the implementation as it stands? I am happy to contribute (as I need to code a base36 implementation myself, and it's basically the same work) but it looks like the existing implementation is fine, except possibly some people don't lik

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-10-05 Thread Roundup Robot
Roundup Robot added the comment: New changeset 50ea4dccb03e by Raymond Hettinger in branch '3.3': Issue 14927: Remove a docstring line that is no longer applicable. http://hg.python.org/cpython/rev/50ea4dccb03e -- ___ Python tracker

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-10-05 Thread Raymond Hettinger
Raymond Hettinger added the comment: Christopher, this tracker item needs to die. It is wasting everyone's time (and churning code) over nothing. FYI, I moved the _int=int for shuffle inside the function because the assignment was outside of the inner loop, so we weren't getting any real ben

[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2013-10-05 Thread Martin Panter
New submission from Martin Panter: I am using the C version of Element Tree via the main ElementTree module. I have subclassed XMLParser, and created my own target object. I am not that interested in XML doctypes, but the following simplified code raises a DeprecationWarning: $ python3.3 -Wal

[issue14927] add "Do not supply 'int' argument" to random.shuffle docstring

2013-10-05 Thread Christopher Smith
Christopher Smith added the comment: On Sun, Oct 6, 2013 at 12:14 AM, Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > Christopher, this tracker item needs to die. It is wasting everyone's > time (and churning code) over nothing. > > but it's not quite dead yet... > FYI, I

[issue19175] Erroneous reference to "integer" in format string grammar

2013-10-05 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: docs@python -> eric.smith nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing

[issue19175] Erroneous reference to "integer" in format string grammar

2013-10-05 Thread Georg Brandl
Georg Brandl added the comment: The bug is that "integer" links to the "integer" production in the Python grammar. This shouldn't happen; I'll have a look on the Sphinx side. As a workaround, "integer" can be replaced by "digit+" as requested (it occurs twice). -- nosy: +georg.brandl

[issue3982] support .format for bytes

2013-10-05 Thread Stendec
Changes by Stendec : -- nosy: +stendec ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/m

[issue11176] give more meaningful argument names in argparse documentation

2013-10-05 Thread Georg Brandl
Georg Brandl added the comment: > Also see this e-mail to docs@: > http://mail.python.org/pipermail/docs/2012-December/012028.html No, please don't see this e-mail. It's not worth it. The poster clearly has no clue whatsoever about either a) common placeholders, or b) manners. I don't want t