-
Notifications
You must be signed in to change notification settings - Fork 935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monkey pluggability enhancements and bugs #1447
Labels
Comments
arcivanov
added a commit
to arcivanov/gevent
that referenced
this issue
Aug 15, 2019
1. `_check_repatching` now merges kwargs into state 2. `_get_patch_all_state` allows to retrieve the patch_all configuration state 3.a `_patch_module` now allows to specific `_package_prefix` parameter that defaults to 'gevent.' 3.b `import_module` is now used in `_patch_module` to allow handling of package names of any depth. 4. `patch_item` and both `patch_modules` now accept argument `_patch_module` for item's `__module__` override. fixes gevent#1447
arcivanov
added a commit
to arcivanov/gevent
that referenced
this issue
Aug 15, 2019
1. `_check_repatching` now merges kwargs into state 2. `_get_patch_all_state` allows to retrieve the patch_all configuration state 3.a `_patch_module` now allows to specific `_package_prefix` parameter that defaults to 'gevent.' 3.b `import_module` is now used in `_patch_module` to allow handling of package names of any depth. 4. `patch_item` and both `patch_modules` now accept argument `_patch_module` for item's `__module__` override. fixes gevent#1447
jamadden
added
Type: Enhancement
We can do better through adding this
Status: in progress
labels
Sep 13, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
_check_repatching
intentionally deleteskwargs
that containpatch_all
settings from external plugins, resulting in loss of state: https://github.com/gevent/gevent/blob/master/src/gevent/monkey.py#L957Similarly, would be nice need to expose that patch_all state to external plugin through public API.
_patch_module
has two problems (https://github.com/gevent/gevent/blob/master/src/gevent/monkey.py#L362):a.
gevent.
is hardcoded.b. the construct is only capable of handling one level, i.e.
gevent.a
. If used withgevent.a.b
, the expression fails to evaluate properly.In cases where an
item
of a module is being reduced it may be necessary to substitute the__module__
of anewitem
during patching to make sure that the pickle encodes the proper module name into its stream, i.e. the name of the module being patched, not the name of the module hosting a patch.Patch is incoming.
The text was updated successfully, but these errors were encountered: