[issue6701] Make custom xmlrpc extension easier

2010-03-24 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

Just a few comments on the code itself:

if type_ in self.__dispatch.keys():
should be:
if type_ in self.__dispatch:

Previously, error reporting of recursive data stated the type of the offending 
value; with this patch, this hint is lost (see _add_memo)

Caching of bound methods in local variables is a common optimization 
(dump=self._dump); why did you remove it everywhere?

Why Marshaller.dispatch was renamed to __dispatch but Unmarshaller.dispatch 
stays the same? (btw, why the double underscore?)

--
nosy: +gagenellina

___
Python tracker 

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



[issue6701] Make custom xmlrpc extension easier

2010-03-24 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

Just a few comments on the code itself:

if type_ in self.__dispatch.keys():
should be:
if type_ in self.__dispatch:

Previously, error reporting of recursive data stated the type of the offending 
value; with this patch, this hint is lost (see _add_memo)

Caching of bound methods in local variables is a common optimization 
(dump=self._dump); why did you remove it everywhere?

Why Marshaller.dispatch was renamed to __dispatch but Unmarshaller.dispatch 
stays the same? (btw, why the double underscore?)

--

___
Python tracker 

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



[issue1553375] Add traceback.print_full_exception()

2010-03-24 Thread Gabriel Genellina

Changes by Gabriel Genellina :


--
nosy: +gagenellina

___
Python tracker 

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



[issue1222585] C++ compilation support for distutils

2010-03-24 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

Python can be compiled using C++ compiler.
See http://docs.python.org/extending/extending.html#writing-extensions-in-c

--

___
Python tracker 

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



[issue1222585] C++ compilation support for distutils

2010-03-24 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

Also you would have to pass --with-cxx-main= option to configure.

--

___
Python tracker 

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



[issue8218] typo currect

2010-03-24 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

David, can you provide these changes as a unified diff against the subversion 
trunk?

--
nosy: +loewis

___
Python tracker 

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



[issue8219] Facility and priority values/constants not documented for SysLogHandler

2010-03-24 Thread Ville Skyttä

New submission from Ville Skyttä :

http://docs.python.org/dev/py3k/library/logging.html#logging.handlers.SysLogHandler

What to use as the value for facility for SysLogHandler's constructor is not 
documented.  There's a reference to LOG_USER, but it's kind of vague because it 
doesn't specify what LOG_USER it refers to - there's no mention that 
SysLogHandler itself has these constants.  And the corresponding documented 
values from the syslog module are not compatible with the ones SysLogHandler 
works with.

Similarly, the values for facility and priority for 
SysLogHandler.encodePriority() are not documented, it just talks about integers 
and strings without saying what they are.

I suggest documenting all the SysLogHandler.LOG_* constants and the priority 
and facility mapping strings in SysLogHandler's priority_names and 
facility_names dicts.

--
assignee: georg.brandl
components: Documentation
messages: 101629
nosy: georg.brandl, scop
severity: normal
status: open
title: Facility and priority values/constants not documented for SysLogHandler
type: feature request

___
Python tracker 

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



[issue8219] Facility and priority values/constants not documented for SysLogHandler

2010-03-24 Thread Eric Smith

Changes by Eric Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue8219] Facility and priority values/constants not documented for SysLogHandler

2010-03-24 Thread Eric Smith

Changes by Eric Smith :


--
nosy: +vinay.sajip
priority:  -> normal
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue8219] Facility and priority values/constants not documented for SysLogHandler

2010-03-24 Thread Vinay Sajip

Changes by Vinay Sajip :


--
assignee: georg.brandl -> vinay.sajip

___
Python tracker 

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



[issue7677] distutils, better error message for setup.py upload -sign without identity.

2010-03-24 Thread Zubin Mithra

Zubin Mithra  added the comment:

are you suggesting that a warning stating that 

'--identity has`nt been used'

has to be generated?

--
nosy: +zubin71

___
Python tracker 

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



[issue4142] smtplib doesn't clear helo/ehlo flags on quit

2010-03-24 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Support for smtpd too? (a stdlib addition in 2.7/3.2)

--
nosy: +jcea
versions: +Python 3.1, Python 3.2 -Python 2.4, Python 2.5, Python 3.0

___
Python tracker 

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



[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-03-24 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I don't quite see the point in having the streams buffered in one
> level and unbuffered in another, but I guess there's a reason.

The reason is simply that it wasn't implemented. Unbuffered I/O isn't
useful very often.

> Anyway, how can I make those streams entirely unbuffered? This is for
> an interactive shell called DreamPie (dreampie.sourceforge.net), and I
> want to resemble the behavior of the regular shell as close as
> possible, and it's completely unbuffered.

You can just call flush() after each write to stdout or stderr.

--

___
Python tracker 

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



[issue8188] Unified hash for numeric types.

2010-03-24 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy: +skrah

___
Python tracker 

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



[issue6749] Support for encrypted zipfiles when interpreting zipfile as script

2010-03-24 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue8219] Facility and priority values/constants not documented for SysLogHandler

2010-03-24 Thread Vinay Sajip

Vinay Sajip  added the comment:

Update showing strings and corresponding symbolic integers checked into trunk 
(r79373).

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



[issue8219] Facility and priority values/constants not documented for SysLogHandler

2010-03-24 Thread Eric Smith

Eric Smith  added the comment:

It still doesn't say that the LOG_ constants are defined on SysLogHandler. Or 
is the intention that the user just use the strings?

--

___
Python tracker 

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



[issue8220] site.py's Quitter pollutes builtins with exit and quit for non-interactive use

2010-03-24 Thread Ralph Corderoy

New submission from Ralph Corderoy :

A friend wrote "exit(0)" in a script without an import of sys.  I
pointed out the error and he said "But it works".  He was right.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 9.10
Release:9.10
Codename:   karmic
$ python --version
Python 2.6.4
$ python -c 'quit("foo")'
foo
$ echo $?
1
$ python -Sc 'quit("foo")'
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'quit' is not defined
$ python -c 'print quit.__class__, exit.__class__'
 
$

site.py is polluting, to my mind, the builtin namespace with `exit' and 
`quit'.  Surely this should only happen for interactive use of python?

http://docs.python.org/library/constants.html#exit says "They are useful
for the interactive interpreter shell and should not be used in
programs." but it seems to easy for exit, especially, to be used by
mistake.

Could the pollution only happen if the Python interpreter is an
interactive one?  Or, not as good, when called, could they tell this
isn't an interactive session and error?

--
components: Library (Lib)
messages: 101635
nosy: ralph.corderoy
severity: normal
status: open
title: site.py's Quitter pollutes builtins with exit and quit for 
non-interactive use
type: behavior
versions: Python 2.5, Python 2.6

___
Python tracker 

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



[issue8221] 2to3 mishandles StringIO inside a package with an io.py module

2010-03-24 Thread Robert Kern

New submission from Robert Kern :

When a module inside a package imports StringIO from cStringIO, it should 
change that to "from io import StringIO". However, if there is a module inside 
the package named io.py, 2to3 changes it to "from .io import StringIO".

[bug23]$ tree
.
`-- package
|-- __init__.py
|-- helper.py
`-- io.py

1 directory, 3 files

[bug23]$ cat package/helper.py
from cStringIO import StringIO

[bug23]$ 2to3 package 
RefactoringTool: Skipping implicit fixer: buffer
RefactoringTool: Skipping implicit fixer: idioms
RefactoringTool: Skipping implicit fixer: set_literal
RefactoringTool: Skipping implicit fixer: ws_comma
--- package/helper.py (original)
+++ package/helper.py (refactored)
@@ -1,1 +1,1 @@
-from cStringIO import StringIO
+from .io import StringIO
RefactoringTool: Files that need to be modified:
RefactoringTool: package/helper.py

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 101636
nosy: Robert.Kern
severity: normal
status: open
title: 2to3 mishandles StringIO inside a package with an io.py module
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



