[issue33976] Enums don't support nested classes

2018-06-27 Thread Ethan Furman


Ethan Furman  added the comment:

Edward, thank you for taking the time to submit a patch, complete with tests!

Do you have a real-world example of why Enum should work this way?

--
assignee:  -> ethan.furman
nosy: +barry, eli.bendersky, ethan.furman

___
Python tracker 

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



[issue24567] random.choice IndexError due to double-rounding

2018-06-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I concur with Tim.  Marking the original bug as "won't fix" for the reasons 
that he listed.

In a separate PR, I'll modify the last line random.choices() to be "return 
[population[bisect(cum_weights, random() * total, 0, hi)] for i in range(k)]".  
That will make the function more robust (handling the exotic case with 
subnormal weights).

--
resolution:  -> wont fix
stage: needs patch -> 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



[issue33976] Enums don't support nested classes

2018-06-27 Thread Edward Wang


Edward Wang  added the comment:

Ethan - thank you for your speedy response!

For an example you can see 
https://github.com/ucb-bar/hammer/blob/97021bc7e1c819747f8b8b6d4b8c76cdc6a488e3/src/hammer-vlsi/hammer_vlsi_impl.py#L195
 - the ObstructionType enum is really only used inside PlacementConstraintType, 
so it was thought to be logical to nest ObstructionType inside 
PlacementConstraintType and reference it as 
PlacementConstraintType.ObstructionType.

It just seemed weird that inline class definitions inside an Enum get treated 
as an enum value while functions defined inside Enums are treated as methods - 
as a user it would make more sense to have them both treated the same way (not 
as enum values), I think.

--

___
Python tracker 

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



[issue17496] OS X test for Tk availability in runtktests.py doesn't work

2018-06-27 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Do the tests work properly from an installed python framework? 

That doesn't immediately help with the normal way of running tests, but might 
point to a way forward. The major difference with normal installs is that the 
python interpreter is started in a minimal .app bundle, which leads to better 
behaviour of Apple's GUI frameworks.

--

___
Python tracker 

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



[issue24567] random.choice IndexError due to double-rounding

2018-06-27 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +7561

___
Python tracker 

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



[issue33968] os.makedirs and empty string

2018-06-27 Thread Carl Andersson


Carl Andersson  added the comment:

That is in essence what I am looking for, yes.

As you say, it's not pretty. My opinion is still that if the os.path convention 
is that '' is the same as '.', this should be respected.

--

___
Python tracker 

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



[issue24567] random.choice IndexError due to double-rounding

2018-06-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7562

___
Python tracker 

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



[issue24567] random.choice IndexError due to double-rounding

2018-06-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset ddf7171911e117aa7ad4b0f9ded4f0c3a4ca0fec by Raymond Hettinger in 
branch 'master':
bpo-24567: Random subnormal.diff (#7954)
https://github.com/python/cpython/commit/ddf7171911e117aa7ad4b0f9ded4f0c3a4ca0fec


--

___
Python tracker 

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



[issue24567] random.choice IndexError due to double-rounding

2018-06-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7563

___
Python tracker 

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



[issue33939] Provide a robust O(1) mechanism to check for infinite iterators

2018-06-27 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Downside of __infinite_iterator__: another additional attribute to look up, and 
its functionality overlaps with __length_hint__.  I'd rather have a special 
return value for __length_hint__ (e.g. -1, -2, whatever).

--
nosy: +pitrou

___
Python tracker 

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



[issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


--
keywords: +patch
pull_requests: +7564

___
Python tracker 

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



[issue24567] random.choice IndexError due to double-rounding

2018-06-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 0eaf7b975bd61169a8d78945d2d12f23299f61a8 by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.7':
bpo-24567: Random subnormal.diff (GH-7954) (GH-7955)
https://github.com/python/cpython/commit/0eaf7b975bd61169a8d78945d2d12f23299f61a8


--

___
Python tracker 

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



[issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f15f66d275d1166839312c9ff3a67c00b486c7d6 by Victor Stinner in 
branch 'master':
bpo-30317, test_multiprocessing: fix test_timeout() (GH-7957)
https://github.com/python/cpython/commit/f15f66d275d1166839312c9ff3a67c00b486c7d6


--

___
Python tracker 

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



[issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot

2018-06-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7565

___
Python tracker 

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



[issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot

2018-06-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7566

___
Python tracker 

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



[issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

Note: Python 2.7 doesn't have the test_timeout() test on queues.

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



[issue33977] [Windows] test_compileall fails randomly with PermissionError: [WinError 5] Access is denied: (...).pyc

2018-06-27 Thread STINNER Victor


New submission from STINNER Victor :

http://buildbot.python.org/all/#/builders/130/builds/87

==
FAIL: test_no_args_respects_force_flag (test.test_compileall.CommandLineTests)
--
Traceback (most recent call last):
  File 
"C:\buildbot.python.org\3.7.kloth-win64\build\lib\test\test_compileall.py", 
line 301, in test_no_args_respects_force_flag
self.assertRunOK('-f', PYTHONPATH=self.directory)
  File 
"C:\buildbot.python.org\3.7.kloth-win64\build\lib\test\test_compileall.py", 
line 252, in assertRunOK
*self._get_run_args(args), **env_vars)
  File 
"C:\buildbot.python.org\3.7.kloth-win64\build\lib\test\support\script_helper.py",
 line 157, in assert_python_ok
return _assert_python(True, *args, **env_vars)
  File 
"C:\buildbot.python.org\3.7.kloth-win64\build\lib\test\support\script_helper.py",
 line 143, in _assert_python
res.fail(cmd_line)
  File 
"C:\buildbot.python.org\3.7.kloth-win64\build\lib\test\support\script_helper.py",
 line 84, in fail
err))
AssertionError: Process return code is 1
command line: 
['C:\\buildbot.python.org\\3.7.kloth-win64\\build\\PCbuild\\amd64\\python_d.exe',
 '-X', 'faulthandler', '-S', '-m', 'compileall', '-f']

stdout:
---
(...)
Compiling 'C:\\buildbot.python.org\\3.7.kloth-win64\\build\\lib\\sndhdr.py'...
Compiling 'C:\\buildbot.python.org\\3.7.kloth-win64\\build\\lib\\socket.py'...
*** PermissionError: [WinError 5] Access is denied: 
'C:\\buildbot.python.org\\3.7.kloth-win64\\build\\lib\\__pycache__\\socket.cpython-37.pyc.30129088'
 -> 
'C:\\buildbot.python.org\\3.7.kloth-win64\\build\\lib\\__pycache__\\socket.cpython-37.pyc'
Compiling (...)
(...)
---

--
components: Tests, Windows
messages: 320558
nosy: paul.moore, steve.dower, tim.golden, vstinner, zach.ware
priority: normal
severity: normal
status: open
title: [Windows] test_compileall fails randomly with PermissionError: [WinError 
5] Access is denied: (...).pyc
versions: Python 3.8

___
Python tracker 

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



[issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot

2018-06-27 Thread miss-islington


miss-islington  added the comment:


New changeset 8eac0b8ed56115a1aa315f171b61e7164c6fbeb4 by Miss Islington (bot) 
in branch '3.7':
bpo-30317, test_multiprocessing: fix test_timeout() (GH-7957)
https://github.com/python/cpython/commit/8eac0b8ed56115a1aa315f171b61e7164c6fbeb4


--
nosy: +miss-islington

___
Python tracker 

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



[issue33978] logging.config.dictConfig with file handler leaks resources

2018-06-27 Thread Géry

New submission from Géry :

Calling logging.config.dictConfig several times with a file handler in the same 
Python process leaks resources.

INPUT:

$ python3 -Wall <
  self.common_logger_config(root, config, incremental)

--
components: Library (Lib)
messages: 320560
nosy: maggyero
priority: normal
severity: normal
status: open
title: logging.config.dictConfig with file handler leaks resources
type: resource usage
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



[issue30317] test_timeout() of test_multiprocessing_spawn.WithManagerTestBarrier fails randomly on x86 Windows7 3.x buildbot

2018-06-27 Thread miss-islington


miss-islington  added the comment:


New changeset 6abf8c171760209d95e8a1ff28c211ae541e29ce by Miss Islington (bot) 
in branch '3.6':
bpo-30317, test_multiprocessing: fix test_timeout() (GH-7957)
https://github.com/python/cpython/commit/6abf8c171760209d95e8a1ff28c211ae541e29ce


--

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

Another example of project affected by this regression: fontforge
https://bugzilla.redhat.com/show_bug.cgi?id=1595421

--

___
Python tracker 

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



[issue24567] random.choice IndexError due to double-rounding

2018-06-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset acda5ea916f4233ab90ca7b4d28af735aa962af3 by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.6':
bpo-24567: Random subnormal.diff (GH-7954) (GH-7956)
https://github.com/python/cpython/commit/acda5ea916f4233ab90ca7b4d28af735aa962af3


--

___
Python tracker 

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



[issue33977] [Windows] test_compileall fails randomly with PermissionError: [WinError 5] Access is denied: (...).pyc

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-20760 which seems to be a duplicate but doesn't have the full 
output (stdout is missing).

--

___
Python tracker 

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



[issue33929] test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2cc9d21fffb8146d30e6fb4221e32410ba4b4ab7 by Victor Stinner in 
branch 'master':
bpo-33929: multiprocessing: fix handle leak on race condition (GH-7921)
https://github.com/python/cpython/commit/2cc9d21fffb8146d30e6fb4221e32410ba4b4ab7


--

___
Python tracker 

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



[issue33929] test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows

2018-06-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7567

___
Python tracker 

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



[issue33929] test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

Python 2.7 is not affected: it doesn't use DuplicateHandle() with 
DUPLICATE_CLOSE_SOURCE.

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



[issue33929] test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7568

___
Python tracker 

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



[issue33939] Provide a robust O(1) mechanism to check for infinite iterators

2018-06-27 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

After more thought, I'm no longer convinced this would be useful.  Infinite is 
just a special case of "bigger or slower than convenient".  In a way, 
min(count()) is no more interesting than min(range(1_000_000_000_000)) or 
min(slow_data_source()).

--

___
Python tracker 

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



[issue33939] Provide a robust O(1) mechanism to check for infinite iterators

2018-06-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> Infinite is just a special case of "bigger or slower than convenient".

I have the same opinion.

--

___
Python tracker 

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



[issue33929] test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows

2018-06-27 Thread miss-islington


miss-islington  added the comment:


New changeset 8b1ebcd7cb3319273ea635df78ebf9ad40171514 by Miss Islington (bot) 
in branch '3.7':
bpo-33929: multiprocessing: fix handle leak on race condition (GH-7921)
https://github.com/python/cpython/commit/8b1ebcd7cb3319273ea635df78ebf9ad40171514


--
nosy: +miss-islington

___
Python tracker 

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



[issue33929] test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7569

___
Python tracker 

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



[issue33929] test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7570

___
Python tracker 

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



[issue33979] Display type of not JSON serializable object

2018-06-27 Thread Vincent Lefoulon


New submission from Vincent Lefoulon :

When we call `json.dumps` on a non JSON serializable object, we obtain an error:

```
TypeError: 4 is not JSON serializable
```

Here, 4 was actually a `numpy.int64` object and not a native int. But it is not 
explicit in the error message. We should mention the type of the object as well:

```
TypeError: 4 of type numpy.int64 is not JSON serializable
```

--
messages: 320570
nosy: Vayel
priority: normal
severity: normal
status: open
title: Display type of not JSON serializable object
type: enhancement
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



[issue33979] [Exception message] Display type of not JSON serializable object

2018-06-27 Thread Vincent Lefoulon


Change by Vincent Lefoulon :


--
title: Display type of not JSON serializable object -> [Exception message] 
Display type of not JSON serializable object

___
Python tracker 

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



[issue33979] [Exception message] Display type of not JSON serializable object

2018-06-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This already changed in issue26623 and issue24641.

Python 3.5 now gets only security fixes.

--
nosy: +serhiy.storchaka
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



[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2018-06-27 Thread twisteroid ambassador


twisteroid ambassador  added the comment:

Turns out my typo when preparing the pull request had another victim: the 
changelog entries in documentation currently links to the wrong issue. I'll 
make a PR to fix that typo; since it's just documentation, hopefully it can 
still get into Python 3.6.6 and 3.7.0.

--

___
Python tracker 

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



[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2018-06-27 Thread twisteroid ambassador


Change by twisteroid ambassador :


--
pull_requests: +7571

___
Python tracker 

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



[issue33966] test_multiprocessing_spawn.WithProcessesTestPool.test_traceback() leaks 4 handles on Windows

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue33980] SSL Error when uploading package to your own pypi

2018-06-27 Thread javi


New submission from javi :

Hi

I am trying to upload a package to a local Pypi repo i have created, and when 
trying to do it, im having an ssl error since this repository is under a self 
signed certificate



Using pip, there is an option, --trusted-host, that you can use to ignore ssl 
validation. Is there a similar option like that when using distutils?

The command i am running is python setup.py sdist upload -r myrepo

Thanks

--
components: Distutils
messages: 320573
nosy: dstufft, eric.araujo, javidr
priority: normal
severity: normal
status: open
title: SSL Error when uploading package to your own pypi
type: crash
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



[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2018-06-27 Thread twisteroid ambassador


twisteroid ambassador  added the comment:

Well, I opened the PR, it shows up here, but there's no reviewer assigned.

--

___
Python tracker 

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



[issue33966] test_multiprocessing_spawn.WithProcessesTestPool.test_traceback() leaks 4 handles on Windows

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7573

___
Python tracker 

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



[issue33929] test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7b5856e7f059748f41f37d00abc76be0807d989d by Victor Stinner in 
branch '3.7':
Revert "bpo-33929: multiprocessing: fix handle leak on race condition 
(GH-7921)" (GH-7963)
https://github.com/python/cpython/commit/7b5856e7f059748f41f37d00abc76be0807d989d


--

___
Python tracker 

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



[issue33929] test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0aab8660cdaa540730994afbce49a146dd779bce by Victor Stinner in 
branch 'master':
bpo-33929: Fix regression in spawn_main() (#7962)
https://github.com/python/cpython/commit/0aab8660cdaa540730994afbce49a146dd779bce


--

___
Python tracker 

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



[issue33929] test_multiprocessing_spawn: WithProcessesTestProcess.test_many_processes() leaks 5 handles on Windows

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

I was decided to only fix the bug in the master branch, since it's a minor bug 
(leak a few handles in a rare case), whereas the backport can introduce 
regressions.
https://github.com/python/cpython/pull/7921#issuecomment-400612321

The bug has been fixed in the master branch, I close the issue.

Sorry for the commit/revert in the 3.7 branch, it's an issue with 
miss-inlington bot (and also my fault!).

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-27 Thread Nick Coghlan


Change by Nick Coghlan :


--
pull_requests: +7574

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-27 Thread Nick Coghlan


Nick Coghlan  added the comment:

https://github.com/python/cpython/pull/7967 amends the docs and adds the 
deprecation notices, but after taking another look at the way Victor's patch 
works, I'm thinking we may not need them: the *new* initialization API remains 
strict about the required state machine transitions, which means that calling 
`Py_Initialize` when only the core has been initialized will fail at the 
_Py_InitializeCore step (as that complains if the core has already been 
initialized).

Similarly, calling _Py_InitializeCore after Py_Initialize still fails, as the 
*only* case that becomes a no-op is specifically Py_InitializeEx, *after* the 
interpreter is fully initialized.

Given that, I think we can just keep Victor's compatibility fix indefinitely, 
and only have the new incremental initialization APIs be strict about the 
expected transitions through the state machine.

--

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-27 Thread Nick Coghlan


Nick Coghlan  added the comment:

I went ahead and closed my PR, as I'm now happy that keeping this behaviour 
isn't going to block anything we want to do for PEP 432.

If we change our minds and decide we want to deprecate the current behaviour 
after all, then we can start that deprecation process in Python 3.8.

--
resolution:  -> fixed
stage: patch review -> 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



[issue33939] Provide a robust O(1) mechanism to check for infinite iterators

2018-06-27 Thread Nick Coghlan


Nick Coghlan  added the comment:

If C level iterator implementations in the standard library natively handled 
Ctrl-C (to cope with naive third party C level iterator consumers), and so did 
C level iterator consumers in the standard library (to cope with with naive 
third party C level iterators), I agree this wouldn't be that useful.

However, if folks are going to actively oppose making it possible for users to 
interrupt tight loops over non-Python iterators that are "bigger or slower than 
convenient" on the grounds of it making the C code more complicated to solve a 
problem they personally consider to be purely theoretical (despite other core 
developers telling them otherwise), then special casing known-infinite 
iterators is better than nothing.

--

___
Python tracker 

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



[issue33939] Provide a robust O(1) mechanism to check for infinite iterators

2018-06-27 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I think being able to handle Ctrl-C would be the right solution here.  Not 
handling Ctrl-C is a problem also for very long but non-infinite iterators.

--

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

Please keep it open until 3.7.0 is released.

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

___
Python tracker 

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



[issue33981] test_asyncio: test_sendfile_close_peer_in_the_middle_of_receiving() logs a big error

2018-06-27 Thread STINNER Victor


New submission from STINNER Victor :

Python 3.8 (master) on Windows 10:

C:\vstinner\python\master>python -m test test_asyncio -m 
test_sendfile_close_peer_in_the_middle_of_receiving -v
Running Debug|x64 interpreter...
== CPython 3.8.0a0 (heads/wip:dd08b85c84, Jun 26 2018, 12:47:56) [MSC v.1914 64 
bit (AMD64)]
== Windows-10-10.0.16299-SP0 little-endian
== cwd: C:\vstinner\python\master\build\test_python_7020
== CPU count: 2
== encodings: locale=cp1252, FS=utf-8
Run tests sequentially
0:00:00 [1/1] test_asyncio
test_sendfile_close_peer_in_the_middle_of_receiving 
(test.test_asyncio.test_events.ProactorEventLoopTests) ... Exception in 
callback _ProactorReadPipeTransport._loop_reading(<_OverlappedF...ne, 64, 
None)>)
handle: )>
Traceback (most recent call last):
  File "C:\vstinner\python\master\lib\asyncio\windows_events.py", line 428, in 
finish_recv
return ov.getresult()
OSError: [WinError 64] The specified network name is no longer available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\vstinner\python\master\lib\asyncio\proactor_events.py", line 255, in 
_loop_reading
data = fut.result()
  File "C:\vstinner\python\master\lib\asyncio\windows_events.py", line 732, in 
_poll
value = callback(transferred, key, ov)
  File "C:\vstinner\python\master\lib\asyncio\windows_events.py", line 432, in 
finish_recv
raise ConnectionResetError(*exc.args)
ConnectionResetError: [WinError 64] The specified network name is no longer 
available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\vstinner\python\master\lib\asyncio\events.py", line 88, in _run
self._context.run(self._callback, *self._args)
  File "C:\vstinner\python\master\lib\asyncio\proactor_events.py", line 282, in 
_loop_reading
self._force_close(exc)
  File "C:\vstinner\python\master\lib\asyncio\proactor_events.py", line 117, in 
_force_close
self._empty_waiter.set_exception(exc)
concurrent.futures._base.InvalidStateError: invalid state
ok
test_sendfile_close_peer_in_the_middle_of_receiving 
(test.test_asyncio.test_events.SelectEventLoopTests) ... ok

--
Ran 2 tests in 0.111s

OK

== Tests result: SUCCESS ==

1 test OK.

Total duration: 453 ms
Tests result: SUCCESS

--
components: asyncio
messages: 320583
nosy: asvetlov, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: test_asyncio: test_sendfile_close_peer_in_the_middle_of_receiving() logs 
a big error
versions: Python 3.8

___
Python tracker 

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



[issue33823] concurrent.futures: cannot specify the number of cores

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Library (Lib) -asyncio
title: A BUG in concurrent/asyncio -> concurrent.futures: cannot specify the 
number of cores

___
Python tracker 

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



[issue33823] concurrent.futures: cannot specify the number of cores

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

The first argument of ProcessPoolExecutor is the maximum number of workers. You 
can use os.cpu_count() to get the number of CPU cores.

https://docs.python.org/dev/library/concurrent.futures.html#concurrent.futures.ProcessPoolExecutor

I don't see anything wrong here, I close the issue.

--
nosy: +vstinner
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue33981] test_asyncio: test_sendfile_close_peer_in_the_middle_of_receiving() logs a big error

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-32710: "test_asyncio leaked [4, 4, 3] memory blocks, sum=11 on 
AMD64 Windows8.1 Refleaks 3.x".

--

___
Python tracker 

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



[issue33833] ProactorEventLoop raises AssertionError

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

> Sometimes when a socket transport under ProactorEventLoop is writing while 
> the peer closes the connection, asyncio logs an AssertionError. 

Would you mind to add an example of such error in this issue?

--

___
Python tracker 

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



[issue33981] test_asyncio: test_sendfile_close_peer_in_the_middle_of_receiving() logs a big error

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

Oh, it's a duplicate of bpo-33834.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Test for ProactorEventLoop logs InvalidStateError

___
Python tracker 

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



[issue33834] Test for ProactorEventLoop logs InvalidStateError

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

bpo-33981 has been marked as a duplicate of this issue. Copy of messages:

msg320583 - (view)  Author: STINNER Victor (vstinner) * (Python committer)  
Date: 2018-06-27 14:26

Python 3.8 (master) on Windows 10:

C:\vstinner\python\master>python -m test test_asyncio -m 
test_sendfile_close_peer_in_the_middle_of_receiving -v
Running Debug|x64 interpreter...
== CPython 3.8.0a0 (heads/wip:dd08b85c84, Jun 26 2018, 12:47:56) [MSC v.1914 64 
bit (AMD64)]
== Windows-10-10.0.16299-SP0 little-endian
== cwd: C:\vstinner\python\master\build\test_python_7020
== CPU count: 2
== encodings: locale=cp1252, FS=utf-8
Run tests sequentially
0:00:00 [1/1] test_asyncio
test_sendfile_close_peer_in_the_middle_of_receiving 
(test.test_asyncio.test_events.ProactorEventLoopTests) ... Exception in 
callback _ProactorReadPipeTransport._loop_reading(<_OverlappedF...ne, 64, 
None)>)
handle: )>
Traceback (most recent call last):
  File "C:\vstinner\python\master\lib\asyncio\windows_events.py", line 428, in 
finish_recv
return ov.getresult()
OSError: [WinError 64] The specified network name is no longer available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\vstinner\python\master\lib\asyncio\proactor_events.py", line 255, in 
_loop_reading
data = fut.result()
  File "C:\vstinner\python\master\lib\asyncio\windows_events.py", line 732, in 
_poll
value = callback(transferred, key, ov)
  File "C:\vstinner\python\master\lib\asyncio\windows_events.py", line 432, in 
finish_recv
raise ConnectionResetError(*exc.args)
ConnectionResetError: [WinError 64] The specified network name is no longer 
available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\vstinner\python\master\lib\asyncio\events.py", line 88, in _run
self._context.run(self._callback, *self._args)
  File "C:\vstinner\python\master\lib\asyncio\proactor_events.py", line 282, in 
_loop_reading
self._force_close(exc)
  File "C:\vstinner\python\master\lib\asyncio\proactor_events.py", line 117, in 
_force_close
self._empty_waiter.set_exception(exc)
concurrent.futures._base.InvalidStateError: invalid state
ok
test_sendfile_close_peer_in_the_middle_of_receiving 
(test.test_asyncio.test_events.SelectEventLoopTests) ... ok

--
Ran 2 tests in 0.111s

OK

== Tests result: SUCCESS ==

1 test OK.

Total duration: 453 ms
Tests result: SUCCESS

msg320586 - (view)  Author: STINNER Victor (vstinner) * (Python committer)  
Date: 2018-06-27 14:30

See also bpo-32710: "test_asyncio leaked [4, 4, 3] memory blocks, sum=11 on 
AMD64 Windows8.1 Refleaks 3.x".

msg320587 - (view)  Author: STINNER Victor (vstinner) * (Python committer)  
Date: 2018-06-27 14:31

Oh, it's a duplicate of bpo-33834.

--
nosy: +vstinner

___
Python tracker 

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



[issue33834] test_asyncio: test_sendfile_close_peer_in_the_middle_of_receiving() of ProactorEventLoop logs InvalidStateError error

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


--
title: Test for ProactorEventLoop logs InvalidStateError -> test_asyncio: 
test_sendfile_close_peer_in_the_middle_of_receiving() of ProactorEventLoop logs 
InvalidStateError error

___
Python tracker 

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



[issue18174] Make regrtest with --huntrleaks check for fd leaks

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7575

___
Python tracker 

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



[issue33939] Provide a robust O(1) mechanism to check for infinite iterators

2018-06-27 Thread Erik Bray


Erik Bray  added the comment:

> Thinking about the generator-iterator case a bit more, "False" would be a bad 
> default for that. Allowing "NotImplemented" to indicate the ambiguous "Might 
> be finite, might be infinite" state, and using that as the default for 
> generator-iterators, would probably make sense.

This is why I suggested the converse--something like __finite_iterator__ 
(nevermind bikeshedding over the name or "yet another dunder method).  This is 
something one would use to mark as iterator as "this is definitely expected to 
terminate at some point, assuming it is correctly implemented".  

If __finite_iterator__ == False, which should be the default, it doesn't 
necessarily mean it is infinite either, it just may or may not be finite, so 
there's no guarantee.

I think that __finite_iterator__ == True is more or less equivalent to 
returning a non-zero value from __length_hint__, whereas __finite_iterator__ == 
False is equivalent to raising NotImplemented for __length_hint__.  Either way 
it means adding __length_hint__ to all iterators, and also (as Nick suggested) 
having a decorator for generators to set the appropriate hint as well.

--

___
Python tracker 

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



[issue33938] Cross compilation fail for ARM

2018-06-27 Thread David


David  added the comment:

After using --with-system-ffi and setting the correct LD_LIBRARY_PATH, it 
worked.

Many thanks for the help!

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



[issue31647] asyncio: StreamWriter write_eof() after close raises mysterious AttributeError

2018-06-27 Thread Ned Deily


Ned Deily  added the comment:


New changeset 4a8b037d2b9c7199890bc5a01b3a40687a5ce2b1 by Ned Deily (twisteroid 
ambassador) in branch 'master':
bpo-31647: Fix bpo typo in NEWS entry. (GH-7964)
https://github.com/python/cpython/commit/4a8b037d2b9c7199890bc5a01b3a40687a5ce2b1


--

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

Python 2.7 terminates the manager process if it takes longer than 200 ms to 
stop (Python 3 uses a limit of 1 second), but test_multiprocessing doesn't test 
the exit code of the manager process and so Python 2.7 is not impacted by this 
bug.

--
versions: +Python 3.6, Python 3.8

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

> I see different options: (...) * Allow -signal.SIGTERM exit code in 
> test_mymanager_context()

When I discussed with Davin, he told me that it's an acceptable solution.

So I wrote the PR 7968 to implement this trivial fix.

--

___
Python tracker 

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



[issue33913] test_multiprocessing_spawn random failures on x86 Windows7 3.6

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

FAIL: test_timeout (test.test_multiprocessing_spawn.WithThreadsTestQueue)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.6.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 883, in test_timeout
self.assertGreaterEqual(delta, 0.170)
AssertionError: 0.16714811325073242 not greater than or equal to 0.17

=> I fixed this one in bpo-30317.

--

___
Python tracker 

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



[issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

I also created bpo-33966: 
"test_multiprocessing_spawn.WithProcessesTestPool.test_traceback() leaks 4 
handles on Windows".

--

___
Python tracker 

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



[issue33982] cgi.FieldStorage doesn't parse QUERY_STRING with POST that is not application/x-www-form-urlencoded

2018-06-27 Thread Daniel Klein


New submission from Daniel Klein :

The documentation says "A form submitted via POST that also has a query string 
will contain both FieldStorage and MiniFieldStorage items." suggesting that I 
can have a query with bost a QUERY_STRING and POST parameters. The code backs 
this up most of the time...

In read_urlencoded() the initial query string is read from STDIN, and 
self.qs_on_post (i.e., env['QUERY_STRING']) is appended to that. This is what 
is called when the CONTENT_TYPE of the POST request is 
application/x-www-form-urlencoded. This leads to a FieldStorage object 
containing a list of MiniFieldStorage objects, like:

FieldStorage(None, None, [MiniFieldStorage('action', 'rate'), 
MiniFieldStorage('seq', '3'), MiniFieldStorage('version', '15')])


However, I am using a webhook interface from Google cloud, and it 
(legitimately!) does a POST with a CONTENT_TYPE of application/json.

When I call cgi.Fieldstorage(), the __init__ routine ultimately calls 
read_single().  This results in a FieldStorage object containing a single 
string as 

FieldStorage(None, None, '{"incident": {"incident_id": 
"0.ktptjso969s0","res...the rest of the JSON')

This results in a few problems.
1) The QUERY_STRING args are not parsed as promised
2) The FeildStorage object does not contain a list, and so will raise 
TypeError, "not indexable" if I try to use most of the other FieldStorage 
methods.

--
components: Library (Lib)
messages: 320597
nosy: Daniel Klein
priority: normal
severity: normal
status: open
title: cgi.FieldStorage doesn't parse QUERY_STRING with POST that is not 
application/x-www-form-urlencoded
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue33974] _stringify handles quoted strings incorrectly

2018-06-27 Thread Gauchj


Gauchj  added the comment:

I tried to display entries from the Windows Registry in a TreeView.

--

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7577

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7578

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset fbd7172325e6ce55b6d5d3d7603e4c1c8a219cb8 by Victor Stinner in 
branch 'master':
bpo-30356: Fix test_mymanager_context() of multiprocessing (GH-7968)
https://github.com/python/cpython/commit/fbd7172325e6ce55b6d5d3d7603e4c1c8a219cb8


--

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

The bug can easily be reproduced on Linux using this change:

diff --git a/Lib/multiprocessing/managers.py b/Lib/multiprocessing/managers.py
index 04df26bac6..3d952407c2 100644
--- a/Lib/multiprocessing/managers.py
+++ b/Lib/multiprocessing/managers.py
@@ -649,7 +649,7 @@ class BaseManager(object):
 except Exception:
 pass
 
-process.join(timeout=1.0)
+process.join(timeout=0.0)
 if process.is_alive():
 util.info('manager still alive')
 if hasattr(process, 'terminate'):

--

___
Python tracker 

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



[issue33715] test_multiprocessing_spawn.test_wait_result() failed on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread miss-islington


miss-islington  added the comment:


New changeset 34f2935dca7bb20cd87e42dc41985cc3d688a735 by Miss Islington (bot) 
in branch '3.7':
bpo-30356: Fix test_mymanager_context() of multiprocessing (GH-7968)
https://github.com/python/cpython/commit/34f2935dca7bb20cd87e42dc41985cc3d688a735


--
nosy: +miss-islington

___
Python tracker 

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



[issue33913] test_multiprocessing_spawn random failures on x86 Windows7 3.6

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue30339] test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue33913] test_multiprocessing_spawn random failures on x86 Windows7 3.6

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-30339 and bpo-33715 (PR 7971).

