[issue31033] Add argument to .cancel() of Task and Future

2017-08-10 Thread Марк Коренберг

Марк Коренберг added the comment:

1. Yes, specifying argument to cancel in `raise CancelledError` would be perfect
2. specifying argument to `.cancel()` is still actual.
3. Yes, important part of exceptions should not be swallowed (please open 
separate issue). Also, it will be nice to show which code calls `.cancel()`, 
not only `sleep()` you menitioned.

--

___
Python tracker 

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



[issue14345] Document socket.SOL_SOCKET

2017-08-10 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue1732367] Document the constants in the socket module

2017-08-10 Thread Ammar Askar

Ammar Askar added the comment:

I've opened up a PR for this ticket's dependencies. There's some things I'm 
looking for feedback on there: https://github.com/python/cpython/pull/3072

--

___
Python tracker 

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



[issue12887] Documenting all SO_* constants in socket module

2017-08-10 Thread Ammar Askar

Changes by Ammar Askar :


--
pull_requests: +3108

___
Python tracker 

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



[issue14345] Document socket.SOL_SOCKET

2017-08-10 Thread Ammar Askar

Changes by Ammar Askar :


--
pull_requests: +3109

___
Python tracker 

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



[issue31143] lib2to3 requires source files for fixes

2017-08-10 Thread Vedran Čačić

Vedran Čačić added the comment:

I'm sorry about entering the discussion without knowing any connection between 
the original problem and Brett's question, but isn't the latter answered by 
pkgutil.iter_modules (and pkgutil.walk_packages if needed)?

--
nosy: +veky

___
Python tracker 

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



[issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3107

___
Python tracker 

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



[issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

Reopen. I forgot Python 2.7.

--

___
Python tracker 

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



[issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset bc69d00288a0b1f5ef49dcfd60a91c5e9b5b81ae by Victor Stinner in 
branch '3.6':
bpo-31173: Rewrite WSTOPSIG test of test_subprocess (#3055) (#3070)
https://github.com/python/cpython/commit/bc69d00288a0b1f5ef49dcfd60a91c5e9b5b81ae


--

___
Python tracker 

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



[issue30845] [3.5] test_first_completed_some_already_completed() of test_concurrent_futures.ProcessPoolWaitTests: time.sleep() fails with "sleep length must be non-negative" in setUp() on x86 Tiger 3.

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution: fixed -> out of date

___
Python tracker 

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



[issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3106

___
Python tracker 

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



[issue31160] Enhance support.reap_children()

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

I pushed the most important change: reap_children() now makes tests fail with 
ENV_CHANGED on warning, so I close the issue.

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



[issue30051] Document that the random module doesn't support fork

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

Since Raymond and Antoine don't like the documentation idea, I just close my 
issue.

Hopefully, Python 3.7 now reseeds automatically random at fork!

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



[issue30188] test_nntplib: random EOFError in setUpClass()

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue30229] Closing a BufferedRandom calls lseek() mutliple times

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

I closed my PR, so I also close this issue.

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



[issue30369] test_thread crashed with SIGBUS on AMD64 FreeBSD 10.x Shared 3.6

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

I only saw this bug once, so 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



[issue30382] test_stdin_broken_pipe() of test_asyncio failed randomly on AMD64 FreeBSD CURRENT Non-Debug 3.x

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

I only saw this bug once since June, so I close this 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-08-10 Thread STINNER Victor

STINNER Victor added the comment:

I didn't see this bug recently, I hesitate to close this issue.

--

___
Python tracker 

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



[issue30653] test_socket hangs in ThreadableTest.tearDown() on AMD64 FreeBSD CURRENT Debug 3.6

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

I didn't see this bug recently, so I close this 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



[issue30683] Enhance doctest support in regrtest --list-cases

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

I have no idea how to implement this idea. I'm not interested to work on this 
topic, so I just close this issue. If someone wants to work on this topic, 
please open a new 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-08-10 Thread STINNER Victor

Changes by STINNER Victor :


--
title: test_bsddb3 crash on x86 Windows7 2.7 -> [2.7] test_bsddb3 crash on x86 
Windows7 2.7

___
Python tracker 

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



[issue30778] test_bsddb3 crash on x86 Windows7 2.7

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


--
title: test_bsddb3 crash on x86 Windows XP 2.7 -> test_bsddb3 crash on x86 
Windows7 2.7

___
Python tracker 

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



[issue30830] test_logging leaks dangling threads on FreeBSD

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


--
title: test_logging leaks a "dangling" threads on FreeBSD -> test_logging leaks 
dangling threads on FreeBSD

___
Python tracker 

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



[issue30834] Warning -- files was modified by test_import, After: ['@test_4852_tmp.pyc']

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

Python 3.5 doesn't accept bugfixes anymore, so I close this issue.

I never saw this bug on 2.7, 3.6 or master buildbots.

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



[issue30845] [3.5] test_first_completed_some_already_completed() of test_concurrent_futures.ProcessPoolWaitTests: time.sleep() fails with "sleep length must be non-negative" in setUp() on x86 Tiger 3.

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

Python 3.5 doesn't accept bugfixes anymore, so I close this issue.

--
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 leaks a dangling process

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

See also bpo-30846.

--

___
Python tracker 

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



[issue30846] [3.6] test_rapid_restart() of test_multiprocessing_fork fails randomly on AMD64 Debian PGO 3.6

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

See also bpo-31069.

--

___
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 leaks a dangling process

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


--
title: test_multiprocessing_spawn leaked a dangling process -> 
test_multiprocessing_spawn leaks a dangling process

___
Python tracker 

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



[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

Change the Python version to 2.7 only, since Python 3.5 doesn't accept bug 
fixes anymore (only security fixes).

--
title: [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails 
with "integer value too large to represent" on with AMD64 Windows8 3.5 -> [2.7] 
test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer 
value too large to represent" on with AMD64 Windows8 3.5
versions: +Python 2.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



[issue30857] test_bsddb3 hangs longer than 37 minutes on x86 Tiger 2.7

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

Sadly I didn't see this bug recently, so I just 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



[issue30885] test_subprocess hangs on AMD64 Windows8.1 Refleaks 3.x

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

Sadly, I didn't see the bug recently, so I just close the issue.

Note: Python 3.5 just entered security only fixes stage.

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



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

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 270c3c62edd81c14fcdb6a24b4b518a777ec6534 by Victor Stinner in 
branch '3.6':
bpo-31008: Fix asyncio test_wait_for_handle on Windows (#3065) (#3068)
https://github.com/python/cpython/commit/270c3c62edd81c14fcdb6a24b4b518a777ec6534


--

___
Python tracker 

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



[issue30982] AMD64 Windows8.1 Refleaks 3.x: compilation error, cannot open python37_d.dll

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

The bug is gone.

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



[issue29736] Optimize builtin types constructor

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

I lost interest in this issue. I closed my PR, now I close this old 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



[issue30030] Simplify _RandomNameSequence

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

No consensus was found on this issue how to "simplify" _RandomNameSequence, so 
I close the issue.

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue28087] macOS 12 poll syscall returns prematurely

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

What is the status of this issue? Is there still something to do?

If you ask me my opinion, I would just suggest to remove select.poll() on macOS 
to stop to have to bother with poll() bugs which only trigger at runtime :-/

--
versions:  -Python 3.5

___
Python tracker 

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



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

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3105

___
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-08-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 5659a72f487579be76335c09c8ba8b2f1800adde by Victor Stinner in 
branch 'master':
bpo-31008: Fix asyncio test_wait_for_handle on Windows (#3065)
https://github.com/python/cpython/commit/5659a72f487579be76335c09c8ba8b2f1800adde


--

___
Python tracker 

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



[issue31130] test_idle: idlelib.configdialog leaks references

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

> As I said, I only get the 1 block leak with a micro test of a class or method.

Yeah, again, the memory block check is fragile. It might be an legit internal 
cache filled for good reasons. It can be a free list. It can be a lot of 
things. It's really hard to track such very tiny memory allocation. "leaked [1, 
1, 1, 1] memory blocks" can be a false alarm, it's not big.

--

___
Python tracker 

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



[issue31130] test_idle: idlelib.configdialog leaks references

2017-08-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

My message was most a heads-up.  As I said, I only get the 1 block leak with a 
micro test of a class or method.  It is possible that even that is 
Windows-specific.  As long as you only care that test_idle not leak, I don't 
care about this either.

--

___
Python tracker 

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



[issue31002] IDLE: Add tests for configdialog keys tab

2017-08-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I have thought about factoring out common test code into helper functions 
either within test_configdialog or in a new module.  One example: simulate a 
click on a listbox, with common before and after code.  Another: Testing the 
group of selection widgets on both theme and keys pages. (If I were not 
planning to replace this group, we could factor out a SelectionFrame and put an 
instance on each page.)

We might do some such refactoring after this, before HighPageTest.  Keep notes 
on redundancies you notice that might be candidates.

--

___
Python tracker 

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



[issue31179] Speed-up dict.copy() up to 5.5 times.

2017-08-10 Thread Yury Selivanov

Yury Selivanov added the comment:

>> PyDict_Copy creates a new empty dict object and then inserts key/values into 
>> it one by one.

> Why not creating a "preallocated" dict in that case? _PyDict_NewPresized()

I don't think it's related to the proposed patch.  Please take a look at the 
PR.  `_PyDict_NewPresized` and inserting entries one by one will not be faster 
than a `memcpy`.

--

___
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 leaked a dangling process

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

Another warning on x86 Tiger 3.x:

http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/1043/steps/test/logs/stdio

test_rapid_restart 
(test.test_multiprocessing_forkserver.WithProcessesTestManagerRestart) ... ok
Warning -- Dangling processes: {}
test_access 
(test.test_multiprocessing_forkserver.WithProcessesTestPicklingConnections) ... 
ok

--

___
Python tracker 

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



[issue31181] Segfault in gcmodule.c:360 visit_decref (PyObject_IS_GC(op))

2017-08-10 Thread lchin

New submission from lchin:

When running a python script with YML data as input, it stopped with 
segmentation fault 

/home/appuser/pyETL/tableTrimmer.py 
 /home/appuser/pyETL/csidPyLib/etlConfig/ip4AuditSync.yml

(gdb) bt

Core was generated by `python2.7 tableTrimmer.py 
csidPyLib/etlConfig/ip4AuditSync.yml'.
Program terminated with signal 11, Segmentation fault.
#0  visit_decref (op=0x7f08c1afb320, data=0x0) at Modules/gcmodule.c:360
360 if (PyObject_IS_GC(op)) {

--
components: Interpreter Core
messages: 300121
nosy: lchin
priority: normal
severity: normal
status: open
title: Segfault in gcmodule.c:360 visit_decref (PyObject_IS_GC(op))
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



[issue31179] Speed-up dict.copy() up to 5.5 times.

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

> PyDict_Copy creates a new empty dict object and then inserts key/values into 
> it one by one.

Why not creating a "preallocated" dict in that case? _PyDict_NewPresized()

--

___
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

2017-08-10 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/x86%20Windows7%203.6/builds/570/steps/test/logs/stdio

1:21:25 [402/405] test_frame passed -- running: test_multiprocessing_spawn 
(2805 sec)
1:21:32 [403/405] test_hash passed -- running: test_multiprocessing_spawn (2811 
sec)
1:21:33 [404/405] test_raise passed -- running: test_multiprocessing_spawn 
(2812 sec)

command timed out: 1200 seconds without output running 
['Tools\\buildbot\\test.bat', '-j2', '--timeout', '900'], attempting to kill
program finished with exit code 1
elapsedTime=6104.779000

--
components: Tests
messages: 300119
nosy: haypo
priority: normal
severity: normal
status: open
title: test_multiprocessing_spawn hangs randomly on x86 Windows7 3.6
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



[issue31179] Speed-up dict.copy() up to 5.5 times.

2017-08-10 Thread Yury Selivanov

New submission from Yury Selivanov:

It's possible to significantly improve performance of shallow dict copy.  
Currently, PyDict_Copy creates a new empty dict object and then inserts 
key/values into it one by one.

My idea is to simply memcpy the whole keys/items region and do the necessary 
increfs after it.  This works just fine for non-key-sharing dicts.

With the following simple microbenchmark:

import time

N = 100

for size in [0, 1, 10, 20, 50, 100, 500, 1000]:
d = dict([(str(i), i) for i in range(size)])

t = time.monotonic()
for i in range(N):
d.copy()
e = time.monotonic() - t

print(f'dict(size={size}).copy() x {N} times:\t {e:.4f}')


Output for 3.7 master:

dict(size=0).copy() x 100 times: 0.1299
dict(size=1).copy() x 100 times: 0.1499
dict(size=10).copy() x 100 times:0.3758
dict(size=20).copy() x 100 times:0.7722
dict(size=50).copy() x 100 times:1.2784
dict(size=100).copy() x 100 times:   2.5128
dict(size=500).copy() x 100 times:   12.8968
dict(size=1000).copy() x 100 times:  25.4276


Output for patched 3.7:

dict(size=0).copy() x 100 times: 0.1352
dict(size=1).copy() x 100 times: 0.1285
dict(size=10).copy() x 100 times:0.1632
dict(size=20).copy() x 100 times:0.3076
dict(size=50).copy() x 100 times:0.3663
dict(size=100).copy() x 100 times:   0.5140
dict(size=500).copy() x 100 times:   2.3419
dict(size=1000).copy() x 100 times:  4.6176

--
components: Interpreter Core
messages: 300117
nosy: haypo, inada.naoki, yselivanov
priority: normal
severity: normal
stage: patch review
status: open
title: Speed-up dict.copy() up to 5.5 times.
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



[issue31179] Speed-up dict.copy() up to 5.5 times.

2017-08-10 Thread Yury Selivanov

Changes by Yury Selivanov :


--
pull_requests: +3104

___
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 leaked a process on AMD64 Windows8.1 Refleaks 3.x

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

With the commit 957d0e9b59bd27ca7c473560634d8b5dbe66338c (bpo-26762), 
_test_multiprocessing now fails with ENV_CHANGED if a warning is emitted. It 
allowed to catch a warning on x86-64 El Capitan 3.x:

http://buildbot.python.org/all/builders/x86-64%20El%20Capitan%203.x/builds/581/steps/test/logs/stdio

test_enable_logging (test.test_multiprocessing_spawn.WithProcessesTestLogging) 
... ok
test_level (test.test_multiprocessing_spawn.WithProcessesTestLogging) ... ok
test_rapid_restart 
(test.test_multiprocessing_spawn.WithProcessesTestManagerRestart) ... ok
Warning -- Dangling processes: {}
test_access 
(test.test_multiprocessing_spawn.WithProcessesTestPicklingConnections) ... ok
test_pickling 
(test.test_multiprocessing_spawn.WithProcessesTestPicklingConnections) ... ok
test_boundaries (test.test_multiprocessing_spawn.WithProcessesTestPoll) ... ok

--

___
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 leaked a dangling process

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


--
title: test_multiprocessing_spawn leaked a process on AMD64 Windows8.1 Refleaks 
3.x -> test_multiprocessing_spawn leaked a dangling process

___
Python tracker 

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



[issue31130] test_idle: idlelib.configdialog leaks references

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

> test_idle leaked [1, 1, 1, 1] memory blocks, sum=4

While reference leaks are more or less stable, the check on memory blocks is 
fragile.

I'm unable to reproduce your issue on Linux. I tested "./python -m test -R 3:3 
-u gui -v test_idle". If you have a reproductible failure, please open a new 
issue since this one is closed.

If you consider that it's a recent regression, you can go back in history using 
git checkout , or even git bisect.

If you open a new issue, you may want to use "python -m test.bisect ..." to 
identify which test leaks memory blocks.

--

___
Python tracker 

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



[issue31130] test_idle: idlelib.configdialog leaks references

2017-08-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Victor: Something seems to have changed in the last few days.  When I merged, 
both specific classes
python -m test -R 3:3 -u gui -v test_idle -m 
idlelib.idle_test.test_configdialog.FontPageTest.*
and the module as a whole passed.
python -m test -R 3:3 -u gui -v test_idle -m 
idlelib.idle_test.test_configdialog.*.*

Today, not having touched configdialog or test_configdialog, test_configdialog 
as a whole passes but FontPageTest, IndentTest, and GenPageTest fail with 
test_idle leaked [1, 1, 1, 1] memory blocks, sum=4
(Tested individually, VarTraceTest and the empty HighlightTest pass.)
I presume that cleanUpModule still runs with the restriction.

Could any of your other recent changes to regrtest have introduced a spurious 1 
block error when tests are filtered?

--

___
Python tracker 

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



[issue31002] IDLE: Add tests for configdialog keys tab

2017-08-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am not sure I agree with all your suggested name changes.  But I am looking 
as more substantive issues first.

--

___
Python tracker 

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



[issue31148] Can we get an MSI installer for something past 3.4.4?

2017-08-10 Thread Steve Dower

Steve Dower added the comment:

> when we changed installers was that when we also fixed the 
> security/permissions problems with the install dir

Yes, but the permissions issue here isn't the install directory - it is 
probably the TEMP directory or some other system restriction. It's basically 
impossible to tell from the logs, and I don't even know where to start asking 
for configuration settings to see what may be wrong.

--

___
Python tracker 

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



[issue31178] [EASY] subprocess: TypeError: can't concat str to bytes, in _execute_child()

2017-08-10 Thread Ammar Askar

Changes by Ammar Askar :


--
pull_requests: +3103

___
Python tracker 

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



[issue31143] lib2to3 requires source files for fixes

2017-08-10 Thread Brett Cannon

Brett Cannon added the comment:

Simplest way is to do 
https://docs.python.org/3/library/importlib.html#importlib.util.find_spec and 
see if a spec can be found for the module in question. That will do the search 
for the module but it won't load it. This does dictate that you know the name 
of the module upfront, though. If you want more of a "list all modules since I 
don't know what I want" then you're out of luck until I develop the API (maybe 
3.7?).

--

___
Python tracker 

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



[issue31148] Can we get an MSI installer for something past 3.4.4?

2017-08-10 Thread R. David Murray

R. David Murray added the comment:

Steve, when we changed installers was that when we also fixed the 
security/permissions problems with the install dir?  If permissions are the 
issue the OP's problem may have nothing to do with it not being msi.

--

___
Python tracker 

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



[issue31168] IDLE hangs with absurdly long __repr__s

2017-08-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am quite aware that tk text widgets (and probably other widgets) have 
line-length limitations.  Which issue this duplicates depends on what action 
you propose.  #28840 proposes addressing limits in the docs. #1442493 is about 
code changes.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses

2017-08-10 Thread Martijn Pieters

Martijn Pieters added the comment:

It's confusing; a syntax error reports on the first error found, not two errors 
at once. The TabError or IndentationError exception detail message itself is 
lost (it should be "IndentationError: Improper mixture of spaces and tabs." or 
"TabError: Improper indentation.", respectively). So you end up with an 
end-user scratching their head, the two parts of the message make no sense 
together.

--

___
Python tracker 

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



[issue30830] test_logging leaks a "dangling" threads on FreeBSD

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


--
title: HTTPHandlerTest of test_logging leaks a "dangling" thread on AMD64 
FreeBSD CURRENT Non-Debug 3.x -> test_logging leaks a "dangling" threads on 
FreeBSD

___
Python tracker 

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



[issue30830] test_logging leaks a "dangling" threads on FreeBSD

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

bpo-31041 has been marked as a duplicate of this issue. Extracts:

test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ...
Warning -- threading_cleanup() failed to cleanup -1 threads after 4 sec (count: 
0, dangling: 1)

and

test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ...
Warning -- threading_cleanup() failed to cleanup -1 threads after 3 sec (count: 
0, dangling: 1)

--

"Maybe threading_cleanup() should call support.gc_collect()."

--

___
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-08-10 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3102

___
Python tracker 

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



[issue31041] test_handle_called_with_mp_queue() of test_logging: threading_cleanup() failed to cleanup, on AMD64 FreeBSD 10.x Shared 3.x

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

Let's mark this issue as a duplicate of bpo-30830.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> test_logging leaks a "dangling" threads on FreeBSD

___
Python tracker 

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



[issue31010] test_socketserver.test_ForkingTCPServer(): threading_cleanup() and reap_children() warnings on AMD64 FreeBSD 10.x Shared 3.x

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

I'm not 100% sure, but it looks like a duplicate of bpo-31151.

--
resolution:  -> duplicate
superseder:  -> test_socketserver: Warning -- reap_children() reaped child 
process

___
Python tracker 

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



[issue31151] test_socketserver: Warning -- reap_children() reaped child process

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

bpo-31010 has been marked as a duplicate of this issue.

--

___
Python tracker 

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



[issue31010] test_socketserver.test_ForkingTCPServer(): threading_cleanup() and reap_children() warnings on AMD64 FreeBSD 10.x Shared 3.x

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue26762] test_multiprocessing_spawn leaves processes running in background

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 957d0e9b59bd27ca7c473560634d8b5dbe66338c by Victor Stinner in 
branch 'master':
bpo-26762: _test_multiprocessing reports dangling (#3064)
https://github.com/python/cpython/commit/957d0e9b59bd27ca7c473560634d8b5dbe66338c


--

___
Python tracker 

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



[issue31169] Unknown-source assertion failure in multiprocessing/managers.py

2017-08-10 Thread drallensmith

drallensmith added the comment:

I've updated the title to be more accurate.

On second thought, putting in a pdb.set_trace() would require that I know where 
the assertion failure is taking place... sigh. BTW, is there some way to edit 
earlier messages? I am used to github in that regard...

--
title: convert_to_error assertion failure in multiprocessing/managers.py -> 
Unknown-source assertion failure in multiprocessing/managers.py

___
Python tracker 

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



[issue31178] [EASY] subprocess: TypeError: can't concat str to bytes, in _execute_child()

2017-08-10 Thread STINNER Victor

New submission from STINNER Victor:

Lib/subprocess.py contains the following code:

try:
exception_name, hex_errno, err_msg = (
errpipe_data.split(b':', 2))
except ValueError:
exception_name = b'SubprocessError'
hex_errno = b'0'
err_msg = (b'Bad exception data from child: ' +
   repr(errpipe_data))

b'...' + repr() is wrong: it raises a "TypeError: can't concat str to bytes" 
when python3 is run with -bb.


Example with attached subprocess_bug.patch:

haypo@selma$ ./python -bb -m test -v test_subprocess -m test_invalid_args
(...)
==
ERROR: test_invalid_args (test.test_subprocess.ContextManagerTests)
--
Traceback (most recent call last):
  File "/home/haypo/prog/python/master/Lib/subprocess.py", line 1309, in 
_execute_child
errpipe_data.split(b':', 1))
ValueError: not enough values to unpack (expected 3, got 2)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/haypo/prog/python/master/Lib/test/test_subprocess.py", line 2880, 
in test_invalid_args
stderr=subprocess.PIPE) as proc:
  File "/home/haypo/prog/python/master/Lib/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
  File "/home/haypo/prog/python/master/Lib/subprocess.py", line 1314, in 
_execute_child
repr(errpipe_data))
TypeError: can't concat str to bytes


IMHO err_msg should be decoded using err_msg.decode(errors="surrogatepass") and 
then use 'Bad ...: %s' % err_msg. It would need to add an "else:" block to the 
try/except to do the err_msg.decode(errors="surrogatepass") when no error is 
raised. Well, something like that :-)

--
components: Library (Lib)
files: subprocess_bug.patch
keywords: easy, patch
messages: 300102
nosy: haypo
priority: normal
severity: normal
status: open
title: [EASY] subprocess: TypeError: can't concat str to bytes, in 
_execute_child()
versions: Python 3.7
Added file: http://bugs.python.org/file47077/subprocess_bug.patch

___
Python tracker 

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



[issue31169] convert_to_error assertion failure in multiprocessing/managers.py

2017-08-10 Thread drallensmith

drallensmith added the comment:

pdb is not currently working for debugging a subprocess. I suspect I will need 
to put "import pdb" and "pdb.set_trace()" into managers.py.

BTW, a thank-you to berker.peksag; while the link is present in Travis, I 
should still have put it in.

--

___
Python tracker 

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



[issue26762] test_multiprocessing_spawn leaves processes running in background

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3101

___
Python tracker 

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



[issue31143] lib2to3 requires source files for fixes

2017-08-10 Thread Steve Dower

Steve Dower added the comment:

It also breaks .zip file distribution, which I'm fairly sure we do explicitly 
support by virtue of having "python36.zip" in sys.path by default. And the 
".pyc-only in a zip file" distribution is *totally* busted :) (and also 
officially released for Windows...)

I'm dragging in an importlib expert to the discussion, probably against his 
will, since this is really a problem of "how do I programmatically discover 
what I can import without using os.listdir()". Hopefully Brett can answer that 
question and we can come up with a patch.

--
nosy: +brett.cannon, steve.dower

___
Python tracker 

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



[issue31169] convert_to_error assertion failure in multiprocessing/managers.py

2017-08-10 Thread drallensmith

drallensmith added the comment:

Here is the patch for 2.7.

--
Added file: http://bugs.python.org/file47076/managers-2.7.patch

___
Python tracker 

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



[issue31169] convert_to_error assertion failure in multiprocessing/managers.py

2017-08-10 Thread drallensmith

drallensmith added the comment:

Well, it looks like I was incorrect in where the AssertionError is coming from 
- the attached patches, while an improvement IMO on the current code, did not 
result in a change in behavior. Unfortunately, the combination of bare asserts 
(with no messages) with remote raising of errors makes it rather hard to debug 
- I will see if pdb will do it, but given that it's involving a subprocess I 
will be very impressed if it does. (Coverage.py frequently misses lines that 
are only executed in subprocesses, for instance.)

--
keywords: +patch
Added file: http://bugs.python.org/file47075/managers-3.5.patch

___
Python tracker 

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



[issue31149] Add Japanese to the language switcher

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

I reopen the issue: backport to 2.7 is still needed.

--
status: closed -> open
versions: +Python 2.7, 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



[issue31164] test_functools: test_recursive_pickle() stack overflow on x86 Gentoo Refleaks 3.x

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

Copy of interesting comments: https://github.com/python/cpython/pull/3025

serhiy-storchaka: "Parent's destroy() now is called even if this destroy() 
already was called. I.e. it can be called twice."

haypo: "Yes, it's a deliberate choice. All other ttk widgets now have the same 
behaviour."

--

Ok, the bug is now fixed in 2.7, 3.6 and 3.7 (master) branches. I close the 
issue.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
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



[issue31159] Doc: Language switch can't switch on specific cases

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset e8e7fba0b24582959feca9c31f2a72fc0251f83d by Victor Stinner 
(Julien Palard) in branch '3.6':
bpo-31159: fix language switch regex on unknown yet built languages. … (#3051)
https://github.com/python/cpython/commit/e8e7fba0b24582959feca9c31f2a72fc0251f83d


--

___
Python tracker 

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



[issue31149] Add Japanese to the language switcher

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset e8e7fba0b24582959feca9c31f2a72fc0251f83d by Victor Stinner 
(Julien Palard) in branch '3.6':
bpo-31159: fix language switch regex on unknown yet built languages. … (#3051)
https://github.com/python/cpython/commit/e8e7fba0b24582959feca9c31f2a72fc0251f83d


--

___
Python tracker 

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



[issue31160] Enhance support.reap_children()

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 1247e2cda514d7a73187e0b53ec8c35d87a34a84 by Victor Stinner in 
branch '2.7':
[2.7] bpo-31160: Backport reap_children fixes from master to 2.7 (#3063)
https://github.com/python/cpython/commit/1247e2cda514d7a73187e0b53ec8c35d87a34a84


--

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-08-10 Thread David K. Hess

David K. Hess added the comment:

FYI, PR opened: https://github.com/python/cpython/pull/3062

--

___
Python tracker 

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



[issue31177] unittest mock's reset_mock throws an error when an attribute has been deleted

2017-08-10 Thread Hmvp

New submission from Hmvp:

When using a mock and deleting a attribute reset_mock cannot be used anymore 
since it tries to call reset_mock on the _deleted sentinel value.

Reproduction path:
```
from unittest.mock import MagicMock
mock = MagicMock()
mock.a = 'test'
del mock.a
mock.reset_mock()
```

Gives:
```
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.5/unittest/mock.py", line 544, in reset_mock
child.reset_mock(visited)
AttributeError: '_SentinelObject' object has no attribute 'reset_mock'
```

Expected result:
mock is reset without throwing an exception and the 'a' attribute is no longer 
in a deleted state

Only checked 3.5 and current master if bug is present

--
components: Library (Lib)
messages: 300090
nosy: hmvp
priority: normal
severity: normal
status: open
title: unittest mock's reset_mock throws an error when an attribute has been 
deleted
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue31149] Add Japanese to the language switcher

2017-08-10 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3099

___
Python tracker 

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



[issue31159] Doc: Language switch can't switch on specific cases

2017-08-10 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3098

___
Python tracker 

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



[issue31133] [2.7] PCbuild/pcbuild.sln of Python 2.7 cannot be open by Visual Studio 2010

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue31133] [2.7] PCbuild/pcbuild.sln of Python 2.7 cannot be open by Visual Studio 2010

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 693790817a93701093ef9be7abbb0d6d4309 by Victor Stinner in 
branch '2.7':
PCbuild: downgrade pcbuild.sln to support VS 2010 (#3031)
https://github.com/python/cpython/commit/693790817a93701093ef9be7abbb0d6d4309


--

___
Python tracker 

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



[issue31160] Enhance support.reap_children()

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3097

___
Python tracker 

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



[issue4963] mimetypes.guess_extension result changes after mimetypes.init()

2017-08-10 Thread David K. Hess

Changes by David K. Hess :


--
pull_requests: +3096

___
Python tracker 

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



[issue31160] Enhance support.reap_children()

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset 719a15b32587de6c4add4385ee3f84a20711340f by Victor Stinner in 
branch '3.6':
[3.6] bpo-31160: Backport reap_children() fixes from master to 3.6 (#3060)
https://github.com/python/cpython/commit/719a15b32587de6c4add4385ee3f84a20711340f


--

___
Python tracker 

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



[issue31169] convert_to_error assertion failure in multiprocessing/managers.py

2017-08-10 Thread Berker Peksag

Berker Peksag added the comment:

For those who want to triage this issue, the test case can be found at 
https://github.com/drallensmith/neat-python/blob/e4aeb39eccefbd73babfb61bb13fd23feef2a102/tests/test_distributed.py#L234

--
nosy: +berker.peksag, davin, pitrou

___
Python tracker 

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



[issue31160] Enhance support.reap_children()

2017-08-10 Thread STINNER Victor

Changes by STINNER Victor :


--
pull_requests: +3095

___
Python tracker 

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



[issue31160] Enhance support.reap_children()

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:

bpo-31151 fixed test_socketserver.

--

___
Python tracker 

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



[issue31172] Py_Main() is totally broken on Visual Studio 2017

2017-08-10 Thread Steve Dower

Steve Dower added the comment:

Your final file layout needs to match any of our standard ones. On my phone now 
so I'm not going to write them all out (will do it later if you need), but you 
need to put your .exe in the same location as the python.exe for the runtime 
you're using (or move the runtime around your exe).

Also look at the embeddable zip package. It's meant for this (though you still 
need a full install to build). I do this all the time.

--

___
Python tracker 

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



[issue31176] Is a UDP transport also a ReadTransport/WriteTransport?

2017-08-10 Thread twisteroid ambassador

New submission from twisteroid ambassador:

In docs / Library Reference / asyncio / Transports and Protocols, it is 
mentioned that "asyncio currently implements transports for TCP, UDP, SSL, and 
subprocess pipes. The methods available on a transport depend on the 
transport’s kind." It also lists methods available on a BaseTransport, 
ReadTransport, WriteTransport, DatagramTransport and BaseSubprocessTransport.

However, the docs does not explain which transports have methods from which 
base classes, or in other words which base classes each concrete transport 
class inherits from. And this may not be obvious: for example, a UDP transport 
certainly is a DatagramTransport, but is it also a ReadTransport, or a 
WriteTransport?

(I feel like the answer is "no it isn't", but there are plenty of conflicting 
evidence. The docs show that WriteTransport has write_eof() and can_write_eof() 
-- methods clearly geared towards stream-like transports, and it duplicates 
abort() from DatagramTransport, so it would seem like WriteTransport and 
DatagramTransport are mutually exclusive. On the other hand, the default 
concrete implementation of _SelectorDatagramTransport actually inherits from 
Transport which inherits from both ReadTransport and WriteTransport, yet it 
does not inherit from DatagramTransport; As a result _SelectorDatagramTransport 
has all the methods from ReadTransport and WriteTransport, but many of them 
raise NotImplemented. This is why I'm asking this question in the first place: 
I found that the transport object I got from create_datagram_endpoint() has 
both pause_reading() and resume_reading() methods that raise NotImplemented, 
and thought that perhaps some event loop implementations would have these 
methods working, and I should try to use them. And before you say "UDP doesn't 
do flow control", asyncio actually does provide flow control for UDP on the 
writing end: see 
https://www.mail-archive.com/python-tulip@googlegroups.com/msg00532.html So 
it's not preposterous that there might be flow control on the reading end as 
well.)

I think it would be nice if the documentation can state the methods implemented 
for each type of transport, as the designers of Python intended, so there's a 
clear expectation of what methods will / should be available across different 
implementations of event loops and transports. Something along the lines of 
"The methods available on a transport depend on the transport’s kind: TCP 
transports support methods declared in BaseTransport, ReadTransport and 
WriteTransport below, etc."

--
assignee: docs@python
components: Documentation, asyncio
messages: 300083
nosy: docs@python, twisteroid ambassador, yselivanov
priority: normal
severity: normal
status: open
title: Is a UDP transport also a ReadTransport/WriteTransport?
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

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



[issue31151] test_socketserver: Warning -- reap_children() reaped child process

2017-08-10 Thread STINNER Victor

STINNER Victor added the comment:


New changeset aa8ec34ad52bb3b274ce91169e1bc4a598655049 by Victor Stinner in 
branch 'master':
bpo-31151: Add socketserver.ForkingMixIn.server_close() (#3057)
https://github.com/python/cpython/commit/aa8ec34ad52bb3b274ce91169e1bc4a598655049


--

___
Python tracker 

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



[issue31148] Can we get an MSI installer for something past 3.4.4?

2017-08-10 Thread Steve Dower

Steve Dower added the comment:

Okay, if that's the way you want to go. Be aware that the old MSI code is gone 
though, so rebuilding it will not be trivial. Though if you do, there are a few 
people who would find it more convenient, so you may be able to enlist help 
maintaining it (we didn't get any offers of help, just requests for free work, 
so you may not get it either...)

If you're having trouble with a range of installers, there's a process you can 
run to reset your security policy, which is what I'd suggest doing. I'd have to 
find the details for you, but it basically resets permissions on everything. 
Doesn't delete any files, but may help with this problem. Let me know if you'd 
like me to find the details (requires Windows Pro IIRC, at least pre-Win 10).

--
resolution:  -> works for me
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



[issue31175] Exception while extracting file from ZIP with non-matching file name in central directory

2017-08-10 Thread Tarmo Randel

Tarmo Randel added the comment:

Proposed patch

--
keywords: +patch
Added file: http://bugs.python.org/file47074/zipfile.patch

___
Python tracker 

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



[issue31175] Exception while extracting file from ZIP with non-matching file name in central directory

2017-08-10 Thread Tarmo Randel

New submission from Tarmo Randel:

The problem: miscreants are modifying ZIP file header parts so, that Python 
based automated analysis tools are unable to process the contents of the ZIP 
file but intended clients are able to open the file and extract the possibly 
malicious contents.

Github pull request contains patch addressing the issue so that developer can 
make conscious decision to allow extraction process to complete. Quite 
important feature for security researchers.

--
components: Library (Lib)
files: ZIP_filename_confusion.pdf
messages: 300080
nosy: zyxtarmo
priority: normal
pull_requests: 3094
severity: normal
status: open
title: Exception while extracting file from ZIP with non-matching file name in 
central directory
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file47073/ZIP_filename_confusion.pdf

___
Python tracker 

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



[issue31169] convert_to_error assertion failure in multiprocessing/managers.py

2017-08-10 Thread drallensmith

drallensmith added the comment:

The section in question is:

def convert_to_error(kind, result):
if kind == '#ERROR':
return result
elif kind == '#TRACEBACK':
assert type(result) is str
return  RemoteError(result)
elif kind == '#UNSERIALIZABLE':
assert type(result) is str
return RemoteError('Unserializable message: %s\n' % result)
else:
return ValueError('Unrecognized message type')

--

___
Python tracker 

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



[issue31169] convert_to_error assertion failure in multiprocessing/managers.py

2017-08-10 Thread drallensmith

drallensmith added the comment:

Correction - 2.7.9 - Travis seems to be a bit behind. Here's one from 3.6.2:

Traceback (most recent call last):
  File "/opt/python/3.6.2/lib/python3.6/multiprocessing/process.py", line 249, 
in _bootstrap
self.run()
  File "/opt/python/3.6.2/lib/python3.6/multiprocessing/process.py", line 93, 
in run
self._target(*self._args, **self._kwargs)
  File "/home/travis/build/drallensmith/neat-python/tests/test_distributed.py", 
line 412, in run_secondary
de.start(secondary_wait=3, exit_on_stop=True)
  File "/home/travis/build/drallensmith/neat-python/neat/distributed.py", line 
414, in start
self._secondary_loop(reconnect_max_time=reconnect_max_time)
  File "/home/travis/build/drallensmith/neat-python/neat/distributed.py", line 
616, in _secondary_loop
self.outqueue.put(res)
  File "", line 2, in put
  File "/opt/python/3.6.2/lib/python3.6/multiprocessing/managers.py", line 772, 
in _callmethod
raise convert_to_error(kind, result)
AssertionError
Process Child evaluation process (multiple workers):
Traceback (most recent call last):
  File "/opt/python/3.6.2/lib/python3.6/multiprocessing/process.py", line 249, 
in _bootstrap
self.run()
  File "/opt/python/3.6.2/lib/python3.6/multiprocessing/process.py", line 93, 
in run
self._target(*self._args, **self._kwargs)
  File "/home/travis/build/drallensmith/neat-python/tests/test_distributed.py", 
line 412, in run_secondary
de.start(secondary_wait=3, exit_on_stop=True)
  File "/home/travis/build/drallensmith/neat-python/neat/distributed.py", line 
414, in start
self._secondary_loop(reconnect_max_time=reconnect_max_time)
  File "/home/travis/build/drallensmith/neat-python/neat/distributed.py", line 
616, in _secondary_loop
self.outqueue.put(res)
  File "", line 2, in put
  File "/opt/python/3.6.2/lib/python3.6/multiprocessing/managers.py", line 772, 
in _callmethod
raise convert_to_error(kind, result)
AssertionError

--

___
Python tracker 

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



  1   2   >