1. 27 May, 2019 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-36763: Implement the PEP 587 (GH-13592) · 331a6a56
      Victor Stinner yazdı
      * Add a whole new documentation page:
        "Python Initialization Configuration"
      * PyWideStringList_Append() return type is now PyStatus,
        instead of int
      * PyInterpreterState_New() now calls PyConfig_Clear() if
        PyConfig_InitPythonConfig() fails.
      * Rename files:
      
        * Python/coreconfig.c => Python/initconfig.c
        * Include/cpython/coreconfig.h => Include/cpython/initconfig.h
        * Include/internal/: pycore_coreconfig.h => pycore_initconfig.h
      
      * Rename structures
      
        * _PyCoreConfig => PyConfig
        * _PyPreConfig => PyPreConfig
        * _PyInitError => PyStatus
        * _PyWstrList => PyWideStringList
      
      * Rename PyConfig fields:
      
        * use_module_search_paths => module_search_paths_set
        * module_search_path_env => pythonpath_env
      
      * Rename PyStatus field: _func => func
      * PyInterpreterState: rename core_config field to config
      * Rename macros and functions:
      
        * _PyCoreConfig_SetArgv() => PyConfig_SetBytesArgv()
        * _PyCoreConfig_SetWideArgv() => PyConfig_SetArgv()
        * _PyCoreConfig_DecodeLocale() => PyConfig_SetBytesString()
        * _PyInitError_Failed() => PyStatus_Exception()
        * _Py_INIT_ERROR_TYPE_xxx enums => _PyStatus_TYPE_xxx
        * _Py_UnixMain() => Py_BytesMain()
        * _Py_ExitInitError() => Py_ExitStatusException()
        * _Py_PreInitializeFromArgs() => Py_PreInitializeFromBytesArgs()
        * _Py_PreInitializeFromWideArgs() => Py_PreInitializeFromArgs()
        * _Py_PreInitialize() => Py_PreInitialize()
        * _Py_RunMain() => Py_RunMain()
        * _Py_InitializeFromConfig() => Py_InitializeFromConfig()
        * _Py_INIT_XXX() => _PyStatus_XXX()
        * _Py_INIT_FAILED() => _PyStatus_EXCEPTION()
      
      * Rename 'err' PyStatus variables to 'status'
      * Convert RUN_CODE() macro to config_run_code() static inline function
      * Remove functions:
      
        * _Py_InitializeFromArgs()
        * _Py_InitializeFromWideArgs()
        * _PyInterpreterState_GetCoreConfig()
      331a6a56
  2. 14 May, 2019 1 kayıt (commit)
  3. 25 Şub, 2019 1 kayıt (commit)
  4. 12 Kas, 2018 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-35081: Rename internal headers (GH-10275) · 621cebe8
      Victor Stinner yazdı
      Rename Include/internal/ headers:
      
      * pycore_hash.h -> pycore_pyhash.h
      * pycore_lifecycle.h -> pycore_pylifecycle.h
      * pycore_mem.h -> pycore_pymem.h
      * pycore_state.h -> pycore_pystate.h
      
      Add missing headers to Makefile.pre.in and PCbuild:
      
      * pycore_condvar.h.
      * pycore_hamt.h
      * pycore_pyhash.h
      621cebe8
  5. 31 Eki, 2018 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-35081: Add pycore_ prefix to internal header files (GH-10263) · 27e2d1f2
      Victor Stinner yazdı
      * Rename Include/internal/ header files:
      
        * pyatomic.h -> pycore_atomic.h
        * ceval.h -> pycore_ceval.h
        * condvar.h -> pycore_condvar.h
        * context.h -> pycore_context.h
        * pygetopt.h -> pycore_getopt.h
        * gil.h -> pycore_gil.h
        * hamt.h -> pycore_hamt.h
        * hash.h -> pycore_hash.h
        * mem.h -> pycore_mem.h
        * pystate.h -> pycore_state.h
        * warnings.h -> pycore_warnings.h
      
      * PCbuild project, Makefile.pre.in, Modules/Setup: add the
        Include/internal/ directory to the search paths of header files.
      * Update includes. For example, replace #include "internal/mem.h"
        with #include "pycore_mem.h".
      27e2d1f2
  6. 30 Eki, 2018 1 kayıt (commit)
  7. 10 Eyl, 2018 1 kayıt (commit)
  8. 03 Agu, 2018 1 kayıt (commit)
  9. 29 Nis, 2018 1 kayıt (commit)
  10. 17 Mar, 2018 1 kayıt (commit)
  11. 14 Ara, 2017 1 kayıt (commit)
  12. 19 Eyl, 2017 1 kayıt (commit)
  13. 14 Eyl, 2017 2 kayıt (commit)
    • Eric Snow's avatar
      bpo-28411: Isolate PyInterpreterState.modules (#3575) · d393c1b2
      Eric Snow yazdı
      A bunch of code currently uses PyInterpreterState.modules directly instead of PyImport_GetModuleDict(). This complicates efforts to make changes relative to sys.modules. This patch switches to using PyImport_GetModuleDict() uniformly. Also, a number of related uses of sys.modules are updated for uniformity for the same reason.
      
      Note that this code was already reviewed and merged as part of #1638. I reverted that and am now splitting it up into more focused parts.
      d393c1b2
    • Eric Snow's avatar
      bpo-31404: Revert "remove modules from Py_InterpreterState (#1638)" (#3565) · 93c92f7d
      Eric Snow yazdı
      PR #1638, for bpo-28411, causes problems in some (very) edge cases. Until that gets sorted out, we're reverting the merge. PR #3506, a fix on top of #1638, is also getting reverted.
      93c92f7d
  14. 08 Eyl, 2017 1 kayıt (commit)
    • Eric Snow's avatar
      bpo-30860: Consolidate stateful runtime globals. (#3397) · 2ebc5ce4
      Eric Snow yazdı
      * group the (stateful) runtime globals into various topical structs
      * consolidate the topical structs under a single top-level _PyRuntimeState struct
      * add a check-c-globals.py script that helps identify runtime globals
      
      Other globals are excluded (see globals.txt and check-c-globals.py).
      2ebc5ce4
  15. 04 Eyl, 2017 1 kayıt (commit)
  16. 19 Mar, 2017 1 kayıt (commit)
  17. 21 Kas, 2016 1 kayıt (commit)
  18. 20 Kas, 2016 2 kayıt (commit)
  19. 16 Kas, 2016 1 kayıt (commit)
  20. 26 Eyl, 2016 1 kayıt (commit)
  21. 21 Agu, 2016 1 kayıt (commit)
  22. 19 Agu, 2016 1 kayıt (commit)
  23. 06 Nis, 2016 1 kayıt (commit)
  24. 24 Ara, 2015 1 kayıt (commit)
  25. 23 May, 2015 2 kayıt (commit)
    • Nick Coghlan's avatar
      Issue #24268: Address some PEP 489 refleaks · a48db2bc
      Nick Coghlan yazdı
      - missing DECREF in PyModule_FromDefAndSpec2
      - missing DECREF in PyType_FromSpecAndBases2
      - missing DECREF in _testmultiphase module
      
      Patch by Petr Viktorin
      a48db2bc
    • Nick Coghlan's avatar
      PEP 489: Multi-phase extension module initialization · d5cacbb1
      Nick Coghlan yazdı
      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.
      d5cacbb1
  26. 18 Mar, 2015 1 kayıt (commit)
  27. 24 Nis, 2014 3 kayıt (commit)
  28. 12 Şub, 2014 2 kayıt (commit)
  29. 10 Şub, 2014 2 kayıt (commit)
  30. 22 Kas, 2013 1 kayıt (commit)
  31. 31 Tem, 2013 1 kayıt (commit)
  32. 04 May, 2013 1 kayıt (commit)
    • Brett Cannon's avatar
      #17115,17116: Have modules initialize the __package__ and __loader__ · 4c14b5de
      Brett Cannon yazdı
      attributes to None.
      
      The long-term goal is for people to be able to rely on these
      attributes existing and checking for None to see if they have been
      set. Since import itself sets these attributes when a loader does not
      the only instances when the attributes are None are from someone
      overloading __import__() and not using a loader or someone creating a
      module from scratch.
      
      This patch also unifies module initialization. Before you could have
      different attributes with default values depending on how the module
      object was created. Now the only way to not get the same default set
      of attributes is to circumvent initialization by calling
      ModuleType.__new__() directly.
      4c14b5de
  33. 19 Tem, 2012 1 kayıt (commit)