[issue11199] urllib hangs when closing connection

2011-02-21 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

> rg3  added the comment:
>
> I have to correct myself. I applied the patch manually to my Python 2.6 
> installation. In Python 2.6, the line you moved is number 961, and I did the 
> same change.

OK. For information, you can apply it using the Unix "patch" command,
who can most of the time do all the work for you.

>
> With your change, the connection can be closed, but you have to wait for the 
> file to be completely transferred. As I was throttling to 1 KB/sec initially, 
> I thought it was still hanging because it takes more than 1 minute for the 
> test file to be sent. Still, the connection isn't immediately closed when you 
> request to close it.

That's expected, it's a consequence of this point I raised earlier:

> Note that I'm not sure why we need to wait for a further message on the 
> control channel (maybe it's part of an RFC or something...).

The current code explicitely waits for the end of transfer before
closing the data channel.
Don't ask me why, I don't have a clue. I wrote a 2-line patch to
disable this behaviour which seems to work fine, but since I'm not
sure why the code is doing this right now, I'd like some feedback
before doing the change.

--

___
Python tracker 

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



[issue11252] Handling statement OR assignment continuation '\' on Win32 platform

2011-02-21 Thread Suresh Kalkunte

Suresh Kalkunte  added the comment:

lukasz.langa, confirming the difference in return values for glob.glob() on 
Win32/Cygwin vs. Linux as the following results show:


F1()
ret_val1
 F2(ret_val1)
ret_val2

--
\\\
Cygwin
///
--
string.split() 
/
 glob.glob('/')
['/']

string.split()
\
 glob.glob('\')
['\\']

--
\\\
Win32
///
--
string.split()
/
 glob.glob('/')
['/']

string.split()
\
 glob.glob('\')
['\\']

--
\\\
Linux
///
--
string.split()
/
 glob.glob('/')
['/']

string.split()
\
 glob.glob('\')
[]

For my education, is there a reason why glob.glob('\') on Win32/Cygwin returns 
['\\'] instead of [] in Linux ?

--

___
Python tracker 

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



[issue10829] PyUnicode_FromFormatV() bugs with "%" and "%%" format strings

2011-02-21 Thread Ray.Allen

Ray.Allen  added the comment:

> Well, the main problem is that there are 3 different codes to parse the 
> format string, and each code is different... Attached patch factorizes the 
> code: create one subfunction parse_format_flags(). It fixes also this issue 
> and prepares the work to fix #10831.


Sounds nice! Maybe several related issues can also use this, like #7330.

--

___
Python tracker 

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



[issue9523] Improve dbm modules

2011-02-21 Thread Ray.Allen

Changes by Ray.Allen :


Removed file: http://bugs.python.org/file20783/issue_9523.diff

___
Python tracker 

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



[issue9523] Improve dbm modules

2011-02-21 Thread Ray.Allen

Ray.Allen  added the comment:

Sine r88451 removed unittest's assertSameElements() method, I need to updated 
my patch to fit it. So here it is.

--
Added file: http://bugs.python.org/file20832/issue9523.diff

___
Python tracker 

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



[issue11282] unittest document not keep consist with code

2011-02-21 Thread Ray.Allen

New submission from Ray.Allen :

r88451:
Remove unittest methods scheduled for removal in 3.3

This commit remove assertSameElements() and assertDictContainsSubset(). But 
shouldn't some modification be done in the unittest library documentation? I 
wonder if we should remove the docs about the two methods. Now the doc only 
said "Deprecated since version 3.2."

--
assignee: docs@python
components: Documentation
messages: 129036
nosy: docs@python, ysj.ray
priority: normal
severity: normal
status: open
title: unittest document not keep consist with code
versions: Python 3.3

___
Python tracker 

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



[issue11281] smtplib: add ability to bind to specific source IP address/port

2011-02-21 Thread Paulo Scardine

New submission from Paulo Scardine :

In smtplib there is now way to bind to an specific source address on a machine 
with multiple interfaces; also, there no way to control the source port for the 
connection.

Since 2.7, socket.create_connection accepts a source_address parameter, a 
(host, port) tuple for the socket to bind to as its source address before 
connecting. If host or port are '' or 0 respectively the OS default behavior 
will be used.

I would like to add source_ip and source_port parameters to smtplib.SMTP, 
default to '' and 0 respectively.

It is a small change with no impact over existing code. Should I submit a patch?

--
components: Library (Lib)
messages: 129035
nosy: paulos
priority: normal
severity: normal
status: open
title: smtplib: add ability to bind to specific source IP address/port
versions: Python 2.7

___
Python tracker 

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-21 Thread Brett Cannon

Brett Cannon  added the comment:

Does it matter that _4G < UINT_MAX?

--
stage:  -> needs patch

___
Python tracker 

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



[issue11246] PyUnicode_FromFormat("%V") decodes the byte string from ISO-8859-1

2011-02-21 Thread Ray.Allen

Changes by Ray.Allen :


Removed file: http://bugs.python.org/file20818/issue11246.diff

___
Python tracker 

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



[issue11246] PyUnicode_FromFormat("%V") decodes the byte string from ISO-8859-1

2011-02-21 Thread Ray.Allen

Ray.Allen  added the comment:

Thanks haypo!

Here the updated patch, following your comments.

--
type:  -> behavior
Added file: http://bugs.python.org/file20831/issue11246.diff

___
Python tracker 

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



[issue11074] fix tokenize so it can be reloaded

2011-02-21 Thread Brett Cannon

Brett Cannon  added the comment:

r88498 for 3.3
r88499 for 3.2

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

___
Python tracker 

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



[issue11252] Handling statement OR assignment continuation '\' on Win32 platform

2011-02-21 Thread Suresh Kalkunte

Suresh Kalkunte  added the comment:

Yes, the easier fix is to change build.conf file to not use '\'. However, 

> on Linux `glob.glob('\\')` == `[]` so nothing is actually added. 
> OTOH on Windows `glob.glob('\\')` == `['\\']`

is more definite compared to

> They work on Linux by mere coincidence

--
resolution: invalid -> works for me

___
Python tracker 

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



[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-02-21 Thread Brett Cannon

Brett Cannon  added the comment:

r88496 for 3.3
r88497 for 3.2

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

___
Python tracker 

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-21 Thread Ned Deily

Ned Deily  added the comment:

>>> from test.support import _4G
>>> _4G
4294967296
>>> mapping.size()
4294967300

pbuf.len = 4294967300, len = 4294967300
UINT_MAX = 4294967295

--

___
Python tracker 

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



[issue10992] tests failing when run under coverage

2011-02-21 Thread Brett Cannon

Brett Cannon  added the comment:

3.3 in r88494

--
resolution:  -> fixed
stage: needs patch -> 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



[issue11280] urllib2 http_error_302 calls undefined "getheaders" method

2011-02-21 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Andres, the HTTP Response is sent the xxx_error_xxx method when it is handled 
by RedirectHandler. Does the below code not work for you in case? I am unable 
to see the problem here (and also this piece of code is present from 2004!) I 
am inclined to mark this request as rejected. (Please reopen if you are sure 
that this is wrong in specific scenarios)

--
nosy: +orsenthil
resolution:  -> works for me
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue11280] urllib2 http_error_302 calls undefined "getheaders" method

2011-02-21 Thread Andres Riancho

New submission from Andres Riancho :

Buggy Code:

"""
def http_error_302(self, req, fp, code, msg, headers):
# Some servers (incorrectly) return multiple Location headers
# (so probably same goes for URI).  Use first header.
if 'location' in headers:
newurl = headers.getheaders('location')[0]
elif 'uri' in headers:
newurl = headers.getheaders('uri')[0]
else:
return
"""

The getheaders method is not be defined for the headers parameter, which is a 
dict object. This seems to be a mistake with the HTTPResponse.  getheaders 
function that's defined in httplib.py


Fixed Code:

"""
def http_error_302(self, req, fp, code, msg, headers):
# Some servers (incorrectly) return multiple Location headers
# (so probably same goes for URI).  Use first header.
if 'location' in headers:
newurl = headers.get('location')
elif 'uri' in headers:
newurl = headers.get('uri')
else:
return
"""

--
components: Extension Modules
messages: 129026
nosy: Andres.Riancho
priority: normal
severity: normal
status: open
title: urllib2 http_error_302 calls undefined "getheaders" method
type: crash
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



[issue11133] inspect.getattr_static code execution

2011-02-21 Thread Andreas Stührk

Andreas Stührk  added the comment:

Updated patch.

--
Added file: http://bugs.python.org/file20830/inspect_issue_11133_v2.patch

___
Python tracker 

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



[issue11133] inspect.getattr_static code execution

2011-02-21 Thread Andreas Stührk

Andreas Stührk  added the comment:

> The patch is not sufficient - instances may have a class member "__dict__" 
> whilst still having an instance __dict__.

Sure, but I don't think there is a way how you can access the instance
__dict__ in that case inside Python code. At least I can't think of
one.

>Alternatively the "__dict__" property may be provided by a base class and so 
>not available in "type(obj).__dict__" but still be provided by a property.
>
> I don't think there is any general way to tell whether fetching obj.__dict__ 
> will get an instance dictionary or fetch a "__dict__" member from the class 
> or a base-class... (Hence the documented exception.)

Why not? ``obj.__dict__`` will fetch the instance dictionary iff there
is no class attribute "__dict__" in any of the base classes. In the
patch,``type.__dict__["__dict__"].__get__()`` is used to get (without
any doubt) the class dictionary. By looking inside that dictionary, we
can now tell whether "__dict__" is overwritten: If it isn't
overwritten, the dictionary either doesn't have a "__dict__" entry at
all or the value is a getset_descriptor. So we just need to iterate
over a type's mro, look inside each entries' dictionary and stop when
a "__dict__" entry is found.

--

___
Python tracker 

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-21 Thread Brett Cannon

Brett Cannon  added the comment:

So on my system, that 'while' loop is executed once (put a printf() after the 
bug and len adjustments and it was never hit).

--

___
Python tracker 

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



[issue11269] cgi.FieldStorage forgets to unquote field names when parsing multipart/form-data

2011-02-21 Thread R. David Murray

R. David Murray  added the comment:

Thanks for doing the research.  As far as I know we've never had a request to 
support RFC2047 in FieldStorage, so presumably no browsers actually generate it.

--
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue11279] test_posix and lack of "id -G" support - less noise required?

2011-02-21 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +jcea, ronaldoussoren

___
Python tracker 

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



[issue11279] test_posix and lack of "id -G" support - less noise required?

2011-02-21 Thread Peter Bray

New submission from Peter Bray :

Solaris 10's id(1M) does not support the "-G" option, so we get the following:

% ./python -m test test_posix 
[1/1] test_posix
id: illegal option -- G
Usage: id [-ap] [user]
1 test OK.

The code already tests that id -G (std) output, and assumes that id -G is not 
supported if the output is empty. 

QUESTION: Does the user compiling the code need to see the stderr output of id? 
After all the test is correctly skipped.

Fix:
% diff ./Lib/test/test_posix.py.FCS ./Lib/test/test_posix.py
378c378
< with os.popen('id -G') as idg:
---
> with os.popen('id -G 2> /dev/null') as idg:

Consideration: Lib/platform.py has introduced DEV_NULL but it does not seem to 
be used in other code or tests (beside platform.py).

Regards,

Peter

--
components: Tests
messages: 129021
nosy: illumino
priority: normal
severity: normal
status: open
title: test_posix and lack of "id -G" support - less noise required?
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue11278] raw_input() and input() not stripping EOL on win32

2011-02-21 Thread Dave Flogeras

Dave Flogeras  added the comment:

Ok, I'm actually not sure of what I just said.  I might not be running the 
version I think I am, since windows behaves differently when using a program 
started with extensions vs. started with python.  It might actually be that 
Python 2.7 is correct, but 3.2 is not.

--

___
Python tracker 

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



[issue11269] cgi.FieldStorage forgets to unquote field names when parsing multipart/form-data

2011-02-21 Thread Sergey Schetinin

Sergey Schetinin  added the comment:

I've dug into the RFCs and tested various browsers.

RFC 2388 (the one defining multipart/form-data) says: 

Field names originally in non-ASCII character sets may be encoded
within the value of the "name" parameter using the standard method
described in RFC 2047.

RFC 2047 in turn defines the coding sometimes seen in email headers 
("=?iso-8859-1?q?this is some text?=").

That means that this report is invalid. And I was misled by the bug that 
belongs to Google Chrome (which is the browser I was doing initial testing 
with).

I tested this with the following html form:


Test


Here are the headers submitted by various browsers:

IE 8: 
  Content-Disposition: form-data; name=""%22"
Firefox 4.0b11:
  Content-Disposition: form-data; name="\"%22"
Chrome 9:
  Content-Disposition: form-data; name="%22%22"

And the Chrome one is the one clearly invalid.

cgi still does no decoding of parameters as per RFC 2047, but browsers do not 
use that encoding for non-ASCII field names anyway (they just put the field 
names in UTF-8), so that might be unnecessary.

Please close this bug at your own judgement.

--

___
Python tracker 

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



[issue11278] raw_input() and input() not stripping EOL on win32

2011-02-21 Thread Brian Curtin

Brian Curtin  added the comment:

Duplicate of #11272.

--
nosy: +brian.curtin
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue11278] raw_input() and input() not stripping EOL on win32

2011-02-21 Thread Dave Flogeras

New submission from Dave Flogeras :

>From the python prompt, raw_input() (2.7.1) and input (3.2.0) behave as 
>documented (they strip the trailing EOL chars)

However the two line test program:
x = raw_input() # or input() in 3.2.x
print( repr( x ))

And then run from the command line prompt, .\test.py, shows 'mytest\r' 
including the EOL char.

--
messages: 129017
nosy: Dave.Flogeras
priority: normal
severity: normal
status: open
title: raw_input() and input() not stripping EOL on win32
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue11085] expose _abcoll as collections.abc

2011-02-21 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Followed Brett's example with importlib and made collection into a package with 
an abc module.  See r88490.

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



[issue11216] email.message.Message set_charset does not encode properly?

2011-02-21 Thread R. David Murray

R. David Murray  added the comment:

Discussion of the new API, and what changes will be made for 3.3, will take 
place on the email-sig mailing list (see http://mail.python.org).  Please join! 
 Right now it is a dormant list, but I plan to post some stuff soon :)

The more I stare at the set_charset code and try to write out the actual 
algorithm in words, the buggier this looks.  If the input and output charsets 
differ, the body encoding is done unconditionally, but the CTE is set in that 
case only if the CTE header doesn't exist.

I've attached a proposed doc patch which tries to describe the actual 
algorithm.  If you'd care to take a look and see if you see any mistakes in my 
description, that would be great.  Note that you have to go down a couple of 
twisty passages if you want to fully understand what the set_charset code is 
doing.

--
components: +Documentation
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file20829/set_charset_doc.patch

___
Python tracker 

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



[issue4681] mmap offset should be off_t instead of ssize_t, and size calculation needs corrected

2011-02-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Backported in r88487 to 3.2, and in r88488 to 2.7.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions: +Python 2.7

___
Python tracker 

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



[issue10829] PyUnicode_FromFormatV() bugs with "%" and "%%" format strings

2011-02-21 Thread STINNER Victor

STINNER Victor  added the comment:

Well, the main problem is that there are 3 different codes to parse the format 
string, and each code is different... Attached patch factorizes the code: 
create one subfunction parse_format_flags(). It fixes also this issue and 
prepares the work to fix #10831.

--
Added file: http://bugs.python.org/file20828/parse_format_flags.patch

___
Python tracker 

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-21 Thread Brett Cannon

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



[issue4681] mmap offset should be off_t instead of ssize_t, and size calculation needs corrected

2011-02-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I was a bit optimistic concerning 32-bit Windows. I had to do some changes, in 
part because off_t is 32-bit there. The final patch is committed in r88486 
(tested under 32-bit and 64-bit Linux and Windows).

--

___
Python tracker 

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-21 Thread Ned Deily

Ned Deily  added the comment:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 10 at address: 0x00010170e000
0x0001016eeaa0 in crc32 ()

(gdb) backtrace
#0  0x0001016eeaa0 in crc32 ()
#1  0x0001016e806d in PyZlib_crc32 (self=0x1016aa588, args=0x1016bf220) at 
/private/tmp/a/py3k/Modules/zlibmodule.c:993

PyZlib_crc32(PyObject *self, PyObject *args)
...
while (len > (size_t) UINT_MAX) {
crc32val = crc32(crc32val, buf, UINT_MAX);
...

--

___
Python tracker 

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



[issue11216] email.message.Message set_charset does not encode properly?

2011-02-21 Thread Shay Rojansky

Shay Rojansky  added the comment:

Thanks and no problem for me, the workaround (deleting the header) works just 
fine.

I'm not sure if/when the more general discussion on the package will take place 
(low-level vs. high-level), I would be interested in following.

--

___
Python tracker 

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



[issue6137] Make pickle generated by Python 3.x compatible with 2.x and vice-versa.

2011-02-21 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



[issue11216] email.message.Message set_charset does not encode properly?

2011-02-21 Thread R. David Murray

R. David Murray  added the comment:

While your idea has merit, we can only add a parameter in a new version (not in 
a bug-fix release), so the doc fix is all we can do before 3.3.

--
versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6

___
Python tracker 

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



[issue11243] email/message.py str conversion

2011-02-21 Thread R. David Murray

Changes by R. David Murray :


--
priority: normal -> high

___
Python tracker 

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



[issue6784] byte/unicode pickle incompatibilities between python2 and python3

2011-02-21 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



[issue11158] Python VM deadlock

2011-02-21 Thread Vinay Sajip

Vinay Sajip  added the comment:

As I've not had any response to my latest comment for over a week, I'm closing 
this issue, as I said I would.

--
status: pending -> closed

___
Python tracker 

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



[issue11270] logging: RotatingFileHandler crash when opening the Logfile in an Texteditor

2011-02-21 Thread Vinay Sajip

Vinay Sajip  added the comment:

I don't think this error can be avoided, though if you set 
logging.raiseExceptions to False then the exception won't be raised, though the 
handler won't produce any more output, either.

I don't believe this is a logging bug - you're not supposed to keep files open 
in the editor while you're still rotating, as the library assumes that all 
rotated files are under its control for deleting and renaming.

If you need different functionality, subclass the handler and implement your 
own handling logic to deal with open files; it's not appropriate to do this in 
the standard library as there's no "obvious" way to handle locking of files 
which are supposed to be under the library's control.

Based on the above reasoning, I'm marking this as "invalid" and "pending" to 
see what your response to my comment is. If I don't hear any more about this 
for a week or so, I'll mark this issue as closed.

--
assignee:  -> vinay.sajip
resolution:  -> invalid
status: open -> pending

___
Python tracker 

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



[issue11251] cmd.Cmd tab completion treats dashes as spaces

2011-02-21 Thread R. David Murray

Changes by R. David Murray :


--
resolution: wont fix -> invalid
stage:  -> committed/rejected

___
Python tracker 

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-21 Thread Ned Deily

Ned Deily  added the comment:

Current OS X zlib is 1.2.3.  Test crashes with most recently released zlib, 
1.2.5, as well.

--

___
Python tracker 

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



[issue11199] urllib hangs when closing connection

2011-02-21 Thread rg3

rg3  added the comment:

I have to correct myself. I applied the patch manually to my Python 2.6 
installation. In Python 2.6, the line you moved is number 961, and I did the 
same change.

With your change, the connection can be closed, but you have to wait for the 
file to be completely transferred. As I was throttling to 1 KB/sec initially, I 
thought it was still hanging because it takes more than 1 minute for the test 
file to be sent. Still, the connection isn't immediately closed when you 
request to close it.

--

___
Python tracker 

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I've tried INT_MAX and it didn't change anything.

--

___
Python tracker 

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-21 Thread STINNER Victor

STINNER Victor  added the comment:

Do adler32() and crc32() support length up to UINT32_MAX? Or should we maybe 
limit the length to INT32_MAX?

--
nosy: +haypo

___
Python tracker 

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



[issue11277] test_zlib crashes under Snow Leopard buildbot

2011-02-21 Thread Antoine Pitrou

New submission from Antoine Pitrou :

Following r88460 (issue10276), test_zlib crashes on the Snow Leopard buildbot 
(apparently in the new "test_big_buffer" test case).

--
messages: 129002
nosy: ixokai, ned.deily, pitrou
priority: critical
severity: normal
status: open
title: test_zlib crashes under Snow Leopard buildbot
type: crash
versions: 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



[issue10826] pass_fds sometimes fails

2011-02-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Committed in r88484 (3.x), r88485 (3.2).

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

___
Python tracker 

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



[issue11270] logging: RotatingFileHandler crash when opening the Logfile in an Texteditor

2011-02-21 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue11269] cgi.FieldStorage forgets to unquote field names when parsing multipart/form-data

2011-02-21 Thread R. David Murray

Changes by R. David Murray :


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



[issue11268] 3.2 Mac OS X installer may fail if documentation was previously installed

2011-02-21 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Thanks Ned :-)

