
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2014-03-20 08:00 byvstinner, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Messages (8) | |||
|---|---|---|---|
| msg214182 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2014-03-20 08:00 | |
Two warnings from pyflakes:diff -r72889bf8531dLib/multiprocessing/spawn.py--- a/Lib/multiprocessing/spawn.py Tue Mar 18 13:21:29 2014 +0100+++ b/Lib/multiprocessing/spawn.py Wed Mar 19 11:49:24 2014 +0100@@ -64,6 +64,7 @@ def freeze_support(): Run code for process object if this in not the main process ''' if is_forking(sys.argv):+ # FIXME: main() is undefined main() sys.exit() diff -r72889bf8531dLib/multiprocessing/synchronize.py--- a/Lib/multiprocessing/synchronize.py Tue Mar 18 13:21:29 2014 +0100+++ b/Lib/multiprocessing/synchronize.py Wed Mar 19 11:50:50 2014 +0100@@ -51,7 +51,6 @@ class SemLock(object): _rand = tempfile._RandomNameSequence() def __init__(self, kind, value, maxvalue, *, ctx):- ctx = ctx or get_context() ctx = ctx.get_context() unlink_now = sys.platform == 'win32' or ctx._name == 'fork' for i in range(100): | |||
| msg214183 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2014-03-20 08:02 | |
Serhiy suggested (msg214136):"Lib/multiprocessing/synchronize.py:Add at the start of the file:from . import get_context"It looks like multiprocessing.get_context() exists, but I don't see how it is defined.For main(), it should maybe be replaced with _main()? | |||
| msg214190 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2014-03-20 08:35 | |
> It looks like multiprocessing.get_context() exists, but I don't see how it> is defined.It is defined by:globals().update((name, getattr(context._default_context, name)) for name in context._default_context.__all__)> For main(), it should maybe be replaced with _main()?_main() has different signature. | |||
| msg214563 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2014-03-23 11:59 | |
New changeset619331c67638 by Richard Oudkerk in branch '3.4':Issue#20990: Fix issues found by pyflakes for multiprocessing.http://hg.python.org/cpython/rev/619331c67638 | |||
| msg214575 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2014-03-23 13:16 | |
Would it be possible to write a test?Le dimanche 23 mars 2014, Roundup Robot <report@bugs.python.org> a écrit :>> Roundup Robot added the comment:>> New changeset619331c67638 by Richard Oudkerk in branch '3.4':> Issue#20990: Fix issues found by pyflakes for multiprocessing.>http://hg.python.org/cpython/rev/619331c67638>> ----------> nosy: +python-dev>> _______________________________________> Python tracker <report@bugs.python.org <#"http://bugs.python.org/issue20990">http://bugs.python.org/issue20990>> _______________________________________> | |||
| msg214626 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2014-03-23 18:55 | |
New changesetbb6377db0a9e by Richard Oudkerk in branch '3.4':Issue#20990: Correction for619331c67638.http://hg.python.org/cpython/rev/bb6377db0a9e | |||
| msg214732 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2014-03-24 21:30 | |
Can we close this issue? Or Richard wants to write a test? | |||
| msg214855 -(view) | Author: Richard Oudkerk (sbt)*![]() | Date: 2014-03-25 21:47 | |
Testing the is_forking() requires cx_freeze or something similar, so it really cannot go in the test suite.I have tested it manually (after spending too long trying to get cx_freeze to work with a source build).It should be noted that on Unix freezing is currently only compatible with the default 'fork' start method. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:00 | admin | set | github: 65189 |
| 2014-03-25 21:47:19 | sbt | set | status: open -> closed type: behavior messages: +msg214855 resolution: fixed stage: resolved |
| 2014-03-24 21:30:41 | vstinner | set | messages: +msg214732 |
| 2014-03-23 18:55:19 | python-dev | set | messages: +msg214626 |
| 2014-03-23 13:16:51 | vstinner | set | messages: +msg214575 |
| 2014-03-23 11:59:22 | python-dev | set | nosy: +python-dev messages: +msg214563 |
| 2014-03-20 20:24:21 | sbt | set | assignee:sbt |
| 2014-03-20 08:35:24 | serhiy.storchaka | set | messages: +msg214190 |
| 2014-03-20 08:02:35 | vstinner | set | messages: +msg214183 |
| 2014-03-20 08:00:03 | vstinner | create | |