Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | 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). | |||||
* | Since __import__ is not designed for general use, have its docstring point | Brett Cannon | 2010-09-27 | 1 | -2/+6 | |
| | | | | | | people towards importlib.import_module(). Closes issue #7397. | |||||
* | revert r85003, poorly considered; breaks tests | Benjamin Peterson | 2010-09-25 | 1 | -1/+1 | |
| | ||||||
* | don't count keyword arguments as positional #9943 | Benjamin Peterson | 2010-09-25 | 1 | -1/+1 | |
| | ||||||
* | add column offset to all syntax errors | Benjamin Peterson | 2010-09-20 | 4 | -33/+56 | |
| | ||||||
* | add PyErr_SyntaxLocationEx, to support adding a column offset | Benjamin Peterson | 2010-09-20 | 1 | -1/+17 | |
| | ||||||
* | Issue #9901: Destroying the GIL in Py_Finalize() can fail if some other | Antoine Pitrou | 2010-09-20 | 1 | -5/+8 | |
| | | | | | threads are still running. Instead, reinitialize the GIL on a second call to Py_Initialize(). | |||||
* | issue 9786 Native TLS support for pthreads | Kristján Valur Jónsson | 2010-09-20 | 3 | -1/+49 | |
| | | | | PyThread_create_key now has a failure mode that the applicatino can detect. | |||||
* | PyImport_Import was using the old import hack of sticking a dummy value into | Brett Cannon | 2010-09-19 | 1 | -3/+13 | |
| | | | | | | | 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. | |||||
* | Issue #9828: Destroy the GIL in Py_Finalize(), so that it gets properly | Antoine Pitrou | 2010-09-13 | 3 | -4/+34 | |
| | | | | | re-created on a subsequent call to Py_Initialize(). The problem (a crash) wouldn't appear in 3.1 or 2.7 where the GIL's structure is more trivial. | |||||
* | Fix incorrect comment regarding MAGIC and TAG in import.c | Nick Coghlan | 2010-09-11 | 1 | -2/+5 | |
| | ||||||
* | typo | Benjamin Peterson | 2010-09-10 | 1 | -2/+2 | |
| | ||||||
* | use Py_REFCNT | Benjamin Peterson | 2010-09-10 | 1 | -2/+2 | |
| | ||||||
* | remove gil_drop_request in --without-threads | Benjamin Peterson | 2010-09-10 | 1 | -4/+13 | |
| | ||||||
* | use DISPATCH() instead of continue | Benjamin Peterson | 2010-09-10 | 1 | -1/+1 | |
| | ||||||
* | Issue #9632: Remove sys.setfilesystemencoding() function: use PYTHONFSENCODING | Victor Stinner | 2010-09-10 | 2 | -44/+0 | |
| | | | | | | environment variable to set the filesystem encoding at Python startup. sys.setfilesystemencoding() creates inconsistencies because it is unable to reencode all filenames in all objects. | |||||
* | bump magic number for DELETE_DEREF | Benjamin Peterson | 2010-09-10 | 1 | -1/+2 | |
| | ||||||
* | #4617: Previously it was illegal to delete a name from the local | Amaury Forgeot d'Arc | 2010-09-10 | 3 | -24/+38 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | namespace if it occurs as a free variable in a nested block. This limitation of the compiler has been lifted, and a new opcode introduced (DELETE_DEREF). This sample was valid in 2.6, but fails to compile in 3.x without this change:: >>> def f(): ... def print_error(): ... print(e) ... try: ... something ... except Exception as e: ... print_error() ... # implicit "del e" here This sample has always been invalid in Python, and now works:: >>> def outer(x): ... def inner(): ... return x ... inner() ... del x There is no need to bump the PYC magic number: the new opcode is used for code that did not compile before. | |||||
* | Fix Issue #9752: MSVC compiler warning due to undefined function | Daniel Stutzbach | 2010-09-09 | 1 | -4/+7 | |
| | | | | (Patch by Jon Anglin) | |||||
* | Issue #9804: ascii() now always represents unicode surrogate pairs as | Antoine Pitrou | 2010-09-09 | 1 | -6/+20 | |
| | | | | | | a single `\UXXXXXXXX`, regardless of whether the character is printable or not. Also, the "backslashreplace" error handler now joins surrogate pairs into a single character on UCS-2 builds. | |||||
* | PEP 3149: Try to load the extension with the SOABI before trying | Matthias Klose | 2010-09-08 | 1 | -1/+1 | |
| | | | | to load the one without the SOABI in the name. | |||||
* | Issue #9797: pystate.c wrongly assumed that zero couldn't be a valid | Antoine Pitrou | 2010-09-08 | 1 | -8/+7 | |
| | | | | thread-local storage key. | |||||
* | Issue #9225: Remove the ROT_FOUR and DUP_TOPX opcode, the latter replaced | Antoine Pitrou | 2010-09-04 | 4 | -46/+17 | |
| | | | | | by the new (and simpler) DUP_TOP_TWO. Performance isn't changed, but our bytecode is a bit simplified. Patch by Demur Rumed. | |||||
* | _warnings exposed two variables with the name 'default_action' and | Brett Cannon | 2010-09-04 | 1 | -2/+2 | |
| | | | | | | | | | | | 'once_registry'. This is bad as the warnings module had variables named 'defaultaction' and 'onceregistry' which are what people should be looking at (technically those variables shouldn't be mucked with as they are undocumented, but we all know better than to believe that isn't happening). So the variables from _warnings have been renamed to come off as private and to avoid confusion over what variable should be used. Closes issue #9766. Thanks to Antoine Pitrou for the discovery. | |||||
* | PEP 3149 is accepted. | Barry Warsaw | 2010-09-03 | 1 | -6/+13 | |
| | | | | http://mail.python.org/pipermail/python-dev/2010-September/103408.html | |||||
* | Issue #9549: sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding() | Antoine Pitrou | 2010-09-01 | 1 | -20/+0 | |
| | | | | | are now removed, since their effect was inexistent in 3.x (the default encoding is hardcoded to utf-8 and cannot be changed). | |||||
* | only catch AttributeError in hasattr() #9666 | Benjamin Peterson | 2010-08-24 | 1 | -8/+5 | |
| | ||||||
* | Issue 8403: Don't mask KeyboardInterrupt during peephole operation. | Raymond Hettinger | 2010-08-22 | 1 | -4/+8 | |
| | ||||||
* | Add tests for r84209 (crashes in the Ast builder) | Amaury Forgeot d'Arc | 2010-08-19 | 1 | -3/+3 | |
| | | | | Also remove one tab, and move a check closer to the possible failure. | |||||
* | Check the return values for all functions returning an ast node. | Amaury Forgeot d'Arc | 2010-08-19 | 1 | -26/+27 | |
| | | | | | | Failure to do it may result in strange error messages or even crashes, in admittedly convoluted cases that are normally syntax errors, like: def f(*xx, __debug__): pass | |||||
* | Issue #8622: Add PYTHONFSENCODING environment variable to override the | Victor Stinner | 2010-08-18 | 1 | -22/+43 | |
| | | | | | | filesystem encoding. initfsencoding() displays also a better error message if get_codeset() failed. | |||||
* | Remove unused functions _PyImport_FindModule and _PyImport_IsScript | Victor Stinner | 2010-08-17 | 1 | -16/+0 | |
| | ||||||
* | Issue #8063: Call _PyGILState_Init() earlier in Py_InitializeEx(). | Victor Stinner | 2010-08-17 | 1 | -5/+5 | |
| |