[issue1681974] mkdtemp fails on Windows if username has non-ASCII character

2009-03-31 Thread Markus Niemistö

Markus Niemistö  added the comment:

Well, it's not me. As I stated in the problem description, Windows (2000
at least) uses path c:\documents and settings\\local
settings\temp as default temp dir, where also python tries to make temp
dirs. Now for example if user name is "niemistö", then the temp dir will
be ...\niemistö\local settings\temp, which won't work.

I'll try do test the latest versions of python soon.

--

___
Python tracker 

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



[issue5639] Support TLS SNI extension in ssl module

2009-03-31 Thread Phil Pennock

New submission from Phil Pennock :

With TLS it is possible to have the client use an extension (defined in
RFC 4366, and RFC 3546 before that) to indicate to the server which
hostname it believes it is talking to.  The server can then choose TLS
certificates accordingly.  This makes virtual-hosting possible.  Most
modern GUI web-browsers support making use of this extension, Server
Name Indication (SNI).

OpenSSL 0.9.8f onwards have optional support for this; OpenSSL needs to
have been built with "enable-tlsext" in EXTRACONFIGURE.  If that is not
present, then there's a guard macro defined to say it's absent.

This patch, against Python 2.6.1, adds to the standard ssl module the
ability to set the extension, using server_hostname as a arg in relevant
places.  This is only set for client connections and will silently be
ignored if the OpenSSL library does not support it.

I have tested this on FreeBSD 7.0/amd64 with OpenSSL 0.9.8k when talking
to Apache 2.2.x with the SNI patches from https://sni.velox.ch/.  Below
is my simple test program, to dump raw HTTP results back.  With this, I
can connect to various local https vhosts and get the correct content back.

I am not a Python core dev and not too enthusiastic at the thought of
grabbing latest svn to port this across; I hope that it's still of use.

=
import socket
import ssl
import sys

def dump_https_page(hostname, uri='/'):

  sock = socket.socket(socket.AF_INET)
  s = ssl.SSLSocket(sock=sock,
ca_certs='/etc/ssl/certs',
server_hostname=hostname)
  print 'have socket'
  s.connect((hostname, 443))
  print 'connected'

  print >>s, 'GET %s HTTP/1.0\r\nHost: %s\r\nConnection: close\r\n\r\n' % (
  uri, hostname),

  t = s.read()
  while t:
print t,
t = s.read()

if __name__ == '__main__':
  for x in sys.argv[1:]:
dump_https_page(hostname=x)

--
components: Library (Lib)
files: python-2.6.1-tlssni.patch
keywords: patch
messages: 84984
nosy: pdp
severity: normal
status: open
title: Support TLS SNI extension in ssl module
versions: Python 2.6
Added file: http://bugs.python.org/file13534/python-2.6.1-tlssni.patch

___
Python tracker 

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



[issue5627] PyDict_SetItemString() fails when the second argument is null

2009-03-31 Thread Euler Taveira de Oliveira

Euler Taveira de Oliveira  added the comment:

I know that it is a good programming practice checking null pointers but
sometimes programmers are lazy. ;)  I still think that high level
functions should check for null pointers.

--

___
Python tracker 

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



[issue3763] Python 3.0 beta 2 : json and urllib not working together?

2009-03-31 Thread Senthil

Senthil  added the comment:

This is superseded by issue4136.

--
nosy: +bob.ippolito
status: open -> closed

___
Python tracker 

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



[issue3763] Python 3.0 beta 2 : json and urllib not working together?

2009-03-31 Thread Senthil

Senthil  added the comment:

This is superseded by issue4136.

--
resolution:  -> wont fix
superseder:  -> merge json library with latest simplejson 2.0.x

___
Python tracker 

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



[issue1725295] Line ending bug SimpleXMLRPCServer

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

CGI specifies \r\n line ends anyway, so this patch goes in the wrong
direction.

--
nosy: +georg.brandl
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue5631] Distutils "upload" command does not show up in --help-commands output.

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

Committed in r70944.

--
nosy: +georg.brandl
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



[issue5627] PyDict_SetItemString() fails when the second argument is null

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

I am not sure why you consider this a bug. You should certainly not pass
NULL pointers around where the docs do not explicitly allow this.

--
nosy: +georg.brandl
resolution:  -> wont fix
status: open -> pending

___
Python tracker 

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



[issue5624] Py3K branch import _winreg instead of winreg

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

Committed in r70943.

--
nosy: +georg.brandl
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



[issue5578] unqualified exec in class body

2009-03-31 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

Reopening. The following piece of code changed it behavior between 2.5 
and 2.6:

def f():
  a = 2
  class C:
exec 'a = 42'
abc = a
  return C

print f().abc

In 2.6, this returns 2, because static analysis determines that the read 
of 'a' comes from f's closure, yet the exec gets a new set of locals for 
the body of C where it stores into.

This is highly counter-intuitive. For functions, the issue is resolved 
by banning exec; the same should (now) happen for classes.

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

___
Python tracker 

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



[issue5601] webbrowser doesn't just open browsers

2009-03-31 Thread Mitchell Model

Mitchell Model  added the comment:

whoops

Sorry for the garbage in the previous message.
-- 
-- 

 --- Mitchell

--
Added file: http://bugs.python.org/file13533/unnamed

