monkey: exec scripts in global scope
Commit 59581a8a "Add python 3.5 selectors test, and remove the devpoll selector under 3.5. also update the monkey documentation." Introduced a regression by moving the exec of scripts into a main() function. If the script being run with exec has import statements those are now locally scoped to the main() function which can break the script. It does not appear that this local scoping was intentional so the fix is to exec the script in the global scope, returning the previous behavior. This also requires setting __package__ = None otherwise the script appears to be run in the gevent __package__
Showing
Please register or sign in to comment