[issue13601] sys.stderr should be unbuffered (or always line-buffered)

2011-12-15 Thread Geoffrey Bache
Changes by Geoffrey Bache : -- nosy: +gjb1002 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue13603] Add prime-related and number theory functions to Python

2011-12-15 Thread Mark Dickinson
Mark Dickinson added the comment: Agree with the -1s. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue13603] Add prime-related and number theory functions to Python

2011-12-15 Thread maniram maniram
Changes by maniram maniram : -- status: open -> languishing ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue1559549] ImportError needs attributes for module and file name

2011-12-15 Thread Eric Snow
Eric Snow added the comment: Just following up on this ticket. Anyone have any objections to Brian's patch? Also, would 'fullname' be more appropriate than 'name', to be more in sync with that identifier in importlib? -- ___ Python tracker

[issue2377] Replace __import__ w/ importlib.__import__

2011-12-15 Thread Eric Snow
Eric Snow added the comment: AFAICT, #1559549 is the ImportError attribute ticket. -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue13603] Add prime-related and number theory functions to Python

2011-12-15 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> rejected status: languishing -> closed ___ Python tracker ___ ___ Python-bugs-list m

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Davide Rizzo
Davide Rizzo added the comment: Mark, it's been a long time since I went through this bug and don't remember the details. Are you sure subtype_dealloc should not call PyType_Modified? It looked like the appropriate place at the time. In the example the reference cycle was introduced on purpos

[issue12555] PEP 3151 implementation

2011-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. Can someone take a look? -- Added file: http://bugs.python.org/file23962/oserror_new.patch ___ Python tracker ___

[issue1559549] ImportError needs attributes for module and file name

2011-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch doesn't appear to have the necessary mechanics to pass the new arguments from the import machinery when an ImportError is raised, is this deliberate? Also, I'm not sure why the new arguments are keyword-only. -- nosy: +pitrou stage: test ne

[issue13604] update PEP 393 (match implementation)

2011-12-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo, loewis stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Mark Shannon
Mark Shannon added the comment: Absolutely. subtype_dealloc deals with deallocation of subtype *instances*, not the types themselves. > Maybe we can try and explore the reference graph again? This sort of thing is one of the reasons that the cycle GC does not call any finalisers. Attempting

[issue13598] string.Formatter doesn't support empty curly braces "{}"

2011-12-15 Thread Eric V. Smith
Eric V. Smith added the comment: This bug is assigned to me. Sometimes it takes a while before a committer has time to review a bug and act on it. I can assure you that I will review this before the next release of Python. Thank you for the bug report, and especially thanks for the patch! On

[issue13540] Document the Action API in argparse

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: Sorry about being out of contact (I'm flying back and forth between the US and the EU every 4-5 weeks right now), and thanks Terry for bringing this to my attention. Essentially, the API is: * The argument to action= must be a callable that accepts at least

[issue13584] argparse doesn't respect double quotes

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: Can you submit some example code that shows this? I can't reproduce this with: -- temp.py -- import argparse parser = argparse.ArgumentParser() parser.add_argument("--ng", action="store_true") parser.add_argument("--INP") print(parser.parse_arg

[issue12776] argparse: type conversion function should be called only once

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: Could you add a test to verify that custom actions are still getting the converted values passed to their __call__? I suspect this may not be happening under the current patch - if that's the case, you may also need to add conversions in _get_values, where th

[issue10772] Several actions for argparse arguments missing from docs

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: Looks good to me too. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the writeup, Mark. Here is a patch, calling PyType_Modified in the type's (not the instance's) tp_clear. -- resolution: fixed -> status: closed -> open Added file: http://bugs.python.org/file23963/type_clear.patch _

[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: The ArgumentParser constructor is definitely only intended to be called with keyword arguments, so it's definitely a documentation bug that it doesn't say this. I haven't actually applied the patch, but the basic approach and wording look fine to me. ---

[issue13271] When -h is used with argparse, default values that fail should not matter

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: I think http://bugs.python.org/issue12776, which delays type conversions on defaults should solve this problem, right? If you agree, could you add your code here as a test case to that issue and mark this as duplicate? (And yes, I agree this is a bug.) -

[issue13041] argparse: terminal width is not detected properly

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: I'd feel more comfortable with the argparse fix if it were simply calling "os.get_terminal_size()". I recommend that you: * Create a new issue called, say "add os.get_terminal_size()" proposing just the single method. * Add that issue to the Dependencies of

[issue12806] argparse: Hybrid help text formatter

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: As I understand it the current proposal is: * Wrap each paragraph separately * Don't wrap any lines indented by at least one additional space This sounds like a useful formatter. I would probably call it "PargraphWrappingFormatter" or something like that whic

[issue12082] Python/import.c still references fstat even with DONT_HAVE_FSTAT/!HAVE_FSTAT

2011-12-15 Thread Chromatix
Changes by Chromatix : -- nosy: +chromatix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue9253] argparse: optional subparsers

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: If you can make your patch relative to the cpython source tree, and add a couple tests, it will be easier to review. Thanks for working on this! -- ___ Python tracker ___

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Mark Shannon
Mark Shannon added the comment: What's happening is that the cycle GC calls type_clear to clear the type, but the method-cache is not invalidated. I have added a call to PyType_Modified in type_clear (as well as type_set_name and type_set_qualname, which also modify the type). Patch is attach

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Mark Shannon
Mark Shannon added the comment: Beat me to it, Antoine! Don't forget type_set_name and type_set_qualname. -- ___ Python tracker ___

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I have added a call to PyType_Modified in type_clear (as well as > type_set_name and type_set_qualname, which also modify the type). Can __name__ and __qualname__ be looked up through the method cache? -- ___ Pyth

[issue13023] argparse should allow displaying argument default values in addition to setting a formatter class

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: Your solution is actually the current recommended solution - mix together both classes that you want to combine and pass your subclass as the parameter. This should probably be documented somewhere (and tested more). -- __

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Davide Rizzo
Davide Rizzo added the comment: As much as I hate being wrong, I must concur with you. ;) Thank you, Mark. -- ___ Python tracker ___

[issue1559549] ImportError needs attributes for module and file name

2011-12-15 Thread Nick Coghlan
Nick Coghlan added the comment: The keyword-only idea is a backwards compatibility hack we discussed at the PyCon US sprints because ImportError currently accepts an arbitrary number of arguments: >>> raise ImportError(1, 2, 3) Traceback (most recent call last): File "", line 1, in ImportE

[issue12713] argparse: allow abbreviation of sub commands by users

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: Modulo the comments already on the patch by others, this approach looks fine to me. -- ___ Python tracker ___

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Mark Shannon
Mark Shannon added the comment: Antoine Pitrou wrote: > Antoine Pitrou added the comment: > >> I have added a call to PyType_Modified in type_clear (as well as >> type_set_name and type_set_qualname, which also modify the type). > > Can __name__ and __qualname__ be looked up through the metho

[issue12686] argparse - document (and improve?) use of SUPPRESS with help=

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: Could you give some examples of bugs that you observed? Otherwise, this looks like a duplicate of issue 9349. The intention is that help=SUPPRESS should cause the given argument to not be displayed in the help message. If there are cases where that's not true

[issue11708] argparse: suggestion for formatting optional positional args

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: I agree that this is a bug in current argparse formatting. It might be a little difficult to fix though because the current option formatting handles arguments one at a time, and producing something like [arg1 [arg2]] requires some understanding of how argume

[issue12284] argparse.ArgumentParser: usage example option

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: %(prog)s is available in epilog: -- temp.py -- import argparse epilog = """\ Example usage: %(prog)s option1 option2 """ parser = argparse.ArgumentParser( formatter_class=argparse.RawTextHelpFormatter, epilog=epilog) parser.parse_args

[issue9938] Documentation for argparse interactive use

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: Looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue11839] argparse: unexpected behavior of default for FileType('w')

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: I think Issue 12776, which delays type conversions on defaults, should solve this problem, right? If you agree, could you add your code here as a test case to that issue and mark this as duplicate? -- ___ Python tr

[issue11874] argparse assertion failure with brackets in metavars

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: I agree this is a bug. The patch needs to add unit tests that make sure metavars with [] work as expected. -- ___ Python tracker ___ _

[issue11807] Documentation of add_subparsers lacks information about parametres

2011-12-15 Thread Steven Bethard
Steven Bethard added the comment: Looks good. A few minor comments (click "review" by the patch). -- ___ Python tracker ___ ___ Pytho

[issue12555] PEP 3151 implementation

2011-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Updated patch. I've renamed oserror_post_init to oserror_init. Also addressed Nick's other comments. -- Added file: http://bugs.python.org/file23965/oserror_new2.patch ___ Python tracker

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Since PyType_Modified is generally called whenever a type is modified, > it is likely to act as a guardian for any future optimisations that > require classes to be unchanged. > > Thus, given these two reasons, it seems wise to call PyType_Modified > anywh

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset b196bcd7c34f by Antoine Pitrou in branch '3.2': Fix the fix for issue #12149: it was incorrect, although it had the side http://hg.python.org/cpython/rev/b196bcd7c34f New changeset 195bfd4c3ea1 by Antoine Pitrou in branch 'default': Fix the fix for

[issue13605] document argparse's nargs=REMAINDER

2011-12-15 Thread Steven Bethard
New submission from Steven Bethard : There is an undocumented value for add_argument's nargs parameter, REMAINDER, which can be used to consume all the remaining arguments. This is commonly useful for command line utilities that dispatch to other command line utilities. Though undocumented, it

[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hopefully this is fixed for good now. Thank you! -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue12555] PEP 3151 implementation

2011-12-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset d22c99e77768 by Antoine Pitrou in branch 'default': Fix OSError.__init__ and OSError.__new__ so that each of them can be http://hg.python.org/cpython/rev/d22c99e77768 -- ___ Python tracker

[issue12555] PEP 3151 implementation

2011-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed now. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___

[issue7652] Merge C version of decimal into py3k.

2011-12-15 Thread Stefan Krah
Stefan Krah added the comment: Amaury has asked for more comments (and I agree). However, I'm not sure what level of detail would be appropriate. As an example, I've posted the full proof of the x87 modular multiplication in umodarith.h. Even with the Coq parts stripped, this would still be a

[issue13604] update PEP 393 (match implementation)

2011-12-15 Thread STINNER Victor
STINNER Victor added the comment: Various comments of the PEP 393 and your patch. "For compatibility with existing APIs, several representations may exist in parallel; over time, this compatibility should be phased out." and "For compatibility, redundant representations may be computed." I nev

[issue7652] Merge C version of decimal into py3k.

2011-12-15 Thread Stefan Krah
Stefan Krah added the comment: Stefan Krah wrote: > Would you prefer that level of detail or should I just post the core > of the algorithm? Argh. s/post/add to comments in umodarith.h/ -- ___ Python tracker

[issue7897] Support parametrized tests in unittest

2011-12-15 Thread Julian Berman
Changes by Julian Berman : -- nosy: +Julian ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue7652] Merge C version of decimal into py3k.

2011-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Amaury has asked for more comments (and I agree). However, I'm not sure what > level of detail would be appropriate. As an example, I've posted the full > proof of the x87 modular multiplication in umodarith.h. > > > Even with the Coq parts stripped, this w

[issue13594] Aifc markers write fix

2011-12-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue13601] sys.stderr should be unbuffered (or always line-buffered)

2011-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Line-buffering should be good enough since in practice errors messages > are always terminated by a newline. What I think too. > I'm hesitant to make it line-buffered by default when directed to a > file, since this could significantly slow down a program th

[issue13601] sys.stderr should be unbuffered (or always line-buffered)

2011-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oops, I forgot the last two questions: > Maybe we need better command-line control to override the defaults? We already have -u to switch all stdio to unbuffered. This issue proposes to make stderr line-buffered/unbuffered by default, since it's less surprisi

[issue13592] repr(regex) doesn't include actual regex

2011-12-15 Thread Ezio Melotti
Ezio Melotti added the comment: If an eval-able re.Regex is used, the flags can be showed as second arg, like: re.Regex('a', re.I|re.S) instead of being added to the pattern as in re.Regex('(?is)a') The repr can be generated with something like 're.Regex({r.pattern!r}, {r.flags})'.format(

[issue7502] All DocTestCase instances compare and hash equal to each other

2011-12-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue13597] Improve documentation of stdout/stderr buffering in Python 3.x

2011-12-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 313fa7ea6c79 by Antoine Pitrou in branch '3.2': Issue #13597: Improve documentation of standard streams. http://hg.python.org/cpython/rev/313fa7ea6c79 New changeset 7343730185a3 by Antoine Pitrou in branch 'default': Issue #13597: Improve documenta

[issue13597] Improve documentation of stdout/stderr buffering in Python 3.x

2011-12-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Should be ok now. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___

[issue13571] Backup files support in IDLE

2011-12-15 Thread Roger Serwy
Roger Serwy added the comment: Let's move this discussion to the IDLE-dev mailing list. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue2292] Missing *-unpacking generalizations

2011-12-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- priority: low -> normal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue5131] pprint doesn't know how to print a defaultdict

2011-12-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue7434] general pprint rewrite

2011-12-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue6743] Add function compatible with print to pprint module

2011-12-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue13004] pprint: add option to truncate sequences

2011-12-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue10592] pprint module doesn't work well with OrderedDicts

2011-12-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue10017] pprint.pprint raises TypeError on dictionaries with user-defined types as keys

2011-12-15 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue13598] string.Formatter doesn't support empty curly braces "{}"

