Staging
v0.8.1
https://github.com/python/cpython
Revision d5cacbb1d9c3edc02bf0ba01702e7c06da5bc318 authored by Nick Coghlan on 23 May 2015, 12:24:10 UTC, committed by Nick Coghlan on 23 May 2015, 12:24:10 UTC
Known limitations of the current implementation:

- documentation changes are incomplete
- there's a reference leak I haven't tracked down yet

The leak is most visible by running:

  ./python -m test -R3:3 test_importlib

However, you can also see it by running:

  ./python -X showrefcount

Importing the array or _testmultiphase modules, and
then deleting them from both sys.modules and the local
namespace shows significant increases in the total
number of active references each cycle. By contrast,
with _testcapi (which continues to use single-phase
initialisation) the global refcounts stabilise after
a couple of cycles.
1 parent ec219ba
History
Tip revision: d5cacbb1d9c3edc02bf0ba01702e7c06da5bc318 authored by Nick Coghlan on 23 May 2015, 12:24:10 UTC
PEP 489: Multi-phase extension module initialization
Tip revision: d5cacbb
File Mode Size
README -rw-r--r-- 67 bytes
_freeze_importlib.c -rw-r--r-- 4.4 KB
_testembed.c -rw-r--r-- 3.8 KB
python.c -rw-r--r-- 1.9 KB

README

back to top