Commit Graph

3591 Commits

Author SHA1 Message Date
Antoine Pitrou 86a36b500a PEP 3155 / issue #13448: Qualified name for classes and functions. 2011-11-25 18:56:07 +01:00
Amaury Forgeot d'Arc 942d5ba125 Merge branch 3.2 2011-11-22 22:02:01 +01:00
Amaury Forgeot d'Arc 5e8f810411 Issue #13436: commit regenerated Python-ast.c 2011-11-22 21:52:30 +01:00
Charles-François Natali 23b0b9252e Issue #13156: _PyGILState_Reinit(): Re-associate the auto thread state with the
TLS key only if the thread that called fork() had an associated auto thread
state (this might not be the case for example for a thread created outside of
Python calling into a subinterpreter).
2011-11-22 19:51:14 +01:00
Charles-François Natali a233df885b Issue #13156: _PyGILState_Reinit(): Re-associate the auto thread state with the
TLS key only if the thread that called fork() had an associated auto thread
state (this might not be the case for example for a thread created outside of
Python calling into a subinterpreter).
2011-11-22 19:49:51 +01:00
Victor Stinner 63ab875cfe Remove "#ifdef Py_UNICODE_WIDE": Python is now always wide 2011-11-22 03:31:20 +01:00
Victor Stinner 9d3b93ba30 Use the new Unicode API
* Replace PyUnicode_FromUnicode(NULL, 0) by PyUnicode_New(0, 0)
 * Replce PyUnicode_FromUnicode(str, len) by PyUnicode_FromWideChar(str, len)
 * Replace Py_UNICODE by wchar_t
 * posix_putenv() uses PyUnicode_FromFormat() to create the string, instead
   of PyUnicode_FromUnicode() + _snwprintf()
