[issue29438] SIGSEGV in PyObject_Malloc on python 3.6 and 3.7

2017-02-03 Thread INADA Naoki

INADA Naoki added the comment:

valgrind output is here.
https://gist.github.com/methane/3c010daba71a374fd0b6a41a0d98e3ff

It seems another bug relating to key-sharing dict...

--
nosy: +inada.naoki

___
Python tracker 

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



[issue13196] subprocess: undocumented if shell=True is necessary to find executable in Windows PATH

2017-02-03 Thread Martin Panter

Martin Panter added the comment:

It is hard to make sense of this without decoding your URLs, downloading the 
repository and finding the relevant commit. Anyway, what you have posted sounds 
like a duplicate of Issue 8557.

--
nosy: +martin.panter
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> subprocess PATH semantics and portability

___
Python tracker 

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



[issue29405] improve csv.Sniffer().sniff() behavior

2017-02-03 Thread Xiang Zhang

Changes by Xiang Zhang :


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



[issue29405] improve csv.Sniffer().sniff() behavior

2017-02-03 Thread Milt Epstein

Milt Epstein added the comment:

That's right, with 11 lines in the sample data, total will become 20 on the 
second iteration.  And that throws off some of the computations done in that 
function.

Your patch looks good, in that it will achieve what I'm requesting.  But :-), 
your pointing out that other redundant min() made me take a closer look at the 
code, and led me to produce the attached patch as an alternate suggestion.  I 
think it makes the code a bit more sensible and cleaner.  Please review, and go 
with what you think best.

Thanks.

--
Added file: http://bugs.python.org/file46512/csv.py.patch

___
Python tracker 

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



[issue29442] Use argparse and drop dirty optparse hacks in setup.py

2017-02-03 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

The change is clear and self-explained. See the patch.

Motivations:

1. The hack "To prevent optparse from raising an exception..." works for single 
letter flags (-I, -L, etc.) only. I plan to add --sysroot related codes for 
Android builds and I don't want more hacks. Apparently argparse does not need 
this hack as it can parse all known flags before throwing an error
2. optparse is deprecated

Add the developer that introduced this hack. Also Serhiy, who sseems interested 
in removing optparse from the code base. (issue18973, issue18971)

--
components: Build
files: setup-argparse.patch
keywords: patch
messages: 286922
nosy: Chi Hsuan Yen, brett.cannon, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use argparse and drop dirty optparse hacks in setup.py
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file46511/setup-argparse.patch

___
Python tracker 

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



[issue18069] Subprocess searches special directories before PATH on Windows

2017-02-03 Thread Martin Panter

Changes by Martin Panter :


--
title: Subprocess picks the wrong executable on Windows -> Subprocess searches 
special directories before PATH on Windows

___
Python tracker 

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



[issue29411] Option --executable for entry_points

2017-02-03 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the report, Michal. Note that both [1] and [2] point to the same 
patch. Perhaps you meant to paste a link to a separate patch for distutils?

(I removed 3.3 and 3.4 from the versions field since they are in 
security-fix-only mode now. I don't know whether this can be applied as a 
bugfix or not without reading the pypa-dev thread and the patch for distutils 
so I left rest of it selected.)

--
nosy: +berker.peksag
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue29198] AsyncGenerator is missing from typing

2017-02-03 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 7fd9559c9c97fcf0519ace33b9d76a81ae156523 by Berker Peksag in 
branch '3.5':
Issue #29198: Document typing.AsyncGenerator
https://github.com/python/cpython/commit/7fd9559c9c97fcf0519ace33b9d76a81ae156523

New changeset 2c6ff7794c1b1af545d8ff17f54acef41cab089e by Berker Peksag in 
branch '3.5':
Issue #29198: Fix indentation and markup in typing.rst
https://github.com/python/cpython/commit/2c6ff7794c1b1af545d8ff17f54acef41cab089e


--

___
Python tracker 

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



[issue29311] Argument Clinic: convert dict methods

2017-02-03 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 7baf0a0b90da5bb0b1ed5d27374f5a6b1c7b5dae by Serhiy Storchaka in 
branch 'master':
Issue #29311: Regenerate Argument Clinic.
https://github.com/python/cpython/commit/7baf0a0b90da5bb0b1ed5d27374f5a6b1c7b5dae


--

___
Python tracker 

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



[issue29198] AsyncGenerator is missing from typing

2017-02-03 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 7fd9559c9c97fcf0519ace33b9d76a81ae156523 by Berker Peksag in 
branch '3.6':
Issue #29198: Document typing.AsyncGenerator
https://github.com/python/cpython/commit/7fd9559c9c97fcf0519ace33b9d76a81ae156523

New changeset 34c0c17d5774524dae63d9e2e693ad4b97386bbe by Berker Peksag in 
branch '3.6':
Issue #29198: Merge from 3.5
https://github.com/python/cpython/commit/34c0c17d5774524dae63d9e2e693ad4b97386bbe

New changeset 2c6ff7794c1b1af545d8ff17f54acef41cab089e by Berker Peksag in 
branch '3.6':
Issue #29198: Fix indentation and markup in typing.rst
https://github.com/python/cpython/commit/2c6ff7794c1b1af545d8ff17f54acef41cab089e

New changeset 9ea15544818e9186277efda1ce9da3a5e48ff1c7 by Berker Peksag in 
branch '3.6':
Issue #29198: Merge from 3.5
https://github.com/python/cpython/commit/9ea15544818e9186277efda1ce9da3a5e48ff1c7


--

___
Python tracker 

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



[issue29198] AsyncGenerator is missing from typing

2017-02-03 Thread Roundup Robot

Roundup Robot added the comment:


New changeset 7fd9559c9c97fcf0519ace33b9d76a81ae156523 by Berker Peksag in 
branch 'master':
Issue #29198: Document typing.AsyncGenerator
https://github.com/python/cpython/commit/7fd9559c9c97fcf0519ace33b9d76a81ae156523

New changeset 34c0c17d5774524dae63d9e2e693ad4b97386bbe by Berker Peksag in 
branch 'master':
Issue #29198: Merge from 3.5
https://github.com/python/cpython/commit/34c0c17d5774524dae63d9e2e693ad4b97386bbe

New changeset b6d785d86dbf4ea9b90da57f11da4fff1bb36c9d by Berker Peksag in 
branch 'master':
Issue #29198: Merge from 3.6
https://github.com/python/cpython/commit/b6d785d86dbf4ea9b90da57f11da4fff1bb36c9d

New changeset 2c6ff7794c1b1af545d8ff17f54acef41cab089e by Berker Peksag in 
branch 'master':
Issue #29198: Fix indentation and markup in typing.rst
https://github.com/python/cpython/commit/2c6ff7794c1b1af545d8ff17f54acef41cab089e

New changeset 9ea15544818e9186277efda1ce9da3a5e48ff1c7 by Berker Peksag in 
branch 'master':
Issue #29198: Merge from 3.5
https://github.com/python/cpython/commit/9ea15544818e9186277efda1ce9da3a5e48ff1c7

New changeset bab4b9b5a4c16298b17a77cf2aec43320f296717 by Berker Peksag in 
branch 'master':
Issue #29198: Merge from 3.6
https://github.com/python/cpython/commit/bab4b9b5a4c16298b17a77cf2aec43320f296717


--

___
Python tracker 

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



[issue29198] AsyncGenerator is missing from typing

2017-02-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d7eb9526c4f4 by Berker Peksag in branch '3.5':
Issue #29198: Fix indentation and markup in typing.rst
https://hg.python.org/cpython/rev/d7eb9526c4f4

New changeset f49b6c35d1e3 by Berker Peksag in branch '3.6':
Issue #29198: Merge from 3.5
https://hg.python.org/cpython/rev/f49b6c35d1e3

New changeset 8a898cfd089a by Berker Peksag in branch 'default':
Issue #29198: Merge from 3.6
https://hg.python.org/cpython/rev/8a898cfd089a

--

___
Python tracker 

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



[issue29198] AsyncGenerator is missing from typing

2017-02-03 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patches, Jelle :)

--
nosy: +berker.peksag
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type:  -> 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



[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2017-02-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: 
http://bugs.python.org/file46510/PySlice_GetIndicesEx-silence-warnings.patch

___
Python tracker 

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



[issue29198] AsyncGenerator is missing from typing

2017-02-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fe29826af634 by Berker Peksag in branch '3.5':
Issue #29198: Document typing.AsyncGenerator
https://hg.python.org/cpython/rev/fe29826af634

New changeset b475b076cc1f by Berker Peksag in branch '3.6':
Issue #29198: Merge from 3.5
https://hg.python.org/cpython/rev/b475b076cc1f

New changeset 2b55b18bf151 by Berker Peksag in branch 'default':
Issue #29198: Merge from 3.6
https://hg.python.org/cpython/rev/2b55b18bf151

--

___
Python tracker 

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



[issue29405] improve csv.Sniffer().sniff() behavior

2017-02-03 Thread Xiang Zhang

Xiang Zhang added the comment:

Sounds reasonable. IIUC if the sample data gets 11 lines the total could be 20. 
I also think the second min is redundant. Would you mind review my patch Milt?

--
keywords: +patch
stage:  -> patch review
type: behavior -> enhancement
versions: +Python 3.7 -Python 3.5
Added file: http://bugs.python.org/file46509/csv_sniffer.patch

___
Python tracker 

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



[issue29311] Argument Clinic: convert dict methods

2017-02-03 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 222b9392a83b by Serhiy Storchaka in branch 'default':
Issue #29311: Regenerate Argument Clinic.
https://hg.python.org/cpython/rev/222b9392a83b

--

___
Python tracker 

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



[issue29441] Update examples to use async and await keywords in asyncio-task.rst

2017-02-03 Thread Berker Peksag

New submission from Berker Peksag:

Attached patch converts all examples that use @coroutine decorator in 
Doc/library/asyncio-task.rst. I also removed the generator example at 
https://docs.python.org/3/library/asyncio-task.html#example-coroutine-displaying-the-current-date

See issue 29407 for context.

--
assignee: docs@python
components: Documentation, asyncio
files: update-examples-task.diff
keywords: patch
messages: 286911
nosy: berker.peksag, docs@python, gvanrossum, yselivanov
priority: normal
severity: normal
stage: patch review
status: open
title: Update examples to use async and await keywords in asyncio-task.rst
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46508/update-examples-task.diff

___
Python tracker 

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



[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2017-02-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good point Martin. I missed this because warnings are not emitted in non-debug 
build and were emitted only once in incremental debug build. Your idea about 
initializing slicelength in a macro LGTM.

--

___
Python tracker 

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



[issue29430] zipfile: invalid link

2017-02-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

https://support.pkware.com/display/PKZIP/Application+Note+Archives contains 
links to old versions of APPNOTE (the last is 6.3.3). But the actual version 
was at least 6.3.4 (I have a local copy).

All external links refer to 
http://www.pkware.com/documents/casestudies/APPNOTE.TXT. I think we should 
report a bug to PKWare.

--

___
Python tracker 

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



[issue29440] _dbm requires -lgdbm if gdbm is built as static libraries

2017-02-03 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Add the developer who wrote this line (issue15044)

--
nosy: +ncoghlan

___
Python tracker 

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



[issue29440] _dbm requires -lgdbm if gdbm is built as static libraries

2017-02-03 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

In setup.py, _dbm links to gdbm_compat only. If gdbm is built as dynamic 
libraries, libgdbm_compat.so has a NEEDED flag for libgdbm.so, so both symbols 
in libgdbm and libgdbm_compat can be used. However, as static libraries does 
not provide such a flag, importing _dbm raises ImportError:

shell@ASUS_Z00E_2:/data/local/tmp $ python3.7m -c 'import _dbm'
Traceback (most recent call last):
  File "", line 1, in 
ImportError: dlopen failed: cannot locate symbol "gdbm_errno" referenced by 
"/data/local/tmp/python3/usr/lib/python3.7/lib-dynload/_dbm.cpython-37m.so"...

gdbm_errno is a symbol in libgdbm.a.

gdbm manual [1] suggests linking to both libraries, too.

[1] http://www.gnu.org.ua/software/gdbm/manual/html_node/Compatibility.html

--
components: Build
files: gdbm.patch
keywords: patch
messages: 286907
nosy: Chi Hsuan Yen
priority: normal
severity: normal
status: open
title: _dbm requires -lgdbm if gdbm is built as static libraries
type: compile error
versions: Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46507/gdbm.patch

___
Python tracker 

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



[issue29439] _decimal on Android requires linking with libm

2017-02-03 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

Just like issue21668, _decimal requires -lm on Android. This wasn't fixed 
because _decimal didn't build before issue26846 lands. More specificially, 
log10 is called 
https://hg.python.org/cpython/file/tip/Modules/_decimal/libmpdec/mpdecimal.c#l7862

Added _decimal and Android experts

--
components: Cross-Build
files: decimal.patch
keywords: patch
messages: 286906
nosy: Alex.Willmer, Chi Hsuan Yen, skrah, xdegaye
priority: normal
severity: normal
status: open
title: _decimal on Android requires linking with libm
type: behavior
versions: Python 3.7
Added file: http://bugs.python.org/file46506/decimal.patch

___
Python tracker 

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



[issue29430] zipfile: invalid link

2017-02-03 Thread Berker Peksag

Berker Peksag added the comment:

>  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;>

I think that HTML output suggests that their server configuration is broken. If 
you look at further down the page there is this error message:

Something has triggered missing webpage on your
website. This is the default 404 error page for
nginx that is distributed with
EPEL.  It is located
/usr/share/nginx/html/404.html

And:

$ curl -I https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
HTTP/1.1 404 Not Found
...

https://support.pkware.com/display/PKZIP/Application+Note+Archives might be a 
suitable alternative to the broken link. I'm adding Serhiy to nosy list since 
he knows a lot about the ZIP file format.

--
assignee:  -> docs@python
components: +Documentation
nosy: +berker.peksag, docs@python, serhiy.storchaka
resolution: not a bug -> 
stage: resolved -> needs patch
status: closed -> open
type:  -> behavior
versions: +Python 3.5, Python 3.7

___
Python tracker 

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



[issue29438] SIGSEGV in PyObject_Malloc on python 3.6 and 3.7

2017-02-03 Thread Xiang Zhang

Xiang Zhang added the comment:

I could reproduce this using Audric's command. And yes, debug build doesn't 
suffer from this crash. Nosy Victor.

DEBUG:root:Called with: ['/tmp/minimal_crash.py', '-d', 'sqlite:///crash.db', 
'-v']
INFO:__main__:Connecting to DB 'sqlite:///crash.db'
INFO:sqlalchemy.engine.base.Engine:SELECT CAST('test plain returns' AS 
VARCHAR(60)) AS anon_1
INFO:sqlalchemy.engine.base.Engine:()
INFO:sqlalchemy.engine.base.Engine:SELECT CAST('test unicode returns' AS 
VARCHAR(60)) AS anon_1
INFO:sqlalchemy.engine.base.Engine:()
INFO:sqlalchemy.engine.base.Engine:BEGIN (implicit)
INFO:sqlalchemy.engine.base.Engine:SELECT table_name.id AS table_name_id, 
table_name.att_1 AS table_name_att_1, table_name.att_2 AS table_name_att_2, 
table_name.att_3 AS table_name_att_3, table_name.date_1 AS table_name_date_1, 
table_name.date_2 AS table_name_date_2 
FROM table_name 
WHERE table_name.id = ? AND table_name.att_1 = ? AND table_name.att_2 = ? AND 
table_name.att_3 = ?
INFO:sqlalchemy.engine.base.Engine:('12345678912345', '123456789123456', 2, 4)
DEBUG:__main__:No item found, new item
DEBUG:__main__:Documents processed
INFO:sqlalchemy.engine.base.Engine:INSERT INTO table_name (id, att_1, att_2, 
att_3, date_1, date_2) VALUES (?, ?, ?, ?, ?, ?)
INFO:sqlalchemy.engine.base.Engine:('12345678912345', None, None, None, None, 
None)
INFO:sqlalchemy.engine.base.Engine:ROLLBACK

Program received signal SIGSEGV, Segmentation fault.
_PyObject_Alloc (ctx=0x0, elsize=296, nelem=1, use_calloc=0) at 
Objects/obmalloc.c:1258
1258if ((pool->freeblock = *(block **)bp) != NULL) {
(gdb) bt
#0  _PyObject_Alloc (ctx=0x0, elsize=296, nelem=1, use_calloc=0) at 
Objects/obmalloc.c:1258
#1  _PyObject_Malloc (ctx=0x0, nbytes=296) at Objects/obmalloc.c:1437
#2  0x5564082c in new_keys_object (size=) at 
Objects/dictobject.c:536
#3  dictresize (mp=mp@entry=0x77e36510, minsize=) at 
Objects/dictobject.c:1242
#4  0x5564456f in insertion_resize (mp=0x77e36510) at 
Objects/dictobject.c:1094
#5  insertdict (value=, hash=, key=, mp=) at Objects/dictobject.c:1142
#6  PyDict_SetItem (value=0x739f5d68, key=0x766f9260, 
op=0x77e36510) at Objects/dictobject.c:1564
#7  dict_ass_sub (mp=0x77e36510, v=0x766f9260, w=0x739f5d68) at 
Objects/dictobject.c:2148
#8  0x555af8d4 in _PyEval_EvalFrameDefault (f=, 
throwflag=) at Python/ceval.c:1673
#9  0x555ab211 in PyEval_EvalFrameEx (throwflag=0, f=0x73487da0) at 
Python/ceval.c:664
#10 _PyFunction_FastCall (co=, args=, nargs=2, 
globals=) at Python/ceval.c:4926
#11 0x555b30ff in call_function (kwnames=0x0, oparg=, 
pp_stack=) at Python/ceval.c:4868
#12 _PyEval_EvalFrameDefault (f=, throwflag=) at 
Python/ceval.c:3290
#13 0x556e37b0 in PyEval_EvalFrameEx (throwflag=0, f=0x55eb0ce8) at 
Python/ceval.c:664
#14 _PyEval_EvalCodeWithName (_co=0x77e34300, globals=, 
locals=locals@entry=0x0, args=, argcount=2, 
kwnames=0x77e360f0, kwargs=0x55eaf210, kwcount=3, kwstep=1, 
defs=0x0, defcount=0, kwdefs=0x77e36480, closure=0x0, 
name=0x77e30420, qualname=0x77e31f60) at Python/ceval.c:4165
#15 0x556e395b in fast_function (func=, stack=, nargs=, kwnames=) at Python/ceval.c:4987
#16 0x555b22a8 in call_function (kwnames=0x77e360d8, 
oparg=, pp_stack=) at Python/ceval.c:4868
#17 _PyEval_EvalFrameDefault (f=, throwflag=) at 
Python/ceval.c:3336

...

--
nosy: +haypo, xiang.zhang

___
Python tracker 

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



[issue27867] various issues due to misuse of PySlice_GetIndicesEx

2017-02-03 Thread Martin Panter

Martin Panter added the comment:

Not a big deal, but the change produces compiler warnings with GCC 6.1.1:

/home/proj/python/cpython/Objects/bytesobject.c: In function ‘bytes_subscript’:
/home/proj/python/cpython/Objects/bytesobject.c:1701:13: warning: ‘slicelength’ 
may be used uninitialized in this function [-Wmaybe-uninitialized]
 for (cur = start, i = 0; i < slicelength;
 ^~~
/home/proj/python/cpython/Objects/listobject.c: In function 
‘list_ass_subscript’:
/home/proj/python/cpython/Objects/listobject.c:2602:13: warning: ‘slicelength’ 
may be used uninitialized in this function [-Wmaybe-uninitialized]
 for (i = 0; i < slicelength; i++) {
 ^~~
/home/proj/python/cpython/Objects/unicodeobject.c: In function 
‘unicode_subscript’:
/home/proj/python/cpython/Objects/unicodeobject.c:14013:16: warning: 
‘slicelength’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 result = PyUnicode_New(slicelength, max_char);
 ~~~^~
/media/disk/home/proj/python/cpython/Modules/_elementtree.c: In function 
‘element_ass_subscr’:
/media/disk/home/proj/python/cpython/Modules/_elementtree.c:1896:50: warning: 
‘slicelen’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 self->extra->children[i + newlen - slicelen] = 
self->extra->children[i];
   ~~~^~
/media/disk/home/proj/python/cpython/Modules/_ctypes/_ctypes.c: In function 
‘Array_subscript’:
/media/disk/home/proj/python/cpython/Modules/_ctypes/_ctypes.c:4327:16: 
warning: ‘slicelen’ may be used uninitialized in this function 
[-Wmaybe-uninitialized]
 np = PyUnicode_FromWideChar(dest, slicelen);
 ~~~^~~~

My build used to be free of warnings. This warning is enabled via -Wall. The 
reason is probably that the new macro skips the slicelength assignment if 
PySlice_Unpack() fails. Workarounds could be to assign or initialize 
slicelength to zero (at the call sites or inside the macro), or to compile with 
-Wno-maybe-uninitialized.

--
nosy: +martin.panter

___
Python tracker 

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



[issue29438] SIGSEGV in PyObject_Malloc on python 3.6 and 3.7

2017-02-03 Thread Audric Schiltknecht

New submission from Audric Schiltknecht:

I've managed to create a minimal test file that causes python to crashe when 
run with python 3.6.0 (packaged in my distribution or from hg repository), 3.6 
branch from hg repository and 3.7 branch from hg repository, but works fine on 
3.5.3 and 3.5 branch.

It also does not crash when python is compiled with '--with-pydebug' option 
(3.6/3.7)

$ uname -a
Linux 4.8.13-1-ARCH #1 SMP PREEMPT Fri Dec 9 07:24:34 CET 2016 x86_64 GNU/Linux

$ python --version
Python 3.6.0

$ pip freeze
appdirs==1.4.0
packaging==16.8
pyparsing==2.1.10
python-dateutil==2.6.0
six==1.10.0
SQLAlchemy==1.1.5

To reproduce, use the attached file (minimal_crash.py):

$ virtualenv3  venv
$ source venv/bin/activate
$ pip install sqlalchemy

Run once to create DB and insert some stuff into it (no crash):
$ ./minimal_crash.py -d sqlite:///crash.db -v -c

Then re-run same thing WITHOUT re-creating the base:
$ ./minimal_crash.py -d sqlite:///crash.db -v
INFO:__main__:Connecting to DB 'sqlite:///crash.db'
Segmentation fault (core dumped)


Runing with GDB: 
https://gist.github.com/audricschiltknecht/5564034c5aac78d881e03f29e069a8f5

--
files: minimal_crash.py
messages: 286902
nosy: audric
priority: normal
severity: normal
status: open
title: SIGSEGV in PyObject_Malloc on python 3.6 and 3.7
type: crash
versions: Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46505/minimal_crash.py

___
Python tracker 

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



[issue15451] PATH is not honored in subprocess.Popen in win32

2017-02-03 Thread Eryk Sun

Eryk Sun added the comment:

> difference from the behaviour of Posix's execvpe() was deliberate

POSIX doesn't define execvpe [1]. GNU glibc implemented it in 2009 [2]. On 
Windows, MSC has had execvpe and spawnvpe since at least 5.0 [3], and I think 
it arrived in 4.0 in 1986. Guido added os._execvpe in 1.2b4 [4] in 1995. I 
think it's the only implementation of execvpe that searches the passed 
environment. 

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/execvp.html
[2]: https://sourceware.org/ml/libc-alpha/2009-10/msg00063.html
[3]: https://openlibrary.org/works/OL2028669W
[4]: https://hg.python.org/cpython/file/534a97c400cc/Lib/os.py

--
nosy: +eryksun

___
Python tracker 

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



[issue29430] zipfile: invalid link

2017-02-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The Applicaton Note link in both the doc and here work for me with Firefox and 
Edge.
'''
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd;>

http://www.w3.org/1999/xhtml; xml:lang="en">

...'''
You must have been hit by a temporary glitch.

--
nosy: +terry.reedy
resolution:  -> not a bug
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



[issue29414] Change 'the for statement is such an iterator' in Tutorial

2017-02-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The preceding sentences are also off.  "In many ways the object returned by 
range() behaves as if it is a list, but in fact it isn’t. It is an object which 
returns the successive items of the desired sequence when you iterate over it, 
but it doesn’t really make the list, thus saving space."

A range object is more like a tuple than a list.  Ranges and tuples are 
immutable sequences and the only non-dunder methods of both are count and 
index.  Lists, on the other hand, are mutable and several other exposed 
methods.  The difference between range and tuple is that ranges generate items 
as requested while tuples can be added and multiplied.

"Ranges are similar to tuples in being sequences with count and index methods.  
Both can be indexed, sliced, and iterated.  However, ranges cannot be added or 
multiplied.  They generate their items on request, thus saving space"

I am still thinking about the next two sentences, discussed above.  I do not 
like 'construct' to mean 'statement' (or callable).

--
nosy: +terry.reedy
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue27051] Create PIP gui

2017-02-03 Thread Upendra Kumar

Upendra Kumar added the comment:

I have tried to inquire about the possibility of a pip API, however currently 
it doesn't seem that it is top priority for pip organisation as per these issue 
threads :

1. https://github.com/pypa/pip/issues/924
2. https://github.com/pypa/pip/issues/3999

Currently pip list has --format option to give output as json format.

--

___
Python tracker 

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



[issue29400] Add instruction level tracing via sys.settrace

2017-02-03 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> test needed
title: Instruction level tracing via sys.settrace -> Add instruction level 
tracing via sys.settrace
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue29394] Cannot tunnel TLS connection through TLS connection

2017-02-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Maximilian, I could not tell if you are still requesting that something be 
changed, or if this should be closed.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue29387] Tabs vs spaces FAQ out of date

2017-02-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I agree with Marco in that I do not understand the 'should'.  Py 3 has a 
definite rule for when it raises.  (I don't remember the exact details as I 
don't use tabs.)  "Python raises xxxError if one mixes tabs and spaces in the 
same file." (Or whatever the rule is.)

--
nosy: +terry.reedy

___
Python tracker 

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



[issue27051] Create PIP gui

2017-02-03 Thread Upendra Kumar

Upendra Kumar added the comment:

@Terry, I believe pip package doesn't solve the core purpose of GUI. Instead of 
that I should make a .deb, .rpm or .exe package so that beginners can directly 
install it. However, I will create the PyPI package by 10th Feb.

--

___
Python tracker 

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



[issue27051] Create PIP gui

2017-02-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

As far as I am concerned, this upload fulfills your obligation to CPython and 
PSF with respect to sponsoring your GSOC project.  I wanted to get at least 
this loose end completed.

I have no further expectation of you.  I would *like* for you to make this pip 
installable by listing it on PyPI, so it can get some field testing. If you do, 
we can think about what to do from the pydev/cpython side. This was the meaning 
of Nick's last sentence above.

If you want to do this, I am sure you can get help, maybe from Nick, certainly 
from others.  I have never done a PyPI project, but I suppose I should learn 
how.

I do not remember *any* json output from pip.  Is this something new?  the 
beginning of an API?  Any coordination with pip people depends on them, of 
course.

--

___
Python tracker 

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



[issue29395] Edit with IDLE 3.6 don´t work if Name of File "code.py"

2017-02-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Steve is correct.  lib/code.py is used for IDLE's Shell.

One should generally avoid naming files the same as stdlib files.  To do so, 
one can either look in the module index of the docs or try 'import somename'.

When Python starts, it imports the modules it uses *before* it adds '' or 
 to the front of sys.path.  Applications that both import modules and 
run user code need to at least temporarily remove the addition to do imports.  
Having IDLE fix sys.path is #25488.

Duplicate names can also sabotage user code.  More than one person has written, 
for instance, a random.py, forgotten about it, and later written a mystuff.py 
in the same directory.  If mystuff has 'import random' with the intent to use 
the stdlib module, mystuff usually fails, often mysteriously.

When IDLE fails, make sure you run it from a console with 'python -m idlelib' 
(python3 on some systems, idlelib.idle on 2.7).  There will usually be an error 
message, which may or may not help.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> IDLE: Remove '', user_dir, and idlelib from sys.path when added

___
Python tracker 

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



[issue25488] IDLE: Remove '', user_dir, and idlelib from sys.path when added

2017-02-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The sys.pyth manipulation will be different in the idle and user processes.  If 
IDLE is started with -n, so both processes are the same, even more care is 
needed.

--

___
Python tracker 

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



[issue25488] IDLE: Remove '', user_dir, and idlelib from sys.path when added

2017-02-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I should have said that the problem with having '' at the beginning of the path 
is that when IDLE tries to import an stdlib module and '' (usually a user 
directory) contain a file with the same name, IDLE will import the user file 
instead and at some point likely exit.  For example, a user file named code.py 
masks the stdlib code.py, which is essential to Shell operation (#29395).

--

___
Python tracker 

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



[issue29428] Doctest documentation unclear about multi-line fixtures

2017-02-03 Thread Jim DeLaHunt

Jim DeLaHunt added the comment:

Marco and David, thank you again for your prompt replies. 

Let me respond to both of your comments on the doctest module documentation 
itself.


[Marco] > The example in section 26.3.3.2 [1], before the compound statement 
(the if/else), contains two simple statements. I also think the example is 
complete and straightforward for its purpose, and it does not have to be 
complicated adding avanced features.

You are correct, it contain two simple statements. I missed this when I first 
read the example.  Part of the problem is that the example is contrived. It is 
an actual test. I think it would be better to replace these two lines by a 
two-line test, one which sets up state and another which exercises the module 
under test.

You believe "the example is complete and straightforward for its purpose, and 
it does not have to be complicated adding avanced features." I am giving you 
feedback that it was not complete and straightforward for me, as an ordinary 
software developer trying to use the documentation. 


[Marco] > If you want a more complex control over your tests, for instance 
adding fixtures, you can find how to do it later...

No, control over tests is not what I am bringing up in this issue. I an 
concerned with documentation of doctest "Examples".


[Marco] > I am -1 on this [changing 26.3.3.2]. IMHO there is no need to add 
extra description to a such self-explaining, clear and concise example. But 
this I think is also clear from the beginning. Infact, the first line of the 
doc says: "The doctest module searches for pieces of text that look like 
interactive Python sessions"

[David] > As for the prompts, I agree with Marco: I don't think there is any 
need to add words, since it clearly says it is supposed to look like an 
interactive session and the reader gets reminded of the rules for that by the 
example provided.  IMO it is not appropriate to re-document those rules here.


My feedback to you is that for me, as an ordinary software developer trying to 
use the doctest module, this section is not "self-explaining, clear and 
concise", and that "How Docstring examples are recognised" is not "clear from 
the beginning". 

Perhaps we have a difference of opinion on how clear and effective this 
documentation is.  The best way to resolve that would be to gather data: having 
several ordinary software developers reading the document, then measuring their 
comprehension. That would be hard to arrange. At least this bug report will 
serve as a data point.

I believe that a library module documentation should at some point clearly 
specify how the module works. I believe section Section "26.3.3.2. How are 
Docstring Examples Recognized?" does poorly at that. To say, "In most cases a 
copy-and-paste of an interactive console session works fine, but doctest isn’t 
trying to do an exact emulation of any specific Python shell." is not a 
specification. It's a blurry generalisation. The list of "fine print" is at a 
better level of detail, but still doesn't mention how the parser treats 
statements, nor how prefixes relate to statement boundaries.

I am giving you feedback that for me, as a developer trying to use the doctest 
module, this documentation failed to give me the comprehension I needed to be 
effective.


[Marco] >Also this section [26.3.3.3, execution context] IMO is well written 
and clear. I do not know what to say... If someone else thinks it is not enough 
understandable, maybe the better think to do is to add a very small example, 
with two functions, that shows their docstrings have independent globals.

[David] > It does appear that "test" is being used ambiguously in the docs.  In 
most places it means a single statement, but in execution context it appears to 
be being used as a synonym for "docstring".  In that section it should be 
replaced by "docstring".  It would probably be worth checking the rest of the 
doc to make sure it is used consistently elsewhere as well.

[David] > The execution context section makes it clear that you can use names 
defined earlier, as does the fact that doctests emulate interactive sessions.  
Both of these make it clear you can do multi line examples that use shared 
state. 

Again, I am giving you feedback that this document was not "clear" for me. I am 
taking the time to write this issue because I think the documentation has 
weaknesses, and would like to help improve it.

I agree with David, that one problem in this section is that the word "test" is 
used with three different meanings. Some instances of the word "test" should be 
changed to "docstring" or similar. That would help. 


[David] > So in summary, I think we *need* a one word change in the execution 
context section, and we'll consider any other enhancements you want to propose.

All right, I'll work on a patch that makes that one-word change, and offers 
some other concise improvements. I expect it will be more that you think 
necessary, 

[issue27435] ctypes library loading and AIX - also for 2.7.X (and later)

2017-02-03 Thread Michael Felt

Michael Felt added the comment:

On 31/01/2017 20:22, Michael Haubenwallner wrote:
> Michael Haubenwallner added the comment:
>
> Feels like it is up to me to shed some light on various topics here:
Many thanks!
>
> AIX defines (static) "Object" files and "Shared Object" files. Both can (but 
> do not need to) be members of an "Archive Library".
>
> When talking about (dynamically loading) a "shared library" on non-AIX 
> systems, the correct wording for AIX is (dynamically loading) a "Shared 
> Object" - independent of whether it is a standalone file or an archive member.
>
> As you already agreed on, ctypes.util.find_library() indeed should return the 
> location of the Shared Object - as either "/path/to/file" or 
> "/path/to/file(member)". And ctypes.CDLL() should add the RTLD_MEMBER flag to 
> _ctypes.dlopen() if there is the "(member)" part.
>
> However, that does not necessarily mean the RTLD_MEMBER value needs to be 
> available through the ctypes API. Instead, RTLD_MEMBER feels more appropriate 
> for the _ctypes API - and on AIX only.
>
> Anyway:
> Unfortunately, there is no concept of embedding something like ELF's 
> DT_SONAME tag into the Shared Object. The very (PATH,BASE,MEMBER) value as 
> (specified to and) discovered by the linker is recorded into the just-linked 
> executable (or Shared Object). This implies that the runtime loader does 
> search for the very same filename (and member eventually) as the linker (at 
> linktime).
I assume this is why there are many systems besides AIX that do not 
support/use DT_SONAME. At least I see many references to "Shared 
Objects" libFOO.so.X.Y.Z, libFOO.so.X.Y, libFOO.so.X and libFOO.so (with 
the latter three being symbolic links to the first).
>
> However, to still get some kind of shared library versioning, multiple 
> versions of one Shared Object are put into one single Archive Library, where 
> the "old" versions get the LOADONLY flag set (via 'strip -e') - so 
> executables linked against an old version still can load their "old" Shared 
> Object, while the linker discovers the "current" version only.
>
> But this "single-filename" based shared library versioning is a huge burden 
> for packages managers - either human or software, even when they maintain 
> their packages in a private prefix (like /opt/freeware, /usr/local and 
> similar). Neither can they put their "current" Shared Object's version into 
> the single (system's) Archive Library, nor can they mark existing Shared 
> Objects as LOADONLY.
> On the other hand, they also do not want to pull all the system versions into 
> their own Archive Library.
Another issue is support for what I believe MacOS calls "fat" objects - 
that support both 32-bit and 64-bit applications - rather than /XXX/lib 
for 32-bit objects and /XXX/lib/lib64 or /XXX/lib64 for 64-bit objects.
>
> So for package managers it is crucial to have "multi-filename" based shared 
> library versioning instead.
>
> But there is help:
> AIX also provides (plain text) "Import Files": They contain a list of symbols 
> for the linker, and a (PATH,BASE,MEMBER) tuple naming the Shared Object that 
> provides these symbols at runtime.
a) Yes to above
b) One of the difficulties I faced is trying to guess what version -lFOO 
should find when there is more than one version available. Applications 
that are already linked do not look for a latest version - they know the 
member name that the linker found initially. ctypes.utils.find_library() 
does not provide a way to say which version should be found. Each 
implementation has it's way to find a version (e.g., a search of 
ldconfig -p output for a best guess)
> So yes, Import Files can be used for "multi-filename" based shared library 
> versioning.
>
> Thus, libtool now offers the "--with-aix-soname=svr4" configure flag, where 
> "libNAME.so.X" really is created as an Archive Library, containing the Shared 
> Object "shr.o" with the LOADONLY flag set, and the Import File "shr.imp" 
> referring to "libNAME.so.X(shr.o)" for runtime. Combined with the symlink 
> "libNAME.so", for the "-lNAME" argument the linker discovers the Import File 
> "libNAME.so(shr.imp)" now, while recording "libNAME.so.X(shr.o)" into the 
> executable for the runtime loader.
> Note that for 64bit the Shared Object and Import File is named "shr_64.o" and 
> "shr_64.imp", respectively.
>
> While libtool's "--with-aix-soname=svr4" variant creates "libNAME.a" from 
> static Objects only, both libtool's "--with-aix-soname=aix" and 
> "--with-aix-soname=both" - for backwards compatibility - create "libNAME.a" 
> for traditional "single-filename" based versioning: Without any static Object 
> - as even Shared Objects can be linked statically(!). But to statically link 
> the Shared Object (as an archive member), neither the LOADONLY flag must be 
> set, nor an Import File must be found (as Import Files cannot serve for 
> static linking).
>
> And "--with-aix-soname=aix", libtool still creates standalone 
> 

[issue29431] Add a PYTHONREVERSEDICTKEYORDER environment variable

2017-02-03 Thread R. David Murray

R. David Murray added the comment:

But that reliance/reproducibility-error would be an issue only on interpreters 
that don't preserve insertion order, and we're expecting we'll make that a 
language requirement.  So for now, or for as long as you think it is warranted, 
just test against interpreters that randomize the order.

Note that this is different from the pre-randomization dict behavior, where 
lots of programs depended on the accident-of-the-implementation order in which 
keys were returned.  What we think is coming is a guaranteed ordering, which 
is, thus, reproducible.

--

___
Python tracker 

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



[issue18859] README.valgrind should mention --with-valgrind

2017-02-03 Thread Łukasz Langa

Changes by Łukasz Langa :


--
assignee:  -> lukasz.langa
nosy: +lukasz.langa

___
Python tracker 

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



[issue26876] Extend MSVCCompiler class to respect environment variables

2017-02-03 Thread Rohit Jamuar

Rohit Jamuar added the comment:

Steve, I've limited the changes to _msvccompiler for the master-branch's patch. 
Is it alright?

--

___
Python tracker 

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



[issue29431] Add a PYTHONREVERSEDICTKEYORDER environment variable

2017-02-03 Thread lamby

lamby added the comment:

I think we are misunderstanding each other regarding our goals here :)

I'm not trying to test against other Python implementations or versions of 
CPython itself but rather "flush out" reproducibility issues in third-party 
Python code that (incorrectly) relies on dict ordering being relatively stable 
and/or in insertion order, etc. etc.

(The only reason I mention 3.6 is because the insertion-order behaviour there 
simply makes it easier to have a 'reverse' order)

--

___
Python tracker 

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



[issue29428] Doctest documentation unclear about multi-line fixtures

2017-02-03 Thread Jim DeLaHunt

Jim DeLaHunt added the comment:

Marco, thank you for the suggestion to watch Raymond Hettinger's talk. 

> I suggest you to watch this talk of Raymond Hettinger, before going on:
>
> https://www.youtube.com/watch?v=voXVTjwnn-U

That video is 63 minutes long, and a lot of those minutes are taken up by 
stories. I will watch the rest when I get time. I wish his insights were 
summarised in writing; I'll bet that would take much less than 63 minutes to 
read. I find that written text is a much faster way to deliver information, 
though maybe it takes the teacher more time to write well than to give a talk.

I understand your point about the need for a review, and reviews being the 
bottleneck. The "Lifecycle of a Patch" document[1] is clear about that.

[1] https://docs.python.org/devguide/patch.html#reviewing

--

___
Python tracker 

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



[issue29428] Doctest documentation unclear about multi-line fixtures

2017-02-03 Thread Jim DeLaHunt

Jim DeLaHunt added the comment:

Marco, thank you for your prompt comment. 

However, 
> Maybe you are running the doctest with Python 3. The StringIO module is no 
> more available in Python 3, so your doctest will fail on Python 3 

Please let me be clear. This issue is not about the StringIO module or about 
any of my doctests. It is about the documentation of the doctests module, and 
the ways in which that documentation is less helpful than it could be.

--

___
Python tracker 

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



[issue29395] Edit with IDLE 3.6 don´t work if Name of File "code.py"

2017-02-03 Thread Steve Dower

Steve Dower added the comment:

I assume this is because Idle is doing "import code" somewhere and picking up 
your file instead of the real one.

Renaming the file to not conflict with the standard library is an immediate 
workaround, but perhaps Idle should do some sys.path protection around wherever 
it's importing that module.

--
nosy: +steve.dower

___
Python tracker 

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



[issue26855] android: add platform.android_ver()

2017-02-03 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
assignee: xdegaye -> 

___
Python tracker 

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



[issue27640] add the '--disable-test-suite' option to configure

2017-02-03 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
assignee: xdegaye -> 

___
Python tracker 

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



[issue29176] /tmp does not exist on Android and is used by curses.window.putwin()

2017-02-03 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
assignee: xdegaye -> 

___
Python tracker 

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



[issue29185] test_distutils fails on Android API level 24

2017-02-03 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
assignee: xdegaye -> 

___
Python tracker 

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



[issue29184] skip tests of test_socketserver when bind() raises PermissionError (non-root user on Android)

2017-02-03 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
assignee: xdegaye -> 

___
Python tracker 

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



[issue29181] skip tests that raise PermissionError in test_tarfile (non-root user on Android)

2017-02-03 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
assignee: xdegaye -> 

___
Python tracker 

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



[issue29180] skip tests that raise PermissionError in test_os (non-root user on Android)

2017-02-03 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
assignee: xdegaye -> 

___
Python tracker 

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



[issue28833] cross compilation of third-party extension modules

2017-02-03 Thread Xavier de Gaye

Changes by Xavier de Gaye :


--
assignee: xdegaye -> 

___
Python tracker 

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



[issue29437] installation not listed for all users

2017-02-03 Thread Steve Dower

Steve Dower added the comment:

Thanks, this is the same as issue25166.

In short, we need a significant update to the WiX framework before this can be 
enabled, and so far the core WiX developers are not interested in doing it. 
I've been working on a patch, but it's actually fairly complicated to get right 
and I haven't managed it yet.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Windows AllUsers installation places uninstaller in user profile

___
Python tracker 

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



[issue29434] tuple.__repr__ may segv when it contains NULL

2017-02-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This looks similar to issue26811.

I think that if the reproducer is found it would be better to fix the case of 
leaking a tuple containing NULL rather than making repr() be aware of NULLs. 
repr() is not the only way to crash with such tuples.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29437] installation not listed for all users

2017-02-03 Thread Mike

New submission from Mike:

When installing Python 3.6 using the official installer and selecting "install 
for all users" from an account with admin privileges, the installation 
completes successfully and it shows in the list of installed programs for that 
user. However, because it's installation key is written into HKEY_CURRENT_USER, 
it is listed as installed program only for the user that ran the installation.

While Python still seems to run from another account, it is not listed as an 
installed program for the other user.

In the "install for all users" case, it should be registered in 
HKEY_LOCAL_MACHINE, instead of HKEY_CURRENT_USER.

--
components: Installation, Windows
messages: 286880
nosy: mray, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: installation not listed for all users
versions: Python 3.6

___
Python tracker 

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



[issue29431] Add a PYTHONREVERSEDICTKEYORDER environment variable

2017-02-03 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I concur with David and Inada on this one (it is likely to become a wasted 
effort and it impacts maintainability to try to support this even for the short 
run).

--
nosy: +rhettinger
resolution:  -> rejected
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



[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-03 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Here's a copy of $ANDROID_NDK/sysroot/usr/include/langinfo.h. (/sysroot/ stores 
unified headers [1]) To use those headers correctly, packagers have to add 
-D__ANDROID_API__=XY to CPPFLAGS. On the other hand, __ANDROID_API_FUTURE__ is 
defined in $ANDROID_NDK/sysroot/usr/include/android/api-level.h:

/*
 * Magic version number for a current development build, which has
 * not yet turned into an official release.
 */
#ifndef __ANDROID_API_FUTURE__
#define __ANDROID_API_FUTURE__ 1
#endif

As a result nl_langinfo() does not exist in all real API versions.

[1] 
https://android.googlesource.com/platform/ndk.git/+/master/docs/UnifiedHeaders.md

--
Added file: http://bugs.python.org/file46504/langinfo.h

___
Python tracker 

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



[issue29405] improve csv.Sniffer().sniff() behavior

2017-02-03 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +xiang.zhang

___
Python tracker 

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



[issue29436] Compilation failure against Android NDK r14 beta 2

2017-02-03 Thread Chi Hsuan Yen

New submission from Chi Hsuan Yen:

Since Android NDK r14 beta 2, unified headers provide langinfo.h but there's no 
nl_langinfo() in it, causing linking failures:

libpython3.7m.a(pylifecycle.o): In function `get_locale_encoding':
/home/yen/Projects/python3-android/src/cpython/Python/pylifecycle.c:234: 
undefined reference to `nl_langinfo'
libpython3.7m.a(fileutils.o): In function `_Py_device_encoding':
/home/yen/Projects/python3-android/src/cpython/Python/fileutils.c:65: undefined 
reference to `nl_langinfo'
libpython3.7m.a(_localemodule.o): In function `PyLocale_nl_langinfo':
/home/yen/Projects/python3-android/src/cpython/./Modules/_localemodule.c:447: 
undefined reference to `nl_langinfo'

Or compiler errors due to implicit function declarations if the patch at 
issue22747 is applied.

nl_langinfo.patch fixes it by adding some extra guarding macros.

Added some people from issue22747 to the nosy list, where the last change about 
langinfo.h and Android occurred.

--
components: Build
files: nl_langinfo.patch
keywords: patch
messages: 286877
nosy: Chi Hsuan Yen, haypo, skrah, xdegaye
priority: normal
severity: normal
status: open
title: Compilation failure against Android NDK r14 beta 2
type: compile error
versions: Python 3.7
Added file: http://bugs.python.org/file46503/nl_langinfo.patch

___
Python tracker 

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



[issue29433] any, all and sum should accept variadic args

2017-02-03 Thread Steven D'Aprano

Steven D'Aprano added the comment:

> Do you think I should send a mail to the ideas list?

Personally, I don't think so. You want to write any(a, b, c, d), 
but you can get the same effect now by writing any([a, b, c, d]).
There is unlikely to be any significant performance difference.

--

___
Python tracker 

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



[issue29423] using concurrent.futures.ProcessPoolExecutor in class giving 'TypeError: can't pickle _thread.RLock objects' in 3.6, but not 3.5

2017-02-03 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> not a bug
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



[issue29423] using concurrent.futures.ProcessPoolExecutor in class giving 'TypeError: can't pickle _thread.RLock objects' in 3.6, but not 3.5

2017-02-03 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Josh> There is nothing to fix behaviorally on Python's side ...
Serhiy> I concur with Josh

This implies to me that we should close this as 'not a bug', with possibly a 
new issue for better error reporting.

--

___
Python tracker 

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



[issue29433] any, all and sum should accept variadic args

2017-02-03 Thread sedrubal

sedrubal added the comment:

Thanks for your answers and for showing the issue with sum.

I think this would make python just a bit more sexier as it already is ;) Are 
there any other disadvantages (performance, ...)?

Do you think I should send a mail to the ideas list?

--

___
Python tracker 

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



[issue29347] Python 2.7.8 is crashing while creating weakref for a given object.

2017-02-03 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +xiang.zhang
versions:  -Python 3.3, Python 3.4

___
Python tracker 

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



[issue29376] threading._DummyThread.__repr__ raises AssertionError

2017-02-03 Thread Xiang Zhang

Xiang Zhang added the comment:

This seems an regression from #18808, so nosy Tim and Antoine. Since 
_DummyThread is always alive and daemonic, I think the solution could be 
overriding is_alive in _DummyThread and always returning True.

--
keywords: +patch
nosy: +xiang.zhang
stage:  -> patch review
type:  -> behavior
versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.4
Added file: http://bugs.python.org/file46502/issue29376.patch

___
Python tracker 

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



[issue29376] threading._DummyThread.__repr__ raises AssertionError

2017-02-03 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +pitrou, tim.peters

___
Python tracker 

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



[issue15451] PATH is not honored in subprocess.Popen in win32

2017-02-03 Thread Anthony Scopatz

Changes by Anthony Scopatz :


--
nosy: +Anthony Scopatz
versions: +Python 3.6

___
Python tracker 

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



[issue29431] Add a PYTHONREVERSEDICTKEYORDER environment variable

2017-02-03 Thread R. David Murray

R. David Murray added the comment:

Inada: we haven't 100% decided that this is going to become a language feature. 
 However it is likely to become so, so adding such a flag is probably wasted 
effort.  Further, if the goal is to test compatibility with other python 
implementations, shouldn't you actually be testing against those other 
implementations?  You are likely to catch more problems than just dict order 
that way.  So I vote -1 on this.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue29428] Doctest documentation unclear about multi-line fixtures

2017-02-03 Thread R. David Murray

R. David Murray added the comment:

And thanks for wanting to improve the docs!

--

___
Python tracker 

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



[issue29428] Doctest documentation unclear about multi-line fixtures

2017-02-03 Thread R. David Murray

R. David Murray added the comment:

It does appear that "test" is being used ambiguously in the docs.  In most 
places it means a single statement, but in execution context it appears to be 
being used as a synonym for "docstring".  In that section it should be replaced 
by "docstring".  It would probably be worth checking the rest of the doc to 
make sure it is used consistently elsewhere as well.

As for the prompts, I agree with Marco: I don't think there is any need to add 
words, since it clearly says it is supposed to look like an interactive session 
and the reader gets reminded of the rules for that by the example provided.  
IMO it is not appropriate to re-document those rules here.  However, if you 
come up with a really concise addition that clarifies it, we'll consider it.

I don't think an additional example of using previous state is required, and 
certainly not an additional section.  The execution context section makes it 
clear that you can use names defined earlier, as does the fact that doctests 
emulate interactive sessions.  Both of these make it clear you can do multi 
line examples that use shared state.  However, if you come up with an example 
that adds value to the documentation, we'll certainly consider it.

So in summary, I think we *need* a one word change in the execution context 
section, and we'll consider any other enhancements you want to propose.

--
nosy: +r.david.murray
versions: +Python 2.7, 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



[issue29435] Allow to pass fileobj to is_tarfile

2017-02-03 Thread Thom Wiggers

New submission from Thom Wiggers:

The tarfile.is_tarfile() function only supports opening from paths. However, 
the `Tarfile` class also supports opening from `fileobj`s. It would be useful 
if the is_tarfile function would also accept those.

For reference, this is the current implementation: 
https://github.com/python/cpython/blob/fcc3915a266b6cd220483c7020de0d71e293b2cb/Lib/tarfile.py#L2432

--
components: Library (Lib)
messages: 286869
nosy: twiggers
priority: normal
severity: normal
status: open
title: Allow to pass fileobj to is_tarfile
type: enhancement

___
Python tracker 

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



[issue29423] using concurrent.futures.ProcessPoolExecutor in class giving 'TypeError: can't pickle _thread.RLock objects' in 3.6, but not 3.5

2017-02-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It was backported but later reverted (54dd5c105334).

I concur with Josh. Thank you for good analysis Josh.

As for your idea about more detailed error reporting, I think it can be 
implemented. Separate exception can be raised for every object in the chain, 
with chaining one exception to other. This is separate issue.

--

___
Python tracker 

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



[issue29412] IndexError thrown on email.message.Message.get

2017-02-03 Thread R. David Murray

R. David Murray added the comment:

I'm really short on time to even review patches these days, but I'll see if I 
can pry any loose if someone wants to propose a patch.

--
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue29423] using concurrent.futures.ProcessPoolExecutor in class giving 'TypeError: can't pickle _thread.RLock objects' in 3.6, but not 3.5

2017-02-03 Thread R. David Murray

R. David Murray added the comment:

Oh, I take it back, it looks like the change was backported.  I think that's 
bad, but I wasn't involved in the decision :(

--

___
Python tracker 

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



[issue29423] using concurrent.futures.ProcessPoolExecutor in class giving 'TypeError: can't pickle _thread.RLock objects' in 3.6, but not 3.5

2017-02-03 Thread R. David Murray

R. David Murray added the comment:

See the issue I linked to.  RLocks were incorrectly pickled before but the 
resulting unpickled object was broken.  If the unpickled RLock never got used 
such code would not break, but the objects were inherently broken and this 
could lead to hard to debug problem when the objects were used.  Thus we fixed 
it in 3.6 only so as to not break working code in a maintenance release.  But 
in 3.6 and later, RLocks (among other things that were also broken) are no 
longer pickleable.

--

___
Python tracker 

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



[issue29433] any, all and sum should accept variadic args

2017-02-03 Thread Steven D'Aprano

Steven D'Aprano added the comment:

Serhiy, that doesn't generalise to code like:

any(a, b, c, *extras)

which is hard to write out by hand. You would have to say 

bool(a or b or c or any(extras))

I think this might be worth considering on Python-Ideas. It will probably be 
rejected, but if Sedrubal cares enough to raise the idea, it could be discussed.

However, sum should be taken off the list. The problem with accepting variadic 
args is that it clashes with current behaviour:

sum( [[1], [2], [3]], [4, 5] )

That would be ambiguous. Under the suggested variadic form, that should return 
a list:

[[1], [2], [3], 4, 5]

but it already has a meaning in Python today:

[4, 5, 1, 2, 3]


So sum() with variadic args would be ambiguous, or would break backwards 
compatibility. Neither of those would be acceptable.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue29378] Invalid example in documentation for PyErr_Fetch

2017-02-03 Thread Xiang Zhang

Xiang Zhang added the comment:

I can't see any problem with the example either. So I just close this issue for 
now. But if you still think it gets problems please reopen it and tell your 
thoughts.

--
nosy: +xiang.zhang
resolution:  -> not a bug
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



[issue29434] tuple.__repr__ may segv when it contains NULL

2017-02-03 Thread INADA Naoki

INADA Naoki added the comment:

The patch missed `continue;`.
And I couldn't reproduce the problem for now.

I'll reopen when I can reproduce the problem.

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



[issue29434] tuple.__repr__ may segv when it contains NULL

2017-02-03 Thread INADA Naoki

New submission from INADA Naoki:

sys.getobjects() contains tuples including NULLs.
Even without pydebug, tuple under construction can be exposed accidentally.

Allowing repr() for such tuples ease investigating what is the tuple.

--
components: Interpreter Core
files: tuple-repr-NULL.patch
keywords: patch
messages: 286861
nosy: inada.naoki
priority: normal
severity: normal
status: open
title: tuple.__repr__ may segv when it contains NULL
versions: Python 3.7
Added file: http://bugs.python.org/file46501/tuple-repr-NULL.patch

___
Python tracker 

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



[issue29433] any, all and sum should accept variadic args

2017-02-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is no such need. You can use operators.

any(arg1, arg2, arg3) -> arg1 or arg2 or arg3
all(arg1, arg2, arg3) -> arg1 and arg2 and arg3
sum(arg1, arg2, arg3) -> arg1 + arg2 + arg3

--
nosy: +serhiy.storchaka
resolution:  -> rejected
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



[issue29433] any, all and sum should accept variadic args

2017-02-03 Thread sedrubal

New submission from sedrubal:

any, all and sum (and maybe some other functions) should accept variadic args. 
It should be possible to do things like this:

>>> any(True, False, True)
True
>>> all(True, False, True)
False
>>> sum(1, 2, 3)
6

This was compliant to max and min behaviour:

>>> max(1, 2, 3)
3
>>> min(1, 2, 3)
1

--
messages: 286859
nosy: sedrubal
priority: normal
severity: normal
status: open
title: any, all and sum should accept variadic args
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue29432] wait_for(gather(...)) logs weird error message

2017-02-03 Thread Martin Teichmann

New submission from Martin Teichmann:

when waiting for a gather that times out, everything works as expected, yet a 
weird error message is logged. To give a minimal example:

import asyncio

@asyncio.coroutine
def main():
try:
sleep = asyncio.sleep(0.2)
yield from asyncio.wait_for(asyncio.gather(sleep),
timeout=0.1)
except asyncio.TimeoutError:
print("timed out: fine")
yield from asyncio.sleep(0.1)

asyncio.get_event_loop().run_until_complete(main())

This outputs:

timed out: fine
_GatheringFuture exception was never retrieved
future: <_GatheringFuture finished exception=CancelledError()>
concurrent.futures._base.CancelledError

As you can see, I used the pre-3.5 syntax so I could test whether it works on 
older systems. No, it doesn't.

I wrote a unit test for this problem, unfortunately I couldn't solve it yet.

--
components: asyncio
messages: 286858
nosy: Martin.Teichmann, gvanrossum, yselivanov
priority: normal
pull_requests: 24
severity: normal
status: open
title: wait_for(gather(...)) logs weird error message
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue29432] wait_for(gather(...)) logs weird error message

2017-02-03 Thread Martin Teichmann

Changes by Martin Teichmann :


--
type:  -> behavior

___
Python tracker 

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



[issue27051] Create PIP gui

2017-02-03 Thread Upendra Kumar

Upendra Kumar added the comment:

@Terry,

The attached files contain the master branch of the pip_gui. It contains all 
the work done by me till now in pip_gui.

If this projects need to be continued as open source project, is it expected to 
be continued as independent project, or CPython project or pip project. I am 
confused about it.

However, I think that the project should be continued with pip, which will also 
help speed up the process of standardization of output of pip for different 
commands. I believe still there are a lot of pip commands not having 'json' 
output.

--
Added file: http://bugs.python.org/file46500/pip_gui-master.zip

___
Python tracker 

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



[issue29429] Requests package is incompatible with py2exe

2017-02-03 Thread INADA Naoki

INADA Naoki added the comment:

Here is issue tracker of Python.
py2exe and requests are third party project.
Please report an issue to py2exe issue tracker.

--
nosy: +inada.naoki
resolution:  -> third party
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



[issue29431] Add a PYTHONREVERSEDICTKEYORDER environment variable

2017-02-03 Thread INADA Naoki

INADA Naoki added the comment:

For checking compatibility with other implementation, I want to wait
until other implementation compatible with 3.6+ which doesn't
keep insertion order of dict.
For now, there are no 3.6+ compatible Python implementation except CPython.

For checking compatibility with Python 3.5-, I -1 to add such flag.
Python 3.6 has many new features.  You should use 3.5 instead.

--

___
Python tracker 

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



[issue29387] Tabs vs spaces FAQ out of date

2017-02-03 Thread Xiang Zhang

Xiang Zhang added the comment:

LGTM. -t is not removed but only ignored in Py3 for backwards compatibility. 
And I am fine with the wording.

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue29431] Add a PYTHONREVERSEDICTKEYORDER environment variable

2017-02-03 Thread lamby

lamby added the comment:

> If the package produce same binary when dict keeps insertion order,
> isn't it a "reproducible build"?

No, as that's a CPython-specific (and 3.6+) implementation detail. Hence 
"forcing" a test for it :)

--

___
Python tracker 

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



[issue29431] Add a PYTHONREVERSEDICTKEYORDER environment variable

2017-02-03 Thread INADA Naoki

INADA Naoki added the comment:

I can't understand what is the problem.
If the package produce same binary when dict keeps insertion order,
isn't it a "reproducible build"?

--

___
Python tracker 

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



[issue29431] Add a PYTHONREVERSEDICTKEYORDER environment variable

2017-02-03 Thread lamby

lamby added the comment:

> Why don't you use OrderdDict and reversed()?

This isn't for my own code; I want to change the behaviour of CPython itself so 
it affects arbitrary third-party code - this is what we are testing when we are 
testing for reproducibility :)

--

___
Python tracker 

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



[issue29431] Add a PYTHONREVERSEDICTKEYORDER environment variable

2017-02-03 Thread INADA Naoki

INADA Naoki added the comment:

Why don't you use OrderdDict and reversed()?

--
nosy: +inada.naoki

___
Python tracker 

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



[issue29431] Add a PYTHONREVERSEDICTKEYORDER environment variable

2017-02-03 Thread lamby

New submission from lamby:

Due to implementation changes, since CPython 3.6 dict keys are returned
in insertion order. However, in order to test for reproducible builds [0],
it would be convenient to be able to reverse this ordering; we would then
run a build of an arbitrary package both with and without this flag and
compare the resulting binary.

(We already run such a testing framework, so specifying this environment
variable would be trivial. Note that this "reverse" would actually find
more issues than simply relying on the pre-3.6 non-deterministic
behaviour.)

This patch changes the behaviour of:

  * for x in d:
  * d.popitem()
  * d.items()
  * _PyDict_Next

 [0] https://reproducible-builds.org/

--
components: Interpreter Core
files: 0001-Add-a-PYTHONREVERSEDICTKEYORDER-environment-variable.patch
keywords: patch
messages: 286849
nosy: lamby
priority: normal
severity: normal
status: open
title: Add a PYTHONREVERSEDICTKEYORDER environment variable
type: enhancement
versions: Python 3.7
Added file: 
http://bugs.python.org/file46499/0001-Add-a-PYTHONREVERSEDICTKEYORDER-environment-variable.patch

___
Python tracker 

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



[issue29428] Doctest documentation unclear about multi-line fixtures

2017-02-03 Thread Marco Buttu

Marco Buttu added the comment:

> I just had a problem with doctests. It manifested as an
> error that occurred when I did
> >>> import StringIO in my doctest.

Maybe you are running the doctest with Python 3. The StringIO module is no more 
available in Python 3, so your doctest will fail on Python 3 and will pass on 
Python 2.

> 1. There is no example of a multiple-line doctest fixture:
> specifically, a fixture which involves at least one line to
> set up state, and another line to be the example that tested.
> I suggest adding such an example as a new section, "26.3.2.
> Usage: multi-line tests".
> Note that the example in 26.3.3.2 doesn't count: that is a
> Compound Statement, and I'm talking about a test consisting
> of multiple interactive statements.

The example in section 26.3.3.2 [1], before the compound statement (the 
if/else), contains two simple statements. I also think the example is complete 
and straightforward for its purpose, and it does not have to be complicated 
adding avanced features. If you want a more complex control over your tests, 
for instance adding fixtures, you can find how to do it later, in [2].

> 2. Section "26.3.3.2. How are Docstring Examples Recognized?" does
> not talk about when to use a PS1 prefix (>>>) and when to use a
> PS2 prefix (...). It should say to use the PS1 at the start of each
> Python "interactive statement", that is, a statement list ending with
> a newline, or a Compound Statement. And, to use the PS2 to prefix each
> continuing line within a Compound Statement. 

I am -1 on this. IMHO there is no need to add extra description to a such 
self-explaining, clear and concise example. But this I think is also clear from 
the beginning. Infact, the first line of the doc says: "The doctest module 
searches for pieces of text that look like interactive Python sessions"

> 3. Section "26.3.3.3. What’s the Execution Context?" is not
> clear about the crucial difference between state that accumulates
> within a single docstring from Example to Example, and that is reset
> from one docstring to another. The phrase "so that one test in M can’t
> leave behind crumbs that accidentally allow another test to work"
> can be interpreted as applying within a single docstring. The phrase
> "names defined earlier in the docstring being run" is easy to miss.

Also this section IMO is well written and clear. I do not know what to say... 
If someone else thinks it is not enough understandable, maybe the better think 
to do is to add a very small example, with two functions, that shows their 
docstrings have independent globals.

> Unless someone tells me otherwise, I'll get around to filing similar
> issues against Python 3.6 and Python 2.7.
> Then it's my intention to write improvements to the documentation
> for Python 3.7, 3.6, and 2.7, and submit each of those.

Keep in mind that writing a patch is not enough. The patch has to be reviewed, 
and that means other people have to find the time to work on it. I suggest you 
to watch this talk of Raymond Hettinger, before going on:

https://www.youtube.com/watch?v=voXVTjwnn-U


[1] 
https://docs.python.org/3/library/doctest.html#how-are-docstring-examples-recognized
[2] https://docs.python.org/3/library/doctest.html#unittest-api

--
nosy: +marco.buttu

___
Python tracker 

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



[issue29430] zipfile: invalid link

2017-02-03 Thread Lucas Moeskops

New submission from Lucas Moeskops:

The ZipFile documentation shows a link to the PKZip Application Node. This 
link, with address 
"https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT; goes to a "Page 
Not Found" document.

--
messages: 286847
nosy: lucasmus
priority: normal
severity: normal
status: open
title: zipfile: invalid link
versions: Python 3.6

___
Python tracker 

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



[issue29429] Requests package is incompatible with py2exe

2017-02-03 Thread reason

New submission from reason:

I use py2exe to compile some py files importing 'Requests' package into 
executable files user Windows.But I get unexpected exception , 'missing 
modules'.
Even I tried to specify the '-p requests',I still got failure.

--
messages: 286846
nosy: reason
priority: normal
severity: normal
status: open
title: Requests package is incompatible with py2exe
type: behavior
versions: Python 3.3

___
Python tracker 

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



[issue29429] Requests package is incompatible with py2exe

2017-02-03 Thread reason

Changes by reason :


--
versions: +Python 3.4 -Python 3.3

___
Python tracker 

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



  1   2   >