[issue31471] assertion failure in subprocess.Popen() in case the env arg has a bad keys() method

2017-09-15 Thread Oren Milman

Changes by Oren Milman :


--
pull_requests: +3586

___
Python tracker 

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



[issue31471] assertion failure in subprocess.Popen() in case the env arg has a bad keys() method

2017-09-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset c7f165fe652651c32833245fc902c790a4f173fa by Serhiy Storchaka 
(Oren Milman) in branch '2.7':
[2.7] bpo-31471: Fix assertion failure in subprocess.Popen() on Windows, in 
case env has a bad keys() method. (GH-3580) (#3595)
https://github.com/python/cpython/commit/c7f165fe652651c32833245fc902c790a4f173fa


--

___
Python tracker 

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



[issue31471] assertion failure in subprocess.Popen() in case the env arg has a bad keys() method

2017-09-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Oren!

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



[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2017-09-15 Thread Leonardo Francalanci

Leonardo Francalanci added the comment:

I'm really sorry, you are 100% correct: it blocks on the pipe (my tests killed 
the process tree before reading from the pipes).
Still, I think there should be a way to actually read the output also in this 
case... works for me when I kill the whole process stack.

--

___
Python tracker 

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



[issue31478] assertion failure in random.seed() in case the seed argument has a bad __abs__() method

2017-09-15 Thread Oren Milman

Changes by Oren Milman :


--
keywords: +patch
pull_requests: +3587
stage:  -> patch review

___
Python tracker 

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



[issue31478] assertion failure in random.seed() in case the seed argument has a bad __abs__() method

2017-09-15 Thread Oren Milman

Oren Milman added the comment:

i opened a PR that implements the first option, but of course I wouldn't
mind if you decide another option is better.

--

___
Python tracker 

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



[issue31452] asyncio.gather does not cancel tasks if one fails

2017-09-15 Thread Krzysztof Warunek

Changes by Krzysztof Warunek :


--
keywords: +patch
pull_requests: +3588
stage: needs patch -> patch review

___
Python tracker 

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



[issue31452] asyncio.gather does not cancel tasks if one fails

2017-09-15 Thread Krzysztof Warunek

Krzysztof Warunek added the comment:

I hit the same thing. Also there is a PR patch

--
nosy: +kwarunek

___
Python tracker 

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



[issue31481] telnetlib fails to read continous large output from Windows Telnet Server

2017-09-15 Thread Nisar

New submission from Nisar:

telnetlib fails to read large output from Windows Telnet Server. the issue can 
be reproduced by remotely running a dummy infinite loop that prints out sample 
text to the console

--
components: Library (Lib)
messages: 302244
nosy: nisar009
priority: normal
severity: normal
status: open
title: telnetlib fails to read continous large output from Windows Telnet Server
type: crash
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



[issue31234] Make support.threading_cleanup() stricter

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

Buildbots want my death :-( They never stop failing. Yet another random warning 
considered as an error:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.x/builds/896/steps/test/logs/stdio

Run tests in parallel using 2 child processes
(...)
0:07:33 load avg: 1.17 [285/405/1] test_threading failed (env changed)
(...)
test_init_immutable_default_args (test.test_threading.TimerTests) ... Warning 
-- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2)
Dangling thread: 
Dangling thread: <_MainThread(MainThread, started 34368581632)>
ok

--

___
Python tracker 

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



[issue31482] random.seed() doesn't work with bytes and version=1

2017-09-15 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The behavior of random.seed() with bytes and version=1 is specially documented. 
But actually it doesn't work.

>>> import random
>>> random.seed(b'abc', version=1)
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython/Lib/random.py", line 113, in seed
x = ord(a[0]) << 7 if a else 0
TypeError: ord() expected string of length 1, but int found

--
assignee: rhettinger
components: Library (Lib)
messages: 302246
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: random.seed() doesn't work with bytes and version=1
type: behavior
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



[issue31234] Make support.threading_cleanup() stricter

2017-09-15 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3590

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:


New changeset da3e5cf961f9bcc4bb376386cfe7a2865325086c by Victor Stinner in 
branch 'master':
bpo-31234: Join timers in test_threading (#3598)
https://github.com/python/cpython/commit/da3e5cf961f9bcc4bb376386cfe7a2865325086c


--

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

Oh, one change of the commit b9b69003d91c6ea94b890ce24ed25686d30f1428 
introduced a regression x86 Gentoo Refleaks 3.x. It seems like 5 seconds is not 
enough on this slow buildbot.

http://buildbot.python.org/all/builders/x86%20Gentoo%20Refleaks%203.x/builds/93/steps/test/logs/stdio

2:28:30 load avg: 6.98 [263/405/1] test_multiprocessing_spawn failed -- 
running: test_zipfile (797 sec)
beginning 6 repetitions
123456
.Process Process-555:1:1:
Traceback (most recent call last):
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/multiprocessing/process.py",
 line 297, in _bootstrap
self.run()
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/multiprocessing/process.py",
 line 99, in run
self._target(*self._args, **self._kwargs)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/_test_multiprocessing.py",
 line 4050, in child
join_process(p, timeout=5)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/_test_multiprocessing.py",
 line 79, in join_process
support.join_thread(process, timeout)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py",
 line 2117, in join_thread
raise AssertionError(msg)
AssertionError: failed to join the thread in 5.0 seconds

--

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-15 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3591

___
Python tracker 

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



[issue31267] threading.Timer object is affected by changes to system time

2017-09-15 Thread Matthias Schmidt

Matthias Schmidt added the comment:

Hi,

any news on this issue? We are facing this one as well and looking forward for 
a fix/solution.

Cheers,

Matthis Schmidt

--
nosy: +Matthias Schmidt

___
Python tracker 

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



[issue27804] IDLE 3.5.2 crashes when typing ^ on keyboard

2017-09-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee: terry.reedy -> 
resolution: third party -> duplicate
superseder:  -> IDLE crashes when I press ^ key

___
Python tracker 

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



[issue29826] " don't work on Mac under IDLE

2017-09-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee: terry.reedy -> 
resolution: third party -> duplicate
superseder:  -> IDLE crashes when I press ^ key

___
Python tracker 

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



[issue24170] IDLE crashes when I press ^ caret key

2017-09-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components:  -IDLE
title: IDLE crashes when I press ^ key -> IDLE crashes when I press ^  caret key

___
Python tracker 

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



[issue31438] IDLE 3 crashes and quits when caret character typed

2017-09-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Glad it is working and thanks for the detail notes.

Ned, is there anything we should change on the web page?  Perhaps emphasize 
more not to upgrade to tcl/tk 8.6?  Is it usual to have to re-install python?

Alper, please do not revert headers after a core dev has changed them.  This 
was never about IDLE, except insofar as IDLE is a victim of the problem.  IDLE 
is a tkinter program and you could have written a tkinter program yourself with 
a similar problem.

--
assignee: terry.reedy -> 
resolution: fixed -> duplicate
superseder:  -> IDLE crashes when I press ^  caret key

___
Python tracker 

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



[issue31483] ButtonPress event not firing until button release Python 3.6.1

2017-09-15 Thread Mike McDonnal

New submission from Mike McDonnal:

On my version of python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC 
v.1900 64 bit (AMD64)]

As well as on 3.6.2 for some other users I have spoken to there seams to be an 
issue with the event for pressing the mouse button down.

The event  or  do not fire when the mouse button is 
pressed but rather when the mouse button is released.

The following example code works fine on 2.7 but the button event is not 
working properly on at lease my version and 3.6.2

import Tkinter as tk
import ttk

app = tk.Tk()
t = ttk.Treeview(app)
t.pack(side="top",fill="both",expand=1)

scrolling = False
xscroll = tk.Scrollbar(app,command=t.xview,orient="horizontal")
t.configure(xscrollcommand=xscroll.set)
xscroll.pack(side="top",fill="x")

def scrolling_active(arrow, *args):
global scrolling
if scrolling == True:
if arrow == "arrow1":
t.xview('scroll', -5, 'units')
if arrow == "arrow2":
t.xview('scroll', 5, 'units')
app.after(5, lambda a = arrow: scrolling_active(a))

def start_scrolling(event):
global scrolling
scrolling = True
scrolling_active(xscroll.identify(event.x, event.y))

def stop_scrolling(event):
global scrolling
scrolling = False

xscroll.bind("", start_scrolling)
xscroll.bind('', stop_scrolling)

tcols = ["header " + str(i)
 for i in range(50)]
t.config(columns=tcols)
for h in tcols:
t.heading(h,text=h)

for i in range(5):
t.insert("","end",
 text = "item" + str(i),
 values = ["value" + str(x) for x in range(49)])
app.geometry("{}x{}".format(400, 300))

app.mainloop()

--
components: Windows
messages: 302251
nosy: BaconTech, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: ButtonPress event not firing until button release Python 3.6.1
type: behavior
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



[issue31483] ButtonPress event not firing until button release Python 3.6.1

2017-09-15 Thread Mike McDonnal

Mike McDonnal added the comment:

OS Version - Windows 7 Pro

--

___
Python tracker 

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



[issue31484] Cache single-character strings outside of the Latin1 range

2017-09-15 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Single-character strings in the Latin1 range (U+ - U+00FF) are shared in 
CPython. This saves memory and CPU time of per-character processing of strings 
containing ASCII characters and characters from Latin based alphabets. But the 
users of languages that use non-Latin based alphabets are not so lucky. 
Proposed PR adds a cache for characters in BMP (U+0100 - U+) which covers 
most alphabetic scripts.

Most alphabets contain characters from a single 128- or 256-character block, 
therefore only lowest bits are used for addressing in the cache. But together 
with the characters from a particular alphabet it is common to use ASCII 
characters (spaces, newline, punctuations, digits, etc) and few Unicode 
punctuation (long dash, Unicode quotes, etc). Their low bits  can match low 
bits of letters. Therefore every index addresses not a single character, but a 
mini-LRU-cache of size 2. This keeps letters in a cache even if non-letters 
with conflicting low bits are occurred.

Microbenchmarking results.

Iterating sample non-Latin-based alphabetic text (Iliad by Homer [1]) is over 
70% faster:

$ ./python -m timeit -s 's = open("36248-0.txt").read()' -- 'for c in s: pass'
Unpatched:  20 loops, best of 5: 14.5 msec per loop
Patched:50 loops, best of 5: 8.32 msec per loop

Iterating sample hieroglyphic text (Shui Hu Zhuan by Nai an Shi [2]) is about 
4% slower:

$ ./python -m timeit -s 's = open("23863-0.txt").read()' -- 'for c in s: pass'
Unpatched:  20 loops, best of 5: 11.7 msec per loop
Patched:20 loops, best of 5: 12.1 msec per loop

Iterating a string containing non-repeated characters from the all BMP range is 
20% slower:

$ ./python -m timeit -s 's = "".join(map(chr, range(0x1)))' -- 'for c in s: 
pass'
Unpatched:  200 loops, best of 5: 1.39 msec per loop
Patched:200 loops, best of 5: 1.7 msec per loop


[1] https://www.gutenberg.org/files/36248/36248-0.txt
[2] https://www.gutenberg.org/files/23863/23863-0.txt

--
components: Interpreter Core, Unicode
messages: 302253
nosy: benjamin.peterson, ezio.melotti, haypo, lemburg, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Cache single-character strings outside of the Latin1 range
type: performance
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



[issue31484] Cache single-character strings outside of the Latin1 range

2017-09-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +3592

___
Python tracker 

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



[issue31374] expat: warning: "_POSIX_C_SOURCE" redefined

2017-09-15 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3593

___
Python tracker 

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



[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2017-09-15 Thread Leonardo Francalanci

Leonardo Francalanci added the comment:

can I at least change the call to:

subprocess.run('cmd /S /C waitfor g /t 200', shell=False, timeout=4)

in any way to avoid the problem?
I tried with 
stdin=subprocess.DEVNULL,stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL; 
also with close_fds=True, but nothing changes...

--

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 11f0807a407551d498bb6bd8cc932636f75f1cd7 by Victor Stinner in 
branch 'master':
bpo-31234: test_multiprocessing: wait 30 seconds (#3599)
https://github.com/python/cpython/commit/11f0807a407551d498bb6bd8cc932636f75f1cd7


--

___
Python tracker 

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



[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2017-09-15 Thread Juliette Monsel

New submission from Juliette Monsel:

I am using python 3.6.2 with tk 8.6.7 in Linux and when I call 
widget.unbind(, funcid), it unbinds all bindings for , 
while I would expect it to unbind only funcid. Here is an example reproducing 
the problem:


import tkinter as tk

root = tk.Tk()

def cmd1(event):
print('1')

def cmd2(event):
print('2')

def unbind1():
l.unbind('', b1)

def unbind2():
l.unbind('', b2)

l = tk.Label(root, text='Hover')

b1 = l.bind('', cmd1)
b2 = l.bind('', cmd2, True)

l.pack()
tk.Button(root, text='Unbind 1', command=unbind1).pack()
tk.Button(root, text='Unbind 2', command=unbind2).pack()

root.mainloop()


In this example, clicking on one of the buttons unbinds both bindings instead 
of only one.

--
components: Tkinter
messages: 302256
nosy: j-4321-i
priority: normal
severity: normal
status: open
title: Tkinter widget.unbind(sequence, funcid) unbind all bindings
type: behavior
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



[issue31267] threading.Timer object is affected by changes to system time

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

threading.Timer is implemented with threading.Event.wait(timeout) which is 
implemented with threading.Condition.wait(timeout).

threading.Condition.wait(timeout) creates a lock called "waiter" and uses it to 
implement the wait:

   waiter.acquire(True, timeout)

So at the end of the chain, you find a lock created by _thread.allocate_lock() 
and the Lock.acquire(True, timeout) call.

At the C level, a lock is created by PyThread_allocate_lock(). The 
implementation of PyThread_allocate_lock() depends on the platform. Check:

>>> sys.thread_info
sys.thread_info(name='pthread', lock='semaphore', version='NPTL 2.25')

So in my case (Fedora 25), a Python lock is implemented as a semaphore:

* create the lock: sem_init()
* acquire the lock with a timeout: sem_timedwait(thelock, &ts)

The problem is that the sem_timedwait() function of the glibc doesn't allow to 
specify which clock is used:

https://sourceware.org/bugzilla/show_bug.cgi?id=14717

The second problem is that the glibc relies on the Linux kernel, and the kernel 
doesn't support specifiying a clock (extract of the glib bug):

"It seems this would need kernel work"

--

For sys.thread_info.lock == "mutex+cond", PyThread_allocate_lock(timeout) is 
implemented with pthread_mutex_lock() + pthread_cond_timedwait(). The good news 
is that this API allows to specify the clock:

pthread_condattr_init(&attr);
pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
pthread_cond_init(&cond, &attr);

... I already created bpo-23428 to call "pthread_condattr_setclock(&attr, 
CLOCK_MONOTONIC);" in Python, it was 2 years ago ;-)

--

___
Python tracker 

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



[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2017-09-15 Thread Juliette Monsel

Juliette Monsel added the comment:

I have found a workaround to unbind a single binding (inspired by 
https://mail.python.org/pipermail/tkinter-discuss/2012-May/003151.html):

def unbind(widget, seq, funcid):
bindings = {x.split()[1][3:]: x for x in widget.bind(seq).splitlines() if 
x.strip()}
try:
del bindings[funcid]
except KeyError:
raise tk.TclError('Binding "%s" not defined.' % funcid)
widget.bind(seq, '\n'.join(list(bindings.values(

--

___
Python tracker 

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



[issue31267] threading.Timer object is affected by changes to system time

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

> ... I already created bpo-23428 to call "pthread_condattr_setclock(&attr, 
> CLOCK_MONOTONIC);" in Python, it was 2 years ago ;-)

See also bpo-12822: "NewGIL should use CLOCK_MONOTONIC if possible".

--

___
Python tracker 

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



[issue31267] threading.Timer object is affected by changes to system time: Python locks should use a monotonic clock if available

2017-09-15 Thread STINNER Victor

Changes by STINNER Victor :


--
title: threading.Timer object is affected by changes to system time -> 
threading.Timer object is affected by changes to system time: Python locks 
should use a monotonic clock if available

___
Python tracker 

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



[issue31016] [Regression] sphinx shows an EOF error when using python2.7 from the trunk

2017-09-15 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +benjamin.peterson
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



[issue31016] [Regression] sphinx shows an EOF error when using python2.7 from the trunk

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

Using git bisect, I identified that Sphinx started to fail since the commit 
12536bd261ba95cd2748f3d7d47768742a6ffa7a which comes from bpo-30775.

I reported the bug to Sphinx:
https://github.com/sphinx-doc/sphinx/issues/4061

--
nosy: +haypo

___
Python tracker 

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



[issue31016] [Regression] sphinx shows an EOF error when using python2.7 from the trunk

2017-09-15 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +pitrou

___
Python tracker 

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



[issue30775] test_multiprocessing_forkserver leaks references on Python 3

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

The Python 2.7 change caused a regression in Sphinx: bpo-31016.

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



[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2017-09-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Tk do not provide a way of unbinding a specific command. It supports binding a 
script with replacing an existing binding, appending a script to an existing 
binding, and destroying an existing binding. Unbinding a specific command can 
be implemented in Python with a code similar to your example, but more complex 
due to taking to account different corner cases.

Do you want to write a patch and open a pull request Juliette?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29916] No explicit documentation for PyGetSetDef and getter and setter C-API

2017-09-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset da67e0d644bd3185efdaa4d15cc2ac0828ca83f9 by Serhiy Storchaka 
(Michael Seifert) in branch 'master':
bpo-29916: Include PyGetSetDef in C API extension documentation. (#831)
https://github.com/python/cpython/commit/da67e0d644bd3185efdaa4d15cc2ac0828ca83f9


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29966] typing.get_type_hints doesn't really work for classes with ForwardRefs

2017-09-15 Thread Ivan Levkivskyi

Ivan Levkivskyi added the comment:

This is now fixed (to a reasonable extent) by 
https://github.com/python/cpython/commit/f350a268a7071ce7d7a5bb86a9b1229782d4963b
 on master, and backported to 3.6.

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



[issue30381] test_smtpnet.test_connect_using_sslcontext_verified() randomly failed with "smtplib.SMTPServerDisconnected: Connection unexpectedly closed" on AMD64 FreeBSD CURRENT Debug 3.x

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

Sadly, I didn't see the bug again since I report it. So I close the bug :-(

--
resolution:  -> out of date
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



[issue31399] Let OpenSSL verify hostname and IP address

2017-09-15 Thread Jakub Wilk

Changes by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue30391] test_threading_handled() and test_threading_not_handled() of test_socketserver hangs randomly on AMD64 FreeBSD 10.x Shared 3.6

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

I modified the socketserver module so server_close() now waits until all 
spawned threads or processes completed. It should help to avoid such random 
failure.

Modifying server_close() default behaviour in Python 2.7 or 3.6 is not 
possible, so maybe we need to modify test_socketserver to use a private API to 
wait for threads/processes?

--

___
Python tracker 

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



[issue30648] test_logout() of test_imaplib.RemoteIMAP_STARTTLSTest failed randomly on s390x Debian 3.x

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

I didn't see this error recently, so I close it. It seems like a random network 
issue :-/

--
resolution:  -> out of date
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



[issue30658] Buildbot: don't sent email notification for custom builders

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

Custom builders are rarely used. The work on upgrading our buildbots to 0.9 is 
in progress but moves slowly (sadly, Zach failed to finish this task at the 
CPython sprint last week). I close the issue, even if it's not done, just 
because I didn't get any such email last month.

If email notifications related to custom builders start to annoy me again, I 
will open an issue in the CPython buildbot configuration project or the CPython 
workflow project.

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



[issue30778] [2.7] test_bsddb3 crash on x86 Windows7 2.7

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

I didn't see this failure last month, so I close the issue.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue30848] test_multiprocessing_forkserver hangs on AMD64 FreeBSD CURRENT Debug 3.x

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

I didn't see this failure last month. I hope that my work on threads cleanup 
will reduce the risk of such bug: bpo-31234. I close the issue.

--
resolution:  -> out of date
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



[issue30866] Add _testcapi.stack_pointer() to measure the C stack consumption

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

I added the function to the master branch.

I changed my mind. I now consider that the function is no needed in other 
branches. It can be added manually if someone needs it.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions:  -Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue31008] FAIL: test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests) on x86 Windows7 3.x

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

I didn't see the failure recently, it seems like my fix was enough.

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



[issue31069] test_multiprocessing_spawn and test_multiprocessing_forkserver leak dangling processes

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

I continued the effort to fix all "dangling threads/processes" in bpo-31234, so 
I close this issue.

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



[issue31477] IDLE 'strip trailing whitespace' changes multiline strings

2017-09-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The current behavior of IDLE's feature is standard, not a bug.  The cpython 
respository does not currently accept .py, .c, or .rst files with any trailing 
whitespace.  /tools/scripts/patchcheck.py strips trailing whitespace 
from all lines.  Notepad++, a widely used multi-language Windows programmer's 
editor, does the same.

I am aware of the potential surprise.  If one wants multiline strings with 
embedded trailing whitespace, one should avoid trailing whitespace strippers or 
use Python's string concatenation feature. 
>>> s = ('space \n' 'tab\t\n' 'line3\n')
>>> s
'space \ntab\t\nline3\n'

I am revising the doc to make the rstring behavior clearer.

--
stage:  -> patch review
title: IDLE 'strip trailing whitespace' changes the value of multiline strings 
-> IDLE 'strip trailing whitespace' changes multiline strings
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



[issue31376] test_multiprocessing_spawn randomly hangs AMD64 FreeBSD 10.x Shared 3.x

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

I merged this issue with bpo-31180.

--
resolution:  -> duplicate
superseder:  -> test_multiprocessing_spawn hangs randomly on x86 Windows7 3.6

___
Python tracker 

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



[issue31180] test_multiprocessing_spawn hangs randomly on x86 Windows7 3.6 and AMD64 FreeBSD 10.x Shared 3.x

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

bpo-31376 has been marked as duplicate of this issue:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/818/steps/test/logs/stdio

0:08:27 load avg: 2.79 [403/407] test_strtod passed -- running: 
test_multiprocessing_spawn (244 sec)
0:08:27 load avg: 2.79 [404/407] test_syslog passed -- running: 
test_multiprocessing_spawn (244 sec)
0:08:28 load avg: 2.79 [405/407] test_pickle passed -- running: 
test_multiprocessing_spawn (246 sec)
0:08:52 load avg: 1.99 [406/407] test_io passed (49 sec) -- running: 
test_multiprocessing_spawn (269 sec)

command timed out: 1200 seconds without output running ['make', 'buildbottest', 
'TESTOPTS=-j2 -j4', 'TESTPYTHONOPTS=', 'TESTTIMEOUT=900'], attempting to kill
process killed by signal 9
program finished with exit code -1
elapsedTime=1733.500843

--
title: test_multiprocessing_spawn hangs randomly on x86 Windows7 3.6 -> 
test_multiprocessing_spawn hangs randomly on x86 Windows7 3.6 and AMD64 FreeBSD 
10.x Shared 3.x
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



[issue31180] test_multiprocessing_spawn hangs randomly on x86 Windows7 3.6 and AMD64 FreeBSD 10.x Shared 3.x

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

Maybe my work on fixing all "dangling threads and processes" will help to 
prevent such random hang? See bpo-31234.

--

___
Python tracker 

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



[issue26121] Use C99 functions in math if available

2017-09-15 Thread Paul Romano

Changes by Paul Romano :


--
pull_requests: +3594

___
Python tracker 

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



[issue31486] calling a _json.Encoder object raises a SystemError in case obj.items() returned a tuple

2017-09-15 Thread Oren Milman

New submission from Oren Milman:

the following code causes a SystemError:

import json.encoder
class BadDict(dict):
def items(self):
return ()

encoder = json.encoder.c_make_encoder(None, None, None, None, 'foo', 'bar',
  True, None, None)
encoder(obj=BadDict({'spam': 42}), _current_indent_level=4)


this is because encoder_call() (in Modules/_json.c) passes the 'obj' argument
so that eventually encoder_listencode_dict() calls PyMapping_Items() on it.
encoder_listencode_dict() assumes that PyMapping_Items() returned a list, and
passes it to PyList_Sort().


ISTM that subclassing dict and implementing items() so that it returns a tuple
is not unrealistic.

maybe we should silently convert the tuple that PyMapping_Items() returned to a
list?

--
components: Extension Modules
messages: 302278
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: calling a _json.Encoder object raises a SystemError in case obj.items() 
returned a tuple
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



[issue31487] Improve f-strings documentation wrt format specifiers

2017-09-15 Thread Mariatta Wijaya

New submission from Mariatta Wijaya:

Provide a couple more examples of using format specifiers in f-string.

--
assignee: docs@python
components: Documentation
messages: 302279
nosy: Mariatta, docs@python, eric.smith
priority: normal
severity: normal
status: open
title: Improve f-strings documentation wrt format specifiers

___
Python tracker 

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



[issue31487] Improve f-strings documentation wrt format specifiers

2017-09-15 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
keywords: +patch
pull_requests: +3595
stage:  -> patch review

___
Python tracker 

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



[issue31419] Can not install python3.6.2 due to Error 0x80070643: Failed to install MSI package

2017-09-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components: +Windows -Installation
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue31422] tkinter.messagebox and tkinter.filedialog don't show default button's keyboard shortcuts

2017-09-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Not showing shortcuts is not a bug in the strick sense used on the tracker.  
Please be more specific about what it is that is not working.

--
nosy: +serhiy.storchaka, terry.reedy
type: behavior -> enhancement
versions: +Python 3.7 -Python 3.5

___
Python tracker 

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



[issue31459] IDLE: Rename Class Browser as Module Browser

2017-09-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
title: IDLE: Remane Class Browser as Module Browser -> IDLE: Rename Class 
Browser as Module Browser

___
Python tracker 

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



[issue31487] Improve f-strings documentation wrt format specifiers

2017-09-15 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


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



[issue31466] No easy way to change float formatting when subclassing encoder.JSONEncoder

2017-09-15 Thread Éric Araujo

Changes by Éric Araujo :


--
nosy: +merwok

___
Python tracker 

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



[issue31454] Include "import as" in tutorial

2017-09-15 Thread Éric Araujo

Changes by Éric Araujo :


--
keywords: +easy

___
Python tracker 

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



[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

2017-09-15 Thread Eryk Sun

Eryk Sun added the comment:

> I tried with stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, 
> stderr=subprocess.DEVNULL

As I said previously, you also need to make the current standard handles 
non-inheritable. Pending issue 19764, in 3.7 you'll be able to override stdin, 
stdout, and stderr with the default close_fds=True. Currently overriding them 
implicitly sets close_fds=False, in which case you need to manually ensure that 
the current standard handles (i.e. the pipe handles) can't be inherited. For 
example:

os.set_inheritable(0, False)
os.set_inheritable(1, False)
os.set_inheritable(2, False)

--

___
Python tracker 

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



[issue31422] tkinter.messagebox and tkinter.filedialog don't show default button's keyboard shortcuts

2017-09-15 Thread jcrmatos

jcrmatos added the comment:

Hello,

I can't be more specific.

The problem is that the tkinter.messagebox windows (askokcancel, askyesno, 
showerror, showinfo, etc.) default buttons (Ok, Cancel, Yes, No, etc.) don't 
show the default keyboard shortcuts/accelerators.
I believe they should. Is it an incorrect assumpption?

Thanks,

JM

--

___
Python tracker 

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



[issue31476] Stdlib source files not installed

2017-09-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

IDLE's class browser is based on stdlib's pyclbr, which processes source.py 
files.  I have no idea how you install python to not get source files, as 
source is the default option with the PSF installer.  In any case, this is an 
install issue, not an IDLE issue.

Since you are asking for the standard behavior, I suspect you must be using an 
alternate .pyc-only installer. I am therefore inclined to close as 'not a bug'.

If you want further response, please tell us the exact name of the installer 
and the url where you got it.

--
assignee: terry.reedy -> 
components: +Installation -IDLE, Library (Lib)
title: "Open Module..." Not Working in IDLE for Standard Library -> Stdlib 
source files not installed

___
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-09-15 Thread Éric Araujo

Éric Araujo added the comment:

Keyword arguments in a class definition are supported: 
https://www.python.org/dev/peps/pep-3115/#specification

Anyway, this ticket is closed, a mailing list such as python-ideas would be a 
better venue to discuss base classes vs metaclasses in a general way.

--

___
Python tracker 

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



[issue31474] [2.7] Fix -Wnonnull and -Wint-in-bool-context warnings

2017-09-15 Thread Christian Heimes

Christian Heimes added the comment:


New changeset fd39e2a6845f33a74fbb0671c434c0d84a5ec2f3 by Christian Heimes in 
branch '2.7':
bpo-31474: Fix -Wint-in-bool-context warnings (#3581)
https://github.com/python/cpython/commit/fd39e2a6845f33a74fbb0671c434c0d84a5ec2f3


--

___
Python tracker 

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



[issue31386] Make return types of wrap_bio and wrap_socket customizable

2017-09-15 Thread Christian Heimes

Christian Heimes added the comment:


New changeset 4df60f18c64ba2835e68bf3eed08d8002a00f4ac by Christian Heimes in 
branch 'master':
bpo-31386: Custom wrap_bio and wrap_socket type (#3426)
https://github.com/python/cpython/commit/4df60f18c64ba2835e68bf3eed08d8002a00f4ac


--

___
Python tracker 

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



[issue31431] SSL: check_hostname should imply CERT_REQUIRED

2017-09-15 Thread Christian Heimes

Changes by Christian Heimes :


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



[issue31431] SSL: check_hostname should imply CERT_REQUIRED

2017-09-15 Thread Christian Heimes

Christian Heimes added the comment:


New changeset e82c034496512139e9ea3f68ceda86c04bc7baab by Christian Heimes in 
branch 'master':
bpo-31431: SSLContext.check_hostname auto-sets CERT_REQUIRED (#3531)
https://github.com/python/cpython/commit/e82c034496512139e9ea3f68ceda86c04bc7baab


--

___
Python tracker 

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



[issue31346] Prefer PROTOCOL_TLS_CLIENT/SERVER

2017-09-15 Thread Christian Heimes

Christian Heimes added the comment:


New changeset a170fa162dc03f0a014373349e548954fff2e567 by Christian Heimes in 
branch 'master':
bpo-31346: Use PROTOCOL_TLS_CLIENT/SERVER (#3058)
https://github.com/python/cpython/commit/a170fa162dc03f0a014373349e548954fff2e567


--

___
Python tracker 

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



[issue31483] ButtonPress event not firing until button release Python 3.6.1

2017-09-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I cannot reproduce the claimed bug on Win 10, 2.7.13 and 3.6.2, 64 bit amd 
versions.  Running the code above from console or IDLE, I see no difference.  
Button press selects item, add blue background.  Release changes nothing.

Here is a minimal demo that runs on both 2 and 3.

try:
import tkinter as tk
from tkinter import ttk
except:
import Tkinter as tk
import ttk

def down(event): print('down')
def up(event): print('up')

app = tk.Tk()
app.bind('', down)
app.bind('', up)
app.mainloop()

Button down prints 'down', button up prints 'up'.  No bug.

Replace the binds with

label = ttk.Label(app, text='test')
label.pack()
label.bind('', down)
label.bind('', up)

and I see the same expected behavior.

--
components: +Tkinter -Windows
nosy: +serhiy.storchaka, terry.reedy -paul.moore, steve.dower, tim.golden, 
zach.ware

___
Python tracker 

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



[issue31486] calling a _json.Encoder object raises a SystemError in case obj.items() returned a tuple

2017-09-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh, I was aware of this issue for long time, but didn't have good opportunity 
for fixing it. And yes, making PyMapping_Items() (and friends) always returning 
a list looks like a reasonable option to me. This could fix similar bugs in 
third-party extensions. In Python 2 PyMapping_Items() is documented as 
returning a list, but actually it can return an arbitrary type. Authors of 
extensions could be fooled by the documentation and use concrete list API.

The drawback of this solution is some performance degradation in rare case of 
items() returning a tuple.

--
nosy: +rhettinger, serhiy.storchaka

___
Python tracker 

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



[issue31476] Stdlib source files not installed

2017-09-15 Thread Stephen Paul Chappell

Stephen Paul Chappell added the comment:

The URL for the installer that was used last is:

https://www.python.org/ftp/python/3.6.2/python-3.6.2-amd64-webinstall.exe

--

___
Python tracker 

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



[issue27391] server_hostname should only be required when checking host names

2017-09-15 Thread Krzysztof Warunek

Krzysztof Warunek added the comment:

The case appears in asyncio's create_connection. Actually it's known thing 
https://github.com/python/cpython/blob/3.6/Lib/asyncio/base_events.py#L699, a 
workaround mentioned (same as Jim has pointed) is used widely. It seems 
reasonably at first sight to "fix it", but I consider this requirement (pass 
'') as a safety check.

--
nosy: +kwarunek
status: pending -> open

___
Python tracker 

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



[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2017-09-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The unbind docstring, "Unbind for this widget for event SEQUENCE the
function identified with FUNCID" implies to me the behavior Juliette expected.  
The NMT reference unpacks this to two sentences.  Reading the code
self.tk.call('bind', self._w, sequence, '')
if funcid:
self.deletecommand(funcid)

the docstring should be something like "Unbind for this widget the event 
SEQUENCE.  If funcid is given, delete the command also"  This part of the bind 
docstring, "Bind will return an identifier to allow deletion of the bound 
function with unbind without memory leak." implies that the unbind behavior is 
deliberate.

Serhiy, are you proposing to add a new method that does what some people 
thought unbind would do?

--
nosy: +terry.reedy
type: behavior -> enhancement
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue9253] argparse: optional subparsers

2017-09-15 Thread Éric Araujo

Éric Araujo added the comment:

I am now reviewing the PR added to the other issue by Anthony.  This ticket has 
a lot of discussion; it would be good to check which parts are addressed by the 
other ticket, and particularly if the problems noted by Mike and others are now 
fixed.

--

___
Python tracker 

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



[issue31484] Cache single-character strings outside of the Latin1 range

2017-09-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Are the timings for normal builds, with, as I understand things, asserts turned 
off?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue9253] argparse: optional subparsers

2017-09-15 Thread Anthony Sottile

Anthony Sottile added the comment:

My patch mainly addresses the regression pointed out by mike bayer (zzzeek)'s 
comment.

--

___
Python tracker 

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



[issue31454] Include "import as" in tutorial

2017-09-15 Thread Novel

Novel added the comment:

The offending file is here: 
https://github.com/python/cpython/blob/master/Doc/tutorial/modules.rst

Read the developer's guide to learn how to submit your changes to python. 
https://devguide.python.org/

--
nosy: +nyt

___
Python tracker 

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



[issue31484] Cache single-character strings outside of the Latin1 range

2017-09-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, of course. There is not much sense to benchmark a debug build. Tested code 
is many times slower in debug builds due to complex consistency checking.

--

___
Python tracker 

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



[issue31485] Tkinter widget.unbind(sequence, funcid) unbind all bindings

2017-09-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I don't think a new method is needed. We can make unbind() destroying all 
bindings if FUNCID is not given (note that registered commands are leaked in 
this case), and only the specified command if it is specified. We can add a 
boolean parameter (similar to the one in bind()) for restoring the old behavior 
if this is needed.

--

___
Python tracker 

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



[issue31484] Cache single-character strings outside of the Latin1 range

2017-09-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I looked at the Gutenburg samples.  The first has a short intro with some 
English, then is pure Greek.  The patch is clearly good for anyone using mostly 
a single block alphabetic language.

The second is Chinese, not hieroglyphs (ancient Egyptian).  A slowdown for 
ancient Egyptian is irrelevant; a slowdown for Chinese is undesirable.  
Japanese mostly uses about 2000 Chinese chars, the Chinses more.  Even if the 
common chars are grouped together (I don't know), there are at least 10 
possible chars for each 2-char slot.  So I am not surprised at a net slowdown.  
I would also not be surprised if Japanese fared worse, as it uses at least 2 
blocks for its kana and uses many latin chars.

Unless we go beyond 2 x 256 slots, caching CJK is hopeless.  Have you 
considered limiting the caching to the blocks before the CJK blocks, up to, 
say, U+31BF?  https://en.wikipedia.org/wiki/Unicode_block.  Both Japanese and 
Korean might then see an actual speedup.

--

___
Python tracker 

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



[issue31454] Include "import as" in tutorial

2017-09-15 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

I might know an aspiring contributor who can work on this. Assigning to myself.

--
assignee: docs@python -> Mariatta

___
Python tracker 

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



[issue31477] IDLE 'strip trailing whitespace' changes multiline strings

2017-09-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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



[issue31438] Apple tcl/tk crashes and quits when caret character typed

2017-09-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
components:  -IDLE
title: IDLE 3 crashes and quits when caret character typed -> Apple tcl/tk 
crashes and quits when caret character typed

___
Python tracker 

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



[issue31484] Cache single-character strings outside of the Latin1 range

2017-09-15 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Sorry for using the word hieroglyphs for Chinese characters. I didn't know how 
they are named in English.

Limiting the caching to U+31BF doesn't have effect. But increasing the cache 
size to 2 x 512 slots makes the iteration of Chinese text faster by around 20%. 
Following size duplications increase the speed by additional 15-25%. The limit 
is 75-80%. This doesn't affect Greek.

--

___
Python tracker 

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



[issue28411] Eliminate PyInterpreterState.modules.

2017-09-15 Thread Eric Snow

Eric Snow added the comment:


New changeset 3f9eee6eb4b25fe1926eaa5f00e02344b126f54d by Eric Snow in branch 
'master':
bpo-28411: Support other mappings in PyInterpreterState.modules. (#3593)
https://github.com/python/cpython/commit/3f9eee6eb4b25fe1926eaa5f00e02344b126f54d


--

___
Python tracker 

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



[issue28411] Eliminate PyInterpreterState.modules.

2017-09-15 Thread Eric Snow

Changes by Eric Snow :


--
pull_requests: +3596

___
Python tracker 

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



[issue31404] undefined behavior and crashes in case of a bad sys.modules

2017-09-15 Thread Eric Snow

Changes by Eric Snow :


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



[issue31404] undefined behavior and crashes in case of a bad sys.modules

2017-09-15 Thread Eric Snow

Changes by Eric Snow :


--
pull_requests: +3597

___
Python tracker 

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



[issue31484] Cache single-character strings outside of the Latin1 range

2017-09-15 Thread Ezio Melotti

Ezio Melotti added the comment:

The Greek sample includes 155 unique characters (including whitespace, 
punctuation, and the english characters at the beginning), so they can all fit 
in the cache.
The Chinese sample however includes 3695 unique characters (all within the 
BMP), probably causing a lot more misses in the cache and a slowdown caused by 
the overhead.
The Chinese text you used for the test is also from some 700 years ago, and 
uses traditional and vernacular Chinese, so the number of unique character is 
higher than what you would normally encounter in modern Chinese.

--

___
Python tracker 

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



[issue31234] Make support.threading_cleanup() stricter

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 2c1c2ca2548f943d6323859f17612aa5a4a19165 by Victor Stinner in 
branch '3.6':
[3.6] bpo-31234: Join threads in tests (#3589)
https://github.com/python/cpython/commit/2c1c2ca2548f943d6323859f17612aa5a4a19165


--

___
Python tracker 

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



[issue29916] No explicit documentation for PyGetSetDef and getter and setter C-API

2017-09-15 Thread Michael Seifert

Changes by Michael Seifert :


--
keywords: +patch
pull_requests: +3598
stage:  -> patch review

___
Python tracker 

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



[issue31466] No easy way to change float formatting when subclassing encoder.JSONEncoder

2017-09-15 Thread Éric Araujo

Éric Araujo added the comment:

Hello and thanks for the patch!  If you don’t get feedback, you could try the 
python-ideas mailing list to see if other people have the same need and if 
there’s already a solution for this.

Serhiy, would you mind refreshing my memory about json development?  I’m not 
sure whether it’s still supposed to follow the development of simplejson, or if 
it’s effectively a fork now.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30228] Open a file in text mode requires too many syscalls

2017-09-15 Thread STINNER Victor

STINNER Victor added the comment:

Microbenchmark on Fedora 26 for https://github.com/python/cpython/pull/1385

Working directly uses ext4, the filesystem operations are likely cached in 
memory, so syscalls should be very fast.

$ ./python -m perf timeit --inherit=PYTHONPATH 'open("x.txt", "w").close()' -o 
open_ref.json -v
$ ./python -m perf timeit --inherit=PYTHONPATH 'open("x.txt", "w").close()' -o 
open_patch.json -v
$ ./python -m perf compare_to open_ref.json open_patch.json 
Mean +- std dev: [open_ref] 18.6 us +- 0.2 us -> [open_patch] 18.2 us +- 0.2 
us: 1.02x faster (-2%)


Microbenchmark using a btrfs filesystem mounted on NFS over wifi: not 
significant!

$ ./python -m perf timeit --inherit=PYTHONPATH 'open("nfs/x.txt", "w").close()' 
--append open_patch.json -v
$ ./python -m perf timeit --inherit=PYTHONPATH 'open("nfs/x.txt", "w").close()' 
--append open_patch.json -v
haypo@selma$ ./python -m perf compare_to open_ref.json open_patch.json  -v
Mean +- std dev: [open_ref] 17.8 ms +- 1.0 ms -> [open_patch] 17.8 ms +- 1.0 
ms: 1.00x faster (-0%)
Not significant!

Note: open().close() is 1000x slower over NFS!

According to strace, on NFS, open() and close() are slow, but syscalls in the 
middle are as fast as syscalls on a local filesystem.

Well, it's hard to see a significant speedup, even on NFS. So I abandon my 
change.

--

___
Python tracker 

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



[issue30228] Open a file in text mode requires too many syscalls

2017-09-15 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue30228] Open a file in text mode requires too many syscalls

2017-09-15 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution: rejected -> fixed

___
Python tracker 

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



[issue12913] Add a debugging howto

2017-09-15 Thread Éric Araujo

Éric Araujo added the comment:

Hello!  I didn’t produce anything for this apart from the initial outline.  
Looking at it now, it looks like a talk outline!  Maybe I should run with it, 
present at my local user group, and only write it up after collecting feedback 
from real beginner/intermediate programmers.

--

___
Python tracker 

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



  1   2   >