2011-11-22 02:27:30 +01:00
Victor Stinner 9e30aa52fd Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
And PyUnicode_GetSize() => PyUnicode_GetLength()
2011-11-21 02:49:52 +01:00
Victor Stinner 3335447646 Check for PyUnicode_AS_UNICODE() failure 2011-11-21 02:01:41 +01:00
Victor Stinner e251d6d69d print_exception() uses PyUnicode_GetLength() instead of PyUnicode_GetSize() 2011-11-20 19:20:00 +01:00
Antoine Pitrou f34a0cdc6c Issue #10227: Add an allocation cache for a single slice object.
Patch by Stefan Behnel.
2011-11-18 20:14:34 +01:00
Victor Stinner ee587eaa36 Catch PyUnicode_AS_UNICODE() errors in fileutils.c 2011-11-17 00:51:38 +01:00
Victor Stinner 1f7951711c Catch PyUnicode_AS_UNICODE() errors 2011-11-17 00:45:54 +01:00
Antoine Pitrou 8ad982cccf Use PyUnicode_FromFormat() to create the temporary file name.
Also, as in importlib, append the id of an object to make the file name
pseudo-random.
2011-11-15 22:27:32 +01:00
Antoine Pitrou 1d8f3f451c Fix regression under Windows following b75b41237380 (from issue #13392) 2011-11-15 20:40:55 +01:00
Antoine Pitrou 28e401e717 Issue #13392: Writing a pyc file should now be atomic under Windows as well. 2011-11-15 19:15:19 +01:00
Charles-François Natali 0c929d9d39 Issue #13303: Fix bytecode file default permission. 2011-11-10 19:12:29 +01:00
Martin v. Löwis d10759f6ed Make _PyUnicode_FromId return borrowed references.
http://mail.python.org/pipermail/python-dev/2011-November/114347.html
2011-11-07 13:00:05 +01:00
Philip Jenvey 50add04836 quote the type name for improved readability 2011-11-06 16:37:52 -08:00
Antoine Pitrou 5ee9d8a8a2 Issue #13342: input() used to ignore sys.stdin's and sys.stdout's unicode
error handler in interactive mode (when calling into PyOS_Readline()).
2011-11-06 00:38:45 +01:00
Antoine Pitrou 0d776b1ce8 Issue #13342: input() used to ignore sys.stdin's and sys.stdout's unicode
error handler in interactive mode (when calling into PyOS_Readline()).
2011-11-06 00:34:26 +01:00
Amaury Forgeot d'Arc 9028a10144 Issue #13343: Fix a SystemError when a lambda expression uses a global
variable in the default value of a keyword-only argument:
(lambda *, arg=GLOBAL_NAME: None)
2011-11-04 22:29:24 +01:00
Amaury Forgeot d'Arc 97c1bef6a4 Issue #13343: Fix a SystemError when a lambda expression uses a global
variable in the default value of a keyword-only argument:
(lambda *, arg=GLOBAL_NAME: None)
2011-11-04 22:17:45 +01:00
Victor Stinner c06bb7affd Avoid the Py_UNICODE type in codecs.c 2011-11-04 21:36:35 +01:00
Victor Stinner b31f1bcd99 PyCodec_XMLCharRefReplaceError(): Remove unused variable 2011-11-04 21:29:10 +01:00
Martin v. Löwis 8ba79306d1 Fix C89 incompatibility. 2011-11-04 12:26:49 +01:00
Martin v. Löwis b09af03b8a Port error handlers from Py_UNICODE indexing to code point indexing. 2011-11-04 11:16:41 +01:00
Éric Araujo e64052176d Merge follow-up for #11254 and other changes from 3.2 2011-11-03 05:17:11 +01:00
Éric Araujo 5df1108de2 Add signatures to the docstring of functions added to imp by PEP 3147 2011-11-03 03:38:44 +01:00
Antoine Pitrou 8db076cf8a Issue #10363: Deallocate global locks in Py_Finalize(). 2011-10-30 19:13:55 +01:00
Florent Xicluna 4d46c2a722 Remove unused variable. 2011-10-28 15:00:50 +02:00
Nick Coghlan de31b191e5 Issue 1294232: Fix errors in metaclass calculation affecting some cases of metaclass inheritance. Patch by Daniel Urban. 2011-10-23 22:04:16 +10:00
Charles-François Natali e695eec24a Issue #13303: Fix a race condition in the bytecode file creation. 2011-10-31 20:47:31 +01:00
Victor Stinner f4afa43fd4 Issue #13226: Update sys.setdlopenflags() docstring
Refer to os.RTLD_xxx constants instead of ctypes and DLFCN modules.
2011-10-31 11:48:09 +01:00
Martin v. Löwis f45dee998f Port import_module_level to Unicode API. 2011-10-30 23:50:02 +01:00
Antoine Pitrou 6fbbc33440 Issue #10363: Deallocate global locks in Py_Finalize(). 2011-10-30 19:14:46 +01:00
Martin v. Löwis 796ea53937 Port PyImport_ReloadModule to Unicode API. 2011-10-30 09:07:07 +01:00
Florent Xicluna 908ae24b06 Merge 3.2 (linked to issue #1294232) 2011-10-28 15:06:13 +02:00
Antoine Pitrou b528fcf954 Fix test_imp failure under Windows 2011-10-25 00:21:02 +02:00
Martin v. Löwis 9af29d39af Rewrite find_module_path using unicode API. 2011-10-23 18:45:16 +02:00
Martin v. Löwis 2cc0cc54a2 Fix off-by-one error. 2011-10-23 18:41:56 +02:00
Martin v. Löwis fadcd317fa Drop unused macros. Use CACHEDIR consistently. 2011-10-23 18:08:20 +02:00
Martin v. Löwis 8a0ef78e8c Rewrite make_source_pathname using Unicode API. 2011-10-23 18:05:06 +02:00
Martin v. Löwis 30260a7fe3 Add ready checks for make_compiled_pathname. 2011-10-23 17:35:46 +02:00
Martin v. Löwis 2db72863fb Reformulate make_compiled_pathname in terms of unicode objects. 2011-10-23 17:29:08 +02:00
Nick Coghlan 9715d26305 Merge issue 1294232 patch from 3.2 2011-10-23 22:36:42 +10:00
Victor Stinner 3a50e7056e Issue #12281: Rewrite the MBCS codec to handle correctly replace and ignore
error handlers on all Windows versions. The MBCS codec is now supporting all
error handlers, instead of only replace to encode and ignore to decode.
2011-10-18 21:21:00 +02:00
Victor Stinner 9ea8e4c29d Instantiate the OS-related exception as soon as we raise it, so that "except"
works properly.

PyErr_SetFromErrnoWithFilenameObject() was already fixed by the changeset
793c75177d28. This commit fixes PyErr_SetExcFromWindowsErrWithFilenameObject(),
used on Windows.
2011-10-17 20:18:58 +02:00
Antoine Pitrou 707033a694 Issue #13146: Writing a pyc file is now atomic under POSIX. 2011-10-17 19:28:44 +02:00
Martin v. Löwis 1c67dd9b15 Port SetAttrString/HasAttrString to SetAttrId/GetAttrId. 2011-10-14 15:16:45 +02:00