Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Issue #10157: Fixed refleaks in pythonrun.c. Patch by Stefan Krah. | Hirokazu Yamamoto | 2010-10-30 | 1 | -0/+3 |
| | |||||
* | decrement offset when it points to a newline (#10186 followup) | Benjamin Peterson | 2010-10-29 | 1 | -1/+3 |
| | |||||
* | Issue #5437: A preallocated MemoryError instance should not hold traceback | Antoine Pitrou | 2010-10-28 | 1 | -23/+1 |
| | | | | data (including local variables caught in the stack trace) alive infinitely. | ||||
* | sys_update_path(): update sys.path even if argc==0 | Victor Stinner | 2010-10-25 | 1 | -2/+0 |
| | |||||
* | Add a new warning gategory, ResourceWarning, as discussed on python-dev. It ↵ | Georg Brandl | 2010-10-24 | 2 | -5/+23 |
| | | | | | | | | is silent by default, except when configured --with-pydebug. Emit this warning from the GC shutdown procedure, rather than just printing to stderr. | ||||
* | tighten loop | Benjamin Peterson | 2010-10-24 | 1 | -4/+1 |
| | |||||
* | remove broken code accounting an offset the size of the line #10186 | Benjamin Peterson | 2010-10-24 | 1 | -2/+0 |
| | |||||
* | follow up to #9778: define and use an unsigned hash type | Benjamin Peterson | 2010-10-23 | 1 | -1/+1 |
| | |||||
* | Issue #10089: Add support for arbitrary -X options on the command-line. | Antoine Pitrou | 2010-10-21 | 2 | -6/+60 |
| | | | | They can be retrieved through a new attribute `sys._xoptions`. | ||||
* | fix uninitialized struct member #10152 | Benjamin Peterson | 2010-10-20 | 1 | -0/+1 |
| | |||||
* | initfsencoding(): get_codeset() failure is now a fatal error | Victor Stinner | 2010-10-19 | 1 | -13/+6 |
| | | | | | Don't fallback to utf-8 anymore to avoid mojibake. I never got any error from his function. | ||||
* | make hashes always the size of pointers; introduce Py_hash_t #9778 | Benjamin Peterson | 2010-10-17 | 3 | -4/+4 |
| | |||||
* | compiler_error(): use PyUnicode_DecodeFSDefault() to decode the filename, | Victor Stinner | 2010-10-17 | 1 | -2/+11 |
| | | | | instead of utf-8 in strict mode. | ||||
* | PyErr_SyntaxLocationEx() uses PyUnicode_DecodeFSDefault(), instead of | Victor Stinner | 2010-10-17 | 1 | -1/+1 |
| | | | | PyUnicode_FromString(), to decode the filename. | ||||
* | find_module(): use FS encoding to display the missing __init__ warning | Victor Stinner | 2010-10-17 | 1 | -7/+9 |
| | |||||
* | _PyImport_FixupExtension() and _PyImport_FindExtension() uses FS encoding | Victor Stinner | 2010-10-17 | 3 | -24/+62 |
| | | | | | | | * 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 | ||||
* | Add an optional size argument to _Py_char2wchar() | Victor Stinner | 2010-10-16 | 1 | -11/+16 |
| | | | | | | _Py_char2wchar() callers usually need the result size in characters. Since it's trivial to compute it in _Py_char2wchar() (O(1) whereas wcslen() is O(n)), add an option to get it. | ||||
* | _Py_wrealpath() uses _Py_char2wchar() to decode the result, to support | Victor Stinner | 2010-10-16 | 1 | -2/+12 |
| | | | | surrogate characters. | ||||
* | _Py_wreadlink(): catch _Py_char2wchar() failure | Victor Stinner | 2010-10-16 | 1 | -0/+4 |
| | |||||
* | _Py_wreadlink() uses _Py_char2wchar() to decode the result, to support | Victor Stinner | 2010-10-16 | 1 | -2/+7 |
| | | | | surrogate characters. | ||||
* | Fix ast_error_finish() and err_input(): filename can be NULL | Victor Stinner | 2010-10-16 | 2 | -2/+12 |
| | | | | Fix my previous commit (r85569). | ||||
* | Issue #9713, #10114: Parser functions (eg. PyParser_ASTFromFile) expects | Victor Stinner | 2010-10-16 | 5 | -26/+63 |
| | | | | | filenames encoded to the filesystem encoding with surrogateescape error handler (to support undecodable bytes), instead of UTF-8 in strict mode. | ||||
* | don't identify the toplevel namespace by name #9997 | Benjamin Peterson | 2010-10-16 | 1 | -1/+1 |
| | |||||
* | fix refleak | Benjamin Peterson | 2010-10-16 | 1 | -4/+6 |
| | |||||
* | First (uncontroversial) part of issue 9807. | Barry Warsaw | 2010-10-16 | 1 | -0/+4 |
| | | | | | | | | | * Expose the build flags to Python as sys.abiflags * Shared library libpythonX.Y<abiflags>.so * python-config --abiflags * Make two distutils tests that failed with --enable-shared (even before this patch) succeed. * Fix a few small style issues. | ||||
* | Fix imp_cache_from_source(): Decode make_compiled_pathname() result from the | Victor Stinner | 2010-10-15 | 1 | -1/+1 |
| | | | | | | | 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(). | ||||
* | imp_load_module() uses PyUnicode_FSConverter() to support surrogates in module | Victor Stinner | 2010-10-15 | 1 | -7/+7 |
| | | | | path | ||||
* | imp.cache_from_source() uses PyUnicode_FSConverter() to support surrogates in | Victor Stinner | 2010-10-15 | 1 | -5/+8 |
| | | | | module path | ||||
* | imp.load_dynamic() uses PyUnicode_FSConverter() to support surrogates | Victor Stinner | 2010-10-15 | 1 | -6/+6 |
| | | | | in the library path. | ||||
* | Use locale encoding if Py_FileSystemDefaultEncoding is not set | Victor Stinner | 2010-10-15 | 1 | -258/+0 |
| | | | | | | | | * PyUnicode_EncodeFSDefault(), PyUnicode_DecodeFSDefaultAndSize() and PyUnicode_DecodeFSDefault() use the locale encoding instead of UTF-8 if Py_FileSystemDefaultEncoding is NULL * redecode_filenames() functions and _Py_code_object_list (issue #9630) are no more needed: remove them | ||||
* | redecode_filename(): don't need to initialize variables | Victor Stinner | 2010-10-15 | 1 | -1/+1 |
| | |||||
* | Mark _Py_char2wchar() input argument as constant | Victor Stinner | 2010-10-15 | 1 | -1/+1 |
| | |||||
* | Explicitly close some files (from issue #10093) | Antoine Pitrou | 2010-10-14 | 1 | -0/+6 |
| | |||||
* | _Py_wgetcwd() decodes the path using _Py_char2wchar() to support surrogates | Victor Stinner | 2010-10-14 | 1 | -3/+11 |
| | |||||
* | Issue #9992: Remove PYTHONFSENCODING environment variable. | Victor Stinner | 2010-10-13 | 1 | -16/+6 |
| | |||||
* | ceval.c: catch recursion error on _PyUnicode_AsString(co->co_filename) | Victor Stinner | 2010-10-13 | 1 | -0/+4 |
| | |||||
* | Issue #10062: Allow building on platforms which do not have sem_timedwait. | Antoine Pitrou | 2010-10-10 | 1 | -1/+2 |
| | |||||
* | fileutils.c: document which encodings are used | Victor Stinner | 2010-10-07 | 1 | -6/+26 |
| | |||||
* | _Py_wrealpath() requires the size of the output buffer | Victor Stinner | 2010-10-07 | 2 | -3/+4 |
| | |||||
* | _Py_stat() and _Py_fopen(): avoid PyUnicode_AsWideCharString() on Windows | Victor Stinner | 2010-10-07 | 1 | -18/+6 |
| | | | | | On Windows, Py_UNICODE is wchar_t, so we can avoid the expensive Py_UNICODE* => wchar_t* conversion. | ||||
* | Fix fileutils for Windows | Victor Stinner | 2010-10-07 | 1 | -8/+7 |
| | | | | | | * Don't define _Py_wstat() on Windows, Windows has its own _wstat() function with a different API (the stat buffer has another type) * Include windows.h | ||||
* | Ooops, fileutils.c contains twice the same code | Victor Stinner | 2010-10-07 | 1 | -380/+0 |
| | | | | | I suppose that I reapplied my local patch creating Python/fileutils.c whereas the file already existed. | ||||
* | Create fileutils.c/.h | Victor Stinner | 2010-10-07 | 3 | -93/+759 |
| | | | | | | | * _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 | ||||
* | _wrealpath() and _Py_wreadlink() support surrogates (PEP 383) | Victor Stinner | 2010-10-07 | 1 | -3/+4 |
| | | | | Use _Py_wchar2char() to support surrogate characters in the input path. | ||||
* | PyUnicode_AsWideCharString() takes a PyObject*, not a PyUnicodeObject* | Victor Stinner | 2010-10-07 | 1 | -3/+3 |
| | | | | | All unicode functions uses PyObject* except PyUnicode_AsWideChar(). Fix the prototype for the new function PyUnicode_AsWideCharString(). | ||||
* | Create a subfunction for PySys_SetArgvEx() | Victor Stinner | 2010-10-06 | 1 | -78/+94 |
| | | | | Create sys_update_path() static function. Do nothing if argc==0. | ||||
* | #9060 Let platforms without dup2() compile the replacement fonction without ↵ | Amaury Forgeot d'Arc | 2010-10-05 | 1 | -0/+1 |
| | | | | error. | ||||
* | Remove an unreferenced variable. len is no longer needed. | Brian Curtin | 2010-09-29 | 1 | -1/+0 |
| | |||||
* | Issue #9630: Redecode filenames when setting the filesystem encoding | Victor Stinner | 2010-09-29 | 1 | -0/+258 |
| | | | | | | | | | | | | | | Redecode the filenames of: - all modules: __file__ and __path__ attributes - all code objects: co_filename attribute - sys.path - sys.meta_path - sys.executable - sys.path_importer_cache (keys) Keep weak references to all code objects until initfsencoding() is called, to be able to redecode co_filename attribute of all code objects. | ||||
* | Issue #9979: Use PyUnicode_AsWideCharString() in import.c | Victor Stinner | 2010-09-29 | 1 | -18/+16 |
| | | | | | Don't truncate path if it is too long anymore, and allocate fewer memory (but allocate it on the heap, not on the stack). |