___
Python tracker 

___
Re: [issue5601] webbrowser doesn't just open
browsers
whoops

Sorry for the garbage in the previous message.
-- 

-- 

    --- Mitchell

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



[issue2522] locale.format() problems with decimal separator

2009-03-31 Thread R. David Murray

R. David Murray  added the comment:

Fixed in r70936/r70938.

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



[issue2578] additional unittest type equality methods

2009-03-31 Thread Guido van Rossum

Guido van Rossum  added the comment:

I absolutely do not want it to warn by default in 3.1. 
PendingDeprecationError is fine.

--

___
Python tracker 

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



[issue1641] asyncore delayed calls feature

2009-03-31 Thread Guido van Rossum

Guido van Rossum  added the comment:

At the language summit last Thursday there was widespread disappointment
with the changes to asyncore.py in 2.6, which broke almost all code that
actually uses it.  Unfortunately, the documented API is lame, so
everybody depended on undocumented internals, and those were changed
without respect for established use.  I'd like to prevent more problems
like that.

--

___
Python tracker 

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



[issue1659171] Calling tparm from extension lib fails in Python 2.5

2009-03-31 Thread Daniel Diniz

Daniel Diniz  added the comment:

Thanks, Richard!

If someone confirms it, please reopen.

--
resolution:  -> out of date
stage: test needed -> committed/rejected
status: pending -> closed

___
Python tracker 

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



[issue4535] Build / Test Py3K failed on Ubuntu 8.10

2009-03-31 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
status: open -> closed

___
Python tracker 

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



[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Please note that passing a instance of RawIOBase (as HTTPResponse) is
to TextIOWrapper is *not* supported. You must first wrap the raw IO in
a BufferIOBase instance.

--

___
Python tracker 

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



[issue5638] test_httpservers fails CGI tests if --enable-shared

2009-03-31 Thread Tony Nelson

New submission from Tony Nelson :

test_httpservers fails the CGI tests if Python was built as a shared
library (./config --enable-shared) and not yet installed.  To run such a
Python without installing it, the command line must define
LD_LIBRARY_PATH to point to the build directory.  I see that the new
environment for the child CGI process still has LD_LIBRARY_PATH set. 
The child process is not using that when the CGI is invoked.

After the new shared Python (or one like it) is installed, the test
passes, but the CGIs aren't using the correct copy of Python.

I'm doing this with Python 2.6.1, but the version probably doesn't matter.

--
components: Tests
messages: 84969
nosy: tony_nelson
severity: normal
status: open
title: test_httpservers fails CGI tests if --enable-shared
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue5630] Update CObject API so it is safe and regular

2009-03-31 Thread Daniel Diniz

Changes by Daniel Diniz :


--
nosy: +ajaksu2
type:  -> feature request

___
Python tracker 

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



