[issue15581] curses: segfault in addstr()

2012-10-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Is output an unicode string?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-10-17 Thread Ned Deily

Ned Deily added the comment:

There seems to be a bootstrap issue here.  Building with ./configure 
--with-pydebug --prefix=... on OS X in a clean source directory (hg purge 
--all), 'make' makes it to building the static libpython .a but then dies on 
the sysconfig generate-posix-vars step:

ar rc libpython3.4dm.a Modules/_threadmodule.o  Modules/signalmodule.o  
Modules/posixmodule.o  Modules/errnomodule.o  Modules/pwdmodule.o  
Modules/_sre.o  Modules/_codecsmodule.o  Modules/_weakref.o  
Modules/_functoolsmodule.o  Modules/operator.o  Modules/_collectionsmodule.o  
Modules/itertoolsmodule.o  Modules/_localemodule.o  Modules/_iomodule.o 
Modules/iobase.o Modules/fileio.o Modules/bytesio.o Modules/bufferedio.o 
Modules/textio.o Modules/stringio.o  Modules/zipimport.o  
Modules/faulthandler.o  Modules/symtablemodule.o  Modules/xxsubtype.o
/usr/bin/ranlib: file: libpython3.4dm.a(dynamic_annotations.o) has no symbols
/usr/bin/ranlib: file: libpython3.4dm.a(pymath.o) has no symbols
ranlib libpython3.4dm.a
ranlib: file: libpython3.4dm.a(dynamic_annotations.o) has no symbols
ranlib: file: libpython3.4dm.a(pymath.o) has no symbols
/usr/bin/clang   -framework CoreFoundation -o python Modules/python.o 
libpython3.4dm.a -ldl  -framework CoreFoundation 
./python -E -S -m sysconfig --generate-posix-vars
Could not find platform dependent libraries 
Consider setting $PYTHONHOME to [:]
Traceback (most recent call last):
  File "/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/runpy.py", 
line 160, in _run_module_as_main
"__main__", fname, loader, pkg_name)
  File "/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/runpy.py", 
line 73, in _run_code
exec(code, run_globals)
  File 
"/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/sysconfig.py", line 
683, in 
_main()
  File 
"/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/sysconfig.py", line 
671, in _main
_generate_posix_vars()
  File 
"/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/sysconfig.py", line 
374, in _generate_posix_vars
pybuilddir = 'build/lib.%s-%s' % (get_platform(), sys.version[:3])
  File 
"/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/sysconfig.py", line 
651, in get_platform
get_config_vars(),
  File 
"/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/sysconfig.py", line 
520, in get_config_vars
_init_posix(_CONFIG_VARS)
  File 
"/py/dev/default/b10.7_t10.7_x4.3_cclang_d/unix/source/Lib/sysconfig.py", line 
393, in _init_posix
from _sysconfigdata import build_time_vars
ImportError: No module named '_sysconfigdata'

--

___
Python tracker 

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



[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2012-10-17 Thread Ramchandra Apte

Changes by Ramchandra Apte :


--
title: Security bug in tkinter allows for untrusted code execution. -> Security 
bug in tkinter allows for untrusted, arbitrary code execution.

___
Python tracker 

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



[issue16260] change bare except in locale.py

2012-10-17 Thread Ramchandra Apte

New submission from Ramchandra Apte:

In Lib/locale.py:1860 , a bare except is used. It should be replaced with 
"except Error" as the setlocale() function raises `Error` if an error occurs.

--
components: Library (Lib)
messages: 173138
nosy: ramchandra.apte
priority: normal
severity: normal
status: open
title: change bare except in locale.py

___
Python tracker 

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



[issue16260] change bare except in locale.py

2012-10-17 Thread Ramchandra Apte

Ramchandra Apte added the comment:

I am going to file a new bug for fixing the bare excepts in the std lib.

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



[issue16261] Fix bare excepts in various places in std lib

2012-10-17 Thread Ramchandra Apte

New submission from Ramchandra Apte:

Will attach patch.

--
components: Library (Lib)
messages: 173140
nosy: ramchandra.apte
priority: normal
severity: normal
status: open
title: Fix bare excepts in various places in std lib

___
Python tracker 

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



[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-10-17 Thread Trent Nelson

Trent Nelson added the comment:

Ah, this is because of this OS X-specific snippet in sysconfig.get_platform():

elif osname[:6] == "darwin":
import _osx_support
osname, release, machine = _osx_support.get_platform_osx(
get_config_vars(),
osname, release, machine)

get_config_vars() results in _init_posix() eventually being called, which 
attempts to import _sysconfigdata.

Ugh.  Looking into a patch now.

--

___
Python tracker 

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



[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-10-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 66959d419369 by Trent Nelson in branch '3.3':
Issue #15298: fix an OS X bootstrap issue with _sysconfigdata.py.
http://hg.python.org/cpython/rev/66959d419369

New changeset 429774e8d9f9 by Trent Nelson in branch 'default':
Merge issue #15298: fix an OS X bootstrap issue with _sysconfigdata.py.
http://hg.python.org/cpython/rev/429774e8d9f9

--

___
Python tracker 

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



[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-17 Thread Václav Šmilauer

Václav Šmilauer added the comment:

Yes, that's what I suggested at the end of msg172656 - including modulename in 
the key.

Brett, would it be OK if I make patch against 3.3 (or head, if you prefer) to 
key by (modulename,filename) for compiled modules?

I had a look at importlib.machinery.ExtensionFileLoader and it will suffer from 
the same issue.

Should I open a separate bug for the post-3.3 patch, and keep this as 
documentation bug for 2.7?

--

___
Python tracker 

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



[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-10-17 Thread devurandom

Changes by devurandom :


--
nosy: +devurandom

___
Python tracker 

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



[issue15483] CROSS: initialise include and library paths in setup.py

2012-10-17 Thread devurandom

Changes by devurandom :


--
nosy: +devurandom

___
Python tracker 

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



[issue3754] cross-compilation support for python build

2012-10-17 Thread devurandom

Changes by devurandom :


--
nosy: +devurandom

___
Python tracker 

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



[issue15484] CROSS: use _PYTHON_PROJECT_BASE in distutils sysconfig

2012-10-17 Thread devurandom

Changes by devurandom :


--
nosy: +devurandom

___
Python tracker 

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



[issue15268] curses configure checks fail if only /usr/include/ncursesw/curses.h is installed

2012-10-17 Thread devurandom

Changes by devurandom :


--
nosy: +devurandom

___
Python tracker 

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



[issue14598] _cursesmodule.c fails with ncurses-5.9 on Linux

2012-10-17 Thread devurandom

Changes by devurandom :


--
nosy: +devurandom

___
Python tracker 

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



[issue15819] Unable to build Python out-of-tree when source tree is readonly.

2012-10-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7e879a453bb3 by Trent Nelson in branch '2.7':
Issue #15819: use standard autoconf preset output variables.
http://hg.python.org/cpython/rev/7e879a453bb3

New changeset 65b3c41052b6 by Trent Nelson in branch '3.2':
Issue #15819: use standard autoconf preset output variables.
http://hg.python.org/cpython/rev/65b3c41052b6

New changeset b78e97b84f35 by Trent Nelson in branch '3.3':
Issue #15819: use standard autoconf preset output variables.
http://hg.python.org/cpython/rev/b78e97b84f35

New changeset f9eb516bea88 by Trent Nelson in branch 'default':
Issue #15819: use standard autoconf preset output variables.
http://hg.python.org/cpython/rev/f9eb516bea88

--

___
Python tracker 

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



[issue15581] curses: segfault in addstr()

2012-10-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Seems the bug was fixed for 3.3 in issue12567.

--

___
Python tracker 

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



[issue16262] srcdir != builddir builds fail, if hg is not installed

2012-10-17 Thread Matthias Klose

New submission from Matthias Klose:

seen with the 3.3 branch and the trunk:

also, I think using python now unconditionally breaks the cross builds, so this 
should call PYTHON_FOR_BUILD, not python.

/bin/mkdir -p Include
hg: no-repository, python: found! cannot run ../Parser/asdl_c.py -h Include 
../Parser/Python.asdl
/bin/mkdir -p Python
hg: no-repository, python: found! cannot run ../Parser/asdl_c.py -c Python 
../Parser/Python.asdl
gcc -pthread -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall 
-Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat 
-Wformat-security -Werror=format-security  -fprofile-generate -g -flto 
-fuse-linker-plugin -IObjects -IInclude -IPython -I. -IInclude -I../Include 
-D_FORTIFY_SOURCE=2   -DPy_BUILD_CORE -o Python/Python-ast.o Python/Python-ast.c
gcc: error: Python/Python-ast.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
make[3]: *** [Python/Python-ast.o] Error 4

--
messages: 173146
nosy: doko
priority: normal
severity: normal
status: open
title: srcdir != builddir builds fail, if hg is not installed

___
Python tracker 

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



[issue13617] Reject embedded null characters in wchar* strings

2012-10-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I added some comments in Rietveld.

I see other instances of the use of non-checked PyUnicode_AsWideCharString() 
and PyUnicode_AsUnicode().

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS)

2012-10-17 Thread Larry Hastings

Larry Hastings added the comment:

I don't know POSIX / UNIX all that well.  Does it require that a stat call 
updates atime?  Because that's one of those "how does it ever work" 
head-scratchers.  (Maybe everybody always disables atime these days?  I don't 
think I do.)

--

___
Python tracker 

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



[issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS)

2012-10-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> I don't know POSIX / UNIX all that well.  Does it require that a stat
> call updates atime?  Because that's one of those "how does it ever
> work" head-scratchers.  (Maybe everybody always disables atime these
> days?  I don't think I do.)

I think most Linux distributions disable it for you; or, rather, they
use the "relatime" mount option which is a smart cheat:

relatime
Update  inode  access  times  relative  to  modify  or change time.
Access time is only updated if the previous access time was earlier
than  the  current  modify or change time. (Similar to noatime, but
doesn't break mutt or other applications that need  to  know  if  a
file has been read since the last time it was modified.)

--

___
Python tracker 

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



[issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS)

2012-10-17 Thread Trent Nelson

Trent Nelson added the comment:

Re: "how did it ever work"... on Solaris, because of the st_mtime failure, it 
doesn't even get a chance to fail on the subsequent st_atime.  I suspect the 
only platform that's exercised the utimensat() to date is Linux, and either a) 
os.stat() doesn't affect atime on Linux, b) everyone has atime disabled, c) the 
two stat calls happen quick enough that no measurable difference is observed 
against st_atime.

As for POSIX:

http://pubs.opengroup.org/onlinepubs/9699919799/toc.htm

"The fstat() function shall update any time-related fields (as described in XBD 
File Times Update ), before writing into the stat structure."

The referenced section:

4.8 File Times Update

Each file has three distinct associated timestamps: the time of last data 
access, the time of last data modification, and the time the file status last 
changed. These values are returned in the file characteristics structure struct 
stat, as described in  .

Each function or utility in POSIX.1-2008 that reads or writes data (even if the 
data does not change) or performs an operation to change file status (even if 
the file status does not change) indicates which of the appropriate timestamps 
shall be marked for update. If an implementation of such a function or utility 
marks for update one of these timestamps in a place or time not specified by 
POSIX.1-2008, this shall be documented, except that any changes caused by 
pathname resolution need not be documented. For the other functions or 
utilities in POSIX.1-2008 (those that are not explicitly required to read or 
write file data or change file status, but that in some implementations happen 
to do so), the effect is unspecified.

An implementation may update timestamps that are marked for update immediately, 
or it may update such timestamps periodically. At the point in time when an 
update occurs, any marked timestamps shall be set to the current time and the 
update marks shall be cleared. All timestamps that are marked for update shall 
be updated when the file ceases to be open by any process or before a fstat(), 
fstatat(), fsync(), futimens(), lstat(), stat(), utime(), utimensat(), or 
utimes() is successfully performed on the file. Other times at which updates 
are done are unspecified. Marks for update, and updates themselves, shall not 
be done for files on read-only file systems; see Read-Only File System .

The resolution of timestamps of files in a file system is 
implementation-defined, but shall be no coarser than one-second resolution. The 
three timestamps shall always have values that are supported by the file 
system. Whenever any of a file's timestamps are to be set to a value V 
according to the rules of the preceding paragraphs of this section, the 
implementation shall immediately set the timestamp to the greatest value 
supported by the file system that is not greater than V.

--

___
Python tracker 

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



[issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS)

2012-10-17 Thread Trent Nelson

Trent Nelson added the comment:

Here's a thought...  why not alter the test to work with fixed times and 
separate the atime tests from the mtime tests.

For atime, we can set utime(filename, (0.0, ...)) and see if a subsequent 
os.stat() returns st_atime as 0.0 -- that'll tell us whether or not atime is 
affected.

For the mtime tests, rather than having a variable UTIME_EPSILON, just have 
fixed dates that match the expected precision of the underlying platform?

--

___
Python tracker 

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



[issue16257] test_socket.test_create_connection tests for wrong errno on Solaris

2012-10-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b5fa9d8603b6 by Trent Nelson in branch '3.2':
Issue #16257: make test_create_connection() handle ENETUNREACH.
http://hg.python.org/cpython/rev/b5fa9d8603b6

New changeset 6a938ce6315c by Trent Nelson in branch '3.3':
Issue #16257: make test_create_connection() handle ENETUNREACH.
http://hg.python.org/cpython/rev/6a938ce6315c

New changeset 37a59bd23578 by Trent Nelson in branch 'default':
Issue #16257: make test_create_connection() handle ENETUNREACH.
http://hg.python.org/cpython/rev/37a59bd23578

--
nosy: +python-dev

___
Python tracker 

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



[issue16257] test_socket.test_create_connection tests for wrong errno on Solaris

2012-10-17 Thread Trent Nelson

Changes by Trent Nelson :


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



[issue16262] srcdir != builddir builds fail, if hg is not installed

2012-10-17 Thread Matthias Klose

Matthias Klose added the comment:

looking at the unused subprocess import in asdl_c.py, maybe some call-outs to 
svn/hg were made in the past?

the patch removes the check for hg for the asdl.[ch] builds, and sets ADSLGEN 
to a appropriate python interpreter if one is found.

fixes the build for src != build; the cross build wasn't affected, we can build 
with any python version.

--
keywords: +needs review, patch
Added file: http://bugs.python.org/file27600/asdlgen.diff

___
Python tracker 

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



[issue16263] sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris

2012-10-17 Thread Trent Nelson

New submission from Trent Nelson:

Sample test_socket -v output:

testSendmsgDataGenerator (test.test_socket.SendmsgUDPTest) ... skipped "don't 
have sendmsg"
testSendmsgExcessCmsgReject (test.test_socket.SendmsgUDPTest) ... skipped 
"don't have sendmsg"
testSendmsgGather (test.test_socket.SendmsgUDPTest) ... skipped "don't have 
sendmsg"
testSendmsgNoDestAddr (test.test_socket.SendmsgUDPTest) ... skipped "don't have 
sendmsg"
testRecvmsg (test.test_socket.RecvmsgUDPTest) ... skipped "don't have recvmsg"
testRecvmsgAfterClose (test.test_socket.RecvmsgUDPTest) ... skipped "don't have 
recvmsg"
testRecvmsgBadArgs (test.test_socket.RecvmsgUDPTest) ... skipped "don't have 
recvmsg"

This is on the Solaris 10 box.  sendmsg/recvmsg etc definitely exist.

Haven't investigated yet.

--
assignee: trent
messages: 173154
nosy: jcea, trent
priority: normal
severity: normal
status: open
title: sendmsg, recvmsg, recvmsg_into et al not being detected on Solaris
versions: 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



[issue16262] srcdir != builddir builds fail, if hg is not installed

2012-10-17 Thread Matthias Klose

Matthias Klose added the comment:

r71315 did remove the call-out to hg, so it looks safe to not check for hg in 
ASDLGEN.

--

___
Python tracker 

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



[issue16262] srcdir != builddir builds fail, if hg is not installed

2012-10-17 Thread Matthias Klose

Matthias Klose added the comment:

typo, r71375

--

___
Python tracker 

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



[issue16262] srcdir != builddir builds fail, if hg is not installed

2012-10-17 Thread Matthias Klose

Changes by Matthias Klose :


--
components: +Build
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



[issue16264] test_logging failure on Windows 7 buildbot

2012-10-17 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Changeset d3c7ebdc71bb produced the following test failure on one of the stable 
buildbots:


==
FAIL: test_noserver (test.test_logging.SocketHandlerTest)
--
Traceback (most recent call last):
  File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_logging.py", 
line 1453, in test_noserver
self.assertTrue(self.sock_hdlr.retryTime > now)
AssertionError: False is not true

See http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x

--
assignee: giampaolo.rodola
components: Library (Lib), Tests
messages: 173157
nosy: giampaolo.rodola, jkloth, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: test_logging failure on Windows 7 buildbot
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue16262] srcdir != builddir builds fail, if hg is not installed

2012-10-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +trent

___
Python tracker 

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



[issue16264] test_logging failure on Windows 7 buildbot

2012-10-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 240fa6e93925 by Giampaolo Rodola' in branch 'default':
test_logging.py: where needed use unittest's assertGreater, assertLesser, 
assertIs rather than assertTrue (also in order to debug issue 16264)
http://hg.python.org/cpython/rev/240fa6e93925

--
nosy: +python-dev

___
Python tracker 

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



[issue16264] test_logging failure on Windows 7 buildbot

2012-10-17 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Committed http://hg.python.org/cpython/rev/240fa6e93925 in order to have a 
clearer look on what's going on.
Will get back on this later today, after the next bb failure.

--

___
Python tracker 

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



[issue15298] _sysconfigdata is generated in srcdir, not builddir

2012-10-17 Thread Trent Nelson

Trent Nelson added the comment:

That last commit fixes in-tree builds, but broke out-of-tree builds.  I've 
refactored the patch (sysconfig.py.patch) to fix the issue, but it's getting 
progressively more hacky, so I wanted to see what other people think before 
proceeding.

(That being said, it works a *lot* better than the previous solution of writing 
_sysconfigdata.py to the root builddir, then moving it.  That didn't work at 
all for out-of-tree builds.  This solution slots _sysconfigdata directly into 
sys.modules, which _init_posix() is more than happy with.)

--
Added file: http://bugs.python.org/file27601/sysconfig.py.patch

___
Python tracker 

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



[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-17 Thread R. David Murray

R. David Murray added the comment:

Yes, I think keeping this bug as the doc bug and opening a new one for the 
enhancement is the best way to go.

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



[issue16259] Replace exec() in test.regrtest with __import__

2012-10-17 Thread R. David Murray

R. David Murray added the comment:

That's a safe use of exec, since the name is coming from a loaded module and 
not from user input.  Still, load_module would be cleaner.

However, the real fix is to just delete that code.  It is dead code...we always 
pass the indirect_test argument to dash_R.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue16265] Code sample does not collapse correctly

2012-10-17 Thread Yongzhi Pan

New submission from Yongzhi Pan:

http://docs.python.org/py3k/tutorial/inputoutput.html#fancier-output-formatting

In the last but second code sample in that section, the code is not correctly 
colored and cannot be correctly collapsed.

Expanded:

>>> table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 8637678}
>>> print ('Jack: {0[Jack]:d}; Sjoerd: {0[Sjoerd]:d}; '
...'Dcab: {0[Dcab]:d}'.format(table))
Jack: 4098; Sjoerd: 4127; Dcab: 8637678

Collapsed:

table = {'Sjoerd': 4127, 'Jack': 4098, 'Dcab': 8637678}
print('Jack: {0[Jack]:d}; Sjoerd: {0[Sjoerd]:d}; '

--
assignee: docs@python
components: Documentation
messages: 173163
nosy: docs@python, fossilet
priority: normal
severity: normal
status: open
title: Code sample does not collapse correctly
type: behavior
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



[issue16258] test_local.TestEnUSCollection failures on Solaris 10

2012-10-17 Thread Trent Nelson

Trent Nelson added the comment:

With the caveat that I know absolutely nothing about locales, here's what I've 
been able to reduce the problem down to:

zinc (alias s11, Solaris 11 x64):
>>> locale.setlocale(locale.LC_ALL, 'C')
'C'
>>> locale.strxfrm('a')
'a'
>>> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
'en_US.UTF-8'
>>> locale.strxfrm('a')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: character U+10105a3 is not in range [U+; U+10]
>>> 

nitrogen (alias s10, Solaris 10 SPARC):

>>> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
'en_US.UTF-8'
>>> locale.strxfrm('a')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: character U+101010e is not in range [U+; U+10]

Not sure how relevant it is, but on both those Solaris boxes, locale.LC_ALL 
returns 6, whereas on BSD and OS X it always seems to return 0.

--

___
Python tracker 

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



[issue16266] Typo in tutorial

2012-10-17 Thread Yongzhi Pan

New submission from Yongzhi Pan:

http://docs.python.org/py3k/tutorial/inputoutput.html#reading-and-writing-files

The text:

In text mode, the default is to convert platform-specific line endings (\n on 
Unix, \r\n on Windows) to just \n on reading and \n back to platform-specific 
line endings on writing. 

Is the last '\n' a typo and not needed?

--
assignee: docs@python
components: Documentation
messages: 173165
nosy: docs@python, fossilet
priority: normal
severity: normal
status: open
title: Typo in tutorial
type: behavior
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



[issue16258] test_local.TestEnUSCollection failures on Solaris 10

2012-10-17 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

I can reproduce this on my x86 Solaris 10 update 10.

--

___
Python tracker 

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



[issue16258] test_local.TestEnUSCollection failures on Solaris 10

2012-10-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:

With the system Python on s10:

Python 2.6.8 (unknown, Apr 13 2012, 17:08:12) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.strxfrm('a')
'a'
>>> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
'en_US.UTF-8'
>>> locale.strxfrm('a')
'\x01\x01\x01\x0e\x01\x01\x01\x01\x01\x01\x01\x02\x01\x01\x0fi\x01\x01\x01\x01'
>>> locale.strxfrm('a').decode('utf-8')
u'\x01\x01\x01\x0e\x01\x01\x01\x01\x01\x01\x01\x02\x01\x01\x0fi\x01\x01\x01\x01'

The difference between Python 2 and Python 3 is that Python 3 uses wcsxfrm, not 
strxfrm. Apparently Solaris' wcsxfrm is some broken thing that returns the same 
thing as strxfrm, cast to a wchar_t *, hence the character U+101010e 
(corresponding to the '\x01\x01\x01\x0e' bytestring above).

--
nosy: +loewis, pitrou

___
Python tracker 

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



[issue16258] test_local.TestEnUSCollection failures on Solaris 10

2012-10-17 Thread Jesús Cea Avión

Jesús Cea Avión added the comment:

BTW, this works in python 3.2:

x86, 32 bit python, Solaris 10 update 10:

"""
Python 3.2.3 (default, Apr 12 2012, 13:29:13) 
[GCC 4.7.0] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
'en_US.UTF-8'
>>> locale.strxfrm('a')
'���\U00010f69�'
"""

--
keywords: +3.3regression

___
Python tracker 

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



[issue16266] Typo in tutorial

2012-10-17 Thread Andrew Svetlov

Andrew Svetlov added the comment:

I'm not native English speaker, but for me it just means
\r\n -> \n when read from stream and
\n -> \r\n when write to stream
if OS is Windows.
That's correct.

--
nosy: +asvetlov, chris.jerdonek

___
Python tracker 

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



[issue15200] Faster os.walk

2012-10-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Timing of walk depends on how deep we dive into the directories.

$ ./python -m timeit -s "from os import walk"  "for x in 
walk('/home/serhiy/py/1/2/3/4/5/6/7/8/9/cpython/'): pass"
10 loops, best of 3: 398 msec per loop
$ ./python -m timeit -s "from os import fwalk"  "for x in 
fwalk('/home/serhiy/py/1/2/3/4/5/6/7/8/9/cpython/'): pass"
10 loops, best of 3: 249 msec per loop

Given the above mentioned objections (consuming a lot of file descriptors, 
OS/FS dependency, testing burden) I withdraw my patch and close the issue. 
Thanks all for discussion.

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



[issue16258] test_local.TestEnUSCollection failures on Solaris 10

2012-10-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:

It only works on Python 3.2 because PyUnicode_FromWideChar is more permissive, 
it seems. The first character in the wchar_t string returned by Solaris is 
still 0x101010e.

--

___
Python tracker 

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



[issue16258] test_local.TestEnUSCollection failures on Solaris 10

2012-10-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:

(by the way, I also tried a memset() before calling wcsxfrm(): no change)

--

___
Python tracker 

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



[issue16265] Code sample does not collapse correctly

2012-10-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a0fba0382ae0 by Andrew Svetlov in branch '3.2':
Issue #16265: Fix collapsing of code sample in tutorial.
http://hg.python.org/cpython/rev/a0fba0382ae0

New changeset 7c0de8be4eaf by Andrew Svetlov in branch '3.3':
Merge issue #16265: Fix collapsing of code sample in tutorial.
http://hg.python.org/cpython/rev/7c0de8be4eaf

New changeset c8a11e9a0217 by Andrew Svetlov in branch 'default':
Merge issue #16265: Fix collapsing of code sample in tutorial.
http://hg.python.org/cpython/rev/c8a11e9a0217

--
nosy: +python-dev

___
Python tracker 

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



[issue16265] Code sample does not collapse correctly

2012-10-17 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed. Thanks.

--
nosy: +asvetlov
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 3.4

___
Python tracker 

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



[issue15145] Faster *_find_max_char

2012-10-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file26093/find_max_char.patch

___
Python tracker 

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



[issue16261] Fix bare excepts in various places in std lib

2012-10-17 Thread Brett Cannon

Brett Cannon added the comment:

One thing to be aware of, Ramchandra, is that there might be a slight 
backwards-compatibility problem from tightening up what exceptions propagate. 
Now with proper documentation and only applying things to 3.4 this probably 
won't be a problem.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue15145] Faster *_find_max_char

2012-10-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch updated to tip.

But because results are contradictory and often patched version even slower 
vanilla (and I don't understand why it happens), I close the issue. I think all 
changes are irrelevant and differences are only compiler optimization artifacts.

--
resolution:  -> rejected
stage: patch review -> committed/rejected
status: open -> closed
Added file: http://bugs.python.org/file27602/find_max_char_2.patch

___
Python tracker 

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



[issue15145] Faster *_find_max_char

2012-10-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks for the effort, Serhiy!

--

___
Python tracker 

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



[issue15378] Underported Tools/unicode/comparecodecs.py

2012-10-17 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue15378] Underported Tools/unicode/comparecodecs.py

2012-10-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Can anyone look at this tiny patch?

--
versions: +Python 3.4

___
Python tracker 

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



[issue15378] Underported Tools/unicode/comparecodecs.py

2012-10-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 98f64cbed2ac by Antoine Pitrou in branch '3.2':
Issue #15378: Fix Tools/unicode/comparecodecs.py.  Patch by Serhiy Storchaka.
http://hg.python.org/cpython/rev/98f64cbed2ac

New changeset f281d7700339 by Antoine Pitrou in branch '3.3':
Issue #15378: Fix Tools/unicode/comparecodecs.py.  Patch by Serhiy Storchaka.
http://hg.python.org/cpython/rev/f281d7700339

New changeset ae1f84fd143e by Antoine Pitrou in branch 'default':
Issue #15378: Fix Tools/unicode/comparecodecs.py.  Patch by Serhiy Storchaka.
http://hg.python.org/cpython/rev/ae1f84fd143e

--
nosy: +python-dev

___
Python tracker 

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



[issue15378] Underported Tools/unicode/comparecodecs.py

2012-10-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The patch is obviously good, thank you :)

--
nosy: +pitrou
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue9583] Document startup option/environment interaction

2012-10-17 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2f812212599b by Andrew Svetlov in branch '2.7':
Issue #9583: Document startup option/environment interaction.
http://hg.python.org/cpython/rev/2f812212599b

New changeset a8052ad9752b by Andrew Svetlov in branch '3.2':
Issue #9583: Document startup option/environment interaction.
http://hg.python.org/cpython/rev/a8052ad9752b

New changeset f0bb61cbc046 by Andrew Svetlov in branch '3.3':
Merge issue #9583: Document startup option/environment interaction.
http://hg.python.org/cpython/rev/f0bb61cbc046

New changeset def0e0bb06ef by Andrew Svetlov in branch 'default':
Merge issue #9583: Document startup option/environment interaction.
http://hg.python.org/cpython/rev/def0e0bb06ef

--
nosy: +python-dev

___
Python tracker 

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



[issue9583] Document startup option/environment interaction

2012-10-17 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Applied patch.
Thanks, Todd.
I think the issue can be closed.

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



[issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris

2012-10-17 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +jcea
superseder:  -> test_local.TestEnUSCollection failures on Solaris 10

___
Python tracker 

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



[issue16258] test_local.TestEnUSCollection failures on Solaris 10

2012-10-17 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


--
nosy: +haypo

___
Python tracker 

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



[issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use)

2012-10-17 Thread Christopher the Magnificent

New submission from Christopher the Magnificent:

This may be an issue with the interpreter behavior or it may be a documentation 
issue.

Note: I only selected Python 3.3 as the version, but it probably affects MANY 
other Python versions.

Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> import abc
>>> help(abc.abstractclassmethod)
Help on class abstractclassmethod in module abc:

class abstractclassmethod(builtins.classmethod)
 |  A decorator indicating abstract classmethods.
 |  
 |  Similar to abstractmethod.
 |  
 |  Usage:
 |  
 |  class C(metaclass=ABCMeta):
 |  @abstractclassmethod
 |  def my_abstract_classmethod(cls, ...):
 |  ...
 |  
 |  'abstractclassmethod' is deprecated. Use 'classmethod' with
 |  'abstractmethod' instead.
. (et cetra)
.
.
>>> # doesn't work
>>> class Demo(metaclass=abc.ABCMeta):
... @abc.abstractmethod
... @classmethod
... def test(cls):
... pass
... 
Traceback (most recent call last):
  File "", line 1, in 
class Demo3(metaclass=abc.ABCMeta):
  File "", line 3, in Demo3
@classmethod
  File 
"/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/abc.py", line 
24, in abstractmethod
funcobj.__isabstractmethod__ = True
AttributeError: attribute '__isabstractmethod__' of 'classmethod' objects is 
not writable
>>> # DOES work
>>> class Demo2(metaclass=abc.ABCMeta):
... @classmethod
... @abc.abstractmethod
... def test(cls):
... pass
... 
>>> Demo2()
Traceback (most recent call last):
  File "", line 1, in 
Demo4()
TypeError: Can't instantiate abstract class Demo2 with abstract methods test


Hopefully this is enough documentation to show what the issues is.  If not, 
just chime in.  :-)

--
assignee: docs@python
components: Documentation, Interpreter Core
messages: 173183
nosy: christopherthemagnificent, docs@python
priority: normal
severity: normal
status: open
title: order of decorators @abstractmethod and @classmethod is significant (is 
not documented to be in @abstractclassmethod which advises their combined use)
type: behavior
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



[issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use)

2012-10-17 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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



[issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use)

2012-10-17 Thread Andrew Svetlov

Andrew Svetlov added the comment:

I think better to fix code to make first sample also work.
It can be done as special cases in abc.abstractmethod to process 
classmethod/staticmethod objects properly.

--

___
Python tracker 

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



[issue14621] Hash function is not randomized properly

2012-10-17 Thread Christian Heimes

Christian Heimes added the comment:

I've modified unicodeobject's unicode_hash() function. V8's algorithm is about 
55% slower for a 800 MB ASCII string on my box.

Python's current hash algorithm for bytes and unicode:

   while (--len >= 0)
x = (_PyHASH_MULTIPLIER * x) ^ (Py_uhash_t) *P++;

$ ./python -m timeit -s "t = 'abcdefgh' * int(1E8)" "hash(t)"
10 loops, best of 3: 94.1 msec per loop


V8's algorithm:

while (--len >= 0) {
x += (Py_uhash_t) *P++;
x += ((x + (Py_uhash_t)len) << 10);
x ^= (x >> 6);
}

$ ./python -m timeit -s "t = 'abcdefgh' * int(1E8)" "hash(t)"
10 loops, best of 3: 164 msec per loop

--

___
Python tracker 

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



[issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use)

2012-10-17 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2012-10-17 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever, gpolo

___
Python tracker 

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



[issue15483] CROSS: initialise include and library paths in setup.py

2012-10-17 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue15268] curses configure checks fail if only /usr/include/ncursesw/curses.h is installed

2012-10-17 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue16266] Typo in tutorial

2012-10-17 Thread Chris Jerdonek

Chris Jerdonek added the comment:

The last \n is needed for the reason Andrew mentioned, but it is true that the 
sentence could probably be rephrased to reduce the chance of confusion.

--

___
Python tracker 

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



[issue16266] Rephrase sentence in tutorial about universal newlines

2012-10-17 Thread Chris Jerdonek

Chris Jerdonek added the comment:

I would suggest something like this:

"In text mode, the default when reading is to convert platform-specific line 
endings (\n on Unix, \r\n on Windows) to just \n.  When writing in text mode, 
the default is to convert occurrences of \n back to platform-specific line 
endings."

--
keywords: +easy
title: Typo in tutorial -> Rephrase sentence in tutorial about universal 
newlines
versions: +Python 3.4

___
Python tracker 

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



[issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use)

2012-10-17 Thread R. David Murray

R. David Murray added the comment:

I've added the nosy list from issue 11610, in case complicating the 
implementation is seen as sub-optimal :)

--
nosy: +Darren.Dale, benjamin.peterson, daniel.urban, dsdale24, eric.araujo, 
eric.snow, ncoghlan, python-dev, r.david.murray, stutzbach

___
Python tracker 

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



[issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use)

2012-10-17 Thread Benjamin Peterson

Benjamin Peterson added the comment:

I don't see why classmethod/staticmethod should be special cased if it doesn't 
work for other decorators.

--

___
Python tracker 

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



[issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use)

2012-10-17 Thread Darren Dale

Darren Dale added the comment:

Quoting the documentation for abstractmethod:

"When abstractmethod() is applied in combination with other method descriptors, 
it should be applied as the innermost decorator, as shown in the following 
usage examples:"

The examples include staticmethod and classmethod.

--

___
Python tracker 

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



[issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution.

2012-10-17 Thread Guilherme Polo

Guilherme Polo added the comment:

It is a well known fact that the readprofile function uses exec, and it has 
been like that for more than 18 years. The parameters baseName and className 
defines the execution of the files $HOME/.{className}.tcl, 
$HOME/.{className}.py, $HOME/.{baseName}.tcl, and $HOME/.{baseName}.py. The 
function's docstring actually say that.

Said that, I never needed to load custom code during the creation of a Tk 
instance. To me the existence of readprofile is unneeded.

But what is your proposal to the issue ?

--

___
Python tracker 

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



[issue16266] Rephrase sentence in tutorial about universal newlines

2012-10-17 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Looks good to me, please apply it.

--

___
Python tracker 

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



[issue9583] Document startup option/environment interaction

2012-10-17 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Close the issue.
Feel free to reopen if clarification needed.

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



[issue15450] Allow dircmp.subdirs to behave well under subclassing

2012-10-17 Thread Petri Lehtinen

Changes by Petri Lehtinen :


--
keywords: +patch

___
Python tracker 

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



[issue13614] setup.py register fails if long_description contains ReST

2012-10-17 Thread Petri Lehtinen

Petri Lehtinen added the comment:

Can this be closed?

--
nosy: +petri.lehtinen

___
Python tracker 

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



[issue13614] setup.py register fails if long_description contains ReST

2012-10-17 Thread Éric Araujo

Éric Araujo added the comment:

The changesets you see are in distutils2, I haven’t had a chance to backport 
them yet.

--
stage: test needed -> commit review
versions: +Python 3.4

___
Python tracker 

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



[issue15518] Provide test coverage for filecmp.dircmp.report methods.

2012-10-17 Thread Chris Calloway

Chris Calloway added the comment:

I have a number of patches for this issue I have worked on during a few local 
Python user group hack nights. I have not submitted them yet, however, as they 
require some expository material here in order to illustrate how they address 
Jerdonek's points. I have a regional Python conference (PyCarolinas) that I 
have some responsibilities in through the weekend, however, and will not be 
able to move forward ASAP until after then.

--

___
Python tracker 

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



[issue16268] dir(closure) claims that a closure has no __dir__, only to work later after manually invoking __dir__ from its type

2012-10-17 Thread Christopher the Magnificent

New submission from Christopher the Magnificent:

This is really short, you should spot the inconsistency in the result of the 
same function call fairly easily.

Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class Thing:
... def method(self):
... print(__class__)
... 
>>> x = Thing.method.__closure__[0]
>>> dir(x)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: object does not provide __dir__
>>> type(x).__dir__(x)
['__gt__', '__eq__', '__setattr__', '__doc__', '__sizeof__', '__str__', 
'__init__', '__repr__', 'cell_contents', '__dir__', '__ge__', '__class__', 
'__new__', '__ne__', '__subclasshook__', '__hash__', '__lt__', '__reduce__', 
'__le__', '__getattribute__', '__format__', '__reduce_ex__', '__delattr__']
>>> dir(x)
['__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', 
'__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', 
'__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', 
'__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'cell_contents']
>>>

--
components: Interpreter Core
messages: 173197
nosy: christopherthemagnificent
priority: normal
severity: normal
status: open
title: dir(closure) claims that a closure has no __dir__, only to work later 
after manually invoking __dir__ from its type
type: behavior
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



[issue16268] dir(closure) claims that a closure has no __dir__, only to work later after manually invoking __dir__ from its type

2012-10-17 Thread Kushal Das

Changes by Kushal Das :


--
nosy: +kushaldas

___
Python tracker 

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



[issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use)

2012-10-17 Thread Christopher the Magnificent

Christopher the Magnificent added the comment:

As Darren Dale pointed out, it looks like this is a (partial) documentation 
issue.  I think it's plausible that someone like me, who has used 
abstractmethod by itself, would read the docs for abstractclassmethod and not 
re-read the docs on abstract method to know that he needs to put the one 
decorator first and other other second.

Changing Python to make it indifferent to the order of classmethod and 
abstractmethod wouldn't be a bad idea if it isn't too hairy to implement, since 
it does not seem to be intuitive to me and probably others that the order of 
the decorators in this specific situation should matter.

At bare minimum, I recommend that the documentation for abstractclassmethod and 
abstractstaticmethod should be updated to indicate not merely that 
abstractmethod and either classmethod or staticmethod should be used together, 
but IN WHICH ORDER they should be used, if it is decided to preserve the 
sensitivity to ordering.

:-)

--

___
Python tracker 

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



[issue16258] test_local.TestEnUSCollection failures on Solaris 10

2012-10-17 Thread STINNER Victor

STINNER Victor added the comment:

Python 3.2 rejects characters outside the range U+-U+10 in
some operations, but not everywhere. I fixed Python 3.3 to be more
strict and always reject characters outside this range. I noticed the
Solaris issue with mbstowcs() on locale encodings different than
UTF-8: #13441. I asked if it's more important to be strict on Unicode,
or if we need to handle the wcsxfrm() issue on python-dev:
http://mail.python.org/pipermail/python-dev/2011-December/114759.html

Stefan Krah answered: "Yes, if the cause is a broken mbstowcs() that
sounds good."
http://mail.python.org/pipermail/python-dev/2011-December/114781.html

I asked for help on OpenIndiana IRC channel, but nobody had a locale
encoding different than UTF-8. I didn't have access to a Solaris box,
so I chose to skip failing tests on Solaris.

My commit 2a2d0872d993 (and 7ffe3d304487) skips many locales to
workaround this issue in test__locale.

--

___
Python tracker 

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



[issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use)

2012-10-17 Thread Andrew Svetlov

Andrew Svetlov added the comment:

After brief looking sources I figured out it can be solved by adding setters 
for __isabstractmethod__ to classmethod/staticmethod objects.
It can be done, I'll try to make a patch.

For property situation is worse: property is abstract if any of 
getter/setter/deleter is abstract.
Which object attribute should be set for setting __isabstractmethod__ for 
property?

We can make the rule: abstractmethod for classmethod/staticmethod/property 
should set descriptor as abstract, not functions behind it.

I'm not sure is it true solution but I like to try to make a patch for that.

Anyway, the patch for describing current behavior in the docs is welcome.

--
stage:  -> needs patch
versions: +Python 3.4

___
Python tracker 

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



[issue16194] imp.load_dynamic imports wrong module when called several times on a multi-module .so

2012-10-17 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue16262] srcdir != builddir builds fail, if hg is not installed

2012-10-17 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue15814] memoryview: equality-hash invariant

2012-10-17 Thread Mark Lawrence

Mark Lawrence added the comment:

The 3.3.0 docs now state "Note Hashing of memoryviews with formats other than 
‘B’, ‘b’ or ‘c’ as well as hashing of multi-dimensional memoryviews is possible 
in version 3.3.0, but will raise an error in 3.3.1 in order to be compatible 
with the new memoryview equality definition."  I assume 3.3.1 should read 3.4, 
or have I missed something?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue16268] dir(closure) claims that a closure has no __dir__, only to work later after manually invoking __dir__ from its type

2012-10-17 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
nosy: +Arfrever

___
Python tracker 

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



[issue13301] the script Tools/i18n/msgfmt.py allows arbitrary code execution via po files

2012-10-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch does not unquote strings ("spam\n" is interpreted as r"spam\n") and 
allows invalid entry such as "\\" or boo.

--
nosy: +serhiy.storchaka
stage: patch review -> needs patch
versions: +Python 3.4

___
Python tracker 

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



[issue15814] memoryview: equality-hash invariant

2012-10-17 Thread Martin v . Löwis

Martin v. Löwis added the comment:

3.3.1 is correct, you apparently missed msg169425.

--

___
Python tracker 

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



