[issue17484] add tests for getpass

2013-04-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4059ef685754 by R David Murray in branch 'default':
#17484: add tests for getpass.
http://hg.python.org/cpython/rev/4059ef685754

--
nosy: +python-dev

___
Python tracker 

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



[issue17657] IDLE: about dialog should report the full version of TK

2013-04-07 Thread Ned Deily

Ned Deily added the comment:

LGTM

--

___
Python tracker 

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



[issue17657] IDLE: about dialog should report the full version of TK

2013-04-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

At some point, I would like us to review the whole 'about' dialog, but this 
should be done now. It even simplifies the code. I will test and apply this 
week if Roger doesn't.

--
stage: patch review -> commit review

___
Python tracker 

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



[issue17511] Idle find function closes after each find operation

2013-04-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Every other editor I can remember does 'find next'. The current closing annoys 
me. Also, I prefer wrapping around to the top when the last item is found, 
rather than having to switch to find [x]up. Windows help does this.

--

___
Python tracker 

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



[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths

2013-04-07 Thread Gregory P. Smith

Changes by Gregory P. Smith :


--
title: Python 2.7.4 Breaks ZipFile Extraction -> Python 2.7.4 breaks ZipFile 
extraction of zip files with unicode member paths
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



[issue17656] Python 2.7.4 Breaks ZipFile Extraction

2013-04-07 Thread Martin v . Löwis

Martin v. Löwis added the comment:

It appears that this is a consequence of the changes in issue 6972, in 
particular change 4d1948689ee1.

--
nosy: +Arfrever, amaury.forgeotdarc, benjamin.peterson, catalin.iacob, 
georg.brandl, gregory.p.smith, larry, loewis, ned.deily, python-dev, 
r.david.murray, schmir, serhiy.storchaka, twb

___
Python tracker 

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



[issue17615] String comparison performance regression

2013-04-07 Thread Neil Hodgson

Neil Hodgson added the comment:

The patch fixes the performance regression on Windows. The 1:1 case is better 
than either 3.2.4 or 3.3.1 downloads from python.org. Other cases are close to 
3.2.4, losing at most around 2%. Measurements from 32-bit builds:

## Download 3.2.4
3.2.4 (default, Apr  6 2013, 20:07:44) [MSC v.1500 32 bit (Intel)]
a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/z']148
[0.9251519691803254, 0.9228673224604178, 0.9270485054253375]

a=['C:/Users/Neil/Documents/λ','C:/Users/Neil/Documents/η']148
[0.9088621585998959, 0.916762355170341, 0.9102371386441703]

a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/η']148
[0.9071172334674893, 0.9079409638903551, 0.9188950414432817]

a=['C:/Users/Neil/Documents/𠀀','C:/Users/Neil/Documents/𠀁']152
[0.9154984634528134, 0.9211241439998155, 0.9235272150680487]

## Download 3.3.1
3.3.1 (v3.3.1:d9893d13c628, Apr  6 2013, 20:25:12) [MSC v.1600 32 bit (Intel)]
a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/z']84
[1.107935584141198, 1.080932736716823, 1.079060304542709]

a=['C:/Users/Neil/Documents/λ','C:/Users/Neil/Documents/η']156
[1.2201494661996297, 1.238101814896, 1.217881936863404]

a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/η']156
[1.1195841384034795, 1.1172607155695182, 1.1198056163882537]

a=['C:/Users/Neil/Documents/𠀀','C:/Users/Neil/Documents/𠀁']276
[1.2389038306958007, 1.2207520679720822, 1.2370782093260395]

## Local build of 3.3.0 before patch
3.3.0 (default, Apr  8 2013, 14:06:26) [MSC v.1600 32 bit (Intel)]
a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/z']84
[1.0824058797164942, 1.0680695468818941, 1.0685949457606005]

a=['C:/Users/Neil/Documents/λ','C:/Users/Neil/Documents/η']156
[1.2159871472901957, 1.2169558514728118, 1.209515728255596]

a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/η']156
[1.012521191492, 1.1091369450081352, 1.1049337539784823]

a=['C:/Users/Neil/Documents/𠀀','C:/Users/Neil/Documents/𠀁']276
[1.2080548119585544, 1.2094420187054578, 1.2138603997013906]

## Local build of 3.3.0 after patch
3.3.0 (default, Apr  8 2013, 14:23:45) [MSC v.1600 32 bit (Intel)]
a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/z']84
[0.8673423724763649, 0.8545937643117921, 0.8289229288053079]

a=['C:/Users/Neil/Documents/λ','C:/Users/Neil/Documents/η']156
[0.9235338524209049, 0.9305998385376584, 0.9229137839304098]

a=['C:/Users/Neil/Documents/b','C:/Users/Neil/Documents/η']156
[0.891971842253179, 0.8971224280694345, 0.9036679059885344]

a=['C:/Users/Neil/Documents/𠀀','C:/Users/Neil/Documents/𠀁']276
[0.9310441918446486, 0.9431070566588904, 0.9355432690779342]

--

___
Python tracker 

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



[issue17656] Python 2.7.4 Breaks ZipFile Extraction

2013-04-07 Thread Vhati

Vhati added the comment:

Oops, passing a unicode literal to extract()'s member arg wouldn't be 
sufficient.

The extract() method quietly converts strings to ZipInfo objects via 
getinfo(member_string). Then _extract_member() takes the filename attribute of 
that ZipInfo object, which causes problems when when THAT is unicode.

So I guess this bug only applies to archives with unicode member paths.

Attached is one such file to aid in troubleshooting.

--
Added file: http://bugs.python.org/file29728/Kestrel Cruiser.zip

___
Python tracker 

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



[issue17511] Idle find function closes after each find operation

2013-04-07 Thread Todd Rovito

Todd Rovito added the comment:

"I am in support of letting the find dialog remain open, and possibly 
relabeling the button to say "find next" instead."
+1 from me, it drives me nuts to have the dialog close every time a single 
world is found.  I like the find dialog box open then I just escape when I want 
it closed.  

In addition Sarah's patch works well on Mac OS X and Windows.  It is 
fascinating that Sarah found a way to make the high-lighting work even on 
Windows, I wonder if we could use this technique to fix the debugging problem?  
As of today I have not heard anything the TK folks since I filed that bug 
report.

--

___
Python tracker 

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



[issue17657] IDLE: about dialog should report the full version of TK

2013-04-07 Thread Roger Serwy

Roger Serwy added the comment:

LGTM. The patch works on Arch Linux, returning 8.5.13 which is what I have 
installed.

--
stage:  -> patch review
type: behavior -> enhancement
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



[issue16942] urllib still doesn't support persistent connections

2013-04-07 Thread Demian Brecht

Demian Brecht added the comment:

Just noticed there was a typo in the link in my previous post. It should be 
directing to issue# 16901.

--

___
Python tracker 

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



[issue17658] pythonw.exe crashes on opening IDLE

2013-04-07 Thread Patrick Poitras

Patrick Poitras added the comment:

So I tried to open Python33\python.exe and it's trying to load codecs from 
Python 2.7 which I think has to be the cause of the problem. When it raises 
CodecRegistryError, the 2.7 syntax is wrong for 3.3 and causes a SyntaxError.

Fatal Python error: Py_Initialize: unable to load system file codec
  File "C:\Python27\Lib\encodings\__init__.py", line 123
raise CodecRegistryError,\
^

SyntaxError: invalid syntax

--

___
Python tracker 

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



[issue17658] pythonw.exe crashes on opening IDLE

2013-04-07 Thread Patrick Poitras

Changes by Patrick Poitras :


Added file: http://bugs.python.org/file29727/WER5EA0.tmp.mdmp

___
Python tracker 

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



[issue17658] pythonw.exe crashes on opening IDLE

2013-04-07 Thread Patrick Poitras

Changes by Patrick Poitras :


Added file: http://bugs.python.org/file29726/WER5D77.tmp.appcompat.txt

___
Python tracker 

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



[issue17658] pythonw.exe crashes on opening IDLE

2013-04-07 Thread Patrick Poitras

New submission from Patrick Poitras:

I just installed Python 3.3.1, and tried to open IDLE, which failed to come up, 
giving only the classic pythonw.exe has stopped responding.

Will post dumps.

--
components: IDLE, Windows
files: WER1B0A.tmp.WERInternalMetadata.xml
messages: 186268
nosy: Acebulf
priority: normal
severity: normal
status: open
title: pythonw.exe crashes on opening IDLE
type: crash
versions: Python 3.3
Added file: http://bugs.python.org/file29725/WER1B0A.tmp.WERInternalMetadata.xml

___
Python tracker 

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



[issue17657] IDLE: about dialog should report the full version of TK

2013-04-07 Thread Todd Rovito

Changes by Todd Rovito :


--
nosy: +ned.deily, roger.serwy, terry.reedy

___
Python tracker 

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



[issue17657] IDLE: about dialog should report the full version of TK

2013-04-07 Thread Todd Rovito

Todd Rovito added the comment:

Attached is a patch the works for both Python 3.4 and Python 2.7.  I have 
tested this patch on OS X and Windows.  The code actually came from 
macosxSupport.py function tkVersionWarning.

--
keywords: +patch
Added file: 
http://bugs.python.org/file29724/17657IDLEAboutDialogReportFullVersionOfTK.patch

___
Python tracker 

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



[issue17657] IDLE: about dialog should report the full version of TK

2013-04-07 Thread Todd Rovito

New submission from Todd Rovito:

The IDLE about dialog does not report the full version of TK.  For instance it 
will report "8.5" and not report the last minor version number such as "8.5.9". 
 On the Mac OS X this is problematic (but it could be a problem on other 
platforms) because Apple ships their own version of TK which is known to be 
buggy.  For bug reporting purposes IDLE should report the full version of TK 
which could help diagnose bugs.

--
components: IDLE
messages: 186266
nosy: Todd.Rovito
priority: normal
severity: normal
status: open
title: IDLE: about dialog should report the full version of TK
type: behavior
versions: Python 2.7, Python 3.4

___
Python tracker 

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



[issue17656] Python 2.7.4 Breaks ZipFile Extraction

2013-04-07 Thread Vhati

Vhati added the comment:

Apparently namelist() can return either ascii or unicode strings for its 
members, depending on the archive. Obviously this'd apply to literal unicode 
strings as well.

--

___
Python tracker 

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



[issue17656] Python 2.7.4 Breaks ZipFile Extraction

2013-04-07 Thread Vhati

New submission from Vhati:

Python 2.7.4 fails while extracting zip files when 'member' is a unicode path.

---
Traceback (most recent call last):
  ...
my_zip.extract(item, tmp_folder_path)
  File "D:\Apps\Python274\lib\zipfile.py", line 1024, in extract
return self._extract_member(member, path, pwd)
  File "D:\Apps\Python274\lib\zipfile.py", line 1057, in _extract_member
arcname = arcname.translate(table)
TypeError: character mapping must return integer, None or unicode
---
2.7.3 had no problems because the call to translate() is new.


The following, copied from ZipFile.py, will recreate the error.
--
import string
illegal = ':<>|"?*'
table = string.maketrans(illegal, '_' * len(illegal))

arcname = "hi"
arcname = arcname.translate(table)
# ascii strings are fine

arcname = u"hi"
arcname = arcname.translate(table)
# unicode fails
# Traceback (most recent call last):
#   File "", line 1, in 
# TypeError: character mapping must return integer, None or unicode
---

I tried using unicode literals for the illegal string and maketrans underscore 
arg, but that didn't work. Suggestions?


Here's a link to the doc for translate().
http://docs.python.org/2/library/stdtypes.html#str.translate

--
components: Unicode
messages: 186264
nosy: Vhati, ezio.melotti
priority: normal
severity: normal
status: open
title: Python 2.7.4 Breaks ZipFile Extraction
type: crash
versions: Python 2.7

___
Python tracker 

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



[issue17511] Idle find function closes after each find operation

2013-04-07 Thread Sarah

Sarah added the comment:

This should allow the 'find' window to stay open. It also circumvents an issue 
in Windows, wherein highlighted text did not show while the 'find' window was 
open. The found text should now show as highlighted for any OS (as far as I 
know; please test). When the find window is closed, the cursor/highlighting is 
released.

--
nosy: +Sarah
Added file: http://bugs.python.org/file29723/issue17511_v2.patch

___
Python tracker 

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



[issue17511] Idle find function closes after each find operation

2013-04-07 Thread Roger Serwy

Roger Serwy added the comment:

Update for what I wrote in msg185101: The behavior introduced in #13052 which 
kept the replace dialog open has been reverted by #17625. 

There ought to be consistency across the different find/replace dialogs. The 
replace dialog closes when clicking "close" or "replace all" if there are 
replacements to be made. Otherwise, clicking "find" in the replace dialog keeps 
it open.

Other editors, such as Geany, Eclipse, Window's Notepad, and Wordpad, keep 
their find dialogs open when clicking "Find (Next)". Some of those programs 
still have a "find next" menu item.

I am in support of letting the find dialog remain open, and possibly relabeling 
the button to say "find next" instead.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue17655] Use writev() function in the io module

2013-04-07 Thread STINNER Victor

STINNER Victor added the comment:

Read also http://mail.python.org/pipermail/python-dev/2012-August/121396.html

--

___
Python tracker 

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



[issue17655] Use writev() function in the io module

2013-04-07 Thread STINNER Victor

Changes by STINNER Victor :


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

___
Python tracker 

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



[issue17655] Use writev() function in the io module

2013-04-07 Thread STINNER Victor

STINNER Victor added the comment:

http://mail.python.org/pipermail/python-dev/2012-August/121396.html

--

___
Python tracker 

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



[issue17655] Use writev() function in the io module

2013-04-07 Thread STINNER Victor

New submission from STINNER Victor:

Since issue #12268 has been fixed, it looks like it became easier to modify the 
io to use the writev() function when available.

For example, if FileIO.writelines() uses writev(), it can be used by 
TextIOWrapper.write() through BufferedWriter. The _io.TextIOWrapper.write() 
method stores encoded chunks of text into a list. It can calls 
buffer.writlines(pending) instead of buffer.write(b''.join(pending)).

I expect less Python function calls and less system calls, and so better 
performances because both are expensive (especially I/O syscalls).

See also issue #15723.

I don't know if/how readv() can be used to optimize I/O performances.

--
components: IO
messages: 186259
nosy: gregory.p.smith, haypo, pitrou
priority: normal
severity: normal
status: open
title: Use writev() function in the io module
type: performance
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



[issue17655] Use writev() function in the io module

2013-04-07 Thread Alex Gaynor

Changes by Alex Gaynor :


--
nosy: +alex

___
Python tracker 

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



[issue17654] IDLE only customizes correctly for OS X when using framework build

2013-04-07 Thread Ned Deily

Changes by Ned Deily :


--
assignee:  -> ned.deily
stage:  -> needs patch
title: IDLE: Right click menu not working on OS X -> IDLE only customizes 
correctly for OS X when using framework 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



[issue17654] IDLE: Right click menu not working on OS X

2013-04-07 Thread Ned Deily

Ned Deily added the comment:

It works OK as long as you are running Python from a framework build 
(--enable-framework).  There are various OS X customizations in IDLE that are 
currently triggered by the runningAsOSXApp() function in 
idlelib/macosxSupport.py.  One of the customizations is to add the event 
binding for  (in idle lib/EditorWindow.py).  Restricting the 
customizations to framework builds is not useful nor correct and there are some 
other questionable customizations assumptions made in that module.  I'll work 
up a patch.  In the meantime, you can easily workaround it for testing by 
patching runningAsOSXApp to always return True.

--

___
Python tracker 

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



[issue17654] IDLE: Right click menu not working on OS X

2013-04-07 Thread Todd Rovito

New submission from Todd Rovito:

IDLE's new right click menu doesn't seem to be working on Mac OS X.  I am 
running OS X 10.8.3 with TK version 8.5.9 (which I think is what OS X 10.8.3 
ships with). The right click activation I am trying is control-click.

--
components: IDLE
messages: 186257
nosy: Todd.Rovito, ned.deily, roger.serwy
priority: normal
severity: normal
status: open
title: IDLE: Right click menu not working on OS X
type: behavior
versions: Python 2.7, Python 3.4

___
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

2013-04-07 Thread Todd Rovito

Todd Rovito added the comment:

No problem I will open a separate issue.  Hopefully it is a mistake on my end 
and I have something dorked up.

--

___
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

2013-04-07 Thread Roger Serwy

Roger Serwy added the comment:

Please do open a separate issue. We'll resolve it there.

--

___
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

2013-04-07 Thread Todd Rovito

Todd Rovito added the comment:

Very strange but I noticed the right click menu is not working on Mac OS X.  
Before and after Roger's latest backwards_compat.patch.  I must be losing my 
mind but I thought this was working on OS X. The right click activation I am 
trying is control-click and I am running 10.8.3.  

Should I file a separate bug report for this issue?

--

___
Python tracker 

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



[issue14757] INCA: Inline Caching meets Quickening in Python 3.3

2013-04-07 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue16427] Faster hash implementation

2013-04-07 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue16286] Use hash if available to optimize a==b and a!=b for bytes and str

2013-04-07 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Optimize a==b and a!=b for bytes and str -> Use hash if available to 
optimize a==b and a!=b for bytes and str

___
Python tracker 

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



[issue10401] Globals / builtins cache

2013-04-07 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue13126] find() slower than rfind()

2013-04-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c5e2ea9e3aa7 by Victor Stinner in branch 'default':
Close #13126: "Simplify" FASTSEARCH() code to help the compiler to emit more
http://hg.python.org/cpython/rev/c5e2ea9e3aa7

--
nosy: +python-dev
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



[issue17615] String comparison performance regression

2013-04-07 Thread STINNER Victor

STINNER Victor added the comment:

Here is a patch specializing unicode_compare() for each combinaison of (kind1, 
kind2), to avoid the expensive PyUnicode_READ() macro (2 if). On Linux using 
GCC -O3 (GCC 4.7), there is no difference since GCC already specialize the 
loops. It may help other compilers.

--
keywords: +patch
resolution: fixed -> 
Added file: http://bugs.python.org/file29722/specialize_compare.patch

___
Python tracker 

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



[issue15092] Using enum PyUnicode_Kind

2013-04-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue13126] find() slower than rfind()

2013-04-07 Thread STINNER Victor

STINNER Victor added the comment:

I still see a difference between find and rfind, even if the different is low 
(11%).

$ ./python -m timeit -s 's="ABC"*33; a=((s+"D")*500+s+"E"); b=s+"E"' 'a.find(b)'
1 loops, best of 3: 93.6 usec per loop
$ ./python -m timeit -s 's="ABC"*33; a=("E"+s+("D"+s)*500); b="E"+s' 
'a.rfind(b)'
1 loops, best of 3: 84.3 usec per loop

Patched Python:

$ ./python -m timeit -s 's="ABC"*33; a=((s+"D")*500+s+"E"); b=s+"E"' 'a.find(b)'
1 loops, best of 3: 84.7 usec per loop
$ ./python -m timeit -s 's="ABC"*33; a=("E"+s+("D"+s)*500); b="E"+s' 
'a.rfind(b)'
1 loops, best of 3: 84.5 usec per loop

I'm unable to explain why GCC (4.7 in my case) produces faster code with the 
patch, but the patch is simple and does not make the code (much) harder to 
understand.

So Antoine, please go ahead and apply it.

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



[issue15092] Using enum PyUnicode_Kind

2013-04-07 Thread STINNER Victor

STINNER Victor added the comment:

Python 3.3 has been released. I'm not sure that we can change the type of 
PyUnicode_Kind because of the stable API. By the way, I already tried to write 
a similar patch (use enum). I expected better performances, but it did not 
change anything.

Can we close this issue?

--

___
Python tracker 

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



[issue16061] performance regression in string replace for 3.3

2013-04-07 Thread STINNER Victor

STINNER Victor added the comment:

str_replace_1char_2.patch looks good to me. Just one nit: please add a 
reference to this issue in the comment (in replace.h).

--

___
Python tracker 

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



[issue16061] performance regression in string replace for 3.3

2013-04-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is an updated patch. Some comments added (I will be grateful for help in 
the improvement of these comments), an implementation moved to stringlib (a new 
file Objects/stringlib/replace.h added).

unicode_2.patch optimizes only too special case and I consider this is not 
worth the effort. str_replace_1char*.patch cover a wider area and designed to 
be faster than 3.2 and 3.3 in most cases and not to be significant slower in 
corner cases.

--
Added file: http://bugs.python.org/file29721/str_replace_1char_2.patch

___
Python tracker 

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



[issue15596] pickle: Faster serialization of Unicode strings

2013-04-07 Thread STINNER Victor

STINNER Victor added the comment:

Hi Antoine, I prefer your patch. Great job!

2013/4/7 Antoine Pitrou :
>
> Antoine Pitrou added the comment:
>
> I've applied the review comments and committed the patch. Thank you!
>
> --
> resolution:  -> fixed
> stage: patch review -> committed/rejected
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue17649] Python/Python-ast.c: No such file or directory

2013-04-07 Thread pfg

pfg added the comment:

Oops.. I am sorry I reported the wrong version,
I am using python-2.7.4 just released

SHA256 (python/Python-2.7.4.tar.xz) = 
b6626eb6d07d72351f251116ab14427fc934b5f24e6ebc751356a44a7d23b62d
SIZE (python/Python-2.7.4.tar.xz) = 10250644

And I am running something similar to your buildbot:
FreeBSD pcbsd-3938 9.1-STABLE FreeBSD 9.1-STABLE #9 r248799M: Wed Mar 27 
15:23:28 COT 2013 pfg@pcbsd-3938:/sys/amd64/compile/DELL  amd64

I am afraid the issue is caused by the ports tree environment: it does some 
nasty workarounds to avoid building some components.

Let's just close this issue, I will investigate locally and if I find something 
wrong in the release I will let you know, Thanks for your help!

--
status: open -> closed
Added file: http://bugs.python.org/file29720/configure-log.gz

___
Python tracker 

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



[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread Caitlin Potter

Caitlin Potter added the comment:

Then perhaps nothing can be done from the python side of things, that's too
bad.

On Sun, Apr 7, 2013 at 4:38 PM, Richard Oudkerk wrote:

>
> Richard Oudkerk added the comment:
>
> On 07/04/2013 9:02pm, Caitlin Potter wrote:
> > I'm not entirely positive that it would be doable, but looking at the
> > subprocess code, it looks like we do have an open handle to the windows
> > stdout buffer, including buffer attributes, so it should be possible to
> > translate coloured attributes into ANSI codes,
>
> The handle for stdout is just the readable end of a pipe.  It is not a
> console, GetConsoleScreenBufferInfo() will not work with it, and there
> are no coloured attributes associated with it.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue17653] fix typo in socketserver.rst

2013-04-07 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
assignee: docs@python
components: Documentation
files: fix.diff
keywords: patch
nosy: docs@python, tshepang
priority: normal
severity: normal
status: open
title: fix typo in socketserver.rst
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file29719/fix.diff

___
Python tracker 

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



[issue12463] Calling SocketServer.shutdown() when server_forever() was not called will hang

2013-04-07 Thread Tshepang Lekhonkhobe

Changes by Tshepang Lekhonkhobe :


--
nosy: +tshepang

___
Python tracker 

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



[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread Richard Oudkerk

Richard Oudkerk added the comment:

On 07/04/2013 9:02pm, Caitlin Potter wrote:
> I'm not entirely positive that it would be doable, but looking at the
> subprocess code, it looks like we do have an open handle to the windows
> stdout buffer, including buffer attributes, so it should be possible to
> translate coloured attributes into ANSI codes,

The handle for stdout is just the readable end of a pipe.  It is not a 
console, GetConsoleScreenBufferInfo() will not work with it, and there 
are no coloured attributes associated with it.

--

___
Python tracker 

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



[issue17649] Python/Python-ast.c: No such file or directory

2013-04-07 Thread Ned Deily

Ned Deily added the comment:

I'm afraid it's not likely we'll be able to further resolve this issue without 
more specific information about exactly the steps you are using to try to build 
Python, including exactly what version or hg rev id (you say 2.7.2 but the path 
name says 2.7.4), any patches, exact ./configure parameters, which version of 
FreeBSD, etc.  I can tell you that python-dev has a set of buildbots including 
some FreeBSD ones that seem to be able to build successfully, for example 
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.1%20%5BSB%5D%202.7. 
 I'm not sure how that compares to what you are trying to do by building 
"within FreeBSD's ports tree".

--

___
Python tracker 

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



[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows

2013-04-07 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
title: bdist_wininst depends on MBCS codec, unavailable on non-Windows -> 
bdist_wininst depends on MBCS codec, unavailable on non-Windows

___
Python tracker 

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



[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows

2013-04-07 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



[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread Caitlin Potter

Caitlin Potter added the comment:

> however I've tested this same test program in a
> development environment,

*unix* development environment (xterm, ubuntu 12.04), rather.

--

___
Python tracker 

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



[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread Caitlin Potter

Caitlin Potter added the comment:

I'm not entirely positive that it would be doable, but looking at the
subprocess code, it looks like we do have an open handle to the windows
stdout buffer, including buffer attributes, so it should be possible to
translate coloured attributes into ANSI codes,

Whether this would or would not break anything else is a different story,
of course. Obviously there are times where you wouldn't want ANSI color
codes in the output, and I'm not sure how you could differentiate between a
pipe to a terminal buffer, or a pipe to a file.

Somewhat relevant, but perhaps not so much:
The google test framework does actually test isatty() before using ANSI
escape characters, however I've tested this same test program in a
development environment, with colours preserved, which was a bit curious
(the test I've put together is available at http://github.com/caitp/waftest,
however it will break on a lot of systems, depending on the way pthread
needs to be used)

On Sun, Apr 7, 2013 at 2:39 PM, Richard Oudkerk wrote:

>
> Richard Oudkerk added the comment:
>
> On 07/04/2013 7:21pm, R. David Murray wrote:
> > Certainly on unix if you write ANSI color codes to stdout and the reader
> > doesn't strip them, they will be preserved and can be redisplayed, so
> > being able to do something similar on Windows would be nice.
>
> Although sensible unix programs capable of producing coloured text
> refuse to do so (by default) if output is a pipe rather than a tty.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue17649] Python/Python-ast.c: No such file or directory

2013-04-07 Thread pfg

pfg added the comment:

Correction:
The problem does arise during the build process (not configure).

Still specifying the touch target for the build or touching manually the files 
doesn't help :(

--

___
Python tracker 

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



[issue17649] Python/Python-ast.c: No such file or directory

2013-04-07 Thread pfg

pfg added the comment:

I looked and the file exists:
$ file Python/Python-ast.c
Python/Python-ast.c: C source, ASCII text

The file appears valid.

I touched the files as suggested but I still I get the same error message when 
running "configure".

FWIW, the Makefile.pre.in target exists but it doesn't seem useful because this 
happens just by running configure (when there is no Makefile).
I should note that I am attempting to build within FreeBSD's ports tree 
(apparently out-of-tree) so maybe my environment setup is causing the trouble.

--
status: pending -> open

___
Python tracker 

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



[issue16551] Cleanup the pure Python pickle implementation

2013-04-07 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

My point is I would prefer that we keep all optimizations to only the _pickle C 
module and keep the Python implementation as simple as possible.

Also, I doubt the slight speedup shown by your microbenchmark will actually 
result in any significant benefits on the overall performance of pickle.py. 
Furthermore, we can't use CPython to measure the benefits of such optimization 
because CPython will always use _pickle over the Python implementation.

--

___
Python tracker 

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



[issue8523] shutil.rmtree and os.listdir cannot recover on error conditions

2013-04-07 Thread R. David Murray

R. David Murray added the comment:

I think this patch looks good, but it needs a documentation update to go with 
it.  Do you want to work on that, Andrew?

It also seems as though there's no bug that it is practical to fix here, so I'm 
changing this to a pure enhancement request.  If anyone disagrees with that, 
please describe what you think the appropriate bug fix is, and we can break the 
enhancement request out into a separate issue.

--
stage: test needed -> patch review
type: behavior -> enhancement
versions: +Python 3.4 -Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread Richard Oudkerk

Richard Oudkerk added the comment:

On 07/04/2013 7:21pm, R. David Murray wrote:
> Certainly on unix if you write ANSI color codes to stdout and the reader
> doesn't strip them, they will be preserved and can be redisplayed, so
> being able to do something similar on Windows would be nice.

Although sensible unix programs capable of producing coloured text 
refuse to do so (by default) if output is a pipe rather than a tty.

--

___
Python tracker 

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



[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread R. David Murray

R. David Murray added the comment:

Oh, good, I thought that was probably the case but I don't know Windows enough 
to have been sure.

Caitlin: if you can prove sbt and me wrong by writing a patch that works 
(without breaking anything else :), I think it would be considered.  Certainly 
on unix if you write ANSI color codes to stdout and the reader doesn't strip 
them, they will be preserved and can be redisplayed, so being able to do 
something similar on Windows would be nice.  I'm pretty sure there isn't any 
place stdout.read() is called, though.  The stdout output from the originating 
process will be being read by a different process via stdin.read().  And as sbt 
pointed out, neither one of those will be a console.

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



[issue17647] subprocess.communicate() should preserve colored output on Windows

2013-04-07 Thread Richard Oudkerk

Richard Oudkerk added the comment:

I don't see how this is a subprocess problem, or could be fixed in subprocess.

IIUC, SetConsoleTextAttribute() only has an effect if the output is connected 
to a console.  But that is not the case if you redirect the output to a pipe 
(which is presumably what Waf does so it can capture the output).

--
nosy: +sbt

___
Python tracker 

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



[issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py

2013-04-07 Thread Roger Serwy

Roger Serwy added the comment:

Thank you everyone for your patience. I am closing this issue as fixed.

--
assignee:  -> roger.serwy
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



[issue17613] IDLE "AttributeError: 'NoneType' object has no attribute 'index'" from Delegator.py

2013-04-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ae05d841bea1 by Roger Serwy in branch '2.7':
#17613: Prevent traceback when removing syntax colorizer in IDLE.
http://hg.python.org/cpython/rev/ae05d841bea1

New changeset 8b793a946acb by Roger Serwy in branch '3.3':
#17613: Prevent traceback when removing syntax colorizer in IDLE.
http://hg.python.org/cpython/rev/8b793a946acb

New changeset b45675223885 by Roger Serwy in branch 'default':
#17613: merge with 3.3.
http://hg.python.org/cpython/rev/b45675223885

--
nosy: +python-dev

___
Python tracker 

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



[issue17628] str==str: compare the first and last character before calling memcmp()

2013-04-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Note that unicode_eq() always called after identity check and hash check. I.e. 
identity check in Victor's patch is redundant and unicode_eq() called only for 
strings which have the same hash. The probability to have the same first byte 
and be equal is a great.

unicode_compare_eq() and unicode_eq() are designed for different purposes. They 
cannot be just merged.

As the optimization for unicode_eq(), I would have suggested a checking of 
first machine words instead of first bytes, but this trick is too dirty.

--

___
Python tracker 

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



[issue17390] display python version on idle title bar

2013-04-07 Thread Roger Serwy

Roger Serwy added the comment:

Issue10747 is tangentially related. It is about adding the python version to 
the short cuts on Windows.

--

___
Python tracker 

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



[issue17618] base85 encoding

2013-04-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> So I'm not sure what you want to do. I would suggest a standard
> Ascii85 encoder is definitely useful, and provides feature parity with
> Ruby. If we want the standard library to be able to read/write
> Mercurial/Git base64 encoded files, then I guess that can be added
> too. If we think RFC1924 is useful/used, then the implementation in
> the netaddr lib looks right.

Agreed for both the Ascii85 encoder and the hg/git brand of base85
(which is used for "binary diffs", by the way). I don't think supporting
RFC1924 is useful, though.

(I think using "ascii85" and "base85" for those encodings, respectively,
provides a nice way to distinguish them)

--

___
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

2013-04-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3fad938e9d4e by Roger Serwy in branch '2.7':
#1207589: Backwards-compatibility patch for right-click menu in IDLE.
http://hg.python.org/cpython/rev/3fad938e9d4e

New changeset c26ec5897c5a by Roger Serwy in branch '3.3':
#1207589: Backwards-compatibility patch for right-click menu in IDLE.
http://hg.python.org/cpython/rev/c26ec5897c5a

New changeset 5219c1271156 by Roger Serwy in branch 'default':
#1207589: merge with 3.3.
http://hg.python.org/cpython/rev/5219c1271156

--

___
Python tracker 

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



[issue17651] Errno checking replaced by concrete classes inherited from OSError

2013-04-07 Thread Georg Brandl

New submission from Georg Brandl:

Why not attach this to #16705 directly?

--
nosy: +georg.brandl

___
Python tracker 

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



[issue17650] There is no exception correspond to errno EROFS

2013-04-07 Thread Georg Brandl

Changes by Georg Brandl :


--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue17652] Add skip_on_windows decorator to test.support

2013-04-07 Thread Berker Peksag

New submission from Berker Peksag:

I saw a conversation about adding a @skip_on_windows decorator on #python-dev a 
couple of months ago.

Attached a patch with a documentation update.

(Added the participants of the conversation to nosy list.)

--
components: Tests
files: skip_on_windows.diff
keywords: patch
messages: 186226
nosy: berker.peksag, ezio.melotti, r.david.murray
priority: normal
severity: normal
status: open
title: Add skip_on_windows decorator to test.support
versions: Python 3.4
Added file: http://bugs.python.org/file29718/skip_on_windows.diff

___
Python tracker 

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



[issue17618] base85 encoding

2013-04-07 Thread Martin Morrison

Martin Morrison added the comment:

Ok, I'm not even sure that Mercurial follows RFC1924! That RFC is specifically 
for encoding IPv6 addresses, and mandates that the calculations be performed on 
a 128bit integer.

The Mercurial implementation seems to follow the Ascii85 policy of taking each 
4 bytes separately and doing 32bit arithmetic, but uses the lookup table from 
RFC1924, and is less lenient about spacing, and has no compression for 
sequences of zeroes.

It therefore looks like Mercurial (and I guess Git) have their own, 
non-standard base64 encoding. The Web at large mostly has "standard" Ascii85 
encoding/decoding described. RFC1924 itself has a Python implementation on 
Github:

https://github.com/drkjam/netaddr/blob/rel-0.7.x/netaddr/ip/rfc1924.py

So I'm not sure what you want to do. I would suggest a standard Ascii85 encoder 
is definitely useful, and provides feature parity with Ruby. If we want the 
standard library to be able to read/write Mercurial/Git base64 encoded files, 
then I guess that can be added too. If we think RFC1924 is useful/used, then 
the implementation in the netaddr lib looks right.

--

___
Python tracker 

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



[issue17618] base85 encoding

2013-04-07 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



[issue17618] base85 encoding

2013-04-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> The Ascii85 version is what is used with PDF, and the default output
> format for the equivalent Ruby library, so seems useful to have. So I
> guess what might be desirable is to have both in the codebase?

Yes, it could be useful to have both.

--

___
Python tracker 

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



[issue17618] base85 encoding

2013-04-07 Thread Martin Morrison

Martin Morrison added the comment:

Ok, having now looked at mercurial's implementation... it looks like they 
implemented the RFC1924 version, whereas my implementation is the Ascii85 
version (and I verified it against, amongst others: 
http://www.tools4noobs.com/online_tools/ascii85_encode/ ).

The Ascii85 version is what is used with PDF, and the default output format for 
the equivalent Ruby library, so seems useful to have. So I guess what might be 
desirable is to have both in the codebase?

--

___
Python tracker 

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



[issue17618] base85 encoding

2013-04-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> Forgot to mention, I included an optional keyword argument to support
> the 'btoa' shortcut for sequences of space characters as described in
> the Wikipedia article. However, I'm unsure if any other implementation
> supports this, so might not be worth including it in our
> implementation.

In this issue I would really like to aim for Mercurial/git-like
behaviour: i.e. no special shortcuts, and no armoring ('<~' and '~>').
Also, the base85 alphabet used by Mercurial and git may be different, I
haven't checked.

(by the way, it seems "btoa" has been dead for a long time, I don't
think it's useful as a reference here)

--

___
Python tracker 

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



[issue17618] base85 encoding

2013-04-07 Thread Martin Morrison

Martin Morrison added the comment:

(sorry for spam)

Forgot to mention, I included an optional keyword argument to support the 
'btoa' shortcut for sequences of space characters as described in the Wikipedia 
article. However, I'm unsure if any other implementation supports this, so 
might not be worth including it in our implementation.

A better feature might be to support full btoa output, but the Wikipedia 
article doesn't have a complete enough specification, and I couldn't find 
(didn't really look for) one elsewhere. If no one uses it though, again. 
probably not worth including it.

--

___
Python tracker 

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



[issue17618] base85 encoding

2013-04-07 Thread Martin Morrison

Martin Morrison added the comment:

I wrote an implementation from scratch (based on the wikipedia article; I've 
not looked at any existing implementations) in pure Python in the attached 
diff. It includes tests.

Feel free to use it as the pure Python implementation if desired, though I 
won't be offended if you just end up using the Mercurial one. :-)

--
keywords: +patch
nosy: +isoschiz
Added file: http://bugs.python.org/file29717/issue17618.diff

___
Python tracker 

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



[issue15596] pickle: Faster serialization of Unicode strings

2013-04-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I've applied the review comments and committed the patch. Thank you!

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



[issue15596] pickle: Faster serialization of Unicode strings

2013-04-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 09a84091ae96 by Antoine Pitrou in branch 'default':
Issue #15596: Faster pickling of unicode strings.
http://hg.python.org/cpython/rev/09a84091ae96

--
nosy: +python-dev

___
Python tracker 

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



[issue17615] String comparison performance regression

2013-04-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

On big-endian platform we can use memcmp for 2:2 and 4:4 comparison. I do not 
sure it will be faster. ;)

--

___
Python tracker 

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



[issue17618] base85 encoding

2013-04-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The Mercurial authors have given their informal agreement for a relicensing. 
OTOH, they must still sign a contributor's agreement. The relicensing would 
allow us to use their pure Python implementation (in mercurial/pure/base85.py). 
OTOH, the C implementation (in mercurial/base85.c) is a ripoff of the git one, 
so we'd better rewrite our own.

My current plan would be the following:
- create a binascii.py and rename binascii.c to _binascii.c
- add Mercurial's pure Python implementation to binascii.py
- add a custom C implementation to _binascii.c
- make sure the binascii test suite tests both implementations

OTOH, if we don't get the Mercurial authors' contributor agreement, we can also 
re-write our own pure Python implementation.

In any case, our implementation should IMHO be compatible with Mercurial's 
(i.e. produce identical outputs for the same inputs).

--
stage:  -> needs patch

___
Python tracker 

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



[issue1875] "if 0: return" not raising SyntaxError

2013-04-07 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.3, Python 3.4 -Python 3.1, Python 3.2

___
Python tracker 

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



[issue17618] base85 encoding

2013-04-07 Thread R. David Murray

R. David Murray added the comment:

Antoine is talking to Mercurial about relicensing, and I believe at this point 
it is just a matter of working out the mechanical details (that is, he has an 
agreement-in-principal from them).

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



[issue2953] _zip_directory_cache untested and undocumented

2013-04-07 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.3 -Python 3.1, Python 3.2

___
Python tracker 

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



[issue17618] base85 encoding

2013-04-07 Thread Sijin Joseph

Sijin Joseph added the comment:

Is anyone working on this? I'd like to include this in a CPython sprint @MIT on 
4/13.

--
nosy: +sijinjoseph

___
Python tracker 

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



[issue17343] Add a version of str.split which returns an iterator

2013-04-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

> I'm guessing Terry wanted to say "os.listdir" instead of "os.walk".
yes, sorry.

--

___
Python tracker 

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



[issue13477] tarfile module should have a command line

2013-04-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Then I propose to add an alternative tarfile command-line interface as 
Tools/scripts/tar.py for those who prefer a well-known and well-tested 
traditional interface.

--

___
Python tracker 

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



[issue17644] str.format() crashes

2013-04-07 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



[issue17644] str.format() crashes

2013-04-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The first patch looks better for me. It is simpler and I do not sure the thing 
is worth a complication.

--
stage: needs patch -> patch review

___
Python tracker 

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



[issue17094] sys._current_frames() reports too many/wrong stack frames

2013-04-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

> if a
> thread ends up being created/destroyed, I think we can get a deadlock
> when trying to acquire the head lock. I think it should be turned into
> an open call if possible.

How would you do that in a simple way?

> Also, as noted by Stefan, shouldn't we also iterate over other interpreters?

The problem is that, AFAIK, we don't know which thread states of the other 
interpreters should be kept alive.

--

___
Python tracker 

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



[issue17610] Qsort function misuse in typeobject.c

2013-04-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eaff15532b3c by Benjamin Peterson in branch '2.7':
list slotdefs in offset order rather than sorting them (closes #17610)
http://hg.python.org/cpython/rev/eaff15532b3c

--
status: open -> closed

___
Python tracker 

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



[issue16705] Use concrete classes inherited from OSError instead of errno check

2013-04-07 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
dependencies: +There is no exception correspond to errno EROFS

___
Python tracker 

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



[issue17650] There is no exception correspond to errno EROFS

2013-04-07 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



[issue16705] Use concrete classes inherited from OSError instead of errno check

2013-04-07 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
dependencies: +Errno checking replaced by concrete classes inherited from 
OSError

___
Python tracker 

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



[issue17650] There is no exception correspond to errno EROFS

2013-04-07 Thread Andrey Tykhonov

Changes by Andrey Tykhonov :


--
components: +Library (Lib)
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



[issue17650] There is no exception correspond to errno EROFS

2013-04-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The rationale for not creating dedicated exception classes is that those errors 
are not common enough. Since the range of possible errno values is basically 
unbounded (each system can create their own system-specific errors), trying to 
cover them all is a losing battle.

--

___
Python tracker 

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



[issue17502] unittest.mock: side_effect iterators ignore DEFAULT

2013-04-07 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed. Thanks

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



[issue17651] Errno checking replaced by concrete classes inherited from OSError

2013-04-07 Thread Andrey Tykhonov

Changes by Andrey Tykhonov :


--
keywords: +patch
Added file: http://bugs.python.org/file29716/issue17651.diff

___
Python tracker 

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



[issue17651] Errno checking replaced by concrete classes inherited from OSError

2013-04-07 Thread Andrey Tykhonov

Changes by Andrey Tykhonov :


--
components: Library (Lib)
nosy: asvetlov, atykhonov
priority: normal
severity: normal
status: open
title: Errno checking replaced by concrete classes inherited from OSError
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



  1   2   >