[issue18301] In itertools.chain.from_iterable() there is no cls argument

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

[issue18301] In itertools.chain.from_iterable() there is no cls argument

2013-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 29fa1f418796 by Raymond Hettinger in branch '3.3': Issue 18301: The classmethod decorator didn't fit well with the rough-equivalent example code. http://hg.python.org/cpython/rev/29fa1f418796 -- nosy: +python-dev _

[issue18980] Docs: enum - ReST format

2013-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0e05b07a6f84 by Ethan Furman in branch 'default': Close #18980: Enum doc fixes. Patch from Elazar Gershuni. http://hg.python.org/cpython/rev/0e05b07a6f84 -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open

[issue18943] argparse: default args in mutually exclusive groups

2013-09-08 Thread paul j3
paul j3 added the comment: At the very least the `is not action.default` needs to be changed. Else where in argparse `is` is only used with `None` or constant like `SUPPRESS`. So using it with a user defined parameter is definitely not a good idea. Possible variations on how `is` behaves acr

[issue18752] Make chain.from_iterable an alias for a new chain_iterable.

2013-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset fa1fa88b685b by Raymond Hettinger in branch 'default': Issue 18752: Make chain.from_iterable() more visible in the documentation. http://hg.python.org/cpython/rev/fa1fa88b685b -- nosy: +python-dev ___ Py

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-08 Thread bruno Piguet
Changes by bruno Piguet : -- versions: +Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue18752] Make chain.from_iterable an alias for a new chain_iterable.

2013-09-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll work on improving the docs to make this classmethod more discoverable in docs, but the API is going to stay the same. -- resolution: -> rejected ___ Python tracker __

[issue18980] Docs: enum - ReST format

2013-09-08 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2013-09-08 Thread STINNER Victor
STINNER Victor added the comment: I would prefer a clear_frames() method on the traceback object rather than a function. -- ___ Python tracker ___ _

[issue18929] inspect.classify_class_attrs ignores metaclass

2013-09-08 Thread Ethan Furman
Ethan Furman added the comment: This is a more useful help() -- patch attached. == Help on class Color in module __main__: class Color(enum.Enum) | Method resolution order: | Color | enum.Enum | buil

[issue18752] Make chain.from_iterable an alias for a new chain_iterable.

2013-09-08 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue18983] Specify time unit for timeit CLI

2013-09-08 Thread Jakub Stasiak
Jakub Stasiak added the comment: My 2 cents - I'd split timeit.main function into processing part and argument parsing + data printing part so that you could use Python to call the first one to get the actual results (timings, numbers of loops etc.) and then present the data to the outside wor

[issue18800] Document Fraction's numerator and denominator properties

2013-09-08 Thread Madison May
Madison May added the comment: Simple and to the point. Sounds good to me... -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue18903] IDLE file-completion is case-sensitive in Windows

2013-09-08 Thread Westley Martínez
Westley Martínez added the comment: My example was totally abstract and untested. Sorry for any confusion. After doing some research, I find that this issue is complicated further: http://support.microsoft.com/kb/100625 I think we can assume that running into a situation where there are identi

[issue18984] Remove .stopped Event from Thread internals

2013-09-08 Thread Tim Peters
Changes by Tim Peters : -- Removed message: http://bugs.python.org/msg197342 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue18984] Remove .stopped Event from Thread internals

2013-09-08 Thread Tim Peters
Tim Peters added the comment: New changeset aff959a3ba13 by Tim Peters in branch 'default': Issue 18984: Remove ._stopped Event from Thread internals. http://hg.python.org/cpython/rev/aff959a3ba13 -- ___ Python tracker

[issue18984] Remove .stopped Event from Thread internals

2013-09-08 Thread Tim Peters
Tim Peters added the comment: Thanks, Antoine! I pushed this change, figuring that even if some buildbots are still unhappy about 18808, getting rid of the Event can't make them more unhappy, and may make them happier. -- resolution: -> fixed ___

[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2013-09-08 Thread A.M. Kuchling
A.M. Kuchling added the comment: Revised version of the patch: catches RuntimeError instead of skipping the first frame; adds versionadded tag; adds entry to NEWS and whatsnew files. -- Added file: http://bugs.python.org/file31692/clear-tb-frames-2.txt _

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset aff959a3ba13 by Tim Peters in branch 'default': Issue 18984: Remove ._stopped Event from Thread internals. http://hg.python.org/cpython/rev/aff959a3ba13 -- ___ Python tracker

[issue18984] Remove .stopped Event from Thread internals

2013-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset aff959a3ba13 by Tim Peters in branch 'default': Issue 18984: Remove ._stopped Event from Thread internals. http://hg.python.org/cpython/rev/aff959a3ba13 -- nosy: +python-dev ___ Python tracker

[issue18943] argparse: default args in mutually exclusive groups

2013-09-08 Thread paul j3
paul j3 added the comment: This `argument_values` comes from `_get_values()`. Most of the time is derived from the `argument_strings`. But in a few cases it is set to `action.default`, specifically when the action is an optional postional with an empty `argument_strings`. test_argparse.Test

[issue18929] inspect.classify_class_attrs ignores metaclass

2013-09-08 Thread Ethan Furman
Ethan Furman added the comment: Antoine, to answer all your questions at once, and using an Enum as the example: --> dir(Color) ['__class__', '__doc__', '__members__', '__module__', 'blue', 'green', 'red'] --> Color.__members__ mappingproxy(OrderedDict([('red', ), ('green', ), ('blue', )])) -

[issue12317] inspect.getabsfile() is not documented

2013-09-08 Thread Brett Cannon
Brett Cannon added the comment: It technically doesn't need to be a dependency, but if __file__ goes absolute then the point of the function becomes moot and thus shouldn't get documented as it is then pointless (and honestly I don't trust any code that tries to guess at what the cwd was when

[issue18983] Specify time unit for timeit CLI

2013-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: If you want the output to be machine readable, better go the full way and add a --json option, IMO. -- nosy: +pitrou, tim.peters ___ Python tracker ___

[issue12317] inspect.getabsfile() is not documented

2013-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: This shouldn't be a dependency. The function is already implemented, it just needs to be documented. -- dependencies: -Move to absolute file paths for module.__file__ nosy: +pitrou ___ Python tracker

[issue18903] IDLE file-completion is case-sensitive in Windows

2013-09-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: The initial difficulty I am having is that the edit menu, help file, code, and behavior do not seem to match up, so this whole feature set needs more review. For one thing, the AutoCompleteWindow (ACW) often comes up empty initially. Sometimes it fills in a co

[issue12317] inspect.getabsfile() is not documented

2013-09-08 Thread Brett Cannon
Changes by Brett Cannon : -- dependencies: +Move to absolute file paths for module.__file__ ___ Python tracker ___ ___ Python-bugs-lis

[issue18984] Remove .stopped Event from Thread internals

2013-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think the fix is simply to remove the outdated tests. I've been running test_threading in a loop with the (attached) updated patch, and there hasn't been a single failure. -- type: -> resource usage Added file: http://bugs.python.org/file31691/remov

[issue18967] Find a less conflict prone approach to Misc/NEWS

2013-09-08 Thread Nick Coghlan
Nick Coghlan added the comment: No, way down in Tests. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue18984] Remove .stopped Event from Thread internals

2013-09-08 Thread Tim Peters
Tim Peters added the comment: I agree with your diagnosis. Unfortunately, I can't test the fork stuff. Well, OK, I actually think that's fortunate (for me ;-) ). If you can see a quick way to fix these, please do. I'm going to vanish for about 2 hours now. -- _

[issue18984] Remove .stopped Event from Thread internals

2013-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks like it's mostly the tests trying to check an implementation detail that doesn't exist anymore :-) -- ___ Python tracker ___

[issue18984] Remove .stopped Event from Thread internals

2013-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hmm.. I'm getting the following failures: == FAIL: test_4_joining_across_fork_in_worker_thread (test.test_threading.ThreadJoinOnShutdown) ---

[issue18984] Remove .stopped Event from Thread internals

2013-09-08 Thread Tim Peters
Changes by Tim Peters : -- dependencies: +Thread.join returns before PyThreadState is destroyed ___ Python tracker ___ ___ Python-bugs

[issue18984] Remove .stopped Event from Thread internals

2013-09-08 Thread Tim Peters
New submission from Tim Peters: As discussed in issue 18808, now that we're checking for a tstate lock, the Thread._stopped Event has become an "attractive nuisance". The attached patch removes it. This simplifies .join() and .is_alive(), and restores pre-18808 .join(timeout) endcase behavio

[issue18815] DOCUMENTATION: "mmap .close()" doesn't close the underlying file

2013-09-08 Thread Anoop Thomas Mathew
Anoop Thomas Mathew added the comment: Made it explicit that close() will close only the mmap, and file will not be closed. Patch attached. -- keywords: +patch nosy: +Anoop.Thomas.Mathew Added file: http://bugs.python.org/file31689/mmap_close_documentation.patch ___

[issue12704] Language Reference: Clarify behaviour of yield when generator is not resumed

2013-09-08 Thread Nikolaus Rath
Nikolaus Rath added the comment: I've attached an updated patch. I agree with Tim that the docs on the yield expression are already very good, so instead of extending the yield statement documentation I have shortened it to instead reduce the overlap that already exists. In the yield expressi

[issue18983] Specify time unit for timeit CLI

2013-09-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Just an idea. Currently the timeit module in command line automatically choice most appropriate time unit for human readable output. But this makes the output less machine readable. I propose to add new option which specifies fixed time unit (usec, msec, s

[issue18973] Use argparse in the calendar module

2013-09-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good point. See issue18982. -- dependencies: +Add tests for CLI of the calendar module ___ Python tracker ___

[issue18982] Add tests for CLI of the calendar module

2013-09-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The proposed patch adds tests for command-line interface of the calendar module. It also makes calendar tests discoverable and makes some existing tests more strong. -- components: Tests files: test_calendar_cli.patch keywords: patch messages: 1973

[issue14984] netrc module allows read of non-secured .netrc file

2013-09-08 Thread bruno Piguet
bruno Piguet added the comment: I missed the 3.3 window, may I re-propose the same minimal patch against 3.4.0a1 ? I'm not sure I follow any python standard lib coding style but the general idea is quite simple and easy to get. I chose to ignore the backward compatibility concern, since I agre

[issue18981] Typo in the ctypes tests

2013-09-08 Thread Anoop Thomas Mathew
New submission from Anoop Thomas Mathew: Comment in the test_number.py in ctypes test hold a typo bug. Instead of superseeded, it should be superseded. Patch attached. -- assignee: docs@python components: Documentation, Tests files: ctypes_test_typo.patch keywords: patch messages: 19731

[issue18821] Add .lastitem attribute to takewhile instances

2013-09-08 Thread Oscar Benjamin
Oscar Benjamin added the comment: Thank you Claudiu very much for writing a patch; I was expecting to have to do that myself! Serhiy, you're right groupby is a better fit for this. It does mean a bit of reworking for the (more complicated) sum function I'm working on but I've just checked with t

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread R. David Murray
R. David Murray added the comment: I do not find a space to be an acceptable separator, sorry. -- ___ Python tracker ___ ___ Python-bu

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > So: > > 1 loops, best of 3: 34.6 usec per loop (28 870 loops/s) Looks fine to me (though having a decimal space at the right and not at the left looks a bit weird). -- ___ Python tracker

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Jakub Stasiak
Changes by Jakub Stasiak : Added file: http://bugs.python.org/file31684/timeit-v3-pep8.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Jakub Stasiak
Jakub Stasiak added the comment: To me the point of this patch is adding number of loops per second information - using thousands separators was just an addition which I'm happy to drop. Please find attached 2 patches: - one containing actual changes - loops per second added, fractional part is

[issue17862] itertools.chunks(iterable, size, fill=None)

2013-09-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: If this is to go forward, it needs to be more interesting, useful, and general than what was has been discussed so far. I would be open to some kind of reshape() itertool than can ungroup, flatten, and regroup in at least two dimensions. Ideally, it sho

[issue18980] Docs: enum - ReST format

2013-09-08 Thread Elazar Gershuni
New submission from Elazar Gershuni: in http://docs.python.org/3.4/library/enum.html : "..note: Nomenclature" and ".:meth:__format__" visible in the html. -- assignee: docs@python components: Documentation files: enum_minor.patch keywords: patch messages: 197312 nosy: docs@python, elaz

[issue18821] Add .lastitem attribute to takewhile instances

2013-09-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Oscar, the solution proposed by Serhiy looks like a better choice. I'm wary of increasing the API complexity of the itertools. Right now, their learnability is aided by having simple signatures and no side-values. The itertools are modeled on functional to

[issue18962] Add special case for single iterator in heapq.merge function

2013-09-08 Thread Raymond Hettinger
Changes by Raymond Hettinger : Removed file: http://bugs.python.org/file31671/merge.diff ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue18962] Add special case for single iterator in heapq.merge function

2013-09-08 Thread Raymond Hettinger
Changes by Raymond Hettinger : Added file: http://bugs.python.org/file31681/merge2.diff ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-09-08 Thread Tim Peters
Tim Peters added the comment: > The MainThread class could override is_alive() and join(), then. I think it will be easier than that, but we'll see ;-) -- ___ Python tracker ___

[issue17741] event-driven XML parser

2013-09-08 Thread Stefan Behnel
Stefan Behnel added the comment: While refactoring the iterparse() implementation in lxml to support this new interface, I noticed that the close() method of the XMLPullParser does not behave like the close() method of the XMLParser. Instead of setting some .root attribute on the parser instan

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Tim Peters
Tim Peters added the comment: -1 from me, and I'm a comma-loving American ;-) I'm sure lots of code in the wild parses this output - Serhiy isn't the only one doing it. -- ___ Python tracker _

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Without _stopped, join() can simply wait to acquire _tstate_lock (with > or without a timeout, and skipping this if _tstate_lock is already > None). Etc ;-) Of course details matter, but it's easy. I did it > once, but the tests joining the main thread faile

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-09-08 Thread Tim Peters
Tim Peters added the comment: Without _stopped, join() can simply wait to acquire _tstate_lock (with or without a timeout, and skipping this if _tstate_lock is already None). Etc ;-) Of course details matter, but it's easy. I did it once, but the tests joining the main thread failed and I p

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread R. David Murray
R. David Murray added the comment: I'm with Serhiy on this. So if separators are added, I would say they *must* be optional. Presumably if they are added they should be locale dependent :) All of which may well make it more complicated than it is worth. -- nosy: +r.david.murray ___

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > join() and is_alive() are too complicated now, because of the 2-step > dance to check whether the thread is done: we have both an Event > (_stopped) and a lock (_tstate_lock) to check now. The Event doesn't > serve a purpose anymore: it's almost always unint

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I'm afraid the adding any separators will make some people angry. With a comma or space it no more a valid number in Python and many other languages and can't be copy/pasted and parsed. Actually I sometimes use small shell scripts to run "python -m timeit" a

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-09-08 Thread Tim Peters
Tim Peters added the comment: Ah - the test used to do t.join(NUMTASKS)! That's just bizarre ;-) I believe I can repair that too (well - there was never a _guarantee_ that waiting 10 seconds would be long enough), but I'll wait until this all settles down. join() and is_alive() are too compl

