[issue23551] IDLE to provide menu link to PIP gui.

2017-04-20 Thread Aivar Annamaa

Aivar Annamaa added the comment:

In case this issue becomes active again, I'm listing my design implemented in 
Thonny IDE (http://thonny.org) -- see the attached png.

If you decide same design is suitable for IDLE, then I'm happy to create a 
version of the dialog without Thonny dependencies. Here's the current source: 
https://bitbucket.org/plas/thonny/src/master/thonny/plugins/pip_gui.py?at=master=file-view-default

--
nosy: +Aivar.Annamaa
Added file: http://bugs.python.org/file46821/thonny_pip_gui.png

___
Python tracker 

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



[issue30114] json module: it is not possible to override 'true', 'false' values during encoding bool

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution:  -> rejected

___
Python tracker 

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



[issue30114] json module: it is not possible to override 'true', 'false' values during encoding bool

2017-04-20 Thread Bob Ippolito

Bob Ippolito added the comment:

Agreed, this does seem unnecessary. The library has been in active use for over 
a decade, and this is the first time I've seen this request. I would recommend 
preprocessing the data that you're going to encode if you have a need for this.

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



[issue30114] json module: it is not possible to override 'true', 'false' values during encoding bool

2017-04-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I concur with Raymond.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30122] Added missing archive programs and close option to Windows docs.

2017-04-20 Thread Decorater

Changes by Decorater :


--
title: Added missing things to Windows docs. -> Added missing archive programs 
and close option to Windows docs.

___
Python tracker 

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



[issue30122] Added missing things to Windows docs.

2017-04-20 Thread Decorater

Changes by Decorater :


--
pull_requests: +1349

___
Python tracker 

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



[issue30122] Added missing things to Windows docs.

2017-04-20 Thread Decorater

Changes by Decorater :


--
pull_requests: +1348

___
Python tracker 

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



[issue30122] Added missing things to Windows docs.

2017-04-20 Thread Decorater

Changes by Decorater :


--
pull_requests: +1347

___
Python tracker 

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



[issue30122] Added missing things to Windows docs.

2017-04-20 Thread Decorater

New submission from Decorater:

I realized the Windows docs lacked some information so I added it. I will try 
to create an cherry pick for 3.6 and 3.6 as well. Also if desired I could also 
see if it can be applied to the 2.7 branch as well.

--
assignee: docs@python
components: Documentation
messages: 292005
nosy: Decorater, docs@python
priority: normal
severity: normal
status: open
title: Added missing things to Windows docs.
versions: 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



[issue30114] json module: it is not possible to override 'true', 'false' values during encoding bool

2017-04-20 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Sorry, I think this is unnecessary feature creep.  The goal of the JSON module 
is to generate valid JSON for some semantically equivalent Python.  Wanting to 
turn *True* into the string "True" isn't in the spirit of the module and 
certainly not worth all the proposed code churn.  If this is really what you 
need (a somewhat exotic need at that), then I would recommend writing a 
recursive tree walker that replaces *True* nodes with "True" prior to outside 
of the JSON module.

--
assignee:  -> bob.ippolito
nosy: +bob.ippolito, rhettinger
versions: +Python 3.7 -Python 2.7

___
Python tracker 

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



[issue30104] Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot

2017-04-20 Thread Ed Maste

Changes by Ed Maste :


--
nosy: +emaste

___
Python tracker 

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



[issue29191] liblzma is missing from pcbuild.sln

2017-04-20 Thread Steve Dower

Steve Dower added the comment:


New changeset f60c9e54f501065f3be2a4cfb4c387dfa2f243a9 by Steve Dower (Segev 
Finer) in branch 'master':
bpo-29191: Add liblzma.vcxproj to pcbuild.sln and other missing entries (#1222)
https://github.com/python/cpython/commit/f60c9e54f501065f3be2a4cfb4c387dfa2f243a9


--

___
Python tracker 

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



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-04-20 Thread Segev Finer

Changes by Segev Finer :


--
pull_requests: +1346

___
Python tracker 

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



[issue29191] liblzma is missing from pcbuild.sln

2017-04-20 Thread Segev Finer

Changes by Segev Finer :


--
pull_requests: +1345

___
Python tracker 

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



[issue30121] Windows: subprocess debug assertion on failure to execute the process

2017-04-20 Thread Segev Finer

New submission from Segev Finer:

subprocess triggers a debug assertion in the CRT on failure to execute the 
process due to closing the pipe *handles* in the except clause using os.close 
rather than .Close() (os.close closes CRT file descriptors and not handles).

In addition to that once this is fixed there is also a double free/close since 
we need to set `self._closed_child_pipe_fds = True` once we closed the handles 
in _execute_child so they won't also be closed in __init__.

To reproduce, do this in a debug build of Python:

import subprocess
subprocess.Popen('exe_that_doesnt_exist.exe', stdout=subprocess.PIPE)

See: https://github.com/python/cpython/pull/1218#discussion_r112550959

--
components: Library (Lib), Windows
messages: 292002
nosy: Segev Finer, eryksun, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows: subprocess debug assertion on failure to execute the process
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



[issue30104] Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot

2017-04-20 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +1344

___
Python tracker 

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



[issue30104] Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot

2017-04-20 Thread Dimitry Andric

Dimitry Andric added the comment:

This is most likely the same issue we found in https://bugs.freebsd.org/216770, 
which was reported upstream to LLVM here: 
https://bugs.llvm.org//show_bug.cgi?id=31928, and resulted in a very long and 
not really productive discussion about whether type punning in this way is 
officially allowed, or a GNU extension.  I will gladly leave it to language 
lawyers. :)

