You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In cases where an item of a module is being reduced it may be necessary to substitute the __module__ of a newitem 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:
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.
fixesgevent#1447
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.
fixesgevent#1447
_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: