diff tests/test-demandimport.py.out @ 32448:91a2ec8e7fa0

demandimport: stop overriding __getattribute__() Proxy __dict__ and __doc__ explicitly instead. I'm not sure which is less evil, but this seems slightly simpler than hooking all attribute accesses.
author Yuya Nishihara <yuya@tcha.org>
date Fri, 28 Apr 2017 00:01:22 +0900
parents 252d2260c74e
children b39f0fdb0338
line wrap: on
line diff
--- a/tests/test-demandimport.py.out	Fri Apr 28 23:46:16 2017 +0900
+++ b/tests/test-demandimport.py.out	Fri Apr 28 00:01:22 2017 +0900
@@ -18,6 +18,11 @@
 re = <unloaded module 'sys'>
 re.stderr = <open file '<whatever>', mode 'w' at 0x?>
 re = <proxied module 'sys'>
+pvecproxy = <unloaded module 'pvec'>
+pvecproxy.__doc__ = 'A "pvec" is ...'
+pvecproxy.__name__ = 'mercurial.pvec'
+pvecproxy.__dict__['__name__'] = 'mercurial.pvec'
+pvecproxy = <proxied module 'pvec'>
 contextlib = <unloaded module 'contextlib'>
 contextlib.unknownattr = ImportError: cannot import name unknownattr
 __import__('contextlib', ..., ['unknownattr']) = <module 'contextlib' from '?'>