Commit Graph

7 Commits

Author SHA1 Message Date
Yuya Nishihara
07ba7d360b 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.
2017-04-28 00:01:22 +09:00
Yuya Nishihara
7cd4cd9753 demandimport: look for 'mod' suffix as alternative name for module reference
It's widely used in our codebase.
2017-04-28 23:46:16 +09:00
Yuya Nishihara
3bbb35ccf6 demandimport: insert empty line per method
_demandmod class is getting bigger, and I don't want to put more things in
a dense form.
2017-05-01 14:26:56 +09:00
Yuya Nishihara
8bad75346f demandimport: strictly compare identity of proxy object
This looks better, and __eq__() may be overridden in an undesired way.
2017-05-01 13:43:31 +09:00
Siddharth Agarwal
71d917f14d demandimport: add python 3 implementation
This implementation uses the new importlib finder/loader functionality
available in Python 3.5 and up.

# no-check-commit
2017-05-21 12:23:04 -07:00
Siddharth Agarwal
8ffb99bcb0 demandimport: move ignore list to __init__.py
We're going to use the same ignore list for Python 3.
2017-05-21 12:10:53 -07:00
Siddharth Agarwal
a41c665cd6 demandimport: move to separate package
In Python 3, demand loading is per-package. Keeping demandimport in the
mercurial package would disable demand loading for any modules in
mercurial.
2017-05-21 12:10:53 -07:00