[issue8219] Facility and priority values/constants not documented for SysLogHandler

2010-03-24 Thread Vinay Sajip

Vinay Sajip  added the comment:

> From: Eric Smith 

> It still doesn't say that the LOG_ constants are defined on 
> SysLogHandler. Or is the intention that the user just use the 
> strings?

Whoops, now fixed (I think).

--

___
Python tracker 

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



[issue8219] Facility and priority values/constants not documented for SysLogHandler

2010-03-24 Thread Eric Smith

Eric Smith  added the comment:

> Vinay Sajip  added the comment:
> Whoops, now fixed (I think).

Looks good. Thanks!

--

___
Python tracker 

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



[issue8218] typo currect

2010-03-24 Thread David W. Lambert

David W. Lambert  added the comment:

I apologize for the noise.
Yes, I'll read the article carefully and provide changes as a unified
diff against the subversion trunk.

On Wed, 2010-03-24 at 08:20 +, Martin v. Löwis wrote:
> Martin v. Löwis  added the comment:
> 
> David, can you provide these changes as a unified diff against the subversion 
> trunk?
> 
> --
> nosy: +loewis
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue8222] enabling SSL_ERROR_WANT_READ on SSL sockets

2010-03-24 Thread Antoine Pitrou

New submission from Antoine Pitrou :

In light of the recv() and recv_into() implementation change (issue3890), I 
think we should enable SSL_MODE_AUTO_RETRY for SSL sockets. It prevents 
blocking read() calls from getting SSL_ERROR_WANT_READ at all.
(previously, we would loop manually in recv() and recv_into(); letting
the C OpenSSL runtime do it for us is certainly more efficient)

See description in
http://www.openssl.org/docs/ssl/SSL_CTX_set_mode.html:

« SSL_MODE_AUTO_RETRY

Never bother the application with retries if the transport is
blocking. If a renegotiation take place during normal operation,
a SSL_read(3) or SSL_write(3) would return with -1 and indicate
the need to retry with SSL_ERROR_WANT_READ. In a non-blocking
environment applications must be prepared to handle incomplete
read/write operations. In a blocking environment, applications
are not always prepared to deal with read/write operations
returning without success report. The flag SSL_MODE_AUTO_RETRY
will cause read/write operations to only return after the
handshake and successful completion. »

--
components: Library (Lib)
messages: 101640
nosy: giampaolo.rodola, janssen, pitrou
priority: normal
severity: normal
status: open
title: enabling SSL_ERROR_WANT_READ on SSL sockets
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue8222] enabling SSL_MODE_AUTO_RETRY on SSL sockets

2010-03-24 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
title: enabling SSL_ERROR_WANT_READ on SSL sockets -> enabling 
SSL_MODE_AUTO_RETRY on SSL sockets

___
Python tracker 

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



[issue3890] ssl.SSLSocket.recv() implementation may not work with non-blocking sockets

2010-03-24 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, I've opened a separate issue (issue8222) for the SSL_MODE_AUTO_RETRY 
suggestion.

This very issue has been fixed in r79226 (trunk), r79287 (py3k), r79290 (3.1) 
and r79291 (2.6).

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

___
Python tracker 

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



[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-03-24 Thread Noam Yorav-Raphael

Noam Yorav-Raphael  added the comment:

I can call flush() after the user code was executed, but a code like this:

>>> for i in range(10):
... print(i, end=' ')
... time.sleep(1)

will show the numbers only after 10 seconds, while I would like a number 
printed every second. I now see that that's what the regular shell does, so 
it's probably not a very big deal.

--

___
Python tracker 

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



[issue8223] memoryview is not documented in the Python library doc

2010-03-24 Thread STINNER Victor

New submission from STINNER Victor :

memoryview() is not documented in the Python Library documentation, only in the 
C API ("buffer" chapiter) :-/
http://docs.python.org/c-api/buffer.html

See also #8215.

--
assignee: georg.brandl
components: Documentation
messages: 101643
nosy: georg.brandl, haypo
severity: normal
status: open
title: memoryview is not documented in the Python library doc
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue7784] patch for making list/insert at the top of the list avoid memmoves

