[issue12148] Clarify "or-ing together" doctest option flags

2011-05-22 Thread R. David Murray

R. David Murray  added the comment:

I think adding the word 'bitwise' in front of "or'ed" and linking it to that 
section would be sufficient.

--
nosy: +r.david.murray
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



[issue12073] regrtest: use faulthandler to dump the tracebacks on SIGUSR1

2011-05-22 Thread STINNER Victor

STINNER Victor  added the comment:

Update the patch and describe the new feature in regrtest doc (--help).

--
Added file: http://bugs.python.org/file22067/regrtest_sigusr1-2.patch

___
Python tracker 

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



[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-22 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +loewis

___
Python tracker 

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



[issue12080] decimal.py: performance in _power_exact

2011-05-22 Thread Mark Dickinson

Mark Dickinson  added the comment:

Here's a patch. Stefan, could you please review?

--
keywords: +patch
Added file: http://bugs.python.org/file22068/issue12080.patch

___
Python tracker 

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



[issue12080] decimal.py: performance in _power_exact

2011-05-22 Thread Mark Dickinson

Changes by Mark Dickinson :


--
stage:  -> commit review

___
Python tracker 

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



[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-05-22 Thread STINNER Victor

STINNER Victor  added the comment:

@charles-francois.natali: Your patch is ok, you can commit it into 3.1, 3.2, 
3.3. But you may wait after 3.2.1.

@Georg Brandl: Should we wait after Python 3.2.1 for this issue?

--
nosy: +georg.brandl

___
Python tracker 

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



[issue12103] Documentation of open() does not claim 'e' support in mode string

2011-05-22 Thread STINNER Victor

STINNER Victor  added the comment:

Issue #12105 adds os.O_CLOEXEC flag, so we will be able to write 
open(os.open(filename, os.O_RDONLY|os.O_CLOEXEC)). Do you want to work on a doc 
patch?

--

___
Python tracker 

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



[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-05-22 Thread STINNER Victor

STINNER Victor  added the comment:

>> open() documentation may explain the os.fdopen(os.open()) "trick"
>> to use low-level options like O_SYNC or O_CLOEXEC.

> Why not, but I leave it to someone more comfortable with 
> documentation than me :-)

Issue #12103 should be fine for this idea.

--

___
Python tracker 

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



[issue5715] listen socket close in SocketServer.ForkingMixIn.process_request()

2011-05-22 Thread STINNER Victor

STINNER Victor  added the comment:

I don't know if it's related, but SimpleXMLRPCServer in Python 2.7 uses 
fcntl(self.fileno(), fcntl.F_SETFD, flags):

class SimpleXMLRPCServer(SocketServer.TCPServer,
 SimpleXMLRPCDispatcher):
...
def __init__(self, ...):
...
# [Bug #1222790] If possible, set close-on-exec flag; if a
# method spawns a subprocess, the subprocess shouldn't have
# the listening socket open.
if fcntl is not None and hasattr(fcntl, 'FD_CLOEXEC'):
flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD)
flags |= fcntl.FD_CLOEXEC
fcntl.fcntl(self.fileno(), fcntl.F_SETFD, flags)

=> see also issue #1222790.

--

___
Python tracker 

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



[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-05-22 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, by the way: it would also be nice to add os.O_CLOEXEC to Python 2.7.

For example, tempfile._mkstemp_inner() uses:
fd = _os.open(file, flags, 0600)
_set_cloexec(fd) # fcntl(fd, F_SETFD, flags | FD_CLOEXEC)
which is not atomic.

--

___
Python tracker 

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



[issue12140] Crash upon start up

2011-05-22 Thread Philip Drew

Philip Drew  added the comment:

The error message is:
ImportError: No module named site.

--

___
Python tracker 

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



[issue12140] Crash upon start up

2011-05-22 Thread Ezio Melotti

Ezio Melotti  added the comment:

The 'site' module should be in Python27\Lib\site.py.
You could try to run "python.exe -v" to see if it says something useful in the 
output, or maybe try to reinstall Python and see if it works.

--

___
Python tracker 

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



[issue12140] Crash upon start up

2011-05-22 Thread Philip Drew

Philip Drew  added the comment:

The site module is in the right place
This is what I got running the -v flag: (I don't know what you're looking for)

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\PWTD>c:\Python27\python.exe -v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
ImportError: No module named site
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# clear sys.flags
# clear sys.float_info
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] zipimport
# cleanup[1] signal
# cleanup[1] exceptions
# cleanup[1] _warnings
# cleanup sys
# cleanup __builtin__
# cleanup ints: 6 unfreed ints
# cleanup floats

C:\Users\PWTD>c:\Python27\python.exe
ImportError: No module named site

--

___
Python tracker 

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



[issue8898] The email package should defer to the codecs module for all aliases

2011-05-22 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Ezio Melotti wrote:
> 
> Ezio Melotti  added the comment:
> 
> I suggest to:
>   1) remove the alias for tactis;
>   2) add the aliases for latin_* and the tests for the aliases;
>   3) fix the email.charset to use the new aliases instead of its own dict.
> 
> 2) and 3) should go on 3.3 only, 1) could be considered a bug and fixed on 
> 2.7/3.2 too, but since the codec is already missing, removing the alias won't 
> change anything (i.e. it will raise a LookupError with or without alias).

+1

--
title: The email package should defer to the codecs module for all aliases -> 
The email package should defer to the codecs module for   all aliases

___
Python tracker 

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



[issue12100] Incremental encoders of CJK codecs reset the codec at each call to encode()

2011-05-22 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

I think it's better to use a StringIO instance for the tests.

Regarding resetting the incremental codec every time .encode() is called: 
Hye-Shik will have to comment. Perhaps there's an internal reason why they do 
this.

--

___
Python tracker 

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



[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-05-22 Thread Georg Brandl

Georg Brandl  added the comment:

One moment -- adding a new value to the os module looks like a new feature to 
me.  Is there any convincing reason why this needs to go to 3.2?  (And it most 
definitely shouldn't go to 3.1.)

--

___
Python tracker 

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



[issue12080] decimal.py: performance in _power_exact

2011-05-22 Thread Mark Dickinson

Mark Dickinson  added the comment:

Here's a slightly improved version that adds guards against computing 10**ye 
for large ye in the case y < 0, ye > 0.

--
Added file: http://bugs.python.org/file22069/issue12080_v2.patch

___
Python tracker 

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



[issue9942] Allow memory sections to be OS MERGEABLE

2011-05-22 Thread s7v7nislands

Changes by s7v7nislands :


--
nosy: +s7v7nislands

___
Python tracker 

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



[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-05-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

No reason. I think this is definitely 3.3 material.

--
nosy: +pitrou
versions:  -Python 3.1, Python 3.2, Python 3.4

___
Python tracker 

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



[issue5715] listen socket close in SocketServer.ForkingMixIn.process_request()

2011-05-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Patch looks fine to me. Is it easily testable?

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



[issue8898] The email package should defer to the codecs module for all aliases

2011-05-22 Thread Michele Orrù

Michele Orrù  added the comment:

In the sense that the alias for 'tactis' should be removed also in 2.7 and 3.2?

--
title: The email package should defer to the codecs module for  all aliases -> 
The email package should defer to the codecs module for all aliases

___
Python tracker 

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



[issue8898] The email package should defer to the codecs module for all aliases

2011-05-22 Thread Michele Orrù

Changes by Michele Orrù :


Removed file: http://bugs.python.org/file22064/unnamed

___
Python tracker 

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



[issue12138] buggy use of transient_internet() in test_urllibnet

2011-05-22 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 52b78e07d009 by Antoine Pitrou in branch '3.2':
Issue #12138: fix use of transient_internet() in test_urllibnet
http://hg.python.org/cpython/rev/52b78e07d009

New changeset 18432e8885e0 by Antoine Pitrou in branch 'default':
Issue #12138: fix use of transient_internet() in test_urllibnet
http://hg.python.org/cpython/rev/18432e8885e0

--
nosy: +python-dev

___
Python tracker 

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



[issue12138] buggy use of transient_internet() in test_urllibnet

2011-05-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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



[issue1441530] socket read() can cause MemoryError in Windows

2011-05-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Both patches look ok to me.

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



[issue12145] distutils2 should support README.rst

2011-05-22 Thread Éric Araujo

Éric Araujo  added the comment:

Hi, thanks for the report.  Distutils is feature frozen, and distutils does not 
included README{.txt,} by default anymore*.  I don’t know why Tarek changed 
that.  If he changes his mind, I’d be +1 to your proposal, otherwise it will be 
rejected.

* The code right now still does, but it’s because of a problem with the 
repositories, it will get changed again.

--

___
Python tracker 

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



[issue12143] packaging extension gcc linking fails on Ubuntu Shared

2011-05-22 Thread Éric Araujo

Changes by Éric Araujo :


--
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> test_distutils failure with --enable-shared

___
Python tracker 

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



[issue12135] The spawn function should return stderr.

2011-05-22 Thread Éric Araujo

Éric Araujo  added the comment:

Let’s make one bug for both requests (print whole command line + print stderr), 
fix it in packaging and discuss if it can be backported to distutils.

--

___
Python tracker 

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



[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-22 Thread Éric Araujo

Éric Araujo  added the comment:

The docs should value readability over conciseness IMHO; the examples here with 
seven operations in a row are a bit scary.

--

___
Python tracker 

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



[issue12102] mmap requires file to be synced

2011-05-22 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

> that doesn't make me any good

Well - 'can only be better than myself, so i'll take that as yes :)

--

___
Python tracker 

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



[issue12102] mmap requires file to be synced

2011-05-22 Thread Steffen Daode Nurpmeso

Changes by Steffen Daode Nurpmeso :


Removed file: http://bugs.python.org/file22020/12102.1.diff

___
Python tracker 

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



[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-22 Thread Eli Bendersky

Eli Bendersky  added the comment:

Éric, I'm not sure that the note is necessary at all, but once it's there, it 
should value *correctness* over conciseness and readability.

--

___
Python tracker 

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



[issue12143] packaging extension gcc linking fails on Ubuntu Shared

2011-05-22 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

Thanks for the test David

--

___
Python tracker 

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



[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-05-22 Thread Ezio Melotti

New submission from Ezio Melotti :

The attached patch causes a segfault while running test_urllib:

$ ./python -m test test_urllib
[1/1] test_urllib






Fatal Python error: Segmentation fault

Current thread 0xb77de8d0:
  File "/home/wolf/dev/py/py3k/Lib/http/client.py", line 451 in close
  File "/home/wolf/dev/py/py3k/Lib/urllib/request.py", line 1119 in do_open
  File "/home/wolf/dev/py/py3k/Lib/urllib/request.py", line 1166 in http_open
  File "/home/wolf/dev/py/py3k/Lib/urllib/request.py", line 347 in _call_chain
  File "/home/wolf/dev/py/py3k/Lib/urllib/request.py", line 387 in _open
  File "/home/wolf/dev/py/py3k/Lib/urllib/request.py", line 369 in open
  File "/home/wolf/dev/py/py3k/Lib/urllib/request.py", line 138 in urlopen
  File "/home/wolf/dev/py/py3k/Lib/test/test_urllib.py", line 184 in 
test_url_fragment
[...]
Segmentation fault

The failure seems to be fairly random, for example if I uncomment the tests at 
the bottom of test_urllib, the segfault happens only in non-verbose mode.  Also 
adding a few print()s to debug the issue or making other unrelated changes 
changes the behavior (e.g. it fails only in verbose mode but not in normal 
mode).

gdb shows that the failure is in Objects/object.c, at line 981 in the 
_PyObject_GenericGetAttrWithDict function.  The problem seems to be that 
'descr' is invalid and descr->ob_type results in an error:

$ gdb -args ./python -m test test_urllib
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
[...]
Reading symbols from /home/wolf/dev/py/py3k/python...done.
(gdb) run
Starting program: /home/wolf/dev/py/py3k/python -m test test_urllib
[Thread debugging using libthread_db enabled]
[1/1] test_urllib
[New Thread 0xb77e9b70 (LWP 5227)]


Program received signal SIGSEGV, Segmentation fault.
0x0805c7d8 in _PyObject_GenericGetAttrWithDict (obj=, name='close', dict=0x0) at Objects/object.c:982
982 f = descr->ob_type->tp_descr_get;
(gdb) p *(PyUnicodeObject*)descr
$1 = {ob_base = {_ob_next = 0xdbdbdbdb, _ob_prev = 0xdbdbdbdb, ob_refcnt = 
-606348324, ob_type = 0xdbdbdbdb}, length = -606348325, str = 0xdbdbdbdb, 
  hash = -606348325, state = -606348325, defenc = }
(gdb) 

FakeHTTPConnection is a subclass of http.client.HTTPConnection, but I also got 
segfaults in FakeSocket, which is an io.BytesIO subclass.
FWIW I found this while trying to fix ResourceWarnings.  In #12133 I proposed a 
patch that fixes a ResourceWarnings (included in segfault.diff), and while 
trying the same approach in urlretrieve (adding a finally: http_conn.close()) 
and running test_urllib I got the segfault.
Tested on 3.3 only.

--
components: Interpreter Core
files: segfault.diff
keywords: patch
messages: 136548
nosy: ezio.melotti, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Segfault in _PyObject_GenericGetAttrWithDict
type: crash
versions: Python 3.3
Added file: http://bugs.python.org/file22070/segfault.diff

___
Python tracker 

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



[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-05-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This occurs when running the GC and then calling the finalization of an IO 
object, which temporarily resurrects the object to call its close() method:

#0  0x7fc20bc1609b in raise () from /lib64/libpthread.so.0
#1  0x005328e7 in faulthandler_fatal_error (signum=11) at 
./Modules/faulthandler.c:299
#2  
#3  0x004190c7 in _PyObject_GenericGetAttrWithDict 
(obj=, 
name='close', dict=0x0) at Objects/object.c:982
#4  0x00419581 in PyObject_GenericGetAttr (obj=, name=
'close') at Objects/object.c:1046
#5  0x00418a38 in PyObject_GetAttr (v=, name='close')
at Objects/object.c:831
#6  0x004818b4 in PyEval_EvalFrameEx (f=
Frame 0x7fc2065ee9e8, for file 
/home/antoine/cpython/default/Lib/http/client.py, line 451, in close 
(self=, 
status='UNKNOWN', will_close='UNKNOWN', chunk_left='UNKNOWN', length='UNKNOWN', 
headers=None, reason='UNKNOWN', version='UNKNOWN', debuglevel=0, msg=None, 
chunked='UNKNOWN', _method='GET') at remote 0x7fc20688a220>), throwflag=0) at 
Python/ceval.c:2268
#7  0x00487a2f in PyEval_EvalCodeEx (_co=, globals=
{'BadStatusLine': , '__cached__': 
'/home/antoine/cpython/default/Lib/http/__pycache__/client.cpython-32.pyc', 
'_UNKNOWN': 'UNKNOWN', 'SWITCHING_PROTOCOLS': 101, 'urlsplit': , 'InvalidURL': , 
'collections': , 'SERVICE_UNAVAILABLE': 503, 
'CREATED': 201, '__file__': '/home/antoine/cpython/default/Lib/http/client.py', 
'PROCESSING': 102, 'PRECONDITION_FAILED': 412, 'ssl': , 'NOT_ACCEPTABLE': 406, 'HTTPConnection': , 'NotConnected': , 'MULTI_STATUS': 207, 
'OK': 200, 'UnknownProtocol': , '_CS_REQ_STARTED': 
'Request-started', 'email': , 
'NOT_IMPLEMENTED': 501, 'CannotSendRequest': , 
'BAD_GATEWAY': 502, 'CannotSendHeader': , 
'LENGTH_REQUIRED': 411, 'parse_headers': , 'HTTP_...(truncated), locals=0x0, 
args=0x7fc20688a868, argcount=1, kws=0x0, kwcount=0, defs=0x0, defcount=0, 
kwdefs=0x0, closure=0x0)
at Python/ceval.c:3301
#8  0x00576a36 in function_call (func=, arg=
(, 
status='UNKNOWN', will_close='UNKNOWN', chunk_left='UNKNOWN', length='UNKNOWN', 
headers=None, reason='UNKNOWN', version='UNKNOWN', debuglevel=0, msg=None, 
chunked='UNKNOWN', _method='GET') at remote 0x7fc20688a220>,), kw=0x0) at 
Objects/funcobject.c:629
#9  0x0053f975 in PyObject_Call (func=, arg=
(, 
status='UNKNOWN', will_close='UNKNOWN', chunk_left='UNKNOWN', length='UNKNOWN', 
headers=None, reason='UNKNOWN', version='UNKNOWN', debuglevel=0, msg=None, 
chunked='UNKNOWN', _method='GET') at remote 0x7fc20688a220>,), kw=0x0) at 
Objects/abstract.c:2149
#10 0x0055c1a1 in method_call (func=, arg=
(, 
status='UNKNOWN', will_close='UNKNOWN', chunk_left='UNKNOWN', length='UNKNOWN', 
headers=None, reason='UNKNOWN', version='UNKNOWN', debuglevel=0, msg=None, 
chunked='UNKNOWN', _method='GET') at remote 0x7fc20688a220>,), kw=0x0) at 
Objects/classobject.c:319
#11 0x0053f975 in PyObject_Call (func=, arg=(), kw=0x0)
at Objects/abstract.c:2149
#12 0x0054054c in PyObject_CallMethodObjArgs (callable=, name='close')
at Objects/abstract.c:2350
#13 0x00514f2f in _PyIOBase_finalize (self=
, 
status='UNKNOWN', will_close='UNKNOWN', chunk_left='UNKNOWN', length='UNKNOWN', 
headers=None, reason='UNKNOWN', version='UNKNOWN', debuglevel=0, msg=None, 
chunked='UNKNOWN', _method='GET') at remote 0x7fc20688a220>) at 
./Modules/_io/iobase.c:222
#14 0x00515143 in iobase_dealloc (self=0x7fc20688a220) at 
./Modules/_io/iobase.c:285
#15 0x0042fc54 in subtype_dealloc (self=
, 
status='UNKNOWN', will_close='UNKNOWN', chunk_left='UNKNOWN', length='UNKNOWN', 
headers=None, reason='UNKNOWN', version='UNKNOWN', debuglevel=0, msg=None, 
chunked='UNKNOWN', _method='GET') at remote 0x7fc20688a220>) at 
Objects/typeobject.c:968
#16 0x0041acb1 in _Py_Dealloc (op=
, 
status='UNKNOWN', will_close='UNKNOWN', chunk_left='UNKNOWN', length='UNKNOWN', 
headers=None, reason='UNKNOWN', version='UNKNOWN', debuglevel=0, msg=None, 
chunked='UNKNOWN', _method='GET') at remote 0x7fc20688a220>) at 
Objects/object.c:1693
#17 0x00572b04 in frame_dealloc (f=
Frame 0x1b6b890, for file /home/antoine/cpython/default/Lib/http/client.py, 
line 1046, in getresponse ())
#18 0x0041acb1 in _Py_Dealloc (op=
Frame 0x1b6b890, for file /home/antoine/cpython/default/Lib/http/client.py, 
line 1046, in getresponse ())
at Objects/object.c:1693
#19 0x004cb7a6 in tb_dealloc (tb=0x7fc2068693a8) at 
Python/traceback.c:50
#20 0x0041acb1 in _Py_Dealloc (op=) 
at Objects/object.c:1693
#21 0x004cb72d in tb_dealloc (tb=0x7fc2068691c8) at 
Python/traceback.c:49
#22 0x0041acb1 in _Py_Dealloc (op=) 
at Objects/object.c:1693
#23 0x005650af in BaseException_clear (self=0x7fc2069ee960) at 
Objects/exceptions.c:59
#24 0x0056524f in BaseException_dealloc (self=0x7fc2069ee960) at 
Objects/exceptions.c:69
#25 0x00

[issue8898] The email package should defer to the codecs module for all aliases

2011-05-22 Thread R. David Murray

R. David Murray  added the comment:

euc_jp and euc_kr seem to be backward (that is, codecs translates them to the _ 
version, instead of translating the _ version to the - version).  I worry that 
there might be other deviations from the standard email names.  I would suggest 
we pull the list of preferred MIME names from the IANA charset registry and 
make a test out of them in the email package.  If changing the name returned by 
codecs is determined to not be acceptable, then those entries will need to 
remain in the charset module ALIASES table and the codecs-check logic adjusted 
accordingly.

Unfortunately the IANA registry does not list MIME names for all of the 
charsets in common use, and the canonical names are not always the ones 
commonly used in email.  Hopefully the codecs registry is using the most common 
name for those, and hopefully if there are differences it won't break any user 
code, since any reasonable email code should be coping with the aliases in any 
case.

Ezio, if you want to steal this one from me, that's fine by me.

--

___
Python tracker 

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



[issue8898] The email package should defer to the codecs module for all aliases

2011-05-22 Thread R. David Murray

R. David Murray  added the comment:

Hmm.  Must have misread.  Looks like all the common charsets do have MIME 
entries in the IANA table.

--

___
Python tracker 

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



[issue1674555] sys.path in tests contains system directories

2011-05-22 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

The advantage of an environment variable is that it is by default inherited by 
subprocesses.

(These patches no longer apply cleanly. I will create updated patches.)

--

___
Python tracker 

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



[issue8898] The email package should defer to the codecs module for all aliases

2011-05-22 Thread R. David Murray

R. David Murray  added the comment:

On second thought the resolution order ought to be swapped anyway: if the user 
has added an ALIAS, they are going to want that used, not the one from codecs.

--

___
Python tracker 

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



[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-05-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is a quick script to reproduce. It seems that the type of the object has 
to be caught in a reference cycle for this to happen: apparently the 
descriptors start being deallocated but the method cache isn't updated yet (?).

--
nosy: +amaury.forgeotdarc, benjamin.peterson
versions: +Python 3.1
Added file: http://bugs.python.org/file22071/dying.py

___
Python tracker 

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



[issue12146] Possible bug in 're' documentation example

2011-05-22 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I wrote the recipe and wanted to follow any actions related to it.

--

___
Python tracker 

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



[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-05-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ezio, in the meantime, you can simply put the FakeSocket declaration at the top 
level.

--

___
Python tracker 

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



[issue10126] test_distutils failure with --enable-shared

2011-05-22 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

I am trying to fix this by backporting the distutils fix, but --enabled-share 
does not work for me ?!

$ make distclean && ./configure --enable-shared --with-pydebug && make
$ ./python
libpython3.3dm.so.1.0: cannot open shared object file: No such file or directory

The so file is present in the srcdir though.

Investigating...

--

___
Python tracker 

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



[issue10126] test_distutils failure with --enable-shared

2011-05-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Tarek, you must use LD_LIBRARY_PATH.

--

___
Python tracker 

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



[issue10801] zipfile.ZipFile().extractall() header mismatch for non-ASCII characters

2011-05-22 Thread Arfrever Frehtes Taifersar Arahesis

Arfrever Frehtes Taifersar Arahesis  added the comment:

These changes cause test failure on 3.1 branch when verbose mode is disabled:

# python3.1 -m test.regrtest test_zipfile
test_zipfile
test test_zipfile produced unexpected output:
**
*** line 2 of actual output doesn't appear in expected output after line 1:
+ /usr/lib64/python3.1/test/zip_cp437_header.zip
**
1 test failed:
test_zipfile

--
nosy: +Arfrever

___
Python tracker 

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



[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-05-22 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset f1c544245eab by Charles-François Natali in branch 'default':
Issue #12105: Add O_CLOEXEC to the os module.
http://hg.python.org/cpython/rev/f1c544245eab

--
nosy: +python-dev

___
Python tracker 

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



[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-05-22 Thread Charles-François Natali

Charles-François Natali  added the comment:

I've committed the patch to 3.3.
Since the documentation aspect is traced in Issue #12103, I'm closing this 
issue.
Марк, thanks for reporting this!

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



[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-05-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

And apparently some buildbot doesn't like it:
http://www.python.org/dev/buildbot/all/builders/x86%20Gentoo%20Non-Debug%203.x/builds/57/

==
FAIL: test_oscloexec (test.test_posix.PosixTester)
--
Traceback (most recent call last):
  File 
"/var/lib/buildslave/3.x.murray-gentoo-wide/build/Lib/test/test_posix.py", line 
315, in test_oscloexec
self.assertTrue(fcntl.fcntl(fd, fcntl.F_GETFD) & fcntl.FD_CLOEXEC)
AssertionError: 0 is not true

--
assignee:  -> charles-francois.natali
status: closed -> open

___
Python tracker 

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



[issue10126] test_distutils failure with --enable-shared

2011-05-22 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 3d822e1ca930 by Tarek Ziade in branch 'default':
Issue 10126 - backported distutils fix for the enable-share mode into packaging
http://hg.python.org/cpython/rev/3d822e1ca930

--
nosy: +python-dev

___
Python tracker 

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



[issue10126] test_distutils failure with --enable-shared

2011-05-22 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

Fixed in packaging. It seems that all fronts are OK, so closing this

--
status: open -> closed

___
Python tracker 

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



[issue12149] Segfault in _PyObject_GenericGetAttrWithDict

2011-05-22 Thread Davide Rizzo

Changes by Davide Rizzo :


--
nosy: +davide.rizzo

___
Python tracker 

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



[issue12132] test_packaging failures when run with -j

2011-05-22 Thread Tarek Ziadé

Changes by Tarek Ziadé :


--
resolution: duplicate -> 
status: closed -> open

___
Python tracker 

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



[issue12132] test_packaging failures when run with -j

2011-05-22 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 1ba12ac770e0 by Tarek Ziade in branch 'default':
Issue 12132 - skip the test_buil_ext test if the xx module is not found
http://hg.python.org/cpython/rev/1ba12ac770e0

--
nosy: +python-dev

___
Python tracker 

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



[issue12132] test_packaging failures when run with -j

2011-05-22 Thread Tarek Ziadé

Changes by Tarek Ziadé :


--
status: open -> closed

___
Python tracker 

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



[issue10801] zipfile.ZipFile().extractall() header mismatch for non-ASCII characters

2011-05-22 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 9ef8fc5454cb by Victor Stinner in branch '3.1':
Issue #10801: Remove a debug print() from test_zipfile
http://hg.python.org/cpython/rev/9ef8fc5454cb

--

___
Python tracker 

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



[issue10801] zipfile.ZipFile().extractall() header mismatch for non-ASCII characters

2011-05-22 Thread STINNER Victor

STINNER Victor  added the comment:

> These changes cause test failure on 3.1 branch when verbose mode is disabled

What a shame! I commited a debug "print()":
1.39 +print(fname)

It should be fixed by my last commit.

--

___
Python tracker 

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



[issue12141] sysconfig.get_config_vars('srcdir') fails in specific cases

2011-05-22 Thread Tarek Ziadé

Tarek Ziadé  added the comment:

@ned: right. done, and fixes issue12132

--
assignee: pitrou -> tarek
components: +Library (Lib)
title: --multiprocessing fails with packaging.tests.test_command_build_ext -> 
sysconfig.get_config_vars('srcdir') fails in specific cases
versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue5715] listen socket close in SocketServer.ForkingMixIn.process_request()

2011-05-22 Thread STINNER Victor

STINNER Victor  added the comment:

> Patch looks fine to me. Is it easily testable?

test_subprocess has some tests checking "cloexec": test_pipe_cloexec() and 
test_pipe_cloexec_real_tools(). You may reuse some code from these tests?

--

___
Python tracker 

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



[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-05-22 Thread STINNER Victor

STINNER Victor  added the comment:

> One moment -- adding a new value to the os module looks like a new
> feature to me.  Is there any convincing reason why this needs to go to
> 3.2?  (And it most definitely shouldn't go to 3.1.)

Python doesn't suppose atomic open+CLOEXEC anymore, I consider this as a
regression from Python 2 (which support open("re") with the GNU libc).
Because the patch is simple, I think that it can go in 3.1 and 3.2. Am I
wrong? But... it tooks some years until someone noticed this regression.

Can we add new features to old releases?

--

___
Python tracker 

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



[issue12150] test_sysconfig fails on solaris

2011-05-22 Thread Tarek Ziadé

New submission from Tarek Ziadé :

==
ERROR: test_get_path (test.test_sysconfig.TestSysConfig)
--
Traceback (most recent call last):
  File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_sysconfig.py", 
line 110, in test_get_path
res = get_path(name, scheme)
  File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/sysconfig.py", line 436, 
in get_path
return get_paths(scheme, vars, expand)[name]
KeyError: 'stdlib'

==
ERROR: test_user_similar (test.test_sysconfig.TestSysConfig)
--
Traceback (most recent call last):
  File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_sysconfig.py", 
line 281, in test_user_similar
global_path = get_path(name, 'posix_prefix')
  File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/sysconfig.py", line 436, 
in get_path
return get_paths(scheme, vars, expand)[name]
KeyError: 'stdlib'

--
assignee: tarek
components: Library (Lib)
messages: 136571
nosy: tarek
priority: normal
severity: normal
status: open
title: test_sysconfig fails on solaris

___
Python tracker 

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



[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-05-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Python doesn't suppose atomic open+CLOEXEC anymore, I consider this as a
> regression from Python 2 (which support open("re") with the GNU libc).

It has never been documented (nor supported) so, no, I wouldn't consider
it a regression.

> But... it tooks some years until someone noticed this regression.

Which means it's certainly unimportant.

> Can we add new features to old releases?

Well, you already know the answer, don't you? :)

--

___
Python tracker 

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



[issue12105] open() does not able to set flags, such as O_CLOEXEC

2011-05-22 Thread Charles-François Natali

Charles-François Natali  added the comment:

> And apparently some buildbot doesn't like it

Linux-2.6.22-vs2.2.0.7-gentoo-i686-Intel-R-_Xeon-TM-_CPU_2.80GHz-with-gentoo-2.0.1
 little-endian

O_CLOEXEC support was added to Linux 2.6.23: this means that the libc defines 
it while the kernel doesn't support it (it's probably defined as 0).
I could either add some voodoo configure checks to ensure that O_CLOEXEC is 
indeed supported, or just skip the test on Linux kernels older than 2.6.23. I 
prefer the later option, it's much simpler and less error-prone. Sure, it will 
make O_CLOEXEC available while the kernel doesn't support it on some 
configurations, but since it's a libc issue...

--

___
Python tracker 

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



[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-22 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Given that the note is already gone* as obsolete in 3.x, I think a minimal 
maintenance fix for correctness should be fine for 2.7.

* It is replaced, in essence, by "Ranges containing absolute values larger than 
sys.maxsize are permitted but some features (such as len()) will raise 
OverflowError."

--

___
Python tracker 

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



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

2011-05-22 Thread Ismail Donmez

Ismail Donmez  added the comment:

Can someone please review this patch? test_list fails with clang without this 
patch.

--

___
Python tracker 

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



[issue12151] test_logging fails sometimes

2011-05-22 Thread STINNER Victor

New submission from STINNER Victor :

test_logging does sometimes fail.

A recent example on Windows XP:
http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/4645/steps/test/logs/stdio

test test_logging failed -- Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_logging.py",
 line 3599, in test_rollover
self.assertTrue(found, msg=msg)
AssertionError: False is not true : No rotated files found, went back 300 
seconds

--
messages: 136576
nosy: haypo, vinay.sajip
priority: normal
severity: normal
status: open
title: test_logging fails sometimes
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



[issue12151] test_logging fails sometimes

2011-05-22 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 54ffc01b6cc2 by Victor Stinner in branch 'default':
Issue #12151: test_logging writes debug messages to stderr, not stdout
http://hg.python.org/cpython/rev/54ffc01b6cc2

--
nosy: +python-dev

___
Python tracker 

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



[issue12113] test_packaging fails when run twice

2011-05-22 Thread STINNER Victor

STINNER Victor  added the comment:

I cannot reproduce the problem: "python -m test test_packaging test_packaging". 
I suppose that it was fixed by tarek.

--
nosy: +haypo
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



[issue12121] test_packaging failure when ssl is not available

2011-05-22 Thread STINNER Victor

STINNER Victor  added the comment:

It looks like Tarek fixed this bug because I'm unable to reproduce it.

--
nosy: +haypo
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



[issue12144] cookielib.CookieJar.make_cookies fails for cookies with 'expires' set

2011-05-22 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



[issue12144] cookielib.CookieJar.make_cookies fails for cookies with 'expires' set

2011-05-22 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Could you possibly test the bug in Python 2.7, 3.1, 3.2 and current 3.3 branch?.

Python 2.6 is open for security fixes only, I think.

--

___
Python tracker 

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



[issue12147] smtplib.send_message does not implement corectly rfc 2822

2011-05-22 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



[issue12150] test_sysconfig fails on solaris

2011-05-22 Thread STINNER Victor

STINNER Victor  added the comment:

Duplicate of #12125.

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



[issue12125] test_sysconfig fails on OpenIndiana because of test_packaging

2011-05-22 Thread STINNER Victor

STINNER Victor  added the comment:

Issue #12150 has been marked as a duplicate of this issue:

==
ERROR: test_get_path (test.test_sysconfig.TestSysConfig)
--
Traceback (most recent call last):
  File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_sysconfig.py", 
line 110, in test_get_path
res = get_path(name, scheme)
  File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/sysconfig.py", line 436, 
in get_path
return get_paths(scheme, vars, expand)[name]
KeyError: 'stdlib'

==
ERROR: test_user_similar (test.test_sysconfig.TestSysConfig)
--
Traceback (most recent call last):
  File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/test/test_sysconfig.py", 
line 281, in test_user_similar
global_path = get_path(name, 'posix_prefix')
  File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/sysconfig.py", line 436, 
in get_path
return get_paths(scheme, vars, expand)[name]
KeyError: 'stdlib'

--

___
Python tracker 

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



[issue12125] test_sysconfig fails on OpenIndiana because of test_packaging

2011-05-22 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



[issue12147] smtplib.send_message does not implement corectly rfc 2822

2011-05-22 Thread R. David Murray

R. David Murray  added the comment:

Thanks for the patch.  Adding support for this is a good idea.  There could be 
a question about whether this constitutes a bug fix or a feature; I'll canvass 
some other devs and see if we have a consensus on it.

It may take me a bit to find time to do a detailed review, but in broad outline 
the patch looks sensible and has all the requisite parts (thanks!).

--
nosy: +r.david.murray
stage:  -> patch review

___
Python tracker 

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



[issue12147] smtplib.send_message does not implement corectly rfc 2822

2011-05-22 Thread R. David Murray

Changes by R. David Murray :


--
assignee:  -> r.david.murray

___
Python tracker 

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



[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-22 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 76e5fe8e21fd by Eli Bendersky in branch '2.7':
Issue 12003: fixing error in xrange alternative sample
http://hg.python.org/cpython/rev/76e5fe8e21fd

--
nosy: +python-dev

___
Python tracker 

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



[issue12003] documentation: alternate version of xrange seems to fail.

2011-05-22 Thread Eli Bendersky

Eli Bendersky  added the comment:

Agreed. 
Fix committed & issue closed.

--
status: open -> closed

___
Python tracker 

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



[issue12126] incorrect select documentation

2011-05-22 Thread Eli Bendersky

Eli Bendersky  added the comment:

Closing this issue, since it specifically refers to the select error which was 
fixed. Tracking the removal of the sockets howto document can be done elsewhere.

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



[issue6717] Some problem with recursion handling

2011-05-22 Thread Peter Wentworth

Peter Wentworth  added the comment:

I can confirm the crash persists as of Python 3.1.3 on Windows, and would like 
to add my vote to prioritizing it.  

Without having delved into the code, it seems strange that the rapid stream of 
events is causing stack overflow / recursion limit problems.

It suggests that tkinter is allowing new event arrivals to interrupt older 
event handling, so that the older ones remain incomplete as the newer ones pile 
up on the stack. If this is the case, it is going to lead to long-term 
instability, and needs attention.

The usual technique is to use a queue to decouple "occurs now" from "handle 
immediately". (The OS puts the mouse and keyboard events onto window's event 
queue).  So the mainloop that services the event queue should not start 
handling a new queued event until the previous handling has completed.

--
nosy: +Peter.Wentworth

___
Python tracker 

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



[issue11015] Bring test.support docs up to date

2011-05-22 Thread Eli Bendersky

Eli Bendersky  added the comment:

Ezio, you're right, there are still a lot of undocumented symbols (functions, 
classes, globals). I compiled a list of those I could not find in the .rst 
docs, excluding ones that are only used in regrtest.py itself:

--

get_attribute
record_original_stdout/get_original_stdout
unload
unlink
rmtree
make_legacy_pyc
IPV6_ENABLED
TESTFN_ENCODED
TESTFN_UNENCODABLE
sortdict
check_syntax_error
open_urlresource
CleanImport
DirsOnSysPath
transient_internet
captured_output
captured_stderr
gc_collect
python_is_optimized
set_memlimit
bigmemtest
precisionbigmemtest
bigaddrspacetest
requires_resource
cpython_only
impl_detail
check_impl_detail
no_tracing
refcount_test
modules_setup / modules_cleanup
threading_setup / threading_cleanup
reap_threads
reap_children
swap_attr
swap_item
strip_python_stderr
TestHandler
Matcher
patch

--

--

___
Python tracker 

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



[issue9942] Allow memory sections to be OS MERGEABLE

2011-05-22 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

In order to arrive at some resolution of this issue, I'm answering the original 
question ("Should Python enable a way for folks to inform the OS of 
MADV_MERGEABLE memory?"). The discussion has shown that the answer is "no"; 
there are no pages of memory where this would provide any advantage.

Closing as "won't fix". Anybody reopening it should

a) provide a patch with the actual change to be made, and
b) accompany it with a benchmark demonstrating some gain.

--
nosy: +loewis
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



[issue7827] recv_into() argument 1 must be pinned buffer, not bytearray

2011-05-22 Thread Mark Nottingham

Changes by Mark Nottingham :


--
nosy: +mnot

___
Python tracker 

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



[issue6717] Some problem with recursion handling

2011-05-22 Thread Peter Wentworth

Peter Wentworth  added the comment:

Attached is a crashing program that shows that the event handler is called 
again before activation of the prior instance has completed.

I also have a second turtle that queues the nested events.  It doesn't crash 
the system, at least.

Perhaps someone can also explain why the handler doesn't work if I leave out 
the global declaration.

--
Added file: http://bugs.python.org/file22072/drag_bug_is_nesting_events.py

___
Python tracker 

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



[issue12147] smtplib.send_message does not implement corectly rfc 2822

2011-05-22 Thread Nicolas Estibals

New submission from Nicolas Estibals :

smtplib.send_message permits to send messages that are in python Message 
representation by selecting smtp's "from" and "to" in the message headers. Most 
of the time the implementation is correct but if the message is bounced 
(Resent-* headers have to be considered) or if there is a Sender field (this 
one supersede the From field if present), the current implementation does not 
select the right addresses (not as specified in rfc 2822).

I have wrote a patch to make the method compliant. This is my first patch to 
python but I followed the "Lifecycle of a Patch" webpage and hope my code will 
be usable. Please ask me if some revision of the code is needed.

--
components: Library (Lib)
files: send_message_rfc2822.patch
keywords: patch
messages: 136508
nosy: Nicolas.Estibals
priority: normal
severity: normal
status: open
title: smtplib.send_message does not implement corectly rfc 2822
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file22061/send_message_rfc2822.patch

___
Python tracker 

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



[issue12148] Clarify "or-ing together" doctest option flags

2011-05-22 Thread ekorn

New submission from ekorn :

Combining multiple option flags to doctest.testmod(optionflags=...) requires 
the bitwise or operator |, not plain "or". I therefore suggest rewording 
"or-ing together individual option flags." to "or-ing together individual 
option flags, using the 'bitwise or' operator |.", perhaps with a link to 
http://docs.python.org/reference/expressions.html#binary-bitwise-operations.

Example:

"""
Doctest option flags must be or-ed together with '|', not 'or'.

>>> print "A  B  C"
A B...
"""
import doctest

print "Combining option flags using bitwise '|'..."
doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS)
print "Combining option flags using logical 'or'..."
doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE or doctest.ELLIPSIS)

--
assignee: docs@python
components: Documentation
messages: 136509
nosy: docs@python, ekorn
priority: normal
severity: normal
status: open
title: Clarify "or-ing together" doctest option flags
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



[issue1441530] socket read() can cause MemoryError in Windows

2011-05-22 Thread Charles-François Natali

Charles-François Natali  added the comment:

Digging a little deeper, here's the conclusion:
- with py3k, fragmentation is less likely: the buffered reader returned by 
makefile() ensures that we can allocate only one result buffer for the total 
number of bytes read() (thanks to socket's readinto()). It's also faster. 
Finally, since buffered read() guarantees to return exactly the number of bytes 
asked, there's no need to call it repeatedly with min(size-read, 4096): it's 
slower, and actually makes fragmentation more likely.
So I've attached a patch removing the looping from py3k IMAP4 read() method, 
which leads to simpler, faster and fragmentation-less code.
- for 2.7, it's also better to wrap the SSL socket with makefile(): the leads 
to simpler code (no need to loop), and also I noticed that socket's 
_fileobject's (returned by makefile()) read() and readline() methods already 
use a StringIO to avoid fragmentation.
So I've attached a second patch wrapping 2.7 IMAP4_SSL socket with makefile.

While I can't reproduce this issue on my system, I've analyzed 
malloc/realloc/free calls using ltrace, and I'm pretty confident this should 
solve fragmentation issues for both 2.7 and py3k.

By the way, nice work with the I/O stack in py3k, the new layer allows much 
more efficient code (reduced allocations and copies)!

--
Added file: http://bugs.python.org/file22062/imaplib_recv_py3k.diff

___
Python tracker 

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



[issue1441530] socket read() can cause MemoryError in Windows

2011-05-22 Thread Charles-François Natali

Changes by Charles-François Natali :


Added file: http://bugs.python.org/file22063/imaplib_recv_27.diff

___
Python tracker 

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



[issue1441530] socket read() can cause MemoryError in Windows

2011-05-22 Thread Charles-François Natali

Changes by Charles-François Natali :


Removed file: http://bugs.python.org/file22044/imaplib_read.diff

___
Python tracker 

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



[issue1441530] socket read() can cause MemoryError in Windows

2011-05-22 Thread Charles-François Natali

Changes by Charles-François Natali :


Removed file: http://bugs.python.org/file22051/imaplib_ssl_makefile.diff

___
Python tracker 

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



[issue8898] The email package should defer to the codecs module for all aliases

2011-05-22 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Michele Orrù wrote:
> 
> Michele Orrù  added the comment:
> 
> Well, actually encodings.aliases links to the encoding _module name_, as
> described in the doc:
> """ Encoding Aliases Support
> This module is used by the encodings package search function to
> map encodings names to module names.
> """
> So I've adjusted your snippet according to this, as you can see in the
> attachment.
> 
> I've also slightly changed the imports as pep8 says:
> """
> Yes: import os
> import sys
> 
> No: import sys, os
> """
> 
> Anyway, running the test failed for two encodings, there are two bugs there,
> indeed.
> - mcbs has something broken in its imports;

mbcs is only available on Windows.

> - tactis module is not present.

I'm not sure what happened here: either the alias entry is wrong
or the codec module was not committed.

In either case, no one has complained about this encoding not working,
so we can probably just remove it from the alias table. See
http://bugs.python.org/issue1251921 for a similar report and
discussion.

--
title: The email package should defer to the codecs module for all aliases -> 
The email package should defer to the codecs module for   all aliases

___
Python tracker 

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



[issue5715] listen socket close in SocketServer.ForkingMixIn.process_request()

2011-05-22 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +pitrou

___
Python tracker 

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



[issue12012] _ssl module doesn't compile with OpenSSL 1.0.0d: SSLv2_method is missing

2011-05-22 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset d5771ed4ec4e by Victor Stinner in branch '2.7':
Issue #12012: test_ssl uses test_support.import_module()
http://hg.python.org/cpython/rev/d5771ed4ec4e

--

___
Python tracker 

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



[issue12012] _ssl module doesn't compile with OpenSSL 1.0.0d: SSLv2_method is missing

2011-05-22 Thread STINNER Victor

STINNER Victor  added the comment:

> Victor, you broke the Solaris gcc buildbot on 2.7.

It should be fixed by d5771ed4ec4e.

--
status: open -> closed

___
Python tracker 

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



[issue8898] The email package should defer to the codecs module for all aliases

2011-05-22 Thread Michele Orrù

Michele Orrù  added the comment:

So, what do you prefer? Add a check for sys.platform, or just skip it?

discussion on python-dev. So I'm +1 for just skipping it for now (with a XXX
comment on the right maybe).

--
title: The email package should defer to the codecs module for  all aliases -> 
The email package should defer to the codecs module for all aliases
Added file: http://bugs.python.org/file22064/unnamed

___
Python tracker 

___
> - mcbs has something broken in its imports;

mbcs is only available on Windows.So, what do you 
prefer? Add a check for sys.platform, or just skip it?



> - tactis module is not present.

I'm not sure what happened here: either the alias entry is wrong
or the codec module was not committed.

In either case, no one has complained about this encoding not working,
so we can probably just remove it from the alias table. See
http://bugs.python.org/issue1251921"; 
target="_blank">http://bugs.python.org/issue1251921 for a similar report 
and
discussion.
I don't have such autority, and probably such a 
choice will require a discussion on python-dev. So I'm +1 for just skipping 
it for now (with a XXX comment on the right maybe).

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



[issue8898] The email package should defer to the codecs module for all aliases

2011-05-22 Thread Michele Orrù

Michele Orrù  added the comment:

Sorry, I was told that email the bugtracker could not work properly.


> > - mcbs has something broken in its imports;

> mbcs is only available on Windows.
So, what do you prefer? Add a check for sys.platform, or just skip it?

> > - tactis module is not present.

> I'm not sure what happened here: either the alias entry is wrong
> or the codec module was not committed.

> In either case, no one has complained about this encoding not working,
> so we can probably just remove it from the alias table. See
> http://bugs.python.org/issue1251921 for a similar report and
> discussion.

I don't have such autority, and probably such a choice will require a 
discussion on python-dev. So I'm +1 for just skipping it for now (with a XXX 
comment on the right maybe).

--

___
Python tracker 

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



[issue8898] The email package should defer to the codecs module for all aliases

2011-05-22 Thread Michele Orrù

Changes by Michele Orrù :


Removed file: http://bugs.python.org/file22057/unnamed

___
Python tracker 

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



[issue12079] decimal.py: TypeError precedence in fma()

2011-05-22 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 825b4278a055 by Mark Dickinson in branch 'default':
Issue #12079: Decimal(0).fma(Decimal('inf'), 'not a number') should give a 
TypeError, not a Decimal.InvalidOperation
http://hg.python.org/cpython/rev/825b4278a055

--
nosy: +python-dev

___
Python tracker 

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



[issue12079] decimal.py: TypeError precedence in fma()

2011-05-22 Thread Mark Dickinson

Mark Dickinson  added the comment:

It turns out that this is as simple as moving the _convert_other call to the 
top of the Decimal.fma method.  (For some reason I was confusing this with the 
subtleties involved in making sure that an InvalidOperation arising from the 
multiplication part of the fma takes precedence over an InvalidOperation coming 
from a signalling nan in the addend.)

Fixed.

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



[issue8898] The email package should defer to the codecs module for all aliases

2011-05-22 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Michele Orrù wrote:
> 
> Michele Orrù  added the comment:
> 
> Sorry, I was told that email the bugtracker could not work properly.
> 
> 
>>> - mcbs has something broken in its imports;
> 
>> mbcs is only available on Windows.
>
> So, what do you prefer? Add a check for sys.platform, or just skip it?

The test suite provides ways to implement known failures on
specific platforms, so I'd suggest to use those mechanisms.
I've never used those, so can't comment on how much work it is
to use them.

If that's too difficult, just use sys.platform.

>>> - tactis module is not present.
> 
>> I'm not sure what happened here: either the alias entry is wrong
>> or the codec module was not committed.
> 
>> In either case, no one has complained about this encoding not working,
>> so we can probably just remove it from the alias table. See
>> http://bugs.python.org/issue1251921 for a similar report and
>> discussion.
> 
> I don't have such autority, and probably such a choice will require a 
> discussion on python-dev. So I'm +1 for just skipping it for now (with a XXX 
> comment on the right maybe).

Given the old discussion on the other ticket, it's fine to
remove the alias entry:

# tactis codec
'tis260' : 'tactis',

--
title: The email package should defer to the codecs module for all aliases -> 
The email package should defer to the codecs module for   all aliases

___
Python tracker 

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



  1   2   >