| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Use Unicode for module name and path in the following functions:
* get_file()
* load_source_module(), parse_source_module()
* make_compiled_pathname(), check_compiled_module(),
read_compiled_module(), load_compiled_module(), write_compiled_module(),
update_compiled_module()
* On Windows, use CreateDirectoryW() instead of mkdir()
* update_compiled_module() cannot fail anymore
|
| |
| |
| |
| |
| | |
Use Unicode for module name and path in get_sourcefile(),
make_source_pathname() and load_package() functions.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Rename subname argument to name, and mark it as constant.
|
| |
| |
| |
| | |
Document also the find_module() function
|
| |
| |
| |
| | |
Document also that dynamic module names are ASCII only
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Document the function
* Use RegQueryValueW() instead of RegQueryValueA()
* Use _Py_fopen() instead of fopen()
* Allocate registry key on the heap, not on the stack, and handle memory
allocation failure
* Handle Python exception in find_module()
|
| |
| |
| |
| |
| | |
_PyImport_FixupBuiltin() and _PyImport_FindBuiltin() use
PyUnicode_InternFromString() instead of PyUnicode_FromString().
|
| |
| |
| |
| |
| |
| |
| | |
- is_builtin(), init_builtin(), load_builtin() and other builtin related
functions use Unicode strings, instead of byte strings
- Rename _PyImport_FixupExtensionUnicode() to _PyImport_FixupExtensionObject()
- Rename _PyImport_FindExtensionUnicode() to _PyImport_FindExtensionObject()
|
| |
| |
| |
| |
| | |
find_frozen(), get_frozen_object(), is_frozen_package() and other functions
related to frozen modules use Unicode strings instead of byte strings.
|
| |
| |
| |
| | |
Replace strcmp() by PyUnicode_CompareWithASCIIString()
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
And as a consequence, mark also name argument of
_PyImport_FindExtensionUnicode() constant too. But I plan to change this
argument type to PyObject* later.
|
|/
|
|
|
| |
This function was not declared in Python public API (in any .h file) and not
documented. Mark it as private to prepare a change of its API.
|
| |
|
|
|
|
| |
(instead of PyArg_Parse*() with "es" format and Py_FileSystemDefaultEncoding)
|
|
|
|
| |
(the wisdom of actually relying on this remains questionable!)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Rename _PyImport_FindExtension() to _PyImport_FindExtensionUnicode():
the filename becomes a Unicode object instead of byte string
* Rename _PyImport_FixupExtension() to _PyImport_FixupExtensionUnicode():
the filename becomes a Unicode object instead of byte string
|
| |
|
|
|
|
|
|
|
| |
filesystem encoding instead of utf-8.
imp_cache_from_source() encodes the input path to filesystem encoding and this
path is passed to make_compiled_pathname().
|
|
|
|
| |
path
|
|
|
|
| |
module path
|
|
|
|
| |
in the library path.
|
|
|
|
|
|
|
| |
* _Py_fopen() and _Py_stat() come from Python/import.c
* (_Py)_wrealpath() comes from Python/sysmodule.c
* _Py_char2wchar(), _Py_wchar2char() and _Py_wfopen() come from Modules/main.c
* (_Py)_wstat(), (_Py)_wgetcwd(), _Py_wreadlink() come from Modules/getpath.c
|
|
|
|
|
| |
All unicode functions uses PyObject* except PyUnicode_AsWideChar(). Fix the
prototype for the new function PyUnicode_AsWideCharString().
|
| |
|
|
|
|
|
| |
Don't truncate path if it is too long anymore, and allocate fewer memory (but
allocate it on the heap, not on the stack).
|
|
|
|
|
|
|
| |
fromlist to get __import__ to return the module desired. Now it uses the proper
approach of fetching the module from sys.modules.
Closes issue #9252. Thanks to Alexander Belopolsky for the bug report.
|
| |
|
| |
|
|
|
|
| |
(Patch by Jon Anglin)
|
|
|
|
|
| |
by the new (and simpler) DUP_TOP_TWO. Performance isn't changed, but
our bytecode is a bit simplified. Patch by Demur Rumed.
|
| |
|
|
|
|
|
|
| |
Call _wfopen() on Windows, or fopen() otherwise. Return the new file object on
success, or NULL if the file cannot be open or (if PyErr_Occurred()) on unicode
error.
|
| |
|
|
|
|
| |
Use stat() or _wstat() depending on the OS.
|
|
|
|
|
|
| |
* On non-Windows OSes: the constructor accepts bytes filenames
and use surrogateescape for unicode filenames
* On Windows: use GetFileAttributesW() instead of GetFileAttributesA()
|
|
|
|
| |
Just move the code and some variables.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81380 | brett.cannon | 2010-05-20 13:37:55 -0500 (Thu, 20 May 2010) | 8 lines
Turned out that if you used explicit relative import syntax
(e.g. from .os import sep) and it failed, import would still try the implicit
relative import semantics of an absolute import (from os import sep). That's
not right, so when level is negative, only do explicit relative import
semantics.
Fixes issue #7902. Thanks to Meador Inge for the patch.
........
|
| |
|
|
|
|
|
|
| |
object to Py_FileSystemDefaultEncoding with the "surrogateescape" error
handler, return a bytes object. If Py_FileSystemDefaultEncoding is not set,
fall back to UTF-8.
|
|
|
|
|
|
|
|
|
|
| |
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
|
| |
|