summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Possibly the end of SF [#460020] bug or feature: unicode() and subclasses.Tim Peters2001-09-111-2/+2
| | | | | Changed unicode(i) to return a true Unicode object when i is an instance of a unicode subclass. Added PyUnicode_CheckExact macro.
* Added another test of str() applied to a string subclass instance,Tim Peters2001-09-111-0/+4
| | | | | involving embedded null bytes, since it's possible to screw that up w/o screwing up cases w/o embedded nulls.
* More on SF bug [#460020] bug or feature: unicode() and subclasses.Tim Peters2001-09-111-1/+1
| | | | | Repaired str(i) to return a genuine string when i is an instance of a str subclass. New PyString_CheckExact() macro.
* More on SF bug [#460020] bug or feature: unicode() and subclasses.Tim Peters2001-09-101-1/+1
| | | | | | | | tuple(i) repaired to return a true tuple when i is an instance of a tuple subclass. Added PyTuple_CheckExact macro. PySequence_Tuple(): if a tuple-like object isn't exactly a tuple, it's not safe to return the object as-is -- make a new tuple of it instead.
* test_dir(): Add tests for dir(i) where i is a module subclass.Tim Peters2001-09-101-0/+23
|
* more xmlrpclib tweaks: fixed repr(Fault()); enable UTF-8 parsing inFredrik Lundh2001-09-101-12/+17
| | | | xmllib (on 2.0 and later)
* More for SF bug [#460020] bug or feature: unicode() and subclassesTim Peters2001-09-101-1/+1
| | | | | Repair float constructor to return a true float when passed a subclass instance. New PyFloat_CheckExact macro.
* SF bug #460020: bug or feature: unicode() and subclasses.Tim Peters2001-09-101-0/+21
| | | | | | | | | | | Given an immutable type M, and an instance I of a subclass of M, the constructor call M(I) was just returning I as-is; but it should return a new instance of M. This fixes it for M in {int, long}. Strings, floats and tuples remain to be done. Added new macros PyInt_CheckExact and PyLong_CheckExact, to more easily distinguish between "is" and "is a" (i.e., only an int passes PyInt_CheckExact, while any sublass of int passes PyInt_Check). Added private API function _PyLong_Copy.
* sync with pythonware codebase: much faster import (doesn't importFredrik Lundh2001-09-101-65/+70
| | | | | xmllib unless needed), merged docstring patches, added overridable Transport.getparser to simplify plugging in different parsers.
* Remove two XXX comments that have been resolved.Guido van Rossum2001-09-101-2/+0
|
* Move the global variables 'size' and 'name' to the top -- these areGuido van Rossum2001-09-101-5/+5
| | | | | "module parameters", and used in the Windows test (which crashed because size was undefined -- sigh).
* Change the criteria for skipping the test.Guido van Rossum2001-09-101-19/+22
| | | | | | | | | | | | | | | If on Windows, we require the 'largefile' resource. If not on Windows, we use a test that actually writes a byte beyond the 2BG limit -- seeking alone is not sufficient, since on some systems (e.g. Linux with glibc 2.2) the sytem call interface supports large seek offsets but not all filesystem implementations do. Note that on Windows, we do not use the write test: on Win2K, that test can take a minute trying to zero all those blocks on disk, and on Windows our code always supports large seek offsets (but again, not all filesystems do). This may mean that on Win95, or on certain other backward filesystems, test_largefile will *fail*.
* Test the failed-unicode-decoding bug in PyArg_ParseTuple().Jeremy Hylton2001-09-101-0/+24
|
* Repair late-night doc typos.Tim Peters2001-09-102-3/+3
|
* Teach regrtest how to pass on doctest failure msgs. This is done via aTim Peters2001-09-098-27/+95
| | | | | | | | | | | horridly inefficient hack in regrtest's Compare class, but it's about as clean as can be: regrtest has to set up the Compare instance before importing a test module, and by the time the module *is* imported it's too late to change that decision. The good news is that the more tests we convert to unittest and doctest, the less the inefficiency here matters. Even now there are few tests with large expected-output files (the new cost here is a Python-level call per .write() when there's an expected- output file).
* Force "test." into the start of the module name, inherited by class andTim Peters2001-09-091-17/+11
| | | | type reprs, to accomodate the way Jack runs tests on the Mac.
* Generalize operator.indexOf (PySequence_Index) to work with anyTim Peters2001-09-081-0/+41
| | | | | | | | | | iterable object. I'm not sure how that got overlooked before! Got rid of the internal _PySequence_IterContains, introduced a new internal _PySequence_IterSearch, and rewrote all the iteration-based "count of", "index of", and "is the object in it or not?" routines to just call the new function. I suppose it's slower this way, but the code duplication was getting depressing.
* It appears that unittest was changed to stop hoarding raw exception data,Tim Peters2001-09-081-4/+1
| | | | | | | | | saving instead a traceback string, but test_support's run_unittest was still peeking into unittest internals and trying to pick apart unittest's errors and failures vectors as if they contained exc_info() tuples instead of strings. Whatever, when a unittest-based test failed, test_support blew up. I'm not sure this is the right way to fix it; it simply gets me unstuck.
* Merging in removal of this file from branch to trunk.Barry Warsaw2001-09-071-163/+0
|
* Patch #438790: Add additional mappings.Martin v. Löwis2001-09-071-3/+36
| | | | Also remove mappings that are not registered with IANA, and not extensions.
* Fix typo in error reporting. This doesn't need to go into the releaseTim Peters2001-09-071-1/+1
| | | | branch (if it ever gets to the typo, the test is failing anyway).
* Reverting to rev 1.2. Apparently gcc doesn't use the extended-precisionTim Peters2001-09-061-3/+16
| | | | | | | | capabilities of the Pentium FPU, so what should have been (and were on Windows) exact results got fuzzy. Then it turns out test_support.fcmp() isn't tolerant of tiny errors when *one* of the comparands is 0, but test_complex's old check_close_real() is. Rather than fix gcc <wink>, easier to revert this test and revisit after the release.
* Rewrite to use test_support's fine fcmp instead -- I didn't know thatTim Peters2001-09-061-16/+3
| | | | existed when I wrote this test.
* Added some underflow-to-0.0 long/long true division tests.Tim Peters2001-09-061-0/+6
|
* Rename 'getset' to 'property'.Guido van Rossum2001-09-063-19/+19
|
* Add missing period in docstring.Fred Drake2001-09-061-1/+1
| | | | (Steve, can you add this to the PyUnit repository as well?)
* Two small changes to the resource usage option:Guido van Rossum2001-09-062-4/+5
| | | | | | | | (1) Allow multiple -u options to extend each other (and the initial value of use_resources passed into regrtest.main()). (2) When a test is run stand-alone (not via regrtest.py), needed resources are always granted.
* Added tests for key deletion for both Weak*Dictionary flavors.Fred Drake2001-09-061-0/+22
| | | | This covers regression on SF bug #458860.
* Add __delitem__() support for WeakKeyDictionary.Fred Drake2001-09-061-0/+7
| | | | This closes SF bug #458860.
* Skip instead of fail this test if the socket module has no sslGuido van Rossum2001-09-061-0/+3
| | | | support.
* Patch #416079: fix the debug string output when receiving telnet commands.Martin v. Löwis2001-09-061-5/+82
| | | | | | added all the telnet options known to arpa/telnet.h added all the options registered with IANA as of today added the possibility for the user to have it's own option negotiation callback
* Changed TestResult to store only the text representation of an error.Steve Purcell2001-09-061-10/+15
| | | | | | | | | | | | | | | | | | | | This patch is similar to that proposed by Jeremy. The proposed patch altered the interface of TestResult such that it would be passed the error information as a string rather than an exc_info() tuple. The implemented change leaves the interface untouched so that TestResults are still passed the tracebacks, but stor them in stringified form for later reporting. Notes: - Custom subclasses of TestResult written by users should be unaffected. - The existing 'unittestgui.py' will still work with this module after the change. - Support can later be added to pop into the debugger when an error occurs; this support should be added to a TestRunner rather than to TestCase itself, which this change will enable. (Jeremy, Fred, Guido: Thanks for all the feedback)
* Dubious assumptions:Tim Peters2001-09-061-5/+10
| | | | | | | | | | | 1. That seeking beyond the end of a file increases the size of a file. 2. That files so extended are magically filled with null bytes. I find no support for either in the C std, and #2 in particular turns out not to be true on Win32 (you apparently see whatever trash happened to be on disk). Left #1 intact, but changed the test to check only bytes it explicitly wrote. Also fiddled the "expected" vs "got" failure reports to consistently use repr (%r) -- they weren't readable otherwise.
* Enable large file support on Win32 systems.Tim Peters2001-09-061-4/+4
| | | | | | | | | Curious: the MS docs say stati64 etc are supported even on Win95, but Win95 doesn't support a filesystem that allows partitions > 2 Gb. test_largefile: This was opening its test file in text mode. I have no idea how that worked under Win64, but it sure needs binary mode on Win98. BTW, on Win98 test_largefile runs quickly (under a second).
* Rework the way we try to check for libm overflow, given that C99 no longerTim Peters2001-09-051-1/+1
| | | | | | | | | | | | | | | requires that errno ever get set, and it looks like glibc is already playing that game. New rules: + Never use HUGE_VAL. Use the new Py_HUGE_VAL instead. + Never believe errno. If overflow is the only thing you're interested in, use the new Py_OVERFLOWED(x) macro. If you're interested in any libm errors, use the new Py_SET_ERANGE_IF_OVERFLOW(x) macro, which attempts to set errno the way C89 said it worked. Unfortunately, none of these are reliable, but they work on Windows and I *expect* under glibc too.
* LongReprTest fails on the Mac because it uses filenames with more thanJack Jansen2001-09-051-1/+2
| | | | | | 32 characters per component. This makes mkdir() calls and such fail with EINVAL. For now I am disabling the test on the Mac, and I'll open a bugreport.
* Class FieldStorage: add two new methods, getfirst() and getlist(),Guido van Rossum2001-09-051-0/+22
| | | | | | that provide a somewhat more uniform interface to getting values. This is from SF patch #453691.
* class Listbox: add itemcget, to satisfy SF patch #457713.Guido van Rossum2001-09-051-1/+5
| | | | Fix up docstring for itemconfigure.
* [ #458701 ] Patch to zipfile.py for JavaFinn Bock2001-09-051-5/+9
| | | | | Patch by Jim Ahlstrom which lets java's zipfile classes read zipfiles create by zipfile.py.
* Remove a debug print left in the code by Fred.Guido van Rossum2001-09-051-1/+0
|
* Patch #449815: Set filesystemencoding based on CODESET.Martin v. Löwis2001-09-051-1/+15
|
* Patch #453627: Adds a list of tests that are expected to be skipped for ↵Martin v. Löwis2001-09-051-0/+24
| | | | UnixWare 7.x systems.
* Patch #428326: New class threading.Timer.Martin v. Löwis2001-09-051-1/+30
|
* Implement PEP250: Use Lib/site-packages under windows.Thomas Heller2001-09-051-311/+306
| | | | | | | | | bdist_wininst doesn't use the NT SCHEME any more, instead a custom SCHEME is used, which is exchanged at installation time, depending on the python version used. Avoid a bogus warning frpom install_lib about installing into a directory not on sys.path.
* [Bug #404274] Restore some special-case code for AIX and BeOS under 1.5.2.Andrew M. Kuchling2001-09-051-1/+28
| | | | | This will have to stay until we decide to drop 1.5.2 compatibility completely.
* Another / that should be a // (previously not caught because ofGuido van Rossum2001-09-051-1/+1
| | | | incomplete coverage of the test suite).
* Add a test for the final branch in repr.Repr.repr1(), which deals withGuido van Rossum2001-09-051-0/+5
| | | | a default repr() that's longer than 20 characters.
* Return reasonable results for math.log(long) and math.log10(long) (we wereTim Peters2001-09-051-3/+37
| | | | | | getting Infs, NaNs, or nonsense in 2.1 and before; in yesterday's CVS we were getting OverflowError; but these functions always make good sense for positive arguments, no matter how large).
* [Bug #444589] Record empty directories in the install_data commandAndrew M. Kuchling2001-09-041-4/+12
| | | | Slightly modified version of patch from Jon Nelson (jnelson).
* [Bug #436732] install.py does not record a created *.pth file in theAndrew M. Kuchling2001-09-041-2/+5
| | | | | INSTALLED_FILES output. Modified version of a patch from Jon Nelson (jnelson)