2011-12-15 Thread Meador Inge
Meador Inge added the comment: On Thu, Dec 15, 2011 at 1:42 AM, maniram maniram wrote: > Why isn't anybody commiting or commenting on my patches? Your patch is much appreciated. Thank you. It takes some time to get things reviewed. Please read the Dev Guide. In particular, the "Lifecycle

[issue7652] Merge C version of decimal into py3k.

2011-12-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: 2011/12/15 Stefan Krah > > Stefan Krah added the comment: > > Amaury has asked for more comments (and I agree). However, I'm not sure > what > level of detail would be appropriate. As an example, I've posted the full > proof of the x87 modular multiplic

[issue2134] Add new attribute to TokenInfo to report specific token IDs

2011-12-15 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue11957] re.sub confusion between count and flags args

2011-12-15 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue13592] repr(regex) doesn't include actual regex

2011-12-15 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue11610] Improved support for abstract base classes with descriptors

2011-12-15 Thread Darren Dale
Darren Dale added the comment: Is this patch ready to go? I haven't heard any feedback on the most recent version. -- ___ Python tracker ___ ___

[issue2134] Add new attribute to TokenInfo to report specific token IDs

2011-12-15 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue11900] 2.7.1 unicode subclasses not calling __str__() for print statement

2011-12-15 Thread John Nagle
John Nagle added the comment: This has nothing to do with Python 3. There's a difference in __str__ handling between Python 2.6 and Python 2.7.2. It's enough to crash BeautifulSoup: [Thread-8] Unexpected EXCEPTION while processing page "http://www.verisign.com": global name '__str__' is not

[issue11610] Improved support for abstract base classes with descriptors

2011-12-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset e979b26a9172 by Benjamin Peterson in branch 'default': improve abstract property support (closes #11610) http://hg.python.org/cpython/rev/e979b26a9172 -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open ->

[issue13545] Pydoc3.2: TypeError: unorderable types

2011-12-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5ec7ecf62c1d by Victor Stinner in branch '3.2': Issue #13545: Fix platform.libc_version() is the SO version is missing http://hg.python.org/cpython/rev/5ec7ecf62c1d New changeset a9ee21ac0879 by Victor Stinner in branch 'default': (Merge 3.2) Issue

[issue13545] Pydoc3.2: TypeError: unorderable types

2011-12-15 Thread STINNER Victor
STINNER Victor added the comment: > The patch in msg<148968> solves the issue for me. Cool, I applied the patch to Python 3.2 and 3.3. -- resolution: -> fixed status: open -> closed ___ Python tracker __

[issue13545] Pydoc3.2: TypeError: unorderable types

2011-12-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset f2a5dcced66d by Victor Stinner in branch '2.7': Issue #13545: Fix platform.libc_version() is the SO version is missing http://hg.python.org/cpython/rev/f2a5dcced66d -- ___ Python tracker

[issue13596] Only recompile Lib/_sysconfigdata.py when needed

2011-12-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 06d83098d9a9 by Victor Stinner in branch 'default': Close #13596: Only recompile Lib/_sysconfigdata.py when needed http://hg.python.org/cpython/rev/06d83098d9a9 -- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status

[issue13606] test_clear_dict_in_ref_cycle in test_module only works by coincidence

2011-12-15 Thread Mark Shannon
New submission from Mark Shannon : test_clear_dict_in_ref_cycle in test_module only works by coincidence, if the name of the variable on line 77 is changed from 'a' to 'x', then the test fails. This is a result of the arbitrary ordering of removals of values from a modules globals() during GC.

[issue13606] test_clear_dict_in_ref_cycle in test_module only works by coincidence

2011-12-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson stage: -> patch review versions: +Python 3.2, Python 3.3 ___ Python tracker ___ _

[issue13606] test_clear_dict_in_ref_cycle in test_module only works by coincidence

2011-12-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset c9ae0eb66959 by Benjamin Peterson in branch 'default': fix this test to actually test something (closes #13606) http://hg.python.org/cpython/rev/c9ae0eb66959 -- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/reject

[issue13604] update PEP 393 (match implementation)

2011-12-15 Thread Jim Jewett
Changes by Jim Jewett : Added file: http://bugs.python.org/file23968/pep-0393.txt ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue13604] update PEP 393 (match implementation)

2011-12-15 Thread Jim Jewett
Jim Jewett added the comment: Updated to resolve most of Victor's concerns, but this meant enough changes that I'm not sure it quite counts as editorial only. A few questions that I couldn't answer: (1) Upon string creation, do we want to *promise* to discard the UTF-8 and wstr, so that the

[issue2134] Add new attribute to TokenInfo to report specific token IDs

2011-12-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: Both the proposed text and 3.3 addition look good to me. -- ___ Python tracker ___ ___ Python-bugs-l

[issue2134] Add new attribute to TokenInfo to report specific token IDs

2011-12-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue13604] update PEP 393 (match implementation)

2011-12-15 Thread Martin v . Löwis
Martin v. Löwis added the comment: > PyUnicode_AsUnicode(), PyUnicode_AS_UNICODE(), PyUnicode_GET_SIZE(), > ... do reallocate a Py_UNICODE* string for a ready string, but I > don't think that it is a usual use case. Define "usual". There were certainly plenty of occurrences of that in the Pytho

[issue13604] update PEP 393 (match implementation)

2011-12-15 Thread Martin v . Löwis
Martin v. Löwis added the comment: > (1) Upon string creation, do we want to *promise* to discard the UTF-8 and > wstr, so that the caller can memory manage? I don't understand the question. Assuming "discards" means "releases" here, then there is no API which releases memory during creation

[issue13603] Add prime-related and number theory functions to Python

2011-12-15 Thread Martin v . Löwis
Martin v. Löwis added the comment: maniram: the proper course is to publish such a module on PyPI. Then, if there is enough interest in it (after a few years), propose addition to the standard library. -- nosy: +loewis ___ Python tracker

[issue2292] Missing *-unpacking generalizations

2011-12-15 Thread Paul Moore
Changes by Paul Moore : -- nosy: +pmoore ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue13575] old style classes still alive