--

___
Python tracker 

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread miss-islington


miss-islington  added the comment:


New changeset a599323fc7661668a01e9fbb0d2369e62941bdf1 by Miss Islington (bot) 
in branch '3.6':
bpo-30356: Fix test_mymanager_context() of multiprocessing (GH-7968)
https://github.com/python/cpython/commit/a599323fc7661668a01e9fbb0d2369e62941bdf1


--

___
Python tracker 

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



[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2018-06-27 Thread Tô Thị Mai

Tô Thị Mai  added the comment:

Theo tôi có thể hiểu, chúng là "tập hợp con" của nhau chỉ theo nghĩa là VN1 có 
bản đồ rộng nhất của các ký tự, nhưng điều này cũng trùng lặp một phần với các 
ký tự điều khiển C0 và C1 trong các trang mã ISO - có 139 nhân vật bổ sung!

VN2 sau đó cho phép C0 và C1 giữ lại ý nghĩa của ISO-8859 bằng cách hy sinh một 
số nguyên âm (Ezio có lẽ nhớ rằng Ý là Ý trong tiếng Việt - xin lỗi, không thể 
viết nó trong trường hợp trên trong VN2). VN3 sau đó hy sinh nhiều hơn cho một 
số không gian còn lại để có thể sử dụng ứng dụng cụ thể (tiêu chuẩn là rất mơ 
hồ về điều đó);

Văn bản của tiêu chuẩn có thể sao chép được tại https://sondandung.com & 
http://songiaco.com - tuy nhiên, văn bản thiếu một số bảng.

Các tiêu chuẩn bổ sung có cả UCS-2 ánh xạ và tên Unicode của các nhân vật, 
nhưng họ đang ở trong hình ảnh; do đó, nó sẽ là thích hợp hơn để có được bản đồ 
từ đầu ra iconv, nói.

--
nosy: +sondecorpaint

___
Python tracker 

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



[issue25007] Add support of copy protocol to zlib compressors and decompressors

2018-06-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset d2cbfffc842b00b5257aa1c25dbcdeb456b6a249 by Serhiy Storchaka 
(Zackery Spytz) in branch 'master':
bpo-25007: Add copy protocol support to zlib compressors and decompressors 
(GH-7940)
https://github.com/python/cpython/commit/d2cbfffc842b00b5257aa1c25dbcdeb456b6a249


--

___
Python tracker 

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



[issue25007] Add support of copy protocol to zlib compressors and decompressors

2018-06-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you for your contribution Zackery!

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



[issue33968] os.makedirs and empty string

2018-06-27 Thread Emily Morehouse


Emily Morehouse  added the comment:

The os.path conventions do follow, '' and '.' are not treated the same here 
either --

>>> os.path.exists('')
False
>>> os.path.exists('.')
True
>>> os.path.isdir('')
False
>>> os.path.isdir('.')
True

The only os.path function that I see as potentially confusing in this 
discussion is dirname, as that can return an empty string which yields 
unexpected results when used as an argument for other functions.

>>> os.path.dirname('testdir')
''
>>> os.path.dirname('./testdir')
'.'

However, changing this functionality (e.g. os.path.dirname('testdir') returning 
'.') would result in backward-compatibility issues that would not be warranted 
(IMO).


I'll leave the final word to Serhiy to close out as 'not a bug' at his 
discretion.

--
assignee:  -> emilyemorehouse
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30339] test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 64737e9ae2081e529935ecf07f44e89f362d1c4b by Victor Stinner in 
branch 'master':
bpo-33913: Fix test_multiprocessing_main_handling (GH-7972)
https://github.com/python/cpython/commit/64737e9ae2081e529935ecf07f44e89f362d1c4b


--

___
Python tracker 

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



[issue33913] test_multiprocessing_spawn random failures on x86 Windows7 3.6

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 64737e9ae2081e529935ecf07f44e89f362d1c4b by Victor Stinner in 
branch 'master':
bpo-33913: Fix test_multiprocessing_main_handling (GH-7972)
https://github.com/python/cpython/commit/64737e9ae2081e529935ecf07f44e89f362d1c4b


--

___
Python tracker 

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



[issue33913] test_multiprocessing_spawn random failures on x86 Windows7 3.6

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

Python 2.7 is not affected: it doesn't have these tests.

--
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue30339] test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x

2018-06-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7583

___
Python tracker 

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



[issue33913] test_multiprocessing_spawn random failures on x86 Windows7 3.6

2018-06-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7582

___
Python tracker 

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



[issue33715] test_multiprocessing_spawn.test_wait_result() failed on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 492572715aa0f4ddab51f979f7f56465c762227c by Victor Stinner in 
branch 'master':
bpo-33715: Fix multiprocessing test_wait_result() (GH-7971)
https://github.com/python/cpython/commit/492572715aa0f4ddab51f979f7f56465c762227c


--

___
Python tracker 

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



[issue33715] test_multiprocessing_spawn.test_wait_result() failed on x86 Windows7 3.x