2010-03-24 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue8223] memoryview is not documented in the Python library doc

2010-03-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

Duplicate of #7696.

--
nosy: +flox
resolution:  -> duplicate
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue8223] memoryview is not documented in the Python library doc

2010-03-24 Thread Florent Xicluna

Changes by Florent Xicluna :


--
superseder:  -> Improve Memoryview/Buffer documentation

___
Python tracker 

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



[issue7696] Improve Memoryview/Buffer documentation

2010-03-24 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +haypo
priority:  -> normal
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue8220] site.py's Quitter pollutes builtins with exit and quit for non-interactive use

2010-03-24 Thread Brett Cannon

Brett Cannon  added the comment:

While technically site.py could probably detect it is running in an interactive 
session, changing this behaviour now would be backwards-incompatible and break 
pre-existing code that relies on this behaviour (which has been around for a 
long time).

--
nosy: +brett.cannon
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



[issue7784] patch for making list/insert at the top of the list avoid memmoves

2010-03-24 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
resolution:  -> rejected

___
Python tracker 

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



[issue8224] subprocess.Popen raises WindowsError if there is a dot in program name

2010-03-24 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar :

Assume you have two executables in currect directory:

  baz.exe
  foo.bar.exe

Now "subprocess.Popen(['baz'])" will run successfully. But 
"subprocess.Popen(['foo.bar'])" will throw the following exception:

Traceback (most recent call last):
  [...]
  File "C:\Python26\lib\subprocess.py", line 483, in check_call
retcode = call(*popenargs, **kwargs)
  File "C:\Python26\lib\subprocess.py", line 470, in call
return Popen(*popenargs, **kwargs).wait()
  File "C:\Python26\lib\subprocess.py", line 621, in __init__
errread, errwrite)
  File "C:\Python26\lib\subprocess.py", line 830, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

The workaround is to specify the full name "foo.bar.exe".

--
components: Library (Lib), Windows
messages: 101646
nosy: srid
severity: normal
status: open
title: subprocess.Popen raises WindowsError if there is a dot in program name
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



[issue8224] subprocess.Popen raises WindowsError if there is a dot in program name

2010-03-24 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

Note that typing "foo.bar" in the Windows command line works, only subprocess 
is not able to find the executable.

--

___
Python tracker 

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



[issue8224] subprocess.Popen raises WindowsError if there is a dot in program name

2010-03-24 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy: +brian.curtin
priority:  -> normal
stage:  -> test needed

___
Python tracker 

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



[issue8222] enabling SSL_MODE_AUTO_RETRY on SSL sockets

2010-03-24 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

By reading the doc it is not clear if we should activate this option only when 
dealing with blocking sockets.
What's the behavior with non blocking ones?
Does it result in a no-op or does it hang the applcation?

--

___
Python tracker 

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



[issue8222] enabling SSL_MODE_AUTO_RETRY on SSL sockets

2010-03-24 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

To me it looks clearly like a no-op ("Never bother the application with retries 
*if the transport is blocking*").

--

___
Python tracker 

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



[issue8213] Python 3 ignored PYTHONUNBUFFERED and -u

2010-03-24 Thread STINNER Victor

STINNER Victor  added the comment:

Use :

... print(i, end=' ')
... sys.stdout.flush()
... time.sleep(1)

--

___
Python tracker 

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



[issue8222] enabling SSL_MODE_AUTO_RETRY on SSL sockets

2010-03-24 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

Mmm you're right. Sorry.
I'm clearly too tired. =)

--

___
Python tracker 

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



[issue8224] subprocess.Popen raises WindowsError if there is a dot in program name

2010-03-24 Thread R. David Murray

R. David Murray  added the comment:

Note that it works with shell=True.  Which is what you would expect if it works 
in the shell.  Without shell=True, the program name is being passed to 
CreateProcess directly. Popen("foo") results in the same cannot find file error 
for me if the file is foo.bat.  Perhaps CreateFile has special rules for .exe, 
and they are broken as you describe?

In any case, it looks to me like if there is a bug here it is in Windows.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue7753] newgil backport

2010-03-24 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue8221] 2to3 mishandles StringIO inside a package with an io.py module

2010-03-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

This should be fixed in the latest versions of 2to3.

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2010-03-24 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-24 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Giampaolo, I tried committing your patch but the buildbot still fails, with the 
following errors:

test_auth_issued_twice (test.test_ftplib.TestTLS_FTPClass) ... ok
test_auth_ssl (test.test_ftplib.TestTLS_FTPClass) ... ok
test_control_connection (test.test_ftplib.TestTLS_FTPClass) ... ok
test_data_connection (test.test_ftplib.TestTLS_FTPClass) ... Exception in 
thread Thread-462:
Traceback (most recent call last):
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/threading.py", 
line 530, in __bootstrap_inner
self.run()
  File 
"/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_ftplib.py", 
line 223, in run
asyncore.loop(timeout=0.1, count=1)
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/asyncore.py", 
line 211, in loop
poll_fun(timeout, map)
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/asyncore.py", 
line 154, in poll
write(obj)
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/asyncore.py", 
line 88, in write
obj.handle_error()
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/asyncore.py", 
line 84, in write
obj.handle_write_event()
  File 
"/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_ftplib.py", 
line 290, in handle_write_event
super(SSLConnection, self).handle_write_event()
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/asyncore.py", 
line 440, in handle_write_event
self.handle_write()
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/asynchat.py", 
line 174, in handle_write
self.initiate_send()
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/asynchat.py", 
line 215, in initiate_send
self.handle_close()
  File 
"/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_ftplib.py", 
line 43, in handle_close
self.close()
  File 
"/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_ftplib.py", 
line 323, in close
self.socket.unwrap()
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/ssl.py", line 
258, in unwrap
s = self._sslobj.shutdown()
error: [Errno 32] Broken pipe

ERROR
test_login (test.test_ftplib.TestTLS_FTPClass) ... ok

==
ERROR: test_nlst (test.test_ftplib.TestTLS_FTPClassMixin)
--
Traceback (most recent call last):
  File 
"/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_ftplib.py", 
line 515, in test_nlst
self.assertEqual(self.client.nlst(), NLST_DATA.split('\r\n')[:-1])
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/ftplib.py", 
line 495, in nlst
self.retrlines(cmd, files.append)
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/ftplib.py", 
line 695, in retrlines
conn = self.transfercmd(cmd)
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/ftplib.py", 
line 357, in transfercmd
return self.ntransfercmd(cmd, rest)[0]
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/ftplib.py", 
line 670, in ntransfercmd
conn, size = FTP.ntransfercmd(self, cmd, rest)
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/ftplib.py", 
line 324, in ntransfercmd
host, port = self.makepasv()
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/ftplib.py", 
line 302, in makepasv
host, port = parse227(self.sendcmd('PASV'))
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/ftplib.py", 
line 786, in parse227
raise error_reply, resp
error_reply: 226 transfer complete

==
ERROR: test_retrbinary_rest (test.test_ftplib.TestTLS_FTPClassMixin)
--
Traceback (most recent call last):
  File 