2011-12-15 Thread Philip Jenvey
Philip Jenvey added the comment: Is mro_internal's second call to type_mro_modified still needed? Its comment makes me suspect that it's not: type_mro_modified(type, type->tp_mro); /* corner case: the old-style super class might have been hidden from the custom MRO */ type_m

[issue13607] Move generator specific sections out of ceval.

2011-12-15 Thread Ron Adam
New submission from Ron Adam : The following changes cleanup the eval loop and result in a pretty solid 2 to 3% improvement in pybench for me. And it is about 5% faster for long generators. * Change why enum type to int and #defines. And moved the why defines to opcode.h so that they can be

[issue13604] update PEP 393 (match implementation)

2011-12-15 Thread Jim Jewett
Jim Jewett added the comment: >> So even if a third party module uses the legagy Unicode API, the PEP >> 393 will still optimize the memory usage thanks to implicit calls to >> PyUnicode_READY() (done everywhere in Python source code). > ... unless they inspect a given Unicode string, in which

[issue9399] Provide a 'print' action for argparse

2011-12-15 Thread Denilson Figueiredo de Sá
Changes by Denilson Figueiredo de Sá : -- nosy: +denilsonsa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue13604] update PEP 393 (match implementation)

2011-12-15 Thread Jim Jewett
Changes by Jim Jewett : Added file: http://bugs.python.org/file23971/pep-0393v20111215.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue2292] Missing *-unpacking generalizations

2011-12-15 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue13608] remove born-deprecated PyUnicode_AsUnicodeAndSize

2011-12-15 Thread Jim Jewett
New submission from Jim Jewett : In reviewing issue 13604 (aligning PEP 393 with the implementation) Victor Stinner noticed that PyUnicode_AsUnicodeAndSize is new in 3.3, but that it is already deprecated (because it relies on the old PyUnicode type). This born-deprecated function is just a

[issue13609] Add "os.get_terminal_size()" function

2011-12-15 Thread Denilson Figueiredo de Sá
New submission from Denilson Figueiredo de Sá : Please add a function called "os.get_terminal_size()" that should return a tuple "(width, height)". The built-in "argparse" module would directly benefit from this function, as it would wrap the help text correctly. I'm pretty sure many users wou

[issue13041] argparse: terminal width is not detected properly

2011-12-15 Thread Denilson Figueiredo de Sá
Denilson Figueiredo de Sá added the comment: Issue #13609 created, but I don't have permission to edit the dependencies. -- ___ Python tracker ___ __

[issue2292] Missing *-unpacking generalizations

2011-12-15 Thread Terry J. Reedy
Terry J. Reedy added the comment: In the python-ideas thread "list / array comprehensions extension" Guido replied in reference to an earlier quote from him: "I think that -0 was contextual (too many moving parts for the original Py3k release). Today I am +1." There are others in favor, pendin

[issue13584] argparse doesn't respect double quotes

2011-12-15 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: Hello Steven, I'm embarrassed to report that I can't reproduce the problem. The input line is parsed correctly if I enclose the string 'Demo IO' in double quotes. It is parsed incorrectly if I enclose it in single quotes, but it looks as though this is th

  1   2   >