[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Senthil

Senthil  added the comment:

With the changes r70935, this works.

--

___
Python tracker 

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



[issue5601] webbrowser doesn't just open browsers

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

That would be nice.

--

___
Python tracker 

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



[issue992389] attribute error after non-from import

2009-03-31 Thread Guido van Rossum

Guido van Rossum  added the comment:

I'm sorely tempted to apply the Van Lindberg clause to the last two
responses by Torsten and Nick.  If there was an easy solution it
wouldn't have been open for five years.  If you don't believe me, post a
fix.  I'll even accept a fix for the importlib package, which should
lower the bar quite a bit compared to a fix for import.c.

--

___
Python tracker 

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



[issue5110] Printing Unicode chars from the interpreter in a non-UTF8 terminal raises an error (Py3)

2009-03-31 Thread Ezio Melotti

Ezio Melotti  added the comment:

In the first message I said that this breaks the PEP3138 because I
thought that the solution was to change the default error-handler to
'backslashreplace', but this was already proposed and refused.

sys.displayhook provides a way to change the behavior of the interactive
interpreter only when ">>> foo" is used. The PEP doesn't seem to say
anything about how ">>> foo" should behave.

Moreover, in the alternate solutions [1] they considered to use
sys.displayhook (and sys.excepthook) but they didn't because "these
hooks are called only when printing the result of evaluating an
expression entered in an interactive Python session, and doesn't work
for the print() function, for non-interactive sessions or for
logging.debug("%r", ...), etc."

This is exactly the behavior I intended to have, and, being a unique
feature of the interactive interpreter, it doesn't lead to inconsistence
with other situations.

[1]: http://www.python.org/dev/peps/pep-3138/#alternate-solutions

--
nosy: +atsuoi

___
Python tracker 

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



[issue5353] Improve IndexError messages with actual values

2009-03-31 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +r.david.murray -r.david.murray-old

___
Python tracker 

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



[issue5601] webbrowser doesn't just open browsers

2009-03-31 Thread Mitchell Model

Mitchell Model  added the comment:

The problem is not so much that I think people should use it for file 
URLs, it's that the behavior when they do can be quite confusing. 
Perhaps a note that webbrowser is not meant for file URLs and that 
it's behavior is undefined if it is?
-- 
-- 

 --- Mitchell

--
Added file: http://bugs.python.org/file13532/unnamed

___
Python tracker 

___
Re: [issue5601] webbrowser doesn't just open
browsers
The problem is not so much that I think people should use it for
file URLs, it's that the behavior when they do can be quite confusing.
Perhaps a note that webbrowser is not meant for file URLs and that
it's behavior is undefined if it is?
-- 

-- 

    --- Mitchell

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



[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Senthil

Senthil  added the comment:

Jeremy Hylton  wrote:
>  That doesn't mean it is the right thing to pass to TextIOWrapper.  It's an
> instance of RawIOBase.

I guess, you meant " That doesn't mean it is *not* the right thing to
pass to TextIOWrapper".

--

___
Python tracker 

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



[issue4535] Build / Test Py3K failed on Ubuntu 8.10

2009-03-31 Thread Senthil

Senthil  added the comment:

Ubuntu 8.10; On Python 3.0.1 (r301:69556, Mar 31 2009, 22:18:10) 
[GCC 4.3.2] on linux2

297 tests OK.
26 tests skipped:
test_bz2 test_codecmaps_cn test_codecmaps_hk test_codecmaps_jp
test_codecmaps_kr test_codecmaps_tw test_curses test_dbm_gnu
test_dbm_ndbm test_kqueue test_nis test_normalization
test_ossaudiodev test_pep277 test_socketserver test_sqlite
test_ssl test_startfile test_tcl test_timeout test_urllib2net
test_urllibnet test_winreg test_winsound test_xmlrpc_net
test_zipfile64
5 skips unexpected on linux2:
test_tcl test_dbm_ndbm test_ssl test_bz2 test_dbm_gnu

No failures. Closing this issue.

--
assignee:  -> orsenthil
nosy: +orsenthil
resolution:  -> works for me
status: pending -> open

___
Python tracker 

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



[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Jeremy Hylton

Jeremy Hylton  added the comment:

I just wanted to mention that the current head of py3k returns an
http.client.HTTPResponse and not a urllib.respone.addinfourl.  That
doesn't mean it is the right thing to pass to TextIOWrapper.  It's an
instance of RawIOBase.

--

___
Python tracker 

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



[issue2259] Poor support other than 44.1khz, 16bit audio files?

2009-03-31 Thread R. David Murray

R. David Murray  added the comment:

If you can provide a small audio file that demonstrates the problem that
might be enough to get both of these issues moving, since I could write
a test using that.

--

___
Python tracker 

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



[issue978604] wait_variable hangs at exit

2009-03-31 Thread Guilherme Polo

Guilherme Polo  added the comment:

Ah.. number 2 is problematic. Before continuing lets reduce the previous
WaitTest.py to this (which shows the same problems):

import Tkinter

root = Tkinter.Tk()
waitVar = Tkinter.BooleanVar()

root.after(3000, lambda: waitVar.set(True))
root.wait_variable(waitVar)

When you run this, it will schedule the call to this lambda to happen 3
seconds later, and will block on the wait_variable call. Now suppose you
hit Ctrl-c while you are stuck into a Tcl_EvalObjv call (Tcl_EvalObjv
will end up being called after invoking wait_variable). Python will not
notice this Ctrl-c for now (we are on Tcl land now), but eventually the
event you scheduled earlier is fired. PythonCmd is called to handle it,
which will then call the anonymous func, but since you pressed Ctrl-c it
will return NULL and PythonCmd will call PythonCmd_Error to handle it.
PythonCmd_Error sets errInCmd to 1, saves the exception and returns an
TCL_ERROR indicator, this causes tkerror to be called. tkerror is a
function created in Tkinter.py, which does nothing so that previous
saved exception is not used. Next what happens is that the lambda
function didn't execute, the tk variable didn't change and you are still
blocked on wait_variable (this situation seems normal to me).

So what I did here, and I'm not sure if it would be accepted or not, was
create a new function in _tkinter.c called Tkinter_PrintError
(accessible through _tkinter._print_error) that restores the saved
exception and prints it. Now you might ask why not raise it instead ?
Martin that is on the nosy list will agree with me, I think. Raising an
error at this point will cause an Tk dialog to popup and it won't
contain a proper traceback (if done this way I did), which is annoying.

Note that even though PythonCmd_Error set errInCmd to 1, it was never
used because the mainloop wasn't running (it also wouldn't make much
difference to put a root.mainloop() after wait_variable since we would
be blocked before the mainloop started).

--

___
Python tracker 

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



[issue2409] regrtest should not just skip imports that fail

2009-03-31 Thread R. David Murray

R. David Murray  added the comment:

Fixed as of r70930 on trunk and shortly thereafter on the py3k branch.

I did this at the pycon sprint, and unfortunately I only discovered this
issue and your patches after I was done.  So thank you for your work and
I'm sorry it didn't actually get used (it would have allowed me to get
done faster if I'd known about it).  The solution implemented is very
similar to yours, though different in a few details.

--
nosy: +bitdancer
resolution:  -> fixed
status: open -> closed
versions: +Python 2.7, Python 3.1 -Python 2.6

___
Python tracker 

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



[issue5636] csv.reader next() method missing

2009-03-31 Thread Martin v. Löwis

Martin v. Löwis  added the comment:

I don't think that's a bug in the code, but in the documentation. 
Iterators in 3.x are implemented with __next__ methods, and the next() 
builtin.

--
assignee:  -> georg.brandl
components: +Documentation -Windows
nosy: +georg.brandl, loewis

___
Python tracker 

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



[issue2409] regrtest should not just skip imports that fail

2009-03-31 Thread R. David Murray

Changes by R. David Murray :


Removed file: http://bugs.python.org/file9760/issue2409.diff

___
Python tracker 

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



[issue5637] 2to3 does not convert urllib.urlopen to urllib.request.urlopen

2009-03-31 Thread Senthil

New submission from Senthil :

In Py2x, have this code:

import urllib
s = urllib.urlopen('http://www.python.org')
print s

Run 2to3, on this, refactoring works only on import urllib and print
statements.

@@ -1,3 +1,3 @@
-import urllib
+import urllib.request, urllib.parse, urllib.error
 s = urllib.urlopen('http://www.python.org')
-print s
+print(s)

There urllib.urlopen, needs to be refactored into urllib.request.urlopen

--
messages: 84956
nosy: orsenthil
severity: normal
status: open
title: 2to3 does not convert urllib.urlopen to urllib.request.urlopen
type: behavior
versions: Python 3.1

___
Python tracker 

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



[issue5353] Improve IndexError messages with actual values

2009-03-31 Thread R David Murray

Changes by R David Murray :


--
nosy: +r.david.murray -bitdancer

___
Python tracker 

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



[issue4886] test/regrtest.py contains error on __import__

2009-03-31 Thread R. David Murray

R. David Murray  added the comment:

regrtest is an internal tool for testing python, and is not suited to be
used as a general testing framework.  You would be far better off using
one of the 3rd party packages designed for that task.  We don't have the
resources to support use of regrtest for anything except testing of
python itself.

--
nosy: +bitdancer
resolution:  -> rejected
stage:  -> committed/rejected
status: open -> closed
type: behavior -> feature request

___
Python tracker 

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



[issue5636] csv.reader next() method missing

2009-03-31 Thread Tony Joblin

New submission from Tony Joblin :

On windows using 3.0.1 the csv.reader.next() public method is missing.
The documentation says that this method should exist and it does exist
in previous versions. There is a __next__ method available and
constructs like:
   for row in reader
   print(row)
still work.

--
components: Windows
messages: 84954
nosy: tonyjoblin
severity: normal
status: open
title: csv.reader next() method missing
type: behavior
versions: Python 3.0

___
Python tracker 

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



[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
priority:  -> high
resolution: accepted -> 
type:  -> behavior
versions: +Python 3.1

___
Python tracker 

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



[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

urllib.response.addinfourl doesn't seem to implement the required ABC
(BufferedIOBase) properly. It misses the read1() method. Also, it claims
not to be readable:

>>> f_bytes = urllib.request.urlopen("http://www.python.org/";)
>>> f_bytes.readable()
False

--
nosy: +pitrou

___
Python tracker 

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



[issue5635] test_sys reference counting fails while tracing

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

Committed in r70933. Thanks!

--
nosy: +georg.brandl
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Senthil

Senthil  added the comment:

Nope, this is not yet fixed.

$ ./python 
Python 3.1a1+ (py3k:70929, Mar 31 2009, 19:18:12) 
[GCC 4.3.2] on linux2
...
...
>>> f_bytes = urllib.request.urlopen("http://www.python.org";)
>>> f_string = io.TextIOWrapper(f_bytes,"iso-8859-1")
>>> print(f_string.read())
Traceback (most recent call last):
  File "", line 1, in 
IOError: not readable

--
nosy: +orsenthil
resolution: fixed -> accepted
status: closed -> open

___
Python tracker 

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



[issue1730959] telnetlib: A callback for monitoring the telnet session

2009-03-31 Thread Jack Diederich

Jack Diederich  added the comment:

class MyTelnet(Telnet):
  def read_until(self, *args)
txt = Telnet.read_until(self, *args)
sys.stdout.write(txt)
return txt

Hope that helps, closing the bug.

--
nosy: +jackdied
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue5228] multiprocessing not compatible with functools.partial

2009-03-31 Thread Jack Diederich

Jack Diederich  added the comment:

Fixed rev 70931.  Happy pickling!

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



[issue3392] subprocess fails in select when descriptors are large

2009-03-31 Thread Frank Chu

Frank Chu  added the comment:

Updated with new patch.  I moved the try: except logic in the module
initialization step so I get a global has_poll, similar to the global
mswindows already there.

I now use a try/except/else to be more robust (not needed now since it's
only "has_poll = True", but I think it's better code.

--
Added file: http://bugs.python.org/file13531/subprocess_with_poll3.diff

___
Python tracker 

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



[issue5155] Multiprocessing.Queue created by sub-process fails when used in sub-sub-process ("bad file descriptor" in q.get())

2009-03-31 Thread Beau Butler

Beau Butler  added the comment:

Quick note: Have tracked this down to what appears to be buggy behaviour
on the part of os.pipe() when called from within a Process.

First invocation of os.pipe() in a Process returns (0,x) - stdin(?)
resulting in the 'bad file descriptor' error.

Interactive prompt test follows:

>>> import multiprocessing as MP, os
>>> def r():  print os.pipe(), os.pipe(), os.pipe()
... 
>>> r()
(9, 10) (11, 12) (13, 14)
>>> MP.Process(target=r).start()
(0, 15) (16, 17) (18, 19)
>>> MP.Process(target=r).start()
(0, 15) (16, 17) (18, 19)

--

___
Python tracker 

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



[issue5635] test_sys reference counting fails while tracing

2009-03-31 Thread David Christian

New submission from David Christian :

test_sys refcount test checks that assigning None to a local variable n
increases the references to None by exactly 1.

However sys.settrace is set, then the frame object must be instantiated
to be passed to the trace object.  This increments the reference count
to None again.  Since the locals are not then removed from the frame
object after the sys.settrace call, the number of references remains
increased after the settrace function is exited.

This problem can be avoided by making n a global.

--
files: refcount.patch
keywords: patch
messages: 84946
nosy: dugan
severity: normal
status: open
title: test_sys reference counting fails while tracing
Added file: http://bugs.python.org/file13530/refcount.patch

___
Python tracker 

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



[issue5628] TextIOWrapper fails with SystemError when reading HTTPResponse

2009-03-31 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Fixed in r70928.

--
nosy: +benjamin.peterson
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



[issue978604] wait_variable hangs at exit

2009-03-31 Thread Guilherme Polo

Guilherme Polo  added the comment:

Using this patch I noticed two problems appeared when running WaitTest.py

1) Closing the window results in: "_tkinter.TclError: can't invoke
"tkwait" command:  application has been destroyed" which I'm not
considering as a bug, maybe the user can get confused about this but if
the application were doing something like WaitTest.py does then it
should also be aware that this could happen.

2) Pressing Ctrl-c hits a different problem, causing ::tkerror to be
called, which I'm considering a bug that I still have to check.

--

___
Python tracker 

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



[issue1665206] Hangup when using cgitb in a thread while still in import

2009-03-31 Thread Brett Cannon

Brett Cannon  added the comment:

The freeze is occurring from cgitb importing from within the html
function. That is hitting the import lock that is being held in bar.
Moving the imports out of the functions to the top of the module should
fix this.

--
priority: normal -> low
stage:  -> needs patch
type:  -> performance
versions: +Python 2.7 -Python 2.6

___
Python tracker 

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



[issue3087] Clean up Demos and Tools

2009-03-31 Thread Brett Cannon

Brett Cannon  added the comment:

This is not really a bug so closing.

--
nosy: +brett.cannon
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue909005] asyncore fixes and improvements

2009-03-31 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

I agree with Josiah but I must say that the handle_close() documentation
is a bit misleading.
Currently it states:

> handle_close()
>Called when the socket is closed.


I'd change it with something like this:

"Called when the asynchronous loop detects that the connection on a
selectable object has been closed.
When overridden the user is supposed to explicitly call the close()
method to actually remove the channel from the global map ."

--

___
Python tracker 

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



[issue5619] Pass MS CRT debug flags into subprocesses

2009-03-31 Thread Jesse Noller

Jesse Noller  added the comment:

Committed to py3k, 26 maint, trunk, 3k maint r70908

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



[issue5018] Overly general claim about sequence unpacking in tutorial

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

I've just removed the paragraph about the asymmetry in r70915.

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



[issue5583] Optional extensions in setup.py

2009-03-31 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

done in r70910 and r70914

--
priority:  -> normal
status: open -> closed

___
Python tracker 

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



[issue5617] Unicode printing in gdb post-mortem sessions

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

Added in r70912.

--
nosy: +georg.brandl
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



[issue1161031] Neverending warnings from asyncore

2009-03-31 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

If you're talking about r70904 then you did a different thing than the
one I suggested.

--

___
Python tracker 

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



[issue3427] urllib documentation: urlopen().info() return type

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

Committed in r70907.

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



[issue1651995] sgmllib _convert_ref UnicodeDecodeError exception, new in 2.5

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

Committed in r70906.

--
resolution:  -> accepted
status: open -> closed

___
Python tracker 

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



[issue5633] fix for timeit when the statment is a string and the setup is not (and tests)

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

I'll look at it.

--

___
Python tracker 

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



[issue909005] asyncore fixes and improvements

2009-03-31 Thread Josiah Carlson

Josiah Carlson  added the comment:

Just to make this clear, Aleksi is proposing close() should be called 
automatically by some higher-level functionality whether a user has 
overridden handle_close() or not.

With the updated asyncore warning suppression stuff, overriding 
handle_close() for the sake of suppressing the warnings should no longer 
be necessary.

While I can see that it would be *convenient* if close() was 
automatically called, the method is called "handle_close()", and there 
is an expectation about the implementation thereof.  For example, you 
call socket.recv() in handle_read(), you call socket.send() in 
handle_write(), call socket.accept() in handle_accept().  Is it too much 
to expect that a user will call .close() inside handle_close()?

The answer to that last question is a "no", btw.

--

___
Python tracker 

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



[issue5563] Document bdist_msi

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

Committed in r70905.

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



[issue5337] Scanner class in re module undocumented

2009-03-31 Thread Matthew Barnett

Matthew Barnett  added the comment:

One of the limitations is that it identifies what matched by using
capture groups, so if the expressions provided contain captures then it
gets confused! :-)

I handled that by 1) rejecting named captures and 2) changing unnamed
captures into non-captures.

