[issue4459] bdist_rpm should enable --fix-python by default

2010-08-13 Thread Éric Araujo

Éric Araujo  added the comment:

Considering that bdist_rpm is removed in distutils2, that its use in distutils 
is not encouraged (platform-specific tools are more adapted and can move 
quicker than the stdlib), that you have a workaround, and that we can’t change 
behavior for fear of breaking third-party tools (what happened all the time and 
lead Tarek to create distutils2), I’m closing this in one week unless Tarek 
objects.

--
assignee:  -> eric.araujo
nosy: +eric.araujo
status: open -> pending

___
Python tracker 

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



[issue9600] multiprocessing Pool instantiation crashes on 64 bit 2.6.6rc1 under Windows 7

2010-08-13 Thread Brian Curtin

Brian Curtin  added the comment:

I should correct myself. As seen on the 2.6 Win7 buildbot[0], 
test_multiprocessing is skipped there likely due to the "from 
._multiprocessing..." ImportError. I kind of remember this now but didn't want 
to backport the fix to release26-maint since it was frozen, and this didn't 
appear to be an actual bug in the installed version. As said before, I'll 
investigate tomorrow.



[0] 
http://www.python.org/dev/buildbot/builders/x86%20Windows7%202.6/builds/547/steps/test/logs/stdio

--

___
Python tracker 

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



[issue8669] lack of bdist_rpm module raises error on 'setup.py --help-commands'

2010-08-13 Thread Éric Araujo

Éric Araujo  added the comment:

With more knowledge now, I am sure this changeset fixed this bug. Closing.

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



[issue9600] multiprocessing Pool instantiation crashes on 64 bit 2.6.6rc1 under Windows 7

2010-08-13 Thread Brian Curtin

Brian Curtin  added the comment:

I just fixed a similar problem for #9513 but the problem was only ever seen 
when test_multiprocessing was run through regrtest on 3.x on Windows. Removing 
the relative import dot on _multiprocessing imports let them succeed.

I've never actually seen this cause a problem on an installed version, though. 
I'll check out 2.6.6 rc1 tomorrow when I get back to a Windows box to see if I 
can reproduce this.



Reclassifying from crash to behavior - it's just an ImportError, not actually a 
crash

--
components: +Library (Lib), Windows
nosy: +brian.curtin
stage:  -> needs patch
type: crash -> behavior

___
Python tracker 

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



[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error

2010-08-13 Thread Éric Araujo

Éric Araujo  added the comment:

An IOError is raised but file_util._copy_file_contents only produces the 
helpful message “could not create '': ” when catching os.error.

Catching both classes is easy. We’d need a regression test first, and before 
that, agreement from Tarek that such a change would be okay.

I wonder what is this mysterious None that we get as a result.

--

___
Python tracker 

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



[issue4947] sys.stdout fails to use default encoding as advertised

2010-08-13 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +haypo

___
Python tracker 

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



[issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6

2010-08-13 Thread Éric Araujo

Éric Araujo  added the comment:

Valeo, can you reproduce the bug? Final version of 2.6 will come out on Monday.

--
nosy: +barry
priority: normal -> high
type:  -> behavior

___
Python tracker 

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



[issue7798] document pydoc methods

2010-08-13 Thread Éric Araujo

Éric Araujo  added the comment:

pager is a general utility whereas cmd is for building REPLs, so I don’t think 
cmd is a good place. Can’t find a better one, though; shutil maybe. I have 
another feature in mind for a new module dedicated to the console: color codes, 
as seen duplicated in apps like Pygments, Sphinx, Mercurial, etc.

--

___
Python tracker 

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



[issue1371826] distutils is silent about multiple -I/-L/-R

2010-08-13 Thread Éric Araujo

Changes by Éric Araujo :


--
assignee:  -> tarek
components: +Distutils2 -Distutils
stage:  -> needs patch
versions: +Python 2.5, Python 2.6, Python 2.7, Python 3.1

___
Python tracker 

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



[issue9061] cgi.escape Can Lead To XSS Vulnerabilities

2010-08-13 Thread Éric Araujo

Éric Araujo  added the comment:

Markup nit fixed in r83999 (py3k) and r84001 (stupid typo), r84002 (3.1), 
r84003 (2.7).

--

___
Python tracker 

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



[issue8688] distutils sdist is too lazy w.r.t. recalculating MANIFEST

2010-08-13 Thread Éric Araujo

Éric Araujo  added the comment:

Patch ported to distutils2 
(http://bitbucket.org/tarek/distutils2/changeset/5abba4a77f5a). Closing.

Please reopen with priority set to “release blocker” if 2.6 behaves badly 
before Monday. Thanks.

--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed
title: distutils sdist is too laze w.r.t. recalculating MANIFEST -> distutils 
sdist is too lazy w.r.t. recalculating MANIFEST
versions: +Python 2.5

___
Python tracker 

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



[issue8688] distutils sdist is too laze w.r.t. recalculating MANIFEST

2010-08-13 Thread Éric Araujo

Éric Araujo  added the comment:

Patch committed in r83993 (py3k), r83994 (3.1) and r83996 (2.7).

I got the version wrong in 3.x and fixed it in r83995 and r83998.

--

___
Python tracker 

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



[issue9600] multiprocessing Pool instantiation crashes on 64 bit 2.6.6rc1 under Windows 7

2010-08-13 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +barry, jnoller

___
Python tracker 

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



[issue9601] ftplib should accept 250 on MKD

2010-08-13 Thread alphablue52

Changes by alphablue52 :


--
type:  -> behavior

___
Python tracker 

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



[issue9601] ftplib should accept 250 on MKD

2010-08-13 Thread alphablue52

New submission from alphablue52 :

I try to use ftplib for a Webspace running on a Windows Server machine.
The server responses 250 instead of 257 (which would be correct according to 
RFC959, ftp)

It would be nice if ftplib could also tolerate the 250 "Requested file ation 
okay, completed" code, since I cannot change the server (or beat that M$ 
programmer).

Thanks!

--
components: Library (Lib)
messages: 113866
nosy: alphablue52
priority: normal
severity: normal
status: open
title: ftplib should accept 250 on MKD
versions: Python 2.5, 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



[issue9600] multiprocessing Pool instantiation crashes on 64 bit 2.6.6rc1 under Windows 7

2010-08-13 Thread cipater

cipater  added the comment:

prior to this I already imported Pool (from multiprocessing import Pool)

I also tried the 64 bit 2.6.5 and got the same error.

--

___
Python tracker 

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



[issue9600] multiprocessing Pool instantiation crashes on 64 bit 2.6.6rc1 under Windows 7

2010-08-13 Thread cipater

New submission from cipater :

I'm running 2.6.6rc1 64 bit on Windows 7

I get the following error when I try to instantiate a Pool:

>>> import multiprocessing
>>> p = Pool(processes = 2)
Traceback (most recent call last):
  File "", line 1, in 
  File "c:\Python26\lib\multiprocessing\__init__.py", line 227, in Pool
return Pool(processes, initializer, initargs)
  File "c:\Python26\lib\multiprocessing\pool.py", line 84, in __init__
self._setup_queues()
  File "c:\Python26\lib\multiprocessing\pool.py", line 130, in _setup_queues
from .queues import SimpleQueue
  File "c:\Python26\lib\multiprocessing\queues.py", line 22, in 
from multiprocessing.synchronize import Lock, BoundedSemaphore, Semaphore, 
Condition
  File "c:\Python26\lib\multiprocessing\synchronize.py", line 22, in 
from multiprocessing.forking import assert_spawning, Popen
  File "c:\Python26\lib\multiprocessing\forking.py", line 153, in 
from ._multiprocessing import win32, Connection, PipeConnection
ImportError: No module named _multiprocessing
>>>

--
components: Extension Modules
messages: 113864
nosy: cipater
priority: normal
severity: normal
status: open
title: multiprocessing Pool instantiation crashes on 64 bit 2.6.6rc1 under 
Windows 7
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



[issue8688] distutils sdist is too laze w.r.t. recalculating MANIFEST

2010-08-13 Thread Éric Araujo

Éric Araujo  added the comment:

2.6 regression reverted in r83992.

Tarek is okay with my patch for the other branches. I noticed the first fix did 
not have a versionadded in the docs, so I’ll add that and commit.

--
assignee: tarek -> eric.araujo
priority: release blocker -> high

___
Python tracker 

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



[issue9425] Rewrite import machinery to work with unicode paths

2010-08-13 Thread STINNER Victor

STINNER Victor  added the comment:

I created #9599: Add PySys_FormatStdout and PySys_FormatStderr functions.

--

___
Python tracker 

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



[issue9599] Add PySys_FormatStdout and PySys_FormatStderr functions

2010-08-13 Thread STINNER Victor

New submission from STINNER Victor :

For my work #9425 (Rewrite import machinery to work with unicode paths), I need 
a function to write unicode strings to sys.stderr (especially to write messages 
on import in verbose mode). Attached patch creates PySys_FormatStdout() and 
PySys_FormatStderr(). It's the same idea than the new function 
PyErr_WarnFormat() vs PyErr_WarnEx() (added by r83976): similar API but use 
PyUnicode_FromFormatV().

PySys_FormatStdout() and PySys_FormatStderr() don't truncate the output 
message. PySys_WriteStdout() and PySys_WriteStderr() truncate the output 
because they use a static buffer of 1001 bytes, but I don't know if it is an 
implementation choice (to avoid bugs?) or just a limitation of the 
implementation.

About the patch:
 - rename mywrite() to sys_write() to use a less generic name (it helps 
debugging)
 - in sys_write(): don't call PyErr_Clear() if the second call to 
sys_pyfile_write() fails, because it is useless. fputs() doesn't care to Python 
exceptions and the exception state is restored just after the call to fputs()
 - sys_format() encodes the message to utf-8 on sys_pyfile_write_unicode() 
failure because utf-8 is able to encode all unicode characters (except unicode 
surrogates). Use an error handler to escape surrogates may avoid encode errors, 
but it's not important here because sys_pyfile_write_unicode() should not fail. 
sys_pyfile_write_unicode() knows better how to handle surrogate characters 
(sys.stderr uses backslashreplace error handler by default).

For #9425, I only need PySys_FormatStderr(), but I added also 
PySys_FormatStdout() just to be consistent with PySys_Write*() and because it 
only costs a few line of code.

--
components: Interpreter Core, Unicode
files: pysys_formatstderr.patch
keywords: patch
messages: 113861
nosy: haypo
priority: normal
severity: normal
status: open
title: Add PySys_FormatStdout and PySys_FormatStderr functions
versions: Python 3.2
Added file: http://bugs.python.org/file18518/pysys_formatstderr.patch

___
Python tracker 

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



[issue8688] distutils sdist is too laze w.r.t. recalculating MANIFEST

2010-08-13 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

This is a regression introduced in 2.6.6rc1.  After discussion in irc with 
merwok, it is agreed that he will revert to pre-2.6.6rc1 behavior and not apply 
any fix.  It's way too late to be changing behavior in 2.6.6.  Folks using 
Python 2.6 will just have to live with the devil they know.

--
nosy: +barry
priority: high -> release blocker

___
Python tracker 

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



[issue9425] Rewrite import machinery to work with unicode paths

2010-08-13 Thread STINNER Victor

STINNER Victor  added the comment:

r83976 adds PyErr_WarnFormat() (pyerr_warnformat-2.patch).

--

___
Python tracker 

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



[issue9568] test_urllib2_localnet fails on OS X 10.3

2010-08-13 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Thanks guys.  I'll allow this in for 2.6.6 if you can commit it before Sunday 
8/15.  I'd like the buildbots to have plenty of time to turn green before 
schedule release on Monday.  Please include a NEWS item and close this issue 
once it's been committed.

--
priority: normal -> release blocker
resolution:  -> accepted

___
Python tracker 

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



[issue2944] asyncore doesn't handle connection refused correctly

2010-08-13 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Just to close the loop: thanks for reverting this for 2.6.6!

--

___
Python tracker 

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



[issue8688] distutils sdist is too laze w.r.t. recalculating MANIFEST

2010-08-13 Thread Éric Araujo

Éric Araujo  added the comment:

New version of the patch to address Tarek’s comments and add NEWS and docs 
entries.

--

___
Python tracker 

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



[issue8688] distutils sdist is too laze w.r.t. recalculating MANIFEST

2010-08-13 Thread Éric Araujo

Changes by Éric Araujo :


Added file: http://bugs.python.org/file18517/sdist-manifest-marker.diff

___
Python tracker 

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



[issue8688] distutils sdist is too laze w.r.t. recalculating MANIFEST

2010-08-13 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file18482/sdist-manifest-marker.diff

___
Python tracker 

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



[issue9425] Rewrite import machinery to work with unicode paths

2010-08-13 Thread STINNER Victor

STINNER Victor  added the comment:

r83990 closes #9542 by creating the PyUnicode_FSDecoder() PyArg_ParseTuple 
parser.

--

___
Python tracker 

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



[issue9542] Create PyUnicode_FSDecoder() function

2010-08-13 Thread STINNER Victor

STINNER Victor  added the comment:

Commited to 3.2 as r83990.

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



[issue9596] PC/getpathp.c unused?

2010-08-13 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

$ grep getpath PCbuild/*
PCbuild/pythoncore.vcproj:  
RelativePath="..\PC\getpathp.c"

So it's fairly obvious that it is used, no?

--

___
Python tracker 

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



[issue9425] Rewrite import machinery to work with unicode paths

2010-08-13 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file18514/_Py_wchar2char-2.patch

___
Python tracker 

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



[issue9425] Rewrite import machinery to work with unicode paths

2010-08-13 Thread STINNER Victor

STINNER Victor  added the comment:

r83989 creates _Py_wchar2char() function (_Py_wchar2char-2.patch).

--

___
Python tracker 

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



[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2010-08-13 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I opened issue9598 for the untabify bug.  For the purposes of source checking, 
I believe non-ascii characters should be disallowed in python C source code.  
According to my understanding of C89 standard, interpretation of characters 
outside of the basic character set is implementation and locale dependent.

--

___
Python tracker 

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



[issue6884] Impossible to include file in sdist that starts with 'build' on Win32

2010-08-13 Thread Éric Araujo

Éric Araujo  added the comment:

Test by haypo on win32:
- ['README', 'setup.py', 'somecode\\__init__.py']
? ^^

+ ['README', 'buildout.cfg', 'setup.py', 'somecode/__init__.py']
?     ^

The bug is confirmed. I’ll use os.sep to silence the second error, and look 
into test_filelist and filelist itself to fix it.

--
stage: unit test needed -> needs patch

___
Python tracker 

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



[issue9598] untabify.py fails on files that contain non-ascii characters

2010-08-13 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
nosy: +eric.araujo

___
Python tracker 

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



[issue7962] Demo and Tools need to be tested and pruned

2010-08-13 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
dependencies: +untabify.py fails on files that contain non-ascii characters

___
Python tracker 

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



[issue9598] untabify.py fails on files that contain non-ascii characters

2010-08-13 Thread Alexander Belopolsky

New submission from Alexander Belopolsky :

For example:

$ ./python.exe Tools/scripts/untabify.py Modules/_heapqmodule.c
Traceback (most recent call last):
...
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe7 in position 173: 
invalid continuation byte


I am not sure what relevant C standard has to say about using non-ascii 
characters in comments, but the checking tool should not fail with a traceback 
in such situation.

--
components: Demos and Tools
messages: 113849
nosy: belopolsky
priority: normal
severity: normal
status: open
title: untabify.py fails on files that contain non-ascii characters
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



[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2010-08-13 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Note directly related to this issue, but untabify.py fails on files that 
contain non-ascii characters.  For example:

$ ./python.exe Tools/scripts/untabify.py Modules/_heapqmodule.c
Traceback (most recent call last):
...
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe7 in position 173: 
invalid continuation byte


I am not sure what relevant C standard has to say about using non-ascii 
characters in comments, but the checking tool should not fail with a traceback 
in such situation.

--

___
Python tracker 

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



[issue9597] mac: Install 2to3 in /usr/local/bin

2010-08-13 Thread Martin v . Löwis

Changes by Martin v. Löwis :


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



[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2010-08-13 Thread Éric Araujo

Éric Araujo  added the comment:

I wonder how to have sane code reuse between patchcheck and Mercurial hooks. 
Mark seems to have started seconding Dirkjan with hooks, see e.g. 
http://hg.python.org/hooks/rev/0344575ad60e, so I wonder if we’re going to use 
only hooks (pro: they will be invoked on every push, whereas patchcheck is 
opt-in, con: they would require that contributors clone the hooks repo and set 
them up) or still maintain patchcheck, which has pros (no setup, does not 
require a VCS) and cons (not automatic, not widely used, whereas hooks can be 
part of the new python-dev policy).

--

___
Python tracker 

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



[issue9589] test_heapq: AttributeError: 'int' object has no attribute 'pop'

2010-08-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
status: open -> closed

___
Python tracker 

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



[issue9589] test_heapq: AttributeError: 'int' object has no attribute 'pop'

2010-08-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
assignee:  -> pitrou
status: pending -> open

___
Python tracker 

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



[issue9580] os.confstr() doesn't decode result according to PEP 383

2010-08-13 Thread STINNER Victor

STINNER Victor  added the comment:

Le vendredi 13 août 2010 20:36:22, vous avez écrit :
> The CS_PATH variable is a colon-separated list of directories ("the value
> for the PATH environment variable that finds all standard utilities"), so
> the file system encoding is certainly correct there.

CS_PATH is hardcoded to "/bin:/usr/bin" in the GNU libc for UNIX. Do you know 
another key for which the value can be controled by the user (or the system 
administrator)?

> I don't see any reference to an encoding in the POSIX spec for confstr().

CS_PATH is just an example, there are other keys. I'm not sure that all values 
are encoded to the filesystem encodings, it might be another encoding?

Well, if we really doesn't know the encoding, a solution is to use a bytes API 
(which may avoid the question of the usage of the PEP 383).

--

___
Python tracker 

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



[issue9597] mac: Install 2to3 in /usr/local/bin

2010-08-13 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar :

According to Mac/Makefile.in, scripts like pydoc, idle, smtpd.py and so on gets 
symlinked in /usr/local/bin but there is none for 2to3. Perhaps this was 
forgotten?

--
assignee: ronaldoussoren
components: 2to3 (2.x to 3.0 conversion tool), Build, Macintosh
messages: 113845
nosy: ronaldoussoren, srid
priority: normal
severity: normal
status: open
title: mac: Install 2to3 in /usr/local/bin
type: feature request
versions: Python 2.6, 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



[issue9203] Use computed gotos by default

2010-08-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
status: pending -> closed

___
Python tracker 

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



[issue9589] test_heapq: AttributeError: 'int' object has no attribute 'pop'

2010-08-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I've committed an updated version of the C patch in r83988, after Victor's 
comments on IRC.

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

___
Python tracker 

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



[issue9425] Rewrite import machinery to work with unicode paths

2010-08-13 Thread STINNER Victor

STINNER Victor  added the comment:

> I know this is not introduced by your patch, just moved, but couldn’t
> the typo in UNDECODEABLE be fixed? (extraneous e)

I wasn't sure that it was a typo, so I kept it unchanged. It's now fixed by 
r83987.

--

___
Python tracker 

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



[issue2281] Enhanced cPython profiler with high-resolution timer

2010-08-13 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

Can someone post a diff against current py3k?   I would like to take a look, 
but the files attached to this issue seem to be more than a year old.

--

___
Python tracker 

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



[issue6884] Impossible to include file in sdist that starts with 'build' on Win32

2010-08-13 Thread Éric Araujo

Éric Araujo  added the comment:

Attaching a unit test translation of Chris’ report. The test pass on POSIX 
(linux2), can someone test on win32?

Tracing the flow from sdist to filelist, it seems to be not a regex error but a 
logic error. A file explicitly added should not be removed by the exclude 
filter afterward.

--
keywords: +patch
Added file: http://bugs.python.org/file18516/test-buildout-inclusion.diff

___
Python tracker 

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



[issue586680] -S hides standard dynamic modules

2010-08-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution: wont fix -> duplicate
superseder:  -> test_heapq: AttributeError: 'int' object has no attribute 'pop'

___
Python tracker 

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



[issue9579] In 3.x, os.confstr() returns garbage if value is longer than 255 bytes

2010-08-13 Thread STINNER Victor

STINNER Victor  added the comment:

I just fear that the loop is "endless". Imagine the worst case: confstr() 
returns a counter (n, n+1, n+2, ...). In 64 bits, it can be long.

I would prefer to see a condition to stop after 2 steps. It should maybe stop 
when an error at the 3rd step.

--

___
Python tracker 

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



[issue9595] PC/getpathp.c unused?

2010-08-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue9520] Add Patricia Trie high performance container

2010-08-13 Thread Dmitry Chichkov

Changes by Dmitry Chichkov :


Added file: http://bugs.python.org/file18515/dc.dict.bench.0.02.py

___
Python tracker 

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



[issue9596] PC/getpathp.c unused?

2010-08-13 Thread Antoine Pitrou

New submission from Antoine Pitrou :

PC/getpathp.c claims it is “Used by DOS, OS/2, Windows 3.1, Windows 95/98, 
Windows NT”, but Modules/getpath.c already tries to be cross-platform.  It is 
not obvious whether the former is used at all.

--
components: Interpreter Core
messages: 113839
nosy: loewis, pitrou
priority: low
severity: normal
status: open
title: PC/getpathp.c unused?
type: resource usage
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



[issue9595] PC/getpathp.c unused?

2010-08-13 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: pitrou
priority: normal
severity: normal
status: open
title: PC/getpathp.c unused?

___
Python tracker 

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



[issue5867] No way to create an abstract classmethod

2010-08-13 Thread Guido van Rossum

Guido van Rossum  added the comment:

As you figured out it is not yet supported.

I object to making changes to the classmethod implementation.

I expect the best thing to do is to add a new

@abc.abstractclassmethod

decorator defined in pure Python (maybe the definition of abstractproperty 
provides a hint on how to do this).

You may want to define @abc.abstractstaticmethod as well.

--

___
Python tracker 

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



[issue9594] typo on Mac/Makefile.in? s/pythonw/python/

2010-08-13 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

Specifically "python$(VERSION)-32 python" instead of "python$(VERSION)-32 
pythonw"?

--

___
Python tracker 

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



[issue9594] typo on Mac/Makefile.in? s/pythonw/python/

2010-08-13 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar :

>From Mac/Makefile.in:

[...]
ifneq ($(LIPO_32BIT_FLAGS),)
lipo $(LIPO_32BIT_FLAGS) -output 
$(DESTDIR)$(prefix)/bin/python$(VERSION)-32 pythonw
lipo $(LIPO_32BIT_FLAGS) -output 
$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-32 pythonw
ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python-32"
ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw-32"
endif
[...]

Shouldn't the last word in the first line be `python` instead of `pythonw`?

http://svn.python.org/view/python/trunk/Mac/Makefile.in?annotate=77031#l55

--
assignee: ronaldoussoren
components: Build, Macintosh
messages: 113836
nosy: ronaldoussoren, srid
priority: normal
severity: normal
status: open
title: typo on Mac/Makefile.in? s/pythonw/python/
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



[issue9425] Rewrite import machinery to work with unicode paths

2010-08-13 Thread Éric Araujo

Éric Araujo  added the comment:

I know this is not introduced by your patch, just moved, but couldn’t
the typo in UNDECODEABLE be fixed? (extraneous e)

--

___
Python tracker 

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



[issue9425] Rewrite import machinery to work with unicode paths

2010-08-13 Thread STINNER Victor

Changes by STINNER Victor :


Removed file: http://bugs.python.org/file18431/_Py_wchar2char.patch

___
Python tracker 

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



[issue9425] Rewrite import machinery to work with unicode paths

2010-08-13 Thread STINNER Victor

STINNER Victor  added the comment:

New version of the patch _Py_wchar2char-2.patch:
 - _Py_wchar2char() only escapes characters in range U+DC80..U+DCFF (instead of 
U+DC00..U+DCFF)
 - add a comment to _Py_char2wchar()

> I don't understand why you decrement `size` in the second pass.

Because I would like to avoid buffer overflow when calling wcstombs(). 
wcstombs() might write more bytes at the second step, even if I don't think 
that it would be possible.

--
Added file: http://bugs.python.org/file18514/_Py_wchar2char-2.patch

___
Python tracker 

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



[issue5867] No way to create an abstract classmethod

2010-08-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thank you. I'm not an ABC expert but it looks ok. Guido, what do you think?

--
nosy: +gvanrossum

___
Python tracker 

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



[issue9203] Use computed gotos by default

2010-08-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I've committed a patch in r83986. I will watch the buildbots and close if 
everything's fine.

--
assignee:  -> pitrou
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> pending

___
Python tracker 

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



[issue9588] Add sys.executable to test_subprocessing.CommandsWithSpaces shell tests

2010-08-13 Thread Brian Curtin

Brian Curtin  added the comment:

Fixed in r83983, r83984, and r83985. Thanks, Tim.

--
assignee: tim.golden -> brian.curtin
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
title: Skip subprocess shell tests on Windows per file association setup -> Add 
sys.executable to test_subprocessing.CommandsWithSpaces shell tests
versions: +Python 2.7, Python 3.1

___
Python tracker 

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



[issue7175] Define a standard location and API for configuration files

2010-08-13 Thread Michael Foord

Michael Foord  added the comment:

It would be nice to settle this.

Personally I would like to see the defaults being:

Linux: ~/.pythonx.y
Mac OS X: ~/.pythonx.y with a fallback of ~/Library/Preferences/.pythonx.y
Windows: ~/pythonx.y perhaps with a backup of AppData/pythonx.y

For both Windows and Mac OS X I would be happy with the fallback / primary to 
be the other way round - it doesn't *really* matter. The API for getting the 
user config direction should always return a list I guess if we have fallbacks.

Someone else in the Python-dev discussion thread (Adal Chiriliuc) expressed a 
preferences for the documents folder on Windows over the home directory. This 
would be fine as well (with AppData still as a fallback). This is used by other 
native windows applications. (In earlier versions of Windows the documents 
folder was explicitly called "Documents and Settings".)

We should use pythonx.y rather than just python because (for example) you will 
typically have different packages installed when you have multiple versions of 
Python, and in unittest would then want / need different plugins enabled and 
configured in the unittest config files for each of the versions of Python.

--

___
Python tracker 

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



[issue9593] utf8 codec readlines error after "\x85 "

2010-08-13 Thread Joseph Copenhaver

Joseph Copenhaver  added the comment:

It is better, thanks.

--

___
Python tracker 

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



[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-08-13 Thread Greg Brockman

Greg Brockman  added the comment:

I'll take another stab at this.  In the attachment (assign-tasks.patch), I've 
combined a lot of the ideas presented on this issue, so thank you both for your 
input.  Anyway:

- The basic idea of the patch is to record the mapping of tasks to workers.  
I've added a protocol between the parent process and the workers that allows 
this to happen without adding a race condition between recording the task and 
the child dying.
- If a child unexpectedly dies, the worker_handler pretends that all of the 
jobs currently assigned to it raised a RuntimeError.  (Multiple jobs can be 
assigned to a single worker if the result handler is being slow.)
- The guarantee I try to provide is that each job will be started at most once. 
 There is enough information to instead ensure that each job is run exactly 
once, but in general whether that's acceptable or useful is really only known 
at the application level.

Some notes:
- I haven't implemented this for approach for the ThreadPool yet.
- The test suite runs but occasionally hangs on shutting down the pool in Ask's 
tests in multiprocessing-tr...@82502-termination-trackjobs.patch.  My 
experiments seem to indicate this is due to a worker dying while holding a 
queue lock.  So I think a next step is to deal with workers dying while holding 
a queue lock, although this seems unlikely in practice.  I have some ideas as 
to how you could fix this, if we decide it's worth trying.

Anyway, please let me know what you think of this approach/sample 
implementation.  If we decide that this seems promising, I'd be happy to built 
it out further.

--
Added file: http://bugs.python.org/file18513/assign-tasks.patch

___
Python tracker 

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



[issue9593] utf8 codec readlines error after "\x85 "

2010-08-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Is there any way to get the efficiency of codecs I/O readlines()
> chunking behavior and specify a list of characters to use? Can the
> file delimiter be changed in python as in perl?

No, but you can use readlines() from the standard open() function (which
will give you 8-bit strings), and then decode individual lines yourself.

--

___
Python tracker 

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



[issue5867] No way to create an abstract classmethod

2010-08-13 Thread Daniel Urban

Daniel Urban  added the comment:

If I understand correctly, some tests are needed for the instantiation of 
classes with abstract static/classmethods. I added them in issue5867a.diff.

--
Added file: http://bugs.python.org/file18512/issue5867a.diff

___
Python tracker 

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



[issue9588] Skip subprocess shell tests on Windows per file association setup

2010-08-13 Thread Brian Curtin

Brian Curtin  added the comment:

Yeah that's much better :)
I should have asked if you left out sys.executable out intentionally before 
coming up with my patch...I assumed it was intended to be different due to 
shell=1 or something.

Go ahead and apply if you want.

--
assignee: brian.curtin -> tim.golden

___
Python tracker 

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



[issue9588] Skip subprocess shell tests on Windows per file association setup

2010-08-13 Thread Tim Golden

Tim Golden  added the comment:

Assuming I understand you correctly, could I propose this rather less involved 
patch which simply specifies the sys.executable as part of the command line. 
The test doesn't propose to test file associations and indeed two of the test 
already fill in the executable

--
Added file: http://bugs.python.org/file18511/9588.exec.patch

___
Python tracker 

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



[issue9593] utf8 codec readlines error after "\x85 "

2010-08-13 Thread Joseph Copenhaver

Joseph Copenhaver  added the comment:

I now recognize the issue was in regard to format problems and not python, but 
the area where this code will be used requires the use of the codecs module.
Is there any way to get the efficiency of codecs I/O readlines() chunking 
behavior and specify a list of characters to use? Can the file delimiter be 
changed in python as in perl?

Thanks for the quick response.

--

___
Python tracker 

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



[issue9180] Memory Error

2010-08-13 Thread Mark Dickinson

Changes by Mark Dickinson :


--
status: pending -> closed

___
Python tracker 

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



[issue5867] No way to create an abstract classmethod

2010-08-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The patch doesn't check that instantiating these methods work at all.

--
nosy: +benjamin.peterson, pitrou
stage:  -> patch review
versions: +Python 3.2 -Python 3.1

___
Python tracker 

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



[issue9593] utf8 codec readlines error after "\x85 "

2010-08-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

U+0085 corresponds to a line terminator (*). and codecs.open() observes this 
convention.
Do note that the new io.open() (or the built-in open() in 3.x) only recognizes 
'\r' and '\n' as line separators.

In any case, changing this behaviour would break compatibility, therefore I'm 
rejecting the issue.

(*) http://en.wikipedia.org/wiki/Newline#Unicode

--
nosy: +pitrou
resolution:  -> 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



[issue5867] No way to create an abstract classmethod

2010-08-13 Thread Daniel Urban

Daniel Urban  added the comment:

Here is a patch, which adds a descriptor to classmethod and staticmethod.
Pseudocode:

__get__(self, inst, owner):
if getattr(inst.callable, '__isabstractmethod__', False):
return True
return False

__set__(self, inst, value):
inst.callable.__isabstractmethod__ = bool(value)

--
keywords: +patch
Added file: http://bugs.python.org/file18510/issue5867.diff

___
Python tracker 

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



[issue9593] utf8 codec readlines error after "\x85 "

2010-08-13 Thread Ezio Melotti

Changes by Ezio Melotti :


--
components:  -Regular Expressions
nosy: +ezio.melotti

___
Python tracker 

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



[issue9589] test_heapq: AttributeError: 'int' object has no attribute 'pop'

2010-08-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is a C version of addbuilddir. It solves the present issue.

--
Added file: http://bugs.python.org/file18509/c-addbuildir.patch

___
Python tracker 

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



[issue9593] utf8 codec readlines error after "\x85 "

2010-08-13 Thread Joseph Copenhaver

New submission from Joseph Copenhaver :

The IO readlines() facility incorrectly processes utf8 files for some unknown 
reason. Specifically, the call generates too many entries in the lines array 
result after a character sequence "\x85 blah" which gets cut as ("\x85 
","blah") according the the resultant array. My workaround for this issue is 
not elegant, especially since I need the newline characters:

#BEGIN: WTF
a_str_whole = fs_in.read()
fs_in.close()
a_str_lines = a_str_whole.split("\n")
for idx in range(0,len(a_str_lines)-1):
   a_str_lines[idx]+="\n"
#END: WTF

Attached is an example script that defines the problem clearly.

--
components: IO, Interpreter Core, Regular Expressions, Unicode
files: ErrorProof-utf8-x85.py
messages: 113818
nosy: jcope
priority: normal
severity: normal
status: open
title: utf8 codec readlines error after "\x85 "
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file18508/ErrorProof-utf8-x85.py

___
Python tracker 

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



[issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip

2010-08-13 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

After chatting with __ap__ on irc, i'm going to reject this patch for 2.6.6.

--
nosy: +barry
priority: release blocker -> 
status: open -> closed

___
Python tracker 

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



[issue9592] Limitations in objects returned by multiprocessing Pool

2010-08-13 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +jnoller

___
Python tracker 

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



[issue9592] Limitations in objects returned by multiprocessing Pool

2010-08-13 Thread Freek Dijkstra

New submission from Freek Dijkstra :

I came across three limitation in the multiprocessing module that were not 
handled correctly.

Attached is a file that reproduces the errors in minimal code. I tested them 
with Python 2.6.5 and 3.1.2.

Expected result:
multiprocessing.Pool's promises a map function where each result is returned 
transparently to the main process (despite that the calculation was done in a 
subprocess)

Actual result:
Not all values returned by a subprocess are returned transparently.
I expected multiprocessing to handle these cases gracefully by yielding an 
Exception in the Main process.

The cases I found are:

1) A multiprocessing worker can not return (return, not raise!) an Exception. 
If this is attempted, the result handler thread in the Pool calls the exception 
with no arguments, 
which might raise an error if multiple arguments are required:
TypeError: ('__init__() takes exactly 2 arguments (1 given)', , ())


2) A multiprocessing worker can not return an hashlib Object.
If this is attempted, pickle returns an error:
PicklingError: Can't pickle : attribute lookup 
_hashlib.HASH failed


3) A multiprocessing worker can not return an Object which overrides 
__getattr__, and accesses a variable from self in __getattr__.
If this is attempted, Python 2.6 crashes with a bus error:
Program terminated by uncaught signal #10 after 1.56 seconds.
Python 3.1 yields the error:
RuntimeError: maximum recursion depth exceeded while calling a Python object

--
components: Library (Lib)
files: multiprocessingbugs.py
messages: 113816
nosy: macfreek
priority: normal
severity: normal
status: open
title: Limitations in objects returned by multiprocessing Pool
type: crash
versions: Python 2.6, Python 3.1
Added file: http://bugs.python.org/file18507/multiprocessingbugs.py

___
Python tracker 

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



[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-08-13 Thread Mark Dickinson

Mark Dickinson  added the comment:

Same error on the buildbots, here:

http://www.python.org/dev/buildbot/3.x/builders/PPC%20Leopard%203.x/builds/288/steps/compile/logs/stdio

--

___
Python tracker 

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



[issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC

2010-08-13 Thread Mark Dickinson

Mark Dickinson  added the comment:

Since r83837, the py3k _ctypes module fails to build on my OS X 10.6 machine:

*** WARNING: renaming "_ctypes" since importing it failed: 
dlopen(build/lib.macosx-10.6-x86_64-3.2-pydebug/_ctypes.so, 2): Symbol not 
found: _ffi_closure_alloc
  Referenced from: 
/Users/dickinsm/python/svn/py3k/build/lib.macosx-10.6-x86_64-3.2-pydebug/_ctypes.so
  Expected in: flat namespace
 in 
/Users/dickinsm/python/svn/py3k/build/lib.macosx-10.6-x86_64-3.2-pydebug/_ctypes.so

This looks like a different issue from the one above, though.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue9587] unittest.assertRaises() return the raised exception

2010-08-13 Thread Michael Foord

Michael Foord  added the comment:

Sorry, it's a reopened bug requesting a feature that has already been 
considered and rejected previously. Yes I was abrupt, my apologies - I'm trying 
to clear my backlog before I go away.

--

___
Python tracker 

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



[issue9587] unittest.assertRaises() return the raised exception

2010-08-13 Thread Kristján Valur Jónsson

Kristján Valur Jónsson  added the comment:

That was a bit abrupt, want't it?  Denver is well aware of this and said: 
"but sometimes using the context manager approach adds unnecessary bloat to 
already long-winded unit tests."

I happen to agree with him and don't see why we can't discuss this some.  We 
never did discuss this fully in issue 6275, I just tempered my patch a bit to 
at least get something done.

I don't think this should be rejected out of hand simply because TBDFL said 
that its an "'odd' API for a unittest assert method".  assertRaises already 
return a context manager if called without a callable (an odd api?), and it can 
just as well return an exception if called _with_ a callable.

--

___
Python tracker 

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



[issue9591] kqueue not reporting EOF under certain circumstances

2010-08-13 Thread Volodymyr Kostyrko

Changes by Volodymyr Kostyrko :


--
title: kqueu not reporting EOF under certain circumstances -> kqueue not 
reporting EOF under certain circumstances

___
Python tracker 

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



[issue9591] kqueu not reporting EOF under certain circumstances

2010-08-13 Thread Volodymyr Kostyrko

New submission from Volodymyr Kostyrko :

This one is BSD related. FreeBSD 8.1.

This works:
# cat test.py | ./test.py
-1 684 32768 0 0
#

This hangs:
# ./test.py < file
-1 684 0 0 0

The difference is that in second case popped kevent lacks any data on EOF.

--
components: Library (Lib)
files: test.py
messages: 113811
nosy: Volodymyr.Kostyrko
priority: normal
severity: normal
status: open
title: kqueu not reporting EOF under certain circumstances
type: behavior
versions: Python 3.1
Added file: http://bugs.python.org/file18506/test.py

___
Python tracker 

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



[issue9587] unittest.assertRaises() return the raised exception

2010-08-13 Thread Michael Foord

Michael Foord  added the comment:

If you want the exception then use assertRaises in a with statement. The 
exception is available as an attribute on the context manager.

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



[issue9586] "warning: comparison between pointer and integer" in multiprocessing build on Tiger

2010-08-13 Thread Mark Dickinson

Mark Dickinson  added the comment:

Actually, since SEM_FAILED isn't public and is only used in one file, it seems 
simplest just to redefine it on Mac.  Here's a patch.

--
keywords: +patch
Added file: http://bugs.python.org/file18505/sem_failed_tiger.patch

___
Python tracker 

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



[issue9579] In 3.x, os.confstr() returns garbage if value is longer than 255 bytes

2010-08-13 Thread David Watson

David Watson  added the comment:

I don't see why confstr() values shouldn't change.  sysconf() values can change 
between calls, IIRC.  Implementations can also define their own confstr 
variables - they don't have to stick to the POSIX stuff.

And using a loop means the confstr() call only appears once in the source, 
which is more elegant, right? :)

--

___
Python tracker 

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



[issue9580] os.confstr() doesn't decode result according to PEP 383

2010-08-13 Thread David Watson

David Watson  added the comment:

The CS_PATH variable is a colon-separated list of directories ("the value for 
the PATH environment variable that finds all standard utilities"), so the file 
system encoding is certainly correct there.

I don't see any reference to an encoding in the POSIX spec for confstr().

--

___
Python tracker 

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



[issue9589] test_heapq: AttributeError: 'int' object has no attribute 'pop'

2010-08-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Here is a patch which works if the patch in #9548 is also applied.
It won't work alone because opening a file in text mode currently imports 
locale which imports re, etc. ... all before adding the build dir to sys.path.

Of course, since the logic in addbuilddir() is now much simpler, it could also 
be rewritten in C somewhere (where?), and the launched much earlier during the 
startup phase.

--
keywords: +patch
Added file: http://bugs.python.org/file18504/addbuilddir.patch

___
Python tracker 

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



[issue9590] __init__ TypeError reverses expected vs received args

2010-08-13 Thread Mark Dickinson

Mark Dickinson  added the comment:

What flox said.

There's no reversal here:  you've defined an __init__ method that takes no 
arguments.  The unittest framework tries to instantiate a TestSomething 
instance by calling it with two arguments (one of which is self).  If you look 
at the source for the TestCase class you'll see:

def __init__(self, methodName='runTest'):
...


Note that the message you're seeing applies to *your* __init__ method:  that 
method expects no arguments (because that's the way you defined it), but it's 
getting two (because the unittest test runner calls it that way).

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue9333] Expose a way to enable os.symlink on Windows

2010-08-13 Thread Brian Curtin

Brian Curtin  added the comment:

I've tried changing privileges for a user and I'm not seeing that they get 
reflected in real-time while an application is running. Maybe I'm not doing it 
right, but I'm not seeing it. I'm also not able to find anything about that 
being supported or anyone else trying this...actually, there's very little 
privilege related info anywhere outside of "these are the available privileges".

I'll spend a little more time and see if I can channel any sysadmin types to 
see if they know anything about this. It's looking like we'll just have to try 
enabling on module loading and if it works, great, otherwise there's no 
os.symlink for the lifetime of the interpreter.

Attached is a patch that works safely on XP/Server 2003 where there is no 
symlink possibility. It still has that test_tarfile error which I'll get to 
next.

--
components: +Windows
keywords: +needs review
Added file: http://bugs.python.org/file18503/issue9333_v2.diff

___
Python tracker 

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



[issue9590] __init__ TypeError reverses expected vs received args

2010-08-13 Thread Florent Xicluna

Florent Xicluna  added the comment:

Definitely it does not look like a bug.

>>> import unittest
>>> help(unittest.TestCase)

...

 |  If it is necessary to override the __init__ method, the base class
 |  __init__ method must always be called. It is important that subclasses
 |  should not change the signature of their __init__ method, since instances
 |  of the classes are instantiated automatically by parts of the framework
 |  in order to be run.

...

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



[issue9590] __init__ TypeError reverses expected vs received args

2010-08-13 Thread Anthony Long

New submission from Anthony Long :

import unittest
from selenium import selenium


class SetupSomething(unittest.TestCase):

def setUp(self, URL):

self.selenium = selenium("localhost", , "*firefox", self.URL)


def tearDown(self):
pass


class TestSomething(SetupSomething):
def __init__():
print "bug."

def setUp(self):
self.URL = "http://google.com/";

def tearDown(self):
pass

def test_tester(self):
self.selenium.open('/')
print "no"



unittest.main()


TypeError: '__init__() takes no arguments (2 given)'

--
messages: 113802
nosy: antlong
priority: normal
severity: normal
status: open
title: __init__ TypeError reverses expected vs received args
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue9589] test_heapq: AttributeError: 'int' object has no attribute 'pop'

2010-08-13 Thread Florent Xicluna

Florent Xicluna  added the comment:

For some reason, sys.modules['heapq'] contains the Python implementation 
instead of the C implementation.

Tested with r83981 on python 3:

Python 3.2a1+ (py3k:83981M, Aug 13 2010, 19:02:31) 
[GCC 4.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> import heapq
>>> heapq.heappop(10)
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/florent/dev/python/py3trunk/Lib/heapq.py", line 140, in heappop
lastelt = heap.pop()# raises appropriate IndexError if heap is empty
AttributeError: 'int' object has no attribute 'pop'

>>> import _heapq
>>> _heapq.heappop(10)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: heap argument must be a list


These tests (TestErrorHandling) are supposed to run with the C module only.

--

___
Python tracker 

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



[issue9589] test_heapq: AttributeError: 'int' object has no attribute 'pop'

2010-08-13 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

This is a variant of the kind of annoyance pointed out in #9548. Here, it seems 
addbuilddir() in Lib/site.py shouldn't import sysconfig, because it imports the 
re module.

--
nosy: +pitrou

___
Python tracker 

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



[issue9558] build_ext fails on VS8.0

2010-08-13 Thread R. David Murray

R. David Murray  added the comment:

Éric, 'release blocker' policy depends on the release manager :)  Barry, for 
example, likes people to set release blocker on issues they want him to make 
sure he looks at before the release.  The release manager can always knock it 
down.  As can other developers if they judge it isn't really a release blocker 
(unless the RM set it or it was set specifically to get the RMs attention).

When you reset the priority on this one, though, you didn't give it a new 
priority.  I'm setting it to normal, since the bug report (at the moment at 
least) is only about a test failure.  If it represents a bug in the ability to 
build extensions on Windows with VS8, you could raise the priority.

--
nosy: +r.david.murray
priority:  -> normal

___
Python tracker 

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



  1   2   >