"/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_ftplib.py", 
line 475, in test_retrbinary_rest
self.client.retrbinary('retr', received.append, rest=rest)
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/ftplib.py", 
line 678, in retrbinary
conn = self.transfercmd(cmd, rest)
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/ftplib.py", 
line 357, in transfercmd
return self.ntransfercmd(cmd, rest)[0]
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/ftplib.py", 
line 670, in ntransfercmd
conn, size = FTP.ntransfercmd(self, cmd, rest)
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/ftplib.py", 
line 324, in ntransfercmd
host, port = self.makepasv()
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/ftplib.py", 
line 302, in makepasv
host, port = parse227(self.sendcmd('PASV'))
  File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/ftplib.py", 
line 786, in parse227
raise error_reply, resp
error_reply: 200 type ok

=

[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-24 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: test needed -> needs patch
versions: +Python 2.6, Python 3.1

___
Python tracker 

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



[issue1553375] Add traceback.print_full_exception()

2010-03-24 Thread news1234

Changes by news1234 :


--
nosy: +news1234

___
Python tracker 

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



[issue8225] Wrong link in xml.etree documentation

2010-03-24 Thread Mangus Wahberg

New submission from Mangus Wahberg :

When using the interactive python help and entering xml.etree the help page 
contains a link faulty link to the online documentation.

The link in the help page is:

 MODULE DOCS
http://docs.python.org/library/xml.etree

But the correct link is:
http://docs.python.org/library/xml.etree.elementtree

--
assignee: georg.brandl
components: Documentation
messages: 101655
nosy: georg.brandl, mangus.wahberg
severity: normal
status: open
title: Wrong link in xml.etree documentation
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



[issue8225] Wrong link in xml.etree documentation

2010-03-24 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
priority:  -> normal

___
Python tracker 

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



[issue8203] IDLE about dialog credits raises UnicodeDecodeError

2010-03-24 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
priority:  -> normal

___
Python tracker 

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



[issue8226] sys.setfilesystemencoding("xxx"); open("a") => stack overflow

2010-03-24 Thread STINNER Victor

New submission from STINNER Victor :

sys.setfilesystemencoding() doesn't check if the argument is a valid encoding 
name.

If the filesystem encoding is invalid, open("a") goes into an unlimited loop. 
The default recursion limit is 1000, but the example crash at 930: too bad :-) 
Each loop allocate ~9000 bytes: Linux creates a 8 MB stack by default, and so 
~9000x930 uses all the stack.

Using a lower recursion limit, we can see the loop:
--
$ ./python -c 'import sys; sys.setrecursionlimit(30); 
sys.setfilesystemencoding("xxx"); open("x")'
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/SHARE/SVN/py3k/Lib/encodings/__init__.py", line 98, in 
search_function
level=0)
  File "/home/SHARE/SVN/py3k/Lib/encodings/__init__.py", line 98, in 
search_function
level=0)
  File "/home/SHARE/SVN/py3k/Lib/encodings/__init__.py", line 98, in 
search_function
level=0)
  File "/home/SHARE/SVN/py3k/Lib/encodings/__init__.py", line 98, in 
search_function
level=0)
  File "/home/SHARE/SVN/py3k/Lib/encodings/__init__.py", line 98, in 
search_function
level=0)
  File "/home/SHARE/SVN/py3k/Lib/encodings/__init__.py", line 98, in 
search_function
level=0)
  File "/home/SHARE/SVN/py3k/Lib/encodings/__init__.py", line 98, in 
search_function
level=0)
  File "/home/SHARE/SVN/py3k/Lib/encodings/__init__.py", line 98, in 
search_function
level=0)
  File "/home/SHARE/SVN/py3k/Lib/encodings/__init__.py", line 98, in 
search_function
level=0)
  File "/home/SHARE/SVN/py3k/Lib/encodings/__init__.py", line 98, in 
search_function
level=0)
  File "/home/SHARE/SVN/py3k/Lib/encodings/__init__.py", line 98, in 
search_function
level=0)
  File "/home/SHARE/SVN/py3k/Lib/encodings/__init__.py", line 98, in 
