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

2013-04-07 Thread Ned Deily

Ned Deily added the comment:

Python-ast.c is a generated file.  As released, a Python source tarball should 
contain an up-to-date version that does not need to be regenerated. However, if 
the timestamps of the source files are not preserved, the Makefile may think it 
is out of date and try to regenerate it. The regeneration step requires a 
working Python compiler so you may run into a bootstrap issue if there is none 
on the system.  If you obtain the source using a Mercurial checkout, hg does 
not attempt to set timestamps on the source files so you are even more likely 
to run into problems in that case.  Usually, the solution is to do a clean 
checkout or tarball extraction, then manually "touch" the files that 
Python-ast.c is built from:

touch Include/Python-ast.h Python/Python-ast.c

The newly-released Python 2.7.4 includes a "make touch" target in the Python 
Makefile just for this purpose, see Issue16004 and a number of other changes to 
help make this area more robust, for example, when building with a BUILDIR 
separate from SRCDIR.

--
nosy: +ned.deily
resolution:  -> out of date
stage:  -> committed/rejected
status: open -> pending

___
Python tracker 

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



[issue17585] IDLE - regression with exit() and quit()

2013-04-07 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions:  -Python 3.2

___
Python tracker 

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



[issue6649] idlelib/rpc.py missing exit status on exithook

2013-04-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Congratulation with your first CPython commit, Roger!

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue17626] set's __isub__ doesn't support non-sets.

2013-04-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Intentional and documented.

"5.7. Set Types — set, frozenset
...
Note, the non-operator versions of union(), intersection(), difference(), and 
symmetric_difference(), issubset(), and issuperset() methods will accept any 
iterable as an argument. In contrast, their operator based counterparts require 
their arguments to be sets. ..."

--
nosy: +terry.reedy
resolution:  -> invalid
status: pending -> closed
versions: +Python 3.4 -Python 3.2

___
Python tracker 

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



[issue17585] IDLE - regression with exit() and quit()

2013-04-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Perhaps PseudoInputFile.close() should call super().close() to set closed flag. 
Perhaps close() should be even implemented in PseudoFile.

It's my fault in this regression. I deliberately have not implemented 
PseudoFile.close(), because I saw no sense in deliberate calling of 
sys.std*.close() and considered closing the window with unpremeditated closing 
of the standard stream is too dangerous.

--

___
Python tracker 

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



[issue17645] assert fails in _Py_Mangle

2013-04-07 Thread Armin Rigo

Armin Rigo added the comment:

