1. 04 Eyl, 2018 1 kayıt (commit)
  2. 31 Agu, 2018 1 kayıt (commit)
  3. 25 Tem, 2018 1 kayıt (commit)
  4. 24 Tem, 2018 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-34170: Add _PyCoreConfig.isolated (GH-8417) · d19d8d52
      Victor Stinner yazdı
      * _PyCoreConfig: add isolated and site_import attributes
      * Replace Py_IgnoreEnvironment with config->ignore_environment when
        reading the current configuration
      * _PyCoreConfig_Read() now sets ignore_environment, utf8_mode,
        isolated and site_import from Py_IgnoreEnvironment, Py_UTF8Mode,
        Py_IsolatedFlag and Py_NoSiteFlag
      * _Py_InitializeCore() now sets Py_xxx flags from the configuration
      * pymain_read_conf() now uses _PyCoreConfig_Copy() to save/restore
        the configuration.
      * Rename _disable_importlib of _PyCoreConfig to _install_importlib
      * _PyCoreConfig_SetGlobalConfig() now also set
        Py_HashRandomizationFlag
      * Replace !Py_NoSiteFlag with core_config->site_import
      d19d8d52
  5. 21 Tem, 2018 2 kayıt (commit)
    • Victor Stinner's avatar
      bpo-34170: _PyCoreConfig_Read() leaves Py_IsolatedFlag unchanged (GH-8361) · f2626ce6
      Victor Stinner yazdı
      * _PyCoreConfig_Read() no longer directly modifies Py_IsolatedFlag
        and Py_NoSiteFlag global configuration flags. The function now
        requires two pointers to integer, so these flags can be set later,
        to avoid side effets in _PyCoreConfig_Read().
      * pathconfig_global_init() now leaves Py_IsolatedFlag and
        Py_NoSiteFlag unchanged.
      * Fix pathconfig_global_init(): avoid computing the path
        configuration twice, use _PyCoreConfig_SetPathConfig().
      f2626ce6
    • Victor Stinner's avatar
      bpo-34170: Rework _PyCoreConfig_Read() to avoid side effect (GH-8353) · b1147e43
      Victor Stinner yazdı
      Rework _PyCoreConfig_Read() function which *reads* core configuration
      to not *modify* the path configuration.
      
      A new _PyCoreConfig_SetPathConfig() function now recreates the path
      configuration from the core configuration. This function is now
      called very late in _Py_InitializeCore(), just before calling
      initimport().
      
      Changes:
      
      * Add _PyCoreConfig.dll_path
      * Py_SetPath() now fails with a fatal python error on memory
         allocation failure.
      * Rename _PyPathConfig_Calculate() to _PyPathConfig_Calculate_impl()
      * Replace _PyPathConfig_Init() with _PyPathConfig_Calculate(): the
        function now requires a _PyPathConfig
      * Add _PyPathConfig_SetGlobal() to set the _Py_path_config global
        variable.
      * Add _PyCoreConfig_InitPathConfig(): compute the path configuration
      * Add _PyCoreConfig_SetPathConfig(): set path configuration from core
        configuration
      * Rename wstrlist_append() to _Py_wstrlist_append()
      * _Py_wstrlist_append() now handles integer overflow.
      b1147e43
  6. 15 Haz, 2018 1 kayıt (commit)
  7. 09 Haz, 2018 1 kayıt (commit)
    • Christian Tismer's avatar
      bpo-33738: Fix macros which contradict PEP 384 (GH-7477) · ea62ce7f
      Christian Tismer yazdı
      During development of the limited API support for PySide,
      we saw an error in a macro that accessed a type field.
      
      This patch fixes the 7 errors in the Python headers.
      Macros which were not written as capitals were implemented
      as function.
      
      To do the necessary analysis again, a script was included that
      parses all headers and looks for "->tp_" in serctions which can
      be reached with active limited API.
      
      It is easily possible to call this script as a test.
      
      Error listing:
      
      ../../Include/objimpl.h:243
      #define PyObject_IS_GC(o) (PyType_IS_GC(Py_TYPE(o)) && \
          (Py_TYPE(o)->tp_is_gc == NULL || Py_TYPE(o)->tp_is_gc(o)))
      Action: commented only
      
      ../../Include/objimpl.h:362
      #define PyType_SUPPORTS_WEAKREFS(t) ((t)->tp_weaklistoffset > 0)
      Action: commented only
      
      ../../Include/objimpl.h:364
      #define PyObject_GET_WEAKREFS_LISTPTR(o) \
          ((PyObject **) (((char *) (o)) + Py_TYPE(o)->tp_weaklistoffset))
      Action: commented only
      
      ../../Include/pyerrors.h:143
      #define PyExceptionClass_Name(x) \
           ((char *)(((PyTypeObject*)(x))->tp_name))
      Action: implemented function
      
      ../../Include/abstract.h:593
      #define PyIter_Check(obj) \
          ((obj)->ob_type->tp_iternext != NULL && \
           (obj)->ob_type->tp_iternext != &_PyObject_NextNotImplemented)
      Action: implemented function
      
      ../../Include/abstract.h:713
      #define PyIndex_Check(obj)                              \
          ((obj)->ob_type->tp_as_number != NULL &&            \
           (obj)->ob_type->tp_as_number->nb_index != NULL)
      Action: implemented function
      
      ../../Include/abstract.h:924
      #define PySequence_ITEM(o, i)\
          ( Py_TYPE(o)->tp_as_sequence->sq_item(o, i) )
      Action: commented only
      ea62ce7f
  8. 22 May, 2018 1 kayıt (commit)
  9. 29 Nis, 2018 1 kayıt (commit)
  10. 22 Şub, 2018 2 kayıt (commit)
  11. 18 Şub, 2018 1 kayıt (commit)
  12. 11 Şub, 2018 1 kayıt (commit)
  13. 02 Şub, 2018 1 kayıt (commit)
  14. 31 Ock, 2018 1 kayıt (commit)
  15. 29 Ock, 2018 1 kayıt (commit)
  16. 27 Ock, 2018 1 kayıt (commit)
    • Christian Heimes's avatar
      bpo-31399: Let OpenSSL verify hostname and IP address (#3462) · 61d478c7
      Christian Heimes yazdı
      bpo-31399: Let OpenSSL verify hostname and IP
      
      The ssl module now uses OpenSSL's X509_VERIFY_PARAM_set1_host() and
      X509_VERIFY_PARAM_set1_ip() API to verify hostname and IP addresses.
      
      * Remove match_hostname calls
      * Check for libssl with set1_host, libssl must provide X509_VERIFY_PARAM_set1_host()
      * Add documentation for OpenSSL 1.0.2 requirement
      * Don't support OpenSSL special mode with a leading dot, e.g. ".example.org" matches "www.example.org". It's not standard conform.
      * Add hostname_checks_common_name
      Signed-off-by: 's avatarChristian Heimes <christian@python.org>
      61d478c7
  17. 24 Ock, 2018 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-32030: Add _PyCoreConfig.module_search_paths (#4954) · 8ded5b80
      Victor Stinner yazdı
      _PyCoreConfig_Read() is now responsible to compute sys.path.
      So sys.path is now computed before calling _Py_InitializeCore().
      
      Changes:
      
      * Add module_search_path, module_search_paths, executable, prefix,
        base_prefix, exec_prefix and base_exec_prefix to _PyCoreConfig.
      * _PyMainInterpreterConfig_Read() now only converts wchar_t** lists
        into a Python list, it doesn't compute sys.path anymore.
      8ded5b80
  18. 18 Ock, 2018 1 kayıt (commit)
  19. 09 Ock, 2018 1 kayıt (commit)
  20. 21 Ara, 2017 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-32030: Add _Py_FindEnvConfigValue() (#4963) · 9bee3291
      Victor Stinner yazdı
      Add a new _Py_FindEnvConfigValue() function: code shared between
      Windows and Unix implementations of _PyPathConfig_Calculate() to read
      the pyenv.cfg file.
      
      _Py_FindEnvConfigValue() now uses _Py_DecodeUTF8_surrogateescape()
      instead of using a Python Unicode string, the Python API must not be
      used early during Python initialization. Same change in Unix
      search_for_exec_prefix(): use _Py_DecodeUTF8_surrogateescape().
      
      Cleanup also encode_current_locale(): PyMem_RawFree/PyMem_Free can be
      called with NULL.
      
      Fix also "NUL byte" => "NULL byte" typo.
      9bee3291
  21. 15 Ara, 2017 1 kayıt (commit)
  22. 14 Ara, 2017 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-32030: Rewrite _PyMainInterpreterConfig (#4854) · b5fd9ad0
      Victor Stinner yazdı
      _PyMainInterpreterConfig now contains Python objects, whereas
      _PyCoreConfig contains wchar_t* strings.
      
      Core config:
      
      * Rename _PyMainInterpreterConfig_ReadEnv() to _PyCoreConfig_ReadEnv()
      * Move 3 strings from _PyMainInterpreterConfig to _PyCoreConfig:
        module_search_path_env, home, program_name.
      * Add _PyCoreConfig_Clear()
      * _PyPathConfig_Calculate() now takes core config rather than main
        config
      * _PyMainInterpreterConfig_Read() now requires also a core config
      
      Main config:
      
      * Add _PyMainInterpreterConfig.module_search_path: sys.path list
      * Add _PyMainInterpreterConfig.argv: sys.argv list
      * _PyMainInterpreterConfig_Read() now computes module_search_path
      b5fd9ad0
  23. 12 Ara, 2017 1 kayıt (commit)
  24. 04 Ara, 2017 1 kayıt (commit)
  25. 02 Ara, 2017 2 kayıt (commit)
    • Serhiy Storchaka's avatar
      bpo-32197: Try to fix a compiler error on OS X introduced in bpo-32030. (#4681) · 13badcbc
      Serhiy Storchaka yazdı
      * Revert "bpo-32030: _PyPathConfig_Init() sets home and program_name (#4673)"
      
      This reverts commit af5a8950.
      
      * Revert "bpo-32030: Fix config_get_program_name() on macOS (#4669)"
      
      This reverts commit e23c06e2.
      
      * Revert "bpo-32030: Add Python/pathconfig.c (#4668)"
      
      This reverts commit 0ea395ae.
      
      * Revert "bpo-32030: Don't call _PyPathConfig_Fini() in Py_FinalizeEx() (#4667)"
      
      This reverts commit ebac19da.
      
      * Revert "bpo-32030: Fix Py_GetPath(): init program_name (#4665)"
      
      This reverts commit 9ac3d888.
      13badcbc
    • Victor Stinner's avatar
      bpo-32030: _PyPathConfig_Init() sets home and program_name (#4673) · af5a8950
      Victor Stinner yazdı
      _PyPathConfig_Init() now also initialize home and program_name:
      
      * Rename existing _PyPathConfig_Init() to _PyPathConfig_Calculate().
        Add a new _PyPathConfig_Init() function in pathconfig.c which
        handles the _Py_path_config variable and call
        _PyPathConfig_Calculate().
      * Add home and program_name fields to _PyPathConfig.home
      * _PyPathConfig_Init() now initialize home and program_name
        from main_config
      * Py_SetProgramName(), Py_SetPythonHome() and Py_GetPythonHome() now
        calls Py_FatalError() on failure, instead of silently ignoring
        failures.
      * config_init_home() now gets directly _Py_path_config.home to only
        get the value set by Py_SetPythonHome(), or NULL if
        Py_SetPythonHome() was not called.
      * config_get_program_name() now gets directly
        _Py_path_config.program_name to only get the value set by
        Py_SetProgramName(), or NULL if Py_SetProgramName() was not called.
      * pymain_init_python() doesn't call Py_SetProgramName() anymore,
        _PyPathConfig_Init() now always sets the program name
      * Call _PyMainInterpreterConfig_Read() in
        pymain_parse_cmdline_envvars_impl() to control the memory allocator
      * C API documentation: it's no more safe to call Py_GetProgramName()
        before Py_Initialize().
      af5a8950
  26. 01 Ara, 2017 4 kayıt (commit)
    • Victor Stinner's avatar
      bpo-32030: Add Python/pathconfig.c (#4668) · 0ea395ae
      Victor Stinner yazdı
      * Factorize code from PC/getpathp.c and Modules/getpath.c to remove
        duplicated code
      * rename pathconfig_clear() to _PyPathConfig_Clear()
      * Inline _PyPathConfig_Fini() in pymain_impl() and then remove it,
        since it's a oneliner
      0ea395ae
    • Victor Stinner's avatar
      bpo-32030: Don't call _PyPathConfig_Fini() in Py_FinalizeEx() (#4667) · ebac19da
      Victor Stinner yazdı
      Changes:
      
      * _PyPathConfig_Fini() cannot be called in Py_FinalizeEx().
        Py_Initialize() and Py_Finalize() can be called multiple times, but
        it must not "forget" parameters set by Py_SetProgramName(),
        Py_SetPath() or Py_SetPythonHome(), whereas _PyPathConfig_Fini()
        clear all these parameters.
      * config_get_program_name() and calculate_program_full_path() now
        also decode paths using Py_DecodeLocale() to use the
        surrogateescape error handler, rather than decoding using
        mbstowcs() which is strict.
      * Change _Py_CheckPython3() prototype: () => (void)
      * Truncate a few lines which were too long
      ebac19da
    • Victor Stinner's avatar
      bpo-32030: Fix Py_GetPath(): init program_name (#4665) · 9ac3d888
      Victor Stinner yazdı
      * _PyMainInterpreterConfig_ReadEnv() now sets program_name from
        environment variables and pymain_parse_envvars() implements the
        falls back on argv[0].
      * Remove _PyMain.program_name: use the program_name from
        _PyMainInterpreterConfig
      * Move the Py_SetProgramName() call back to pymain_init_python(),
        just before _Py_InitializeCore().
      * pathconfig_global_init() now also calls
        _PyMainInterpreterConfig_Read() to set program_name if it isn't set
        yet
      * Cleanup PyCalculatePath: pass main_config to subfunctions to get
        directly fields from main_config (home, module_search_path_env and
        program_name)
      9ac3d888
    • Victor Stinner's avatar
      bpo-32030: Cleanup "path config" code (#4663) · b64de46a
      Victor Stinner yazdı
      * Rename PyPathConfig structure to _PyPathConfig and move it to
        Include/internal/pystate.h
      * Rename path_config to _Py_path_config
      * _PyPathConfig: Rename program_name field to program_full_path
      * Add assert(str != NULL); to _PyMem_RawWcsdup(), _PyMem_RawStrdup()
        and _PyMem_Strdup().
      * Rename calculate_path() to pathconfig_global_init(). The function
        now does nothing if it's already initiallized.
      b64de46a
  27. 25 Kas, 2017 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-32030: Add _PyPathConfig_Init() (#4551) · 9316ee4d
      Victor Stinner yazdı
      * Add _PyPathConfig_Init() and _PyPathConfig_Fini()
      * Remove _Py_GetPathWithConfig()
      * _PyPathConfig_Init() returns _PyInitError to allow to handle errors
        properly
      * Add pathconfig_clear()
      * Windows calculate_path_impl(): replace Py_FatalError() with
        _PyInitError
      * Py_FinalizeEx() now calls _PyPathConfig_Fini() to release memory
      * Fix _Py_InitializeMainInterpreter() regression: don't initialize
        path config if _disable_importlib is false
      * PyPathConfig now uses dynamically allocated memory
      9316ee4d
  28. 24 Kas, 2017 4 kayıt (commit)
    • Victor Stinner's avatar
      bpo-32030: Add _PyMainInterpreterConfig.program_name (#4548) · f04ebe2a
      Victor Stinner yazdı
      * Py_Main() now calls Py_SetProgramName() earlier to be able to get
        the program name in _PyMainInterpreterConfig_ReadEnv().
      * Rename prog to program_name
      * Rename progpath to program_name
      f04ebe2a
    • Victor Stinner's avatar
      bpo-32030: Add _PyMainInterpreterConfig_ReadEnv() (#4542) · 46972b7b
      Victor Stinner yazdı
      Py_GetPath() and Py_Main() now call
      _PyMainInterpreterConfig_ReadEnv() to share the same code to get
      environment variables.
      
      Changes:
      
      * Add _PyMainInterpreterConfig_ReadEnv()
      * Add _PyMainInterpreterConfig_Clear()
      * Add _PyMem_RawWcsdup()
      * _PyMainInterpreterConfig: rename pythonhome to home
      * Rename _Py_ReadMainInterpreterConfig() to
        _PyMainInterpreterConfig_Read()
      * Use _Py_INIT_USER_ERR(), instead of _Py_INIT_ERR(), for decoding
        errors: the user is able to fix the issue, it's not a bug in
        Python. Same change was made in _Py_INIT_NO_MEMORY().
      * Remove _Py_GetPythonHomeWithConfig()
      46972b7b
    • Berker Peksag's avatar
      bpo-12239: Make GetProperty() return None for VT_EMPTY (GH-4539) · 19fb1341
      Berker Peksag yazdı
      The previous behavior was to raise an exception
      
          NotImplementedError: result of type 0
      
      when the value of the property is VT_EMPTY.
      19fb1341
    • Berker Peksag's avatar
      bpo-12382: Make OpenDatabase() raise better exception messages (GH-4528) · 4864a619
      Berker Peksag yazdı
      Previously, 'msilib.OpenDatabase()' function raised a
      cryptical exception message when it couldn't open or
      create an MSI file. For example:
      
          Traceback (most recent call last):
            File "<stdin>", line 1, in <module>
          _msi.MSIError: unknown error 6e
      4864a619
  29. 23 Kas, 2017 3 kayıt (commit)
    • Victor Stinner's avatar
      bpo-32030: Rewrite calculate_path() (#4521) · 0327bde9
      Victor Stinner yazdı
      * calculate_path() rewritten in Modules/getpath.c and PC/getpathp.c
      * Move global variables into a new PyPathConfig structure.
      * calculate_path():
      
        * Split the huge calculate_path() function into subfunctions.
        * Add PyCalculatePath structure to pass data between subfunctions.
        * Document PyCalculatePath fields.
        * Move cleanup code into a new calculate_free() subfunction
        * calculate_init() now handles Py_DecodeLocale() failures properly
        * calculate_path() is now atomic: only replace PyPathConfig
          (path_config) at once on success.
      
      * _Py_GetPythonHomeWithConfig() now returns an error on failure
      * Add _Py_INIT_NO_MEMORY() helper: report a memory allocation failure
      * Coding style fixes (PEP 7)
      0327bde9
    • Berker Peksag's avatar
    • Victor Stinner's avatar
      bpo-32030: Add _PyMainInterpreterConfig.pythonhome (#4513) · 1f15111a
      Victor Stinner yazdı
      * Py_Main() now reads the PYTHONHOME environment variable
      * Add _Py_GetPythonHomeWithConfig() private function
      * Add _PyWarnings_InitWithConfig()
      * init_filters() doesn't get the current core configuration from the
        current interpreter or Python thread anymore. Pass explicitly the
        configuration to _PyWarnings_InitWithConfig().
      * _Py_InitializeCore() now fails on _PyWarnings_InitWithConfig()
        failure.
      * Pass configuration as constant
      1f15111a