[issue28555] provid also sha-1 and sha-256 also on download links

2016-11-07 Thread Benjamin Peterson

Benjamin Peterson added the comment:

md5 is provided to verify the integrity of the download only. Use the GPG 
signatures to verify authenticity if the fact that all the downloads are served 
over HTTPS is insufficient.

--
nosy: +benjamin.peterson
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue28638] Creating namedtuple is too slow to be used in common stdlib (e.g. functools)

2016-11-07 Thread INADA Naoki

INADA Naoki added the comment:

> The lazy import system could benefit many libs so the result could be 
> impressive. But here only functools is enhanced, half a millisecond is 
> reduced.

On the other hand, implementing lazy import makes application complex.

This patch only enhance functools, but it is very important one module.
Even if we remove functools from site.py, most applications relies on it,
especially for functools.wraps().
This patch can optimize startup time of them.

Half milliseconds is small, but it isn't negligible on some situation.
Some people loves tools quickly starts.  For example, there are many
people maintain their vimrc to keep <50~100ms startup time.
And Python is common language to implement vim plugins.

Additionally, it make noise when profiling startup time.
I've very confused when I saw PyParse_AddToken() in profile.
Less noise make it easy to optimize startup time.


> Performance of course is important, but replicating code sounds not good. It 
> means you have to maintain two pieces.

Yes. Balance is important.
I want to hear more opinions from more other devs.

--

___
Python tracker 

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



[issue21590] Systemtap and DTrace support

2016-11-07 Thread Berker Peksag

Changes by Berker Peksag :


--
stage: patch review -> resolved

___
Python tracker 

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



[issue28638] Creating namedtuple is too slow to be used in common stdlib (e.g. functools)

2016-11-07 Thread Xiang Zhang

Xiang Zhang added the comment:

> Yes. But first import time is also important for CLI applications.
That's why mercurial and Bazaar has lazy import system.

The lazy import system could benefit many libs so the result could be 
impressive. But here only functools is enhanced, half a millisecond is reduced.

Performance of course is important, but replicating code sounds not good. It 
means you have to maintain two pieces.

--

___
Python tracker 

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



[issue28638] Creating namedtuple is too slow to be used in common stdlib (e.g. functools)

2016-11-07 Thread INADA Naoki

INADA Naoki added the comment:

> The slow import is the case only the first time functools is imported. Later 
> imports will just use the cache (sys.modules).

Yes. But first import time is also important for CLI applications.
That's why mercurial and Bazaar has lazy import system.

Since many stdlib uses functools, many applications may be suffered from
slow functools import even if we remove it from site.py.

>  maybe we don't have to copy the entire namedtuple structure?

https://docs.python.org/3.5/library/functools.html#functools.lru_cache

The doc says it's a namedtuple.  So it should be namedtuple compatible.

--

___
Python tracker 

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



[issue28638] Creating namedtuple is too slow to be used in common stdlib (e.g. functools)

2016-11-07 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +ncoghlan, rhettinger

___
Python tracker 

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



[issue28638] Creating namedtuple is too slow to be used in common stdlib (e.g. functools)

2016-11-07 Thread Xiang Zhang

Xiang Zhang added the comment:

I doubt this deserves a change. The slow import is the case only the first time 
functools is imported. Later imports will just use the cache (sys.modules). And 
if this is gonna change, maybe we don't have to copy the entire namedtuple 
structure?

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue28639] inspect.isawaitable(native_coro) returns int

2016-11-07 Thread Yury Selivanov

Yury Selivanov added the comment:

Thank you!  Will merge it tomorrow.

--
assignee:  -> yselivanov
components: +Library (Lib) -asyncio
nosy:  -gvanrossum
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



[issue28639] inspect.isawaitable(native_coro) returns int

2016-11-07 Thread Justin Mayfield

New submission from Justin Mayfield:

Patch available on my github fork..

https://github.com/mayfield/cpython/commit/8d50cc61f42fa280d380e9c10c420c949a619bef

--
components: asyncio
messages: 280280
nosy: Justin Mayfield, gvanrossum, yselivanov
priority: normal
severity: normal
status: open
title: inspect.isawaitable(native_coro) returns int
type: behavior
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



[issue28638] Creating namedtuple is too slow to be used in common stdlib (e.g. functools)

2016-11-07 Thread INADA Naoki

INADA Naoki added the comment:

I feel this patch is safe enough to be landed in 3.6.

--
keywords: +patch
Added file: http://bugs.python.org/file45386/28638-functools-no-namedtuple.patch

___
Python tracker 

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



[issue28572] IDLE: add tests for config dialog.

2016-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f604b6ebd802 by Terry Jan Reedy in branch '3.6':
Issue #28572: Use system-specific values for configdialog font test
https://hg.python.org/cpython/rev/f604b6ebd802

--

___
Python tracker 

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



[issue28638] Creating namedtuple is too slow to be used in common stdlib (e.g. functools)

2016-11-07 Thread INADA Naoki

Changes by INADA Naoki :


--
components: +Library (Lib)
title: Creating namedtuple is too slow -> Creating namedtuple is too slow to be 
used in common stdlib (e.g. functools)
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



[issue28638] Creating namedtuple is too slow

2016-11-07 Thread INADA Naoki

New submission from INADA Naoki:

I surprised how functools make import time slower.
And I find namedtuple makes it slower.

When I replaced

_CacheInfo = namedtuple("CacheInfo", ["hits", "misses", "maxsize", "currsize"])

this line with `_CachedInfo._source`:

(before)
$ ~/local/py37/bin/python3 -m perf timeit -s 'import importlib, functools' -- 
'importlib.reload(functools)'
.
Median +- std dev: 1.21 ms +- 0.01 ms

(replaced)
$ ~/local/py37/bin/python3 -m perf timeit -s 'import importlib, functools' -- 
'importlib.reload(functools)'
.
Median +- std dev: 615 us +- 12 us

--
messages: 280277
nosy: inada.naoki
priority: normal
severity: normal
status: open
title: Creating namedtuple is too slow
type: performance

___
Python tracker 

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



[issue28563] Arbitrary code execution in gettext.c2py

2016-11-07 Thread Xiang Zhang

Xiang Zhang added the comment:

> Sorry Xiang, but your patch looks overcomplicated to me. Too much methods, 
> decorators, classes, too much strange names.

It's fine. That's a Pratt parser. Yes, the names are strange. Your patch looks 
more simpler. I left several comments.

--

___
Python tracker 

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



[issue28023] python-gdb.py must be updated for the new Python 3.6 compact dict

2016-11-07 Thread INADA Naoki

Changes by INADA Naoki :


--
nosy: +ned.deily
priority: high -> release blocker
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



[issue26969] ascynio should provide a policy to address pass-loop-everywhere problem

2016-11-07 Thread Ilya Kulakov

Ilya Kulakov added the comment:

I'm very happy that the issue is finally resolved.

But a bit offended that it took Andrew only 4 days to push it :)

> On 07 Nov 2016, at 17:04, Yury Selivanov  wrote:
> 
> 
> Yury Selivanov added the comment:
> 
> See https://github.com/python/asyncio/pull/452. I believe that the issue is 
> not resolved (almost).
> 
> What's left is documenting how to use get_event_loop and when to use 
> explicit/implicit loop passing.
> 
> Closing this issue.  Will open a new one for the documentation update.
> 
> --
> resolution:  -> fixed
> stage:  -> resolved
> status: open -> closed
> 
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue28637] Python startup performance regression

2016-11-07 Thread Guido van Rossum

Guido van Rossum added the comment:

So what does that benchmark measure? For me, python 3.6 startup is 44 ms
and python 2.7 startup is 78 ms (real time; user time is proportionally
less).

On Mon, Nov 7, 2016 at 5:40 PM, STINNER Victor 
wrote:

>
> STINNER Victor added the comment:
>
> python_startup:
>
> * 2.7: 7.74 ms +- 0.28 ms
> * 3.4: 18.7 ms +- 0.4 ms
> * 3.5: 20.3 ms +- 0.7 ms
> * 3.6: 26.9 ms +- 0.6 ms (rev c4319c0d0131, before the revert)
> * 3.7: 26.6 ms +- 0.5 ms (rev 36af3566b67a, before the revert)
> * 3.7: 24.6 ms +- 0.0 ms (rev cf7711887b4a, after the revert)
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue28637] Python startup performance regression

2016-11-07 Thread STINNER Victor

STINNER Victor added the comment:

python_startup:

* 2.7: 7.74 ms +- 0.28 ms
* 3.4: 18.7 ms +- 0.4 ms
* 3.5: 20.3 ms +- 0.7 ms
* 3.6: 26.9 ms +- 0.6 ms (rev c4319c0d0131, before the revert)
* 3.7: 26.6 ms +- 0.5 ms (rev 36af3566b67a, before the revert)
* 3.7: 24.6 ms +- 0.0 ms (rev cf7711887b4a, after the revert)

--

___
Python tracker 

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



[issue28637] Python startup performance regression

2016-11-07 Thread Guido van Rossum

Guido van Rossum added the comment:

Agreed.

--Guido (mobile)

--

___
Python tracker 

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



[issue28637] Python startup performance regression

2016-11-07 Thread STINNER Victor

STINNER Victor added the comment:

Hum strange, the changeset d903a243c281 (the revert) optimized regex_compile: 
480 ms (rev 573bc1f9900e) => 403 ms (rev cf7711887b4a).

But it didn't restore python_startup performance: 26.ms (rev 573bc1f9900e) => 
24.6 ms (rev cf7711887b4a).

Another change made re import slower: revision 88110cfbf4dc of issue #28193. If 
I also revert this change locally, python_startup performance is restored to 
19.6 ms.

By the way, regex_compile performance is the same with and without the revision 
88110cfbf4dc, but the benchmark purges the re cache at each iteration of the 
benchmark.

--

___
Python tracker 

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



[issue26969] ascynio should provide a policy to address pass-loop-everywhere problem

2016-11-07 Thread Yury Selivanov

Yury Selivanov added the comment:

See https://github.com/python/asyncio/pull/452. I believe that the issue is not 
resolved (almost).

What's left is documenting how to use get_event_loop and when to use 
explicit/implicit loop passing.

Closing this issue.  Will open a new one for the documentation update.

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



[issue28637] Python startup performance regression

2016-11-07 Thread Ned Deily

Ned Deily added the comment:

Please leave this as a "release blocker" until we have had a chance to explore 
all the options for 3.6.0b4. We may still very well decide that reverting is 
the least bad option but I don't want to rule out other options without some 
further investigation.  We have time and the reverting could be a fairly 
significant change.

--
priority:  -> release blocker

___
Python tracker 

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



[issue28637] Python startup performance regression

2016-11-07 Thread STINNER Victor

STINNER Victor added the comment:

Possible options:
> 3. avoid the use of re in site.py venv

That would be a tiny but nice enhancement.

re is a commonly used module. I would prefer to not make its import time 
slower. Python 3 startup is already something like 3x slower than Python 2. 
Please don't make it even slower :-( We worked on optimizing Python 3 startup 
time.


> 2. find a way to mitigate the performance impact of importing re and enum 
> (perhaps making them builtins in Setup.dist?)

I reverted the change, because Guido and Ethan seem to be in favor of a revert, 
and I don't expect any simple solution for this issue.

I'm quite sure that importing enum.py is slow. Optimizing enum.py import time 
is a large task.

Another option to explore is to delay the creation/instanciation of the re 
flags, something like lazy module import... but at the module attribute level 
:-)

--

___
Python tracker 

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



[issue28637] Python startup performance regression

2016-11-07 Thread STINNER Victor

STINNER Victor added the comment:

I remove the release blocker flag since the change was reverted.

--
priority: release blocker -> 

___
Python tracker 

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



[issue28637] Python startup performance regression

2016-11-07 Thread Ned Deily

Ned Deily added the comment:

With being this close to release and with two weeks to go until the final beta, 
it seems a bit premature to immediately revert this without exploring all the 
alternatives especially since it seems the effects are limited to venvs.  In 
any case, we do need to have a final answer well before the b4 cutoff 
(2016-11-21).  Possible options:
1. leave the re contents reverted (current status)
2. find a way to mitigate the performance impact of importing re and enum 
(perhaps making them builtins in Setup.dist?)
3. avoid the use of re in site.py venv
4. others?

--

___
Python tracker 

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



[issue28572] IDLE: add tests for config dialog.

2016-11-07 Thread Ned Deily

Ned Deily added the comment:

test_idle now fails (macOS 10.12, Tcl/Tk 8.6):

test test_idle failed -- Traceback (most recent call last):
  File "./lib/python3.7/idlelib/idle_test/test_configdialog.py", line 62, in 
test_font
self.assertEqual(changes, expected)
AssertionError: Lists differ: [('ma[70 chars]ont-size', '11'), ('main', 
'EditorWindow', 'font-bold', False)] != [('ma[70 chars]ont-size', '10'), 
('main', 'EditorWindow', 'font-bold', False)]

First differing element 1:
('main', 'EditorWindow', 'font-size', '11')
('main', 'EditorWindow', 'font-size', '10')

  [('main', 'EditorWindow', 'font', 'Test Font'),
-  ('main', 'EditorWindow', 'font-size', '11'),
?  ^

+  ('main', 'EditorWindow', 'font-size', '10'),
?  ^

   ('main', 'EditorWindow', 'font-bold', False)]

--
nosy: +ned.deily

___
Python tracker 

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



[issue28613] Make get_event_loop() return the current loop if called from coroutines

2016-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset abad0b9a35b3 by Yury Selivanov in branch '3.5':
Issue #28613: Expose asyncio._get_running_loop() and _set_running_loop()
https://hg.python.org/cpython/rev/abad0b9a35b3

New changeset 61a237f3bb07 by Yury Selivanov in branch '3.6':
Merge 3.5 (issue #28613)
https://hg.python.org/cpython/rev/61a237f3bb07

New changeset cf7711887b4a by Yury Selivanov in branch 'default':
Merge 3.6 (issue #28613)
https://hg.python.org/cpython/rev/cf7711887b4a

--

___
Python tracker 

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



[issue28082] re: convert re flags to (much friendlier) IntFlag constants

2016-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d903a243c281 by Victor Stinner in branch '3.6':
Issue #28637: Revert issue #28082, don't import enum in re
https://hg.python.org/cpython/rev/d903a243c281

--

___
Python tracker 

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



[issue28637] Python startup performance regression

2016-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d903a243c281 by Victor Stinner in branch '3.6':
Issue #28637: Revert issue #28082, don't import enum in re
https://hg.python.org/cpython/rev/d903a243c281

--
nosy: +python-dev

___
Python tracker 

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



[issue28637] Python startup performance regression

2016-11-07 Thread STINNER Victor

STINNER Victor added the comment:

Oh, I understood why I had issues to reproduce the startup performance 
slowdown. When Python is run from the source code using ./python, the re module 
is not imported. When Python is installed, the re is not imported by default 
neither:

haypo@speed-python$ prefix/bin/python3 -c 'import sys; print("re" in 
sys.modules)'
False


BUT when Python is started from a virtual environment (created by the "venv" 
module), the re module is important by default.

haypo@speed-python$ venv/bin/python3 -c 'import sys; print("re" in sys.modules)'
True


If the site module is not imported, the re module is not imported:

haypo@speed-python$ venv/bin/python3 -S -c 'import sys; print("re" in 
sys.modules)'
False


The /home/haypo/benchmarks/prefix/lib/python3.6/site.py file is generated by 
the venv module and contains:

def venv(...):
...
if candidate_confs:
import re
config_line = re.compile(CONFIG_LINE)
...

--

___
Python tracker 

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



[issue28637] Python startup performance regression

2016-11-07 Thread STINNER Victor

STINNER Victor added the comment:

Ethan Furman added the comment:
> Victor, can you add the commands you are using for timing so I can work on 
> making enum imports faster?

Results of the python_startup benchmark:
https://speed.python.org/timeline/#/?exe=4=python_startup=1=50=off=on=on

This website uses the following benchmark suite:
https://github.com/python/performance

You can run the benchmark using:
python3 -m performance run -b python_startup

--

___
Python tracker 

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



[issue28637] Python startup performance regression

2016-11-07 Thread Ethan Furman

Ethan Furman added the comment:

Ouch, that's a lot slower!

Victor, can you add the commands you are using for timing so I can work on 
making enum imports faster?

--

___
Python tracker 

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



[issue28637] Python startup performance regression

2016-11-07 Thread Guido van Rossum

Guido van Rossum added the comment:

Reverting is reasonable, though it may break some code that started using this 
in 3.6b1. Such is the life of beta testers. The benefit of using Enum for re 
constants doesn't seem worth such a big increase in startup time.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue28082] re: convert re flags to (much friendlier) IntFlag constants

2016-11-07 Thread STINNER Victor

STINNER Victor added the comment:

The changeset 223731925d06 caused a performance regression: see issue #28637.

--
nosy: +haypo

___
Python tracker 

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



[issue28637] Python startup performance regression

2016-11-07 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +ned.deily
priority: normal -> release blocker

___
Python tracker 

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



[issue28637] Python startup performance regression

2016-11-07 Thread STINNER Victor

New submission from STINNER Victor:

The changeset 223731925d06 of the issue issue #28082 "use IntFlag for re 
constants" made Python startup 34% slower:

- rev 5637c9b4dd4c: Median +- std dev: 19.5 ms +- 0.0 ms
- rev 223731925d06: Median +- std dev: 26.2 ms +- 0.0 ms

The change adds "import enum" in Lib/re.py, so the enum module is imported, 
whereas it wasn't before. It seems like importing enum takes 6.7 ms.

I propose to revert the change 223731925d06 in Python 3.6 and reopen the issue 
#28082 to try to find another solution for the re module which doesn't impact 
Python startup performance.

--
messages: 280256
nosy: ethan.furman, haypo
priority: normal
severity: normal
status: open
title: Python startup performance regression
type: performance
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



[issue28633] Concatenating bytes literal and f-string causes segmentation fault

2016-11-07 Thread Eric V. Smith

Changes by Eric V. Smith :


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



[issue28633] Concatenating bytes literal and f-string causes segmentation fault

2016-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 31543f7cbdf4 by Eric V. Smith in branch '3.6':
Fixed issue #28633: segfault when concatenating bytes literal and f-string.
https://hg.python.org/cpython/rev/31543f7cbdf4

--
nosy: +python-dev

___
Python tracker 

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



[issue28635] Update What's New for 3.6

2016-11-07 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +ned.deily

___
Python tracker 

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



[issue21590] Systemtap and DTrace support

2016-11-07 Thread Łukasz Langa

Changes by Łukasz Langa :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue21590] Systemtap and DTrace support

2016-11-07 Thread Łukasz Langa

Łukasz Langa added the comment:

Yes, let's close this.

@Charalampos, the error in your build comes from the /usr/bin/dtrace wrapper:
Traceback (most recent call last):
  File "/usr/bin/dtrace", line 440, in 
sys.exit(main())
  File "/usr/bin/dtrace", line 385, in main
providers.probe_write(s_filename, filename + suffix)
  File "/usr/bin/dtrace", line 181, in probe_write
hdr = open(header, mode='w')
FileNotFoundError: [Errno 2] No such file or directory: 
'Include/pydtrace_probes.h'

For some reason the path Include/pydtrace_probes.h is not writable. Maybe this 
is RPM-specific?

--

___
Python tracker 

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



[issue28632] configparser does not close files in read

2016-11-07 Thread Łukasz Langa

Łukasz Langa added the comment:

Cannot repro:
```
$ python3
Python 3.5.2 (default, Jul 28 2016, 21:28:00)
>>> with open('/tmp/someconfig.py', 'w') as w:
...   w.write("""[section]
... option=value
... """)
...
23
>>> import configparser
>>> cp = configparser.ConfigParser()
>>> cp.read('/tmp/someconfig.py')
['/tmp/someconfig.py']
>>> [CTRL+D]
$
```

If I leave a file unclosed, I get warning:
```
$ python3
Python 3.5.2 (default, Jul 28 2016, 21:28:00)
>>> open('/tmp/someconfig.py')
<_io.TextIOWrapper name='/tmp/someconfig.py' mode='r' encoding='UTF-8'>
>>> [CTRL+D]
sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper 
name='/tmp/someconfig.py' mode='r' encoding='UTF-8'>
$
```

--

___
Python tracker 

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



[issue28636] strange issue with Pandas-0.19.1 on Python-3.6.0b3

2016-11-07 Thread STINNER Victor

STINNER Victor added the comment:

> while with python < 3.6, you get a "ValueError"

It's because Python 3.6 is more strict. Python 3.5 doesn't catch the bug.

--

___
Python tracker 

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



[issue28572] IDLE: add tests for config dialog.

2016-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d6440718eb30 by Terry Jan Reedy in branch '3.6':
Issue #28572: Add 10% to coverage of IDLE's test_configdialog.
https://hg.python.org/cpython/rev/d6440718eb30

--
nosy: +python-dev

___
Python tracker 

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



[issue28636] strange issue with Pandas-0.19.1 on Python-3.6.0b3

2016-11-07 Thread Big Stone

Big Stone added the comment:

the curiosity is the error message, different (and uncaught) under Python 3.6
"SystemError", while with python < 3.6, you get a "ValueError"

--

___
Python tracker 

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



[issue28635] Update What's New for 3.6

2016-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 38c806f0943b by Yury Selivanov in branch 'default':
Merge 3.6 (issue #28635)
https://hg.python.org/cpython/rev/38c806f0943b

--
nosy: +python-dev

___
Python tracker 

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



[issue28636] strange issue with Pandas-0.19.1 on Python-3.6.0b3

2016-11-07 Thread STINNER Victor

STINNER Victor added the comment:

Extract of the bug report:

> ...
> pandas/tslib.pyx in pandas.tslib.convert_str_to_tsobject 
> (pandas/tslib.c:26851)()
> pandas/src/datetime.pxd in datetime._string_to_dts (pandas/tslib.c:87106)()
> SystemError:  returned a result with an error set

It looks like a bug in a C extension, I mean in the third party code.

--
nosy: +haypo

___
Python tracker 

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



[issue28636] strange issue with Pandas-0.19.1 on Python-3.6.0b3

2016-11-07 Thread Big Stone

New submission from Big Stone:

hi, we detect a strange issue on Pandas-0.19.1/Python-3.6.0b3/Windows that may 
or may not be a Python-3.6 bug. 
As it was for the glory of Python-3.6.0b3 testing, we signal the incident here.
https://github.com/pandas-dev/pandas/issues/14561

--
messages: 280247
nosy: Big Stone
priority: normal
severity: normal
status: open
title: strange issue with Pandas-0.19.1 on Python-3.6.0b3
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



[issue28088] Document Transport.set_protocol and get_protocol

2016-11-07 Thread Guido van Rossum

Guido van Rossum added the comment:

Good point. Thanks Berker!

--

___
Python tracker 

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



[issue28633] Concatenating bytes literal and f-string causes segmentation fault

2016-11-07 Thread Eric V. Smith

Eric V. Smith added the comment:

Thanks, Serhiy. I updated the patch.

--
Added file: http://bugs.python.org/file45385/28633-1.diff

___
Python tracker 

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



[issue28635] Update What's New for 3.6

2016-11-07 Thread Yury Selivanov

Changes by Yury Selivanov :


--
assignee: docs@python -> yselivanov

___
Python tracker 

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



[issue28635] Update What's New for 3.6

2016-11-07 Thread Elvis Pranskevichus

New submission from Elvis Pranskevichus:

Issue to track edits to "What's New in Python 3.6"

--
assignee: docs@python
components: Documentation
files: 0001-Inital-pass-on-What-s-New-in-Python-3.6.patch
keywords: patch
messages: 280244
nosy: Elvis.Pranskevichus, docs@python, yselivanov
priority: normal
severity: normal
status: open
title: Update What's New for 3.6
type: enhancement
versions: Python 3.6
Added file: 
http://bugs.python.org/file45384/0001-Inital-pass-on-What-s-New-in-Python-3.6.patch

___
Python tracker 

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



[issue28633] Concatenating bytes literal and f-string causes segmentation fault

2016-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM. I added comments about other asserts. Not related, but would be nice to 
fix them too while we are here.

--

___
Python tracker 

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



[issue28634] asyncio.isfuture() should support Mocks

2016-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0669dcf1eb36 by Yury Selivanov in branch '3.5':
Issue #28634: Fix asyncio.isfuture() to support mocks
https://hg.python.org/cpython/rev/0669dcf1eb36

New changeset a02915e4c165 by Yury Selivanov in branch '3.6':
Merge 3.5 (issue #28634)
https://hg.python.org/cpython/rev/a02915e4c165

New changeset 44c1ec7689e5 by Yury Selivanov in branch 'default':
Merge 3.6 (issue #28634)
https://hg.python.org/cpython/rev/44c1ec7689e5

--
nosy: +python-dev

___
Python tracker 

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



[issue28634] asyncio.isfuture() should support Mocks

2016-11-07 Thread Yury Selivanov

Changes by Yury Selivanov :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue28634] asyncio.isfuture() should support Mocks

2016-11-07 Thread Yury Selivanov

New submission from Yury Selivanov:

In short:

isfuture(unittest.mock.Mock()) should be False
isfuture(unittest.mock.Mock(Future)) should be True

This issue is a proxy for https://github.com/python/asyncio/pull/455

--
assignee: yselivanov
components: asyncio
messages: 280241
nosy: gvanrossum, yselivanov
priority: normal
severity: normal
stage: resolved
status: open
title: asyncio.isfuture() should support Mocks
type: behavior
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



[issue28621] Refactor duplicate code calculating digit's bit length

2016-11-07 Thread Mark Dickinson

Mark Dickinson added the comment:

LGTM, too.

--

___
Python tracker 

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



[issue28633] Concatenating bytes literal and f-string causes segmentation fault

2016-11-07 Thread Eric V. Smith

Eric V. Smith added the comment:

It's a decref of a NULL pointer. Patch with test is attached.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file45383/28633-0.diff

___
Python tracker 

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



[issue28559] Unclear error message when raising wrong type of exceptions

2016-11-07 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch, but I find your proposed message less clearer (including 
NoneType adds unnecessary confusion and people may ask "where did NoneType come 
from?")

Python 2 is different because of historical reasons (pre-BaseException era) so 
I don't think we should look at it in this case.

If other core developers give their +1s, the patch needs to be updated to add a 
test case (it can be added to Lib/test/test_exceptions.py) and use the 
Py_TYPE() macro instead of accessing exc->ob_type directly.

--
nosy: +berker.peksag
stage:  -> patch review

___
Python tracker 

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



[issue28603] traceback module can't format/print unhashable exceptions

2016-11-07 Thread Andreas Stührk

Andreas Stührk added the comment:

It was reported as bug to a project that uses the traceback module 
(https://github.com/bpython/bpython/issues/651). Parsley 
(https://pypi.python.org/pypi/Parsley) is at least one library that uses 
unhashable exceptions, although I guess it's by accident: it defines __eq__, 
but not __hash__ and that makes the exception unhashable under Python 3.

--

___
Python tracker 

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



[issue27392] Add loop.connect_accepted_socket

2016-11-07 Thread Yury Selivanov

Changes by Yury Selivanov :


--
title: Add a server_side keyword parameter to create_connection -> Add 
loop.connect_accepted_socket

___
Python tracker 

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



[issue27392] Add a server_side keyword parameter to create_connection

2016-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3e6570231c80 by Yury Selivanov in branch '3.5':
Issue #27392: Document loop.connect_accepted_socket()
https://hg.python.org/cpython/rev/3e6570231c80

New changeset 6811df9e9797 by Yury Selivanov in branch '3.6':
Merge 3.5 (issue #27392)
https://hg.python.org/cpython/rev/6811df9e9797

New changeset 573bc1f9900e by Yury Selivanov in branch 'default':
Merge 3.6 (issue #27392)
https://hg.python.org/cpython/rev/573bc1f9900e

--

___
Python tracker 

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



[issue28633] Concatenating bytes literal and f-string causes segmentation fault

2016-11-07 Thread Eric V. Smith

Eric V. Smith added the comment:

The ones in msg280228 give correct error messages.

--

___
Python tracker 

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



[issue28632] configparser does not close files in read

2016-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I can't reproduce the issue. Looking at the code it seems to me that the file 
is always closed. Could you please provide more information Petr?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue28603] traceback module can't format/print unhashable exceptions

2016-11-07 Thread Berker Peksag

Berker Peksag added the comment:

Thanks for the patch. Out of curiosity, how did you get an unhashable 
exception? Is there a way to reproduce this without creating a custom exception 
and set __hash__ to None? In other words, what's your use case?

--
nosy: +berker.peksag
stage:  -> patch review
type:  -> behavior
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



[issue28088] Document Transport.set_protocol and get_protocol

2016-11-07 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy:  -larry
priority: release blocker -> normal

___
Python tracker 

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



[issue28088] Document Transport.set_protocol and get_protocol

2016-11-07 Thread Berker Peksag

Berker Peksag added the comment:

I just removed self from method signatures (we don't usually include it) and 
updated the versionadded directives to 3.5.3 since it was also backported to 
3.5 in f12a59311885. Please let me know if got the 3.5 version wrong, thanks!

--
nosy: +berker.peksag, larry
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



[issue28088] Document Transport.set_protocol and get_protocol

2016-11-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f4e86b1b051e by Berker Peksag in branch '3.5':
Issue #28088: Don't include self in method signature
https://hg.python.org/cpython/rev/f4e86b1b051e

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

New changeset 62b7614970bd by Berker Peksag in branch 'default':
Issue #28088: Merge from 3.6
https://hg.python.org/cpython/rev/62b7614970bd

--

___
Python tracker 

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



[issue28609] argparse claims '*' positional argument is required in error output

2016-11-07 Thread Reuben Thomas

Reuben Thomas added the comment:

Thanks, that's a simple, robust workaround.

I'll duck out now and leave the Python experts to sort out the underlying 
problem, if they can; I think it's still well worth sorting out, though 
documenting the problem and workaround would be much better than nothing.

--

___
Python tracker 

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



[issue28628] Failure to add signal handlers for any signal but SIGINT

2016-11-07 Thread Yury Selivanov

Yury Selivanov added the comment:

I think I have a patch for this here: https://github.com/python/asyncio/pull/456

--

___
Python tracker 

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



[issue28632] configparser does not close files in read

2016-11-07 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue28633] Concatenating bytes literal and f-string causes segmentation fault

2016-11-07 Thread Honor

Honor added the comment:

Another:

>>> 9,'''Ðؚ%''(r'''%b"r'
  File "", line 1
SyntaxError: cannot mix bytes and nonbytes literals
>>> 9,'B''Ðؚ%''(r'''%b"r'''
Traceback (most recent call last):
  File "", line 1, in 
ValueError: incomplete format key
>>> 9,'B''Ðؚ%''(r'''%b"r'''F
  File "", line 1
9,'B''Ðؚ%''(r'''%b"r'''F
   ^
SyntaxError: invalid syntax
>>> 9,'B''Ðؚ%''(r'''%b"r'''F'
  File "", line 1
9,'B''Ðؚ%''(r'''%b"r'''F'
 ^
SyntaxError: EOL while scanning string literal
>>>

On Mon, Nov 7, 2016 at 10:08 PM, Eric V. Smith 
wrote:

>
> Eric V. Smith added the comment:
>
> Works:
>
> >>> f'' b''
>   File "", line 1
> SyntaxError: cannot mix bytes and nonbytes literals
>
> Fails:
>
> >>> b'' f''
> Segmentation fault
> $
>
> Regular strings work:
> >>> '' b''
>   File "", line 1
> SyntaxError: cannot mix bytes and nonbytes literals
> >>> b'' ''
>   File "", line 1
> SyntaxError: cannot mix bytes and nonbytes literals
> >>>
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue23218] Modernize the IDLE Find/Replace/Find in Files dialogs

2016-11-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Al, thanks for the honest comparison. 

For 3.6, we can just import and use ttk with no fuss. 

When I get to this, I will review tests and responses to  and  
(see #27621).

--

___
Python tracker 

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



[issue27854] Installed 2.7: IDLE Help disabled because help.html is missing

2016-11-07 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Irv, could you check on any 2.7.11/12 installations you have access to?

--
nosy: +IrvKalb

___
Python tracker 

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



[issue28633] Concatenating bytes literal and f-string causes segmentation fault

2016-11-07 Thread Eric V. Smith

Eric V. Smith added the comment:

Works:

>>> f'' b'' 
  File "", line 1
SyntaxError: cannot mix bytes and nonbytes literals

Fails:

>>> b'' f''
Segmentation fault
$

Regular strings work:
>>> '' b''
  File "", line 1
SyntaxError: cannot mix bytes and nonbytes literals
>>> b'' ''
  File "", line 1
SyntaxError: cannot mix bytes and nonbytes literals
>>>

--

___
Python tracker 

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



[issue28633] Concatenating bytes literal and f-string causes segmentation fault

2016-11-07 Thread Eric V. Smith

Changes by Eric V. Smith :


--
assignee:  -> eric.smith

___
Python tracker 

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



[issue28633] Concatenating bytes literal and f-string causes segmentation fault

2016-11-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
title: eval() Function - Segmentation Fault -> Concatenating bytes literal and 
f-string causes segmentation fault

___
Python tracker 

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



[issue28633] eval() Function - Segmentation Fault

2016-11-07 Thread Honor

Honor added the comment:

Why not?

I have tested it.
Different payload : '%%-'%B'4--'F''
Again crashed.
Can you try?

On Mon, Nov 7, 2016 at 9:14 PM, Serhiy Storchaka 
wrote:

>
> Changes by Serhiy Storchaka :
>
>
> --
> nosy: +serhiy.storchaka
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue28633] eval() Function - Segmentation Fault

2016-11-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue25677] Syntax error caret confused by indentation

2016-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This may be just bad example that it looks contradictorily to you. Is the 
example "None = 0" looks good to you? Without patch the caret is located at the 
middle of None (depending on the size of the indentation of this line). With 
patch applied it is located at the start of None independently of the 
indentation.

The original bug is that the location of the caret depends on the indentation. 
The patch fixes this bug (and only this bug).

--

___
Python tracker 

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



[issue28633] eval() Function - Segmentation Fault

2016-11-07 Thread Zachary Ware

Zachary Ware added the comment:

Reproduced on macOS:

$ ./python.exe
Python 3.6.0b4+ (3.6:b26c8104e54f, Nov  7 2016, 12:01:37)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin
Type help, copyright, credits or license for more information.
>>> B''F''
Segmentation fault: 11

Looks like `f''b''` is handled correctly, but `b''f''` is not.

--
components: +Interpreter Core
nosy: +eric.smith, ned.deily, zach.ware
priority: normal -> release blocker
stage:  -> needs patch
type:  -> crash
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



[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2016-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Or, is this a "statement of direction" that only GCC (syntax) compilers are 
> (going to be) supported?

This is only the first step. Since this feature is compiler specific, we should 
add the support for every compiler separately. Arfrever suggested the syntax 
for supporting this on Microsoft compiler. But I don't know how to silence 
warnings on this compiler. Other compilers can support GCC syntax. We should 
check and switch on this.

> Which functions are bridges?

All deprecated Py_UNICODE related functions use Py_UNICODE. Most of them are 
bridges to new APIs. Py_UNICODE also is used in implementation of format codes 
'u' and 'Z' of PyArg_Parse*. It also is used in many functions that are bridges 
to Windows API.

> "Py_UCS4 _PyUnicode_ToLowercase(Py_UCS4 ch)" doesn't use Py_UNICODE, what is 
> the issue?

The problem with this function is not related to Py_UNICODE, but that correct 
Unicode mapping can return multiple characters.

> Do you want to deprecate functions like Py_UNICODE_ISDECIMAL(ch)?

No. It works correctly.

--

___
Python tracker 

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



[issue25677] Syntax error caret confused by indentation

2016-11-07 Thread Berker Peksag

Berker Peksag added the comment:

With patch applied:

  File "x.py", line 2
1 + 1 = 2
^
SyntaxError: can't assign to operator

Without patch:

  File "x.py", line 2
1 + 1 = 2
   ^
SyntaxError: can't assign to operator

The caret is located at the wrong place in both examples (which is the actual 
bug that needs to be fixed here.) This isn't a high priority bug and I think 
people can live with the current behavior until this is properly fixed. Pushing 
a premature patch will only introduce more code churn.

--

___
Python tracker 

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



[issue28585] Restore docstring of os._isdir

2016-11-07 Thread Zachary Ware

Zachary Ware added the comment:

LGTM.

--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue28633] eval() Function - Segmentation Fault

2016-11-07 Thread Honor

New submission from Honor:

Hello,

Python version : 3.7.0a0
OS : Ubunt - Linux x 3.13.0-24-generic

Test Script:

>>> a="B\'\'F\'\'"
>>> eval(a)
Program received signal SIGSEGV, Segmentation fault.
0x00531c5a in parsestrplus (n=0x77ee0b20, c=0x7fffd730) at
Python/ast.c:5150
5150Py_DECREF(s);
(gdb) info reg
rax0x0 0
rbx0x0 0
rcx0x77e9bab0 140737352678064
rdx0x0 0
rsi0x77e9ba88 140737352678024
rdi0x77f74670 140737353565808
rbp0x1 0x1
rsp0x7fffd350 0x7fffd350
r8 0x0 0
r9 0x7fffd328 140737488343848
r100x77e9bab0 140737352678064
r110x7fffd2e0 140737488343776
r120x77ee0b20 140737352960800
r130x7fffd730 140737488344880
r140x0 0
r150x77f8557a 140737353635194
rip0x531c5a 0x531c5a 
eflags 0x10246 [ PF ZF IF RF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0

(gdb) bt
#0  0x00531c5a in parsestrplus (n=0x77ee0b20, c=0x7fffd730)
at Python/ast.c:5150
#1  ast_for_atom (c=c@entry=0x7fffd730, n=0x77ee0b20) at
Python/ast.c:2110
#2  0x0053221a in ast_for_atom_expr (n=0x77ee0d78,
c=0x7fffd730) at Python/ast.c:2465
#3  ast_for_power (n=0x77ee0d50, c=0x7fffd730) at Python/ast.c:2502
#4  ast_for_expr (c=c@entry=0x7fffd730, n=0x77ee0d50) at
Python/ast.c:2690
#5  0x00537446 in ast_for_testlist (n=0x77e8f0d0,
c=0x7fffd730) at Python/ast.c:2881
#6  PyAST_FromNodeObject (n=0x77ee0ad0, n@entry=0x77ee0af8,
flags=,
filename=filename@entry=0x77e9be30, arena=arena@entry=0x77f751e0)
at Python/ast.c:815
#7  0x0042649f in PyParser_ASTFromStringObject
(arena=0x77f751e0, flags=, start=258,
filename=0x77e9be30, s=0x77e9be30 "\003") at
Python/pythonrun.c:1124
#8  PyRun_StringFlags (str=str@entry=0x77e9bae0 "B''F''",
start=start@entry=258,
globals=globals@entry=0x77f5d168, locals=locals@entry=0x77f5d168,
flags=flags@entry=0x7fffd840)
at Python/pythonrun.c:902
#9  0x0053a9fe in builtin_eval_impl (module=,
locals=0x77f5d168, globals=0x77f5d168,
source=0x77e9bab0) at Python/bltinmodule.c:875
#10 builtin_eval (module=, args=) at
Python/clinic/bltinmodule.c.h:243
#11 0x004a7869 in _PyCFunction_FastCallDict (kwargs=0x0, nargs=1,
args=0x53a8b0 ,
func_obj=0x77fda990) at Objects/methodobject.c:234
#12 _PyCFunction_FastCallKeywords (func=func@entry=0x77fda990,
stack=stack@entry=0x77fa2ca8, nargs=1,
kwnames=kwnames@entry=0x0) at Objects/methodobject.c:295
#13 0x0053c954 in call_function
(pp_stack=pp_stack@entry=0x7fffda50,
oparg=oparg@entry=1,
kwnames=kwnames@entry=0x0) at Python/ceval.c:4793
#14 0x0054032c in _PyEval_EvalFrameDefault (f=,
throwflag=)
at Python/ceval.c:3277
#15 0x0053c571 in PyEval_EvalFrameEx (throwflag=0,
f=0x77fa2b28) at Python/ceval.c:718
#16 _PyEval_EvalCodeWithName (_co=_co@entry=0x77ed7270,
globals=globals@entry=0x77f5d168,
locals=locals@entry=0x77f5d168, args=args@entry=0x0,
argcount=argcount@entry=0, kwnames=kwnames@entry=0x0,
kwargs=kwargs@entry=0x8, kwcount=kwcount@entry=0, kwstep=kwstep@entry=2,
defs=defs@entry=0x0,
defcount=defcount@entry=0, kwdefs=kwdefs@entry=0x0,
closure=closure@entry=0x0, name=name@entry=0x0,
qualname=qualname@entry=0x0) at Python/ceval.c:4121
#17 0x0053d380 in PyEval_EvalCodeEx (closure=0x0, kwdefs=0x0,
defcount=0, defs=0x0, kwcount=0, kws=0x0,
argcount=0, args=0x0, locals=locals@entry=0x77f5d168,
globals=globals@entry=0x77f5d168,
_co=_co@entry=0x77ed7270) at Python/ceval.c:4142
#18 PyEval_EvalCode (co=co@entry=0x77ed7270, globals=globals@entry
=0x77f5d168,
locals=locals@entry=0x77f5d168) at Python/ceval.c:695
#19 0x00427bc4 in run_mod (arena=0x77f75180,
flags=0x7fffdd40, locals=0x77f5d168,
globals=0x77f5d168, filename=0x77f14ae8, mod=0x936ab0) at
Python/pythonrun.c:980
#20 PyRun_InteractiveOneObject (fp=fp@entry=0x774a9640
<_IO_2_1_stdin_>,
filename=filename@entry=0x77f14ae8, flags=flags@entry=0x7fffdd40)
at Python/pythonrun.c:233
#21 0x00427e8e in PyRun_InteractiveLoopFlags
(fp=fp@entry=0x774a9640
<_IO_2_1_stdin_>,
filename_str=filename_str@entry=0x5d0f05 "",
flags=flags@entry=0x7fffdd40)
at Python/pythonrun.c:112
#22 0x00427f9c in PyRun_AnyFileExFlags (fp=0x774a9640
<_IO_2_1_stdin_>, filename=0x5d0f05 "",
closeit=0, flags=0x7fffdd40) at Python/pythonrun.c:74
#23 0x00439b31 in run_file (p_cf=0x7fffdd40, filename=0x0,
fp=0x774a9640 <_IO_2_1_stdin_>)
at Modules/main.c:319
#24 Py_Main (argc=argc@entry=1, 

[issue25677] Syntax error caret confused by indentation

2016-11-07 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy:  -haypo

___
Python tracker 

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



[issue28585] Restore docstring of os._isdir

2016-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is Windows specific issue. I'm unable to test the patch myself. Could 
anybody with access to Windows computer please test it?

--

___
Python tracker 

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



[issue28631] [2.7/3.5/3.6 Regression] crash using ctypes

2016-11-07 Thread Eryk Sun

Eryk Sun added the comment:

po_message_create() returns a po_message_t pointer:

/* A po_message_t represents a message in a PO file.  */
typedef struct po_message *po_message_t;

/* Return a freshly constructed message.
   To finish initializing the message, you must set the msgid 
   and msgstr.  */
extern po_message_t po_message_create (void);

You're casting a pointer as a 32-bit C int, which isn't reliable in 64-bit 
Python. The value 0x55c7cf00 (1439158016) may be truncated. Try it using a 
po_message_t pointer type. For example:

gpo = ctypes.CDLL(lib_location)

class po_message_t(ctypes._Pointer):
"""A po_message_t represents a message in a PO file."""
class po_message(ctypes.Structure):
pass
_type_ = po_message

gpo.po_message_create.restype = po_message_t

--
nosy: +eryksun

___
Python tracker 

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



[issue25677] Syntax error caret confused by indentation

2016-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch fixes one bug, and I'm going to push it.

There is other bug here. If add "1;" before the original example (so the line 
becomes "1;1 + 1 = 2"), the caret will be under ";". In some SyntaxErrors the 
caret points one position left before the start of incorrect expression. But 
this bug deserves separate issue.

The fact that in "1 + 1 = 2" the caret points to the first "1" instead of "=" 
can be considered as yet one different bug (but this is questionable).

--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue28630] setup.py bdist_egg --without-source-files does not allow console_script to run as expected

2016-11-07 Thread Berker Peksag

Berker Peksag added the comment:

console_script is a feature of setuptools. I'd suggest reporting this to 
https://github.com/pypa/setuptools We can reopen this if the problem is really 
in distutils. Thanks!

--
nosy: +berker.peksag
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



[issue28564] shutil.rmtree is inefficient due to listdir() instead of scandir()

2016-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Proposed patch implements shutil.rmtree using os.scandir. Needed file 
descriptors support in os.scandir (issue25996). I did not test how this affects 
the performance of shutil.rmtree.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file45382/shutil-rmtree-scandir.patch

___
Python tracker 

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



[issue28623] Let `shlex.quote` accept a `PathLike` object

2016-11-07 Thread Berker Peksag

Berker Peksag added the comment:

Agreed with David. Closing this as 'rejected'. Thanks for the report.

--
nosy: +berker.peksag
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



[issue28563] Arbitrary code execution in gettext.c2py

2016-11-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry Xiang, but your patch looks overcomplicated to me. Too much methods, 
decorators, classes, too much strange names.

Here is simpler implementation with using only one recursive function.

--
Added file: http://bugs.python.org/file45381/gettext-parse-plural.patch

___
Python tracker 

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



[issue8840] truncate() semantics changed in 3.1.2

2016-11-07 Thread Berker Peksag

Berker Peksag added the comment:

The patch looks good to me, but perhaps we should make these docstrings shorter 
and refer people to the actual documentation for details? We recently did this 
in subprocess and venv modules.

--
nosy: +berker.peksag, martin.panter
stage: needs patch -> patch review
versions: +Python 3.6, Python 3.7 -Python 3.4

___
Python tracker 

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



[issue28632] configparser does not close files in read

2016-11-07 Thread Petr

New submission from Petr:

When using configparser read method, the file(s) remains opened and cannot be 
closed, causing ResourceWarning: unclosed file.

For example in the following code:

config = configparser.ConfigParser()
config.read(cfg_fn)
...

the file cfg_fn remains opened and is only closed upon destruction of the 
underlying file object. At some point in history the method read used to close 
the file, but this has been changed for some reason.

--
components: Library (Lib)
messages: 280209
nosy: PetrPy
priority: normal
severity: normal
status: open
title: configparser does not close files in read
type: resource usage
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



[issue6519] Reorder 'with' statement for files in Python Tutorial

2016-11-07 Thread Berker Peksag

Changes by Berker Peksag :


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



[issue6519] Reorder 'with' statement for files in Python Tutorial

2016-11-07 Thread Berker Peksag

Berker Peksag added the comment:

The patch looks good to me. I think we can tweak the content a bit. I left some 
comments on Rietveld.

Thanks!

--
nosy: +berker.peksag
stage: needs patch -> patch review
versions: +Python 3.5, Python 3.6, Python 3.7 -Python 2.7, Python 3.2, 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



[issue25677] Syntax error caret confused by indentation

2016-11-07 Thread Michael Layzell

Michael Layzell added the comment:

This patch fixes a problem, which is that the caret was not placed where the 
source location information for the node is, but instead in a random position 
based on the indentation level.

The problem that the caret is not placed under the `=` sign, but instead at the 
front of the expression, feels like a different bug related to how source 
location information is computed throughout cpython for infix operators. I 
don't think it should be fixed in this bug, but rather in a follow-up.

Specifically, this fix (to make the printing actually respect the source 
location information) will also be required in order to fix the placement of 
the caret to under the = sign.

--

___
Python tracker 

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



[issue28624] Make the `cwd` argument to `subprocess.Popen` accept a `PathLike`

2016-11-07 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag
stage:  -> needs patch

___
Python tracker 

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



[issue25677] Syntax error caret confused by indentation

2016-11-07 Thread Berker Peksag

Berker Peksag added the comment:

FWIW, I don't think the patch fixes the actual problem. With the patch applied, 
the caret still placed at the wrong place. I'd prefer avoid pushing a patch 
that fixes a bug by introducing another bug.

--

___
Python tracker 

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



  1   2   >