In our case, easy fix was to use -fno-strict-aliasing, as we did here:
https://svnweb.freebsd.org/changeset/base/313706

--
nosy: +dim

___
Python tracker 

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



[issue30104] Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot

2017-04-20 Thread STINNER Victor

STINNER Victor added the comment:

> Why is -ffast-math being used? That seems like it's asking for trouble.

Sorry, my comment was unclear: I only tried to list all compiler options which 
have an impact on floating point numbers.

> So this is smelling like a compiler bug to me.

Right, I will report it to LLVM (clang).

--

___
Python tracker 

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



[issue30096] Update examples in abc documentation to use abc.ABC

2017-04-20 Thread Eric Appelt

Eric Appelt added the comment:

I created a PR to update the documentation to use this pattern and follow 
Raymond's suggestion of showing both ways to define an abc.

In order to make the examples comprehensible when read from beginning to end, I 
reordered the classes so that abc.ABC is described first.

--
nosy: +Eric Appelt

___
Python tracker 

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



[issue30096] Update examples in abc documentation to use abc.ABC

2017-04-20 Thread Eric Appelt

Changes by Eric Appelt :


--
pull_requests: +1343

___
Python tracker 

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



[issue29606] urllib FTP protocol stream injection

2017-04-20 Thread Dong-hee Na

Dong-hee Na added the comment:

I uploaded the PR which check invalid URL such as 
ftp://foo:bar%0d%0ainjec...@example.net/file.png

--
nosy: +corona10

___
Python tracker 

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



[issue29802] A possible null-pointer dereference in struct.s_unpack_internal()

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1342

___
Python tracker 

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



[issue29802] A possible null-pointer dereference in struct.s_unpack_internal()

