1. 01 Dec, 2017 8 commits
    • Victor Stinner's avatar
      bpo-32030: Don't call _PyPathConfig_Fini() in Py_FinalizeEx() (#4667) · ebac19da
      Victor Stinner authored
      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 authored
      * _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 authored
      * 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
    • John Chen's avatar
      8f5c28b1
    • xdegaye's avatar
      bpo-28668: test.support.requires_multiprocessing_queue is removed (GH-4560) · bf2b65e4
      xdegaye authored
      Skip tests with test.support.import_module('multiprocessing.synchronize')
      instead when the semaphore implementation is broken or missing.
      bf2b65e4
    • Serhiy Storchaka's avatar
    • Serhiy Storchaka's avatar
      bpo-10544: Deprecate "yield" in comprehensions and generator expressions. (GH-4579) · 73a7e9b1
      Serhiy Storchaka authored
      The current behaviour of yield expressions inside comprehensions  and
      generator expressions is essentially an accident of implementation - it
      arises implicitly from the way the compiler handles yield expressions inside
      nested functions and generators.
      
      Since the current behaviour wasn't deliberately designed, and is inherently
      confusing, we're deprecating it, with no current plans to reintroduce it.
      Instead, our advice will be to use a named nested generator definition
      for cases where this behaviour is desired.
      73a7e9b1
    • Nir Soffer's avatar
      bpo-32186: Release the GIL during lseek and fstat (#4652) · 6a894816
      Nir Soffer authored
      In _io_FileIO_readall_impl(), lseek() and _Py_fstat_noraise() were called
      without releasing the GIL. This can cause all threads to hang for
      unlimited time when calling FileIO.read() and the NFS server is not
      accessible.
      6a894816
  2. 30 Nov, 2017 9 commits
  3. 29 Nov, 2017 10 commits
  4. 28 Nov, 2017 13 commits