summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Issue2681: the literal 0o8 was wrongly accepted, and evaluated as float(0.0).Amaury Forgeot d'Arc2008-04-241-1/+1
| | | | | This happened only when 8 is the first digit. Credits go to Lukas Meuser.
* Issue #2670: urllib2.build_opener() failed when two handlersAmaury Forgeot d'Arc2008-04-222-3/+9
| | | | | | derive the same default base class. Will backport.
* Major improvements:Gregory P. Smith2008-04-221-34/+76
| | | | | | | | | * Default to using /dev/tty for the password prompt and input before falling back to sys.stdin and sys.stderr. * Use sys.stderr instead of sys.stdout. * print the 'password may be echoed' warning to stream used to display the prompt rather than always sys.stderr. * warn() with GetPassWarning when input may be echoed.
* Issue 2665: On Windows, sys.stderr does not contain a valid file when ↵Amaury Forgeot d'Arc2008-04-212-4/+24
| | | | | | | | | | running without a console. It seems to work, but will fail at the first flush. This causes IDLE to crash when too many warnings are printed. Will backport.
* If sys.stdin is not a tty, fall back to default_getpass after printingGregory P. Smith2008-04-211-0/+4
| | | | a warning instead of failing with a termios.error.
* Comment typoAndrew M. Kuchling2008-04-211-1/+1
|
* Correct an apparent refleak in test_pkgutil: zipimport._zip_directory_cache ↵Amaury Forgeot d'Arc2008-04-201-0/+3
| | | | | | contains info for all processed zip files, even when they are no longer used.
* Add test for tanh(-0.) == -0. on IEEE 754 systemsMark Dickinson2008-04-201-0/+58
|
* Yet more explicit special case handling to makeMark Dickinson2008-04-201-0/+12
| | | | | | math.pow behave on alpha Tru64. All IEEE 754 special values are now handled directly; only the finite**finite case is handled by libm.
* Report additional diagnostic information inMark Dickinson2008-04-201-1/+6
| | | | | test_math, to help track down debian-alpha buildbot failure.
* Additional tests for math.pow, and extra special-caseMark Dickinson2008-04-191-10/+124
| | | | | handling code in math.pow, in the hope of making all tests pass on the alpha Tru64 buildbot.
* Added kill, terminate and send_signal to subprocess.PopenChristian Heimes2008-04-192-0/+78
| | | | The bits and pieces for the Windows side were already in place. The POSIX side is trivial (as usual) and uses os.kill().
* Some tests did not pass on repeated calls (regrtest -R::)Amaury Forgeot d'Arc2008-04-187-9/+29
| | | | Perform additional cleanup, mostly deleting from sys.modules, or clearing the warnings registry.
* I finally got the time to update and merge Mark's and my trunk-math branch. ↵Christian Heimes2008-04-185-30/+3106
| | | | | | The patch is collaborated work of Mark Dickinson and me. It was mostly done a few months ago. The patch fixes a lot of loose ends and edge cases related to operations with NaN, INF, very small values and complex math. The patch also adds acosh, asinh, atanh, log1p and copysign to all platforms. Finally it fixes differences between platforms like different results or exceptions for edge cases. Have fun :)
* resolve issue 2014Skip Montanaro2008-04-182-11/+30
|
* Add test file missing from rev 62350Nick Coghlan2008-04-151-0/+123
|
* Issue 2439: add pkgutils.get_data() as a convenience wrapper for the PEP 302 ↵Nick Coghlan2008-04-151-0/+37
| | | | get_data() API (contributed by Paul Moore)
* Issue #2616: Implement ctypes.pointer() and ctypes.POINTER() in C forThomas Heller2008-04-141-25/+1
| | | | better performance.
* Fix spliting on colons on Windows machines with a file path by limiting theBrett Cannon2008-04-131-3/+1
| | | | number of splits.
* Add an explicit check for output in a test to try to diagnose a failure onBrett Cannon2008-04-131-1/+4
| | | | Windows.
* spellingSkip Montanaro2008-04-131-1/+1
|
* Fix test_warnings by making the state of things more consistent for each testBrett Cannon2008-04-131-29/+42
| | | | when it is run.
* Backport the removal of a __repr__ from 62251Benjamin Peterson2008-04-131-3/+0
|
* Backported io module docsBenjamin Peterson2008-04-131-133/+285
|
* Re-implement the 'warnings' module in C. This allows for usage of theBrett Cannon2008-04-123-207/+492
| | | | | | | | | 'warnings' code in places where it was previously not possible (e.g., the parser). It could also potentially lead to a speed-up in interpreter start-up if the C version of the code (_warnings) is imported over the use of the Python version in key places. Closes issue #1631171.
* socket.error inherits from IOError, it no longer needs listing inGregory P. Smith2008-04-121-1/+1
| | | | the all_errors tuple.
* Remove the test file before writing it in case there is no write permission.Neal Norwitz2008-04-104-5/+7
| | | | | | This might help fix some of the failures on Windows box(es). It doesn't hurt either way and ensure the tests are a little more self contained (ie have less assumptions).
* Merged revisions 62080-62262 via svnmerge fromMartin v. Löwis2008-04-106-13/+119
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3 ........ r62092 | collin.winter | 2008-04-01 18:27:10 +0200 (Di, 01 Apr 2008) | 1 line Add get_prev_sibling() to complement pytree's get_next_sibling(). ........ r62226 | collin.winter | 2008-04-08 21:07:56 +0200 (Di, 08 Apr 2008) | 1 line Add min() and max() to the list of special contexts that don't require adding list() calls around dict methods. ........ r62232 | collin.winter | 2008-04-09 00:12:38 +0200 (Mi, 09 Apr 2008) | 4 lines Fix for http://bugs.python.org/issue2596 This extends fix_xrange to know about the (mostly) same special contexts as fix_dict (where a special context is something that is guaranteed to fully consume the iterable), adding list() calls where appropriate. It also special-cases "x in range(y)". ........
* better diagnosticsGregory P. Smith2008-04-091-2/+2
|
* #2585: initialize code attribute of HTTPError.Georg Brandl2008-04-091-1/+1
|
* Changed test so it no longer runs as a side effect of importing.Jerry Seutter2008-04-091-110/+115
|
* Fix typo with regards to self.PORT shadowing class variables with the same name.Trent Nelson2008-04-092-7/+8
|
* Fix zlib crash from zlib.decompressobj().flush(val) when val was not positive.Gregory P. Smith2008-04-091-0/+5
| | | | It tried to allocate negative or zero memory. That fails.
* - Issue #2550: The approach used by client/server code for obtaining portsTrent Nelson2008-04-0812-651/+679
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to listen on in network-oriented tests has been refined in an effort to facilitate running multiple instances of the entire regression test suite in parallel without issue. test_support.bind_port() has been fixed such that it will always return a unique port -- which wasn't always the case with the previous implementation, especially if socket options had been set that affected address reuse (i.e. SO_REUSEADDR, SO_REUSEPORT). The new implementation of bind_port() will actually raise an exception if it is passed an AF_INET/SOCK_STREAM socket with either the SO_REUSEADDR or SO_REUSEPORT socket option set. Furthermore, if available, bind_port() will set the SO_EXCLUSIVEADDRUSE option on the socket it's been passed. This currently only applies to Windows. This option prevents any other sockets from binding to the host/port we've bound to, thus removing the possibility of the 'non-deterministic' behaviour, as Microsoft puts it, that occurs when a second SOCK_STREAM socket binds and accepts to a host/port that's already been bound by another socket. The optional preferred port parameter to bind_port() has been removed. Under no circumstances should tests be hard coding ports! test_support.find_unused_port() has also been introduced, which will pass a temporary socket object to bind_port() in order to obtain an unused port. The temporary socket object is then closed and deleted, and the port is returned. This method should only be used for obtaining an unused port in order to pass to an external program (i.e. the -accept [port] argument to openssl's s_server mode) or as a parameter to a server-oriented class that doesn't give you direct access to the underlying socket used. Finally, test_support.HOST has been introduced, which should be used for the host argument of any relevant socket calls (i.e. bind and connect). The following tests were updated to following the new conventions: test_socket, test_smtplib, test_asyncore, test_ssl, test_httplib, test_poplib, test_ftplib, test_telnetlib, test_socketserver, test_asynchat and test_socket_ssl. It is now possible for multiple instances of the regression test suite to run in parallel without issue.
* Issue 2408: remove the _types moduleAmaury Forgeot d'Arc2008-04-081-11/+3
| | | | | | | | | It was only used as a helper in types.py to access types (GetSetDescriptorType and MemberDescriptorType), when they can easily be obtained with python code. These expressions even work with Jython. I don't know what the future of the types module is; (cf. discussion in http://bugs.python.org/issue1605 ) at least this change makes it simpler.
* Prevent an error when inspect.isabstract() is called with something else ↵Amaury Forgeot d'Arc2008-04-081-1/+1
| | | | than a new-style class.
* Issue2564: Prevent a hang in "import test.autotest", which runs the entire testAmaury Forgeot d'Arc2008-04-082-5/+3
| | | | | | | suite as a side-effect of importing the module. - in test_capi, a thread tried to import other modules - re.compile() imported sre_parse again on every call.
* Issue #2513: enable 64bit cross compilation on windows.Mark Hammond2008-04-0710-54/+135
|
* Make file objects as thread safe as the underlying libc FILE* implementation.Gregory P. Smith2008-04-061-1/+167
| | | | | | | | | | | close() will now raise an IOError if any operations on the file object are currently in progress in other threads. Most code was written by Antoine Pitrou (pitrou). Additional testing, documentation and test suite cleanup done by me (gregory.p.smith). Fixes issue 815646 and 595601 (as well as many other bugs and references to this problem dating back to the dawn of Python).
* Add enough debugging information to diagnose failures where theJeffrey Yasskin2008-04-061-5/+14
| | | | | | | | HandlerBException is ignored, and fix one such problem, where it was thrown during the __del__ method of the previous Popen object. We may want to find a better way of printing verbose information so it's not spammy when the test passes.
* Fix test_distutils to not fail when running 'make test' from a Python buildThomas Wouters2008-04-051-1/+21
| | | | | | | | | directory that is not the source directory (ie, one created using '/path/to/source/configure'.) Leaves this test very slightly degraded in that particular case, compared to the build-in-sourcedir case, but that case isn't a particularly strong test either: neither test the actual path that will be used after installing. There isn't a particularly good way to test this, and a poor test beats a failing test.
* Prevent test_sqlite from hanging on older versions of sqlite.Neal Norwitz2008-04-051-0/+8
| | | | | | | | | | The problem is that when trying to do the second insert, sqlite seems to sleep for a very long time. Here is the output from strace: read(6, "SQLite format 3\0\4\0\1\1\0@ \0\0\0\1\0\0\0\0"..., 1024) = 1024 nanosleep({4294, 966296000}, <unfinished ...> I don't know which version this was fixed in, but 3.2.1 definitely fails.
* Revert r62152 (Issue #2550). Being able to observe the results of all the ↵Trent Nelson2008-04-041-76/+0
| | | | buildbots was certainly useful. All of the platforms that have some form of BSD lineage -- FreeBSD, OS X, Solaris and Tru64 -- all pass the test. Windows and Linux, on the other hand, don't. Windows I knew about, Linux was a surprise. Knowing this, I believe a more appropriate fix will revolve around test_support.bind_socket() -- this method needs to return a port that nothing in the system has bound already. The best way to do this may just be to rely on ephemeral ports, rather than having the user specify a desired port, then fall back to four random ports, then try 0.
* Issue 2550: extend test_socket.py to test SO_REUSEADDR semantics when bind() ↵Trent Nelson2008-04-041-0/+76
| | | | is called on identical (host, port) combinations in two separate sockets. This should raise an EADDRINUSE socket.error in all cases, irrespective of whether or not SO_REUSEADDR is set on the sockets. However, with Windows, when SO_REUSEADDR is set on the sockets, no error is thrown (an error is thrown when the option isn't set), which results in an extremely wedged python process whenever accept() is called on either of the bound sockets. I'm committing this test now to observe if it's only Windows that has this behaviour (via the buildbots). Note: this WILL break all Windows buildbots for now; once I've observed the results on other platforms, I'll revert, then start looking into a patch.
* Oops again. EINTR is in errno, not signal.Jeffrey Yasskin2008-04-041-1/+1
|
* stupid, stupid, stupid!Fred Drake2008-04-041-1/+0
|
* my previous change did what I said it should not: it changed the currentFred Drake2008-04-042-7/+48
| | | | | | | directory to the directory in which the setup.py script lived (which made __file__ wrong) fixed, with test that the script is run in the current directory of the caller
* Issue #2543: Make ctypes compatible (again) with Python 2.3, 2.4, and 2.5.Thomas Heller2008-04-041-1/+1
|
* - Issue #2385: distutils.core.run_script() makes __file__ available, so theFred Drake2008-04-042-1/+42
| | | | | controlled environment will more closely mirror the typical script environment. This supports setup.py scripts that refer to data files.
* Doh! os.read() raises an OSError, not an IOError when it's interrupted.Jeffrey Yasskin2008-04-041-2/+5
| | | | | And fix some flakiness in test_itimer_prof, which could detect that the timer had reached 0 before the signal arrived announcing that fact.