cpython/Lib/importlib
Yurii Karabas 7301979b23
bpo-42202: Store func annotations as a tuple (GH-23316)
Reduce memory footprint and improve performance of loading modules having many func annotations.

  >>> sys.getsizeof({"a":"int","b":"int","return":"int"})
  232
  >>> sys.getsizeof(("a","int","b","int","return","int"))
  88

The tuple is converted into dict on the fly when `func.__annotations__` is accessed first.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2020-11-25 19:43:18 +09:00
..
__init__.py bpo-42403: Simplify importlib external bootstrap (GH-23397) 2020-11-19 13:43:43 +01:00
_abc.py bpo-41006: importlib.util no longer imports typing (GH-20938) 2020-06-17 23:15:59 +02:00
_bootstrap.py bpo-42403: Use @staticmethod in importlib (GH-23395) 2020-11-20 14:44:02 +01:00
_bootstrap_external.py bpo-42202: Store func annotations as a tuple (GH-23316) 2020-11-25 19:43:18 +09:00
_common.py bpo-41490: ``path`` and ``contents`` to aggressively close handles (#22915) 2020-10-25 14:21:46 -04:00
abc.py bpo-42403: Fix pyflakes warnings in importlib (GH-23396) 2020-11-19 11:20:57 +01:00
machinery.py bpo-42403: Fix pyflakes warnings in importlib (GH-23396) 2020-11-19 11:20:57 +01:00
metadata.py bpo-42089: Sync with current cpython branch of importlib_metadata (GH-22775) 2020-10-19 14:14:21 -07:00
readers.py bpo-41490: ``path`` and ``contents`` to aggressively close handles (#22915) 2020-10-25 14:21:46 -04:00
resources.py bpo-41490: ``path`` and ``contents`` to aggressively close handles (#22915) 2020-10-25 14:21:46 -04:00
util.py bpo-42403: Fix pyflakes warnings in importlib (GH-23396) 2020-11-19 11:20:57 +01:00