--

___
Python tracker 

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



[issue11229] Make the Mac installer more like the Windows installer

2011-02-21 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> ned.deily

___
Python tracker 

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



[issue11199] urllib hangs when closing connection

2011-02-21 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

> I just tested the patch under Python 2.6. It doesn't seem to solve the 
> problem. 

Are you sure the patch applied cleanly ?
I tested both on 3.2 and 2.7, and it fixed the problem for me.
If not, could you submit a tcpdump capture ?

--

___
Python tracker 

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



[issue11260] smtpd-as-a-script feature should be documented and should use argparse

2011-02-21 Thread R. David Murray

R. David Murray  added the comment:

Thanks for taking an interest in this and working up a patch.  Unfortunately I 
do have some concerns.

As far as I know the only module that currently uses argparse is compileall, 
which was only changed recently.

Do tests currently exist for smtpd run as a script?  If not, our experience 
with converting compileall to argparse indicates a thorough test suite is 
needed (and even so we missed some things we hadn't thought to test).

We converted compileall because its help output was broken, but in retrospect 
it might have been better to fix the help output in the existing code.  In 
other words, if the current code works, is "updating" it a sufficient reason to 
change it, considering the chances of introducing new bugs?  The answer might 
be yes, but I don't think it is obviously yes.

--
nosy: +r.david.murray
type:  -> feature request

___
Python tracker 

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



[issue10830] PyUnicode_FromFormatV("%c") doesn't support non-BMP characters on narrow build

2011-02-21 Thread STINNER Victor

STINNER Victor  added the comment:

Fixed in 3.3 (r88481).

Keep it open to backport it maybe to 3.2 later.

--
status: open -> pending

___
Python tracker 

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



[issue11168] UnicodeEncodeError on recusion limit if the script filename is undecodable

2011-02-21 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> fixed
status: open -> closed
versions:  -Python 3.2

___
Python tracker 

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



[issue11168] UnicodeEncodeError on recusion limit if the script filename is undecodable

2011-02-21 Thread STINNER Victor

STINNER Victor  added the comment:

r88480 removes the filename variable: use gdb7+python-gdb.py or the 
faulthandler module to get a Python backtrace.

--

___
Python tracker 

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



[issue11268] 3.2 Mac OS X installer may fail if documentation was previously installed

2011-02-21 Thread Ned Deily

Ned Deily  added the comment:

Applied in py3k (r88475), 32 (r88477) for 3.2.1, and 27 (r88479) unreleased.

--
keywords: +3.2regression -patch
resolution:  -> fixed
stage: commit review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue11169] compileall doesn't support PEP 383 (undecodable paths/filenames)

