gh-85299: Add note warning about entry point guard for asyncio example#93457
gh-85299: Add note warning about entry point guard for asyncio example#93457gvanrossum merged 5 commits into
Conversation
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
|
Okay, I am beginning to understand the issue. It's due to the process pool example. If I comment out this block of code from the example: # 3. Run in a custom process pool:
with concurrent.futures.ProcessPoolExecutor() as pool:
result = await loop.run_in_executor(
pool, cpu_bound)
print('custom process pool', result)everything is fine. If I leave that in the run (on macOS) fails spectacularly with a I presume that's one of the many reasons not to use ProcessPoolExecutor. :-( I propose to rephrase the note to mention the platform and just link to https://docs.python.org/3/library/multiprocessing.html#the-spawn-and-forkserver-start-methods, not to the change note. |
Sorry, something went wrong.
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
gvanrossum
left a comment
There was a problem hiding this comment.
Thanks!
Sorry, something went wrong.
|
Thanks @slateny for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10. |
Sorry, something went wrong.
|
Thanks @slateny for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, something went wrong.
…example (pythonGH-93457) (cherry picked from commit 79fd6cc) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
|
Let’s see if we can backport this. |
Sorry, something went wrong.
…example (pythonGH-93457) (cherry picked from commit 79fd6cc) Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
* main: (31 commits) pythongh-95913: Move subinterpreter exper removal to 3.11 WhatsNew (pythonGH-98345) pythongh-95914: Add What's New item describing PEP 670 changes (python#98315) Remove unused arrange_output_buffer function from zlibmodule.c. (pythonGH-98358) pythongh-98174: Handle EPROTOTYPE under macOS in test_sendfile_fallback_close_peer_in_the_middle_of_receiving (python#98316) pythonGH-98327: Reduce scope of catch_warnings() in _make_subprocess_transport (python#98333) pythongh-93691: Compiler's code-gen passes location around instead of holding it on the global compiler state (pythonGH-98001) pythongh-97669: Create Tools/build/ directory (python#97963) pythongh-95534: Improve gzip reading speed by 10% (python#97664) pythongh-95913: Forward-port int/str security change to 3.11 What's New in main (python#98344) pythonGH-91415: Mention alphabetical sort ordering in the Sorting HOWTO (pythonGH-98336) pythongh-97930: Merge with importlib_resources 5.9 (pythonGH-97929) pythongh-85525: Remove extra row in doc (python#98337) pythongh-85299: Add note warning about entry point guard for asyncio example (python#93457) pythongh-97527: IDLE - fix buggy macosx patch (python#98313) pythongh-98307: Add docstring and documentation for SysLogHandler.createSocket (pythonGH-98319) pythongh-94808: Cover `PyFunction_GetCode`, `PyFunction_GetGlobals`, `PyFunction_GetModule` (python#98158) pythonGH-94597: Deprecate child watcher getters and setters (python#98215) pythongh-98254: Include stdlib module names in error messages for NameErrors (python#98255) Improve speed. Reduce auxiliary memory to 16.6% of the main array. (pythonGH-98294) [doc] Update logging cookbook with an example of custom handling of levels. (pythonGH-98290) ...
#85299
https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.run_in_executor