summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Issue #8605: Skip test_gdb if Python is compiled with optimizations.Antoine Pitrou2010-07-081-0/+10
|
* In test_decimal, convert heuristic for skipping tests into an explicit skiplist.Mark Dickinson2010-07-081-41/+35
|
* ValueError in this case is also acceptableBenjamin Peterson2010-07-071-4/+8
|
* don't ignore exceptions from PyObject_IsTrueBenjamin Peterson2010-07-071-0/+6
|
* this needn't be in the loopBenjamin Peterson2010-07-071-2/+2
|
* Issue #9186: log1p(-1.0) should raise ValueError, not OverflowError.Mark Dickinson2010-07-072-8/+72
|
* Issue #9000: datetime.timezone objects now have eval-friendly repr.Alexander Belopolsky2010-07-061-0/+9
|
* Fix test_xmlrpc_net to no longer fail since there are no more buildbots for ↵Brett Cannon2010-07-051-1/+1
| | | | trunk.
* Added two more test cases for datetimeAlexander Belopolsky2010-07-051-0/+6
|
* looking up on the type is correct, so this isn't an XXXBenjamin Peterson2010-07-051-7/+0
|
* Added more tests for utctimetuple()Alexander Belopolsky2010-07-051-1/+21
|
* pydoc still has a silly encodingBenjamin Peterson2010-07-051-1/+1
|
* Revert -r82559; it's not clear that this is the right thing to do, and the ↵Mark Dickinson2010-07-041-2/+3
| | | | change obscures the original intentions.
* Re-encode shlex.py in UTF-8, and remove coding cookie.Mark Dickinson2010-07-041-3/+2
|
* Remove coding cookie from heapq.py.Mark Dickinson2010-07-041-3/+1
|
* Issue #9130: Validate ellipsis tokens in relative imports.Mark Dickinson2010-07-041-0/+6
|
* Fix symbol numbers in test_parser test.Mark Dickinson2010-07-041-8/+8
|
* Issue #9130: Fix validation of relative imports in parser module.Mark Dickinson2010-07-041-0/+20
|
* Issue #9118: help(None) will now return NoneType doc instead ofAlexander Belopolsky2010-07-041-2/+3
| | | | starting interactive help.
* Merged revisions 81478,82530-82531 via svnmerge fromBenjamin Peterson2010-07-042-2/+9
| | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r81478 | benjamin.peterson | 2010-05-22 13:47:39 -0500 (Sat, 22 May 2010) | 1 line ensure doctests have some future_features ........ r82530 | benjamin.peterson | 2010-07-04 11:11:41 -0500 (Sun, 04 Jul 2010) | 1 line simplify ignore star imports from itertools #8892 ........ r82531 | benjamin.peterson | 2010-07-04 11:13:20 -0500 (Sun, 04 Jul 2010) | 1 line wrap with parenthesis not \ ........
* Issue #9128: Fix validation of class decorators in parser module.Mark Dickinson2010-07-041-0/+7
|
* Make importlib.abc.SourceLoader the primary mechanism for importlib.Brett Cannon2010-07-032-27/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This required moving the class from importlib/abc.py into importlib/_bootstrap.py and jiggering some code to work better with the class. This included changing how the file finder worked to better meet import semantics. This also led to fixing importlib to handle the empty string from sys.path as import currently does (and making me wish we didn't support that instead just required people to insert '.' instead to represent cwd). It also required making the new set_data abstractmethod create any needed subdirectories implicitly thanks to __pycache__ (it was either this or grow the SourceLoader ABC to gain an 'exists' method and either a mkdir method or have set_data with no data arg mean to create a directory). Lastly, as an optimization the file loaders cache the file path where the finder found something to use for loading (this is thanks to having a sourceless loader separate from the source loader to simplify the code and cut out stat calls). Unfortunately test_runpy assumed a loader would always work for a module, even if you changed from underneath it what it was expected to work with. By simply dropping the previous loader in test_runpy so the proper loader can be returned by the finder fixed the failure. At this point importlib deviates from import on two points: 1. The exception raised when trying to import a file is different (import does an explicit file check to print a special message, importlib just says the path cannot be imported as if it was just some module name). 2. the co_filename on a code object is not being set to where bytecode was actually loaded from instead of where the marshalled code object originally came from (a solution for this has already been agreed upon on python-dev but has not been implemented yet; issue8611).
* Make importlib.abc.SourceLoader the primary mechanism for importlib.Brett Cannon2010-07-033-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This required moving the class from importlib/abc.py into importlib/_bootstrap.py and jiggering some code to work better with the class. This included changing how the file finder worked to better meet import semantics. This also led to fixing importlib to handle the empty string from sys.path as import currently does (and making me wish we didn't support that instead just required people to insert '.' instead to represent cwd). It also required making the new set_data abstractmethod create any needed subdirectories implicitly thanks to __pycache__ (it was either this or grow the SourceLoader ABC to gain an 'exists' method and either a mkdir method or have set_data with no data arg mean to create a directory). Lastly, as an optimization the file loaders cache the file path where the finder found something to use for loading (this is thanks to having a sourceless loader separate from the source loader to simplify the code and cut out stat calls). Unfortunately test_runpy assumed a loader would always work for a module, even if you changed from underneath it what it was expected to work with. By simply dropping the previous loader in test_runpy so the proper loader can be returned by the finder fixed the failure. At this point importlib deviates from import on two points: 1. The exception raised when trying to import a file is different (import does an explicit file check to print a special message, importlib just says the path cannot be imported as if it was just some module name). 2. the co_filename on a code object is not being set to where bytecode was actually loaded from instead of where the marshalled code object originally came from (a solution for this has already been agreed upon on python-dev but has not been implemented yet; issue8611).
* Fix a spelling mistake in a comment.Brett Cannon2010-07-031-1/+1
|
* Make importlib.abc.SourceLoader the primary mechanism for importlib.Brett Cannon2010-07-0316-542/+415
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This required moving the class from importlib/abc.py into importlib/_bootstrap.py and jiggering some code to work better with the class. This included changing how the file finder worked to better meet import semantics. This also led to fixing importlib to handle the empty string from sys.path as import currently does (and making me wish we didn't support that instead just required people to insert '.' instead to represent cwd). It also required making the new set_data abstractmethod create any needed subdirectories implicitly thanks to __pycache__ (it was either this or grow the SourceLoader ABC to gain an 'exists' method and either a mkdir method or have set_data with no data arg mean to create a directory). Lastly, as an optimization the file loaders cache the file path where the finder found something to use for loading (this is thanks to having a sourceless loader separate from the source loader to simplify the code and cut out stat calls). Unfortunately test_runpy assumed a loader would always work for a module, even if you changed from underneath it what it was expected to work with. By simply dropping the previous loader in test_runpy so the proper loader can be returned by the finder fixed the failure. At this point importlib deviates from import on two points: 1. The exception raised when trying to import a file is different (import does an explicit file check to print a special message, importlib just says the path cannot be imported as if it was just some module name). 2. the co_filename on a code object is not being set to where bytecode was actually loaded from instead of where the marshalled code object originally came from (a solution for this has already been agreed upon on python-dev but has not been implemented yet; issue8611).
* Issue #9094: Make python -m pickletools disassemble pickles given inAlexander Belopolsky2010-07-031-1/+40
| | | | the command line.
* Fix Issue5468 - urlencode to handle bytes and other alternate encodings.Senthil Kumaran2010-07-032-8/+140
| | | | (Extensive tests provided). Patch by Dan Mahn.
* Merged revisions 82492 via svnmerge fromVictor Stinner2010-07-031-0/+33
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82492 | victor.stinner | 2010-07-03 15:36:19 +0200 (sam., 03 juil. 2010) | 3 lines Issue #7673: Fix security vulnerability (CVE-2010-2089) in the audioop module, ensure that the input string length is a multiple of the frame size ........
* Issue 6507: accept source strings directly in dis.dis(). Original patch by ↵Nick Coghlan2010-07-032-2/+69
| | | | Daniel Urban
* Make test_import a little bit more robust for cleaning up after itself in theBrett Cannon2010-07-031-6/+8
| | | | face of a failure.
* Merged revisions 82461 via svnmerge fromBenjamin Peterson2010-07-021-42/+29
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82461 | benjamin.peterson | 2010-07-02 18:05:27 -0500 (Fri, 02 Jul 2010) | 1 line don't require the presence of __getformat__ or __setformat__; use requires_IEEE_754 globally ........
* fix lookup of __ceil__Benjamin Peterson2010-07-021-0/+1
|
* correctly lookup __trunc__ and __floor__Benjamin Peterson2010-07-011-0/+3
|
* Update PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629.Ezio Melotti2010-07-012-10/+165
| | | | | | | | | | | | | 1) #8271: when a byte sequence is invalid, only the start byte and all the valid continuation bytes are now replaced by U+FFFD, instead of replacing the number of bytes specified by the start byte. See http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (pages 94-95); 2) 5- and 6-bytes-long UTF-8 sequences are now considered invalid (no changes in behavior); 3) Change the error messages "unexpected code byte" to "invalid start byte" and "invalid data" to "invalid continuation byte"; 4) Add an extensive set of tests in test_unicode; 5) Fix test_codeccallbacks because it was failing after this change.
* Merged revisions 82404 via svnmerge fromGiampaolo Rodolà2010-06-301-8/+13
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82404 | giampaolo.rodola | 2010-06-30 19:38:28 +0200 (mer, 30 giu 2010) | 1 line fix issue #6589: cleanup asyncore.socket_map if smtpd.SMTPServer constructor raises an exception ........
* Merged revisions 82403 via svnmerge fromBenjamin Peterson2010-06-301-0/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82403 | benjamin.peterson | 2010-06-30 12:11:08 -0500 (Wed, 30 Jun 2010) | 1 line mark test depending on ref counting ........
* Issue 9110. Adding ContextDecorator to contextlib. This enables the creation ↵Michael Foord2010-06-302-2/+176
| | | | of APIs that act as decorators as well as context managers. contextlib.contextmanager changed to use ContextDecorator.
* Issue #9011: Tests for Python 3.2's treatment of negated imaginary literals.Mark Dickinson2010-06-301-0/+17
|
* Merged revisions 82356 via svnmerge fromMark Dickinson2010-06-291-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82356 | mark.dickinson | 2010-06-29 08:37:25 +0100 (Tue, 29 Jun 2010) | 1 line Spelling. ........
* Merged revisions 82332 via svnmerge fromBenjamin Peterson2010-06-281-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82332 | benjamin.peterson | 2010-06-28 10:41:06 -0500 (Mon, 28 Jun 2010) | 1 line fix skipping condition ........
* Merged revisions 82330 via svnmerge fromBenjamin Peterson2010-06-281-1/+3
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82330 | benjamin.peterson | 2010-06-28 10:36:40 -0500 (Mon, 28 Jun 2010) | 1 line testcapi tests are definitely cpython only ........
* Merged revisions 82324 via svnmerge fromSenthil Kumaran2010-06-281-0/+5
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82324 | senthil.kumaran | 2010-06-28 19:26:46 +0530 (Mon, 28 Jun 2010) | 3 lines Fix Issue8653 - Docstring for urlunsplit function. ........
* Add an inheritance test for importlib.abc.SourceLoader.Brett Cannon2010-06-281-0/+5
|
* Move importlib.abc.SourceLoader to _bootstrap.Brett Cannon2010-06-283-105/+141
| | | | | | | | | | | Required updating code relying on other modules to switch to _bootstrap's unique module requirements. This led to the realization that get_code was being too liberal in its exception catching when calling set_data by blindly grabbing IOError. Shifted the responsibility of safely ignoring writes to a read-only path to set_data. Importlib is still not relying on SourceLoader yet; requires creating a SourcelessLoader and updating the source finder.
* fix test with more obviously incorrect bytecodeBenjamin Peterson2010-06-281-1/+1
|
* Merged revisions 77402,77505,77510 via svnmerge fromBenjamin Peterson2010-06-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. ........
* Implement importlib.abc.SourceLoader and deprecate PyLoader and PyPycLoader.Brett Cannon2010-06-272-16/+654
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | SourceLoader is a simplification of both PyLoader and PyPycLoader. If one only wants to use source, then they need to only implement get_data and get_filename. To also use bytecode -- sourceless loading is not supported -- then two abstract methods -- path_mtime and set_data -- need to be implemented. Compared to PyLoader and PyPycLoader, there are less abstract methods introduced and bytecode files become an optimization controlled by the ABC and hidden from the user (this need came about as PEP 3147 showed that not treating bytecode as an optimization can cause problems for compatibility). PyLoader is deprecated in favor of SourceLoader. To be compatible from Python 3.1 onwards, a subclass need only use simple methods for source_path and is_package. Otherwise conditional subclassing based on whether Python 3.1 or Python 3.2 is being is the only change. The documentation and docstring for PyLoader explain what is exactly needed. PyPycLoader is deprecated also in favor of SourceLoader. Because PEP 3147 shifted bytecode path details so much, there is no foolproof way to provide backwards-compatibility with SourceLoader. Because of this the class is simply deprecated and users should move to SourceLoader (and optionally PyLoader for Python 3.1). This does lead to a loss of support for sourceless loading unfortunately. At some point before Python 3.2 is released, SourceLoader will be moved over to importlib._bootstrap so that the core code of importlib relies on the new code instead of the old PyPycLoader code. This commit is being done now so that there is no issue in having the API in Python 3.1a1.
* Merged revisions 82303 via svnmerge fromBenjamin Peterson2010-06-271-0/+4
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82303 | benjamin.peterson | 2010-06-27 17:40:26 -0500 (Sun, 27 Jun 2010) | 1 line mark tracking tests as implementation details ........
* Merged revisions 81499,81506 via svnmerge fromBenjamin Peterson2010-06-274-4/+709
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81499 | georg.brandl | 2010-05-24 16:29:07 -0500 (Mon, 24 May 2010) | 1 line #8016: add the CP858 codec (approved by Benjamin). (Also add CP720 to the tests, it was missing there.) ........ r81506 | benjamin.peterson | 2010-05-24 17:04:53 -0500 (Mon, 24 May 2010) | 1 line set svn:eol-style ........
* Merged revisions 81380 via svnmerge fromBenjamin Peterson2010-06-271-0/+11
| | | | | | | | | | | | | | | | 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. ........