2011-02-21 Thread STINNER Victor

STINNER Victor  added the comment:

Fixed by r88478.

> Not sure this can make it into stable branches.

I agree, I prefer to not touch stable releases.

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



[issue11187] PyUnicode_AsEncodedString: the bootstrap hack is no more needed

2011-02-21 Thread STINNER Victor

STINNER Victor  added the comment:

Fixed by r88476. I prefer to only change it in Python 3.3, so no backport.

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



[issue11251] cmd.Cmd tab completion treats dashes as spaces

2011-02-21 Thread Jon McKenzie

Jon McKenzie  added the comment:

Marked as closed, since I found this was not a bug, but just a readline default.

Can set tab completion delimiters with readline.set_completer_delims(string)

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



[issue11276] 2to3: imports fixer doesn't update references to modules specified without attributes

2011-02-21 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue11276] 2to3: imports fixer doesn't update references to modules specified without attributes

2011-02-21 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis 
:

$ cat test.py
import cPickle
cPickle
cPickle.load
$ 2to3 -f imports test.py
RefactoringTool: Refactored test.py
--- test.py (original)
+++ test.py (refactored)
@@ -1,3 +1,3 @@
-import cPickle
+import pickle
 cPickle
-cPickle.load
+pickle.load
RefactoringTool: Files that need to be modified:
RefactoringTool: test.py

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 128991
nosy: Arfrever
priority: normal
severity: normal
status: open
title: 2to3: imports fixer doesn't update references to modules specified 
without attributes
versions: Python 2.7, 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



[issue11246] PyUnicode_FromFormat("%V") decodes the byte string from ISO-8859-1

2011-02-21 Thread STINNER Victor

STINNER Victor  added the comment:

+text = PyUnicode_FromFormat(b'repr=%V', 'abcdef', b'abcdef')
+self.assertEqual(text, 'repr=abcdef')

How do you know which argument is used? For example, you should use instead 
'abc' and b'xyz'.

+text = PyUnicode_FromFormat(b'repr=%V', None, '人民'.encode('UTF-8'))
+self.assertEqual(text, 'repr=人民')

I prefer ASCII literals using \x or \u: '\xe4\xba\xe6\xb0\u2018'.

You should also add a test specific to the replace error handler, e.g. (None, 
b'abc\xff') => 'abc\ufffd'.

--

___
Python tracker 

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



[issue11252] Handling statement OR assignment continuation '\' on Win32 platform

2011-02-21 Thread Łukasz Langa

Łukasz Langa  added the comment:

Unfortunately the bug is not in ConfigParser but rather in your gen-build.py. 
There is nothing special about backslashes and ConfigParser reads them in as 
part of the value for ldap/paths.

But then look what happens in gen-build.py:215. The `split()` returns

['ldap/apr_ldap_init.c', '\\', 'ldap/apr_ldap_option.c', '\\', 
'ldap/apr_ldap_rebind.c']

and later on the `map()` in line 216 adds new elements to the list. However, on 
Linux `glob.glob('\\')` == `[]` so nothing is actually added. OTOH on Windows 
`glob.glob('\\')` == `['\\']`. This behaviour is correct. As a side note, the 
assert actually fails on '/' (thanks to `clean_path`).

So, the easiest fix for you is to get rid of the backslashes from the 
configuration file. They work on Linux by mere coincidence.

--
status: open -> closed

___
Python tracker 

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



[issue11272] input() has trailing carriage return on windows

2011-02-21 Thread Duncan Booth

Duncan Booth  added the comment:

Yes, it does indeed look like stdin has been opened in binary mode. Just 
iterating over it also gives the spurious carriage returns:


C:\Python32>python
Python 3.2 (r32:88445, Feb 20 2011, 21:29:02) [MSC v.1500 32 bit (Intel)] 
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> for line in sys.stdin:
... print(repr(line))
...
hello
'hello\r\n'
^Z
>>>

--

___
Python tracker 

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



[issue11263] Wrong link to source code of ftplib

2011-02-21 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Thanks for the report.
Fixed in r88473 and r88474.

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



[issue11089] ConfigParser 50x slower in 2.7

2011-02-21 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

See r88469 and r88470.

--
resolution: later -> 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



[issue10990] tests mutating sys.gettrace() w/o re-instating previous state

2011-02-21 Thread Brett Cannon

Brett Cannon  added the comment:

r88467 has it for 3.3.

--
resolution: accepted -> 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



[issue8650] zlibmodule.c isn't 64-bit clean

2011-02-21 Thread STINNER Victor

STINNER Victor  added the comment:

Woops, I removed a duplicate message of Antoine. in this issue instead of 
#8651. Removed message:
-
> Fixed by r87729.

This only addresses the compress() and decompress() functions, but e.g. crc32() 
and adler32() are also touched by this issue.
-

--

___
Python tracker 

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



[issue8651] "s#" and friends can silently truncate buffer length

2011-02-21 Thread STINNER Victor

STINNER Victor  added the comment:

I removed Antoine's message because it was related to issue #8650.

--

___
Python tracker 

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



[issue11272] input() has trailing carriage return on windows

2011-02-21 Thread SilentGhost

SilentGhost  added the comment:

> Can you try Python 3.1 with -u command line flag?
Yes, I can reproduce it with 3.1.3 with -u flag

--

___
Python tracker 

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



[issue8651] "s#" and friends can silently truncate buffer length

2011-02-21 Thread STINNER Victor

Changes by STINNER Victor :


--
Removed message: http://bugs.python.org/msg128976

___
Python tracker 

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



[issue8650] zlibmodule.c isn't 64-bit clean

2011-02-21 Thread STINNER Victor

Changes by STINNER Victor :


--
Removed message: http://bugs.python.org/msg128975

___
Python tracker 

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



[issue11272] input() has trailing carriage return on windows

2011-02-21 Thread STINNER Victor

STINNER Victor  added the comment:

> Confirmed on Python 3.2 (winxp).
> The problem doesn't seem to exist on 3.1.3.

Can you try Python 3.1 with -u command line flag?

I changed Python 3.2 to always open all files in binary module, not only if -u 
flag is used. I had also to fix the parser to support \r\n newlines: it looks 
like I missed something in the parser.

--

___
Python tracker 

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



[issue8650] zlibmodule.c isn't 64-bit clean

2011-02-21 Thread Nadeem Vawda

Changes by Nadeem Vawda :


--
nosy: +nvawda

___
Python tracker 

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



[issue8651] "s#" and friends can silently truncate buffer length

2011-02-21 Thread Nadeem Vawda

Changes by Nadeem Vawda :


--
nosy: +nvawda

___
Python tracker 

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



[issue11199] urllib hangs when closing connection

2011-02-21 Thread rg3

rg3  added the comment:

I just tested the patch under Python 2.6. It doesn't seem to solve the problem.

--

___
Python tracker 

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



[issue8407] expose signalfd(2) and sigprocmask(2) in the signal module

2011-02-21 Thread Michael Schurter

Michael Schurter  added the comment:

Any hopes of getting this into Python 3.3?

--
nosy: +schmichael
versions: +Python 3.3 -Python 2.7

___
Python tracker 

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



[issue11199] urllib hangs when closing connection

2011-02-21 Thread rg3

rg3  added the comment:

That makes sense and explains why the problem could not be reproduced over the 
loopback (the transfer would be too fast).

I have not tested the patch, but I can reproduce the problem with a local 
connection if I compile pure-ftpd with the --with-throttling switch and limit 
the bandwidth to 1 KB/sec, using the -t option.

--

___
Python tracker 

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



[issue10276] zlib crc32/adler32 buffer length truncation (64-bit)

2011-02-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thank you for the patch! Committed in r88460 (3.3) and r88461 (3.2).
2.7 would need more surgery in order for this to be fixed, see #8651 and #8650.

--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> pending
versions:  -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



[issue8651] "s#" and friends can silently truncate buffer length

2011-02-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Fixed by r87728.

This only addresses the compress() and decompress() functions, but e.g. crc32() 
and adler32() are also touched by this issue.

--

___
Python tracker 

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



[issue8650] zlibmodule.c isn't 64-bit clean

2011-02-21 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Fixed by r87729.

This only addresses the compress() and decompress() functions, but e.g. crc32() 
and adler32() are also touched by this issue.

--
versions:  -Python 2.6, 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



[issue11272] input() has trailing carriage return on windows

2011-02-21 Thread Georg Brandl

Changes by Georg Brandl :


--
keywords: +3.2regression

___
Python tracker 

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



[issue11275] Linking to gcc's gomp causes crash later.

2011-02-21 Thread Hoyt Koepke

New submission from Hoyt Koepke :

Hello,

I've encountered a strange bug that appears to be either in gcc's gomp
implementation or in how python loads extension modules linked against
gomp.  Here's the error:

Using gcc (multiple versions) on linux, I compile an empty c extension
module and pass -lgomp as a linker arg.  If I import it, running a
simple script in matplotlib causes a segfault.  Not passing -lgomp or
not loading the empty module makes the code works fine.  More
specifically, if I compile:

#include "Python.h"
static struct PyMethodDef methods[] = {
 {0, 0, 0, 0}
};
PyMODINIT_FUNC initempty(void) {
 Py_InitModule4("empty", methods, 0, 0, PYTHON_API_VERSION);
}

using ``ext_modules = [Extension("empty", ["empty.c"], extra_link_args
= ["-lgomp"])]``, then

import empty
import matplotlib.pylab as plt

plt.figure()
plt.plot([0,1], [0,1], '-b')
plt.show()


causes the program to segfault (removing ``import empty`` makes it
fine).  Looking at a traceback:

#0  0x00f78bc7 in __cxa_allocate_exception () from /usr/lib/libstdc++.so.6
#1  0x008f51f2 in py_to_agg_transformation_matrix (obj=0x8223f58,
errors=false) at src/agg_py_transforms.cpp:20
#2  0x008fdd73 in _path_module::update_path_extents (this=0x8e45f90,
args=...) at src/path.cpp:378
#3  0x009048bd in
Py::ExtensionModule<_path_module>::invoke_method_varargs (this=, method_def=0x8e9ae30, args=...) at
./CXX/Python2/ExtensionModule.hxx:184
#4  0x008f0d96 in method_varargs_call_handler
(_self_and_name_tuple=0x8e6eeac, _args=0x94e683c) at
CXX/Python2/cxx_extensions.cxx:1714
#5  0x080dc0d0 in PyEval_EvalFrameEx ()
#6  0x080dddf2 in PyEval_EvalCodeEx ()

While occurring in some of matplotlib's extension code (and I haven't
found another library that crashes it), the fact that the deciding
factor is whether I link against gomp indicates the it's probably
upstream somewhere.

I encountered this error a year ago and asked about it on the
matplotlib mailing list, but found a quick workaround then, and with
deadline pressure I forgot about it.  However, it's come up again, and
then I was asked to bump it to python-dev, which is why I'm posting it
here.

I can reproduce it on the following systems.  In all cases, matplotlib
is compiled from source on the development branch (r8969) and uses
QT4Agg as the backend, as is numpy, scipy, etc.  If needed, I can
track down more versions.

gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.4, 64bit, Python 2.6.6, ubuntu 10.10
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3, 64bit, Python 2.6.5, ubuntu 10.04
gcc (Ubuntu 4.4.1-4ubuntu9) 4.4.1, 32bit, Python 2.6.4, ubuntu 9.10

gcc 4.5.2 (source build), Python 2.6.5, ubuntu 10.04.  On this build,
the given source example does not produce the result, and I haven't
been able to tweak it so it does.  However, linking to a much larger
extension library that uses many different parts of openmp causes
exactly the same crash.  If I recompile that library without openmp
support, then everything works fine; with openmp support it corrupts
something and matplotlib crashes in exactly the same way.

gcc 4.3.2, Python 2.6.2, ubuntu 9.04 (I don't have access to this
system any more, since it got upgraded, but it had the same problem a
year ago).

I attached example code that reproduces it.  

Thanks,

--Hoyt

--
components: Extension Modules
files: python-gomp-bug.tar.gz
messages: 128974
nosy: hoytak
priority: normal
severity: normal
status: open
title: Linking to gcc's gomp causes crash later.
type: crash
versions: Python 2.6
Added file: http://bugs.python.org/file20827/python-gomp-bug.tar.gz

___
Python tracker 

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



[issue11272] input() has trailing carriage return on windows

2011-02-21 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +haypo

___
Python tracker 

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



[issue11272] input() has trailing carriage return on windows

2011-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +pitrou, v+python

___
Python tracker 

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



[issue11272] input() has trailing carriage return on windows

2011-02-21 Thread Brian Curtin

Brian Curtin  added the comment:

#10841 may be related.

--

___
Python tracker 

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



[issue11272] input() has trailing carriage return on windows

2011-02-21 Thread SilentGhost

SilentGhost  added the comment:

With py3.2 final, I can reproduce this bug with command line (as demonstrated 
by the OP) but not with the IDLE (for 3.2a4+ I have only command line, which I 
compiled myself).

--

___
Python tracker 

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



[issue6692] asyncore kqueue support

2011-02-21 Thread Марк Коренберг

Changes by Марк Коренберг :


--
nosy: +mmarkk

___
Python tracker 

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



[issue11272] input() has trailing carriage return on windows

2011-02-21 Thread SilentGhost

SilentGhost  added the comment:

On WinXp with Python 3.2a4+ or 3.1.3 I cannot reproduce this issue.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue11271] concurrent.futures.ProcessPoolExecutor.map() slower than multiprocessing.Pool.map() for fast function argument

2011-02-21 Thread Tobias Brink

Tobias Brink  added the comment:

Playing around a bit I wrote the attached implementation which works with all 
iterables.

--
Added file: http://bugs.python.org/file20826/new_processpoolexecutor.py

___
Python tracker 

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



[issue11257] asyncore stores unnecessary object references

2011-02-21 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

I'd be fine with this. My only concern are performances.
I've tried this:
http://code.google.com/p/pyftpdlib/issues/attachmentText?id=152&aid=-7106494857544071944&name=bench.py&token=bd350bbd6909c7c2a70da55db15d24ed

Results:

plain dict: 722.26 Mb/sec
WeakValueDictionary: 659.76 Mb/sec

--

___
Python tracker 

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



[issue11273] asyncore creates selec (or poll) on every iteration

2011-02-21 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue11274] asyncore does not support epoll

2011-02-21 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

This is not easy to do. See:
http://bugs.python.org/issue6692
Closing out as duplicate.

--
nosy: +giampaolo.rodola
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



[issue11272] input() has trailing carriage return on windows

2011-02-21 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy: +brian.curtin

___
Python tracker 

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



[issue11272] input() has trailing carriage return on windows

2011-02-21 Thread Ezio Melotti

Ezio Melotti  added the comment:

Confirmed on Python 3.2 (winxp). The problem doesn't seem to exist on 3.1.3.

--
priority: normal -> critical
stage:  -> test needed

___
Python tracker 

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



[issue11272] input() has trailing carriage return on windows

2011-02-21 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti, georg.brandl

___
Python tracker 

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



[issue11274] asyncore does not support epoll

2011-02-21 Thread Марк Коренберг

New submission from Марк Коренберг :

epoll support should be added. Big performance boost on large number of sockets.

--
components: Library (Lib)
messages: 128966
nosy: mmarkk
priority: normal
severity: normal
status: open
title: asyncore does not support epoll
type: performance
versions: Python 2.6, Python 2.7, 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



[issue11273] asyncore creates selec (or poll) on every iteration

2011-02-21 Thread Марк Коренберг

New submission from Марк Коренберг :

select.poll() object or r,w,e arrays for select() should not be built from the 
start in each iteration.

For performance issue, such objects should be created in loop() function and 
modified in add_channel/del_channel. As we do not know, what type of event loop 
(select or poll) will be choosed, we must either build both (bad performance 
anyway) or create new class:

1. new class a-la "poller" should be created, accepting "map" and "use_poll" 
parameters. poll() should be moved to poller.poll()
2. The "dispatcher" class should accept "poller" as parameter (not just "map")
3. "add_channel" and "del_channel" should add/remove items in "poller" 
(select.poll.modify or list.remove for r,w,e)
4. "poller" should have weakref to each controlled "dispatcher" just for 
unregistering dead dispatchers via weakref callback.

I can create a patch, but will not start until someone approve my idea.

--
components: Library (Lib)
messages: 128965
nosy: mmarkk
priority: normal
severity: normal
status: open
title: asyncore creates selec (or poll) on every iteration
type: performance
versions: Python 2.6, Python 2.7, 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



  1   2   >