[issue12759] "(?P=)" input for Tools/scripts/redemo.py raises unnhandled exception

2012-10-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> My only question is, the exception we raise now says, there invalid 
>characters in the group name, whether in our case the group name is just empty.

Good point. It would be better if you move the test outside isname() function 
and immediately raise an error with an appropriate message.

--
nosy: +serhiy.storchaka
stage: patch review -> needs patch

___
Python tracker 

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



[issue16166] Add PY_BYTE_ORDER macro to get endianess of platform

2012-10-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I would prefer if you yanked PY_LITTLE_ENDIAN_FLAG. We don't need two different 
ways to do it.

--

___
Python tracker 

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



[issue16203] Proposal: add re.fullmatch() method

2012-10-17 Thread Antoine Pitrou

Antoine Pitrou added the comment:

FWIW, I prefer "fullmatch" as well :)

--

___
Python tracker 

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



[issue14900] cProfile does not take its result headers as sort arguments

2012-10-17 Thread Andrew Svetlov

Andrew Svetlov added the comment:

I'm waiting for your patch.
Thanks.

--

___
Python tracker 

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



[issue16269] multiprocessing.Queue uses select()

2012-10-17 Thread William Edwards

New submission from William Edwards:

If you have 1024 file descriptors already open, the file descriptors created 
internally in multiprocessing.Queue will be beyond 1024 and the select() call 
buried deep in the Queue will throw an exception.

In fact, all uses of select() in the Python libs should be use poll() where 
available instead, obviously.

--
components: IO
messages: 173208
nosy: William.Edwards
priority: normal
severity: normal
status: open
title: multiprocessing.Queue uses select()
type: behavior
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



[issue16270] ftplib hangs when closing connection

2012-10-17 Thread Ugra Dániel

New submission from Ugra Dániel:

With version 3.3 (64 bit on Arch Linux) Python now hangs when closing FTP 
connection on some sites:

url = "ftp://ftp.fu-berlin.de/pub/misc/movies/database/ratings.list.gz";

with urllib.request.urlopen( url ):
pass

--
components: Library (Lib)
messages: 173209
nosy: daniel.ugra
priority: normal
severity: normal
status: open
title: ftplib hangs when closing connection
type: behavior
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



[issue16166] Add PY_BYTE_ORDER macro to get endianess of platform

2012-10-17 Thread Christian Heimes

Christian Heimes added the comment:

I've replaced the macros with PY_BIG_ENDIAN or PY_LITTLE_ENDIAN. Both are 
always defined and exactly one is set to 1, the other to 0.

--
Added file: http://bugs.python.org/file27603/endian2.patch

___
Python tracker 

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



[issue16270] ftplib hangs when closing connection

2012-10-17 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
keywords: +3.3regression
nosy: +giampaolo.rodola, orsenthil
versions: +Python 3.4

___
Python tracker 

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



  1   2   >