[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-10-20 Thread Pedro Meirelles

Pedro Meirelles added the comment:

Thank you very much, Ned!

It worked, awesome!

All the best

2012/10/20 Ned Deily 

>
> Ned Deily added the comment:
>
> Pedro, try installing the older ActiveTcl 8.5.11.1 from here:
>
> http://downloads.activestate.com/ActiveTcl/releases/8.5.11.1/
>
> It is not perfect but does not have the Preferences regression and does
> have fixes for crashes when typing composite input characters.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-10-20 Thread Ned Deily

Ned Deily added the comment:

Pedro, try installing the older ActiveTcl 8.5.11.1 from here:
 
http://downloads.activestate.com/ActiveTcl/releases/8.5.11.1/

It is not perfect but does not have the Preferences regression and does have 
fixes for crashes when typing composite input characters.

--

___
Python tracker 

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



[issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1

2012-10-20 Thread Pedro Meirelles

Pedro Meirelles added the comment:

Hello,

I am biologist I am just starting to learn Python.

I have a mac and I am using OS X 10.8.2. I have installed Python 2.7.3 and when 
I try to copy and paste (use command) or go to preferences IDLE crashes. I did 
what Ned Deily said in msg169739:

sudo mv /Library/Frameworks/Tk.framework /Library/Frameworks/Tk_disabled

It worked. Now I can copy and paste in IDLE. But when I type quots (" or ') it 
crashes. 

What you think I can do to work in IDLE using both command and typing " and '?

Sorry if my question is too elementary.

I appreciate a lot all the comments and answers. It is very useful and 
enlightening.

Kind regards

--
nosy: +pedrommeirelles

___
Python tracker 

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



[issue15392] Create a unittest framework for IDLE

2012-10-20 Thread Todd Rovito

Changes by Todd Rovito :


--
nosy: +Todd.Rovito

___
Python tracker 

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



[issue15869] IDLE: Include .desktop file and icon

2012-10-20 Thread Todd Rovito

Changes by Todd Rovito :


--
nosy: +Todd.Rovito

___
Python tracker 

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



[issue15522] improve 27 percent performance on stringpbject.c (by prefetch and loop optimization)

2012-10-20 Thread Ramchandra Apte

Changes by Ramchandra Apte :


--
status: pending -> open
title: impove 27 percent performance on stringpbject.c( by prefetch and loop 
optimization) -> improve 27 percent performance on stringpbject.c (by prefetch 
and loop optimization)

___
Python tracker 

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



[issue16042] smtplib: unlimited readline() from connection

2012-10-20 Thread R. David Murray

Changes by R. David Murray :


--
components: +email

___
Python tracker 

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



[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-10-20 Thread Nick Coghlan

Nick Coghlan added the comment:

No worries. If you could do a fresh build of the 2.7 branch and confirm this 
fix works for you, that would be great.

--

___
Python tracker 

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



[issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite

2012-10-20 Thread Kevin Chen

Kevin Chen added the comment:

Hi Nick,

Thank you so much for rolling out this change. I think your implementation of 
the fix is more elegant. I have learned a few things from you.

I would love to keep helping to test/fix bugs for Python on Windows. Please 
contact me if there is anything you would like me to take a look at. 

There will be many Windows users who will feel very grateful for this change 
you have implemented. This will actually give many the chance to upgrade to the 
latest 2.7 when it is released.

--

___
Python tracker 

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



[issue1207589] IDLE: Right Click Context Menu

2012-10-20 Thread Todd Rovito

Todd Rovito added the comment:

Same patch as before but updated the documentation and help.txt file for IDLE.  
This is for Python 3.4.

--
Added file: 
http://bugs.python.org/file27645/RightClickContextMenuUpdatedWithDocs3point4.patch

___
Python tracker 

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



[issue1207589] IDLE: Right Click Context Menu

2012-10-20 Thread Todd Rovito

Todd Rovito added the comment:

Same patch as before but updated the documentation and help.txt file for IDLE.  
This is for Python 2.7.

--
Added file: 
http://bugs.python.org/file27644/RightClickContextMenuUpdatedWithDocs2point7.patch

___
Python tracker 

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



[issue1207589] IDLE: Right Click Context Menu

2012-10-20 Thread Todd Rovito

Changes by Todd Rovito :


Removed file: 
http://bugs.python.org/file27616/RightClickContextMenuUpdatedFor2point7.patch

___
Python tracker 

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



[issue1207589] IDLE: Right Click Context Menu

2012-10-20 Thread Todd Rovito

Changes by Todd Rovito :


Removed file: 
http://bugs.python.org/file27615/RightClickContextMenuUpdatedFor3point4.patch

___
Python tracker 

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



[issue14255] tempfile.gettempdir() didn't return the path with correct case.

2012-10-20 Thread Jeff McNeil

Jeff McNeil added the comment:

Yeah clearly the wrong behavior on Winders.

I think that moving to 'normpath' instead of 'normcase' is likely the right 
thing to do. Patch is attached, so if someone with commit powers could review 
real quick I'll address whatever needs to be addressed.

IMHO, the 'normcase' calls are of questionable benefit since the posix call is 
simply an identity and as this bug details, it isn't necessarily the right 
behavior on Win.

--

___
Python tracker 

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



[issue16293] curses.ungetch raises OverflowError when given -1

2012-10-20 Thread Julian Berman

New submission from Julian Berman:

The following code now raises an OverflowError on 3.3:

import curses

def test_screen(screen):
screen.nodelay(True)
key = screen.getch()
screen.nodelay(False)
curses.ungetch(key)

curses.wrapper(test_screen)

or equivalently just

def test_screen(screen):
curses.ungetch(-1)

--
components: Library (Lib)
messages: 173425
nosy: Julian, haypo
priority: normal
severity: normal
status: open
title: curses.ungetch raises OverflowError when given -1
versions: Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue16292] Cross compilation fixes (general)

2012-10-20 Thread Ray Donnelly

Changes by Ray Donnelly :


--
nosy: +ned.deily

___
Python tracker 

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



[issue16291] Fix some general cross compile issues and some darwin specific ones. Tested with build=linux, host=darwin

2012-10-20 Thread Ray Donnelly

Ray Donnelly added the comment:

> It seems to me that such an animal would be fragile and incomplete at best.

There's no reason for it to be either fragile or incomplete. My cross builds 
have a goal of being comprehensive.

> Python builds on OS X normally require certain OS X frameworks outside of 
> those included with the compiler.

If the user supplies the Apple Mac OS X SDK then the frameworks are correctly 
detected and used. To enable this, I use a set of wrapper scripts to enable 
this, here's the contents of x86_64-apple-darwin11-gcc:

#!/bin/sh
# Auto-generated, do not edit
/home/ray/darwin-cross/apple-osx/bin/i686-apple-darwin11-gcc -isysroot 
/home/ray/darwin-cross/MacOSX10.7.sdk -mmacosx-version-min=10.5 
-DMAXOSX_DEPLOYEMENT_TARGET=10.5 -m64 "$@"

> Why would we want to officially support this particular variant of cross 
> building on another platform?

There's 3 separate issues merged into this patch, general cross compilation 
fixes, the new darwin cross compilation feature and a few darwin warning fixes 
(that apply equally to cross and native). I shouldn't have done that, and am in 
the process of splitting this issue up so that each part can be judged in 
isolation. Please see the new issue I've made for the general cross compilation 
issues: http://bugs.python.org/issue16292
..later I'll work on a new patch for this issue.

--

___
Python tracker 

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



[issue16292] Cross compilation fixes (general)

2012-10-20 Thread Ray Donnelly

New submission from Ray Donnelly:

This patch fixes 2 cross compilation bugs and improves a comment.

--
components: Cross-Build
files: 0005-cross-fixes.patch
keywords: patch
messages: 173423
nosy: Ray.Donnelly, doko
priority: normal
severity: normal
status: open
title: Cross compilation fixes (general)
type: compile error
versions: Python 3.4
Added file: http://bugs.python.org/file27643/0005-cross-fixes.patch

___
Python tracker 

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



[issue16291] Fix some general cross compile issues and some darwin specific ones. Tested with build=linux, host=darwin

2012-10-20 Thread Ned Deily

Ned Deily added the comment:

I'm curious as to what value there would be in adding support for cross 
building an OS X variant of Python on Linux.  It seems to me that such an 
animal would be fragile and incomplete at best. For example, normal Python 
builds on OS X normally require certain OS X frameworks outside of those 
included with the compiler.  It's difficult enough to support native builds on 
a wide range of OS X releases and hardware configurations.  Why would we want 
to officially support this particular variant of cross building on another 
platform?

--
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue10182] match_start truncates large values

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue10182] match_start truncates large values

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I analyzed all 1-valued usages of Py_BuildValue and found similar bags only in 
Modules/_sre.h. Here is a patch.

Bugs should be evident on big-endian platform with sizeof(int) < sizeof(size_t) 
or sizeof(long) < sizeof(size_t). Standard tests should fail on such platforms.

--
keywords: +patch
versions: +Python 3.4
Added file: http://bugs.python.org/file27642/buildvalue_overflow.patch

___
Python tracker 

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



[issue16291] Fix some general cross compile issues and some darwin specific ones. Tested with build=linux, host=darwin

2012-10-20 Thread Ray Donnelly

New submission from Ray Donnelly:

I've fixed up the very few missing configure bits and one issue with 
PYTHON_FOR_BUILD using srcdir instead of builddir. I also rolled in a simple 
warning fix that I ran into (the #ifdef HAVE_CHROOT added to posixmodule.c)

configured with:
$srcdir/configure --prefix=$PWD/install/darwin-x86_64/python-3.4.x 
--build=x86_64-linux-gnu --host=x86_64-apple-darwin11

using these compilers:
http://mingw-and-ndk.googlecode.com/files/multiarch-darwin11-cctools127.2-gcc42-5666.3-llvmgcc42-2336.1-Linux-120724.tar.xz

and MacOSX10.7.sdk,

I can successfully build Python for Mac OS X on Linux.

--
components: Cross-Build
files: 0010-DARWIN-CROSS.patch
keywords: patch
messages: 173420
nosy: Ray.Donnelly, doko
priority: normal
severity: normal
status: open
title: Fix some general cross compile issues and some darwin specific ones. 
Tested with build=linux, host=darwin
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file27641/0010-DARWIN-CROSS.patch

___
Python tracker 

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



[issue15772] Unresolved symbols in Windows 64-bit python

2012-10-20 Thread Silverback Networks

Changes by Silverback Networks :


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



[issue15772] Unresolved symbols in Windows 64-bit python

2012-10-20 Thread Silverback Networks

Silverback Networks added the comment:

Same errors in 3.3. Some names are decorated, some aren't, seemingly at random.

For instance, python32.lib contains:

35B20 _PyObject_Dump
35B20 __imp__PyObject_Dump

and just below that,

2924A PyObject_Free
2924A __imp_PyObject_Free

But the Visual Studio 2010 compiler always looks for the underscored names for 
x64, resulting in, for instance:

  error LNK2019: unresolved external symbol __imp__PyObject_Free referenced in 
function _WRdealloc

I understand that the x64 isn't supposed to use underscore prefixes as all, but 
it is and Python partially is. I have no idea why.

The preprocessed output of including python.h, btw, is:

__declspec(dllimport) void PyObject_Free(void *);

--
nosy: +silverbacknet

___
Python tracker 

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



[issue12805] Optimizations for bytes.join() et. al

2012-10-20 Thread John O'Connor

John O'Connor added the comment:

I think that's a good compromise and much better than what I had originally.

- John

--

___
Python tracker 

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



[issue12805] Optimizations for bytes.join() et. al

2012-10-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I have committed the simple optimization patch, thank you!

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



[issue12805] Optimizations for bytes.join() et. al

2012-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bfa715f98c0f by Antoine Pitrou in branch 'default':
Issue #12805: Make bytes.join and bytearray.join faster when the separator is 
empty.
http://hg.python.org/cpython/rev/bfa715f98c0f

--
nosy: +python-dev

___
Python tracker 

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



[issue16289] Update devguide for 3.4

2012-10-20 Thread Ned Deily

Ned Deily added the comment:

Antoine, I think if possible it is best to always have the devguide reflect the 
current process.  Once 3.2 moves to security mode, it is a trivial process to 
update devguide again (no release involved!).

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



[issue16289] Update devguide for 3.4

2012-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2f682e133960 by Ned Deily in branch 'default':
Issue #16289: Update Developer's Guide for the 3.4 development cycle.
http://hg.python.org/devguide/rev/2f682e133960

--
nosy: +python-dev

___
Python tracker 

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



[issue16013] small csv reader bug

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> fixed
stage: test needed -> 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



[issue16042] smtplib: unlimited readline() from connection

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I understand you, it's a patch against 2.7.

>+def readline(self, size=-1):

In io.IOBase.readline() and in io.TextIOBase.readline() this parameter named 
"limit".

>+if size is not None and len(str) == size:
>+break

It can be moved to the while condition:

 while chr != b"\n" and (size is None or len(str) < size):

--

___
Python tracker 

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



[issue10405] IDLE breakpoint facility undocumented

2012-10-20 Thread Ned Deily

Ned Deily added the comment:

Thanks for your suggestions, Nick and Todd.  While reviewing them, I realized 
that there is also a small context (right-click) menu for the IDLE shell window 
as well.  I expanded the doc changes to include it and included several other 
minor doc updates.  I also updated the builtin IDLE Help file.

By the way, if you haven't already and wish to contribute patches, please be 
sure to sign a PSF contributor agreement (http://www.python.org/psf/contrib/).

--
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type: enhancement -> 
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



[issue10405] IDLE breakpoint facility undocumented

2012-10-20 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c0a423ce4b96 by Ned Deily in branch '2.7':
Issue #10405: Document IDLE context menus in Standard Library document
http://hg.python.org/cpython/rev/c0a423ce4b96

New changeset 566b7574becb by Ned Deily in branch '3.2':
Issue #10405: Document IDLE context menus in Standard Library document
http://hg.python.org/cpython/rev/566b7574becb

New changeset 85c4d21f7454 by Ned Deily in branch '3.3':
Issue #10405: merge from 3.2
http://hg.python.org/cpython/rev/85c4d21f7454

New changeset ea7849650fd1 by Ned Deily in branch 'default':
Issue #10405: merge from 3.3
http://hg.python.org/cpython/rev/ea7849650fd1

--
nosy: +python-dev

___
Python tracker 

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



[issue16278] os.rename documentation slightly inaccurate

2012-10-20 Thread Todd Rovito

Todd Rovito added the comment:

David,
   Thanks for your bug report. Indeed os.rename does not exhibit the same 
behavior as the documentation describes. 

For Python 3.4 here is the fix I came up with:
"Rename the file or directory src to dst. If dst is a directory that is not 
empty, OSError will be raised. On Unix, if dst exists and is a file, it will be 
replaced silently if the user has permission and src is a file. On Unix, if src 
is a directory and dst is a file NotADirectoryError will be raised. The 
operation may fail on some Unix flavors if src and dst are on different 
filesystems. If successful, the renaming will be an atomic operation (this is a 
POSIX requirement). On Windows, if dst already exists, OSError will be raised 
even if it is a file."

I have attached a Python 3.4 patch for consideration.  This might not be the 
best phrasing so please feel free to offer alternatives.

--
keywords: +patch
Added file: http://bugs.python.org/file27640/OSRenameTest3point4.patch

___
Python tracker 

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



[issue14625] Faster utf-32 decoder

2012-10-20 Thread Georg Brandl

Georg Brandl added the comment:

That the new code is smaller is no guarantee that it's as correct :)

That is exactly the reason we don't put optimizations in bugfix releases.

--

___
Python tracker 

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



[issue1598083] Top-level exception handler writes to stdout unsafely

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy:  -serhiy.storchaka

___
Python tracker 

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



[issue1598083] Top-level exception handler writes to stdout unsafely

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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

___
Python tracker 

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



[issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16)

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +needs review
stage: test needed -> 
versions: +Python 3.4 -Python 3.1

___
Python tracker 

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



[issue15186] Support os.walk(dir_fd=)

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: open -> pending

___
Python tracker 

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



[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It was too complicated code. Actually patched code is smaller.

 1 file changed, 71 insertions(+), 80 deletions(-)

UTF-16 codec was modified in some way.

--

___
Python tracker 

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



[issue14625] Faster utf-32 decoder

2012-10-20 Thread Georg Brandl

Georg Brandl added the comment:

Very simple? You're changing most of the code there.

--

___
Python tracker 

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



[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +georg.brandl

___
Python tracker 

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



[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I suggest apply patch A to 3.3 as it fixes performance regression (2x) and is 
very simple.

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



[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +3.3regression
Added file: http://bugs.python.org/file27639/decode_utf32_b_3.patch

___
Python tracker 

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



[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patches updated to 3.4.

--
keywords: +needs review
versions: +Python 3.4 -Python 3.3
Added file: http://bugs.python.org/file27638/decode_utf32_a_3.patch

___
Python tracker 

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



[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file25538/decode_utf32_b_2.patch

___
Python tracker 

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



[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file25537/decode_utf32_a_2.patch

___
Python tracker 

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



[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file25279/decode_utf32_b.patch

___
Python tracker 

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



[issue14625] Faster utf-32 decoder

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file25278/decode_utf32_a.patch

___
Python tracker 

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



[issue15027] Faster UTF-32 encoding

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch updated to 3.4.

Is anyone interested in 7x speedup of UTF-32 encoder?

--
keywords: +needs review
versions: +Python 3.4 -Python 3.3
Added file: http://bugs.python.org/file27637/encode_utf32_2.patch

___
Python tracker 

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



[issue15027] Faster UTF-32 encoding

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file25857/encode-utf32.patch

___
Python tracker 

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



[issue12805] Optimizations for bytes.join() et. al

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file27636/bytes_join_optimization_3.patch

___
Python tracker 

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



[issue12805] Optimizations for bytes.join() et. al

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Indeed, 1-char separator is more common for strings, but I found several 
b'\n'.join or b','.join even in stdlib. 3 lines of difference are only 2.3% of 
Objects/stringlib/join.h.

Here is a patch with dropped the 1-byte separator case.

--

___
Python tracker 

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



[issue12805] Optimizations for bytes.join() et. al

2012-10-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, here are the benchmark results here with a 1-byte separator:

  10 x 10   0.244 usec   0.202 usec   +21%
 100 x 10   0.325 usec   0.326 usec-0%
1000 x 10   0.691 usec   0.689 usec+0%
  10 x 1000  18.2 usec14.2 usec   +28%
 100 x 1000  39.8 usec40.6 usec-2%
1000 x 1000  94.6 usec  96 usec-1%

and with an empty separator:

  10 x 10   0.245 usec   0.198 usec   +24%
 100 x 10   0.335 usec   0.286 usec   +17%
1000 x 10   0.637 usec   0.593 usec+7%
  10 x 1000  18.9 usec14.1 usec   +34%
 100 x 1000  40.3 usec36.2 usec   +11%
1000 x 1000  93.7 usec96.9 usec-3%

(Core i5 2500K, 64-bit, gcc)

I would say the empty separator case is interesting, because a common use case 
for bytes.join() is indeed fast concatenation. However, the 1-byte separator 
case could be dropped, which would simplify the patch and the heuristic.

--

___
Python tracker 

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



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Hynek Schlawack

Hynek Schlawack added the comment:

> To be honest I don't really understand the point of the ignore_errors flag on 
> rmtree. If rmtree fails to delete the directory tree (which will happen if 
> one of the files can't be deleted), why would you want it to return 
> succesfully?

I presume it’s meant as a best-effort cleanup.

Regardless both Eric & Serhiy are right: it’s a programmer error to call it on 
files and it may shadow bugs catching it. OTOH the implementation is 
inconsistent and not backward compatible now, so we have to fix it 
unfortunately.

The patch needs to address Giampaolo’s (bug tracker) & Serhiy’s (Rietveld) 
comments before it can be merged though – thanks. :)

--

___
Python tracker 

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



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> If rmtree fails to delete the directory tree (which will happen if one of the 
> files can't be deleted), why would you want it to return succesfully?

At least it free some disk space. ;-)

--

___
Python tracker 

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



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Now shutil.rmtree has different behavior when called for non-directory on 
systems with and without at-functions.

--

___
Python tracker 

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



[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: open -> pending

___
Python tracker 

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



[issue12805] Optimizations for bytes.join() et. al

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Ok, but does it really make a difference and in which cases?

Up to 40% on Athlon and up to 70% on Atom.

> In other words, do you have benchmark numbers? :)

Attached results for AMD Athlon 64 X2 4600+ and Intel Atom N570 @ 1.66GHz 
under 32-bit Linux. You can run the benchmark on your machine (requires Posix-
compatible shell, sed awk).

--
Added file: http://bugs.python.org/file27634/bytes_join_bench.res
Added file: http://bugs.python.org/file27635/bytes_join_bench_2.res

___
Python tracker 

___   0 x 30.313 usec0.34 usec-8%
   1 x 30.311 usec   0.307 usec+1%
   2 x 30.322 usec 0.3 usec+7%
   5 x 30.322 usec0.31 usec+4%
  10 x 30.319 usec   0.345 usec-8%
  20 x 3 0.32 usec   0.323 usec-1%
  50 x 30.356 usec   0.355 usec+0%
 100 x 30.358 usec   0.364 usec-2%
1000 x 30.908 usec   0.899 usec+1%
   0 x 10   0.623 usec   0.529 usec   +18%
   1 x 100.61 usec   0.543 usec   +12%
   2 x 10   0.651 usec   0.532 usec   +22%
   5 x 10   0.655 usec   0.591 usec   +11%
  10 x 10   0.683 usec   0.584 usec   +17%
  20 x 10   0.681 usec   0.615 usec   +11%
  50 x 10   0.825 usec   0.878 usec-6%
 100 x 10   0.861 usec   0.888 usec-3%
1000 x 102.37 usec2.27 usec+4%
   0 x 100   4.55 usec3.41 usec   +33%
   1 x 100   4.39 usec3.56 usec   +23%
   2 x 100   4.83 usec3.33 usec   +45%
   5 x 100   4.98 usec3.76 usec   +32%
  10 x 100   5.17 usec3.98 usec   +30%
  20 x 100   5.11 usec4.28 usec   +19%
  50 x 100   5.99 usec6.45 usec-7%
 100 x 100   6.81 usec6.46 usec+5%
1000 x 100   40.8 usec40.8 usec+0%
   0 x 1000  43.3 usec30.6 usec   +42%
   1 x 1000  41.9 usec37.8 usec   +11%
   2 x 100046 usec35.7 usec   +29%
   5 x 1000  46.1 usec35.9 usec   +28%
  10 x 1000  49.9 usec36.2 usec   +38%
  20 x 1000  49.4 usec45.8 usec+8%
  50 x 1000  96.3 usec95.7 usec+1%
 100 x 1000   125 usec 126 usec-1%
1000 x 1000  1.74 msec1.74 msec+0%
   0 x 1  565 usec 458 usec   +23%
   1 x 1  573 usec 473 usec   +21%
   2 x 1  635 usec 454 usec   +40%
   5 x 1  609 usec 504 usec   +21%
  10 x 1  693 usec 597 usec   +16%
  20 x 1  718 usec 682 usec+5%
  50 x 1 2.53 msec2.51 msec+1%
 100 x 1 3.56 msec3.52 msec+1%
1000 x 1 16.7 msec  17 msec-2%
   0 x 3 1.01 usec   0.935 usec+8%
   1 x 30.993 usec   0.936 usec+6%
   2 x 30.991 usec0.93 usec+7%
   5 x 30.991 usec   0.941 usec+5%
  10 x 30.991 usec   0.936 usec+6%
  20 x 3 1.03 usec   0.974 usec+6%
  50 x 3 1.19 usec1.14 usec+4%
 100 x 3 1.15 usec1.17 usec-2%
1000 x 3 1.85 usec1.89 usec-2%
   0 x 101.56 usec1.47 usec+6%
   1 x 101.56 usec1.42 usec   +10%
   2 x 101.64 usec1.48 usec   +11%
   5 x 101.77 usec1.53 usec   +16%
  10 x 101.78 usec1.48 usec   +20%
  20 x 101.95 usec1.55 usec   +26%
  50 x 102.65 usec2.64 usec+0%
 100 x 102.71 usec2.73 usec-1%
1000 x 105.12 usec4.87 usec+5%
   0 x 100   12.1 usec7.49 usec   +62%
   1 x 100   9.88 usec7.67 usec   +29%
   2 x 100   12.8 usec7.64 usec   +68%
   5 x 100   12.8 usec8.22 usec   +56%
  10 x 100   12.8 usec8.39 usec   +53%
  20 x 100   14.2 usec8.92 usec   +59%
  50 x 100   16.3 usec  16 usec+2%
 100 x 100   19.7 usec19.6 usec+1%
1000 x 100   47.6 usec47.1 usec+1%
   0 x 1000   125 usec73.3 usec   +71%
   1 x 1000  98.2 usec75.3 usec   +30%
   2 x 1000   126 usec75.9 usec   +66%
   5 x 1000   113 usec78.8 usec   +43%
  10 x 1000   124 usec80.7 usec   +54%
  20 x 1000   137 usec86.3 usec   +59%
  50 x 1000   173 usec 175 usec-1%
 100 x 1000   256 usec 249 usec+3%
1000 x 1000  2.07 msec2.05 msec+1%
   0 x 1 1.29 msec 769 usec  -100%
   1 x 1 1.01 msec 792 usec  -100%
   2 x 1 1.15 msec 802 usec  -100%
   5 x 1 1.34 msec 834 usec  -100%
  10 x 1 1.34 msec 887 usec  -100%
  20 x 1 1.42 msec 996 usec  -100%
  50 x 1 3.53 msec3.57 msec-1%
 100 x 1  4.5 msec4.51 msec-0%
1000 x 1 21.5 msec21.2 msec+1%
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python

[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

To be honest I don't really understand the point of the ignore_errors flag on 
rmtree. If rmtree fails to delete the directory tree (which will happen if one 
of the files can't be deleted), why would you want it to return succesfully?

--
nosy: +hynek

___
Python tracker 

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



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Éric Araujo

Éric Araujo added the comment:

NotADirectoryError not being caught makes sense to me: not passing a directory 
as argument to rmtree is a programmer error, not something coming from the OS 
or filesystem.

--
nosy: +eric.araujo, pitrou

___
Python tracker 

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



[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2012-10-20 Thread Éric Araujo

Éric Araujo added the comment:

http://docs.python.org/reference/datamodel.html#special-method-lookup-for-new-style-classes

--
nosy: +eric.araujo

___
Python tracker 

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



[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2012-10-20 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> So the relevant code is this:
> def getDescription(self, test):
> ...
> 43 return str(test)
> ...
> What I'd like is to have this be something like:
> 44 return test.id()

> Or anther way this could be done would be to make TestCase.__str__ call 
> self.id()

Note that str(test) and test.id() don't return the same value.  The former is 
the "friendly" name.  It is probably intentional that TextTestResult uses the 
TestCase instance's friendly name in its getDescription() method as opposed to 
the id.

> TextTestRunner calls str(TestCase) directly, which makes it hard for 
> testscenarios to rename the test cases as it parameterises them

What about testscenarios subclassing the TestCase instances as it parametrizes 
them?

class ScenariosTestCase(case.__class__):
def __str__(self):
return "testscenarios test name..."
case.__class__ = ScenariosTestCase
print(str(case))

>From the documentation, it looks like testscenarios creates new test objects 
>from the originals anyways.  Alternatively (although I don't if testscenarios 
>can control what test runner is being used), TextTestRunner could be 
>subclassed with its own getDescription() method.

--

___
Python tracker 

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



[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2012-10-20 Thread R. David Murray

R. David Murray added the comment:

The special handling of special methods is baked into the attribute lookup 
machinery.  The discussion of this is in the language reference somewhere, as 
is the explanation of what descriptors are and how they work.

--
type:  -> enhancement

___
Python tracker 

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



[issue16289] Update devguide for 3.4

2012-10-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

It doesn't sound very useful to mention both 3.2 and 3.3, since 3.2 maintenance 
will soon stop.

--
nosy: +pitrou

___
Python tracker 

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



[issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions.

2012-10-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Sounds fine to me. You might want to make the test CPython-specific.

--
nosy: +pitrou

___
Python tracker 

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



[issue16288] TextTestResult uses TestCase.__str__() which isn't customisable (vs id() or shortDescription())

2012-10-20 Thread Mike Hoy

Changes by Mike Hoy :


--
nosy: +mikehoy

___
Python tracker 

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



[issue16290] PyComplex_AsCComplex should allow __complex__ to return float.

2012-10-20 Thread Mark Dickinson

Mark Dickinson added the comment:

> This means that you should add a branch for integers too.

I'd rather not go that far, at least in this issue:  we'd also end up changing 
__float__ to allow it to return an int, in that case.  If we're considering 
that, the discussion should go back to python-dev / python-ideas.

One difference is that int -> float is a lossy conversion that has to care 
about details like rounding and overflow.  float -> complex in contrast is much 
simpler.

--

___
Python tracker 

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



[issue2350] 'exceptions' import fixer

2012-10-20 Thread Chris Mayo

Changes by Chris Mayo :


--
nosy: +cjmayo

___
Python tracker 

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



[issue16290] PyComplex_AsCComplex should allow __complex__ to return float.

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> My interpretation of that is that __int__ should return an int, __float__ a
> float, __complex__ a complex number; 

It's a reasonable interpretation. Changing it can be confusing.

On the other hand, int and float look like specialized subclasses of complex 
(they even have .real, .imag and .conjugate()). The ducktype principle 
requires that we can use ints or floats everywhere where complexes needed. This 
means that you should add a branch for integers too.

--

___
Python tracker 

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



[issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions.

2012-10-20 Thread Mark Dickinson

Changes by Mark Dickinson :


--
nosy: +jnoller, sbt

___
Python tracker 

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



[issue16284] concurrent.futures ThreadPoolExecutor keeps unnecessary references to worker functions.

2012-10-20 Thread Mark Dickinson

Mark Dickinson added the comment:

A new patch (with tests), and a fuller explanation:

At work, we've got Python talking to a customer's existing COM library; we're 
using Thomas Heller's 'comtypes' library to do that.  Unfortunately, comtypes 
depends quite a lot on __del__-time cleanup, so reference counting matters.  
(I'm well aware that this isn't the recommended way to deal with resource 
cleanup in Python, but rewriting the existing infrastructure isn't a realistic 
option here.)

Anyway, it turned out that the concurrent.futures executors were indirectly 
holding onto references to COM objects, causing issues with our application.

The attached patch adds a few 'del' statements to remove references that are no 
longer needed.  For the ProcessExecutor, some of those 'del' statements had to 
go into the multiprocessing.Queue implementation.

The troublesome pattern (in both multiprocessing and futures) takes the form 
(simplified):


def my_worker_function(...):
...
while :
obj = blocking_wait_for_next_item()
do_processing(obj)
...

The issue is that the reference to obj is kept until the completion of the next 
blocking wait call.  I'm suggesting just adding an extra 'del obj' after 
'do_processing(obj)'.

--
components: +Library (Lib)
Added file: http://bugs.python.org/file27633/kill_reference_2.diff

___
Python tracker 

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



[issue5128] compileall: consider ctime

2012-10-20 Thread Djoume Salvetti

Djoume Salvetti added the comment:

This patch introduces a slight change in behaviour.

Now compilation will only happen if there is a difference in the number of 
seconds in the timestamp of files, before this patch any difference in mtime 
will trigger a rebuild. This is because the timestamp in the pyc file is an 
integer number of seconds, while mtime from stat is a float time.

--
nosy: +djoume

___
Python tracker 

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



[issue16290] PyComplex_AsCComplex should allow __complex__ to return float.

2012-10-20 Thread Mark Dickinson

Mark Dickinson added the comment:

> Is there a new feature, not a bugfix?

There's an ongoing argument about that on the python-dev thread. :-)  But yes, 
I think this needs a doc update---even if it's considered a bugfix, the current 
docs could be clarified.

http://docs.python.org/dev/reference/datamodel.html?highlight=__complex__#object.__complex__

says

"Should return a value of the appropriate type."  My interpretation of that is 
that __int__ should return an int, __float__ a float, __complex__ a complex 
number;  with this change, that interpretation no longer works.

I'll update the patch (and add a Misc/NEWS entry, too).

Thanks!

--

___
Python tracker 

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



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

+self.assertEqual(shutil.rmtree(os.path.join(tmpdir, "tstfile"), 
+   ignore_errors=True), None)

I wouldn't use assertEqual as the return value is not meaningful.

--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue16290] PyComplex_AsCComplex should allow __complex__ to return float.

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Patch LGTM.

Is there a new feature, not a bugfix? If yes, then I expect some documentation 
changes.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file27632/long_aslong_overflow_tests.patch

___
Python tracker 

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



[issue15989] Possible integer overflow of PyLong_AsLong() results

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a tests for most of fixed overflows. Some errors are difficult or 
impossible to reproduce.

--

___
Python tracker 

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



[issue16218] Python launcher does not support non ascii characters

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Where we have tests for Python launch? I can't find. runpy is not affected.

--

___
Python tracker 

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



[issue16289] Update devguide for 3.4

2012-10-20 Thread Ezio Melotti

Ezio Melotti added the comment:

LGTM

--
type:  -> enhancement

___
Python tracker 

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



[issue16218] Python launcher does not support non ascii characters

2012-10-20 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> test needed
type: crash -> behavior

___
Python tracker 

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



[issue16290] PyComplex_AsCComplex should allow __complex__ to return float.

2012-10-20 Thread Mark Dickinson

Mark Dickinson added the comment:

Here's a patch

--
keywords: +patch
Added file: http://bugs.python.org/file27631/issue16290.patch

___
Python tracker 

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



[issue16290] PyComplex_AsCComplex should allow __complex__ to return float.

2012-10-20 Thread Mark Dickinson

New submission from Mark Dickinson:

See thread starting at 
http://mail.python.org/pipermail/python-dev/2012-October/122241.html

The cmath module functions don't accept custom types that define __complex__, 
but whose __complex__ method returns a float rather than a complex number:

Python 3.4.0a0 (default:53a7c2226a2b+, Oct 19 2012, 12:16:36) 
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class A:
... def __complex__(self): return 42.0
... 
>>> import cmath
>>> cmath.sqrt(A())
Traceback (most recent call last):
  File "", line 1, in 
TypeError: __complex__ should return a complex object

In contrast, the complex constructor is happy to accept such objects.

The root cause is that PyArg_ParseTuple's 'D' format calls PyComplex_AsCComplex 
(in Objects/complexobject.c), which refuses to accept a __complex__ result of 
type float.

--
assignee: mark.dickinson
components: Interpreter Core
messages: 173379
nosy: mark.dickinson
priority: normal
severity: normal
stage: needs patch
status: open
title: PyComplex_AsCComplex should allow __complex__ to return float.
type: enhancement
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



[issue12805] Optimizations for bytes.join() et. al

2012-10-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, but does it really make a difference and in which cases?
In other words, do you have benchmark numbers? :)

--

___
Python tracker 

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



[issue16236] Doc/Makefile should have $PYTHON=python2

2012-10-20 Thread Michele Orrù

Michele Orrù added the comment:

> The patch should not unconditionally use `python2` since many distributions 
> do not yet install a `python2` link 
> to the interpreter nor is there one when running python2.7 from a build 
> directory.  The Makefile could 
> conditionally try `python2` and then fall back to `python`.
Sorry, I did not know that some OSes could not have the `python2` symlink, I 
just watched if there was on the Makefile. 


> Yes, please don’t break many OSes for the sake of one.

Concerning this, we should do a proper configure script. Do you think that's 
worth it, E`ric?  
```
Real configure scripts are generally much more complicated than this, since 
they may deal with systems where $PATH is not delimited by colons; or systems 
where executable programs may have optional extensions like .EXE; or $PATH 
variables that have the current working directory included in them as an empty 
string; etc. 

-- http://mywiki.wooledge.org/BashFAQ/081

--

___
Python tracker 

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



[issue16218] Python launcher does not support non ascii characters

2012-10-20 Thread STINNER Victor

STINNER Victor added the comment:

The patch looks correct, but a test is missing.

--
nosy: +haypo

___
Python tracker 

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



[issue12805] Optimizations for bytes.join() et. al

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In a normal loop we copy into the output buffer for each iteration the element 
and the separator. As you know, the processor can copy large amounts of data 
several times more efficiently than byte-for-byte. Therefore, filling the 
buffer by memset more efficient than calling Py_MEMCPY on each iteration if the 
buffer size is not too large. Experimenting on different machines I found that 
Py_MEMCPY is more expensive than sequential filling up to 32 bytes (may be even 
more, but I chose a conservative estimate). And for empty separator we can just 
omit copying and filling (it saves several checks per iteration).

--
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +3.3regression

___
Python tracker 

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



[issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors

2012-10-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
components: +Library (Lib)
nosy: +larry, serhiy.storchaka
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



[issue16218] Python launcher does not support non ascii characters

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which fixes filename decoding error in 
PyRun_SimpleFileExFlags().

--
keywords: +patch
Added file: http://bugs.python.org/file27630/pythonrun_filename_decoding.patch

___
Python tracker 

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



[issue16218] Python launcher does not support non ascii characters

2012-10-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I can reproduce this on Linux (3.3+ only):

$ name=$(printf "\xff")
$ echo "print('Hello, world')" >$name
$ ./python $name
python: failed to set __main__.__loader__

The issue is in PyRun_SimpleFileExFlags() function, which gets raw char * as 
the file name (the documentation says about the filesystem encoding 
(sys.getfilesystemencoding())), but then this name decoded from UTF-8 in 
set_main_loader().

--
components: +Interpreter Core -Windows
keywords: +3.3regression
nosy: +serhiy.storchaka
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



[issue16289] Update devguide for 3.4

2012-10-20 Thread Ned Deily

New submission from Ned Deily:

The Developer's Guide needs to be updated to reflect the release of 3.3.  
Primarily, this involves adding the 3.3 branch and updating the sequence of 
branch names and other release number references.  The attached patch does so.  
It's pretty much a straightforward substitution except for noting that the 3.2 
branch remains open for bug fixes until its upcoming final maintenance release 
when it will move to security mode (the devguide should be updated again at 
that point).

--
assignee: ned.deily
components: Devguide
files: update_devguide_for_34.patch
keywords: patch
messages: 173372
nosy: benjamin.peterson, ezio.melotti, georg.brandl, larry, ned.deily
priority: normal
severity: normal
stage: patch review
status: open
title: Update devguide for 3.4
Added file: http://bugs.python.org/file27629/update_devguide_for_34.patch

___
Python tracker 

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