[issue23363] integer overflow in itertools.permutations

2015-02-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: open -> closed

___
Python tracker 

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



[issue23366] integer overflow in itertools.combinations

2015-02-02 Thread Serhiy Storchaka

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



[issue2786] Names in traceback should have class names, if they're methods

2015-02-02 Thread Martin Panter

Changes by Martin Panter :


--
nosy: +vadmium

___
Python tracker 

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



[issue23365] integer overflow in itertools.combinations_with_replacement

2015-02-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: open -> closed

___
Python tracker 

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



[issue23099] BytesIO and StringIO values unavailable when closed

2015-02-02 Thread Serhiy Storchaka

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



[issue23364] integer overflow in itertools.product

2015-02-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
status: open -> closed

___
Python tracker 

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



[issue22896] Don't use PyObject_As*Buffer() functions

2015-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Antoine and Stefan for your reviews.

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



[issue23099] BytesIO and StringIO values unavailable when closed

2015-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b9d4c013b09a by Serhiy Storchaka in branch 'default':
Issue #23099: Closing io.BytesIO with exported buffer is rejected now to
https://hg.python.org/cpython/rev/b9d4c013b09a

--

___
Python tracker 

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



[issue13322] buffered read() and write() does not raise BlockingIOError

2015-02-02 Thread Martin Panter

Martin Panter added the comment:

I’m adding nonblock-none.patch, which changes all the simple buffered read 
methods to return None when there is no non-blocking data available. I’d be 
interested to see if other people thought this was a sensible change.

* Documented existing behaviour of C “io” module buffered read(), readinto/1() 
returning None
* io.BufferedIOBase.read() and io.FileIO.readall() doc strings already mention 
returning None
* Removed false claims of buffered reads returning short for interactive 
streams, sockets and pipes
* Fixed _pyio return values to match C “io” module returning None
* Fixed BufferedIOBase.readinto/1() implementation to handle read/1() returning 
None
* Changed buffered read1() and peek() to return None

--
Added file: http://bugs.python.org/file37995/nonblock-none.patch

___
Python tracker 

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



[issue2786] Names in traceback should have class names, if they're methods

2015-02-02 Thread Robert Collins

Robert Collins added the comment:

I wonder if you could add this to the new code in 
http://bugs.python.org/issue17911 which I'm hoping to commit this week.

--
nosy: +rbcollins

___
Python tracker 

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



[issue2786] Names in traceback should have class names, if they're methods

2015-02-02 Thread Daniil Bondarev

Daniil Bondarev added the comment:

Made a straightforward patch for this. Probably not that pretty, so suggestions 
are welcome.

Note that some function names will become pretty long in exceptions:

>>> class A:
... def __init__(self):
... def f():
... pass
... f(1,2,3)
...
>>> A()
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 5, in __init__
TypeError: A.__init__..f() takes 0 positional arguments but 3 were given

Passing UTs from lastest snapshot.

--
keywords: +patch
nosy: +xonatius
Added file: http://bugs.python.org/file37994/full_names.patch

___
Python tracker 

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



[issue23336] Thread.LockType is misnamed

2015-02-02 Thread Josh Rosenberg

Josh Rosenberg added the comment:

The thread and dummy_thread modules have a leading underscore in Py3.4, but the 
same naming issue is present there as well.

--
nosy: +josh.r

___
Python tracker 

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



[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2015-02-02 Thread Martin Panter

Martin Panter added the comment:

New patches look fine. BTW SystemExit.code is also documented at 
.

--

___
Python tracker 

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



[issue23381] Python 2.7.9+ test_gdb regression on Ubuntu 10.04

2015-02-02 Thread Vinson Lee

New submission from Vinson Lee:

Python 2.7.9+ test_gdb regressed on Ubuntu 10.04.

063d966b78f0c0b7cf4c937991bf883c563f574e is the first bad commit
commit 063d966b78f0c0b7cf4c937991bf883c563f574e
Author: Serhiy Storchaka 
Date:   Sat Jan 31 11:48:36 2015 +0200

Issue #22765: Fixed test_gdb failures. Supressed unexpected gdb output.
Patch by Bohuslav Kabrda.

:04 04 dd420a96366b568ad8ae5e7c88759d743b29584c 
0eb56f3c2d8d731985ae93258170e00571ae9a35 M  Lib
bisect run success


$ gdb --version
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
.


$ ./python Lib/test/regrtest.py -v test_gdb
== CPython 2.7.9+ (default, Feb 2 2015, 15:48:27) [GCC 4.4.3]
==   Linux-2.6.32-71-generic-x86_64-with-debian-squeeze-sid little-endian
==   cpython/build/test_python_29238
Testing with flags: sys.flags(debug=0, py3k_warning=0, division_warning=0, 
division_new=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, 
no_user_site=0, no_site=0, ignore_environment=0, tabcheck=0, verbose=0, 
unicode=0, bytes_warning=0, hash_randomization=0)
[1/1] test_gdb
test_NULL_instance_dict (test.test_gdb.PrettyPrintTests)
Ensure that a PyInstanceObject with with a NULL in_dict is handled ... FAIL
test_NULL_ob_type (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with NULL ob_type is handled gracefully ... FAIL
test_NULL_ptr (test.test_gdb.PrettyPrintTests)
Ensure that a NULL PyObject* is handled gracefully ... FAIL
test_builtin_function (test.test_gdb.PrettyPrintTests) ... FAIL
test_builtin_method (test.test_gdb.PrettyPrintTests) ... FAIL
test_builtins_help (test.test_gdb.PrettyPrintTests)
Ensure that the new-style class _Helper in site.py can be handled ... FAIL
test_classic_class (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of classic class instances ... FAIL
test_corrupt_ob_type (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with a corrupt ob_type is handled gracefully ... FAIL
test_corrupt_tp_flags (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with a type with corrupt tp_flags is handled ... FAIL
test_corrupt_tp_name (test.test_gdb.PrettyPrintTests)
Ensure that a PyObject* with a type with corrupt tp_name is handled ... FAIL
test_dicts (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of dictionaries ... FAIL
test_exceptions (test.test_gdb.PrettyPrintTests) ... FAIL
test_frames (test.test_gdb.PrettyPrintTests) ... FAIL
test_frozensets (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of frozensets ... FAIL
test_getting_backtrace (test.test_gdb.PrettyPrintTests) ... FAIL
test_int (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of various "int" values ... FAIL
test_lists (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of lists ... FAIL
test_long (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of various "long" values ... FAIL
test_modern_class (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of new-style class instances ... FAIL
test_selfreferential_dict (test.test_gdb.PrettyPrintTests)
Ensure that a reference loop involving a dict doesn't lead proxyval ... FAIL
test_selfreferential_list (test.test_gdb.PrettyPrintTests)
Ensure that a reference loop involving a list doesn't lead proxyval ... FAIL
test_selfreferential_new_style_instance (test.test_gdb.PrettyPrintTests) ... 
FAIL
test_selfreferential_old_style_instance (test.test_gdb.PrettyPrintTests) ... 
FAIL
test_sets (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of sets ... FAIL
test_singletons (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of True, False and None ... FAIL
test_strings (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of strings ... FAIL
test_subclassing_list (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of an instance of a list subclass ... FAIL
test_subclassing_tuple (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of an instance of a tuple subclass ... FAIL
test_truncation (test.test_gdb.PrettyPrintTests)
Verify that very long output is truncated ... FAIL
test_tuples (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of tuples ... FAIL
test_unicode (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of unicode values ... FAIL
test_basic_command (test.test_gdb.PyListTests)
Verify that the "py-list" command works ... skipped 'Python was compiled with 
optimizations'
test_one_abs_arg (test.test_gdb.PyListTests)
Verify the "py-list" command with one absolute argument ... skipped 'Python was 
compiled with optimizations'
test_two_abs_args (test.test_gdb.P

[issue2292] Missing *-unpacking generalizations

2015-02-02 Thread Ethan Furman

Ethan Furman added the comment:

Thanks, Terry!  I'll do that next time -- after I make sure and re-compile.  :/

--

___
Python tracker 

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



[issue23364] integer overflow in itertools.product

2015-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 356ed025dbae by Serhiy Storchaka in branch '3.3':
Issues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
https://hg.python.org/cpython/rev/356ed025dbae

New changeset 98c720c3e061 by Serhiy Storchaka in branch '3.4':
Issues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
https://hg.python.org/cpython/rev/98c720c3e061

New changeset 4cb316fe6bf2 by Serhiy Storchaka in branch 'default':
Issues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
https://hg.python.org/cpython/rev/4cb316fe6bf2

--

___
Python tracker 

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



[issue23366] integer overflow in itertools.combinations

2015-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 356ed025dbae by Serhiy Storchaka in branch '3.3':
Issues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
https://hg.python.org/cpython/rev/356ed025dbae

New changeset 98c720c3e061 by Serhiy Storchaka in branch '3.4':
Issues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
https://hg.python.org/cpython/rev/98c720c3e061

New changeset 4cb316fe6bf2 by Serhiy Storchaka in branch 'default':
Issues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
https://hg.python.org/cpython/rev/4cb316fe6bf2

--

___
Python tracker 

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



[issue23363] integer overflow in itertools.permutations

2015-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 356ed025dbae by Serhiy Storchaka in branch '3.3':
Issues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
https://hg.python.org/cpython/rev/356ed025dbae

New changeset 98c720c3e061 by Serhiy Storchaka in branch '3.4':
Issues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
https://hg.python.org/cpython/rev/98c720c3e061

New changeset 4cb316fe6bf2 by Serhiy Storchaka in branch 'default':
Issues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
https://hg.python.org/cpython/rev/4cb316fe6bf2

--

___
Python tracker 

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



[issue22896] Don't use PyObject_As*Buffer() functions

2015-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1da9630e9b7f by Serhiy Storchaka in branch '3.4':
Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
https://hg.python.org/cpython/rev/1da9630e9b7f

New changeset 2e684ce772de by Serhiy Storchaka in branch 'default':
Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
https://hg.python.org/cpython/rev/2e684ce772de

New changeset 0024537a4687 by Serhiy Storchaka in branch 'default':
Issue #22896: Fixed using _getbuffer() in recently added _PyBytes_Format().
https://hg.python.org/cpython/rev/0024537a4687

--
nosy: +python-dev

___
Python tracker 

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



[issue23099] BytesIO and StringIO values unavailable when closed

2015-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e62d54128bd3 by Serhiy Storchaka in branch '3.4':
Issue #23099: Closing io.BytesIO with exported buffer is rejected now to
https://hg.python.org/cpython/rev/e62d54128bd3

--
nosy: +python-dev

___
Python tracker 

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



[issue23365] integer overflow in itertools.combinations_with_replacement

2015-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 356ed025dbae by Serhiy Storchaka in branch '3.3':
Issues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
https://hg.python.org/cpython/rev/356ed025dbae

New changeset 98c720c3e061 by Serhiy Storchaka in branch '3.4':
Issues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
https://hg.python.org/cpython/rev/98c720c3e061

New changeset 4cb316fe6bf2 by Serhiy Storchaka in branch 'default':
Issues #23363, #23364, #23365, #23366: Fixed itertools overflow tests.
https://hg.python.org/cpython/rev/4cb316fe6bf2

--

___
Python tracker 

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



[issue23380] Python 2.7.9 test_gdb fails on Fedora 21

2015-02-02 Thread Vinson Lee

Vinson Lee added the comment:

Python 2.7.9+ test_gdb passes on Fedora 21 with the latest 2.7 branch.

--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

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



[issue2292] Missing *-unpacking generalizations

2015-02-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Upload a .txt file if there is really too much for a message.

--

___
Python tracker 

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



python-bugs-list@python.org

2015-02-02 Thread Armin Rigo

Armin Rigo added the comment:

Converted the test into an official test, which fails; and wrote the patch for 
CPython "3.trunk" and for CPython 2.7.  Please review and commit.

--
keywords: +needs review -patch
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



python-bugs-list@python.org

2015-02-02 Thread Armin Rigo

Changes by Armin Rigo :


Added file: http://bugs.python.org/file37993/fix-weakvaluedict-2.7.diff

___
Python tracker 

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



python-bugs-list@python.org

2015-02-02 Thread Armin Rigo

Changes by Armin Rigo :


--
keywords: +patch
Added file: http://bugs.python.org/file37992/fix-weakvaluedict.diff

___
Python tracker 

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



[issue23342] run() - unified high-level interface for subprocess

2015-02-02 Thread Thomas Kluyver

Thomas Kluyver added the comment:

Third version of the patch (subprocess_run3):

- Simplifies the documentation of the trio (call, check_call, check_output) to 
describe them in terms of the equivalent run() call.
- Remove a warning about using PIPE with check_output - I believe this was 
already incorrect, since check_output uses .communicate() internally, it 
shouldn't have deadlock issues.
- Replace the implementation of check_output() with a call to run().

I didn't reimplement call or check_call - as previously discussed, they are 
more different from the code in run(), so subtly breaking things is more 
possible. They are also simpler.

--
Added file: http://bugs.python.org/file37991/subprocess_run3.patch

___
Python tracker 

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



[issue23366] integer overflow in itertools.combinations

2015-02-02 Thread Benjamin Peterson

Benjamin Peterson added the comment:

lgtm

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue23369] integer overflow in _json.encode_basestring_ascii

2015-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5c730d30ffbc by Benjamin Peterson in branch '3.3':
reduce memory usage of test (closes #23369)
https://hg.python.org/cpython/rev/5c730d30ffbc

--
status: open -> closed

___
Python tracker 

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



[issue2292] Missing *-unpacking generalizations

2015-02-02 Thread Ethan Furman

Ethan Furman added the comment:

Argh -- I applied the patch, but didn't recompile.  Doing that now...

--

___
Python tracker 

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



[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2015-02-02 Thread Jan-Philip Gehrcke

Changes by Jan-Philip Gehrcke :


Added file: http://bugs.python.org/file37990/issue6634_py27.patch

___
Python tracker 

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



[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2015-02-02 Thread Jan-Philip Gehrcke

Changes by Jan-Philip Gehrcke :


Removed file: http://bugs.python.org/file37983/issue6634_py27.patch

___
Python tracker 

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



[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2015-02-02 Thread Jan-Philip Gehrcke

Jan-Philip Gehrcke added the comment:

> Regarding the documentation patch: I like to start sentences
> with a capital letter. Perhaps change it to start
> “Calling :func:`exit` only terminates . . .”.

Thanks for feedback. Have now used "Invocation of " to not repeat "call*" 
in the sentence, because I left the "when called from the main thread" part 
unchanged. Okay?

> With the code change patch, it might be neater to use
> the SystemExit.code attribute rather than e.args[0].

Oh, thanks. Was not aware of the existence of the `code` attribute. If anyone 
else was wondering: existence and behavior are defined in Objects/exceptions.c 
via `static PyMemberDef SystemExit_members[]` and via `static int 
SystemExit_init()`.

It is populated upon construction of a SystemExit instance:

Py_CLEAR(self->code);
if (size == 1)
self->code = PyTuple_GET_ITEM(args, 0);
else /* size > 1 */
self->code = args;

Hence, the translation from arguments to exit code considers *all* arguments. I 
adjusted the patch to use the `code` attribute.

--
Added file: http://bugs.python.org/file37989/issue6634_py35.patch

___
Python tracker 

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



[issue23380] Python 2.7.9 test_gdb fails on Fedora 21

2015-02-02 Thread Vinson Lee

Vinson Lee added the comment:

I downloaded Python 2.7.9 release tarball from 
https://www.python.org/downloads/release/python-279.

$ gdb --version
GNU gdb (GDB) Fedora 7.8.2-38.fc21
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word".

--

___
Python tracker 

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



[issue23380] Python 2.7.9 test_gdb fails on Fedora 21

2015-02-02 Thread STINNER Victor

STINNER Victor added the comment:

I'm using Fedora 21 with gdb 7.8.2-38.fc21 on x86_64. With the development 2.7 
branch, test_gdb pass here. How did you get Python 2.7.9? What is your gdb 
version?

--
nosy: +haypo

___
Python tracker 

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



[issue5945] PyMapping_Check returns 1 for lists

2015-02-02 Thread Antoine Pitrou

Changes by Antoine Pitrou :


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

___
Python tracker 

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



[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2015-02-02 Thread Jan-Philip Gehrcke

Changes by Jan-Philip Gehrcke :


Removed file: http://bugs.python.org/file37988/issue6634_py35.patch

___
Python tracker 

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



[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2015-02-02 Thread Jan-Philip Gehrcke

Changes by Jan-Philip Gehrcke :


Removed file: http://bugs.python.org/file37986/issue6634_py35.patch

___
Python tracker 

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



[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2015-02-02 Thread Jan-Philip Gehrcke

Changes by Jan-Philip Gehrcke :


Added file: http://bugs.python.org/file37988/issue6634_py35.patch

___
Python tracker 

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



[issue2292] Missing *-unpacking generalizations

2015-02-02 Thread Joshua Landau

Joshua Landau added the comment:

I don't know the etiquette rules for the issue tracker, but I'd really 
appreciate having something to debug -- it's working for me, you see.

--

___
Python tracker 

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



[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread Stefan Krah

Stefan Krah added the comment:

Ah yes, it seems to originate from #3139.

--

___
Python tracker 

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



[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread STINNER Victor

STINNER Victor added the comment:

> Victor, I think you added the contiguity test in 9d49b744078c. Do you
remember why?

I don't understand the change like that. The call to 
PyBuffer_IsContiguous(view, 'C') was older than this changeset.

--

___
Python tracker 

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



[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread Stefan Krah

Stefan Krah added the comment:

Well, here's a patch with tests.

Victor, I think you added the contiguity test in 9d49b744078c. Do you
remember why?

--
Added file: http://bugs.python.org/file37987/issue23376-2.diff

___
Python tracker 

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



[issue23351] socket.settimeout(5.0) does not have any effect

2015-02-02 Thread Charles-François Natali

Changes by Charles-François Natali :


--
status: open -> pending

___
Python tracker 

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



[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2015-02-02 Thread Martin Panter

Martin Panter added the comment:

Regarding the documentation patch: I like to start sentences with a capital 
letter. Perhaps change it to start “Calling :func:`exit` only terminates . . .”.

With the code change patch, it might be neater to use the SystemExit.code 
attribute rather than e.args[0].

--
nosy: +vadmium

___
Python tracker 

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



[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2015-02-02 Thread Jan-Philip Gehrcke

Jan-Philip Gehrcke added the comment:

For Python 3.5, I have attached a patch that 

- adds relevant test cases to test_threading.py which probe
  the interpreter's stderr output for compliance with what
  the docs state.

- makes sys.exit(msg) write msg to stderr, even if called
  from a non-primary thread, so that the tests succeed.

If we take this path, the documentation for 3.5 does not need to be adjusted.

The discussion in this thread diversified itself a bit:

> Why don't threads have their own ThreadExit exception,
> rather than overloading the use, and therefore, the 
> meaning, of the SystemExit exception? sys.exit and the
> SystemExit exception should *only* be used to exit the
> entire system, not just a thread!

While I absolutely agree that this would be conceptually cleaner, implementing 
this would be a larger refactoring task. Deciding whether this should be done 
or not slows this issue down, and I think this discussion should probably be 
taken elsewhere.

--
versions: +Python 3.5 -Python 3.1, Python 3.2
Added file: http://bugs.python.org/file37986/issue6634_py35.patch

___
Python tracker 

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



[issue23357] pyvenv help shows incorrect usage

2015-02-02 Thread Raúl Cumplido

Raúl Cumplido added the comment:

>From your question, yes I have completed the form.
I've added a new patch just with the documentation change and changing the 
output from the help command as it was wrong. If it doesn't make sense do let 
me know. I've done it from 3.4

--
Added file: http://bugs.python.org/file37985/23357.3.patch

___
Python tracker 

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



[issue23285] PEP 475 - EINTR handling

2015-02-02 Thread Antoine Pitrou

Antoine Pitrou added the comment:

PEP is now updated.

--

___
Python tracker 

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



[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2015-02-02 Thread Jan-Philip Gehrcke

Changes by Jan-Philip Gehrcke :


Removed file: http://bugs.python.org/file19006/thread_sys_exit_test.py

___
Python tracker 

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



[issue23359] Speed-up set_lookkey()

2015-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

May be the code can be simplified without affecting performance if remove 
slower "else" branch in set_lookkey and set_insert_clean. At least I didn't 
find a regression in microbenchmarks, but found small benefit.

For example:

$ ./python -m timeit -s "n = 10**6; s = set(range(n, n+10)); a = list(range(n, 
n+10))*10**4" -- "s.intersection(a)"

Before 0b3bc51341aa: 10 loops, best of 3: 26.6 msec per loop
After 0b3bc51341aa: 10 loops, best of 3: 25.4 msec per loop
With set_simpler_linear_probes.patch: 10 loops, best of 3: 23.9 msec per loop

$ ./python -m timeit -s "n = 10**6; s = set(range(n, n+100)); a = list(range(n, 
n+100))*10**3" -- "s.intersection(a)"

Before 0b3bc51341aa: 10 loops, best of 3: 26.3 msec per loop
After 0b3bc51341aa: 10 loops, best of 3: 25.3 msec per loop
With set_simpler_linear_probes.patch: 10 loops, best of 3: 23.3 msec per loop

$ ./python -m timeit -s "n = 10**6; s = set(range(n, n+10)); a = list(range(n, 
n+10**5))" -- "s.intersection(a)"

Before 0b3bc51341aa: 100 loops, best of 3: 12 msec per loop
After 0b3bc51341aa: 100 loops, best of 3: 11.3 msec per loop
With set_simpler_linear_probes.patch: 100 loops, best of 3: 11.4 msec per loop

--
Added file: http://bugs.python.org/file37984/set_simpler_linear_probes.patch

___
Python tracker 

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



[issue5945] PyMapping_Check returns 1 for lists

2015-02-02 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Not use PyMapping_Check?

On Mon, Feb 2, 2015, at 14:02, Buck Golemon wrote:
> 
> Buck Golemon added the comment:
> 
> We've hit this problem today.
> 
> What are we supposed to do in the meantime?
> 
> --
> nosy: +bukzor
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue5945] PyMapping_Check returns 1 for lists

2015-02-02 Thread Buck Golemon

Buck Golemon added the comment:

We've hit this problem today.

What are we supposed to do in the meantime?

--
nosy: +bukzor

___
Python tracker 

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



[issue2292] Missing *-unpacking generalizations

2015-02-02 Thread Ethan Furman

Ethan Furman added the comment:

Tried running tests, tests that failed with patch:

test_ast
test_collections
test_extcall
test_grammar
test_importlib
test_parser
test_syntax
test_unpack_ex
test_zipfile

Running Ubuntu 13.04 (GNU/Linux 3.8.0-22-generic x86_64).

Should I copy/paste the errors, email them, or what?  It's going to be a wall 
of text.

--
nosy: +ethan.furman

___
Python tracker 

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



[issue6634] sys.exit() called from threads other than the main one: undocumented behaviour

2015-02-02 Thread Jan-Philip Gehrcke

Jan-Philip Gehrcke added the comment:

For Python 2.7, we will not change behavior, even if unexpected. Instead, the 
sys.exit-docs should be adjusted and 

- warn about the fact that nothing is written to stderr
  if sys.exit(msg) gets called from a non-primary thread, and

- note that SystemExit raised in a non-primary thread lets the
  thread exit silently.

I have attached a corresponding patch, please review my wording!

--
keywords: +patch
Added file: http://bugs.python.org/file37983/issue6634_py27.patch

___
Python tracker 

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



[issue23375] test_py3kwarn fails on Windows

2015-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I can't reproduce the failure on Linux.

--

___
Python tracker 

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



[issue23379] Incorrect links within PEPs

2015-02-02 Thread Jonathan Sharpe

New submission from Jonathan Sharpe:

For example, the link to PEP-340 in PEP-343 points to 
https://www.python.org/dev/peps/pep-0343/pep-0340.html rather than 
https://www.python.org/dev/peps/pep-0340/ and the link to PEP-288 from PEP-340 
points to https://www.python.org/dev/peps/pep-0340/pep-0288.html rather than 
https://www.python.org/dev/peps/pep-0288/

--
assignee: docs@python
components: Documentation
messages: 235278
nosy: docs@python, jonrsharpe
priority: normal
severity: normal
status: open
title: Incorrect links within PEPs

___
Python tracker 

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



[issue23353] generator bug with exception: tstate->exc_value is not cleared after an except block

2015-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 2cd6621a9fbc by Victor Stinner in branch '3.4':
Issue #23353, asyncio: Workaround CPython bug #23353
https://hg.python.org/cpython/rev/2cd6621a9fbc

--

___
Python tracker 

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



[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread Stefan Krah

Stefan Krah added the comment:

STINNER Victor wrote:
> I don't understand the link between third party extensions and
> test_getargs2. test_getargs2 is a unit test for non-regression of
> CPython. Can you please elaborate?

A test failure needs a broken buffer provider that hands out a non-contiguous
buffer in response to a PyBUF_SIMPLE request.

The only non-contiguous buffer provider in the stdlib is memoryview.
If I break memoryview's getbufferproc ...

diff --git a/Objects/memoryobject.c b/Objects/memoryobject.c
--- a/Objects/memoryobject.c
+++ b/Objects/memoryobject.c
@@ -1465,11 +1465,6 @@
 return -1;
 }
 if (!REQ_STRIDES(flags)) {
-if (!MV_C_CONTIGUOUS(baseflags)) {
-PyErr_SetString(PyExc_BufferError,
-"memoryview: underlying buffer is not C-contiguous");
-return -1;
-}
 view->strides = NULL;
 }
 if (!REQ_SHAPE(flags)) {

...

test_buffer already fails.  So what should I test?  Perhaps ctypes has
some capabilities that I'm unaware of.

If I'm using _testbuffer.ndarray(), I'm effectively testing that the
getbufferproc of ndarray is correct (which is also tested multiple times
in test_buffer).

--

___
Python tracker 

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



[issue23375] test_py3kwarn fails on Windows

2015-02-02 Thread Steve Dower

Steve Dower added the comment:

Looks like a test ordering issue. When test_imageop runs before test_py3kwarn, 
the warning has presumably already been shown once and so isn't triggered when 
the test is looking for it (compare build 3092 linked above with 3093, which 
passed).

I haven't looked any further into this, but I don't see how it's Windows 
specific. Adding the test coverage folks, since nobody seems to obviously own 
test_py3kwarn.

--
components: +Tests
nosy: +christian.heimes, giampaolo.rodola, ncoghlan

___
Python tracker 

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



[issue22896] Don't use PyObject_As*Buffer() functions

2015-02-02 Thread Stefan Krah

Stefan Krah added the comment:

Nice patch.  I've found one issue (see Rietveld).  I'm not sure
about 3.4 (the patch contains minor refactorings), but otherwise
I'd say go ahead with it.

--

___
Python tracker 

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



[issue23352] Document "suboffsets if needed" in 2.7

2015-02-02 Thread Stefan Krah

Changes by Stefan Krah :


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



[issue23357] pyvenv help shows incorrect usage

2015-02-02 Thread Vinay Sajip

Vinay Sajip added the comment:

> I would like to help and try to do the change myself

You mean the documentation change? Go right ahead! Just make the change to the 
3.4 branch, and I will ensure it's merged into the default branch (3.5). Have 
you completed a contributor form, as a matter of interest?

--

___
Python tracker 

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



[issue23366] integer overflow in itertools.combinations

2015-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And with this patch an OverflowError in tests should be replaced with 
(OverflowError, MemoryError). Updated patch also fixes other bugs in itertools 
tests.

--
resolution: fixed -> 
stage: resolved -> patch review
Added file: http://bugs.python.org/file37982/itertools_overflows_2.patch

___
Python tracker 

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



[issue23364] integer overflow in itertools.product

2015-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

And this means that this test (and other tests with the bigaddrspacetest 
decorator) is not executed on any of our buildbots. It skipped on 64-bit 
builders and 32-bit builders ran tests without the -M2G option.

--

___
Python tracker 

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



[issue23364] integer overflow in itertools.product

2015-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh, and actually the test is wrong. It fails on 32-bit with -M2G. Should be:

-with self.assertRaises(OverflowError):
-product(["a"]*(2**16), repeat=2**16)
+with self.assertRaises((OverflowError, MemoryError)):
+product(*(['ab']*2**5), repeat=2**25)

--

___
Python tracker 

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



[issue23359] Speed-up set_lookkey()

2015-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0b3bc51341aa by Raymond Hettinger in branch 'default':
Issue 23359: Tighten inner search loop for sets (don't and-mask every entry 
lookup).
https://hg.python.org/cpython/rev/0b3bc51341aa

--
nosy: +python-dev

___
Python tracker 

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



[issue23254] Document how to close the TCPServer listening socket

2015-02-02 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2015-02-02 Thread Benjamin Peterson

Benjamin Peterson added the comment:

People pointed out in #21295 that this made some things that were possible 
before impossible, so the lineno and col_offset changes of this have been 
reverted.

--

___
Python tracker 

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



[issue16795] Patch: some changes to AST to make it more useful for static language analysis

2015-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7d1c32ddc432 by Benjamin Peterson in branch '3.4':
revert lineno and col_offset changes from #16795 (closes #21295)
https://hg.python.org/cpython/rev/7d1c32ddc432

--

___
Python tracker 

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



[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse

2015-02-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7d1c32ddc432 by Benjamin Peterson in branch '3.4':
revert lineno and col_offset changes from #16795 (closes #21295)
https://hg.python.org/cpython/rev/7d1c32ddc432

New changeset 8ab6b404248c by Benjamin Peterson in branch 'default':
merge 3.4 (#21295)
https://hg.python.org/cpython/rev/8ab6b404248c

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



[issue20709] os.utime(path_to_directory): wrong documentation for Windows.

2015-02-02 Thread Jan-Philip Gehrcke

Jan-Philip Gehrcke added the comment:

I have added patches for the documentation, where I removed the sentence in 
question and re-wrapped the paragraph.

--

___
Python tracker 

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



[issue23359] Speed-up set_lookkey()

2015-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Agree, applying simple steps one by one would be more robust. How large the 
benefit, do you have any timing results?

--
nosy: +pitrou

___
Python tracker 

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



[issue23374] pydoc 3.x raises UnicodeEncodeError on sqlite3 package

2015-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are few levels of this issue:

1) pydoc doesn't escape characters according to output encoding. It escapes 
characters uneencodable with sys.getfilesystemencoding(), but this encoding can 
differ from the encoding of sys.stdout or default encoding.

2) Default encoding for io.TestIOWrapper() and open() can be different from 
sys.getfilesystemencoding(). And it unexpectedly can be ASCII.

3) Mac OS doesn't support locales with the utf8 encoding (without hyphen).

Here is a patch which solves first level -- makes pydoc using appropriate 
encoding with the backslashreplace error handler.

--
keywords: +patch
stage:  -> patch review
type: crash -> behavior
versions:  -Python 3.2, Python 3.3
Added file: http://bugs.python.org/file37981/pydoc_encoding.patch

___
Python tracker 

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



[issue20709] os.utime(path_to_directory): wrong documentation for Windows.

2015-02-02 Thread Jan-Philip Gehrcke

Changes by Jan-Philip Gehrcke :


Added file: http://bugs.python.org/file37980/issue20709_tip.patch

___
Python tracker 

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



[issue20709] os.utime(path_to_directory): wrong documentation for Windows.

2015-02-02 Thread Jan-Philip Gehrcke

Changes by Jan-Philip Gehrcke :


--
keywords: +patch
Added file: http://bugs.python.org/file37979/issue20709_py27.patch

___
Python tracker 

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



[issue20709] os.utime(path_to_directory): wrong documentation for Windows.

2015-02-02 Thread Tim Golden

Tim Golden added the comment:

Fine by me

--

___
Python tracker 

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



[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse

2015-02-02 Thread Mark Shannon

Mark Shannon added the comment:

This also breaks the col_offset for subscripts like x[y] and, of course any 
statement with one of these expressions as its leftmost sub-expression.

--

___
Python tracker 

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



[issue23337] [IDLE/Windows] Run python with restricted rights

2015-02-02 Thread STINNER Victor

Changes by STINNER Victor :


--
title: Run python with restricted rights -> [IDLE/Windows] Run python with 
restricted rights

___
Python tracker 

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



[issue23378] argparse.add_argument action parameter should allow value extend

2015-02-02 Thread the mulhern

New submission from the mulhern:

As well as the append action it would be convenient for there to be an extend 
action.

This is kind of useful to allow something like:

parser.add_argument("--foo", action="extend", nargs="+", type=str)

given

parser.parse_args("--foo f1 --foo f2 f3 f4".split())

to result in

["f1", "f2", "f3", "f4"].

The action "append" results in

[["f1"], ["f2", "f3", "f4"]]

And action store in

["f2", "f3", "f4"].

It is easy to write a custom action, but it feels like a fairly common 
requirement.

Probably it would make sense to extend the default, similarly to how append 
behaves.

--
components: Library (Lib)
messages: 235260
nosy: the.mulhern
priority: normal
severity: normal
status: open
title: argparse.add_argument action parameter should allow value extend
type: enhancement
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue20709] os.utime(path_to_directory): wrong documentation for Windows.

2015-02-02 Thread Jan-Philip Gehrcke

Jan-Philip Gehrcke added the comment:

Windows is the only Python-supported platform where utime did not work for 
directories, ages ago, right?

If that is the case, I support Larry Hastings' approach of removing the entire 
sentence:

"Whether a directory can be given for path depends on whether the operating 
system implements directories as files (for example, *Windows does not*)"

Agreed?

--

___
Python tracker 

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



[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread STINNER Victor

STINNER Victor added the comment:

> A unit test would not be so helpful. The potential problem is that
> third party extensions with broken getbufferprocs would suffer.

I don't understand the link between third party extensions and
test_getargs2. test_getargs2 is a unit test for non-regression of
CPython. Can you please elaborate?

--

___
Python tracker 

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



[issue22896] Don't use PyObject_As*Buffer() functions

2015-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In any case we need a hack in 3.4. Let open new issue for adding 
PyMemoryView_FromObjectEx() or like.

--

___
Python tracker 

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



[issue22896] Don't use PyObject_As*Buffer() functions

2015-02-02 Thread Stefan Krah

Stefan Krah added the comment:

Thanks.  No, I don't think there's an official way to accomplish that,
but let's create one.  How about a new function that takes the buffer
request flags:

PyMemoryView_FromObjectEx(exporter, PyBUF_SIMPLE|PyBUF_WRITABLE)

If we can spare a new format code, this could be called directly in
PyArg_ParseTuple(), which would give back the memoryview.

Otherwise, you get the exporter from PyArg_ParseTuple() and call
PyMemoryView_FromObjectEx() manually.

If I'm not mistaken, this would save us the intermediate buffer on the
stack, and it's more readable.

--

___
Python tracker 

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



[issue23369] integer overflow in _json.encode_basestring_ascii

2015-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

"\u"*((2**32)//6 + 1) is calculated at compile time. This requires much 
memory and can cause swapping. May be this was a cause of failing tests on some 
buildbots:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/2623/steps/test/logs/stdio
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.4/builds/749/steps/test/logs/stdio

Traceback (most recent call last):
  File "/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/runpy.py", line 
170, in _run_module_as_main
"__main__", mod_spec)
  File "/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/runpy.py", line 
85, in _run_code
exec(code, run_globals)
  File 
"/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/test/__main__.py", line 
3, in 
regrtest.main_in_temp_cwd()
  File 
"/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/test/regrtest.py", line 
1564, in main_in_temp_cwd
main()
  File 
"/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/test/regrtest.py", line 
738, in main
raise Exception("Child error on {}: {}".format(test, result[1]))
Exception: Child error on test_json: Exit code -9
*** [buildbottest] Error code 1

At least my computer hanged on first run of this test.

To prevent computing this string constant at compile time you can use a 
variable. And '\x00' can be used instead of '\u', it needs less memory.

--
keywords: +patch
nosy: +serhiy.storchaka
status: closed -> open
Added file: 
http://bugs.python.org/file37978/test_encode_basestring_ascii_overflow.patch

___
Python tracker 

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



[issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation

2015-02-02 Thread koobs

Changes by koobs :


--
nosy: +koobs

___
Python tracker 

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



[issue4879] Allow buffering for HTTPResponse

2015-02-02 Thread Martin Panter

Martin Panter added the comment:

Opened Issue 23377 for the problem of dropping extra buffered data at the end 
of a response.

--
nosy: +vadmium

___
Python tracker 

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



[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread STINNER Victor

STINNER Victor added the comment:

> Yes, _testbuffer.ndarray can create any buffer.

Cool. So could you please add non regression tests to test_w_star() of 
test_getargs2?

Other formats expect a contiguous buffer: 'y*', 's*', 'z*'. 
Formats which "convert" a buffer: 'y', 's#', 'z#.

--

___
Python tracker 

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



[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread Stefan Krah

Stefan Krah added the comment:

A unit test would not be so helpful. The potential problem is that
third party extensions with broken getbufferprocs would suffer.


But at some point we have to streamline PEP-3118 code, or it
will remain inscrutable forever.  Extension writers often copy
code from cpython, and I'm afraid if we don't remove redundancy,
people will think such contiguity checks are necessary.

--

___
Python tracker 

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



[issue23377] HTTPResponse may drop buffer holding next response

2015-02-02 Thread Martin Panter

New submission from Martin Panter:

This is the same issue raised at . 
Currently, every time a new response is to be received, HTTPConnection passes 
its raw socket object to HTTPResponse, which calls sock.makefile("rb") and 
creates a BufferedReader. The BufferedReader is used to parse the header 
section and read the response body. The problem is that the BufferedReader is 
closed at the end of reading the response, potentially losing buffered data 
read from a subsequent response.

Normally no data is lost, because most users would read the full response 
before triggering a new request, and the server would wait for a request before 
sending a response. But if a user pipelined a second request without reading 
all of the first response, and the server happened to send the end of the first 
response and the start of the second response in the same packet, it could 
trigger the problem. I have added a test called 
test_httplib.ServerTest.testDoubleResponse() which emulates this scenario. The 
problem also makes it hard to detect misbehaving servers, or use HTTPConnection 
to test that a server is behaving correctly.

I am adding a patch which creates the BufferedReader once for each connection. 
This involves changing the API of the HTTPResponse constructor. I think this 
should be okay because even though it is documented, it says “Not instantiated 
directly by user”. It did require changing the tests that call the HTTPResponse 
constructor though. If absolutely necessary, it may be possible to maintain 
backwards compatibility if we added a new constructor parameter, and carefully 
juggled how the close() calls work.

--
components: Library (Lib)
files: http-buffer.patch
keywords: patch
messages: 235251
nosy: vadmium
priority: normal
severity: normal
status: open
title: HTTPResponse may drop buffer holding next response
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file37977/http-buffer.patch

___
Python tracker 

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



[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread Stefan Krah

Stefan Krah added the comment:

Yes, _testbuffer.ndarray can create any buffer.

--

___
Python tracker 

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



[issue13322] buffered read() and write() does not raise BlockingIOError

2015-02-02 Thread Martin Panter

Martin Panter added the comment:

Looking at test_io.BufferedReaderTest.test_read_non_blocking(), at 
Lib/test/test_io.py:1037, there are explicit tests for ‘peek(1) == b"" ’ and 
‘read() is None’. The peek() test was added in revision 3049ac17e256, in 2009 
(large merge of “io” implementation in C; can’t find more detailed history). 
The read() test was added in revision 21233c2e5d09 in 2007, with a remark about 
a “tentative decision to drop nonblocking I/O support from the buffering 
layers”.

My suggestion is to make the read/into/1/all/peek() methods all return None if 
no non-blocking data is available, and return a short non-empty result if some 
data was available but not enough to satisfy the equivalent blocking call. 
However, this would invove changing the behaviour of BufferedReader.read1() and 
peek(); would that be allowed?

The readline() based methods could probably work similarly, but that would be 
another issue and a bigger change, because the equivalent RawIOBase methods do 
not return None.

--

___
Python tracker 

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



[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think memoryview(bytearray)[::2] provides non contiguous buffers. But I'm not 
sure this is tested.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread STINNER Victor

STINNER Victor added the comment:

Do you have unit test with non contiguous buffers? If not, it would help to 
have such buffer in _testcapi.

--
nosy: +haypo

___
Python tracker 

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



[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse

2015-02-02 Thread Mark Shannon

Mark Shannon added the comment:

It is now very hard to determine accurate locations for an expression such as 
(x+y).attr as the column offset of leftmost subexpression of the expression is 
not the same as the column offset of the location.

--

___
Python tracker 

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



[issue21295] Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse

2015-02-02 Thread Mark Shannon

Mark Shannon added the comment:

This is caused by https://hg.python.org/cpython/rev/7c5c678e4164/
which is a supposed fix for http://bugs.python.org/issue16795
which claims to make "some changes to AST to make it more useful for static 
language analysis", seemingly by breaking all existing static analysis tools.

Could we just revert https://hg.python.org/cpython/rev/7c5c678e4164/ ?

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread Stefan Krah

New submission from Stefan Krah:

The call to PyBuffer_IsContiguous() (see patch) is redundant:

PyBUF_WRITABLE is a flag that can be added to any buffer request.
The real request here is (PyBUF_SIMPLE|PyBUF_WRITABLE), which is
equal to PyBUF_WRITABLE since PyBUF_SIMPLE==0.

PyBUF_SIMPLE implies C-contiguous with format 'B'.


Perhaps the check was added for broken buffer providers, but I
think at some point we should assume correct providers.

--
keywords: +patch
nosy: +larry
Added file: http://bugs.python.org/file37976/issue23376.diff

___
Python tracker 

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



[issue23376] getargs.c: redundant C-contiguity check

2015-02-02 Thread Stefan Krah

Changes by Stefan Krah :


--
nosy: skrah
priority: normal
severity: normal
status: open
title: getargs.c: redundant C-contiguity check
type: performance
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



[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-02-02 Thread Martin Panter

Martin Panter added the comment:

You’re welcome to merge my test patch into yours if you want to. Or I could 
open a separate issue for it, I don’t mind.

--

___
Python tracker 

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



[issue23321] Crash in str.decode() with special error handler

2015-02-02 Thread STINNER Victor

STINNER Victor added the comment:

I closed the issue.

--

___
Python tracker 

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



[issue23321] Crash in str.decode() with special error handler

2015-02-02 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> fixed
status: pending -> closed

___
Python tracker 

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



  1   2   >