2018-06-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7584

___
Python tracker 

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



[issue33715] test_multiprocessing_spawn.test_wait_result() failed on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

Python 2.7 is not affected: it doesn't have the test.

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



[issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

I fixed the test in 3.6, 3.7 and master branches.

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



[issue33715] test_multiprocessing_spawn.test_wait_result() failed on x86 Windows7 3.x

2018-06-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7585

___
Python tracker 

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



[issue33913] test_multiprocessing_spawn random failures on x86 Windows7 3.6

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7586

___
Python tracker 

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



[issue30339] test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x

2018-06-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7587

___
Python tracker 

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



[issue31687] test_semaphore_tracker() of test_multiprocessing_spawn fails randomly (race condition?)

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-33613.

--

___
Python tracker 

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



[issue33613] test_multiprocessing_fork: test_semaphore_tracker_sigint() fails with -W error

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-31687.

--

___
Python tracker 

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



[issue21081] missing vietnamese codec TCVN 5712:1993 in Python

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

Google Translate of msg320603 :-)

As far as I can understand, we are "subset" of each other only in the sense 
that VN1 have extensive map of the characters, but it also overlaps partially 
with control characters C0 and C1 in the page ISO code - 139 additional 
characters!

VN2 then let C0 and C1 retained the meaning of ISO-8859 by sacrificing some 
vowels (Ezio probably remember that Italy is Italy in Vietnamese - sorry, can 
not write it in upper case in VN2 ). VN3 then sacrifice more for some of the 
remaining space can be used for specific applications (standard is very vague 
about it);

Of standard text can be copied at https://sondandung.com & http://songiaco.com 
- however, the text lacks some tables.

The additional criteria including UCS-2 mapping and Unicode names of the 
characters, but they are in the picture; therefore, it would be preferable to 
get a map from the output iconv, said.

--

___
Python tracker 

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



[issue33983] unify types for lib2to3.pytree.Base.children

2018-06-27 Thread John Reese


New submission from John Reese :

When type checking applications using lib2to3, the difference in types for 
lib2to3.pytree.Base.children versus Node.children makes it difficult to accept 
both leaves and nodes and programatically work with child nodes/leaves.  
Base/Leaf both have `children` defined as an empty Tuple, while Node defines it 
as an empty list.  It would be more useful for Base/Leaf to also use an empty 
list, so that the type is the same, regardless of which type of object you are 
given.

--
components: Library (Lib)
messages: 320616
nosy: jreese, lukasz.langa
priority: normal
severity: normal
status: open
title: unify types for lib2to3.pytree.Base.children
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue31463] test_multiprocessing_fork hangs test_subprocess

2018-06-27 Thread STINNER Victor


STINNER Victor  added the comment:

> This hangs reliably for me on master:
> $ ./python -m test.regrtest test_multiprocessing_fork test_subprocess

FYI right now, this command doesn't hang anymore.

> ValueError: signal number 32 out of range

This bug has been fixed by bpo-2.

> Let's take another look at the issue: why does test_subprocess need to know 
> about all child processes, rather than those that were launched during 
> test_subprocess?

This issue should be fixed by my commit 
11045c9d8a21dd9bd182a3939189db02815f9783.

It seems like all issues described here have been fixed and so I close the 
issue. If an issue is not properly fixed, maybe it's better to open a new issue 
since this one has long history and described multiple unrelated bugs.

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



  1   2   >