[issue11612] xml.dom.minidom fail to parse SVG file.

2011-03-20 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

The .svg file you attached appears to have a faulty URI in it on line 4:

   xmlns:s=http://inkscape.sourceforge.net/DTD/s odipodi-0.dtd

The error goes away if that space character is removed.  It might be nice for 
expatbuilder to provide a better diagnostic in this case but that's not likely 
to happen unless someone is interested in providing a patch.

--
nosy: +ned.deily
stage:  - needs patch
type: crash - 
versions: +Python 2.7, Python 3.1, Python 3.3

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



[issue11608] GzipFile cannot be used for streaming

2011-03-20 Thread Nadeem Vawda

Changes by Nadeem Vawda nadeem.va...@gmail.com:


--
nosy: +nvawda

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



[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Daniel Urban

Daniel Urban urban.dani...@gmail.com added the comment:

I tried to test your patch, but the build dies with this error:
Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
  File .../cpython/Lib/io.py, line 60, in module
Aborted

I don't know why is this, but I get this error consistently with your patch, 
and no error without the patch.

On Sat, Mar 19, 2011 at 22:13, dsdal...@gmail.com wrote:
 Thank you for the feedback. The reason I suggested deprecating
 abstractproperty is that I think it is essentially broken. Subclasses
 have to redeclare the entire property, and if they forget to declare
 the setter for what is supposed to be a read/write property, there is 
 no way to catch it. With the new approach, it is possible to ensure
 that all the required features of the property have been implemented.
...
 On 2011/03/19 21:36:09, durban wrote:
  I don't think abstractproperty should be deprecated. It is still
  perfectly good to define a read-only abstract property (with one 
  decorator instead of two).

 Zen of python.

I'm guessing you're referring to There should be one-- and preferably only one 
--obvious way to do it.  That is a good point.  But currently the one way to:
- create an abstract static method: @abstractstaticmethod
- create an abstract class method: @abstractclassmethod
- create an abstract property: @abstractproperty (as you pointed out, this has 
some problems)

With your proposed change the one way to:
- create an abstract static method: @abstractstaticmethod
- create an abstract class method: @abstractclassmethod
- create an abstract property: @abstractmethod + @property
This is not a very good API.
Note, that a similar thing could be done for class/staticmethod, and then using 
@abstractmethod + @classmethod would be possible, and the API would be more 
consistent.  But it wasn't done because Guido objected it (see issue5867).

 This is the part where I am weak. Can you point me to documentation? 
 Why is an exception check necessary? Do PyObject_IsTrue and Py_DECREF 
 not know what to do when passed NULL?

http://docs.python.org/dev/py3k/c-api/object.html#PyObject_GetAttrString
If a Python API function returns NULL, that usually means that an exception was 
raised.  If you don't want the exception to propagate, you should call 
PyErr_Clear.  And I think it is not a good idea to call a function with NULL, 
unless the docs explicitly say that it can be passed NULL.

--
components: +Interpreter Core

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



[issue11608] GzipFile cannot be used for streaming

2011-03-20 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

Looks like a duplicate issue of #9664 and #914340. And has been fixed in patch 
of #914340.

--
nosy: +ysj.ray

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



[issue7990] xml.etree.cElementTree lacks full dir() on Element

2011-03-20 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


--
versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2

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



[issue3080] Full unicode import system

2011-03-20 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

http://www.python.org/dev/buildbot/all/builders/PPC%20Tiger%203.x/builds/1599/steps/test/logs/stdio

==
ERROR: testImpWrapper (test.test_importhooks.ImportHooksTestCase)
--
Traceback (most recent call last):
  File 
/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/test_importhooks.py,
 line 239, in testImpWrapper
m = __import__(mname, globals(), locals(), [__dummy__])
  File 
/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/test_importhooks.py,
 line 132, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.stuff)
  File 
/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/distutils/core.py, line 
19, in module
from distutils.cmd import Command
  File 
/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/test_importhooks.py,
 line 132, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.stuff)
  File /Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/distutils/cmd.py, 
line 11, in module
from distutils import util, dir_util, file_util, archive_util, dep_util
  File 
/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/test_importhooks.py,
 line 132, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.stuff)
  File 
/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/distutils/dir_util.py, 
line 8, in module
import errno
  File 
/Users/buildbot/buildarea/3.x.parc-tiger-1/build/Lib/test/test_importhooks.py,
 line 132, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.stuff)
TypeError: 'NoneType' object is not iterable

--

--

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



[issue3080] Full unicode import system

2011-03-20 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

 mod = imp.load_module(fullname, self.file, self.filename, self.stuff)
 TypeError: 'NoneType' object is not iterable

The problem is that imp.find_module() now returns None as the filename, but 
imp.load_module() doesn't support None.

--

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



[issue7913] Enhance Cmd support for docstrings and document it.

2011-03-20 Thread Daniel Urban

Daniel Urban urban.dani...@gmail.com added the comment:

inspect.cleandoc (which is also used by inspect.getdoc and pydoc.getdoc) seems 
to do a similar thing.  Maybe that could be used for this?

--
nosy: +durban

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



[issue11613] test_subprocess fails under Windows

2011-03-20 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

There seem to be some buglets in the timeout code:

http://www.python.org/dev/buildbot/all/builders/x86%20Windows7%203.x/builds/2783/steps/test/logs/stdio

==
ERROR: test_check_output_timeout (test.test_subprocess.ProcessTestCase)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_subprocess.py,
 line 135, in test_check_output_timeout
timeout=3)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py, 
line 533, in check_output
output, unused_err = process.communicate(timeout=timeout)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py, 
line 846, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py, 
line 1116, in _communicate
raise TimeoutExpired(self.args)
TypeError: __init__() takes at least 3 arguments (2 given)

==
ERROR: test_communicate_timeout (test.test_subprocess.ProcessTestCase)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_subprocess.py,
 line 433, in test_communicate_timeout
timeout=0.3)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py, 
line 574, in assertRaises
callableObj(*args, **kwargs)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py, 
line 846, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py, 
line 1116, in _communicate
raise TimeoutExpired(self.args)
TypeError: __init__() takes at least 3 arguments (2 given)

==
ERROR: test_communicate_timeout_large_ouput 
(test.test_subprocess.ProcessTestCase)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_subprocess.py,
 line 452, in test_communicate_timeout_large_ouput
self.assertRaises(subprocess.TimeoutExpired, p.communicate, timeout=0.4)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py, 
line 574, in assertRaises
callableObj(*args, **kwargs)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py, 
line 846, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py, 
line 1116, in _communicate
raise TimeoutExpired(self.args)
TypeError: __init__() takes at least 3 arguments (2 given)

==
ERROR: test_check_output_timeout (test.test_subprocess.ContextManagerTests)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_subprocess.py,
 line 135, in test_check_output_timeout
timeout=3)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py, 
line 533, in check_output
output, unused_err = process.communicate(timeout=timeout)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py, 
line 846, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py, 
line 1116, in _communicate
raise TimeoutExpired(self.args)
TypeError: __init__() takes at least 3 arguments (2 given)

==
ERROR: test_communicate_timeout (test.test_subprocess.ContextManagerTests)
--
Traceback (most recent call last):
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_subprocess.py,
 line 433, in test_communicate_timeout
timeout=0.3)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\unittest\case.py, 
line 574, in assertRaises
callableObj(*args, **kwargs)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py, 
line 846, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
  File 
D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py, 
line 1116, in _communicate
raise TimeoutExpired(self.args)
TypeError: __init__() takes at least 3 arguments (2 given)


[issue4492] httplib code thinks it closes connection, but does not

2011-03-20 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

Another fix could be making HTTPResponse to hold a reference to the 
HTTPConnection object and call its close() at the time of a bad chunk
length was received. This can close the connection as soon as possible.

--

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



[issue10050] urllib.request still has old 2.x urllib primitives

2011-03-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 There is one comment which I forgot to mention earlier.
 
 The current urlretrieve function is internally calling the URLOpener's
 retrieve method. 
 
 Those URLOpener class might need a DeprecationWarning while address
 thing bug and that particular retrieve method can be updated to use
 the updated facility just as bonus till the time it survives.
 
 Antoine - any suggestions on the last point?

Can you clarify the issue?

--

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



[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

2011-03-20 Thread Daniel Urban

Daniel Urban urban.dani...@gmail.com added the comment:

Here is a patch for list.  It modifies the following C API functions:
PyList_SetItem
PyList_Insert
PyList_Append
PyList_SetSlice
PyList_Sort
PyList_Reverse
_PyList_Extend

It also includes tests (with ctypes).

I plan to do next the same for dict, but first I'd wait for comments, to know 
if I'm doing something completely wrong :-)

--
keywords: +patch
Added file: http://bugs.python.org/file21303/issue10977_list.patch

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



[issue10050] urllib.request still has old 2.x urllib primitives

2011-03-20 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

Antoine Pitrou wrote:
 Can you clarify the issue?

URLopener which is an old class from the merge of urllib and urllib2
and it can be slowly and safely removed. If we go this line, then I
assume it has to have a DeprecationWarning before we remove it. Should
we or not?

My thought is, in Python 3.x these may not be in use, but still if we
remove without DeprecationWarning, it could raise concerns with some
folks (given some discussion about this recently when people trying to
upgrade from 2.x to 3.x).

At the moment, urlretrieve function is calling  URLopener.retrieve internally.
But this patch addresses urlretrive function at much higher level and leaves
the URLopener.retrieve in a hanging state. So, I was thinking how to
handle this scenario.

Change URLopener.retrieve also with the cleaner and modern code, but
and add a DeprecationWarning in those.

--

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



[issue10050] urllib.request still has old 2.x urllib primitives

2011-03-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 URLopener which is an old class from the merge of urllib and urllib2
 and it can be slowly and safely removed. If we go this line, then I
 assume it has to have a DeprecationWarning before we remove it. Should
 we or not?

Yes, we should.

 Change URLopener.retrieve also with the cleaner and modern code, but
 and add a DeprecationWarning in those.

Sounds overkill and of questionable interest.
Honestly, I don't think URLopener.retrieve() has much point anyway.
Perhaps it would have if the whole caching thing had been implemented.

--

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



[issue7908] remove leftover macos9 support code

2011-03-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I’ve just noticed this problem:

--- a/Misc/BeOS-setup.py
+++ b/Misc/BeOS-setup.py
@@ -356,7 +356,7 @@ class PyBuildExt(build_ext):
libraries = dblib) )
 
 # Unix-only modules
-if platform not in ['mac', 'win32']:
+if platform == 'win32':

The logic is reversed.  Shall I fix it in all affected branches?

--

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



[issue11604] Have type(n,b,d) check for type(b[i]) is module

2011-03-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 raise TypeError('Cannot subclass module')
It is possible to subclass module.

Ray: right, but 2.x still has a long life ahead of it, so we still want to 
improve its doc.

--
nosy: +eric.araujo

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