[issue18973] Use argparse in the calendar module

2013-09-08 Thread R. David Murray
R. David Murray added the comment: I think it is highly inadvisable to make changes like this without also adding tests. We broke compileall by doing this even though we *did* add tests. -- nosy: +r.david.murray ___ Python tracker

[issue18606] Add statistics module to standard library

2013-09-08 Thread Guido van Rossum
Guido van Rossum added the comment: Nice docstrings, but those aren't automatically included in the Doc tree. -- ___ Python tracker ___ __

[issue18936] 2.7 distutils getopt chokes on unicode option names

2013-09-08 Thread Jason R. Coombs
Jason R. Coombs added the comment: oh. My mistake. I didn't realize the error was in 'distutils.fancy_getopt' and not in the getopt module itself. Indeed, the problem doesn't exist under getopt itself, so is specific to distutils and fancy_getopt. >>> from __future__ import unicode_literals >>

[issue18606] Add statistics module to standard library

2013-09-08 Thread Guido van Rossum
Guido van Rossum added the comment: Here's a combined patch. Hopefully it will code review properly. -- nosy: +gvanrossum Added file: http://bugs.python.org/file31680/statistics_combined.patch ___ Python tracker __

[issue18953] Typo in NEWS about fixed format specifiers for Py_ssize_t in debugging output in the _sre module

2013-09-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Vajrasky. Actually there was no need to open a new issue for such minor bug. You can report on the same issue which caused this bug. I'm afraid there are a lot of more grave syntax and grammatic errors in my Misc/NEWS entries. --

[issue18953] Typo in NEWS about fixed format specifiers for Py_ssize_t in debugging output in the _sre module

2013-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset c08e92529f62 by Serhiy Storchaka in branch '3.3': Fix a typo. (closes #18953) http://hg.python.org/cpython/rev/c08e92529f62 New changeset 9dc5bdab157e by Serhiy Storchaka in branch 'default': Fix a typo. (closes #18953) http://hg.python.org/cpython/

[issue18943] argparse: default args in mutually exclusive groups

2013-09-08 Thread Armin Rigo
Armin Rigo added the comment: Fwiw I agree with you :-) I'm just relaying a bug report that originates on PyPy (https://bugs.pypy.org/issue1595). -- ___ Python tracker ___

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le dimanche 08 septembre 2013 à 17:30 +, Tim Peters a écrit : > Really! In context, the test does: > > t.join() > self.assertTrue(not t.is_alive()) Ah, no, the failing test did `t.join(something)`. I removed the timeout to remove th

[issue18966] Threads within multiprocessing Process terminate early

2013-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: That's because multiprocessing exits child processes with os._exit(), not sys.exit(). The fix would be trivial (call threading._shutdown() before os._exit()), but I don't know if that's something we want to do. After all there are many things in the Python sh

[issue18964] test_tcl fails when _tkinter linked with Tcl 8.4

2013-09-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 03ee22236465 by Serhiy Storchaka in branch '3.3': Fixed tests with Tcl/Tk <8.5 (closes #18964). http://hg.python.org/cpython/rev/03ee22236465 New changeset 138e086e187d by Serhiy Storchaka in branch 'default': Fixed tests with Tcl/Tk <8.5 (closes #1

[issue18808] Thread.join returns before PyThreadState is destroyed

2013-09-08 Thread Tim Peters
Tim Peters added the comment: [Antoine] > Oh, I also get the following sporadic failure > which is triggered by slight change in semantics > with Thread.join(timeout) :-) > == > FAIL: test_various_ops (test.test_threading.ThreadT

[issue18943] argparse: default args in mutually exclusive groups

2013-09-08 Thread paul j3
paul j3 added the comment: I should add that defaults with required arguments (or groups?) doesn't make much sense. Still there's nothing in the code that prevents it. -- ___ Python tracker __

[issue18979] Use argparse in the uu module

2013-09-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Here is a patch which replaces optparse to argparse in the uu module. -- components: Demos and Tools, Library (Lib) files: uu_argparse.patch keywords: patch messages: 197289 nosy: bethard, serhiy.storchaka priority: normal severity: normal stage: pat

[issue18978] Allow urllib.request.Request subclasses to override method

2013-09-08 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've added tests to capture the new behavior. -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue18978] Allow urllib.request.Request subclasses to override method

2013-09-08 Thread Jason R. Coombs
Changes by Jason R. Coombs : Added file: http://bugs.python.org/file31678/061eb75339e2.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue12317] inspect.getabsfile() is not documented

2013-09-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brett.cannon versions: +Python 3.4 -Python 3.2 ___ Python tracker ___ ___ Python-bugs-list maili

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I personally dislike the "," as thousands separator, and if a > separator is added at all I would prefer a space as defined in the SI > standard[0]. Then you really want a non-breaking space ;-) (as a French person who's used to commas as decimal points, cou

[issue18978] Allow urllib.request.Request subclasses to override method

2013-09-08 Thread Jason R. Coombs
Changes by Jason R. Coombs : Added file: http://bugs.python.org/file31677/2b2744cfb08f.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Jakub Stasiak
Jakub Stasiak added the comment: I agree with both notes. Splitting the patch won't be a problem. As much as I don't fancy "," as thousands separator either - I just used what's in the standard library but I'll think about the best way of putting spaces there. --

[issue18978] Allow urllib.request.Request subclasses to override method

2013-09-08 Thread Jason R. Coombs
Changes by Jason R. Coombs : -- keywords: +patch Added file: http://bugs.python.org/file31676/6d6d68c068ad.diff ___ Python tracker ___ ___

[issue18929] inspect.classify_class_attrs ignores metaclass

2013-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > It seems that currently inspect is geared towards instances and > classes, not metaclasses. Consequently, so is help. I'm afraid I don't really understand what you're talking about. A metaclass is just a slightly different kind of class :-) > def classify_cl

[issue18978] Allow urllib.request.Request subclasses to override method

2013-09-08 Thread Jason R. Coombs
Jason R. Coombs added the comment: I've created a clone in which to draft this work. -- hgrepos: +208 ___ Python tracker ___ ___ Pytho

[issue18978] Allow urllib.request.Request subclasses to override method

2013-09-08 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hi Jason, Agree with you. This design change could be valuable in extending urllib.request.Request Thanks! -- nosy: +orsenthil ___ Python tracker _

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Ezio Melotti
Ezio Melotti added the comment: I personally dislike the "," as thousands separator, and if a separator is added at all I would prefer a space as defined in the SI standard[0]. The PEP8 changes should also me moved to a separate patch IMHO; the other changes are OK grouped together. [0]: http

[issue18978] Allow urllib.request.Request subclasses to override method

2013-09-08 Thread Jason R. Coombs
New submission from Jason R. Coombs: In Python 2.x and 3.2, I used to use a Request subclass I created for overriding the method used: class MethodRequest(request.Request): def __init__(self, *args, **kwargs): """ Construct a MethodRequest. Usage is the s

[issue18929] inspect.classify_class_attrs ignores metaclass

2013-09-08 Thread Ethan Furman
Ethan Furman added the comment: Okay, taking a step back. It seems that currently inspect is geared towards instances and classes, not metaclasses. Consequently, so is help. So, how do we enhance inspect so that help can be metaclass aware? classify_class_attrs seems like an obvious choice,

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue18977] The -t option has no effect in for uu command-line

2013-09-08 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: The uu module can be run as command-line tool. In Python 2, "uu -t infile outfile" opens input file in text mode, i.e. convert '\r\n' to '\n' on Windows and '\r' to '\n' on Mac Classic, and "uu -d -t infile outfile" opens output file in text mode, i.e. con

[issue1565525] tracebacks eat up memory by holding references to locals and globals when they are not wanted

2013-09-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > One more substantial question: the top frame of the traceback is > possibly still running. Currently the code skips it by doing an > initial 'tb = tb.tb_next'. Would it be better to catch and ignore the > RuntimeError > from frame.clear()? Yes, I think it w

[issue18976] distutils/command/build_ext passes wrong linker flags

2013-09-08 Thread Benedikt Morbach
New submission from Benedikt Morbach: At http://hg.python.org/cpython/file/1043cc2cb0ff/Lib/distutils/command/build_ext.py#l247 build_ext.py compares sys.executable against sys.exec_prefix. When cross compiling cpython, it notices that the interpreter running the build is located at exec_prefi

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Jakub Stasiak
Jakub Stasiak added the comment: Oops, forgot to patch the tests, please find correct patch attached. -- Added file: http://bugs.python.org/file31673/timeit-v2.patch ___ Python tracker _

[issue18943] argparse: default args in mutually exclusive groups

2013-09-08 Thread paul j3
paul j3 added the comment: A possibly unintended consequence to this `seen_non_default_actions` testing is that default values do not qualify as 'present' when testing for a required mutually exclusive group. p=argparse.ArgumentParser() g=p.add_mutually_exclusive_group(required=True)

[issue12317] inspect.getabsfile() is not documented

2013-09-08 Thread Akira Kitada
Changes by Akira Kitada : -- nosy: +akitada ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue18975] timeit: Use thousands separators and print number of loops per second

2013-09-08 Thread Jakub Stasiak
New submission from Jakub Stasiak: This patch includes: * making code more PEP8-compatible and refactoring it a bit * printing number of loops per second when using command line interface * using thousands separators when printing numbers of loops (also in command line interface) * changing exam

[issue18829] csv produces confusing error message when passed a non-string delimiter

2013-09-08 Thread R. David Murray
R. David Murray added the comment: Parsing a csv file with no delimiter would seem to be meaningless, unless I'm misunderstanding what 'delimeter' controls. So the error messages for delimiter and quotechar are necessarily different. -- ___ Python

[issue18962] Add special case for single iterator in heapq.merge function

2013-09-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Try this patch. -- Added file: http://bugs.python.org/file31671/merge.diff ___ Python tracker ___ ___

[issue18829] csv produces confusing error message when passed a non-string delimiter

2013-09-08 Thread Vajrasky Kok
Vajrasky Kok added the comment: After contemplating for a while, I am not sure that we should treat empty string for delimiter with error message: '"delimiter" must be an 1-character string'. The reason is to keep consistency with quotechar keyword. [sky@localhost cpython]$ ./python -c 'impor

[issue18973] Use argparse in the calendar module

2013-09-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > You forgot to upload the patch? Again. -- keywords: +patch Added file: http://bugs.python.org/file31670/calendar_argparse.patch ___ Python tracker

[issue18974] Use argparse in the diff script

2013-09-08 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +bethard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

  1   2   >