1. 12 Nis, 2019 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-36611: Fix test_sys.test_getallocatedblocks() (GH-12797) · 9b8314cf
      Victor Stinner yazdı
      Fix test_sys.test_getallocatedblocks() when tracemalloc is enabled.
      If the name of Python memory allocators cannot get read, consider
      that pymalloc is disabled.
      
      Fix the following error:
      
      ./python -X tracemalloc -m test test_sys -v -m test_getallocatedblocks
      
      ERROR: test_getallocatedblocks (test.test_sys.SysModuleTest)
      ------------------------------------------------------------
      Traceback (most recent call last):
        File "Lib/test/test_sys.py", line 770, in test_getallocatedblocks
          alloc_name = _testcapi.pymem_getallocatorsname()
      RuntimeError: cannot get allocators name
      9b8314cf
  2. 12 Mar, 2019 1 kayıt (commit)
  3. 10 Kas, 2018 1 kayıt (commit)
  4. 19 Eyl, 2018 1 kayıt (commit)
  5. 18 Eyl, 2018 1 kayıt (commit)
  6. 29 Agu, 2018 2 kayıt (commit)
    • Victor Stinner's avatar
      bpo-34523: Add _PyCoreConfig.filesystem_encoding (GH-8963) · b2457efc
      Victor Stinner yazdı
      _PyCoreConfig_Read() is now responsible to choose the filesystem
      encoding and error handler. Using Py_Main(), the encoding is now
      chosen even before calling Py_Initialize().
      
      _PyCoreConfig.filesystem_encoding is now the reference, instead of
      Py_FileSystemDefaultEncoding, for the Python filesystem encoding.
      
      Changes:
      
      * Add filesystem_encoding and filesystem_errors to _PyCoreConfig
      * _PyCoreConfig_Read() now reads the locale encoding for the file
        system encoding.
      * PyUnicode_EncodeFSDefault() and PyUnicode_DecodeFSDefaultAndSize()
        now use the interpreter configuration rather than
        Py_FileSystemDefaultEncoding and Py_FileSystemDefaultEncodeErrors
        global configuration variables.
      * Add _Py_SetFileSystemEncoding() and _Py_ClearFileSystemEncoding()
        private functions to only modify Py_FileSystemDefaultEncoding and
        Py_FileSystemDefaultEncodeErrors in coreconfig.c.
      * _Py_CoerceLegacyLocale() now takes an int rather than
        _PyCoreConfig for the warning.
      b2457efc
    • Victor Stinner's avatar
      bpo-34485: stdout uses surrogateescape on POSIX locale (GH-8986) · 315877dc
      Victor Stinner yazdı
      Standard streams like sys.stdout now use the "surrogateescape" error
      handler, instead of "strict", on the POSIX locale (when the C locale is not
      coerced and the UTF-8 Mode is disabled).
      
      Add tests on sys.stdout.errors with LC_ALL=POSIX.
      315877dc
  7. 28 Agu, 2018 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-34485: Enhance init_sys_streams() (GH-8978) · 9e4994d4
      Victor Stinner yazdı
      Python now gets the locale encoding with C code to initialize the encoding
      of standard streams like sys.stdout. Moreover, the encoding is now
      initialized to the Python codec name to get a normalized encoding name and
      to ensure that the codec is loaded. The change avoids importing
      _bootlocale and _locale modules at startup by default.
      
      When the PYTHONIOENCODING environment variable only contains an encoding,
      the error handler is now is now set explicitly to "strict".
      
      Rename also get_default_standard_stream_error_handler() to
      get_stdio_errors().
      
      Reduce the buffer to format the "cpXXX" string (Windows locale encoding).
      9e4994d4
  8. 25 Nis, 2018 1 kayıt (commit)
  9. 13 Ara, 2017 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-29240: PEP 540: Add a new UTF-8 Mode (#855) · 91106cd9
      Victor Stinner yazdı
      * Add -X utf8 command line option, PYTHONUTF8 environment variable
        and a new sys.flags.utf8_mode flag.
      * If the LC_CTYPE locale is "C" at startup: enable automatically the
        UTF-8 mode.
      * Add _winapi.GetACP(). encodings._alias_mbcs() now calls
        _winapi.GetACP() to get the ANSI code page
      * locale.getpreferredencoding() now returns 'UTF-8' in the UTF-8
        mode. As a side effect, open() now uses the UTF-8 encoding by
        default in this mode.
      * Py_DecodeLocale() and Py_EncodeLocale() now use the UTF-8 encoding
        in the UTF-8 Mode.
      * Update subprocess._args_from_interpreter_flags() to handle -X utf8
      * Skip some tests relying on the current locale if the UTF-8 mode is
        enabled.
      * Add test_utf8mode.py.
      * _Py_DecodeUTF8_surrogateescape() gets a new optional parameter to
        return also the length (number of wide characters).
      * pymain_get_global_config() and pymain_set_global_config() now
        always copy flag values, rather than only copying if the new value
        is greater than the old value.
      91106cd9
  10. 30 Kas, 2017 1 kayıt (commit)
  11. 29 Kas, 2017 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-32030: Rework memory allocators (#4625) · 5d39e042
      Victor Stinner yazdı
      * Fix _PyMem_SetupAllocators("debug"): always restore allocators to
        the defaults, rather than only caling _PyMem_SetupDebugHooks().
      * Add _PyMem_SetDefaultAllocator() helper to set the "default"
        allocator.
      * Add _PyMem_GetAllocatorsName(): get the name of the allocators
      * main() now uses debug hooks on memory allocators if Py_DEBUG is
        defined, rather than calling directly malloc()
      * Document default memory allocators in C API documentation
      * _Py_InitializeCore() now fails with a fatal user error if
        PYTHONMALLOC value is an unknown memory allocator, instead of
        failing with a fatal internal error.
      * Add new tests on the PYTHONMALLOC environment variable
      * Add support.with_pymalloc()
      * Add the _testcapi.WITH_PYMALLOC constant and expose it as
         support.with_pymalloc().
      * sysconfig.get_config_var('WITH_PYMALLOC') doesn't work on Windows, so
         replace it with support.with_pymalloc().
      * pythoninfo: add _testcapi collector for pymem
      5d39e042
  12. 15 Kas, 2017 1 kayıt (commit)
    • Serhiy Storchaka's avatar
      bpo-31949: Fixed several issues in printing tracebacks (PyTraceBack_Print()). (#4289) · edad8eeb
      Serhiy Storchaka yazdı
      * Setting sys.tracebacklimit to 0 or less now suppresses printing tracebacks.
      * Setting sys.tracebacklimit to None now causes using the default limit.
      * Setting sys.tracebacklimit to an integer larger than LONG_MAX now means using
        the limit LONG_MAX rather than the default limit.
      * Fixed integer overflows in the case of more than 2**31 traceback items on
        Windows.
      * Fixed output errors handling.
      edad8eeb
  13. 07 Kas, 2017 1 kayıt (commit)
  14. 22 Eki, 2017 1 kayıt (commit)
  15. 08 Eyl, 2017 1 kayıt (commit)
    • Nick Coghlan's avatar
      bpo-31344: Per-frame control of trace events (GH-3417) · 5a851670
      Nick Coghlan yazdı
      f_trace_lines: enable/disable line trace events
      f_trace_opcodes: enable/disable opcode trace events
      
      These are intended primarily for testing of the interpreter
      itself, as they make it much easier to emulate signals
      arriving at unfortunate times.
      5a851670
  16. 07 Eyl, 2017 1 kayıt (commit)
  17. 11 Haz, 2017 1 kayıt (commit)
    • Nick Coghlan's avatar
      bpo-28180: Implementation for PEP 538 (#659) · 6ea4186d
      Nick Coghlan yazdı
      - new PYTHONCOERCECLOCALE config setting
      - coerces legacy C locale to C.UTF-8, C.utf8 or UTF-8 by default
      - always uses C.UTF-8 on Android
      - uses `surrogateescape` on stdin and stdout in the coercion
        target locales
      - configure option to disable locale coercion at build time
      - configure option to disable C locale warning at build time
      6ea4186d
  18. 20 Nis, 2017 1 kayıt (commit)
  19. 27 Mar, 2017 1 kayıt (commit)
  20. 23 Mar, 2017 1 kayıt (commit)
    • Serhiy Storchaka's avatar
      bpo-6532: Make the thread id an unsigned integer. (#781) · aefa7ebf
      Serhiy Storchaka yazdı
      * bpo-6532: Make the thread id an unsigned integer.
      
      From C API side the type of results of PyThread_start_new_thread() and
      PyThread_get_thread_ident(), the id parameter of
      PyThreadState_SetAsyncExc(), and the thread_id field of PyThreadState
      changed from "long" to "unsigned long".
      
      * Restore a check in thread_get_ident().
      aefa7ebf
  21. 16 Ara, 2016 1 kayıt (commit)
  22. 02 Ara, 2016 1 kayıt (commit)
    • Victor Stinner's avatar
      Add sys.getandroidapilevel() · d6958ac6
      Victor Stinner yazdı
      Issue #28740: Add sys.getandroidapilevel(): return the build time
      API version of Android as an integer.
      
      Function only available on Android.
      d6958ac6
  23. 10 Eyl, 2016 1 kayıt (commit)
  24. 09 Eyl, 2016 1 kayıt (commit)
  25. 08 Eyl, 2016 4 kayıt (commit)
  26. 07 Eyl, 2016 1 kayıt (commit)
  27. 05 Eyl, 2016 1 kayıt (commit)
  28. 03 Tem, 2016 1 kayıt (commit)
  29. 17 Nis, 2016 1 kayıt (commit)
  30. 10 Nis, 2016 1 kayıt (commit)
  31. 20 Ara, 2015 2 kayıt (commit)
  32. 19 Ara, 2015 2 kayıt (commit)
  33. 12 Eki, 2015 1 kayıt (commit)
    • Victor Stinner's avatar
      sys.setrecursionlimit() now raises RecursionError · 50856d5a
      Victor Stinner yazdı
      Issue #25274: sys.setrecursionlimit() now raises a RecursionError if the new
      recursion limit is too low depending at the current recursion depth. Modify
      also the "lower-water mark" formula to make it monotonic. This mark is used to
      decide when the overflowed flag of the thread state is reset.
      50856d5a
  34. 01 Eki, 2015 1 kayıt (commit)