[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

2011-03-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Hmm, making PyList_* an abstract API doesn't make sense to me. These functions 
do exactly what they say: they operate on concrete instances of list (they are 
documented as part of the concrete API). With that reasoning, we should have 
fallback paths in every function in the concrete APIs; that's a lot of 
complication added to these C files.

IMO we should (or, rather, could) instead add abstract PySequence_Append(), 
etc. functions if we deem it necessary (just as we already have 
PyMapping_Keys(), etc.).

By the way, PyList_SetItem() already has an abstract counterpart called 
PyObject_SetItem(), so changing this one seems useless.

--
nosy: +pitrou

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



[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

2011-03-20 Thread Andreas Stührk

Changes by Andreas Stührk andy-pyt...@hammerhartes.de:


--
nosy: +Trundle

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



[issue9740] Support for HTTP 1.1 persistent connections throughout the standard library

2011-03-20 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
versions: +Python 3.3 -Python 3.2

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



[issue7198] Extraneous newlines with csv.writer on Windows

2011-03-20 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 9201455f950b by R David Murray in branch '3.1':
#7198: really add newline='' to csv.writer docs.
http://hg.python.org/cpython/rev/9201455f950b

New changeset fa0563f3b7f7 by R David Murray in branch '3.2':
Really merge #7198
http://hg.python.org/cpython/rev/fa0563f3b7f7

New changeset ed0d1e07ce79 by R David Murray in branch 'default':
Dummy merge #7198
http://hg.python.org/cpython/rev/ed0d1e07ce79

--

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



[issue7198] Extraneous newlines with csv.writer on Windows

2011-03-20 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

OK, now it's really done (I hope!).

--
status: open - closed

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



[issue4492] httplib code thinks it closes connection, but does not

2011-03-20 Thread Senthil Kumaran

Changes by Senthil Kumaran orsent...@gmail.com:


--
assignee:  - orsenthil
nosy: +orsenthil

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



[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Darren Dale

Darren Dale dsdal...@gmail.com added the comment:

On Sun, Mar 20, 2011 at 5:18 AM, Daniel Urban rep...@bugs.python.org wrote:

 Daniel Urban urban.dani...@gmail.com added the comment:

 I tried to test your patch, but the build dies with this error:
 Fatal Python error: Py_Initialize: can't initialize sys standard streams
 Traceback (most recent call last):
  File .../cpython/Lib/io.py, line 60, in module
 Aborted

 I don't know why is this, but I get this error consistently with your patch, 
 and no error without the patch.

 On Sat, Mar 19, 2011 at 22:13, dsdal...@gmail.com wrote:
 Thank you for the feedback. The reason I suggested deprecating
 abstractproperty is that I think it is essentially broken. Subclasses
 have to redeclare the entire property, and if they forget to declare
 the setter for what is supposed to be a read/write property, there is
 no way to catch it. With the new approach, it is possible to ensure
 that all the required features of the property have been implemented.
 ...
 On 2011/03/19 21:36:09, durban wrote:
  I don't think abstractproperty should be deprecated. It is still
  perfectly good to define a read-only abstract property (with one
  decorator instead of two).

 Zen of python.

 I'm guessing you're referring to There should be one-- and preferably only 
 one --obvious way to do it.  That is a good point.  But currently the one 
 way to:
 - create an abstract static method: @abstractstaticmethod
 - create an abstract class method: @abstractclassmethod
 - create an abstract property: @abstractproperty (as you pointed out, this 
 has some problems)

 With your proposed change the one way to:
 - create an abstract static method: @abstractstaticmethod
 - create an abstract class method: @abstractclassmethod
 - create an abstract property: @abstractmethod + @property
 This is not a very good API.

Unlike methods, properties are composite objects. It is therefore
reasonable that creating an abstract property might be a little
different from creating an abstract method.

 Note, that a similar thing could be done for class/staticmethod, and then 
 using @abstractmethod + @classmethod would be possible, and the API would be 
 more consistent.  But it wasn't done because Guido objected it (see 
 issue5867).

Thank you for pointing that out. I've followed up with him at
python-ideas to seek clarification (he did not raise this point when I
posted the change to descrobject.c)

 This is the part where I am weak. Can you point me to documentation?
 Why is an exception check necessary? Do PyObject_IsTrue and Py_DECREF
 not know what to do when passed NULL?

 http://docs.python.org/dev/py3k/c-api/object.html#PyObject_GetAttrString

I'm familiar with that page. Do you know of any documentation
addressing how to anticipate and respond to NULL?

--

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



[issue7198] Extraneous newlines with csv.writer on Windows

2011-03-20 Thread Skip Montanaro

Skip Montanaro s...@pobox.com added the comment:

John Skip, The changes that I suggested have NOT been made. Please
John re-read the doc page you pointed to. The writer paragraph does
John NOT mention that newline='' is required when writing. The writer
John examples do NOT include newline=''. The examples have NOT been
John enhanced by using a with statement and not using space as an
John example delimiter.

I copied the statement about using newline= from the reader() doc to the
writer() doc.  All the examples I see (I'm looking at the cpython repo -
that is, what will be 3.3) use the with statement and open files using
newline=''.  I don't think more changes are necessary.  I will consult with
other Python developers about merging these changes to other active
branches.  I simply don't understand the new Mercurial workflow well enough
to do it properly.

Skip

--

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



[issue11614] import __hello__ is broken in Python 3

2011-03-20 Thread STINNER Victor

New submission from STINNER Victor victor.stin...@haypocalc.com:

import __hello__ doesn't print any message!!!

--
messages: 131499
nosy: benjamin.peterson, georg.brandl, haypo
priority: release blocker
severity: normal
status: open
title: import __hello__ is broken in Python 3
versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4

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



[issue11614] import __hello__ is broken in Python 3

2011-03-20 Thread Andreas Stührk

Andreas Stührk andy-pyt...@hammerhartes.de added the comment:

That was changed in [a2213060d9dd], see issue #1414.

--
nosy: +Trundle

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



[issue7198] Extraneous newlines with csv.writer on Windows

2011-03-20 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 88876a264ebe by R David Murray in branch '3.1':
Markup fixes for #7198 patch.
http://hg.python.org/cpython/rev/88876a264ebe

New changeset d0d1235cb66e by R David Murray in branch '3.2':
Merge markup fixes for #7198 patch.
http://hg.python.org/cpython/rev/d0d1235cb66e

New changeset 2a8580f4897c by R David Murray in branch 'default':
Markup fixes for #7198 patch.
http://hg.python.org/cpython/rev/2a8580f4897c

--

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



[issue7913] Enhance Cmd support for docstrings and document it.

2011-03-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

You can apply the patch (which includes tests) and edit the code of cmd.py to 
use cleandoc.

--
versions: +Python 3.3 -Python 3.2

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



[issue11615] sporadic failure in test_posix

2011-03-20 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

From 
http://www.python.org/dev/buildbot/all/builders/PPC%20Ubuntu%203.x/builds/779/steps/test/logs/stdio

==
FAIL: test_fexecve (test.test_posix.PosixTester)
--
Traceback (most recent call last):
  File 
/var/lib/buildbot/buildarea/3.x.warsaw-ubuntu-ppc/build/Lib/test/test_posix.py,
 line 153, in test_fexecve
self.assertEqual(os.wait(), (pid, 0))
AssertionError: Tuples differ: (19299, 0) != (19303, 0)

First differing element 0:
19299
19303

- (19299, 0)
+ (19303, 0)


Perhaps there was another process from another test still executing?
support.reap_children() should help avoid that.

--
components: Tests
messages: 131503
nosy: pitrou, rosslagerwall
priority: normal
severity: normal
status: open
title: sporadic failure in test_posix
type: behavior
versions: Python 3.3

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



[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

I think a better idea would be to override getter and friends on the 
abstractproperty class.

--
nosy: +benjamin.peterson

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



[issue10050] urllib.request still has old 2.x urllib primitives

2011-03-20 Thread Jeff McNeil

Jeff McNeil j...@jmcneil.net added the comment:

I'm not exactly sure what the steps are with respect to the DeprecationWarning. 
Is the common case just to raise the warning in the __init__ method? Are there 
related documentation changes?

Thanks again! Learning a ton. Hopefully the next patch I submit will go much 
smoother.

--

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



[issue11615] sporadic failure in test_posix

2011-03-20 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

Thanks for pointing that out. I'll just use waitpid() instead to wait on the 
desired pid only.

--

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



[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Darren Dale

Darren Dale dsdal...@gmail.com added the comment:

On Sun, Mar 20, 2011 at 12:19 PM, Benjamin Peterson
rep...@bugs.python.org wrote:

 Benjamin Peterson benja...@python.org added the comment:

 I think a better idea would be to override getter and friends on the 
 abstractproperty class.

I just suggested the same at python-ideas. I'll work on an alternate patch.

--

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



[issue11615] sporadic failure in test_posix

2011-03-20 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset aedad9e14135 by Ross Lagerwall in branch 'default':
Issue #11615: Fix sporadic buildbot failures related to #10812.
http://hg.python.org/cpython/rev/aedad9e14135

--
nosy: +python-dev

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



[issue11567] http.server error message format

2011-03-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Well, it is possible to disagree with the W3C on that particular point :)

http://hixie.ch/advocacy/xhtml
http://www.xml.com/pub/a/2004/07/21/dive.html
http://www.cs.tut.fi/~jkorpela/html/empty.html
http://diveintomark.org/archives/2004/01/14/thought_experiment

--

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



[issue11616] reap_children should not use WNOHANG

2011-03-20 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

Using WNOHANG means that still-running children won't get collected. This seems 
to defeat the point of reap_children(). This patch seems to work:


diff -r adbdb3e74461 Lib/test/support.py
--- a/Lib/test/support.py   Sun Mar 20 17:36:26 2011 +0100
+++ b/Lib/test/support.py   Sun Mar 20 17:45:35 2011 +0100
@@ -1294,10 +1294,9 @@ def reap_children():
 while True:
 try:
 # This will raise an exception on Windows.  That's ok.
-pid, status = os.waitpid(any_process, os.WNOHANG)
-if pid == 0:
-break
-except:
+pid, status = os.waitpid(any_process, 0)
+except OSError:
+# Either we're on Windows, or no running child remains.
 break
 
 @contextlib.contextmanager

--
components: Tests
messages: 131510
nosy: nnorwitz, pitrou, rosslagerwall
priority: normal
severity: normal
stage: patch review
status: open
title: reap_children should not use WNOHANG
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



[issue10050] urllib.request still has old 2.x urllib primitives

2011-03-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Antoine: you’re right about not mixing concerns, sorry.

Regarding deprecation, we should be cautious and maybe plan it across more than 
two versions.  See thread starting at 
http://mail.python.org/pipermail/python-dev/2011-March/109450.html

--

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



[issue11616] reap_children should not use WNOHANG

2011-03-20 Thread Ross Lagerwall

Ross Lagerwall rosslagerw...@gmail.com added the comment:

I'm not sure. Was reap_children() meant to just reap zombie processes or wait 
for all children to finish?

It seems like it was written to just reap zombie processes. Might this not 
cause hangs during testing sometimes if a subprocess that was started has 
itself hung?

--

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



[issue11616] reap_children should not use WNOHANG

2011-03-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 I'm not sure. Was reap_children() meant to just reap zombie processes
 or wait for all children to finish?

Apparently just to reap zombie processes. At least that was the initial
intent. And it's true that we don't really need to collect all children
immediately, so perhaps this patch is overkill.

 It seems like it was written to just reap zombie processes. Might this
 not cause hangs during testing sometimes if a subprocess that was
 started has itself hung?

Yep.

--

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



[issue11617] Sporadic failure in test_httpservers

2011-03-20 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

http://www.python.org/dev/buildbot/all/builders/x86%20OpenIndiana%203.2/builds/101/steps/test/logs/stdio


test test_httpservers failed -- Traceback (most recent call last):
  File 
/export/home/buildbot/32bits/3.2.cea-indiana-x86/build/Lib/test/test_httpservers.py,
 line 136, in test_version_digits
res = self.con.getresponse()
  File 
/export/home/buildbot/32bits/3.2.cea-indiana-x86/build/Lib/http/client.py, 
line 1046, in getresponse
response.begin()
  File 
/export/home/buildbot/32bits/3.2.cea-indiana-x86/build/Lib/http/client.py, 
line 346, in begin
version, status, reason = self._read_status()
  File 
/export/home/buildbot/32bits/3.2.cea-indiana-x86/build/Lib/http/client.py, 
line 328, in _read_status
raise BadStatusLine(line)
http.client.BadStatusLine: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 
Strict//EN

--
assignee: orsenthil
components: Library (Lib), Tests
messages: 131514
nosy: orsenthil, pitrou
priority: normal
severity: normal
status: open
title: Sporadic failure in test_httpservers
type: behavior
versions: Python 3.2, Python 3.3

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



[issue11618] Locks broken wrt timeouts on Windows

2011-03-20 Thread sbt

New submission from sbt shibt...@gmail.com:

In thread_nt.h, when the WaitForSingleObject() call in
EnterNonRecursiveMutex() fails with WAIT_TIMEOUT (or WAIT_FAILED) the
mutex is left in an inconsistent state.

Note that the first line of EnterNonRecursiveMutex() is the comment

/* Assume that the thread waits successfully */

Allowing EnterNonRecursiveMutex() to fail with a timeout obviously
violates this promise ;-)  I think the problem was introduced to Python
3.2 with:

 Issue7316: Add a timeout functionality to common locking operations.


The following Windows session demonstrates unexpected behaviour:

Python 3.3a0 (default, Mar 19 2011, 18:16:48) [MSC v.1500 32 bit (Intel)] on 
win32
Type help, copyright, credits or license for more information.
 import threading
 l = threading.Lock()
 l.acquire()
True
 l.acquire(timeout=1)
False
 l.release()
 l.locked()  # should return False
True
 l.acquire(blocking=False)   # should return True
False


Also, after a timeout, uncontended acquires/releases always take the
slow path:

D:\Repos\cpython\PCbuildpython -m timeit ^
More? -s from threading import Lock; l = Lock() ^
More? l.acquire();l.release()
100 loops, best of 3: 0.974 usec per loop

D:\Repos\cpython\PCbuildpython -m timeit ^
More? -s from threading import Lock; l = Lock() ^
More? -s l.acquire();l.acquire(timeout=0.1);l.release() ^
More? l.acquire();l.release()
10 loops, best of 3: 2.18 usec per loop


A unit test is attached which passes on Linux but has three failures
on Windows.


The owned field of NRMUTEX is a count of the number of threads
waiting for the mutex (not including the owner).  owned will
over-estimate the number of waiters if a timeout occurs, because the
timed out thread will still be counted as a waiter.

The obvious fix is to decrement mutex-owned when a timeout occurs.
Unfortunately that would introduce a race which might allow two
threads to think they own the lock at the same time.

I also notice that EnterNonRecursiveMutex() wrongly sets
mutex-thread_id to the current thread even when it fails with a
timeout.  It appears that the thread_id field is never actually used
-- is it there to help with debugging?  Perhaps it should just be
removed.

BTW only thread_pthread.h and thread_nt.h have implementations of
PyThread_acquire_lock_timed().  Since this function appears to be
required by _threadmodule.c, does this mean that in Python 3.2
threads are only supported with pthreads and win32?  If so you can
get rid of all those other thread_*.h files.

--
files: test-timeout.py
messages: 131515
nosy: sbt
priority: normal
severity: normal
status: open
title: Locks broken wrt timeouts on Windows
type: behavior
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file21304/test-timeout.py

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



[issue3080] Full unicode import system

2011-03-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Attached patch fixes a typo in Doc/c-api/import.rst.  You can merge it in your 
next commit.

--
Added file: http://bugs.python.org/file21305/typo.diff

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



[issue11618] Locks broken wrt timeouts on Windows

2011-03-20 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +krisvale, pitrou

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



[issue8754] ImportError: quote bad module name in message

2011-03-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Victor changed the code to use repr in some modules but not all in c4361bab6914.

--

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



[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Darren Dale

Darren Dale dsdal...@gmail.com added the comment:

On Sun, Mar 20, 2011 at 5:18 AM, Daniel Urban rep...@bugs.python.org wrote:

 Daniel Urban urban.dani...@gmail.com added the comment:

 I tried to test your patch, but the build dies with this error:
 Fatal Python error: Py_Initialize: can't initialize sys standard streams
 Traceback (most recent call last):
  File .../cpython/Lib/io.py, line 60, in module
 Aborted

 I don't know why is this, but I get this error consistently with your patch, 
 and no error without the patch.

Have you added any print statements to the patch? I'm working on a
completely new patch, which only touches abc.py on an existing
python3.2 install. When I add a print statement to the abstract
property creation routine, and run test_abc.py, I get the same error.

--

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



[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Benjamin Peterson

Benjamin Peterson benja...@python.org added the comment:

2011/3/20 Darren Dale rep...@bugs.python.org:

 Darren Dale dsdal...@gmail.com added the comment:

 On Sun, Mar 20, 2011 at 5:18 AM, Daniel Urban rep...@bugs.python.org wrote:

 Daniel Urban urban.dani...@gmail.com added the comment:

 I tried to test your patch, but the build dies with this error:
 Fatal Python error: Py_Initialize: can't initialize sys standard streams
 Traceback (most recent call last):
  File .../cpython/Lib/io.py, line 60, in module
 Aborted

 I don't know why is this, but I get this error consistently with your patch, 
 and no error without the patch.

 Have you added any print statements to the patch? I'm working on a
 completely new patch, which only touches abc.py on an existing
 python3.2 install. When I add a print statement to the abstract
 property creation routine, and run test_abc.py, I get the same error.

That's likely because the io library depends on abcs, so using print
in them creates a dependency cycle.

--

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



[issue11618] Locks broken wrt timeouts on Windows

2011-03-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 It appears that the thread_id field is never actually used
 -- is it there to help with debugging?  Perhaps it should just be
 removed.

True, I think we can remove it.

 does this mean that in Python 3.2
 threads are only supported with pthreads and win32?  If so you can
 get rid of all those other thread_*.h files.

Getting ridding them is scheduled for 3.3.

--

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



[issue11618] Locks broken wrt timeouts on Windows

2011-03-20 Thread sbt

sbt shibt...@gmail.com added the comment:

First stab at a fix.

Gets rid of mutex-thread_id and adds a mutex-timeouts counter.

Does not try to prevent mutex-owned from overflowing.

When no timeouts have occurred I don't think it changes behaviour, and it uses 
the same number of Interlocked functions.

--
keywords: +patch
Added file: http://bugs.python.org/file21306/locktimeout.patch

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



[issue11604] Have type(n,b,d) check for type(b[i]) is module

2011-03-20 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

Whoops. That should be 'Cannot subclass a module' or 'Cannot subclass module 
%s' % modulename.  Types.ModuleType can indeed by subclassed.

I agree that this is not a pressing issue, but it will at least provide an 
answer to anyone searching the tracker for the current message.

--

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



[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Darren Dale

Darren Dale dsdal...@gmail.com added the comment:

Thank you Daniel and Benjamin for the helpful feedback. I think the attached 
patch is a much better approach. It only touches abc.abstractproperty (instead 
of the builtin property), and uses a class method as a factory to return 
instances of either property or abstractproperty, depending on whether it holds 
any references to abstractmethods.

The patch is backwards compatible with the existing (though in my opinion, 
still broken) syntax of passing concrete methods to the abstractproperty 
constructor. I say that syntax is broken because properties are composite 
objects, and it is the methods that inherently make a property abstract or 
concrete. If one passes concrete getters and setters to abstractproperty, how 
do we know when the property has become concrete? Thus, I changed the 
documentation to refer to the more robust approach of passing abstractproperty 
methods that have been decorated with abstractmethod.

Unit tests are also provided. I still have not been able to build from my hg 
checkout, but I copied abc.py into my working 3.2 installation and ran the new 
test_abc.py without errors.

I'll be happy to address any additional concerns.

--
Added file: http://bugs.python.org/file21307/issue11610.patch

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



[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Darren Dale

Changes by Darren Dale dsdal...@gmail.com:


Removed file: 
http://bugs.python.org/file21293/property_with_abstractmethod.patch

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



[issue11610] Improving property to accept abstract methods

2011-03-20 Thread Darren Dale

Changes by Darren Dale dsdal...@gmail.com:


Removed file: 
http://bugs.python.org/file21295/property_with_abstractmethod_v2.patch

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



[issue11618] Locks broken wrt timeouts on Windows

2011-03-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Well, Windows 2000 has semaphores, so why not use them? It makes the code much 
simpler. Patch attached (including test).

--
nosy: +loewis
Added file: http://bugs.python.org/file21308/semlocknt.patch

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



[issue11618] Locks broken wrt timeouts on Windows

2011-03-20 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +brian.curtin, tim.golden

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



[issue11618] Locks broken wrt timeouts on Windows

2011-03-20 Thread sbt

sbt shibt...@gmail.com added the comment:

Have you tried benchmarking it?

Interlocked functions are *much* faster than Win32 mutex/semaphores in the 
uncontended case.  

It only doubles the time taken for a l.acquire(); l.release() loop in Python 
code, but at the C level it is probably 10 times slower.  

Do you really want the GIL to be 10 times slower in the uncontended case? ;-)

--

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



[issue4391] use proper gettext plurals forms in argparse and optparse

2011-03-20 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 4a5782a2b074 by Éric Araujo in branch 'default':
Use proper gettext plural forms in optparse (closes #4391).
http://hg.python.org/cpython/rev/4a5782a2b074

--
nosy: +python-dev
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue11618] Locks broken wrt timeouts on Windows

2011-03-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Have you tried benchmarking it?
 
 Interlocked functions are *much* faster than Win32 mutex/semaphores in
 the uncontended case.  

Well, I'd rather have obviously correct code than
difficult-to-understand speedy code.

The patch I've posted takes less than a microsecond per acquire/release
pair, and that's in a virtual machine to begin with.

 Do you really want the GIL to be 10 times slower in the uncontended case? ;-)

The GIL doesn't use these functions (see ceval_gil.h).

--

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



[issue2200] find_executable fails to find .bat files on win32

2011-03-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Martin, could you please review patch file11359?

--
nosy: +loewis
versions: +Python 3.3

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



[issue11615] sporadic failure in test_posix

2011-03-20 Thread Ross Lagerwall

Changes by Ross Lagerwall rosslagerw...@gmail.com:


--
assignee:  - rosslagerwall
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue11618] Locks broken wrt timeouts on Windows

2011-03-20 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

Interestingly, it used to be a Semaphore up to [5e6e9e893acd]; in 
[cde4da18c4fa], Yakov Markovitch rewrote this to be the faster implementation 
we have today.

--

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



[issue11618] Locks broken wrt timeouts on Windows

2011-03-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Interestingly, it used to be a Semaphore up to [5e6e9e893acd]; in
 [cde4da18c4fa], Yakov Markovitch rewrote this to be the faster
 implementation we have today.

At that time, the Pythread_* functions were still in use by the GIL
implementation, and it made a difference judging by the commit message.

--

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



[issue11397] os.path.realpath() may produce incorrect results

2011-03-20 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

Attaching a unittest that will manifest this bug.

--
keywords: +patch
Added file: http://bugs.python.org/file21309/test_issue11397.patch

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



[issue2200] find_executable fails to find .bat files on win32

2011-03-20 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

I think the patch is incorrect. Parsing PATHEXT means that it will believe that 
all extensions listed on PATHEXT are executable. However, os.spawnv is not able 
to run them all, but only a subset. IIUC, spawnv supports (from spawnve.c)

static _TSCHAR *ext_strings[] = { _T(.cmd), _T(.bat), _T(.exe), 
_T(.com) };

PATHEXT typically includes also .js and other extensions which cannot be run 
through spawnv.

--

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



[issue11618] Locks broken wrt timeouts on Windows

2011-03-20 Thread Martin v . Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

 At that time, the Pythread_* functions were still in use by the GIL
 implementation, and it made a difference judging by the commit message.

Hmm. And if some application uses thread.lock heavily, won't it still
make a difference?

--

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



[issue11397] os.path.realpath() may produce incorrect results

2011-03-20 Thread Terry J. Reedy

Changes by Terry J. Reedy tjre...@udel.edu:


--
stage: test needed - needs patch

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



[issue11618] Locks broken wrt timeouts on Windows

2011-03-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

  At that time, the Pythread_* functions were still in use by the GIL
  implementation, and it made a difference judging by the commit message.
 
 Hmm. And if some application uses thread.lock heavily, won't it still
 make a difference?

An acquire/release pair is less than one microsecond here. Compared to
the evaluation overhead of Python code, it seems not very significant.
That said, if someone can guarantee than the complex approach is
correct, why not.

--

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



[issue11494] Confusing error message from warnings.warn

2011-03-20 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

I'm not crazy about the idea of adding an inspect.isclass() check simply to 
clear up this rare error message. It's still decipherable what the problem is 
from the issubclass() message.

Closing as won't fix.

--
resolution:  - wont fix
status: open - closed

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



[issue11591] python -S should be robust against e.g. from site import addsitedir

2011-03-20 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

This is what I get for trying to clean up site.py years ago. =)

I'm fine with the change as long as there is a very clear Misc/NEWS message 
that the semantics on import have changed (and obviously this is not 
backported).

--
assignee:  - eric.araujo

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



[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

2011-03-20 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

 By the way, PyList_SetItem() already has an 
 abstract counterpart called PyObject_SetItem(), 
 so changing this one seems useless.

The problem isn't a lack of available abstract
functions. If some code uses PyObject_SetItem(),
then it already works for both list and dict
subclasses. The issue arises only for code that is 
already using PyDict_SetItem() or PyList_SetItem().

The concrete methods pre-date the abstract methods
and pre-date the ability to subclass built-in types.
Those concrete methods were never updated to reflect
the new reality.  They now only make sense for exact
type matches because they know nothing about 
subclasses and their invariants.


IOW, if some patch is accepted, it needs to be aimed
at the concrete functions to make them subclass aware.

--

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



[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

2011-03-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 The problem isn't a lack of available abstract
 functions.

Then what is it exactly?
You are arguing for PyList_SetItem() to have the same semantics as
PyObject_SetItem(), but what's the point of having two functions which
do exactly the same thing? It doesn't make sense to me.

--

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



[issue11613] test_subprocess fails under Windows

2011-03-20 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

The timeout value given to wait() is multiplied by 1000 before being passed to 
TimeoutExpired constructor. The multiplication is unnecessary since we take the 
input unit as time unit second.

--
keywords: +patch
nosy: +santa4nt
Added file: http://bugs.python.org/file21310/timeoutsec.patch

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



[issue11149] [PATCH] Configure should enable -fwrapv for clang

2011-03-20 Thread Ismail Donmez

Ismail Donmez ism...@namtrac.org added the comment:

Whats holding this up?

--

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



[issue3080] Full unicode import system

2011-03-20 Thread Andrew Svetlov

Changes by Andrew Svetlov andrew.svet...@gmail.com:


--
nosy: +asvetlov

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



[issue11613] test_subprocess fails under Windows

2011-03-20 Thread Santoso Wijaya

Changes by Santoso Wijaya santoso.wij...@gmail.com:


Removed file: http://bugs.python.org/file21310/timeoutsec.patch

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



[issue3722] print followed by exception eats print with doctest

2011-03-20 Thread Chris Withers

Chris Withers ch...@simplistix.co.uk added the comment:

Terry,

My original post was not about *temporary* output inserted for debugging, but 
test mocks and the like which form a permanent part of the test and which 
output to stdout.

cheers,

Chris

--

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



[issue11613] test_subprocess fails under Windows

2011-03-20 Thread Santoso Wijaya

Santoso Wijaya santoso.wij...@gmail.com added the comment:

Actually, the multiplication was necessary because 
_subprocess.WaitForSingleObject takes the timeout argument in millisecond unit. 
Defer multiplication until then.

--
Added file: http://bugs.python.org/file21311/timeoutsec.patch

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



[issue11613] test_subprocess fails under Windows

2011-03-20 Thread Reid Kleckner

Reid Kleckner r...@mit.edu added the comment:

It is necessary, WaitForSingleObject takes its argument in
milliseconds.  It will make the exception message wrong, though, which
I can fix.

Reid

On Sun, Mar 20, 2011 at 1:46 PM, Santoso Wijaya rep...@bugs.python.org wrote:

 Santoso Wijaya santoso.wij...@gmail.com added the comment:

 The timeout value given to wait() is multiplied by 1000 before being passed 
 to TimeoutExpired constructor. The multiplication is unnecessary since we 
 take the input unit as time unit second.

 --
 keywords: +patch
 nosy: +santa4nt
 Added file: http://bugs.python.org/file21310/timeoutsec.patch

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue11613
 ___


--

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



[issue11149] [PATCH] Configure should enable -fwrapv for clang

2011-03-20 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

Someone having the time to do a patch review.

--
keywords: +needs review
stage:  - patch review

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



[issue11608] GzipFile cannot be used for streaming

2011-03-20 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

As Ray points out, this feature is now available in Python 3.2. It was not 
backported to Python 2.7 as only bug fixes are now being accepted for Python 
2.x, not new features.

--
nosy: +ned.deily
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - gzip.GzipFile to accept stream as fileobj.

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



[issue11254] distutils doesn't byte-compile .py files to __pycache__ during installation

2011-03-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I cleaned up the patch a bit.  In particular, I removed the dance around 
imp.cache_from_source that seemed unnecessary.  I tested with regular Python, 
with PYTHONOPTIMIZE and with PYTHONDONTWRITEBYTECODE.  Can you review and test 
too?

--
Added file: http://bugs.python.org/file21312/bug-11254.diff

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



[issue3080] Full unicode import system

2011-03-20 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 7f4a4e393058 by Victor Stinner in branch 'default':
Issue #3080: imp.load_module() accepts None for the module path
http://hg.python.org/cpython/rev/7f4a4e393058

--

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



[issue10617] Collections ABCs can’t be linked to

2011-03-20 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

I would recommend to document the classes like all other classes.  It may take 
a bit more space, but it will be a) standard and b) linkable.

--

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



[issue11393] Integrate faulthandler module into Python 3.3

2011-03-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

It would be nice if it were enabled by default for fatal errors (and asserts 
perhaps?).

--
nosy: +pitrou

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



[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

2011-03-20 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

It's largely a backwards compatibility hack, but the concrete methods also have 
an optimised fast path that the generic methods lack.

So (for example), PyList_SetItem would now mean this is *probably* a list, so 
check for that and use the fast path if the assumption is correct, otherwise 
fall back on PyObject_SetItem.

Currently, using the concrete API means your code potentially *breaks* if the 
assumption is incorrect.

Sounds like a good idea to me, and will fix a lot of cases of bad interaction 
between concrete types and related objects.

--
nosy: +ncoghlan

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



[issue10977] Concrete object C API needs abstract path for subclasses of builtin types

2011-03-20 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

I'm just pointing out a problem.  Lots of existing code uses the concrete API 
and that code can break subclasses of builtin types (possibly resulting in 
segfaults).

I don't really care what is done about it.  I'm just observing that the current 
design of the concrete API is incompatible with subclassing of built-in types.

A practical consequence is that I don't see how to write a fast, light C 
version of OrderedDict that would be safe from calls to PyDict_SetItem().  
AFAICT, there is no mechanism for adding extra state to a built-in type and 
being able to guarantee even very simple invariants.

--

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



[issue11342] ResourceWarning: unclosed file _io.TextIOWrapper

2011-03-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

The test failures you quoted are not related to distutils.

I cannot see the ResourceWarnings in 3.2 or 3.3, so I think I’m going to close 
this issue.

--
components:  -Distutils, Distutils2
status: open - pending
versions:  -3rd party, Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



[issue11586] Python/pythonrun.c: get_codec_name() typo

2011-03-20 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 929aafef5b05 by Victor Stinner in branch 'default':
Fix #11586: typo in initfsencoding()
http://hg.python.org/cpython/rev/929aafef5b05

--
nosy: +python-dev

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



[issue11586] Python/pythonrun.c: get_codec_name() typo

2011-03-20 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 0b6f6514461e by Victor Stinner in branch '3.2':
Fix #11586: typo in initfsencoding()
http://hg.python.org/cpython/rev/0b6f6514461e

--

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



[issue11586] Python/pythonrun.c: get_codec_name() typo

2011-03-20 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Fixed, thanks Ray.

--
resolution:  - fixed
status: open - closed

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



[issue901727] extra_path kwarg to setup() undocumented

2011-03-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I added the missing words and reworded a few lines in the attached patch.

That said, I find that the new doc is barely helpful; it describes what the 
code does, but does not explain why one would want to use it.  Comments in the 
source suggest it’s a hack to support some corner case.  This is still obscure 
to me after reading about it and looking at the code :(

--
Added file: http://bugs.python.org/file21313/apiref-followup.diff

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



[issue9364] some problems with the documentation of pydoc

2011-03-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

yeswanth, would you like more guidance or should I finish the patches?

--

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



[issue11395] print(s) fails on Windows with long strings

2011-03-20 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 8939a21bdb94 by Victor Stinner in branch '3.2':
Issue #11395: io.FileIO().write() clamps the data length to 32,767 bytes on
http://hg.python.org/cpython/rev/8939a21bdb94

New changeset 4b3472169493 by Victor Stinner in branch 'default':
(merge) Issue #11395: io.FileIO().write() clamps the data length to 32,767
http://hg.python.org/cpython/rev/4b3472169493

--
nosy: +python-dev

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



[issue8933] Invalid detection of metadata version

2011-03-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Diffs or full changesets are fine.  I’m putting this on standby until 
distutils2 is fully merged into the standard library and we have a clear 
workflow from packaging to d2 to d1.

--
status: open - pending

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



[issue11616] reap_children should not use WNOHANG

2011-03-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Probably a bad idea on my part :)

--
resolution:  - rejected
status: open - closed

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



[issue11395] print(s) fails on Windows with long strings

2011-03-20 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

I realized that it was a little more difficult to port the fix on 3.1 because 
3.1 doesn't have the fix for Windows 64 bits. So I only fixed Python 3.2 and 
3.3, also because nobody reported failure for Python 3.1 on Windows with -u 
flag.

I tested my fix: the test fails without the fix, and it pass correctly with the 
fix. So let's close the last regression that I introduced in Python 3.2!

--
resolution:  - fixed
status: open - closed

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



[issue11127] sockets should not be pickleable

2011-03-20 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 5e13e5e6df30 by Antoine Pitrou in branch 'default':
Issue #11127: Raise a TypeError when trying to pickle a socket object.
http://hg.python.org/cpython/rev/5e13e5e6df30

--
nosy: +python-dev

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



[issue11127] sockets should not be pickleable

2011-03-20 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Committed the patch with the test, thank you!

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

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



[issue11617] Sporadic failure in test_httpservers

2011-03-20 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Another example on x86 OpenIndiana 3.2:

test test_httpservers failed -- Traceback (most recent call last):
  File 
/export/home/buildbot/32bits/3.2.cea-indiana-x86/build/Lib/test/test_httpservers.py,
 line 210, in test_latin1_header
self.assertEqual(res.getheader('X-Special'), 'D\xe4ngerous Mind')
AssertionError: None != 'D\xe4ngerous Mind'

--
nosy: +haypo

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



[issue11060] distutils2 sdist does not complain about version that is not PEP 386 compliant

2011-03-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

data['version'] is not always present.  Can you find what part of the code 
fills it?

There is no default in the PEP, but a tool like mkcfg could suggest a useful 
value, say 0.1dev0.

--

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



[issue3722] print followed by exception eats print with doctest

2011-03-20 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

You misunderstood my last response. The first paragraph *dismisses* the case of 
temporary print (raised by Charles-Axle) as out of scope for doctests and hence 
this issue. The next ones addresses *your* case of code *permanently* intended 
to print and raise and gives a workable solution to your example.

After failing to find a simpler example that works with 3.x*, I am now thinking 
of the following doc fix.

1. Add 'directly' before 'supported' in Tim's first sentence: Examples 
containing both expected output and an exception are not supported. 

2. After the next sentence of explanation, add

Instead, try something like:

 def test():
...   print(hello)
...   raise IndexError()
...
 try:
...   test()
...   raise BaseException # Fail if no IndexError
... except IndexError:
...   pass
hello


* I discovered a subtle consequence of the print change: print 1, 1/0 will 
print '1' on a line by itself and then a traceback. print(1,1/0) just prints 
a traceback. Something like

class C():
def __str__(self):
raise IndexError
print(1, C(), sep='\n')

is required to print a value by itself on a line and then a traceback.
That is no simpler and probably less realistic than test() above.

--
keywords: +patch

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



  1   2   >