1. 24 May, 2019 20 commits
  2. 23 May, 2019 11 commits
  3. 22 May, 2019 9 commits
    • Victor Stinner's avatar
      bpo-36829: PyErr_WriteUnraisable() normalizes exception (GH-13507) · df22c03b
      Victor Stinner authored
      PyErr_WriteUnraisable() now creates a traceback object if there is no
      current traceback. Moreover, call PyErr_NormalizeException() and
      PyException_SetTraceback() to normalize the exception value. Ignore
      silently any error.
      df22c03b
    • Victor Stinner's avatar
      bpo-36763: Rename private Python initialization functions (GH-13511) · 5edcf263
      Victor Stinner authored
      * Rename private C functions:
      
        * _Py_Initialize_ReconfigureCore => pyinit_core_reconfigure
        * _Py_InitializeCore_impl => pyinit_core_config
        * _Py_InitializeCore = > pyinit_core
        * _Py_InitializeMainInterpreter => pyinit_main
        * init_python => pyinit_python
      
      * Rename _testembed.c commands: add "test_" prefix.
      5edcf263
    • Paul Monson's avatar
    • Victor Stinner's avatar
      bpo-36763: Add _PyPreConfig._config_init (GH-13481) · 022be02d
      Victor Stinner authored
      * _PyPreConfig_GetGlobalConfig() and  _PyCoreConfig_GetGlobalConfig()
        now do nothing if the configuration was not initialized with
        _PyPreConfig_InitCompatConfig() and _PyCoreConfig_InitCompatConfig()
      * Remove utf8_mode=-2 special case: use utf8_mode=-1 instead.
      * Fix _PyPreConfig_InitPythonConfig():
      
        * isolated = 0 instead of -1
        * use_environment = 1 instead of -1
      
      * Rename _PyConfig_INIT to  _PyConfig_INIT_COMPAT
      * Rename _PyPreConfig_Init() to _PyPreConfig_InitCompatConfig()
      * Rename _PyCoreConfig_Init() to _PyCoreConfig_InitCompatConfig()
      * PyInterpreterState_New() now uses _PyCoreConfig_InitPythonConfig()
        as default configuration, but it's very quickly overriden anyway.
      * _freeze_importlib.c uses _PyCoreConfig_SetString() to set
        program_name.
      * Cleanup preconfig_init_utf8_mode(): cmdline is always non-NULL.
      022be02d
    • Victor Stinner's avatar
      bpo-36829: Add test.support.catch_unraisable_exception() (GH-13490) · e4d300e0
      Victor Stinner authored
      * Copy test_exceptions.test_unraisable() to
        test_sys.UnraisableHookTest().
      * Use catch_unraisable_exception() in test_coroutines,
        test_exceptions, test_generators.
      e4d300e0
    • Sean's avatar
      bpo-24882: Let ThreadPoolExecutor reuse idle threads before creating new thread (#6375) · 904e34d4
      Sean authored
      * Fixes issue 24882
      
      * Add news file entry for change.
      
      * Change test_concurrent_futures.ThreadPoolShutdownTest
      
      Adjust the shutdown test so that, after submitting three jobs
      to the executor, the test checks for less than three threads,
      instead of looking for exactly three threads.
      
      If idle threads are being recycled properly, then we should have
      less than three threads.
      
      * Switched idle count to semaphor, Updated tests
      
      As suggested by reviewer tomMoral, swapped lock-protected counter
      with a semaphore to track the number of unused threads.
      
      Adjusted test_threads_terminate to wait for completiton of the
      previous future before submitting a new one (and checking the
      number of threads used).
      
      Also added a new test to confirm the thread pool can be saturated.
      
      * Updates tests as requested by pitrou.
      
      * Correct minor whitespace error.
      
      * Make test_saturation faster
      904e34d4
    • Sam Martin's avatar
      bpo-33110: Catch errors raised when running add_done_callback on already... · 2a3a2ece
      Sam Martin authored
      bpo-33110: Catch errors raised when running add_done_callback on already completed futures (GH-13141)
      
      Wrap the callback call within the `add_done_callback` function within concurrent.futures, in order to behave in an identical manner to callbacks added to a running future are triggered once it has completed.
      2a3a2ece
    • Michael J. Sullivan's avatar
      bpo-36878: Only allow text after `# type: ignore` if first character ASCII (GH-13504) · d8a82e28
      Michael J. Sullivan authored
      
      
      This disallows things like `# type: ignoreé`, which seems wrong.
      
      Also switch to using Py_ISALNUM for the alnum check, for consistency
      with other code (and maybe correctness re: locale issues?).
      
      
      https://bugs.python.org/issue36878
      d8a82e28
    • Victor Stinner's avatar
      bpo-35907, CVE-2019-9948: urllib rejects local_file:// scheme (GH-13474) · 0c2b6a39
      Victor Stinner authored
      CVE-2019-9948: Avoid file reading as disallowing the unnecessary URL
      scheme in URLopener().open() and URLopener().retrieve()
      of urllib.request.
      Co-Authored-By: default avatarSH <push0ebp@gmail.com>
      0c2b6a39