1. 04 Mar, 2019 1 kayıt (commit)
  2. 23 Kas, 2018 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-34523: Fix C locale coercion on FreeBSD CURRENT (GH-10672) · 353933e7
      Victor Stinner yazdı
      bpo-34523, bpo-35290: C locale coercion now resets the Python
      internal "force ASCII" mode. This change fix the filesystem encoding
      on FreeBSD CURRENT, which has a new "C.UTF-8" locale, when
      the UTF-8 mode is disabled.
      
      Add _Py_ResetForceASCII(): _Py_SetLocaleFromEnv() now calls it.
      353933e7
  3. 20 Kas, 2018 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-28604: Fix localeconv() for different LC_MONETARY (GH-10606) · 02e6bf7f
      Victor Stinner yazdı
      locale.localeconv() now sets temporarily the LC_CTYPE locale to the
      LC_MONETARY locale if the two locales are different and monetary
      strings are non-ASCII. This temporary change affects other threads.
      
      Changes:
      
      * locale.localeconv() can now set LC_CTYPE to LC_MONETARY to decode
        monetary fields.
      * Add LocaleInfo.grouping_buffer: copy localeconv() grouping string
        since it can be replaced anytime if a different thread calls
        localeconv().
      * _Py_GetLocaleconvNumeric() now requires a "struct lconv *"
        structure, so locale.localeconv() now longer calls localeconv()
        twice. Moreover, the function now requires all arguments to be
        non-NULL.
      * Rename STATIC_LOCALE_INFO_INIT to LocaleInfo_STATIC_INIT.
      * Move _Py_GetLocaleconvNumeric() definition from fileutils.h
        to pycore_fileutils.h. pycore_fileutils.h now includes locale.h.
      * The _locale module is now built with Py_BUILD_CORE defined.
      02e6bf7f
  4. 06 Kas, 2018 1 kayıt (commit)
  5. 17 Eki, 2018 1 kayıt (commit)
  6. 29 Agu, 2018 2 kayıt (commit)
    • Victor Stinner's avatar
      bpo-34523: Support surrogatepass in locale codecs (GH-8995) · 3d4226a8
      Victor Stinner yazdı
      Add support for the "surrogatepass" error handler in
      PyUnicode_DecodeFSDefault() and PyUnicode_EncodeFSDefault()
      for the UTF-8 encoding.
      
      Changes:
      
      * _Py_DecodeUTF8Ex() and _Py_EncodeUTF8Ex() now support the
        surrogatepass error handler (_Py_ERROR_SURROGATEPASS).
      * _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx() now use
        the _Py_error_handler enum instead of "int surrogateescape" to pass
        the error handler. These functions now return -3 if the error
        handler is unknown.
      * Add unit tests on _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx()
        in test_codecs.
      * Rename get_error_handler() to _Py_GetErrorHandler() and expose it
        as a private function.
      * _freeze_importlib doesn't need config.filesystem_errors="strict"
        workaround anymore.
      3d4226a8
    • Victor Stinner's avatar
      bpo-34523: Py_DecodeLocale() use UTF-8 on Windows (GH-8998) · c5989cd8
      Victor Stinner yazdı
      Py_DecodeLocale() and Py_EncodeLocale() now use the UTF-8 encoding on
      Windows if Py_LegacyWindowsFSEncodingFlag is zero.
      
      pymain_read_conf() now sets Py_LegacyWindowsFSEncodingFlag in its
      loop, but restore its value at exit.
      c5989cd8
  7. 28 Agu, 2018 2 kayıt (commit)
    • Victor Stinner's avatar
      bpo-34403: On HP-UX, force ASCII for C locale (GH-8969) · d500e530
      Victor Stinner yazdı
      On HP-UX with C or POSIX locale, sys.getfilesystemencoding() now returns
      "ascii" instead of "roman8" (when the UTF-8 Mode is disabled and the C locale
      is not coerced).
      
      nl_langinfo(CODESET) announces "roman8" whereas it uses the Latin1
      encoding in practice.
      d500e530
    • Victor Stinner's avatar
      bpo-34527: POSIX locale enables the UTF-8 Mode (GH-8972) · 5cb25895
      Victor Stinner yazdı
      * The UTF-8 Mode is now also enabled by the "POSIX" locale, not only
        by the "C" locale.
      * On FreeBSD, Py_DecodeLocale() and Py_EncodeLocale() now also forces
        the ASCII encoding if the LC_CTYPE locale is "POSIX", not only if
        the LC_CTYPE locale is "C".
      * test_utf8_mode.test_cmd_line() checks also that the command line
        arguments are decoded from UTF-8 when the the UTF-8 Mode is enabled
        with POSIX locale or C locale.
      5cb25895
  8. 20 Nis, 2018 1 kayıt (commit)
  9. 18 Şub, 2018 1 kayıt (commit)
  10. 06 Şub, 2018 1 kayıt (commit)
  11. 22 Ock, 2018 1 kayıt (commit)
  12. 15 Ock, 2018 2 kayıt (commit)
    • Victor Stinner's avatar
      bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174) · cb064fc2
      Victor Stinner yazdı
      * Add _Py_GetLocaleconvNumeric() function: decode decimal_point and
        thousands_sep fields of localeconv() from the LC_NUMERIC encoding,
        rather than decoding from the LC_CTYPE encoding.
      * Modify locale.localeconv() and "n" formatter of str.format() (for
        int, float and complex to use _Py_GetLocaleconvNumeric()
        internally.
      cb064fc2
    • Victor Stinner's avatar
      bpo-29240: Fix locale encodings in UTF-8 Mode (#5170) · 7ed7aead
      Victor Stinner yazdı
      Modify locale.localeconv(), time.tzname, os.strerror() and other
      functions to ignore the UTF-8 Mode: always use the current locale
      encoding.
      
      Changes:
      
      * Add _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx(). On decoding or
        encoding error, they return the position of the error and an error
        message which are used to raise Unicode errors in
        PyUnicode_DecodeLocale() and PyUnicode_EncodeLocale().
      * Replace _Py_DecodeCurrentLocale() with _Py_DecodeLocaleEx().
      * PyUnicode_DecodeLocale() now uses _Py_DecodeLocaleEx() for all
        cases, especially for the strict error handler.
      * Add _Py_DecodeUTF8Ex(): return more information on decoding error
        and supports the strict error handler.
      * Rename _Py_EncodeUTF8_surrogateescape() to _Py_EncodeUTF8Ex().
      * Replace _Py_EncodeCurrentLocale() with _Py_EncodeLocaleEx().
      * Ignore the UTF-8 mode to encode/decode localeconv(), strerror()
        and time zone name.
      * Remove PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize()
        and PyUnicode_EncodeLocale() now ignore the UTF-8 mode: always use
        the "current" locale.
      * Remove _PyUnicode_DecodeCurrentLocale(),
        _PyUnicode_DecodeCurrentLocaleAndSize() and
        _PyUnicode_EncodeCurrentLocale().
      7ed7aead
  13. 10 Ock, 2018 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-29240: readline now ignores the UTF-8 Mode (#5145) · 2cba6b85
      Victor Stinner yazdı
      Add new fuctions ignoring the UTF-8 mode:
      
      * _Py_DecodeCurrentLocale()
      * _Py_EncodeCurrentLocale()
      * _PyUnicode_DecodeCurrentLocaleAndSize()
      * _PyUnicode_EncodeCurrentLocale()
      
      Modify the readline module to use these functions.
      
      Re-enable test_readline.test_nonascii().
      2cba6b85
  14. 21 Ara, 2017 3 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
    • Victor Stinner's avatar
      bpo-32030: Add _Py_EncodeLocaleRaw() (#4961) · 9dd76201
      Victor Stinner yazdı
      Replace Py_EncodeLocale() with _Py_EncodeLocaleRaw() in:
      
      * _Py_wfopen()
      * _Py_wreadlink()
      * _Py_wrealpath()
      * _Py_wstat()
      * pymain_open_filename()
      
      These functions are called early during Python intialization, only
      the RAW memory allocator must be used.
      9dd76201
    • Victor Stinner's avatar
      bpo-32030: Add _Py_EncodeUTF8_surrogateescape() (#4960) · e47e698d
      Victor Stinner yazdı
      Py_EncodeLocale() now uses _Py_EncodeUTF8_surrogateescape(), instead
      of using temporary unicode and bytes objects. So Py_EncodeLocale()
      doesn't use the Python C API anymore.
      e47e698d
  15. 16 Ara, 2017 1 kayıt (commit)
    • Victor Stinner's avatar
      bpo-29240, bpo-32030: Py_Main() re-reads config if encoding changes (#4899) · 9454060e
      Victor Stinner yazdı
      bpo-29240, bpo-32030: If the encoding change (C locale coerced or
      UTF-8 Mode changed), Py_Main() now reads again the configuration with
      the new encoding.
      
      Changes:
      
      * Add _Py_UnixMain() called by main().
      * Rename pymain_free_pymain() to pymain_clear_pymain(), it can now be
        called multipled times.
      * Rename pymain_parse_cmdline_envvars() to pymain_read_conf().
      * Py_Main() now clears orig_argc and orig_argv at exit.
      * Remove argv_copy2, Py_Main() doesn't modify argv anymore. There is
        no need anymore to get two copies of the wchar_t** argv.
      * _PyCoreConfig: add coerce_c_locale and coerce_c_locale_warn.
      * Py_UTF8Mode is now initialized to -1.
      * Locale coercion (PEP 538) now respects -I and -E options.
      9454060e
  16. 15 Ara, 2017 1 kayıt (commit)
  17. 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
  18. 08 Kas, 2017 1 kayıt (commit)
    • Victor Stinner's avatar
      Replace KB unit with KiB (#4293) · 8c663fd6
      Victor Stinner yazdı
      kB (*kilo* byte) unit means 1000 bytes, whereas KiB ("kibibyte")
      means 1024 bytes. KB was misused: replace kB or KB with KiB when
      appropriate.
      
      Same change for MB and GB which become MiB and GiB.
      
      Change the output of Tools/iobench/iobench.py.
      
      Round also the size of the documentation from 5.5 MB to 5 MiB.
      8c663fd6
  19. 07 Eyl, 2017 1 kayıt (commit)
  20. 28 Haz, 2017 1 kayıt (commit)
  21. 09 Mar, 2017 1 kayıt (commit)
  22. 15 Ara, 2016 1 kayıt (commit)
  23. 19 Kas, 2016 1 kayıt (commit)
  24. 10 Eyl, 2016 1 kayıt (commit)
    • Victor Stinner's avatar
      Fix check_force_ascii() · 54de2b1e
      Victor Stinner yazdı
      Issue #27938: Normalize aliases of the ASCII encoding, because
      _Py_normalize_encoding() now correctly normalize encoding names.
      54de2b1e
  25. 08 Eyl, 2016 1 kayıt (commit)
  26. 26 May, 2016 1 kayıt (commit)
  27. 19 May, 2016 1 kayıt (commit)
    • Victor Stinner's avatar
      Fix os.set_inheritable() on Android · 3116cc44
      Victor Stinner yazdı
      Issue #27057: Fix os.set_inheritable() on Android, ioctl() is blocked by
      SELinux and fails with EACCESS. The function now falls back to fcntl().
      
      Patch written by Michał Bednarski.
      3116cc44
  28. 17 Nis, 2016 1 kayıt (commit)
    • Victor Stinner's avatar
      Avoid fcntl() if possible in set_inheritable() · a858bbde
      Victor Stinner yazdı
      Issue #26770: set_inheritable() avoids calling fcntl() twice if the FD_CLOEXEC
      is already set/cleared. This change only impacts platforms using the fcntl()
      implementation of set_inheritable() (not Linux nor Windows).
      a858bbde
  29. 14 Mar, 2016 1 kayıt (commit)
    • Victor Stinner's avatar
      Add more checks on the GIL · 8a1be618
      Victor Stinner yazdı
      Issue #10915, #15751, #26558:
      
      * PyGILState_Check() now returns 1 (success) before the creation of the GIL and
        after the destruction of the GIL. It allows to use the function early in
        Python initialization and late in Python finalization.
      * Add a flag to disable PyGILState_Check(). Disable PyGILState_Check() when
        Py_NewInterpreter() is called
      * Add assert(PyGILState_Check()) to: _Py_dup(), _Py_fstat(), _Py_read()
        and _Py_write()
      8a1be618
  30. 17 Ara, 2015 1 kayıt (commit)
  31. 11 Eki, 2015 2 kayıt (commit)
  32. 12 Nis, 2015 1 kayıt (commit)
  33. 01 Nis, 2015 2 kayıt (commit)