search_function
level=0)
  File "/home/SHARE/SVN/py3k/Lib/encodings/__init__.py", line 83, in 
search_function
norm_encoding = normalize_encoding(encoding)
  File "/home/SHARE/SVN/py3k/Lib/encodings/__init__.py", line 55, in 
normalize_encoding
if isinstance(encoding, bytes):
RuntimeError: maximum recursion depth exceeded while calling a Python object
--

--
components: Interpreter Core
messages: 101656
nosy: haypo
severity: normal
status: open
title: sys.setfilesystemencoding("xxx"); open("a") => stack overflow
type: crash
versions: Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue8226] sys.setfilesystemencoding("xxx"); open("a") => stack overflow

2010-03-24 Thread STINNER Victor

STINNER Victor  added the comment:

Attached patch raises a LookupError is the specified encoding is invalid. It 
uses _PyCodec_Lookup() function: is it allowed in bltinmodule.c?

--
keywords: +patch
Added file: http://bugs.python.org/file16635/setfilesystemencoding.patch

___
Python tracker 

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



[issue8226] sys.setfilesystemencoding("xxx"); open("a") => stack overflow

2010-03-24 Thread Ned Deily

Ned Deily  added the comment:

(duplicate of Issue8076)

--
nosy: +ned.deily

___
Python tracker 

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



[issue8227] Fix C API documentation: Argument parsing

2010-03-24 Thread STINNER Victor

New submission from STINNER Victor :

Patch fixing Doc/c-api/arg.rst:
 * 'z', 'z#', 'z*' does also accept Unicode
 * unify types name: replace "string or Unicode objet" by "string or Unicode" 
(it's shorter ;-))

See also #8215 and #2322.

--
assignee: georg.brandl
components: Documentation
files: c-api_arg.patch
keywords: patch
messages: 101659
nosy: georg.brandl, haypo
severity: normal
status: open
title: Fix C API documentation: Argument parsing
versions: Python 2.7
Added file: http://bugs.python.org/file16636/c-api_arg.patch

___
Python tracker 

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



[issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS

2010-03-24 Thread STINNER Victor

STINNER Victor  added the comment:

MaL> It unconditionally overrides CFLAGS - even if it is not 
MaL> set and defined by AC_PROG_CC as "-g -O2". That would need 
MaL> to be corrected.
MaL>
MaL> Other than that it does help a little work around the mess :-)

I commited my patch: r79392 (trunk). I'm waiting for the buildbots before 
porting to other branches :-)

On my Linux, .c files are now compiled with:
 - "-fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall ..." (default)
 - "-fno-strict-aliasing -g -Wall ..." (--with-pydebug): no more compiler 
optimization hurting gdb ;-)

--

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-24 Thread Florent Xicluna

Florent Xicluna  added the comment:

This patch solves the problem with 0.9.8m on my Debian workstation.

Actually there's 4 kind of errors on shutdown():
 - SSL_ERROR_WANT_READ
 - SSL_ERROR_WANT_WRITE
 - socket.error: errno.PIPE (32)
 - socket.error: 0

Since the command is "shutdown()", the patch silence all the socket errors, 
because they are probably due to the remote side closing the connection 
abruptly.
See the details on the Darryl's analysis:
http://bugs.python.org/issue8108#msg100980

This patch is very closed to Darryl's proposal.

--
stage: needs patch -> patch review
Added file: http://bugs.python.org/file16637/issue8108_openssl_098m.diff

___
Python tracker 

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



[issue8226] sys.setfilesystemencoding("xxx"); open("a") => stack overflow

2010-03-24 Thread STINNER Victor

STINNER Victor  added the comment:

Commited: r79393 (py3k), r79394 (3.1).

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



[issue8076] sys.setfilesystemencoding('foo') causes segmentation fault

2010-03-24 Thread STINNER Victor

STINNER Victor  added the comment:

Duplicate of #8226 (ok, it should be the opposite, but #8226 had a patch ;-)).

