[issue21927] BOM appears in stdin when using Powershell

2014-07-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 - when stdin is a pipe (ex: echo abc|python ...), the stdin encoding 
 becomes cp1252 (ANSI code page) because os.device_encoding(0) returns None; 
 cp1252 is the result of locale.getpreferredencoding(False) (ANSI code page). 
 sys.stdin.readline() does not contain a BOM.

What if echo non-ascii characters? How they are encoded?

Perhaps Python should detect when it is ran under PowerShell in a pipe and set 
stdin (and/or stdout and stderr) encoding to CP65001).

--
nosy: +serhiy.storchaka

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



[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Claudiu Popa

Claudiu Popa added the comment:

It works in IDLE because it registers a custom pickling for code objects, in 
idlelib.rpc:

  copyreg.pickle(types.CodeType, pickle_code, unpickle_code)


where pickle_code / unpickle_code calls marshal.dumps/loads.

Although, I admit that this is weird. If idlelib.rpc is using this for 
transferring data between RPC instances, that's okay, but leaking the behaviour 
in the IDLE's interactive interpreter is not that okay, because leads to 
different results and expectancies between IDLE and Python's interactive 
interpreter.

--
nosy: +Claudiu.Popa

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2014-07-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Zach. I found even small regression.

Before:

$ ./python -m timeit -s x = 10  x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; 
x+x
100 loops, best of 3: 1.51 usec per loop

After:

$ ./python -m timeit -s x = 10  x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; 
x+x
100 loops, best of 3: 1.6 usec per loop

--

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



[issue16237] bdist_rpm SPEC files created with distutils may be distro specific

2014-07-16 Thread Bohuslav Slavek Kabrda

Bohuslav Slavek Kabrda added the comment:

Hi, so I'm not sure I understand this correctly. AFAICS there are two patches 
in issue 14443 that are, to certain degree, independent. As for the patch that 
overrides __os_install_post [1], that is no longer needed in RHEL 7, since the 
line

/usr/lib/rpm/brp-python-bytecompile \

in RHEL 6 RPM has been replaced by

/usr/lib/rpm/brp-python-bytecompile %{__python} 
%{?_python_bytecompile_errors_terminate_build} \

in RHEL 7 RPM. The other patch referenced from that issue that defines macro 
__python to self.python (meaning either sys.executable or python3) [2] is 
still needed, I believe.

I hope that this answers the question.

[1] http://hg.python.org/cpython/rev/a9a12ad553f0
[2] http://hg.python.org/cpython/rev/3d61e27cc570

--

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2014-07-16 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


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

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2014-07-16 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


Added file: http://bugs.python.org/file35965/inline.patch

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2014-07-16 Thread STINNER Victor

STINNER Victor added the comment:

bench_long.py: micro-benchmark for x+y. I confirm a slow down with 21955.patch. 
IMO you should at least inline PyLong_AsLong() which can be simplified if the 
number has 0 or 1 digit. Here is my patch inline.patch which is  21955.patch  
with PyLong_AsLong() inlined.

Benchmark result (patch=21955.patch, inline=inline.patch):

Common platform:
Timer precision: 40 ns
CFLAGS: -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g 
-fwrapv -O3 -Wall -Wstrict-prototypes
Timer info: namespace(adjustable=False, 
implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, 
resolution=1e-09)
Bits: int=32, long=64, long long=64, size_t=64, void*=64
Timer: time.perf_counter
Python unicode implementation: PEP 393
CPU model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
Platform: Linux-3.14.8-200.fc20.x86_64-x86_64-with-fedora-20-Heisenbug

Platform of campaign orig:
Date: 2014-07-16 10:04:27
Python version: 3.5.0a0 (default:08b3ee523577, Jul 16 2014, 10:04:23) [GCC 
4.8.2 20131212 (Red Hat 4.8.2-7)]
SCM: hg revision=08b3ee523577 tag=tip branch=default date=2014-07-15 13:23 
+0300

Platform of campaign patch:
Date: 2014-07-16 10:04:01
Python version: 3.5.0a0 (default:08b3ee523577+, Jul 16 2014, 10:02:12) [GCC 
4.8.2 20131212 (Red Hat 4.8.2-7)]
SCM: hg revision=08b3ee523577+ tag=tip branch=default date=2014-07-15 13:23 
+0300

+-+--
Tests   |    orig | patch
+-+--
1+2 |   23 ns (*) | 24 ns
1+2 ran 100 times | 1.61 us (*) | 1.74 us (+7%)
+-+--
Total   | 1.64 us (*) | 1.76 us (+7%)
+-+--

--
Added file: http://bugs.python.org/file35964/bench_long.py

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2014-07-16 Thread STINNER Victor

STINNER Victor added the comment:

bench_long.py: micro-benchmark for x+y. I confirm a slow down with 21955.patch. 
IMO you should at least inline PyLong_AsLong() which can be simplified if the 
number has 0 or 1 digit. Here is my patch inline.patch which is  21955.patch  
with PyLong_AsLong() inlined.

Benchmark result (patch=21955.patch, inline=inline.patch):

Common platform:
Platform: Linux-3.14.8-200.fc20.x86_64-x86_64-with-fedora-20-Heisenbug
CPU model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
Bits: int=32, long=64, long long=64, size_t=64, void*=64
CFLAGS: -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g 
-fwrapv -O3 -Wall -Wstrict-prototypes
Timer info: namespace(adjustable=False, 
implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, 
resolution=1e-09)
Python unicode implementation: PEP 393
Timer: time.perf_counter

Platform of campaign orig:
Date: 2014-07-16 10:04:27
Python version: 3.5.0a0 (default:08b3ee523577, Jul 16 2014, 10:04:23) [GCC 
4.8.2 20131212 (Red Hat 4.8.2-7)]
SCM: hg revision=08b3ee523577 tag=tip branch=default date=2014-07-15 13:23 
+0300
Timer precision: 40 ns

Platform of campaign patch:
Timer precision: 40 ns
Date: 2014-07-16 10:04:01
Python version: 3.5.0a0 (default:08b3ee523577+, Jul 16 2014, 10:02:12) [GCC 
4.8.2 20131212 (Red Hat 4.8.2-7)]
SCM: hg revision=08b3ee523577+ tag=tip branch=default date=2014-07-15 13:23 
+0300

Platform of campaign inline:
Timer precision: 31 ns
Date: 2014-07-16 10:11:21
Python version: 3.5.0a0 (default:08b3ee523577+, Jul 16 2014, 10:10:48) [GCC 
4.8.2 20131212 (Red Hat 4.8.2-7)]
SCM: hg revision=08b3ee523577+ tag=tip branch=default date=2014-07-15 13:23 
+0300

+-+---+---
Tests   |    orig | patch | inline
+-+---+---
1+2 |   23 ns (*) | 24 ns |   21 ns (-12%)
1+2 ran 100 times | 1.61 us (*) | 1.74 us (+7%) | 1.39 us (-14%)
+-+---+---
Total   | 1.64 us (*) | 1.76 us (+7%) | 1.41 us (-14%)
+-+---+---

(I removed my message because I posted the wrong benchmark output, inline 
column was missing.)

--

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



[issue21901] test_selectors.PollSelectorTestCase.test_above_fd_setsize reported killed by shell

2014-07-16 Thread STINNER Victor

STINNER Victor added the comment:

 rdmurray@pydev:~/python/p34python -c 'import resource; 
 print(resource.getrlimit(resource.RLIMIT_NOFILE))'
 (1024L, 1048576L)

Oh, 1 million files is much bigger than 4 thousand files (4096).

The test should only test FD_SETSIZE + 10 files, the problem is to get 
FD_SETSITE:

# A scalable implementation should have no problem with more than
# FD_SETSIZE file descriptors. Since we don't know the value, we just
# try to set the soft RLIMIT_NOFILE to the hard RLIMIT_NOFILE ceiling.

For example, on my Linux FD_SETSIZE is 1024, whereas the hard limit of 
RLIMIT_NOFILE is 4096.

/usr/include/linux/posix_types.h:#define __FD_SETSIZE   1024

Maybe we can simply expose the FD_SETSIZE constant in the select module? The 
constant is useful when you use select.select(), which is still heavily used on 
Windows.

--

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



[issue21985] test_asyncio prints some junk

2014-07-16 Thread STINNER Victor

STINNER Victor added the comment:

Task was destroyed but it is pending! messages come from the issue #21163, I 
know that I have to make these messages quiet and I don't know yet how to fix 
this.

Read pipe 9 connected: ... until the end output was specific to the issue 
#21645. I created a dedicated repository to investigate this issue. It looks 
like a severe race condition in signal handling when there are more than 1 
thread on FreeBSD.

--

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



[issue21645] Race condition in signal handling on FreeBSD

2014-07-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1ff9ce2204ee by Victor Stinner in branch 'default':
Issue #21645, #21985: Remove debug code
http://hg.python.org/cpython/rev/1ff9ce2204ee

--

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



[issue21985] test_asyncio prints some junk

2014-07-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1ff9ce2204ee by Victor Stinner in branch 'default':
Issue #21645, #21985: Remove debug code
http://hg.python.org/cpython/rev/1ff9ce2204ee

--
nosy: +python-dev

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



[issue21985] test_asyncio prints some junk

2014-07-16 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
components: +asyncio

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



[issue21645] asyncio: Race condition in signal handling on FreeBSD

2014-07-16 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
title: Race condition in signal handling on FreeBSD - asyncio: Race condition 
in signal handling on FreeBSD

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



[issue21988] Decrease iterating overhead it timeit

2014-07-16 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Currently timeit has significant iterating overhead when tests fast statements. 
Such overhead makes hard to measure effects of microoptimizations. To decrease 
overhead and get more precise results we should repeat tested statement many 
times:

$ ./python -m timeit -s x=10  x+x
100 loops, best of 3: 0.2 usec per loop
$ ./python -m timeit -s x=10  x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; 
x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; 
x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; 
x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; 
x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; 
x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; 
x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x; x+x
10 loops, best of 3: 14.6 usec per loop

Proposed patch makes it automatically for user. It unrolls and vectorize the 
loop, and decreases iterating overhead 1000 times:

$ ./python -m timeit -s x=10  x+x
1000 loops, best of 3: 0.141 usec per loop

An user gets precision value without explicit cumbersome repeating.

--
components: Library (Lib)
files: timeit_unroll_loops.patch
keywords: patch
messages: 223185
nosy: georg.brandl, haypo, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Decrease iterating overhead it timeit
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35966/timeit_unroll_loops.patch

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



[issue21955] ceval.c: implement fast path for integers with a single digit

2014-07-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Confirmed speed up about 20%. Surprisingly it affects even integers outside of 
the of preallocated small integers (-5...255).

Before:

$ ./python -m timeit -s x=10  x+x
1000 loops, best of 3: 0.143 usec per loop
$ ./python -m timeit -s x=1000  x+x
100 loops, best of 3: 0.247 usec per loop

After:

$ ./python -m timeit -s x=10  x+x
1000 loops, best of 3: 0.117 usec per loop
$ ./python -m timeit -s x=1000  x+x
100 loops, best of 3: 0.209 usec per loop

All measures are made with modified timeit (issue21988).

--

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



[issue21988] Decrease iterating overhead in timeit

2014-07-16 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
title: Decrease iterating overhead it timeit - Decrease iterating overhead in 
timeit

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



[issue21988] Decrease iterating overhead in timeit

2014-07-16 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Looks good, but I think it is better to have an unroll option rather than do 
it automatically. I'm okay with the default being to unroll, but sometimes I 
want to compare the speed between different versions of Python, and having 
unroll=False to ensure the same behaviour between versions would be good.

--
nosy: +steven.daprano

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



[issue16237] bdist_rpm SPEC files created with distutils may be distro specific

2014-07-16 Thread Nick Coghlan

Nick Coghlan added the comment:

Thanks Slavek. That means this bug doesn't affect RHEL 7 or CentOS 7, and if it 
affects the Python 3 software collections on RHEL/CentOS 6, we can potentially 
deal with it on the collection side of things.

Accordingly, closing this as a problem for downstream to deal with.

Thanks for the prompt, Mark.

--
resolution:  - wont fix
stage: needs patch - resolved
status: open - closed

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



[issue21965] Add support for Memory BIO to _ssl

2014-07-16 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy: +haypo

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



[issue21927] BOM appears in stdin when using Powershell

2014-07-16 Thread Jason R. Coombs

Jason R. Coombs added the comment:

Here I use the british pound symbol to attempt to answer that question. I've 
disabled the environment variable PYTHONIOENCODING and not set any code page or 
loaded any other Powershell profile settings.

PS C:\Users\jaraco echo £
£
PS C:\Users\jaraco chcp
Active code page: 437
PS C:\Users\jaraco echo £ | py -3 -c import sys; 
print(repr(sys.stdin.read()))
'?\n'
PS C:\Users\jaraco chcp 65001
Active code page: 65001
PS C:\Users\jaraco echo £ | py -3 -c import sys; 
print(repr(sys.stdin.read()))
'?\n'
PS C:\Users\jaraco echo £ | py -3 -c import sys; 
print(repr(sys.stdin.buffer.read()))
b'?\r\n'

Curiously, it appears as if powershell is actually receiving a question mark 
from the pipe.

--

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



[issue21965] Add support for Memory BIO to _ssl

2014-07-16 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
components: +Extension Modules
nosy: +ezio.melotti
stage:  - patch review

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



[issue21988] Decrease iterating overhead in timeit

2014-07-16 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Indeed, what's good for CPython may be quite annoying for e.g. a JIT-enabled 
Python implementation. I wonder what the PyPy developers think about this.

--
nosy: +alex, pitrou

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



[issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers.

2014-07-16 Thread Martin v . Löwis

Martin v. Löwis added the comment:

LGTM

--

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



[issue21927] BOM appears in stdin when using Powershell

2014-07-16 Thread STINNER Victor

STINNER Victor added the comment:

Please use ascii() instead of repr() in your test to identify who
replaces characters with question marks.

--

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



[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Martin v . Löwis

Martin v. Löwis added the comment:

I agree with Claudiu. IDLE should pickle with a private dispatch_table.

--
nosy: +loewis

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



[issue21927] BOM appears in stdin when using Powershell

2014-07-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Bytes repr doesn't contains non-ascii characters, therefore Python is actually 
receiving a question mark from the pipe.

What are results of following commands?

py -3 -c import sys; sys.stdout.buffer.write(bytes(range(128, 256)))

py -3 -c import sys; sys.stdout.buffer.write(bytes(range(128, 256))) | py -3 
-c import sys; b = sys.stdin.buffer.read(); print(len(b), b)

--

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



[issue21989] Missing (optional) argument `start` and `end` in documentation for list.index

2014-07-16 Thread SylvainDe

New submission from SylvainDe:

From :

https://docs.python.org/2/tutorial/datastructures.html and
https://docs.python.org/3.4/tutorial/datastructures.html (and all other 
versions) :


list.index(x)

Return the index in the list of the first item whose value is x. It is 
an error if there is no such item.


From `help(list)` :


 |  index(...)
 |  L.index(value, [start, [stop]]) - integer -- return first index of 
value.
 |  Raises ValueError if the value is not present.


Thus, second and third parameter are undocumented.

--
assignee: docs@python
components: Documentation
files: list_index_start_end.patch
keywords: patch
messages: 223195
nosy: SylvainDe, docs@python
priority: normal
severity: normal
status: open
title: Missing (optional) argument `start` and `end` in documentation for 
list.index
type: enhancement
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file35967/list_index_start_end.patch

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



[issue13023] argparse should allow displaying argument default values in addition to setting a formatter class

2014-07-16 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy: +paul.j3
versions: +Python 3.5 -Python 3.3

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



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2014-07-16 Thread Zachary Ware

Zachary Ware added the comment:

This appears to me to be a well-documented Windows bug with a clear, documented 
fix, and I am not able to reproduce it so I'm not sure if it's even still 
relevant.  Closing the issue.

--
resolution:  - third party
stage:  - resolved
status: open - closed
versions:  -Python 2.6

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



[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread ppperry

Changes by ppperry maprea...@olum.org:


--
components: +Windows

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



[issue12284] argparse.ArgumentParser: usage example option

2014-07-16 Thread Mark Lawrence

Mark Lawrence added the comment:

@Jonas do you wish to follow up on this?

--
nosy: +BreamoreBoy, paul.j3

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



[issue9399] Provide a 'print' action for argparse

2014-07-16 Thread Mark Lawrence

Mark Lawrence added the comment:

@Paul what is your take on this, other opinions seem positive?

--
nosy: +BreamoreBoy, paul.j3
versions: +Python 3.5 -Python 3.3

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



[issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers.

2014-07-16 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8b3f7aecdf85 by Tal Einat in branch '3.4':
Issue #21765: Add support for non-ascii identifiers to HyperParser
http://hg.python.org/cpython/rev/8b3f7aecdf85

New changeset 73a8c614af4d by Tal Einat in branch 'default':
Issue #21765: Add support for non-ascii identifiers to HyperParser
http://hg.python.org/cpython/rev/73a8c614af4d

--
nosy: +python-dev

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



[issue16283] ctypes.util.find_library does not find all DLLs anymore

2014-07-16 Thread Mark Lawrence

Mark Lawrence added the comment:

Works fine for me.

Python build: 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) [MSC v.1600 32 
bit (Intel)]
Path 'C:\Windows\system32' exists in $PATH: True
File 'C:\Windows\system32\acledit.dll' exists: True
ctypes says for 'acledit.dll': C:\Windows\system32\acledit.dll
ctypes says for 'acledit': C:\Windows\system32\acledit.dll

--
components: +Windows
nosy: +BreamoreBoy

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



[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Claudiu Popa

Claudiu Popa added the comment:

Maybe something like the attached patch. It doesn't have tests, though, I 
didn't find any tests for the idlelib.rpc anyway.

--
keywords: +patch
Added file: http://bugs.python.org/file35968/idlelib.patch

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



[issue21765] Idle: make 3.x HyperParser work with non-ascii identifiers.

2014-07-16 Thread Tal Einat

Tal Einat added the comment:

Fix committed to 3.4 and merged to default. (My first commit!)

Not back-porting this to 2.7 despite PEP 434, because support for non-ASCII 
identifiers only exists in 3.x.

Close this issue as fixed!

--

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



[issue16892] Windows bug picking up stdin from a pipe

2014-07-16 Thread Mark Lawrence

Mark Lawrence added the comment:

@Robert we're sorry about the delay in getting back to you.  Sorry Windows 
gurus this is over my head :(

--
nosy: +BreamoreBoy, steve.dower, tim.golden, zach.ware

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



[issue21815] imaplib truncates some untagged responses

2014-07-16 Thread R. David Murray

R. David Murray added the comment:

Just to make sure I understand: the issue is that gmail may produce flags with 
[] in them, and imaplib currently fails to process such flags when it receives 
them from gmail?  

In principle I think we would not want to allow imaplib to be used to create 
such flags unless the user specifies some sort of I want to violate the RFC 
flag (which they might want to do, for example, to run tests against gmail :)  
But currently it looks like it can?  (I haven't looked at this in enough detail 
to be sure.)  If that's true we probably have to continue to allow it for 
backward compatibility reasons, but we should document the RFC violation and 
possible consequences (an IMAP server rejecting such flags).

--

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



[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Instead of copying dispatch_table, use ChainMap.

--
nosy: +serhiy.storchaka

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



[issue21931] Nonsense errors reported by msilib.FCICreate for bad argument

2014-07-16 Thread R. David Murray

R. David Murray added the comment:

mslib doesn't have many tests, but it looks like it would be easy enough to add 
one for this?

--
nosy: +r.david.murray

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



[issue21815] imaplib truncates some untagged responses

2014-07-16 Thread Rafał Stożek

Rafał Stożek added the comment:

Yeah, basically. The flags with [] characters are added to gmail (in my
case) by OtherInbox's Organizer app. I contacted them but haven't heard
back yet.

On Wed, Jul 16, 2014 at 4:07 PM, R. David Murray rep...@bugs.python.org
wrote:


 R. David Murray added the comment:

 Just to make sure I understand: the issue is that gmail may produce flags
 with [] in them, and imaplib currently fails to process such flags when it
 receives them from gmail?

 In principle I think we would not want to allow imaplib to be used to
 create such flags unless the user specifies some sort of I want to violate
 the RFC flag (which they might want to do, for example, to run tests
 against gmail :)  But currently it looks like it can?  (I haven't looked at
 this in enough detail to be sure.)  If that's true we probably have to
 continue to allow it for backward compatibility reasons, but we should
 document the RFC violation and possible consequences (an IMAP server
 rejecting such flags).

 --

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue21815
 ___


--

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



[issue21986] Pickleability of code objects is inconsistent

2014-07-16 Thread Claudiu Popa

Claudiu Popa added the comment:

Thanks, Serhiy.

--
Added file: http://bugs.python.org/file35969/issue21986.patch

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



[issue21990] saxutils defines an inner class where a normal one would do

2014-07-16 Thread Alex Gaynor

New submission from Alex Gaynor:

This makes things slower than they need to be (yes, even on CPython :-)), and 
is slightly confusing since usually inner classes are only used when a closure 
is needed.

Attached patch simply moves the class definition.

--
components: Library (Lib)
files: sax.diff
keywords: patch
messages: 223209
nosy: alex
priority: normal
severity: normal
status: open
title: saxutils defines an inner class where a normal one would do
versions: Python 2.7
Added file: http://bugs.python.org/file35970/sax.diff

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



[issue12806] argparse: Hybrid help text formatter

2014-07-16 Thread Mark Lawrence

Mark Lawrence added the comment:

Apparently #13923 is related to this.

--
nosy: +BreamoreBoy

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



[issue21991] The new email API should use MappingProxyType instead of returning new dicts.

2014-07-16 Thread R. David Murray

New submission from R. David Murray:

There are a few places in the new email API where dicts are returned containing 
what is conceptually static information.  Currently this is done by returning a 
copy of the dict from the object, so that user code modifying the dict won't 
break the object invariants.  It would be better to change these to 
MappingProxyType objects instead, before the API moves out of provisional 
status.

This issue is mostly a note to myself, since I'm the most likely to be able to 
figure out which places in the code need changing, but if anyone else wants to 
look at it feel free, since it will probably be a while before I get to it.

--
components: email
keywords: easy
messages: 223211
nosy: barry, r.david.murray
priority: normal
severity: normal
stage: needs patch
status: open
title: The new email API should use MappingProxyType instead of returning new 
dicts.
type: behavior
versions: Python 3.5

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



[issue13923] new formatter for argparse

2014-07-16 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy: +paul.j3
versions: +Python 3.5 -Python 3.3

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



[issue21988] Decrease iterating overhead in timeit

2014-07-16 Thread Alex Gaynor

Alex Gaynor added the comment:

I think this is likely to make timeit less representative of how code actually 
performs in the real world on systems with a JIT. This is because of the cost 
of sequential operations is not strictly additive on PyPy.

If you have statements `a` and `b`, and you run `a; b` on PyPy, the performance 
of `a; b` is usually faster than the sum of `a`, `b`, assuming they are not 
100% independent.

This is because the JIT will be able to remove type checks that were already 
performed. Since this just repeats the same statement, the cost of the unrolled 
iterations beyond the first will be massively lower in many cases, producing 
confusing results.

--

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



[issue21988] Decrease iterating overhead in timeit

2014-07-16 Thread