[issue17917] use PyModule_AddIntMacro() instead of PyModule_AddIntConstant() when applicable

2013-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is a lot of code churn, but it touches code that is unlikely to be modified otherwise, so I guess it's ok. -- ___ Python tracker ___ _

[issue17912] thread states should use a doubly-linked list

2013-05-06 Thread Charles-François Natali
Charles-François Natali added the comment: Are there other places in the code base using linked-list? If yes, I think it could be interesting to add a generic linked-list implementation, like the one used in the Linux kernel: http://kernelnewbies.org/FAQ/LinkedLists http://isis.poly.edu/kulesh/st

[issue17918] failed incoming SSL connection stays open forever

2013-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for reporting. For maximum backwards compatibility, the safer fix is to close the socket only in SSLSocket.accept(). Unfortunately I can't think of a way to write a unittest for it, so I'll just commit the fix. -- nosy: +pitrou

[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths

2013-05-06 Thread Charles-François Natali
Charles-François Natali added the comment: The test is still failling: http://buildbot.python.org/all/builders/AMD64 OpenIndiana 2.7/builds/1670/steps/test/logs/stdio """ == ERROR: test_extract_unicode_filenames (test.test_zip

[issue17918] failed incoming SSL connection stays open forever

2013-05-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___ P

[issue17918] failed incoming SSL connection stays open forever

2013-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 85e5a93e534e by Antoine Pitrou in branch '2.7': Issue #17918: When using SSLSocket.accept(), if the SSL handshake failed on the new socket, the socket would linger indefinitely. http://hg.python.org/cpython/rev/85e5a93e534e -- nosy: +python

[issue17920] Documentation: "complete ordering" should be "total ordering"

2013-05-06 Thread abcdef
New submission from abcdef: The set documentation [http://docs.python.org/3.4/library/stdtypes.html] states "The subset and equality comparisons do not generalize to a complete ordering function. For example, any two disjoint sets are not equal and are not subsets of each other..." Could "com

[issue17912] thread states should use a doubly-linked list

2013-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Are there other places in the code base using linked-list? > If yes, I think it could be interesting to add a generic linked-list > implementation, like the one used in the Linux kernel: > http://kernelnewbies.org/FAQ/LinkedLists > http://isis.poly.edu/kulesh/s

[issue17919] AIX POLLNVAL definition causes problems

2013-05-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +David.Edelsohn ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue17915] Encoding error with sax and codecs

2013-05-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo, serhiy.storchaka type: -> behavior versions: +Python 3.4 ___ Python tracker ___ ___ Pyth

[issue17920] Documentation: "complete ordering" should be "total ordering"

2013-05-06 Thread abcdef
abcdef added the comment: Another small thing: "For example, any two disjoint sets are not equal and are not subsets of each other, so all of the following return False: ab." It should be "any two nonempty disjoint sets". -- ___ Python tracker

[issue17915] Encoding error with sax and codecs

2013-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Since this is a regression, setting (temporarily perhaps) as release blocker. -- nosy: +georg.brandl, larry, pitrou priority: normal -> release blocker stage: -> needs patch ___ Python tracker

[issue5845] rlcompleter should be enabled automatically

2013-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Take it with a large grain of Internet salt, but Ezio pointed me to the following reactions: http://www.reddit.com/r/Python/comments/1dq7sh/python_repl_finally_gets_tab_completion_by_default/ -- ___ Python tracker <

[issue13503] improved efficiency of bytearray pickling by using bytes type instead of str

2013-05-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How about base64? self.save_reduce(base64.b64decode, (str(base64.b64encode(obj), 'ascii'),), obj=obj) >>> len(dumps(bytes([200] * 1), 2)) 13372 -- nosy: +serhiy.storchaka

[issue13503] improved efficiency of bytearray pickling by using bytes type instead of str

2013-05-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Serhiy Storchaka added the comment: > > How about base64? > > self.save_reduce(base64.b64decode, > (str(base64.b64encode(obj), 'ascii'),), > obj=obj) > > >>> len(dumps(bytes([200] * 1), 2)) > 13372 It's st

[issue5845] rlcompleter should be enabled automatically

2013-05-06 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe added the comment: Also made it to the front-page of Hacker News[1], with better quality comments than the reddit thread. [1] https://news.ycombinator.com/item?id=5658062 -- ___ Python tracker

[issue17917] use PyModule_AddIntMacro() instead of PyModule_AddIntConstant() when applicable

2013-05-06 Thread STINNER Victor
STINNER Victor added the comment: Could you please generete the same patch without --git so it can be reviewed on Rietveld? -- ___ Python tracker ___ ___

[issue17883] Fix buildbot testing of Tkinter

2013-05-06 Thread Zachary Ware
Changes by Zachary Ware : Removed file: http://bugs.python.org/file30154/issue17883.diff ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue17883] Fix buildbot testing of Tkinter

2013-05-06 Thread Zachary Ware
Zachary Ware added the comment: Here's a better patch after learning a bit better how subprocess.Popen works... -- Added file: http://bugs.python.org/file30156/issue17883.diff ___ Python tracker ___

[issue17883] Fix buildbot testing of Tkinter

2013-05-06 Thread Ezio Melotti
Ezio Melotti added the comment: FTR there's also test.support.assert_python_ok and test.support.assert_python_failure (and a few convenience functions in subprocess too). I suspect that if the import fails, stdout is empty, and stderr will contain the error message. -- _

[issue17917] use PyModule_AddIntMacro() instead of PyModule_AddIntConstant() when applicable

2013-05-06 Thread Charles-François Natali
Changes by Charles-François Natali : Removed file: http://bugs.python.org/file30155/ins_macro.diff ___ Python tracker ___ ___ Python-bugs-list

[issue17917] use PyModule_AddIntMacro() instead of PyModule_AddIntConstant() when applicable

2013-05-06 Thread Charles-François Natali
Changes by Charles-François Natali : Added file: http://bugs.python.org/file30157/ins_macro-1.diff ___ Python tracker ___ ___ Python-bugs-list

[issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A

2013-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9e0f1c3bf9b6 by Victor Stinner in branch 'default': Issue #7330: Implement width and precision (ex: "%5.3s") for the format string http://hg.python.org/cpython/rev/9e0f1c3bf9b6 -- ___ Python tracker

[issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A

2013-05-06 Thread STINNER Victor
STINNER Victor added the comment: Finally, I closed this issue. Sorry for the long delay, but many other PyUnicode_FromFormat() issues had to be discussed/fixed before this one can be fixed. It was also much easier to fix this issue since my refactoring of PyUnicode_FromFormat() to only parse

[issue13349] Non-informative error message in index() and remove() functions

2013-05-06 Thread STINNER Victor
STINNER Victor added the comment: > Confirmed with Ezio that issue #7330 will need to be fixed/approved before > this issue can be closed. FYI I just fixed this issue. PyUnicode_FromFormat() now supports width and precision in the format string. -- nosy: +haypo __

[issue17915] Encoding error with sax and codecs

2013-05-06 Thread STINNER Victor
STINNER Victor added the comment: It looks like a regression of introduced by the fix of the issue #1470548, changeset 66f92f76b2ce. -- ___ Python tracker ___ __

[issue17915] Encoding error with sax and codecs

2013-05-06 Thread STINNER Victor
STINNER Victor added the comment: Extracted test from report.txt. Test with Python 3.4: $ ./python test_codecs.py Traceback (most recent call last): File "test_codecs.py", line 7, in xml.startDocument() File "/home/haypo/prog/python/default/Lib/xml/sax/saxutils.py", line 148, in start

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2013-05-06 Thread STINNER Victor
STINNER Victor added the comment: Ping! The test is still failing. -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2013-05-06 Thread Thomas Kluyver
Thomas Kluyver added the comment: bytecode_helper is there in dis_api3.diff - anyone with commit rights should be able to add it to the repository. -- ___ Python tracker ___ ___

[issue17917] use PyModule_AddIntMacro() instead of PyModule_AddIntConstant() when applicable

2013-05-06 Thread STINNER Victor
STINNER Victor added the comment: Modules/fcntlmodule.c and Modules/posixmodule.c are using explicit cast to long. I don't know if there is a good reason for such cast. PC/_msi.c: Oh, here you should remove cast to int. Example: PyModule_AddIntMacro(m, (int)MSIDBOPEN_CREATEDIRECT); I'

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2013-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 84d1a0e32d3b by Nick Coghlan in branch 'default': Issue #11816: Add missing test helper http://hg.python.org/cpython/rev/84d1a0e32d3b -- ___ Python tracker ___

[issue17914] add os.cpu_count()

2013-05-06 Thread STINNER Victor
STINNER Victor added the comment: I also vote +1 for returning None when the information is unknown. Just write "os.cpu_count() or 1" if you need 1 when the count is unknown ;-) -- nosy: +haypo ___ Python tracker

[issue17914] add os.cpu_count()

2013-05-06 Thread STINNER Victor
STINNER Victor added the comment: See also #17444, Trent Nelson wrote an implementation of os.cpu_count(). -- nosy: +trent ___ Python tracker ___

[issue17913] stat.filemode returns "-" for sockets and unknown types

2013-05-06 Thread STINNER Victor
STINNER Victor added the comment: Can you maybe add an unit test? -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing

[issue14191] argparse doesn't allow optionals within positionals

2013-05-06 Thread paul j3
paul j3 added the comment: This is a revision of the test_intermixed.py that I submitted earlier. Now `parse_intermixed_args` acts like `parse_args', and calls `parse_known_intermixed_args`. Again it is form that can exercise the idea without modifying `argparse.py`. If the parser has incom

[issue14191] argparse doesn't allow optionals within positionals

2013-05-06 Thread paul j3
paul j3 added the comment: This is the formal patch corresponding to the `test_intermixed.py`. It includes changes to `argparse.rst`, plus tests in `test_argparse.py`. These tests are near the end, after those for `parse_known_args`. They are roughly equivalent to the examples in `test_inte

[issue11016] Add S_ISDOOR to the stat module

2013-05-06 Thread STINNER Victor
STINNER Victor added the comment: If we use the C language, I would prefer to only expose what does really exist, and not add "fake" functions like: +#ifndef S_ISDOOR +# define S_ISDOOR(mode) 0 +#endif So in: +static PyMethodDef stat_methods[] = { +{"S_ISDIR", stat_S_ISDIR, METH

[issue11016] Add S_ISDOOR to the stat module

2013-05-06 Thread STINNER Victor
STINNER Victor added the comment: > I have created a C implementation of the stat module for Python 3.4. Oh, your C module is called "stat", as the "stat" module implemented in Python (Lib/stat.py). What is your plan? Replace completly the Python module with the C module? It may be nice to kee

[issue17919] AIX POLLNVAL definition causes problems

2013-05-06 Thread David Edelsohn
David Edelsohn added the comment: That's the way AIX allocated the bits. It's nice to check for overflow, but I think the test is imposing more semantics on the mask bits than POSIX requires. It just happens that the GLibc allocation of bits works out okay. --

[issue519227] hook method for 'is' operator

2013-05-06 Thread lesmana
Changes by lesmana : -- nosy: +lesmana versions: +Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue17920] Documentation: "complete ordering" should be "total ordering"

2013-05-06 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: docs@python -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list ma

[issue17920] Documentation: "complete ordering" should be "total ordering"

2013-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset a285ce18bd55 by Raymond Hettinger in branch '2.7': Issue 17920: Fix-up terminology in the set documentation http://hg.python.org/cpython/rev/a285ce18bd55 -- nosy: +python-dev ___ Python tracker

[issue17920] Documentation: "complete ordering" should be "total ordering"

2013-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6ec04c5dae6e by Raymond Hettinger in branch '3.3': Issue 17920: Fix-up terminology in the set documentation http://hg.python.org/cpython/rev/6ec04c5dae6e -- ___ Python tracker

[issue13503] improved efficiency of bytearray pickling by using bytes type instead of str

2013-05-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: It looks like this is an unfortunate dead-end. -- status: open -> closed ___ Python tracker ___ _

[issue17911] Extracting tracebacks does too much work

2013-05-06 Thread Nick Coghlan
Nick Coghlan added the comment: Antoine - I like your idea, but I think it's a separate issue. I agree with Guido that exposing some lower level non-formatting APIs in the traceback module would be helpful. I see Guido's suggestion here as similar to the change we just made in the dis module

[issue17883] Fix buildbot testing of Tkinter

2013-05-06 Thread Todd Rovito
Changes by Todd Rovito : -- nosy: +Todd.Rovito ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue17921] explicit empty check instead of implicit booleaness

2013-05-06 Thread lesmana
New submission from lesmana: Python should have a builtin method `isempty()` which calls the special method name `__isempty__()` for explicit emptiness check. The special method `__isempty__()` should return `True` if the object is "empty" and `False` if the object is "not empty". Observe emp

[issue17921] explicit empty check instead of implicit booleaness

2013-05-06 Thread R. David Murray
R. David Murray added the comment: Just use len. -- nosy: +r.david.murray resolution: -> rejected stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue17921] explicit empty check instead of implicit booleaness

2013-05-06 Thread R. David Murray
R. David Murray added the comment: Or, to be more helpful than that short answer: if you think there is something that isempty can do that len can't that makes it worth adding complexity to the language, please discuss it on the python-ideas mailing list first. That's the best place to get fe

[issue17911] Extracting tracebacks does too much work

2013-05-06 Thread Guido van Rossum
Guido van Rossum added the comment: That sounds great, except I'd expect the exception type and str(), since a formatted traceback uses the str() of the exception, not its repr(). Personally I don't think the tuples need to be named, but I won't hold up progress either. :-) -- __

[issue17911] Extracting tracebacks does too much work

2013-05-06 Thread Guido van Rossum
Changes by Guido van Rossum : -- keywords: +easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue17833] test_gdb broken PPC64 Linux

2013-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 63f2941477d3 by Ezio Melotti in branch '2.7': #17833: add debug output to investigate buildbot failure. http://hg.python.org/cpython/rev/63f2941477d3 -- ___ Python tracker

[issue17833] test_gdb broken PPC64 Linux

2013-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- Removed message: http://bugs.python.org/msg188621 ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue17871] Wrong signature of TextTestRunner's init function

2013-05-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5dd076d441ec by Ezio Melotti in branch '3.3': #17871: fix unittest.TextTestRunner signature in the docs. Patch by Yogesh Chaudhari. http://hg.python.org/cpython/rev/5dd076d441ec New changeset 15ed67602ddf by Ezio Melotti in branch 'default': #1787

[issue17871] Wrong signature of TextTestRunner's init function

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

[issue17914] add os.cpu_count()

2013-05-06 Thread Charles-François Natali
Charles-François Natali added the comment: > I also vote +1 for returning None when the information is unknown. I still don't like it. If a function returns a number of CPU, it should either return an integer >= 1, or raise an exception. None is *not* an integer. And returning an exception is I

<    1   2