--
nosy: +haypo
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS

2010-03-24 Thread STINNER Victor

STINNER Victor  added the comment:

> I commited my patch: r79392 (trunk). I'm waiting for the buildbots before 
> porting to other branches :-)

The buildbots look happy => r79401 (py3k), blocked in 2.6 and 3.1

The issue title was "configure: ignore AC_PROG_CC hardcoded CFLAGS", and not 
"fix configure", so I can close the issue.

Marc-Andre: open a new issue if you are motivated to fix "configure mess" :-)

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



[issue8203] IDLE about dialog credits raises UnicodeDecodeError

2010-03-24 Thread STINNER Victor

STINNER Victor  added the comment:

Can you try this patch? The encoding argument was just ignored...

--
keywords: +patch
nosy: +haypo
Added file: http://bugs.python.org/file16638/idlelib_textView_encoding.patch

___
Python tracker 

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



[issue8224] subprocess.Popen raises WindowsError if there is a dot in program name

2010-03-24 Thread STINNER Victor

STINNER Victor  added the comment:

This issue might be documentation is subprocess documentation.

--
nosy: +haypo

___
Python tracker 

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



[issue8224] subprocess.Popen raises WindowsError if there is a dot in program name

2010-03-24 Thread STINNER Victor

STINNER Victor  added the comment:

Oops. I wanted to write: "This issue might be documented in subprocess 
documentation" :-/

--

___
Python tracker 

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



[issue8214] Add exception logging function to syslog module

2010-03-24 Thread STINNER Victor

STINNER Victor  added the comment:

syslog_exception() should be declared outside logexceptions(), so it's possible 
to call it directly. Example:

try:
  ...
except Exception:
  syslog_exception(*sys.exc_info())

--
nosy: +haypo

___
Python tracker 

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



[issue8224] subprocess.Popen raises WindowsError if there is a dot in program name

2010-03-24 Thread R. David Murray

R. David Murray  added the comment:

In order to do that someone will need to confirm that this affects all versions 
of windows, and whether or not it is a bug in windows or the expected behavior 
of CreateProcess.

--

___
Python tracker 

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



[issue6543] traceback presented in wrong encoding

2010-03-24 Thread STINNER Victor

STINNER Victor  added the comment:

> in compile.c, the c_filename member has utf8 encoding

The problem is maybe that c_filename should be an unicode object created using 
the file system default encoding and the surrogateescape error handler, to be 
able to store undecodable filenames (useful on POSIX OS using a byte string 
API, eg. Linux).

--
nosy: +haypo

___
Python tracker 

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



[issue8225] Wrong link in xml.etree documentation

2010-03-24 Thread Brian Curtin

Brian Curtin  added the comment:

I believe the problem is with pydoc. In the case of xml.etree, I don't think it 
should be displaying anything for MODULE DOCS.

help(xml.etree.ElementTree) does display the proper link.

The attached patch and test fixes the problem.

--
assignee: georg.brandl -> brian.curtin
components: +Library (Lib) -Documentation
keywords: +patch
nosy: +brian.curtin
stage:  -> patch review
type:  -> performance
Added file: http://bugs.python.org/file16639/issue8225.diff

___
Python tracker 

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



[issue8225] Wrong link in xml.etree documentation

2010-03-24 Thread Brian Curtin

Changes by Brian Curtin :


--
type: performance -> behavior

___
Python tracker 

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



[issue8228] pprint, single/multiple items per line parameter

2010-03-24 Thread Dmitry Chichkov

New submission from Dmitry Chichkov :

I've run into a case where pprint isn't really pretty. 

import pprint
pprint.PrettyPrinter().pprint([1]*100)

Prints a lengthy column of '1'; Not pretty at all. Look:

[1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1,
 1]

--
components: Library (Lib)
messages: 101672
nosy: Dmitry.Chichkov
severity: normal
status: open
title: pprint, single/multiple items per line parameter
type: feature request
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