[issue31488] IDLE: Update feature classes when options are changed.

2017-09-15 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3604

___
Python tracker 

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



[issue31488] IDLE: Update feature classes when options are changed.

2017-09-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 5777ecc438790f3d324d52f2ccdad56e667e0cb3 by Terry Jan Reedy in 
branch 'master':
bpo-31488: IDLE - update former extensions when options change. (#3612)
https://github.com/python/cpython/commit/5777ecc438790f3d324d52f2ccdad56e667e0cb3


--

___
Python tracker 

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



[issue31489] Signal delivered to a subprocess triggers parent's handler

2017-09-15 Thread Ilya Kulakov

Ilya Kulakov added the comment:

I think either loop's signal handler should not be called from a subprocess or 
at the very least, os.getpid / os.getpgrp should report correctly.

--

___
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 Benjamin Peterson

Benjamin Peterson added the comment:

This seems like a bug, or least poor design, in Sphinx. It tries to read from 
pipes from processes that it knows are already dead (because it joined them!).

--

___
Python tracker 

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



[issue31489] Signal delivered to a subprocess triggers parent's handler

2017-09-15 Thread Ilya Kulakov

New submission from Ilya Kulakov:

It looks like a signal delivered to multiprocessing's process implicitly 
created by ProcessPoolExecutor triggers signal handler in the parent:

```
from concurrent.futures import ProcessPoolExecutor
import asyncio
import os
import signal
import sys
import time


def background_task():
print(f"Running background task {os.getpid()}", file=sys.stderr)
time.sleep(15)
print("Exiting background task", file=sys.stderr)


async def task():
print("Running task")

executor = ProcessPoolExecutor()
with executor:
loop = asyncio.get_event_loop()

try:
await loop.run_in_executor(executor, background_task)
except asyncio.CancelledError:
print("Cancelling task 1", file=sys.stderr)

try:
await asyncio.sleep(15)
except asyncio.CancelledError:
print("Cancelling task 2", file=sys.stderr)
raise

raise

def main():
def terminate(coro):
print(f"Terminating {os.getpid()}")
coro.cancel()

loop = asyncio.get_event_loop()
t = asyncio.ensure_future(task())
loop.add_signal_handler(signal.SIGTERM, terminate, t)

try:
print(f"Running {os.getpid()}", file=sys.stderr)
loop.run_until_complete(t)
finally:
loop.run_until_complete(loop.shutdown_asyncgens())
loop.close()


if __name__ == '__main__':
main()
```

1. Normal execution:

> Running 1000
> Running task
> Running background task 
> Exiting background task

2. Sending SIGTERM to parent once:

> Running 1000
> Running task
> Running background task 

< kill -s SIGTERM 

> Terminating 1000
> Cancelling task 1
> Exiting background task


3. Sending SIGTERM to parent twice:

> Running 1000
> Running task
> Running background task 

< kill -s SIGTERM 1000

> Terminating 1000
> Cancelling task 1

< kill -s SIGTERM 1000

> Terminating 1000
> Cancelling task 2
> Exiting background task


4. Sending SIGTERM to once to parent and once to child:

> Running 1000
> Running task
> Running background task 

< kill -s SIGTERM 1000

> Terminating 1000
> Cancelling task 1

< kill -s SIGTERM 

> Terminating 1000
> Cancelling task 2
> Exiting background task


As you can see, sending SIGTERM into a subprocess somehow triggered a signal 
handler inside a parent. This is unexpected.

--
components: asyncio
messages: 302321
nosy: Ilya.Kulakov, yselivanov
priority: normal
severity: normal
status: open
title: Signal delivered to a subprocess triggers parent's handler
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



[issue31488] IDLE: Update feature classes when options are changed.

2017-09-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
keywords: +patch
pull_requests: +3603
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



[issue1230540] sys.excepthook doesn't work in threads

2017-09-15 Thread Matt Groth

Matt Groth added the comment:

Thank you Antoine Pitrou, I was able to disable this behavior by commenting out 
some lines of code in 'traceback' and replacing them with the appropriate call 
to 'sys.excepthook'. Note you also have to comment out a few lines in 
"Modules/_threadmodule.c" to correspond to this change or else that file 
complains that there wasn't the expected output printed to stderr.

--
nosy: +Matt Groth

___
Python tracker 

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



[issue15472] Itertools doc summary table misdocuments some arguments

2017-09-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thank you.

--
resolution:  -> wont fix
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue31488] IDLE: Update feature classes when options are changed.

2017-09-15 Thread Terry J. Reedy

New submission from Terry J. Reedy:

For this issue, a 'feature class' is a non-extension class with options 
configured on the config dialog.  Currently there are 4 such classes, which 
were extension classes before conversion by #27099.

Currently, an extension class option takes effect either when IDLE is restarted 
and the module reads the value, or when a new instance is created and the 
instance reads the value.  There is currently no mechanism to update existing 
instances.

As part of the conversion, I gave each feature class a reload classmethod.  The 
method is called at module level after the class is created.  The idea was that 
these methods could also be called from ConfigDialog.activate_config_changes.  
This issue implements this idea.

(Cheryl: testing the new code should be ideally be part of this patch and 
should be part of new tests for activate_config_changes you have worked on.  I 
am going with manual tests for the moment because the cutoff for 3.6.3rc1 and 
3.7.0a1 is next Monday, 12 UTC, about 55 hours from now.)

If instances reread the class attribute each time they need it, then updating 
the class attribute updates all existing instances.  An example is the 
autocomplete popup delay time.

If instances only read the class attribute in __init__ and somehow freeze the 
value, then the class needs to keep track of instances so reload can refresh 
each.  A current example of freezing is the parenmatch type.  I will have to 
either unfreeze the attribute or add a registry set.

Fixing up CodeContext will be a separate patch I am already working on.  

Applying the reload idea to extensions, in particular the example extension, is 
a much lower priority, and can wait until after the pending releases.

--
assignee: terry.reedy
components: IDLE
messages: 302318
nosy: csabella, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: Update feature classes when options are changed.
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



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

2017-09-15 Thread Vedran Čačić

Vedran Čačić added the comment:

So floats (and complexes) cannot be seeds anymore? :-o Or this pertains only to 
ints? In this case, I think the easiest doc fix is to change

If a is an int, it is used directly.

to

If a is an int, its absolute value is used.

--
nosy: +veky

___
Python tracker 

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



[issue9842] Document ... used in recursive repr of containers

2017-09-15 Thread Mike Hoy

Changes by Mike Hoy :


--
nosy: +vexoxev

___
Python tracker 

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



[issue13224] Change str(x) to return only the qualname for some types

2017-09-15 Thread Vedran Čačić

Vedran Čačić added the comment:

I'm very glad this is moving forward. Yes, types (classes) are most important, 
functions and modules not so much. The biggest use case for me is easier 
construction of sane error messages. In many cases, something like f'Got a 
{type(argument)}' should be enough.

--

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2017-09-15 Thread Dmitriy

Changes by Dmitriy :


--
pull_requests: +3602

___
Python tracker 

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



[issue13420] newer() function in dep_util.py discard changes in the same second

2017-09-15 Thread Éric Araujo

Éric Araujo added the comment:

For 3.6 and 3.7, we can avoid the original float resolution issue thanks to 
stat_result.st_mtime_ns.  Not sure if 2.7 should be changed.

--

___
Python tracker 

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



[issue13420] newer() function in dep_util.py discard changes in the same second

2017-09-15 Thread Éric Araujo

Changes by Éric Araujo :


--
Removed message: https://bugs.python.org/msg302314

___
Python tracker 

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



[issue31271] an assertion failure in io.TextIOWrapper.write

2017-09-15 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3601

___
Python tracker 

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



[issue13420] newer() function in dep_util.py discard changes in the same second

2017-09-15 Thread Éric Araujo

Éric Araujo added the comment:

Oh well.  Re-reading #11933 I see that st_mtime is a float and may not have the 
required precision (53 bits for Python floats vs 64 bit for timestamps), so the 
proposed change would not fix this issue and reopen that one.

--

___
Python tracker 

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



[issue13420] newer() function in dep_util.py discard changes in the same second

2017-09-15 Thread Éric Araujo

Éric Araujo added the comment:

Coming back to this, I think this should be a safe change that fixes the issue 
without previsible downside.

Jacob, you opened a bug duplicate of this one: could you say what was the 
undesirable behaviour caused by the coarse resolution?

(I would change os.stat(source)[ST_MTIME] to os.stat(source).st_mtime but 
discard the other cosmetic changes + float('.2f' % ...)) conversions)

--
assignee: tarek -> 
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



[issue13487] inspect.getmodule fails when module imports change sys.modules

2017-09-15 Thread Éric Araujo

Éric Araujo added the comment:

Could you give code to reproducer the problem, if possible without third-party 
dependencies?

--
resolution: fixed -> 
status: closed -> open
versions: +Python 3.6, Python 3.7 -Python 3.2, Python 3.3

___
Python tracker 

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



[issue13224] Change str(x) to return only the qualname for some types

2017-09-15 Thread Éric Araujo

Éric Araujo added the comment:

I converted my patch to a PR.

One use case mentioned on python-ideas was for reprs of PEP 384 types; need to 
hunt down where typing could benefit from the new str(class).

The quote in my first message mentions printing err.__class__ rather than 
err.__class__.__name__; see if tutorial or logging or other docs could be made 
short and sweet with this change.

Finally, I don’t remember why I changed functions and modules when the two 
original use cases were only for classes.

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



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

2017-09-15 Thread Michael Seifert

Changes by Michael Seifert :


--
pull_requests: +3600

___
Python tracker 

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



[issue13224] Change str(x) to return only the qualname for some types

2017-09-15 Thread Éric Araujo

Changes by Éric Araujo :


--
pull_requests: +3599

___
Python tracker 

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



[issue9842] Document ... used in recursive repr of containers

2017-09-15 Thread Éric Araujo

Changes by Éric Araujo :


--
versions: +Python 3.6, Python 3.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



[issue12301] Use :role:`sys.thing` instead of ``sys.thing`` throughout

2017-09-15 Thread Éric Araujo

Éric Araujo added the comment:

Inclined to reject this, given the general dislike of huge low-value patches.

--
keywords:  -easy
status: open -> pending
versions:  -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



[issue15472] Itertools doc summary table misdocuments some arguments

2017-09-15 Thread Éric Araujo

Éric Araujo added the comment:

Per Raymond’s feedback, I will close this.  The table is useful as a quick 
reference, seq is a shortcut, “it” or “iter” are worse names, the first doc 
line says this is all about iterators, and the individual function docs do use 
“iterable”.

--
status: open -> pending

___
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



[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



[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

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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



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



[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



[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



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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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: +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



[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



[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(, 
> 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



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

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

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();
pthread_condattr_setclock(, CLOCK_MONOTONIC);
pthread_cond_init(, );

... I already created bpo-23428 to call "pthread_condattr_setclock(, 
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

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



[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



[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



  1   2   >