summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Fix incorrect comment regarding MAGIC and TAG in import.cNick Coghlan2010-09-111-2/+5
|
* typoBenjamin Peterson2010-09-101-2/+2
|
* use Py_REFCNTBenjamin Peterson2010-09-101-2/+2
|
* remove gil_drop_request in --without-threadsBenjamin Peterson2010-09-101-4/+13
|
* use DISPATCH() instead of continueBenjamin Peterson2010-09-101-1/+1
|
* Issue #9632: Remove sys.setfilesystemencoding() function: use PYTHONFSENCODINGVictor Stinner2010-09-102-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_DEREFBenjamin Peterson2010-09-101-1/+2
|
* #4617: Previously it was illegal to delete a name from the localAmaury Forgeot d'Arc2010-09-103-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 functionDaniel Stutzbach2010-09-091-4/+7
| | | | (Patch by Jon Anglin)
* Issue #9804: ascii() now always represents unicode surrogate pairs asAntoine Pitrou2010-09-091-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 tryingMatthias Klose2010-09-081-1/+1
| | | | to load the one without the SOABI in the name.
* Issue #9797: pystate.c wrongly assumed that zero couldn't be a validAntoine Pitrou2010-09-081-8/+7
| | | | thread-local storage key.
* Issue #9225: Remove the ROT_FOUR and DUP_TOPX opcode, the latter replacedAntoine Pitrou2010-09-044-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' andBrett Cannon2010-09-041-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 Warsaw2010-09-031-6/+13
| | | | http://mail.python.org/pipermail/python-dev/2010-September/103408.html
* Issue #9549: sys.setdefaultencoding() and PyUnicode_SetDefaultEncoding()Antoine Pitrou2010-09-011-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() #9666Benjamin Peterson2010-08-241-8/+5
|
* Issue 8403: Don't mask KeyboardInterrupt during peephole operation.Raymond Hettinger2010-08-221-4/+8
|
* Add tests for r84209 (crashes in the Ast builder)Amaury Forgeot d'Arc2010-08-191-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'Arc2010-08-191-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 theVictor Stinner2010-08-181-22/+43
| | | | | | filesystem encoding. initfsencoding() displays also a better error message if get_codeset() failed.
* Remove unused functions _PyImport_FindModule and _PyImport_IsScriptVictor Stinner2010-08-171-16/+0
|
* Issue #8063: Call _PyGILState_Init() earlier in Py_InitializeEx().Victor Stinner2010-08-171-5/+5
|
* Issue #8202: Set sys.argv[0] to -m rather than -c while searching for the ↵Nick Coghlan2010-08-171-3/+7
| | | | module to execute. Also updates all the cmd_line_script tests to validate the setting of sys.path[0] and the current working directory
* Issue #9425: save/restore exception on filename encodingVictor Stinner2010-08-171-1/+6
| | | | _PyUnicode_AsString() raises an exception on unencodable filename.
* Issue #9599: Create PySys_FormatStdout() and PySys_FormatStderr()Victor Stinner2010-08-161-15/+67
| | | | | Write a message formatted by PyUnicode_FromFormatV() to sys.stdout and sys.stderr.
* Create _Py_fopen() for PyUnicodeObject pathVictor Stinner2010-08-141-0/+33
| | | | | | 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.
* _Py_stat(): ensure that path ends with a nul characterVictor Stinner2010-08-141-2/+3
|
* Issue #9425: Create private _Py_stat() functionVictor Stinner2010-08-141-0/+33
| | | | Use stat() or _wstat() depending on the OS.
* Issue #9203: Computed gotos are now enabled by default on supportedAntoine Pitrou2010-08-131-4/+17
| | | | | compilers (which are detected by the configure script). They can still be disable selectively by specifying --without-computed-gotos.
* Issue #9425: Create PyErr_WarnFormat() functionVictor Stinner2010-08-131-6/+40
| | | | | | | Similar to PyErr_WarnEx() but use PyUnicode_FromFormatV() to format the warning message. Strip also some trailing spaces.
* Issue #9425: NullImporter constructor is fully unicode compliantVictor Stinner2010-08-131-38/+52
| | | | | | * On non-Windows OSes: the constructor accepts bytes filenames and use surrogateescape for unicode filenames * On Windows: use GetFileAttributesW() instead of GetFileAttributesA()
* Issue #2443: Added a new macro, Py_VA_COPY, which is equivalent to C99Alexander Belopolsky2010-08-112-45/+5
| | | | | va_copy, but available on all python platforms. Untabified a few unrelated files.
* Issue #8411: new condition variable emulation under Windows for the new GIL,Antoine Pitrou2010-08-101-52/+105
| | | | | by Kristján. Unfortunately the 3.x Windows buildbots are in a wreck, so we'll have to watch them when they become fit again.
* Issue #9425: Create load_builtin() subfunctionVictor Stinner2010-08-091-30/+40
| | | | Just move the code and some variables.
* Issue #477863: Print a warning at shutdown if gc.garbage is not empty.Antoine Pitrou2010-08-081-0/+3
|
* Issue #9425: fix setup_context() for non-ascii filenamesVictor Stinner2010-08-081-13/+11
| | | | | | | | | | setup_context() replaces .pyc or .pyo filename suffix by .py, but it didn't work if the filename contains a non-ascii character because the function used the wrong unit for the length (number of characters instead of the number of bytes). With this patch, it uses unicode filenames instead of bytes filenames, to fix the bug and to be fully unicode compliant.
* Issue #5319: Print an error if flushing stdout fails at interpreterAntoine Pitrou2010-08-081-1/+1
| | | | shutdown.
* Issue #9079: Added _PyTime_gettimeofday(_PyTime_timeval *tp) to C APIAlexander Belopolsky2010-08-052-0/+62
| | | | | | exposed in Python.h. This function is similar to POSIX gettimeofday(struct timeval *tp), but available on platforms without gettimeofday().
* Remove trailing whitespace.Georg Brandl2010-07-311-1/+1
|
* Update copyright years and add releases to release list. Also update Sphinx ↵Georg Brandl2010-07-311-1/+1
| | | | version number.
* Issue #8991: convertbuffer() rejects discontigious buffersVictor Stinner2010-07-281-21/+8
|
* revert unintended changesBenjamin Peterson2010-07-203-20/+11
|
* move test_trace.py so as not to conflict with future tests for the trace moduleBenjamin Peterson2010-07-203-11/+20
|
* Regenerate Python/graminit.c.Mark Dickinson2010-07-121-18/+82
|
* #3071: tell how many values were expected when unpacking too many.Georg Brandl2010-07-101-1/+2
|
* - sysmodule.c (get_hash_info): Define as static function.Matthias Klose2010-07-061-1/+1
|
* Merged revisions 77402,77505,77510 via svnmerge fromBenjamin Peterson2010-06-281-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77402 | brett.cannon | 2010-01-09 20:56:19 -0600 (Sat, 09 Jan 2010) | 12 lines DeprecationWarning is now silent by default. This was originally suggested by Guido, discussed on the stdlib-sig mailing list, and given the OK by Guido directly to me. What this change essentially means is that Python has taken a policy of silencing warnings that are only of interest to developers by default. This should prevent users from seeing warnings which are triggered by an application being run against a new interpreter before the app developer has a chance to update their code. Closes issue #7319. Thanks to Antoine Pitrou, Ezio Melotti, and Brian Curtin for helping with the issue. ........ r77505 | brett.cannon | 2010-01-14 14:00:28 -0600 (Thu, 14 Jan 2010) | 7 lines The silencing of DeprecationWarning was not taking -3 into consideration. Since Py3K warnings are DeprecationWarning by default this was causing -3 to essentially be a no-op. Now DeprecationWarning is only silenced if -3 is not used. Closes issue #7700. Thanks Ezio Melotti and Florent Xicluna for patch help. ........ r77510 | brett.cannon | 2010-01-14 19:31:45 -0600 (Thu, 14 Jan 2010) | 1 line Remove C++/C99-style comments. ........
* Merged revisions 81380 via svnmerge fromBenjamin Peterson2010-06-271-1/+2
| | | | | | | | | | | | | | | | 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. ........
* Merged revisions 81465-81466,81468,81679,81735,81760,81868,82183 via ↵Benjamin Peterson2010-06-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r81465 | georg.brandl | 2010-05-22 06:29:19 -0500 (Sat, 22 May 2010) | 2 lines Issue #3924: Ignore cookies with invalid "version" field in cookielib. ........ r81466 | georg.brandl | 2010-05-22 06:31:16 -0500 (Sat, 22 May 2010) | 1 line Underscore the name of an internal utility function. ........ r81468 | georg.brandl | 2010-05-22 06:43:25 -0500 (Sat, 22 May 2010) | 1 line #8635: document enumerate() start parameter in docstring. ........ r81679 | benjamin.peterson | 2010-06-03 16:21:03 -0500 (Thu, 03 Jun 2010) | 1 line use a set for membership testing ........ r81735 | michael.foord | 2010-06-05 06:46:59 -0500 (Sat, 05 Jun 2010) | 1 line Extract error message truncating into a method (unittest.TestCase._truncateMessage). ........ r81760 | michael.foord | 2010-06-05 14:38:42 -0500 (Sat, 05 Jun 2010) | 1 line Issue 8302. SkipTest exception is setUpClass or setUpModule is now reported as a skip rather than an error. ........ r81868 | benjamin.peterson | 2010-06-09 14:45:04 -0500 (Wed, 09 Jun 2010) | 1 line fix code formatting ........ r82183 | benjamin.peterson | 2010-06-23 15:29:26 -0500 (Wed, 23 Jun 2010) | 1 line cpython only gc tests ........