You may want to add a test.  This might help notice that comparing an integer 
of type Py_ssize_t to check if it's greater than PY_SSIZE_T_MAX is bogus in C  
:-(

--
resolution: fixed -> 
stage: committed/rejected -> test needed

___
Python tracker 

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



[issue17570] Improve devguide Windows instructions

2013-04-07 Thread Volodymyr Bezkostnyy

Volodymyr Bezkostnyy added the comment:

Deleted ./ before python.exe

--
keywords: +patch
nosy: +asvetlov, webwin
Added file: http://bugs.python.org/file29703/issue17570.diff

___
Python tracker 

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



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2013-04-07 Thread Kostyantyn Leschenko

Kostyantyn Leschenko added the comment:

I've updated patch to work with current trunk.

--
nosy: +Kostyantyn.Leschenko, asvetlov
versions: +Python 3.4 -Python 3.2
Added file: http://bugs.python.org/file29704/Issue13249-5.patch

___
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 Андрій Тихонов

New submission from Андрій Тихонов:

I found errno.EROFS in Lib/mailbox.py but didn't find exception  correspond to 
this errno. Is it need to be created?

--
messages: 186185
nosy: pitrou, Андрій.Тихонов
priority: normal
severity: normal
status: open
title: 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



[issue17206] Py_XDECREF() expands its argument multiple times

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



[issue17645] assert fails in _Py_Mangle

2013-04-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The crash is very obscure, I don't think we want to bother with a unit test for 
that (it took 14 seconds to crash or pass here).

> This might help notice that comparing an integer of type Py_ssize_t to 
> check if it's greater than PY_SSIZE_T_MAX is bogus in C

The variables are of type size_t, not Py_ssize_t (which explains why the 
comparison works).

--
resolution:  -> fixed

___
Python tracker 

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



[issue1521051] Allow passing DocTestRunner and DocTestCase in doctest

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



[issue2756] urllib2 add_header fails with existing unredirected_header

2013-04-07 Thread Volodymyr Antonevych

Volodymyr Antonevych added the comment:

Test urllib2 file

--
nosy: +volodyaa
Added file: http://bugs.python.org/file29705/1.py

___
Python tracker 

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



[issue2756] urllib2 add_header fails with existing unredirected_header

2013-04-07 Thread Volodymyr Antonevych

Volodymyr Antonevych added the comment:

Test HTTP server

--
Added file: http://bugs.python.org/file29706/s.py

___
Python tracker 

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



[issue6640] urlparse should parse mailto: URL headers as query parameters

2013-04-07 Thread Volodymyr Bezkostnyy

Volodymyr Bezkostnyy added the comment:

Tested on 3.4

urllib.parse.urlparse("mailto:f...@example.com?subject=hi";)
ParseResult(scheme='mailto', netloc='', path='f...@example.com', params='', 
query='subject=hi', fragment='')

Work as expected.

--
nosy: +asvetlov, webwin

___
Python tracker 

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



[issue2756] urllib2 add_header fails with existing unredirected_header

2013-04-07 Thread Volodymyr Antonevych

Volodymyr Antonevych added the comment:

Tested on 2.7. The same bug exists:

127.0.0.1 - - [07/Apr/2013 13:17:39] "POST / HTTP/1.1" 200 -
('content-length', '11')
('accept-encoding', 'identity')
('connection', 'close')
('user-agent', 'Python-urllib/2.7')
('host', '127.0.0.1:8000')
('content-type', 'application/x-www-form-urlencoded')

Also, the workaround exists for that issue:
instead of using request.add_header have to use request.add_unredirected_header 
for the second call.

BTW, the same issue with 'Content-length' header. If use request.add_data the 
second time when the content length value leaves the same as for first request.

See steps to reproduce in attachments.

--
versions: +Python 2.7
Added file: http://bugs.python.org/file29707/2.py

___
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 Georg Brandl

Georg Brandl added the comment:

I'm guessing Terry wanted to say "os.listdir" instead of "os.walk".

--
nosy: +georg.brandl

___
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 Georg Brandl

Changes by Georg Brandl :


--
status: closed -> open

___
Python tracker 

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



[issue17570] Improve devguide Windows instructions

2013-04-07 Thread Georg Brandl

Georg Brandl added the comment:

At least two of the changes in the patch are incorrect because they refer to 
the Mac OS X "python.exe".

--
nosy: +georg.brandl

___
Python tracker 

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



[issue16658] Missing "return" in HTTPConnection.send()

2013-04-07 Thread Evgen Koval

Evgen Koval added the comment:

I reviewed and verified this patch, and it looks correct to me.

--
nosy: +Evgen.Koval, asvetlov

___
Python tracker 

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



[issue900112] cgi.fieldStorage doesn't grok standards env. variables

2013-04-07 Thread Evgen Koval

Evgen Koval added the comment:

Patch for 3.3 is uploaded.

--
nosy: +Evgen.Koval, asvetlov
Added file: http://bugs.python.org/file29708/issue900112.diff

___
Python tracker 

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



[issue13249] argparse.ArgumentParser() lists arguments in the wrong order

2013-04-07 Thread Andrew Svetlov

Andrew Svetlov added the comment:

Fixed in 4712f9f8a90d, 5e5081cdc086, e4beda7cca2f.
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



[issue13355] random.triangular error when low = high=mode

2013-04-07 Thread Yuriy Senko

Yuriy Senko added the comment:

Added validation of input data. Check whether low <= mode <= high. If low == 
high return low as a result.

--
nosy: +Chaka_bum, asvetlov
Added file: http://bugs.python.org/file29709/issue_13355.patch

___
Python tracker 

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



[issue17570] Improve devguide Windows instructions

2013-04-07 Thread Volodymyr Bezkostnyy

Volodymyr Bezkostnyy added the comment:

Revert changes for Mac OS X

--
Added file: http://bugs.python.org/file29710/issue17570.diff

___
Python tracker 

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



[issue17221] Resort Misc/NEWS

2013-04-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you, Terry. Here is a new version of a patch for 3.4. New entries move, 
IDLE section resorted in a chronological order, duplicates removed, some minor 
things fixed.

--
Added file: http://bugs.python.org/file29711/NEWS-3.4_5.patch

___
Python tracker 

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



[issue17221] Resort Misc/NEWS

2013-04-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And here is a patch for 3.3.

--
Added file: http://bugs.python.org/file29712/NEWS-3.3.patch

___
Python tracker 

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



[issue17221] Resort Misc/NEWS

2013-04-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue16895] Batch file to mimic 'make' on Windows

2013-04-07 Thread Richard Oudkerk

Richard Oudkerk added the comment:

You seem to end your subroutines (or whatever they are called) using "goto end" 
rather than "exit /b".  Since popd follows the "end" label, does this mean that 
you get a popd after calling each subroutine?  Is this intended and can it 
cause unmatched pushd/popd-s?

(I am not familiar with writing batch files.)

Also, I think 32 bit builds should be the default.  Many people with 64 bit 
Windows are using Visual Studio Express which only has 32 bit support.

--

___
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 Yuriy Senko

Yuriy Senko added the comment:

Patch ported from 
http://code.google.com/p/mock/issues/attachmentText?id=190&aid=19&name=mock.patch&token=6pDNkNBcNLDftg-PsUE8roPb6T4%3A1363712167613

--
keywords: +patch
nosy: +Chaka_bum, asvetlov
Added file: http://bugs.python.org/file29713/issue_17502.patch

___
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 Serhiy Storchaka

Serhiy Storchaka added the comment:

May be str.iter_indices() or even just str.indices()?

--

___
Python tracker 

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



[issue1521051] Allow passing DocTestRunner and DocTestCase in doctest

2013-04-07 Thread Kostyantyn Leschenko

Kostyantyn Leschenko added the comment:

I've updated patch to work with current trunk and added new params to doctest 
documentation.

--
nosy: +Kostyantyn.Leschenko
Added file: http://bugs.python.org/file29714/doctest-configuration-1.diff

___
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 Serhiy Storchaka

Serhiy Storchaka added the comment:

In response to Alexandre's comment on Rietveld. Access to a local variable is 
faster than to a global one and the current implementation uses this for 
struct.pack. I just use same trick for struct.unpack. Here is a microbenchmark 
which demonstrate some effect of this optimization. I got 0.6491418619989417, 
0.6947214259998873, and 0.5394902769985492 for optimized, non-optimized and 
advanced optimized functions.

Of course, we can achieve even better effect if we will cache not only 
struct.pack, but struct.Struct('http://bugs.python.org/file29715/bench.py

___
Python tracker 

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



[issue17552] socket.sendfile()

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



[issue17650] There is no exception correspond to errno EROFS

2013-04-07 Thread Andrey Tykhonov

Andrey Tykhonov added the comment:

Also:
errno.EXDEV in Lib/distutils/file_util.py
errno.ENOTCONN in Lib/poplib.py
errno.EINVAL in Lib/subprocess.py
errno.ENOTCONN in Lib/smtpd.py, Lib/ssl.py, Lib/imaplib.py
errno.EOPNOTSUPP, errno.ENOTSUP, errno.ENOTSUP, errno.ENODATA in Lib/shutil.py

--

___
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



[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



[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



[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



[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



[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 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: +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



[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



[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



[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



[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



[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



[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



[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



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



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



[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



[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



[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



[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



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

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:

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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



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

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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



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



[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



[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



[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



[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



[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



  1   2   >