--

___
Python tracker 

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



[issue4706] try to build a C module, but don't worry if it doesn't work

2009-03-31 Thread Tarek Ziadé

Changes by Tarek Ziadé :


--
assignee:  -> tarek
resolution:  -> duplicate
status: open -> closed
superseder:  -> Optional extensions in setup.py

___
Python tracker 

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



[issue2073] asynchat push always sends 512 bytes (ignoring ac_out_buffer_size)

2009-03-31 Thread Josiah Carlson

Josiah Carlson  added the comment:

The spare 512 values are for code that I expect no one is actually 
using.

In terms of increasing the buffer size from 4096 to something larger, 
that can be done, but I think that more than just a 10mbit switched lan 
test should be performed.  I would tend to believe that a larger size 
would tend to perform better, but my concern is sending blocks too large 
to the OS and having it say "sorry, but you need to chop it up more" via 
sock.send() returning 1 or 2 (I've experienced this on Windows with 
stdio and sockets).

Considering how easy it is to adjust, and considering that the value is 
respected everywhere that matters (performance-conscious users aren't 
using simple_producer, nor are they using dispatcher_with_send), I think 
that 4096 is sufficient for the time being.  Adjusting it up to 16k in 
Python 2.8/3.2 seems reasonable to me.  Someone ping me in a year ;) .