2017-04-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 7a113a0cbf545588d61286fcc0e89141cf211735 by Serhiy Storchaka in 
branch '3.6':
bpo-29802: Fix the cleaning up issue in PyUnicode_FSDecoder(). (#1217)
https://github.com/python/cpython/commit/7a113a0cbf545588d61286fcc0e89141cf211735


--

___
Python tracker 

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



[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2017-04-20 Thread Segev Finer

Segev Finer added the comment:

OK Rietveld definitely punted on the git patch (I guess it's only for the old 
Mercurial repo, I don't think it actually even support Git...)

I will try re-submitting the patch as a PR so that it can be reviewed easily.

--

___
Python tracker 

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



[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2017-04-20 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +1341

___
Python tracker 

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



[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2017-04-20 Thread Segev Finer

Segev Finer added the comment:

Oh LOL!!! I missed the fact that Python finally moved to GitHub!
Rebased the patch on top of the Git master XD (And removed accidentally 
committed code... sorry...)

I still submitted as a patch since I don't know if the infrastructure handles 
moving a patch to a PR well :P

--
Added file: 
http://bugs.python.org/file46820/windows-subprocess-close-fds-v6.patch

___
Python tracker 

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



[issue29802] A possible null-pointer dereference in struct.s_unpack_internal()

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1340

___
Python tracker 

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



[issue29606] urllib FTP protocol stream injection

2017-04-20 Thread Dong-hee Na

Changes by Dong-hee Na :


--
pull_requests: +1339

___
Python tracker 

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



[issue30104] Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot

2017-04-20 Thread Mark Dickinson

Mark Dickinson added the comment:

Hmm. Just looked at dto5.c; nice work reducing it to something so simple.

This is looking a bit like either a strict-aliasing related problem, or a 
compiler bug, or both. My understanding of the "union trick" that dtoa.c uses 
is that it's well-defined under C99+TC3 (though that wasn't clear under the 
original C99), so it shouldn't be legitimate for an optimisation to cause 
different results to be produced.

So this is smelling like a compiler bug to me.

--

___
Python tracker 

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



[issue30085] Discourage operator.__dunder__ functions

2017-04-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Raymond assigned the PR to himself, so I added him here as nosy and assignee.

--

___
Python tracker 

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



[issue30120] add new key words to keyword lib

2017-04-20 Thread R. David Murray

Changes by R. David Murray :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> keyword module missing async and await keywords

___
Python tracker 

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



[issue30104] Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot

2017-04-20 Thread Mark Dickinson

Mark Dickinson added the comment:

Why is -ffast-math being used? That seems like it's asking for trouble.

--

___
Python tracker 

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



[issue30120] add new key words to keyword lib

2017-04-20 Thread Михайло Гавеля

Changes by Михайло Гавеля :


--
pull_requests: +1338

___
Python tracker 

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



[issue30085] Discourage operator.__dunder__ functions

2017-04-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

My suggestion from the python-ideas thread:: replace the current

"The function names are those used for special class methods; variants without 
leading and trailing __ are also provided for convenience."

with

""Many function names are those used for special methods, minus the double 
underscores.  For backward compatibility, many of these have a variant with the 
double underscores kept.  We recommend using the dunderless form.  Note that 
operator.__add__(x, y), for instance, being the same as x + y, is not the same 
as x.__add__(y)."

Possibly add ", since the first two may result in calling y.__radd__(x)".



Raymond assigned the

--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue30120] add new key words to keyword lib

2017-04-20 Thread Михайло Гавеля

Changes by Михайло Гавеля :


--
components: Library (Lib)
nosy: Михайло Гавеля
priority: normal
severity: normal
status: open
title: add new key words to keyword lib
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



[issue29802] A possible null-pointer dereference in struct.s_unpack_internal()

2017-04-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 40db90c1ce1a59d5f5f2894bb0ce3211bf27 by Serhiy Storchaka in 
branch 'master':
bpo-29802: Fix reference counting in module-level struct functions (#1213)
https://github.com/python/cpython/commit/40db90c1ce1a59d5f5f2894bb0ce3211bf27


--

___
Python tracker 

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



[issue30119] (ftplib) A remote attacker could possibly attack by containing the newline characters

2017-04-20 Thread Dong-hee Na

Changes by Dong-hee Na :


--
title: A remote attacker could possibly use this flaw to manipulate an FTP 
connection opened by a Python application -> (ftplib) A remote attacker could 
possibly attack by containing the newline characters

___
Python tracker 

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



[issue19764] subprocess: use PROC_THREAD_ATTRIBUTE_HANDLE_LIST with STARTUPINFOEX on Windows Vista

2017-04-20 Thread Segev Finer

Segev Finer added the comment:

Added the 5th version after another review by eryksun (In rietveld).

--
Added file: 
http://bugs.python.org/file46819/windows-subprocess-close-fds-v5.patch

___
Python tracker 

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



[issue30119] A remote attacker could possibly use this flaw to manipulate an FTP connection opened by a Python application

2017-04-20 Thread Dong-hee Na

Changes by Dong-hee Na :


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



[issue30119] A remote attacker could possibly use this flaw to manipulate an FTP connection opened by a Python application

2017-04-20 Thread Dong-hee Na

Changes by Dong-hee Na :


--
pull_requests: +1337

___
Python tracker 

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



[issue30119] A remote attacker could possibly use this flaw to manipulate an FTP connection opened by a Python application

2017-04-20 Thread Dong-hee Na

New submission from Dong-hee Na:

It was discovered that the FTP client implementation in the Networking 
component of Python failed to correctly handle user inputs. 
A remote attacker could possibly use this flaw to manipulate an FTP connection 
opened by a Python application if it could make it access a specially crafted 
FTP URL.

See 
http://blog.blindspotsecurity.com/2017/02/advisory-javapython-ftp-injections.html

and https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-3533

I upload the patch for this issue.

--
messages: 291988
nosy: corona10
priority: normal
severity: normal
status: open
title: A remote attacker could possibly use this flaw to manipulate an FTP 
connection opened by a Python application
type: security

___
Python tracker 

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



[issue30104] Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot

2017-04-20 Thread STINNER Victor

STINNER Victor added the comment:

Much simpler test:

[haypo@freebsd ~/prog/python/master]$ clang40 -O1 dtoa5.c -o x && ./x
k=1
aadj=3.364
test ok
[haypo@freebsd ~/prog/python/master]$ clang40 -O2 dtoa5.c -o x && ./x
k=1
aadj=1.682
test FAILED: BUG!

--
Added file: http://bugs.python.org/file46818/dtoa5.c

___
Python tracker 

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



[issue30115] test_logging report reference leak

2017-04-20 Thread Vinay Sajip

Vinay Sajip added the comment:

I just did a git pull, then:

$ make distclean
$ ./configure --with-pydebug
$ make EXTRA_CFLAGS="-DPy_REF_DEBUG -DPy_TRACE_REFS"
$ ./python
Python 3.7.0a0 (heads/master:8f5cdfa, Apr 20 2017, 16:41:52) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
$ ./python -m test.regrtest -R : test_logging
Run tests sequentially
0:00:00 [1/1] test_logging
beginning 9 repetitions
123456789
.
test_logging passed in 3 min 2 sec
1 test OK.

Total duration: 3 min 2 sec
Tests result: SUCCESS

I do sometimes get errors if I run again, e.g.

test_logging leaked [-164, 164, 0, 0] references, sum=0
test_logging leaked [-29, 31, 0, 0] memory blocks, sum=2

but results appear different every time, it seems. Is there any way to get them 
reproducibly?

--

___
Python tracker 

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



[issue21842] Fix IDLE in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21834] Fix a number of tests in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21835] Fix Tkinter in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21836] Fix sqlite3 in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21837] Fix tarfile in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21839] Fix distutils in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21838] Fix ctypes in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21841] Fix xml.sax in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21843] Fix doctest in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21845] Fix plistlib in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21846] Fix zipfile in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21848] Fix logging in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21850] Fix httplib and SimpleHTTPServer in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21851] Fix gettext in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21852] Fix optparse in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue21854] Fix cookielib in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies:  -Fix unicodeless build of Python
resolution:  -> rejected

___
Python tracker 

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



[issue21854] Fix cookielib in unicodeless build

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Fix unicodeless build of Python
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



[issue21833] Fix unicodeless build of Python

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue30104] Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot

2017-04-20 Thread STINNER Victor

STINNER Victor added the comment:

> Still ok with clang 3.8 with -O1:

Sorry, you should read clang 4.0 here.

--

___
Python tracker 

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



[issue30104] Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot

2017-04-20 Thread STINNER Victor

STINNER Victor added the comment:

I created a test case: attached dtoa2.c.

Ok with GCC 6.3.1 (on Fedora 25) and clang 3.8 (on FreeBSD 11) with -O3:

haypo@selma$ gcc -O3 dtoa2.c -o x && ./x
text: 29865e170 -> float: 2.9865e+174
0x1.8265ea9f864bcp+579
{bc 64 f8 a9 5e 26 28 64}

[haypo@freebsd ~/prog/python/master]$ clang -O3 dtoa2.c -o x && ./x
text: 29865e170 -> float: 2.9865e+174
0x1.8265ea9f864bcp+579
{bc 64 f8 a9 5e 26 28 64}


Still ok with clang 3.8 with -O1:

[haypo@freebsd ~/prog/python/master]$ clang40 -O1 dtoa2.c -o x && ./x
text: 29865e170 -> float: 2.9865e+174
0x1.8265ea9f864bcp+579
{bc 64 f8 a9 5e 26 28 64}


Error with clang 4.0 using -O2 (on FreeBSD 11):

[haypo@freebsd ~/prog/python/master]$ clang40 -O2 dtoa2.c -o x && ./x
text: 29865e170 -> float: 2.9865e+174
0x1.8265ea9f864bdp+579<~ HERE, bd instead of bc
{bd 64 f8 a9 5e 26 28 64} <~ HERE, bd instead of bc

--
Added file: http://bugs.python.org/file46817/dtoa2.c

___
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-04-20 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


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



[issue30104] Float rounding errors on AMD64 FreeBSD CURRENT Debug 3.x buildbot

2017-04-20 Thread STINNER Victor

STINNER Victor added the comment:

test_strtod fails on FreeBSD using clang 4.0, but pass using clang 3.8.

Links:

* https://gcc.gnu.org/wiki/FloatingPointMath
* https://gcc.gnu.org/wiki/Math_Optimization_Flags
* ICC fp-model: https://software.intel.com/en-us/node/682946

GCC options:

* -ffp-contract=off / -ffp-contract=fast
* -fp-model (not supported by clang)
* -mfpmath=sse: no effect on Clang, it's already the default and -mfpmath=387 
is not supported on x86_64 ISA
* -ffast-math
* -fexcess-precision=standard: not supported by clang

--

___
Python tracker 

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



[issue18971] Use argparse in the profile/cProfile modules

2017-04-20 Thread Louie Lu

Louie Lu added the comment:

haypo, murray, thanks for pointing this thing, I will let go about the bad 
message test, move to output file and sort test tomorrow, also add a new issue: 
#30118

--

___
Python tracker 

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



[issue30118] Adding unittest for cProfile / profile command line interface

2017-04-20 Thread Louie Lu

New submission from Louie Lu:

Serhiy provide a cProfile / profile CLI optparse to argparse patch in #18971, 
it is time to add up the unittest of CLI test.

I'll add the unittest these days for it.

--
components: Library (Lib)
messages: 291981
nosy: louielu, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Adding unittest for cProfile / profile command line interface
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



[issue30102] improve performance of libSSL usage on hashing

2017-04-20 Thread Gustavo Serra Scalet

Gustavo Serra Scalet added the comment:

> Since OPENSSL_config() accepts a filename, maybe a first step would be
> to expose the function as ssl.OPENSSL_config(filename) to allow user to
> load *explicitly* a configuration file? ssl.OPENSSL_config() would call
> OPENSSL_config(NULL). Would it work for you, Gustavo?

It would work, I would just wait for such a decision.

BTW, that interface is deprecated as we're discussing on the issue on GitHub:
https://github.com/openssl/openssl/blob/cda3ae5bd0798c56fef5a5c1462d51ca1776504e/doc/crypto/OPENSSL_config.pod#notes

I'll continue analyzing this issue there.

--

___
Python tracker 

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



[issue29943] PySlice_GetIndicesEx change broke ABI in 3.5 and 3.6 branches

2017-04-20 Thread Nathaniel Smith

Nathaniel Smith added the comment:

FYI: https://github.com/pandas-dev/pandas/pull/16066

--

___
Python tracker 

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



[issue30112] Spam

2017-04-20 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy:  -drkirkby, louielu
title: useful things -> Spam

___
Python tracker 

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



[issue18971] Use argparse in the profile/cProfile modules

2017-04-20 Thread R. David Murray

R. David Murray added the comment:

Well, part of the point of the tests is to make sure the module's behavior 
doesn't change when doing the conversion to argparse.  But "behavior changing" 
doesn't extend to the exact format of the output...that can change, as long as 
what the module *does* given specific cli argument combinations stays the same. 
 Ideally, you write the tests so that it is not sensitive to the exact output, 
but realistically some tests may need to be different between the optparse case 
and the argparse case to get good coverage.

Note that even with good tests, you can still miss behavior changes.  We tried 
to do a good job on the tests for compileall, for example, and we still 
introduced a bug or two when we converted to argparse.

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



[issue18971] Use argparse in the profile/cProfile modules

2017-04-20 Thread STINNER Victor

STINNER Victor added the comment:

> bad news, somehow the output of std.err and std.out have different between 
> optparse and argparse

Only test argparse. I don't think that it matters to test that the change 
doesn't change the behaviour.

You can also redirect stderr to stdout.

What do you want to test?

--
nosy: +haypo

___
Python tracker 

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



[issue18971] Use argparse in the profile/cProfile modules

2017-04-20 Thread Louie Lu

Louie Lu added the comment:

bad news, somehow the output of std.err and std.out have different between 
optparse and argparse, even if the test is done, it still need to convert some 
testcase to argparse compatible.

--
nosy: +louielu

___
Python tracker 

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



[issue30116] numpy.ndarray.T doesn't change the structure

2017-04-20 Thread R. David Murray

R. David Murray added the comment:

Numpy is not part of the Python standard library.  You'll need to engage with 
the numpy community on this question.  (I say engage with them on the question, 
not report a bug to them, because I highly doubt this is a bug...there's 
probably some way to do what you want, so I suggest asking a question first 
rather than reporting a bug).

--
nosy: +r.david.murray
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



[issue30109] make reindent failed.

2017-04-20 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 430020500c56259d31e07d32771f017952bad4e0 by Mariatta in branch 
'3.6':
[3.6] bpo-30109: Fix reindent.py (GH-1207) (GH-1208)
https://github.com/python/cpython/commit/430020500c56259d31e07d32771f017952bad4e0


--

___
Python tracker 

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



[issue30109] make reindent failed.

2017-04-20 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:


New changeset 60d27f42a07d0b9d4a2c3fb160cac1683e91f196 by Mariatta in branch 
'3.5':
[3.5] bpo-30109: Fix reindent.py (GH-1207) (GH-1209)
https://github.com/python/cpython/commit/60d27f42a07d0b9d4a2c3fb160cac1683e91f196


--

___
Python tracker 

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



[issue29533] urllib2 works slowly with proxy on windows

2017-04-20 Thread Marc Schlaich

Marc Schlaich added the comment:

Well, you can read the proxy settings from registry and write them to 
os.environ (no_proxy needs to be transformed as it has a different format).

This will only take effect for the current process.

--

___
Python tracker 

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



[issue30117] test_lib2to3.test_parser.test_all_project_files() fails

2017-04-20 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +barry

___
Python tracker 

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



[issue13125] test_all_project_files() expected failure

2017-04-20 Thread STINNER Victor

STINNER Victor added the comment:

I created the issue #30117 since the bug wasn't fixed yet.

--
nosy: +haypo

___
Python tracker 

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



[issue30117] test_lib2to3.test_parser.test_all_project_files() fails

2017-04-20 Thread STINNER Victor

New submission from STINNER Victor:

The test_lib2to3.test_parser.test_all_project_files() test fails and produces 
an annoying output. See the issue #13125

Example of a buildbot:

0:11:09 [398/404] test_lib2to3 passed (39 sec)
--- 
/root/buildarea/3.x.angelico-debian-amd64/build/Lib/lib2to3/tests/data/bom.py   
2017-02-11 12:20:43.53200 +1100
+++ @   2017-04-20 22:05:37.157911808 +1000
@@ -1,2 +1,2 @@
-# coding: utf-8
+# coding: utf-8
 print "BOM BOOM!"

Example by running: ./python -m test -v test_lib2to3
---
test_all_project_files (lib2to3.tests.test_parser.TestParserIdempotency) ... 
/home/haypo/prog/python/master/Lib/lib2to3/tests/test_parser.py:393: 
UserWarning: ParseError on file 
/home/haypo/prog/python/master/Lib/lib2to3/main.py (bad input: type=22, 
value='=', context=('', (130, 38)))
  warnings.warn('ParseError on file %s (%s)' % (filepath, err))
/home/haypo/prog/python/master/Lib/lib2to3/tests/test_parser.py:393: 
UserWarning: ParseError on file 
/home/haypo/prog/python/master/Lib/lib2to3/tests/pytree_idempotency.py (bad 
input: type=22, value='=', context=('', (49, 33)))
  warnings.warn('ParseError on file %s (%s)' % (filepath, err))
--- /home/haypo/prog/python/master/Lib/lib2to3/tests/data/bom.py
2017-02-10 23:10:03.392778645 +0100
+++ @   2017-04-20 14:32:49.921613096 +0200
@@ -1,2 +1,2 @@
-# coding: utf-8
+# coding: utf-8
 print "BOM BOOM!"
expected failure
---


The test fails to parse the following code:
---
from __future__ import print_function
import sys
print("WARNING", file=sys.stderr)
---

whereas lib2to3 is able to parse the code. It seems like the code uses a 
lib2to3.tests.support.driver object. Maybe this object lacks the fixer which 
parses the __future__ imports?


The minimum fix would be to make the test quiet: remove the warning, don't log 
anything.

The best would be fix the test.

--
components: Tests
keywords: easy
messages: 291970
nosy: haypo
priority: normal
severity: normal
status: open
title: test_lib2to3.test_parser.test_all_project_files() fails
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



[issue29718] Fixed compile on cygwin.

2017-04-20 Thread Erik Bray

Erik Bray added the comment:

This seems to be fixing a number of different Cygwin issues, many of which are 
known (some of these patches come from the Cygwin port of Python).  However, 
some of these issues are already being handled separately, such as #25658, and 
I think rather than one big mongo patch it wold be good to break this up into 
individual issues.

I was also just planning to submit some individual patches for review.

--
nosy: +erik.bray

___
Python tracker 

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



[issue30030] Simplify _RandomNameSequence

2017-04-20 Thread STINNER Victor

STINNER Victor added the comment:

"Generating every name consumes about 16 random bytes. This can exhaust the 
system entropy and slowdown other applications."

Crys and Alex_Gaynor confirmed me on IRC that these two assumptions are both 
wrong.

See for example https://www.2uo.de/myths-about-urandom/

Q: But that's good! /dev/random gives out exactly as much randomness as it has 
entropy in its pool. /dev/urandom will give you insecure random numbers, even 
though it has long run out of entropy.

A:  Fact: No. Even disregarding issues like availability and subsequent 
manipulation by users, the issue of entropy “running low” is a straw man. About 
256 bits of entropy are enough to get computationally secure numbers for a 
long, long time. 

--

About performance, well, it's not exactly "wrong" but "inaccurate". Abusing 
/dev/urandom only hurt other applications which also abuse /dev/urandom. Such 
use case is very unlikely.

* The bad performance of concurrent /dev/urandom reader was analyzed by an old 
article of 2014, but see comments:
  http://drsnyder.us/2014/04/16/linux-dev-urandom-and-concurrency.html
* The performance issue was fixed in Linux 4.8, 
https://github.com/torvalds/linux/commit/1e7f583af67be4ff091d0aeb863c649efd7a9112

--

___
Python tracker 

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



[issue30116] numpy.ndarray.T doesn't change the structure

2017-04-20 Thread m.meliani

New submission from m.meliani:

The few following lines, i believe, show how the numpy.ndarray.T or 
numpy.ndarray.transpose() don't change the structure of the data only the way 
they're displayed. Which is sometimes a problem when handling big quantities of 
data which you need to look at a certain way for sorting problems among others.

>>> import numpy as np
>>> x=np.array([[0,1,2],[1,2,3]])
>>> x=x.T
>>> print x
[[0 1]
 [1 2]
 [2 3]]
>>> y=np.array([[0,1],[1,2],[2,3]])
>>> print y
[[0 1]
 [1 2]
 [2 3]]
>>> y.view('i8,i8')
array([[(0, 1)],
   [(1, 2)],
   [(2, 3)]],
  dtype=[('f0', '>> x.view('i8,i8')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: new type not compatible with array.

--
messages: 291967
nosy: m.meliani
priority: normal
severity: normal
status: open
title: numpy.ndarray.T doesn't change the structure
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue30108] test_site modifies sys.path

2017-04-20 Thread STINNER Victor

STINNER Victor added the comment:

The initial issue (test_site modifies sys.path) has been fixed. I don't think 
that it's worth it to backport the change, it's just a warning in tests.

@Serhiy: Feel free to open a new issue if you want to enhance test_site ;-)

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



[issue30108] test_site modifies sys.path

2017-04-20 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy Storchaka added the comment:
> I'm wondering if the user site directory should be removed in 
> tearDownModule().

Writing into $HOME/.local is just completely wrong :-) The test suite
must not modify the "system".

On a buildbot, $HOME is the root directory / and so the test is
skipped since the buildbot user is not allowed to create /.local.

If you want to enhance the code: setUpModule() should mock $HOME to
use a temporary directory.

--

___
Python tracker 

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



[issue29533] urllib2 works slowly with proxy on windows

2017-04-20 Thread Julia Dolgova

Julia Dolgova added the comment:

I'm not sure that users of my program will like if I define such variables in 
their systems

--

___
Python tracker 

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



[issue30108] test_site modifies sys.path

2017-04-20 Thread STINNER Victor

STINNER Victor added the comment:


New changeset b85c136903c6d2368162f7c4a58f258c9c69ead0 by Victor Stinner in 
branch 'master':
bpo-30108: Restore sys.path in test_site (#1197)
https://github.com/python/cpython/commit/b85c136903c6d2368162f7c4a58f258c9c69ead0


--

___
Python tracker 

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



[issue29802] A possible null-pointer dereference in struct.s_unpack_internal()

2017-04-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your report Artem.

But Modules/clinic/_struct.c.h is generated file, it shouldn't be manually 
edited. And clearing the cache doesn't solves the bug.

If _PyArg_ParseStack() failed it calls cache_struct_converter() for clearing 
s_object and jumps to the end of the function where s_object is decrefed second 
time. Yet one reference is left in the cache, but this is a hanging reference 
to deallocated object. Next call of struct.unpack() can retrieve that hanging 
reference and use it.

PR 1213 properly fixes this issue. It also fixes similar bug 
PyUnicode_FSDecoder(), but the latter is hardly reproducible since in the 
stdlib PyUnicode_FSDecoder() is used mostly for the last argument of a function.

--

___
Python tracker 

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



[issue30115] test_logging report reference leak

2017-04-20 Thread Xiang Zhang

New submission from Xiang Zhang:

0:00:00 [1/1] test_logging
beginning 9 repetitions
123456789
.
test_logging leaked [24, -24, 1, 24] memory blocks, sum=25
test_logging failed in 3 min 15 sec

1 test failed:
test_logging

Seems d61910c598876788c9b4bf0e116370bbfc5a2f85 is responsible.

--
messages: 291961
nosy: vinay.sajip, xiang.zhang
priority: normal
severity: normal
status: open
title: test_logging report reference leak

___
Python tracker 

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



[issue29802] A possible null-pointer dereference in struct.s_unpack_internal()

2017-04-20 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
pull_requests: +1336

___
Python tracker 

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



[issue30111] json module: encoder optimization

2017-04-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

New features can be only added to the default branch. True and False are not 
global variables but keywords in Python 3. And in any case the json module is 
accelerated by C implementation which much faster than any microoptimized 
Python code.

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



[issue9285] Add a profile decorator to profile and cProfile

2017-04-20 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +1335

___
Python tracker 

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



[issue30113] Add profile test case for trace_dispatch_return assertion

2017-04-20 Thread Louie Lu

Changes by Louie Lu :


--
pull_requests: +1334

___
Python tracker 

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



[issue30097] Command-line option to suppress "from None" for debugging

2017-04-20 Thread Wolfgang Maier

Changes by Wolfgang Maier :


--
nosy: +wolma

___
Python tracker 

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



[issue30114] json module: it is not possible to override 'true', 'false' values during encoding bool

2017-04-20 Thread Marian Horban

New submission from Marian Horban:

It is not possible to override 'true', 'false' values during encoding bool.
For example if I want to dump dict like:
{"key": True}
and result must be not 
{"key": true}
but let's say
{"key": "TRUE"}
It is really hard to force json.dumps function to do it.

I understand that improving of json encoder performance causes this inflexible 
implementation.
Perfect solution for extending/overriding json module would be move nested 
functions
_iterencode_list
_iterencode_dict
_iterencode
into class JSONEncoder as static methods.
But it could make performance a bit worse.

So if we cannot afford it I would propose to move function _make_iterencode to 
JSONEncoder as a static method.
This change will not degrade performance.
But it will be possible to override this method in SPECIFIC user's Encoder.

--
components: Library (Lib)
files: json_improvement.patch
keywords: patch
messages: 291959
nosy: Marian Horban 2
priority: normal
severity: normal
status: open
title: json module: it is not possible to override 'true', 'false' values 
during encoding bool
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file46816/json_improvement.patch

___
Python tracker 

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



[issue30112] useful things

2017-04-20 Thread Martin Panter

Changes by Martin Panter :


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

___
Python tracker 

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



[issue30112] useful things

2017-04-20 Thread Christian Heimes

Changes by Christian Heimes :


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



[issue30113] Add profile test case for trace_dispatch_return assertion

2017-04-20 Thread Louie Lu

New submission from Louie Lu:

This is a sub-problem of #9285, in #9285, we aim to provide cProfile and 
profile a context manager, this will need to add code like this:

def __enter__(self):
self.set_cmd('')
sys.setprofile(self.dispatcher)
return self

Unfortunately, when setting up profiler via `sys.setprofile`, it will 
immediately work on next line `return self`, which cause the assertion inside 
`trace_dispatch_return` claim this is a "Bad return".

Technically, `profile.Profile` can not go return upper than it's frame inside 
the frame stack. This behavior can be observed by this code:

def fib(n):
if n > 2:
return fib(n - 1) + fib(n - 2)
return n

def foo():
pr = profile.Profile()
# Profile was set in the `foo` frame, it can't get more upper than this
# that means, we can't return to global frame when this profile is set
sys.setprofile(pr.dispatcher)
fib(5)
# We didn't stop the profile here via sys.setprofile(None)
# So it will return 0xDEADBEAF to global frame and cause a bad return
return 0xDEADBEAF

foo()

Here this issue will provide the test of this behavior, then will make some 
modify in #9285 to prevent this situation when using profile as a context 
manager.

--
components: Library (Lib)
messages: 291957
nosy: louielu, ncoghlan
priority: normal
severity: normal
status: open
title: Add profile test case for trace_dispatch_return assertion
type: enhancement
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



[issue30112] useful things

2017-04-20 Thread Louie Lu

Louie Lu added the comment:

Please don't click the link, Google chrome return a security error

"""
Attackers on www.arqja.com may trick you into doing something dangerous like 
installing software or revealing your personal information (for example, 
passwords, phone numbers, or credit cards).
"""

--
nosy: +louielu

___
Python tracker 

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



[issue30111] json module: encoder optimization

2017-04-20 Thread Marian Horban

New submission from Marian Horban:

It is possible to improve performance of json module encoder.
Since access to local variables is faster than to globals/builtins I propose to 
use locals instead of globals.
Small test of such improvement:

>>> import timeit
>>> def flocal(name=False):
... for i in range(5):
... x = name
... 
>>> timeit.timeit("flocal()", "from __main__ import flocal", number=1000)
5.0455567836761475
>>> 
>>> def fbuilt_in():
... for i in range(5):
... x = False
... 
>>> 
>>> timeit.timeit("fbuilt_in()", "from __main__ import fbuilt_in", 
>>> number=1000)
5.451796054840088

--
components: Library (Lib)
files: encoder_opt.patch
keywords: patch
messages: 291955
nosy: Marian Horban 2
priority: normal
severity: normal
status: open
title: json module: encoder optimization
type: performance
versions: Python 2.7
Added file: http://bugs.python.org/file46815/encoder_opt.patch

___
Python tracker 

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



  1   2   >