The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
I expected more users of _Py_wstat(), but in practice it's only used by
Modules/getpath.c. Move the function because it's not needed on Windows.
Windows uses PC/getpathp.c which uses the Win32 API (ex: GetFileAttributesW())
not the POSIX API.
directory to sys.path when running from a build directory. That has
proven to be problematic for several standard library modules with
C extension modules whose builds can fail on some platforms.
* Replace malloc() with PyMem_RawMalloc()
* Replace PyMem_Malloc() with PyMem_RawMalloc() where the GIL is not held.
* _Py_char2wchar() now returns a buffer allocated by PyMem_RawMalloc(), instead
of PyMem_Malloc()
encoding using _Py_char2wchar() instead of mbstowcs() to store undecodable
bytes as surrogates characters (PEP 383) instead of ignoring silently
the PYTHONPATH variable.
PyUnicode_AsWideChar() result is signed, whereas it was stored in a unsigned
variable, and then the test was "n >= 0" which is always true to an unsigned
number. Patch written by Hallvard B Furuseth.
Instead of casting it to wchar_t* without conversion. It fixes a bug if Python
is compiled a non-ascii directory, different than the source code directory,
with C locale.