[issue22364] Improve some re error messages using regex for hints

2014-11-02 Thread Raymond Hettinger

Raymond Hettinger added the comment:

+1

--
nosy: +rhettinger

___
Python tracker 

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



[issue17900] Recursive OrderedDict pickling

2014-11-02 Thread Raymond Hettinger

Raymond Hettinger added the comment:

This patch caused a regression by breaking designed-in support for pickling 
using PyYAML (note, there was a test for yaml support, but this patch defeated 
the test).  As a result of the patch, ordering now gets lost during a dump/load 
roundtrip.

This change should not have been committed without my review (I would have 
caught the problem instantly).

--
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open
type: enhancement -> behavior
versions: +Python 3.5
Added file: http://bugs.python.org/file37103/test_yaml.py

___
Python tracker 

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



[issue16056] shadowed test names in std lib regression tests

2014-11-02 Thread Berker Peksag

Berker Peksag added the comment:

I think my patch is wrong.

test_weak_destroy_while_iterating and 
test_weak_destroy_and_mutate_while_iterating tests were committed as part of 
issue 7105 to 2.7 (see changeset 
https://hg.python.org/cpython/rev/03fcc12282fc). But, those same tests(they 
uses SomeClass instead of UserString) were also backported to 2.7 in 
https://hg.python.org/cpython/rev/04cc075bddf5

Here is a new patch.

--
components: +Tests -Library (Lib)
stage: commit review -> patch review
versions:  -Python 3.4, Python 3.5
Added file: http://bugs.python.org/file37104/issue16056_27_v2.diff

___
Python tracker 

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



[issue17900] Recursive OrderedDict pickling

2014-11-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Can you explain what is broken independently of PyYAML?

--

___
Python tracker 

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



[issue22695] open() declared deprecated in python 3 docs

2014-11-02 Thread Berker Peksag

Berker Peksag added the comment:

Here is a new patch. Thanks for the review, Serhiy.

--
Added file: http://bugs.python.org/file37105/issue22695_v2.diff

___
Python tracker 

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



[issue9771] add an optional "default" argument to tokenize.detect_encoding

2014-11-02 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue22293] unittest.mock: use slots in MagicMock to reduce memory footprint

2014-11-02 Thread Ezio Melotti

Ezio Melotti added the comment:

James, could you check again with a recent Python and see if the #11798 fix 
makes things any better?

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue22317] action argument is not documented in argparse add_subparser() docs

2014-11-02 Thread Ezio Melotti

Changes by Ezio Melotti :


--
keywords: +easy
nosy: +bethard
stage:  -> needs patch
type:  -> enhancement

___
Python tracker 

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



[issue17900] Recursive OrderedDict pickling

2014-11-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh, sorry, I did not notice test_yaml_linkage. And in any case this test was 
broken (should be rv[1][0] instead of rv[1]).

I don't like to revert these changes, and the reversion can break a code 
written for 3.4 which pickles recursive OrderedDicts. I suggest following 
solution. PyYAML calls __reduce_ex_(2) or __reduce__(). Therefore we can return 
to old behavior with protocol < 3 and left current behavior with protocol >= 3. 
Recursive OrderedDicts will be pickleable with default protocol and with 
highest protocol, and PyYAML will be happy.

Does this patch look good to your?

--
stage: needs patch -> patch review
Added file: http://bugs.python.org/file37106/OrderedDict_pickle_PyYAML.patch

___
Python tracker 

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



[issue22695] open() declared deprecated in python 3 docs

2014-11-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

On my superficial view the patch looks good. But I am not well known with 
Sphinx code.

--

___
Python tracker 

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



[issue22364] Improve some re error messages using regex for hints

2014-11-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Add additional attributes to re.error, Other mentions of the 
buffer protocol

___
Python tracker 

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



[issue22697] Deadlock with writing to stderr from forked process

2014-11-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Locks in the standard library should be sanitized on fork

___
Python tracker 

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



[issue22335] Python 3: Segfault instead of MemoryError when bytearray too big

2014-11-02 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti

___
Python tracker 

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



[issue16662] load_tests not invoked in package/__init__.py

2014-11-02 Thread Ezio Melotti

Changes by Ezio Melotti :


--
stage:  -> resolved

___
Python tracker 

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



[issue22344] Reorganize unittest.mock docs into linear manner

2014-11-02 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> needs patch

___
Python tracker 

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



[issue22697] Deadlock with writing to stderr from forked process

2014-11-02 Thread Maries Ionel Cristian

Maries Ionel Cristian added the comment:

Serhiy, I don't think this is a duplicate. Odd that you closed this without any 
explanation.

This happens in a internal lock in cpython's runtime, while the other bug is 
about locks used in the logging module (which are very different).

--
resolution: duplicate -> 
status: closed -> open

___
Python tracker 

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



[issue22783] Pickle: use NEWOBJ instead of NEWOBJ_EX if possible

2014-11-02 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Currently in pickle with protocol 4 the NEWOBJ_EX opcode is used to reconstruct 
objects with __getnewargs__() or __getnewargs_ex__() even if there no keyword 
arguments.

>>> import pickle, pickletools, collections
>>> P = collections.namedtuple('P', 'x y')
>>> pickletools.dis(pickle.dumps(P(12, 34), 3))
0: \x80 PROTO  3
2: cGLOBAL '__main__ P'
   14: qBINPUT 0
   16: KBININT112
   18: KBININT134
   20: \x86 TUPLE2
   21: qBINPUT 1
   23: \x81 NEWOBJ
   24: qBINPUT 2
   26: .STOP
highest protocol among opcodes = 2
>>> pickletools.dis(pickle.dumps(P(12, 34), 4))
0: \x80 PROTO  4
2: \x95 FRAME  28
   11: \x8c SHORT_BINUNICODE '__main__'
   21: \x94 MEMOIZE
   22: \x8c SHORT_BINUNICODE 'P'
   25: \x94 MEMOIZE
   26: \x93 STACK_GLOBAL
   27: \x94 MEMOIZE
   28: KBININT112
   30: KBININT134
   32: \x86 TUPLE2
   33: \x94 MEMOIZE
   34: }EMPTY_DICT
   35: \x94 MEMOIZE
   36: \x92 NEWOBJ_EX
   37: \x94 MEMOIZE
   38: .STOP
highest protocol among opcodes = 4

These EMPTY_DICT//MEMOIZE//NEWOBJ_EX can be replaced by single NEWOBJ. Actually 
there is a regression in protocol 4 against protocol 3, so may be following 
patch should be applied on 3.4 too.

Here is a patch which uses __newobj__ instead of __newobj_ex__ if there are no 
keywords arguments. Also it reduce the number of lines of C code and adds tests 
for classes with __getnewargs__() and __getnewargs_ex__().

--
components: Library (Lib)
files: pickle_newobj.patch
keywords: patch
messages: 230490
nosy: alexandre.vassalotti, pitrou, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Pickle: use NEWOBJ instead of NEWOBJ_EX if possible
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file37107/pickle_newobj.patch

___
Python tracker 

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



[issue22354] Idle: highlite tabs

2014-11-02 Thread Ezio Melotti

Ezio Melotti added the comment:

> Possible ways to highlite is to have a light grey: 
> <--> 
> » (at the beginning of the tab)

FWIW the latter (») is what I usually see used, with a lighter color to 
distinguish it from regular text.

> 3. Should tab space in comments and strings be shaded?  I think so.
> If so, should the shading match the comment/string foreground color?

Tabs in comments and strings should generally be avoided (\t can be used in 
strings), and at least for Python source I would assume they don't occur too 
frequently, so I wouldn't worry too much about this issue.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue22357] inspect module documentation makes no reference to __qualname__ attribute

2014-11-02 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +pitrou, yselivanov
stage:  -> needs patch
type: behavior -> enhancement
versions: +Python 3.5

___
Python tracker 

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



[issue22388] Unify style of "Contributed by" notes

2014-11-02 Thread Ezio Melotti

Ezio Melotti added the comment:

Patch LGTM.

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue22697] Deadlock with writing to stderr from forked process

2014-11-02 Thread Charles-François Natali

Charles-François Natali added the comment:

> Maries Ionel Cristian added the comment:
>
> Serhiy, I don't think this is a duplicate. Odd that you closed this without 
> any explanation.
>
> This happens in a internal lock in cpython's runtime, while the other bug is 
> about locks used in the logging module (which are very different).

Yes, this is a duplicate. Whether the lock is an internal or a user-created one 
doesn't change anything, it's always the same problem of having a lock locked 
by another thread at the time of the fork().

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue22697] Deadlock with writing to stderr from forked process

2014-11-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry. I thought issue6721 is more general, not just about the logging module.

--

___
Python tracker 

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



[issue22525] ast.literal_eval() doesn't do what the documentation says

2014-11-02 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +ezio.melotti
stage:  -> patch review
type:  -> enhancement

___
Python tracker 

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



[issue22558] Missing hint to source code - complete

2014-11-02 Thread Ezio Melotti

Ezio Melotti added the comment:

The source links have been added where the code proved to be readable, easy to 
understand, and self documenting, and have been omitted when the code is 
complicated and not self documenting.  This has been done under the assumption 
that reading the code might help understanding the documentation, but there are 
other situations where users might want to see the code regardless of how 
readable it is, so I wouldn't object if you decide to add links to all the 
modules.

--
nosy: +ezio.melotti
stage:  -> needs patch
type:  -> enhancement
versions: +Python 3.4, Python 3.5

___
Python tracker 

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



[issue22335] Python 3: Segfault instead of MemoryError when bytearray too big

2014-11-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

"logical_offset + 1" can't overflow because logical_offset is an offset in 
allocated array not counting final null byte.

--

___
Python tracker 

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



[issue22335] Python 3: Segfault instead of MemoryError when bytearray too big

2014-11-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Note that there are two possible crashes in debug mode:

$ ./python -c "bytearray(2**31-1)"
Erreur de segmentation

$ ./python -c "bytearray(2**31-2)"
python: Objects/obmalloc.c:1179: _PyObject_Alloc: Assertion `nelem <= 
((Py_ssize_t)(((size_t)-1)>>1)) / elsize' failed.
Abandon

--

___
Python tracker 

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



[issue22612] Add block info to unicodedata

2014-11-02 Thread Ezio Melotti

Ezio Melotti added the comment:

I needed this in the past and had to implement it myself, so adding it to 
unicodedata might be OK.  A script to generate the list of blocks from the 
official Unicode files should probably be created and used whenever we update 
the version of the Unicode database.

--
components: +Unicode
nosy: +ezio.melotti, haypo
stage:  -> needs patch

___
Python tracker 

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



[issue22317] action argument is not documented in argparse add_subparser() docs

2014-11-02 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +paul.j3
versions: +Python 3.4, Python 3.5

___
Python tracker 

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



[issue22671] Typo in class io.BufferedIOBase docs

2014-11-02 Thread Ezio Melotti

Changes by Ezio Melotti :


--
keywords: +easy
nosy: +pitrou
stage:  -> needs patch
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue22335] Python 3: Segfault instead of MemoryError when bytearray too big

2014-11-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Here is a patch. It also fixes a bug in the debug allocators, which didn't 
properly check for Py_ssize_t overflow.

--
Added file: http://bugs.python.org/file37108/ba_resize.patch

___
Python tracker 

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



[issue22335] Python 3: Segfault instead of MemoryError when bytearray too big

2014-11-02 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
components: +Interpreter Core
stage: needs patch -> patch review

___
Python tracker 

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



[issue22716] Add reference to the object missing an attribute to AttributeError

2014-11-02 Thread Ezio Melotti

Ezio Melotti added the comment:

I think we should be pursued together with #18156, so I'm going to close this.  
Serhiy already added a reference to this issue there.

--
nosy: +ezio.melotti
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue18156] Add an 'attr' attribute to AttributeError

2014-11-02 Thread Ezio Melotti

Ezio Melotti added the comment:

I closed #22716 in favor of this, since I think both should be tackled together.

--

___
Python tracker 

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



[issue22784] test_asyncio fails without the ssl module

2014-11-02 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Patch attached. I don't know whether this applies to 3.4 as well.

--
components: Tests, asyncio
files: ssl_test_asyncio.patch
keywords: patch
messages: 230502
nosy: gvanrossum, haypo, pitrou, yselivanov
priority: normal
severity: normal
stage: patch review
status: open
title: test_asyncio fails without the ssl module
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file37109/ssl_test_asyncio.patch

___
Python tracker 

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



[issue6721] Locks in the standard library should be sanitized on fork

2014-11-02 Thread Maries Ionel Cristian

Changes by Maries Ionel Cristian :


--
nosy: +ionel.mc

___
Python tracker 

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



[issue18156] Add an 'attr' attribute to AttributeError

2014-11-02 Thread flying sheep

flying sheep added the comment:

yeah, exactly: my idea was to add a reference to the original object 
(AttributeError.target). together with this bug, that would be the 
AttributeError part of PEP 473, which i really like!

--
nosy: +flying sheep

___
Python tracker 

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



[issue22716] Add reference to the object missing an attribute to AttributeError

2014-11-02 Thread flying sheep

flying sheep added the comment:

sure, go ahead! i wasn’t aware of PEP nor issue, so sorry for filing a dupe.

--

___
Python tracker 

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



[issue22335] Python 3: Segfault instead of MemoryError when bytearray too big

2014-11-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
stage: patch review -> commit review

___
Python tracker 

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



[issue22751] Fix test___all__ warning about modified environment

2014-11-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 37ed6eed0595 by Ezio Melotti in branch '3.4':
#22751: fix test___all__ warning about modified environment in the tests.  
Patch by Michael Cetrulo.
https://hg.python.org/cpython/rev/37ed6eed0595

New changeset 16dfefe67c1f by Ezio Melotti in branch '2.7':
#22751: fix test___all__ warning about modified environment in the tests.  
Patch by Michael Cetrulo.
https://hg.python.org/cpython/rev/16dfefe67c1f

New changeset 3c030e4da7c6 by Ezio Melotti in branch 'default':
#22751: merge with 3.4.
https://hg.python.org/cpython/rev/3c030e4da7c6

--
nosy: +python-dev

___
Python tracker 

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



[issue22388] Unify style of "Contributed by" notes

2014-11-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e3825486da53 by Serhiy Storchaka in branch '3.4':
Issue #22388: Unified the style of "Contributed by" sentences in What's New.
https://hg.python.org/cpython/rev/e3825486da53

New changeset 5f10a4a1e4df by Serhiy Storchaka in branch 'default':
Issue #22388: Unified the style of "Contributed by" sentences in What's New.
https://hg.python.org/cpython/rev/5f10a4a1e4df

--
nosy: +python-dev

___
Python tracker 

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



[issue22388] Unify style of "Contributed by" notes

2014-11-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Ezio for your review.

--

___
Python tracker 

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



[issue22388] Unify style of "Contributed by" notes

2014-11-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee: docs@python -> serhiy.storchaka
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue22335] Python 3: Segfault instead of MemoryError when bytearray too big

2014-11-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thank you. This is now pushed.

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue22335] Python 3: Segfault instead of MemoryError when bytearray too big

2014-11-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1590c594550e by Antoine Pitrou in branch '3.4':
Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fff bytes 
on a 32-bit platform.
https://hg.python.org/cpython/rev/1590c594550e

New changeset f0b334ae95c9 by Antoine Pitrou in branch 'default':
Issue #22335: Fix crash when trying to enlarge a bytearray to 0x7fff bytes 
on a 32-bit platform.
https://hg.python.org/cpython/rev/f0b334ae95c9

--
nosy: +python-dev

___
Python tracker 

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



[issue21650] add json.tool option to avoid alphabetic sort of fields

2014-11-02 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the suggestions.

> If you mean preserve order by default, then yes that would be a nice default.

issue21650_v3.diff implements this idea.

--
Added file: http://bugs.python.org/file37110/issue21650_v3.diff

___
Python tracker 

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



[issue22725] improve documentation for enumerate() (built-in function)

2014-11-02 Thread R. David Murray

Changes by R. David Murray :


--
keywords: +patch
Added file: http://bugs.python.org/file37111/enumerate-doc.2.7.patch

___
Python tracker 

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



[issue22725] improve documentation for enumerate() (built-in function)

2014-11-02 Thread R. David Murray

Changes by R. David Murray :


Added file: http://bugs.python.org/file37112/enumerate_doc-3.4.patch

___
Python tracker 

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



[issue22344] Reorganize unittest.mock docs into linear manner

2014-11-02 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +rbcollins

___
Python tracker 

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



[issue22417] PEP 476: verify HTTPS certificates by default

2014-11-02 Thread Alex Gaynor

Alex Gaynor added the comment:

New patch uses self-signed.pythontest.net, instead of svn.python.org. 
svn.python.org is signed by CACert, which is in the root on some machines.

--
Added file: http://bugs.python.org/file37113/issue22417.diff

___
Python tracker 

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



[issue22650] set up and use VM for net access in the test suite

2014-11-02 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Note we now have pythontest.net set up.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue22366] urllib.request.urlopen should take a "context" (SSLContext) argument

2014-11-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 13f46fc1a002 by Senthil Kumaran in branch '3.4':
backport context argument of urlopen (#22366) for pep 476
https://hg.python.org/cpython/rev/13f46fc1a002

--

___
Python tracker 

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



[issue22751] Fix test___all__ warning about modified environment

2014-11-02 Thread Ezio Melotti

Ezio Melotti added the comment:

The buildbot seems happy, so I'm going to close this.
Thanks for the patch!

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue22775] SimpleCookie not picklable with HIGHEST_PROTOCOL

2014-11-02 Thread Tim Graham

Tim Graham added the comment:

Updated patch per comments.

--
Added file: 
http://bugs.python.org/file37114/cookie-pickling-all-protocols-2.diff

___
Python tracker 

___
___
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-11-02 Thread Lita Cho

Lita Cho added the comment:

Sure, let me combine it into one change.

--

___
Python tracker 

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



[issue17896] Move Windows external libs from \..\ to \externals

2014-11-02 Thread David Bolen

David Bolen added the comment:

I noticed this issue when checking on some recent 2.7 branch failures on my 
buildbot.  It might be worth noting this change to any Windows buildbot owners 
since we all have existing trees now with a lot of stranded external folders 
that can be removed.

For what it's worth - and it's a minor concern - in a buildbot context, I 
prefer the old way.  I am much more likely to have to manipulate the build 
folder (the hg checkout/build folder on a buildbot) to deal with issues than 
any of the external folders, so it's always been very convenient to be able to 
do so easily without affecting those externals (for which causing a rebuild is 
very time consuming)

-- David

--
nosy: +db3l

___
Python tracker 

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



[issue17900] Recursive OrderedDict pickling

2014-11-02 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee: serhiy.storchaka -> rhettinger

___
Python tracker 

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



[issue22354] Idle: highlite tabs

2014-11-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I looked more into tab handling in tk and Idle. Tk uses literal tabs in text to 
position following text according to the tab stops configured with the Text 
tabs option.  Tabs stops are ultimately set to the pixel (not character), 
although one may enter distances in other units.  The following text may be 
left, right, center, or number justified with respect to the tab stop, with 
'left' the default.  I am rather sure that there is no way to tell tk to 
display a special char at the beginning of any extra space it adds. In the 
general case, there may not be enough extra to do so.

Tab handling in Idle is more confused.  They are normally converted to spaces 
in Editor windows, but in left as is and used for auto-indents in multi-line 
statements in Shell.  (The latter is a major nuisance, which I hope to remedy.) 
 There are more oddities within the editor, some probably not necessary now.  
One is that turning tabs on and off changes the tab to space replacement to 8 
instead of what it was (the default now being 4).  Another is that Idle was 
written when mixed space-and-tab indents were legal.  So a) Idle allows one to 
write illegal-in-3.x indents, and b) the code to handle tab, backspace, enter, 
indent, and dedent is probably more complicated that it would have to be if 
illegal indents were never allowed.  (The tab handling code is in 
EditorWindow.py, in 3.4.2 mostly around lines 240-260 and 1200-1300.)

Given the above, I would consider tagging tabs at least when a file is read and 
probably during editing.  Since indents are the major concern, I would not 
worry much about what happens elsewhere.
---

Successive tabs could be differentiated by having two tab tags with different 
background colors and alternate their use.  The following does this with a 
sample line.

import tkinter as tk
root = tk.Tk()
text = tk.Text(root)
text.pack()

text.tag_config('TAB0', background='#fed')  # light yellow
text.tag_config('TAB1', background='#eef')  # light blue
ttags = ('TAB0', 'TAB1')
tdex = 0

line = 'a\t\t\t b'
text.insert('insert', line)
for i, c in enumerate(line):
if c == '\t':
text.tag_add(ttags[tdex], '1.%d'%i, '1.%d'%(i+1))
tdex ^=1

--

___
Python tracker 

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



[issue22775] SimpleCookie not picklable with HIGHEST_PROTOCOL

2014-11-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
assignee:  -> serhiy.storchaka
stage: patch review -> commit review

___
Python tracker 

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



[issue22775] SimpleCookie not picklable with HIGHEST_PROTOCOL

2014-11-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7be6ef737aaf by Serhiy Storchaka in branch '3.4':
Issue #22775: Fixed unpickling of http.cookies.SimpleCookie with protocol 2
https://hg.python.org/cpython/rev/7be6ef737aaf

New changeset caa8f9248ab8 by Serhiy Storchaka in branch 'default':
Issue #22775: Fixed unpickling of http.cookies.SimpleCookie with protocol 2
https://hg.python.org/cpython/rev/caa8f9248ab8

--
nosy: +python-dev

___
Python tracker 

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



[issue22775] SimpleCookie not picklable with HIGHEST_PROTOCOL

2014-11-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your contribution Tim.

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

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



[issue22775] SimpleCookie not picklable with HIGHEST_PROTOCOL

2014-11-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 515331e0ca0c by Serhiy Storchaka in branch '2.7':
Issue #22775: Fixed unpickling of Cookie.SimpleCookie with protocol 2.
https://hg.python.org/cpython/rev/515331e0ca0c

--

___
Python tracker 

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



[issue22775] SimpleCookie not unpicklable with protocol 2+

2014-11-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This affects 2.7 too.

--
title: SimpleCookie not picklable with HIGHEST_PROTOCOL -> SimpleCookie not 
unpicklable with protocol 2+
versions: +Python 2.7

___
Python tracker 

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



[issue22785] range docstring is less useful than in python 2

2014-11-02 Thread Ned Batchelder

New submission from Ned Batchelder:

The Python 3.4 docstring for range is:
{{{
 |  range(stop) -> range object
 |  range(start, stop[, step]) -> range object
 |
 |  Return a virtual sequence of numbers from start to stop by step.
}}}

In Python 2.7, it said:
{{{
range(stop) -> list of integers
range(start, stop[, step]) -> list of integers

Return a list containing an arithmetic progression of integers.
range(i, j) returns [i, i+1, i+2, ..., j-1]; start (!) defaults to 0.
When step is given, it specifies the increment (or decrement).
For example, range(4) returns [0, 1, 2, 3].  The end point is omitted!
These are exactly the valid indices for a list of 4 elements.
}}}

Note that Python 3 seems to imply that the end-point is included, while Python 
2 made clear that it was not.  "Arithmetic progression" is a bit involved, but 
it would be good to mention that the end-point is omitted in the Python 3 
docstring.

--
assignee: docs@python
components: Documentation
messages: 230525
nosy: docs@python, nedbat
priority: normal
severity: normal
status: open
title: range docstring is less useful than in python 2
versions: Python 3.4

___
Python tracker 

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



[issue22366] urllib.request.urlopen should take a "context" (SSLContext) argument

2014-11-02 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
versions: +Python 3.4

___
Python tracker 

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



[issue20351] Add doc examples for DictReader and DictWriter

2014-11-02 Thread Charles-Axel Dein

Charles-Axel Dein added the comment:

Sounds good. Do you know when this will get merged?

--

___
Python tracker 

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



[issue21759] URL Typo in Documentation FAQ

2014-11-02 Thread Mike Short

Changes by Mike Short :


--
nosy: +Mike.Short

___
Python tracker 

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



[issue22317] action argument is not documented in argparse add_subparser() docs

2014-11-02 Thread Mike Short

Changes by Mike Short :


--
nosy: +Mike.Short

___
Python tracker 

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



[issue22317] action argument is not documented in argparse add_subparser() docs

2014-11-02 Thread Mike Short

Changes by Mike Short :


Added file: http://bugs.python.org/file37116/argparse27.patch

___
Python tracker 

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



[issue22317] action argument is not documented in argparse add_subparser() docs

2014-11-02 Thread Mike Short

Mike Short added the comment:

I am uploading patches for both 2.7 as well as latest (3.x).  I only added the 
action verbiage itself in, but would it be beneficial to also add in links to 
more detailed descriptions similar to what is done in 
ArgumentParser.add_argument earlier in the argparse page?

--
keywords: +patch
Added file: http://bugs.python.org/file37115/argparse.patch

___
Python tracker 

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



[issue22784] test_asyncio fails without the ssl module

2014-11-02 Thread Guido van Rossum

Guido van Rossum added the comment:

Is something missing from the patch? I don't understand how *not* defining a 
function can make anything better. Perhaps you need to conditionally skip the 
test that uses it?

--

___
Python tracker 

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



[issue1757072] Zipfile robustness

2014-11-02 Thread era

era added the comment:

For those who cannot update just yet, see also the workaround at 
http://stackoverflow.com/a/21996397/874188

--
nosy: +era

___
Python tracker 

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