--

___
Python tracker 

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



[issue1161031] Neverending warnings from asyncore

2009-03-31 Thread Josiah Carlson

Josiah Carlson  added the comment:

Good point Giampaolo.  Fixed and committed.

--

___
Python tracker 

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



[issue5630] Update CObject API so it is safe and regular

2009-03-31 Thread Lisandro Dalcin

Lisandro Dalcin  added the comment:

Two questions:

1) Why do you prefer to pass destructor as a first argument?

2) Do we really need two different calls for providing a context
pointer? Why no just one call and pass a NULL context?

A comment:

Suppose one wants to implement export/import module C-API's in a
function-by-function basis. This is nice, as you can extend your module
C-API, and make it be backward "ABI" compatible.

As the void* <-> void(*)(void) conversion is illegal(?) in C(99?), one
has to go to the oddities of doing some sort of type-punning with
unions... this could be somewhat tedious for hand-written extension
modules. 

Do you have any idea on how extend the CObject API for the commented use
case?

--
nosy: +dalcinl

___
Python tracker 

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



[issue1676135] Remove trailing slash from --prefix

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

Changed a bit (seems that backslash before the $ in the regex isn't
necessary) and checked in in r70903.

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



[issue1675026] Redirect cause invalid descriptor error

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

Documented in README in r70902.

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



[issue5563] Document bdist_msi

2009-03-31 Thread Steven Bethard

Steven Bethard  added the comment:

Here you go. I built the docs with the attached patch, and everything
looks about right to me now.

--
keywords: +patch
Added file: http://bugs.python.org/file13529/python3-bdist-msi-docs.patch

___
Python tracker 

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



[issue992389] attribute error after non-from import

2009-03-31 Thread Nick Coghlan

Nick Coghlan  added the comment:

I just had a thought: we may be able to eliminate this behaviour without
mucking about in the package globals.

What if the import semantics were adjusted so that, as a last gasp
effort before bailing out with an ImportError, the import process
checked sys.modules again with the full module name?

Not a fully fleshed out idea at this point (and possibly symptomatic of
not being fully awake yet), but I'll bring it up in the current
python-dev thread anyway.

--

___
Python tracker 

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



[issue978604] wait_variable hangs at exit

2009-03-31 Thread Guilherme Polo

Guilherme Polo  added the comment:

Patch attached, but didn't test it at all. This is a trick so it doesn't
get committed without a test (hopefully) :)

--
keywords: +patch
Added file: http://bugs.python.org/file13528/issue978604.diff

___
Python tracker 

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



[issue3786] _curses, _curses_panel & _multiprocessing can't be build in 2.6b3 w/ SunStudio 12

2009-03-31 Thread Tim Mooney

Tim Mooney  added the comment:

Solaris has both traditional System V curses and an XPG4-compatible
curses that does include mvwchgat.  The traditional system V curses is
the default, for backward compatibility.

If you want the XPG4 compatible curses, you need to make sure
-I/usr/xpg4/include and -L/usr/xpg4/lib -R/usr/xpg4/lib (or their 64-bit
equivalents) are in CPPFLAGS/CFLAGS/LDFLAGS so that the XPG4 curses is
discovered.  See the man page for mvwchgat(3XCURSES) on Solaris for more
info.

The difficulty for Python is that it also tries to build a readline
module, and the libreadline was more than likely linked against the
default system V curses.  That means that if you add the -I and -L/-R
flags to get XPG4 curses for all of the Python build, you'll probably
get a link failure or worse when building the readline module.

There are at least two ways around this:

- rebuild readline to use XPG4 curses, and then rebuild every single
  application that links against readline.  Then build Python, using
  the -I and -L/-R flags to get XPG4 curses for the entire Python build.

- modify the setup.py for the _curses module so that
  logic is added for Solaris to look for the XPG4 curses only during
  the build of the _curses module.

There is, however, no XPG4 panels library, since panels was not part of
the XPG4 specification.  That means that with the appropriate Python
code in setup.py it would be possible to build _curses against XPG4
curses lib, but _curses_panel either couldn't be built or would have to
somehow be linked against the standard (system V) panel library and the
standard curses library.

--
nosy: +enchanter

___
Python tracker 

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



[issue909005] asyncore fixes and improvements

2009-03-31 Thread Aleksi Torhamo

Aleksi Torhamo  added the comment:

> It's already done automatically if you don't override handle_close.

Sorry, i meant the case where you need to override it. If we always need
to call close() from handle_close(), it feels redundant having to
remember to add it, when it could be done automatically instead. Why not
do it automatically, if every overriding user must otherwise always
remember to add it?

--

___
Python tracker 

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



[issue5632] Bug - threading.currentThread().ident returns None in main thread

2009-03-31 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Fixed in r70897.

--
nosy: +benjamin.peterson
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



[issue909005] asyncore fixes and improvements

2009-03-31 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

> I can't think of a situation where handle_close() is called, but close()
> should not be called. If indeed so, i feel it's weird to require the
> user remember to call close(), and it should IMHO be done automatically.

It's already done automatically if you don't override handle_close.

--

___
Python tracker 

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



[issue909005] asyncore fixes and improvements

2009-03-31 Thread Aleksi Torhamo

Aleksi Torhamo  added the comment:

I just remembered that "level 1" function handle_connect_event() is also
called from "level 2", so i actually can't see why the close helper
could not be called handle_close_event(). Is there some other reason
besides "breaking abstraction" to not introduce it?

--

___
Python tracker 

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



[issue5634] cPickle error in case of recursion limit

2009-03-31 Thread vadim suvorov

New submission from vadim suvorov :

In case of heavily recursive data structure cPickle produces
intermittent random exceptions (AttributeError, etc.). The expected is
RuntimeError: ('maximum recursion depth exceeded in ...'). In addition,
the behavior differs for classic/new classes.

The reason: the cPickle needs several optional methods (__getstate__,
__getinitargs__) for each object. In their absence an AttributeError is
generated. It is normally suppressed, but suppression itself causes
recursion. The error in exception processing leads to fancy errors.

The proposed solution: temporary (for call of PyErr_ExceptionMatches())
increase recursion limit.

--
files: !!!
messages: 84915
nosy: bad
severity: normal
status: open
title: cPickle error in case of recursion limit
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file13527/!!!

___
Python tracker 

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



[issue1608921] PyThread_release_lock with pthreads munges errno

2009-03-31 Thread David Christian

Changes by David Christian :


--
nosy: +dugan

___
Python tracker 

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



[issue5337] Scanner class in re module undocumented

2009-03-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Whether this should be exposed is up to effbot.  It's his code.  He
knows its limitations and he made the original decision to leave it
undocumented.

--
assignee: benjamin.peterson -> effbot

___
Python tracker 

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



[issue5619] Pass MS CRT debug flags into subprocesses

2009-03-31 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Patch for multiprocessing added.
Using with regrtest -n option now allows to pass all regression test 
stack without any popup assertion dialog on Windows box.

Probably have to be backported to Python 2.7 branch

--
components: +Tests
versions: +Python 2.7, Python 3.1
Added file: http://bugs.python.org/file13526/_multiprocessing.patch.zip

___
Python tracker 

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



[issue909005] asyncore fixes and improvements

2009-03-31 Thread Aleksi Torhamo

Aleksi Torhamo  added the comment:

"not the handle_close_event() replacements, stick with handle_close()".
I'm guessing this has to do with "breaking the abstraction"?

I can't think of a situation where handle_close() is called, but close()
should not be called. If indeed so, i feel it's weird to require the
user remember to call close(), and it should IMHO be done automatically.
(I feel like i'm bitten by this each and every time i replace the
default handle_close().. :)

If the naming of handle_close_event() is not appropriate (as it "sounds"
like a layer 1 method), how about adding do_close(), and making other
places call that?

def do_close(self):
self.close()
self.handle_close()

--
nosy: +alexer

___
Python tracker 

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



[issue2953] _zip_directory_cache untested and undocumented

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

That's fortunate, because I can just reassign this to him :)

--
assignee: georg.brandl -> brett.cannon
nosy: +brett.cannon

___
Python tracker 

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



[issue5633] fix for timeit when the statment is a string and the setup is not (and tests)

2009-03-31 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Georg, this was your patch:  http://bugs.python.org/issue1533909

I don't think it should have been accepted so readily.  It is not
harmonious with all of the other proposals for improving timeit.

No that it is out in the wild, I think all you can do is fix-up the docs.

Also, the inner template function should have a func=func argument so
that the func() call is localized.  This affects the timings.  Part of
the concept of the module is to make the surrounding timing apparatus be
as light-weight as possible so that the timings reflect the thing being
timed without being obscured by the overhead of the timing module itself.

--
assignee: rhettinger -> georg.brandl
nosy: +georg.brandl

___
Python tracker 

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



[issue5632] Bug - threading.currentThread().ident returns None in main thread

2009-03-31 Thread Skip Montanaro

Skip Montanaro  added the comment:

Here's a test case which reveals the problem as I see it.

--
keywords: +patch
stage:  -> needs patch
Added file: http://bugs.python.org/file13525/threading.diff

___
Python tracker 

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



[issue5598] "paths" argument missing in DocFileSuite documentation

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed in r70896.

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



[issue5337] Scanner class in re module undocumented

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

OK, so we'll wait for that.

--
dependencies: +Regexp 2.7 (modifications to current re 2.2.2)

___
Python tracker 

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



[issue5633] fix for timeit when the statment is a string and the setup is not (and tests)

2009-03-31 Thread Tim Driscoll

Changes by Tim Driscoll :


--
title: timeit breaks when the statment is a string and the setup is not -> fix 
for timeit  when the statment is a string and the setup is not (and tests)

___
Python tracker 

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



[issue5601] webbrowser doesn't just open browsers

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

I'm inclined not to document that. webbrowser is meant for URLs, the
behavior if you call it with file names is undefined.

--
resolution:  -> wont fix
status: open -> pending

___
Python tracker 

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



[issue1641] asyncore delayed calls feature

2009-03-31 Thread Josiah Carlson

Changes by Josiah Carlson :


Removed file: http://bugs.python.org/file13238/scheduler_partial.patch

___
Python tracker 

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



[issue1641] asyncore delayed calls feature

2009-03-31 Thread Josiah Carlson

Josiah Carlson  added the comment:

I fixed some bugs with my patch, merged in Giampaolo's tests and 
documentation, and altered the API to match Giampaolo's API almost 
completely.

This new version differs from Giampaolo's patch only in underlying 
implementation; this uses a modified sched.py, and doesn't have a 
standard "execute outstanding methods" function built into asyncore 
(asynchat.scheduled_tasks.run(time.time()) is sufficient).

The major difference is that the modifications to sched.py offer a fast 
cancel/reschedule operation, which Giampaolo's lacks.

--
Added file: http://bugs.python.org/file13524/scheduler.patch

___
Python tracker 

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



[issue5563] Document bdist_msi

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

I'll wait for a patch from you, Steven.

--

___
Python tracker 

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



[issue5633] timeit breaks when the statment is a string and the setup is not

2009-03-31 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue5602] Slight punctuation problem in documentation of urllib.request.urlopen

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

Actually, that style is fine as well and even indicates a bit better
that you don't have to give data if you give timeout.

We'll likely try to get the style of writing optional parameters more
consistent in the future.

--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue5633] timeit breaks when the statment is a string and the setup is not

2009-03-31 Thread Tim Driscoll

New submission from Tim Driscoll :

The patch and test is here:
http://codereview.appspot.com/28161/show

There were no tests so i added a few of them.  The one that breaks
without the patch to timeit is:
test_setup_is_called_when_the_statment_is_string_and_the_setup_is_not()
(sorry for the long name)

Even if the patch is no good perhaps the test could be useful.

--
components: Library (Lib)
messages: 84902
nosy: tdriscol
severity: normal
status: open
title: timeit breaks when the statment is a string and the setup is not
type: behavior
versions: Python 3.1

___
Python tracker 

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



[issue5632] Bug - threading.currentThread().ident returns None in main thread

2009-03-31 Thread Skip Montanaro

New submission from Skip Montanaro :

The main thread has an ident, but the threading module doesn't
recognize that fact.  I shouldn't have to "start" the main thread.

Example:

% python
Python 2.7a0 (trunk:70084, Feb 28 2009, 20:51:51) 
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import threading
>>> import thread
>>> print threading.currentThread(), threading.currentThread().ident, 
thread.get_ident()
<_MainThread(MainThread, started)> None -1602627808

% python3.1
Python 3.1a0 (py3k:70084M, Feb 28 2009, 20:46:48) 
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import threading  
>>> print (threading.current_thread(), 
threading.current_thread().ident)<_MainThread(MainThread, started)> None

--
components: Library (Lib)
messages: 84901
nosy: skip.montanaro
severity: normal
status: open
title: Bug - threading.currentThread().ident returns None in main thread
type: behavior
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

___
Python tracker 

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



[issue5603] Garbled sentence in documentation of urllib.request.urlopen

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

Already fixed in dev docs.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue1651995] sgmllib _convert_ref UnicodeDecodeError exception, new in 2.5

2009-03-31 Thread Daniel Darabos

Daniel Darabos  added the comment:

Attached patch against SVN trunk including unittest. The test is not 
great, because it practically only checks if the patch was applied and 
not the real-life situation where the exception occurs, but I'm not too 
handy with sgmllib (I only encountered this problem through 
BeautifulSoup).

--
Added file: http://bugs.python.org/file13523/issue1651995.patch

___
Python tracker 

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



[issue5623] test_fdopen fails with vs2005, release build on Windows 2000

2009-03-31 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

The problem with Windows 2000 is that it is not enough to distribute 
the CRT. For example, I am sure that a few months ago the version 
ending with .1433 was not present on my machine; the version in the 
system32 directory was .762 (the one shipped with vs2005 sp1).

Trying several sizes is a good idea IMO, and is not likely to segfault 
if we only try with a low fd (1 or 2). I'll try to come with a patch.

--

___
Python tracker 

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



[issue1711605] CGIHttpServer leaves traces of previous requests in env

2009-03-31 Thread David Christian

Changes by David Christian :


--
nosy: +dugan

___
Python tracker 

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



[issue1530012] Literal strings use BS as octal escape character

2009-03-31 Thread Georg Brandl

Georg Brandl  added the comment:

Swapped the sections in r70893.

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



  1   2   3   >