jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] ModuleDeprecationWrapper: Expose __dict__ ......................................................................
[FIX] ModuleDeprecationWrapper: Expose __dict__
As the documentation is using the `__dict__` attribute to determine what to document the `ModuleDeprecationWrapper` is copying the module's dictionary.
Bug: T74424 Change-Id: I14260be9daca09c32e6755777dd03250fed7dd81 --- M pywikibot/tools/__init__.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py index 2f77338..1abf204 100644 --- a/pywikibot/tools/__init__.py +++ b/pywikibot/tools/__init__.py @@ -1452,7 +1452,7 @@ module = sys.modules[module] super(ModuleDeprecationWrapper, self).__setattr__('_deprecated', {}) super(ModuleDeprecationWrapper, self).__setattr__('_module', module) - super(ModuleDeprecationWrapper, self).__setattr__('__doc__', module.__doc__) + self.__dict__.update(module.__dict__)
if __debug__: sys.modules[module.__name__] = self
pywikibot-commits@lists.wikimedia.org