[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 IMO useles, since the user can't do
anything with anyway, other than fallback to 1.

> Just write "os.cpu_count() or 1" if you need 1 when the count is unknown ;-)

os.cpu_count() or 1 is an ugly idiom.

> See also #17444, Trent Nelson wrote an implementation of os.cpu_count().

I don't see exactly what this C implementation brings over the one in
multiprocessing (which is written in Python)?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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':
#17871: merge with 3.3.
http://hg.python.org/cpython/rev/15ed67602ddf

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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. :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 feedback for ideas like this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 emptiness check using implicit booleaness:

if not somecollection:
  foo()

Note that this code also handles `None`, `0` and `False` silently. If those are 
possible values then I have to test explicitly:

if somecollection is not None and not somecollection:
  foo()

Also handling the `0` and `False` cases will make the code really really ugly.

Usually the `None`, `0` or `False` cases only happen in case of a programming 
error. But if I do not test for them explicitly then they will be handled 
silently and the error will occur somewhere else in the code.

Compare against explicit emptiness check:

if not isempty(somecollection):
  foo()

This code will break immediately if somecollection does not have 
`__isempty__()`. If `None`, `0` or `False` are possible values they will not be 
handled silently, instead an error will be reported at `isempty()`.

Advantage of explicit emptiness check:

* More explicit and fluently readable code
* No silent implicit booleaness check when code should do emptiness check
* Clearer separation of meaning for the special methods `__len__()` and 
`__empty__()`

Possible use case for explicit emptiness check: a list with memory effect.

>>> ml = MemoryEffectList()
>>> ml.charge()
>>> ml.discharge()
>>> isempty(ml)
True
>>> len(ml) == 0
False

--
components: Interpreter Core
messages: 188617
nosy: lesmana
priority: normal
severity: normal
status: open
title: explicit empty check instead of implicit booleaness
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 to expose a dis.get_instructions iterator. That change makes it much 
easier to work with the disassembler output programmatically, whereas the 
module was previously too focused on displaying text with a specific format.

My current thoughts: define a "TracebackSummary" with the following fields:

exc_type
exc_repr
stack_summary
cause
context

stack_summary would be a list of (filename, lineno, functionname) triples as 
Guido suggested (probably a named tuple)

cause and context would be either None or a reference to an appropriate 
TracebackSummary object

Basically, the summary should contain all of the information needed to create 
the formatted traceback output, without actually doing any formatting (aside 
from calling repr() on the exception)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 keep the Python module for compatibility with other 
Python implementations, and test both implementations.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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_O, stat_S_ISDIR_doc},
+{"S_ISCHR", stat_S_ISCHR,  METH_O, stat_S_ISCHR_doc},
+{"S_ISBLK", stat_S_ISBLK,  METH_O, stat_S_ISBLK_doc},
+{"S_ISREG", stat_S_ISREG,  METH_O, stat_S_ISREG_doc},
+{"S_ISFIFO",stat_S_ISFIFO, METH_O, stat_S_ISFIFO_doc},
+{"S_ISLNK", stat_S_ISLNK,  METH_O, stat_S_ISLNK_doc},
+{"S_ISSOCK",stat_S_ISSOCK, METH_O, stat_S_ISSOCK_doc},
+{"S_ISDOOR",stat_S_ISDOOR, METH_O, stat_S_ISDOOR_doc},
+{"S_ISPORT",stat_S_ISPORT, METH_O, stat_S_ISPORT_doc},
+{"S_ISWHT", stat_S_ISWHT,  METH_O, stat_S_ISWHT_doc},
+{"S_IMODE", stat_S_IMODE,  METH_O, stat_S_IMODE_doc},
+{"S_IFMT",  stat_S_IFMT,   METH_O, stat_S_IFMT_doc},
+{"filemode",stat_filemode, METH_O, stat_filemode_doc},
+{NULL,  NULL}   /* sentinel */
+};

I expect something similar to what is done in posixmodule.c:

static PyMethodDef stat_methods[] = {
{"S_ISDIR", stat_S_ISDIR,  METH_O, stat_S_ISDIR_doc},
...
#ifdef S_ISDOOR
{"S_ISDOOR",stat_S_ISDOOR, METH_O, stat_S_ISDOOR_doc},
#endif
{"filemode",stat_filemode, METH_O, stat_filemode_doc},
{NULL,  NULL}   /* sentinel */
};

--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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_intermixed.py`.
 -
The new documentation section is:

Some users expect to freely intermix optional and positional argument strings. 
For example, optparse, by default, allows interspersed argument strings. GNU 
getopt() permutes the argument strings so non-options are at the end. The 
parse_intermixed_args() method emulates this behavior by first calling 
parse_known_args() with just the optional arguments being active. It is then 
called a second time to parse the list of remaining argument strings using the 
positional arguments.

parse_intermixed_args() raises an error if the parser uses features that are 
incompatible with this two step parsing. These include subparsers, 
argparse.REMAINDER, and mutually exclusive groups that include both optionals 
and positionals.

In this example, parse_known_args() returns an unparsed list of arguments [‘2’, 
‘3’], while parse_intermixed_args() returns rest=[1, 2, 3].

>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo')
>>> parser.add_argument('cmd')
>>> parser.add_argument('rest', nargs='*', type=int)
>>> parser.parse_known_args('cmd1 1 --foo bar 2 3'.split())
(Namespace(cmd='cmd1', foo='bar', rest=[1]), ['2', '3']) 
>>> parser.parse_intermixed_args('cmd1 1 --foo bar 2 3'.split())
Namespace(cmd='cmd1', foo='bar', rest=[1, 2, 3])

parse_known_intermixed_args() method, returns a two item tuple containing the 
populated namespace and the list of remaining argument strings. 
parse_intermixed_args() raises an error if there are any remaining unparsed 
argument strings.

--
Added file: http://bugs.python.org/file30160/intermixed.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 incompatible features (REMAINDER, PARSER, or certain 
exclusive groups), it raises an error.  However to facilitate testing I 
included a `_fallback` backdoor.  If not default None it will be called instead 
of raising the error.

While making documentation changes, I got to wondering whether 'interspersed' 
would be a better term than 'intermixed'.  optparse has an 'interspersed' 
option and api.  However the getopt documentation does use 'intermixed'.

--
Added file: http://bugs.python.org/file30159/test_intermixed.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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'm surprised that the does compile. You may have a 
"(int)MSIDBOPEN_CREATEDIRECT" variable :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 
startDocument
self._encoding)
  File "/home/haypo/prog/python/default/Lib/codecs.py", line 699, in write
return self.writer.write(data)
  File "/home/haypo/prog/python/default/Lib/codecs.py", line 355, in write
data, consumed = self.encode(object, self.errors)
TypeError: Can't convert 'bytes' object to str implicitly

_gettextwriter() of xml.sax.saxutils does not recognize codecs classes. (See 
also the PEP 400 :-)).

--
Added file: http://bugs.python.org/file30158/test_codecs.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 the format string once (thanks to the 
_PyUnicodeWriter API) instead of having 4 steps.

Thanks to Ysj Ray, thanks to reviewers.

This is one of the oldest issue that I had to fix :-)

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 statistically better (a fixed 1.33 expansion instead of 1.5 average), but 
ASCII bytearrays will pickle less efficiently than currently.

There's something else: we had enough regressions in the latest 2.7.x release, 
and we shouldn't risk adding new ones in the next release. Really, let's close 
this issue.

--
nosy: +benjamin.peterson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.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/stuff/src/klist/

There are a couple other places, IIRC. That said, I'm not sure what the
point is, since a linked list is quite a simple structure anyway?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 "complete ordering" be changed to "total ordering"? This is the correct 
mathematical terminology. A total ordering is one where every pair is 
comparable. A complete ordering is one where each bounded subset has a 
supremum/infimum (for example, reals form a complete ordered field). This can 
be verified at Wikipedia [http://en.wikipedia.org/wiki/Total_order] and 
essentially every set theory book.

--
assignee: docs@python
components: Documentation
messages: 188585
nosy: abcdef, docs@python
priority: normal
severity: normal
status: open
title: Documentation: "complete ordering" should be "total ordering"
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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_zipfile.TestsWithSourceFile)
--
Traceback (most recent call last):
  File 
"/export/home/buildbot/64bits/2.7.cea-indiana-amd64/build/Lib/test/test_zipfile.py",
 line 436, in test_extract_unicode_filenames
writtenfile = zipfp.extract(fname)
  File 
"/export/home/buildbot/64bits/2.7.cea-indiana-amd64/build/Lib/zipfile.py", line 
1024, in extract
return self._extract_member(member, path, pwd)
  File 
"/export/home/buildbot/64bits/2.7.cea-indiana-amd64/build/Lib/zipfile.py", line 
1079, in _extract_member
file(targetpath, "wb") as target:
UnicodeEncodeError: 'ascii' codec can't encode characters in position 85-86: 
ordinal not in range(128)

"""

--
nosy: +neologix

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/stuff/src/klist/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17289] readline.set_completer_delims() doesn't play well with others

2013-05-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset df0afd3ebb70 by Antoine Pitrou in branch '3.3':
Issue #17289: The readline module now plays nicer with external modules or 
applications changing the rl_completer_word_break_characters global variable.
http://hg.python.org/cpython/rev/df0afd3ebb70

New changeset 0f65426009e2 by Antoine Pitrou in branch 'default':
Issue #17289: The readline module now plays nicer with external modules or 
applications changing the rl_completer_word_break_characters global variable.
http://hg.python.org/cpython/rev/0f65426009e2

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17289] readline.set_completer_delims() doesn't play well with others

2013-05-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks for the patch! I made a variable name a bit shorter and also added some 
error checking on the strdup() result.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17289] readline.set_completer_delims() doesn't play well with others

2013-05-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 55c7295aca6c by Antoine Pitrou in branch '2.7':
Issue #17289: The readline module now plays nicer with external modules or 
applications changing the rl_completer_word_break_characters global variable.
http://hg.python.org/cpython/rev/55c7295aca6c

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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/file30155/ins_macro.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-05-06 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +haypo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-05-06 Thread Charles-François Natali

Charles-François Natali added the comment:

Here's a (gigantic) patch.
I used an ad-hoc script for the conversion (next time I might try with 
coccinelle).

I tested it on Linux, FreeBSD, Openindiana, OS-X and Windows.

--
keywords: +needs review, patch
nosy: +pitrou
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12181] SIGBUS error on OpenBSD (sparc64)

2013-05-06 Thread Charles-François Natali

Charles-François Natali added the comment:

Sorry for the delay, it should be fixed now.

Federico, thanks for the patch!

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17289] readline.set_completer_delims() doesn't play well with others

2013-05-06 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: needs patch -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-05-06 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +neologix

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-05-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

(this is *because*, sorry)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-05-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Yes, this is bytecode_helper hasn't been added to the repository.

--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-05-06 Thread Charles-François Natali

Charles-François Natali added the comment:

test_dis is failing on some buildbots:

http://buildbot.python.org/all/builders/AMD64 Ubuntu LTS 
3.x/builds/1674/steps/test/logs/stdio

Re-running test 'test_dis' in verbose mode
test test_dis crashed -- Traceback (most recent call last):
  File "/opt/python/3.x.langa-ubuntu/build/Lib/test/regrtest.py", line 1294, in 
runtest_inner
the_module = importlib.import_module(abstest)
  File "/opt/python/3.x.langa-ubuntu/build/Lib/importlib/__init__.py", line 92, 
in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1603, in _gcd_import
  File "", line 1584, in _find_and_load
  File "", line 1551, in _find_and_load_unlocked
  File "", line 591, in _check_name_wrapper
  File "", line 1053, in load_module
  File "", line 1034, in load_module
  File "", line 567, in module_for_loader_wrapper
  File "", line 901, in _load_module
  File "", line 297, in _call_with_frames_removed
  File "/opt/python/3.x.langa-ubuntu/build/Lib/test/test_dis.py", line 4, in 

from test.bytecode_helper import BytecodeTestCase
ImportError: No module named 'test.bytecode_helper'

--
nosy: +neologix
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12181] SIGBUS error on OpenBSD (sparc64)

2013-05-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c6c2b216bd14 by Charles-Francois Natali in branch '2.7':
Issue #12181: select module: Fix struct kevent definition on OpenBSD 64-bit
http://hg.python.org/cpython/rev/c6c2b216bd14

New changeset f6c50b437de6 by Charles-Francois Natali in branch '3.3':
Issue #12181: select module: Fix struct kevent definition on OpenBSD 64-bit
http://hg.python.org/cpython/rev/f6c50b437de6

New changeset 557599a32821 by Charles-Francois Natali in branch 'default':
Issue #12181: select module: Fix struct kevent definition on OpenBSD 64-bit
http://hg.python.org/cpython/rev/557599a32821

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15535] Fix pickling efficiency of named tuples in 2.7.3

2013-05-06 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1545463] New-style classes fail to cleanup attributes

2013-05-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This issue is endly fixed in 3.4. Since changing the shutdown sequence is a 
delicate change, I won't backport to bugfix branches.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1545463] New-style classes fail to cleanup attributes

2013-05-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f0833e6ff2d2 by Antoine Pitrou in branch 'default':
Issue #1545463: Global variables caught in reference cycles are now 
garbage-collected at shutdown.
http://hg.python.org/cpython/rev/f0833e6ff2d2

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17833] test_gdb broken PPC64 Linux

2013-05-06 Thread Dave Malcolm

Changes by Dave Malcolm :


--
resolution:  -> fixed
stage: commit review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17833] test_gdb broken PPC64 Linux

2013-05-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f4a6b731905a by David Malcolm in branch '3.3':
#17833: fix test_gdb failures seen on PPC64 Linux in test_threads 
(test.test_gdb.PyBtTests)
http://hg.python.org/cpython/rev/f4a6b731905a

New changeset 6d971b172389 by David Malcolm in branch 'default':
#17833: merge with 3.3
http://hg.python.org/cpython/rev/6d971b172389

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3982] support .format for bytes

2013-05-06 Thread Ecir Hana

Changes by Ecir Hana :


--
nosy: +ecir.hana

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11016] Add S_ISDOOR to the stat module

2013-05-06 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13831] get method of multiprocessing.pool.Async should return full traceback

2013-05-06 Thread Richard Oudkerk

Richard Oudkerk added the comment:

The relevant changeset was c4f92b597074, but I wrote the wrong issue number in 
the commit message and Misc/NEWS.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11406] There is no os.listdir() equivalent returning generator instead of list

2013-05-06 Thread Gregory P. Smith

Gregory P. Smith added the comment:

Actually I'm thinking this duck may only have a beak. Instead of a bunch of
fields of None I'd prefer just not having that attribute defined on the
object. I consider the os specific "stat-like" info from reading a
directory to be so os specific that i'd rather not let someone be confused
by it if it were to be returned up to a higher level caller. It's not a
stat.
On May 6, 2013 2:36 AM, "Charles-François Natali" 
wrote:

>
> Charles-François Natali added the comment:
>
> > I don't think that's true in general, or true of how other Python APIs
> work. For instance, many APIs return a "file-like object", and you can only
> do certain things on that object, depending on what the documentation says,
> or what EAFP gets you. Some file-like object don't support seek/tell, some
> don't support close, etc. I've seen plenty of walk-like-a-duck checks like
> this:
>
> Yes, I'm fully aware duck-typing ;-)
> But here, you're saying that "a duck has a beak, but it *may* have
> legs, a tail, etc".
> It's just looks wrong to me on so many levels.
>
> Please bring this up on python-dev.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14187] add "function annotation" entry to Glossary

2013-05-06 Thread R. David Murray

R. David Murray added the comment:

Done.  Thanks for the ping.  And thanks for the suggestion and patch, Chris.

--
nosy: +r.david.murray
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14187] add "function annotation" entry to Glossary

2013-05-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e2a805281d26 by R David Murray in branch '3.3':
#14187: Add glossary entry for 'function annotations'.
http://hg.python.org/cpython/rev/e2a805281d26

New changeset 3e1c45f5c585 by R David Murray in branch 'default':
Merge #14187: Add glossary entry for 'function annotations'.
http://hg.python.org/cpython/rev/3e1c45f5c585

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14187] add "function annotation" entry to Glossary

2013-05-06 Thread Zachary Ware

Zachary Ware added the comment:

Would anyone mind committing this?  It was approved by Raymond almost a year 
ago now, and is still accurate.

The patch still applies cleanly to 3.3 and default, though with some fuzz.

--
versions:  -Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17883] Fix buildbot testing of Tkinter

2013-05-06 Thread Zachary Ware

Zachary Ware added the comment:

Here's the relevant bit of the output from that buildbot after Terry's change:

==
FAIL: testLoadWithUNC (test.test_tcl.TclTest)
--
Traceback (most recent call last):
  File 
"E:\Data\buildslave\cpython\2.7.snakebite-win2k3r2sp2-x86\build\lib\test\test_tcl.py",
 line 151, in testLoadWithUNC
self.assertIn('Tkinter.py', f.read())
AssertionError: 'Tkinter.py' not found in ''
--

...which doesn't say much.  Here's a patch that updates the test to use 
subprocess.Popen instead of os.popen and add some useful debugging information. 
 The test passes on my machine with and without the patch, so I can't do much 
more debugging until we get some useful output from the buildbot.

--
Added file: http://bugs.python.org/file30154/issue17883.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11016] Add S_ISDOOR to the stat module

2013-05-06 Thread Christian Heimes

Changes by Christian Heimes :


--
keywords: +patch
Added file: http://bugs.python.org/file30153/statmodule.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11016] Add S_ISDOOR to the stat module

2013-05-06 Thread R. David Murray

R. David Murray added the comment:

"Cannot be implemented correctly in Python" is a darned good reason :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5845] rlcompleter should be enabled automatically

2013-05-06 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

I am in AP's camp on the tab issue, but I think we can preserve "tab inserts 
tab" behavior at the continuation prompt.  I don't like "indent at beginning of 
line."  I have rlcompleter enabled in Python 2.6 and i get the following when I 
press tab:

Python 2.6.6 (r266:84292, Feb 22 2013, 00:00:18)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
Display all 173 possibilities? (y or n) y
ArithmeticError(abs(input(
AssertionError( all(int(
AttributeError( and intern(
BaseException(  any(is
..

I find this rather useful.

At the ... prompt, however, a tab (or better four spaces) is arguably the right 
completion at the beginning of the line.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17918] failed incoming SSL connection stays open forever

2013-05-06 Thread Peter Saveliev

Peter Saveliev added the comment:

Possible solution would be something like that in SSLSocket.do_handshake():

try:
self._sslobj.do_handshake()
except SSLError as e:  # or even any Exception?
self._sock.close()
raise e

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2013-05-06 Thread Christian Heimes

Changes by Christian Heimes :


--
components: +Library (Lib)
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file30152/filemode.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17919] AIX POLLNVAL definition causes problems

2013-05-06 Thread Delhallt

New submission from Delhallt:

I encounted exactly the same issue http://bugs.python.org/issue923315 with 
test_asyncore, test_asynchat and test_poll.

On AIX6.1, POLLNVAL=0x8000=SHRT_MIN=SHRT_MAX+1 (on 2 bytes) and parsing events 
with PyArg_ParseTuple as a signed short 'h' do not work, i.e
"OverflowError: signed short integer is greater than maximum" occurs.

I changed 'h' to 'H' in the attached patch, and delete associated Overflow test.

Perhaps, they're a better way to handle that ?

--
components: Extension Modules
files: Python-2.7.4-pollnval.patch
keywords: patch
messages: 188558
nosy: delhallt
priority: normal
severity: normal
status: open
title: AIX POLLNVAL definition causes problems
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file30151/Python-2.7.4-pollnval.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5845] rlcompleter should be enabled automatically

2013-05-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> I expect that a lot of users use the tab key to indent in the repl
> (as well as in editors, smart enough editors can convert the tab
> presses to spaces)

The interpreter prompt is not a text editor at all. You can misuse
it as one, but that's a loss of time and energy IMO.

Really, everyone I've ever showed tab-completion to has always
been enthusiastic about it ("why isn't this enabled by default?").
None has ever raised the concern of being able to use the tab key
to indent code under the prompt.

(probably because noone is crazy enough to type long chunks of
code under the interactive prompt anyway)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17911] Extracting tracebacks does too much work

2013-05-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> On Mon, May 6, 2013 at 6:06 AM, Antoine Pitrou
>  wrote:
> > Note that generator cleanup through the frame has a patch in
> > issue17807.
> 
> Sadly that doesn't help with my issue.

It won't. It's just a building block for the change I've proposed here.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5845] rlcompleter should be enabled automatically

2013-05-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Well, post it to python-dev and see what reaction you get :)

I'm not interested in python-dev reactions here. For this
kind of issue, we'll have hundreds of messages for and against
the change without any useful content.

The commit adds an often-requested feature (to the point that many
people were already taking the pain of activating it manually).
But, yes, we could add Steven's refinement so that all bases are
covered.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17911] Extracting tracebacks does too much work

2013-05-06 Thread Guido van Rossum

Guido van Rossum added the comment:

On Mon, May 6, 2013 at 6:06 AM, Antoine Pitrou  wrote:
> Note that generator cleanup through the frame has a patch in issue17807.

Sadly that doesn't help with my issue. I applied path gen3.patch and
ran various versions of the code I have. There's still something
holding on to the Task or the exception.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5845] rlcompleter should be enabled automatically

2013-05-06 Thread Ronald Oussoren

Ronald Oussoren added the comment:

I expect that a lot of users use the tab key to indent in the repl (as well as 
in editors, smart enough editors can convert the tab presses to spaces)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17911] Extracting tracebacks does too much work

2013-05-06 Thread Guido van Rossum

Guido van Rossum added the comment:

I'm not snubbing my nose at something that breaks these types of cycles more 
easily, but I still think that the abstractions offered by the traceback module 
could be improved.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11016] Add S_ISDOOR to the stat module

2013-05-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> We've been *adding* python implementations for other modules, so I
> don't see why we would remove this one.

Well, the one reason is that the C constants aren't accessible from
Python code. Once the constants are there, the rest is so trivial
that it doesn't really deserve a pure Python alternative, IMHO.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5845] rlcompleter should be enabled automatically

2013-05-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> It is a release blocker because it is a major usability regression.

Really? You can press the space key to indent, it works as well
as the tab key...

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11016] Add S_ISDOOR to the stat module

2013-05-06 Thread R. David Murray

R. David Murray added the comment:

We've been *adding* python implementations for other modules, so I don't see 
why we would remove this one.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17732] distutils.cfg Can Break venv

2013-05-06 Thread Éric Araujo

Éric Araujo added the comment:

No, patch is good to go, I just need to find some time to commit it.  If 
another core dev wants to do it sooner, please feel free to do so.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11016] Add S_ISDOOR to the stat module

2013-05-06 Thread Charles-François Natali

Charles-François Natali added the comment:

> We've been *adding* python implementations for other modules, so I don't see 
> why we would remove this one.

Because it's buggy, and cannot be implemented correctly in python.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5845] rlcompleter should be enabled automatically

2013-05-06 Thread R. David Murray

R. David Murray added the comment:

Well, post it to python-dev and see what reaction you get :)

I could be wrong, but I don't think I am (obviously).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >