summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Added tests to ensure that list and dict "chunking" are actuallyTim Peters2003-02-111-1/+51
| | | | | | getting done. Since this isn't yet implemented in cPickle, the new tests are in TempAbstractPickleTests (which cPickle doesn't run).
* Get rid of the "bozo" __getstate__ that was inserted when __slots__Guido van Rossum2003-02-102-28/+22
| | | | | | was used. This simplifies some logic in copy_reg.py (used by pickling). It also broke a test, but this was rewritten to test the new feature. :-)
* [ 683376 ] Adding NotImplementedType to types.pyJust van Rossum2003-02-101-0/+1
|
* Add a few tests to test_count() to increase coverage inWalter Dörwald2003-02-101-0/+6
| | | | Object/unicodeobject.c::unicode_count().
* Fix copy&paste error: call title instead of countWalter Dörwald2003-02-101-1/+1
|
* Change filtertuple() to use tp_as_sequence->sq_itemWalter Dörwald2003-02-101-2/+1
| | | | | instead of PyTuple_GetItem, so an overwritten __getitem__ in a tuple subclass works. SF bug #665835.
* Punctuation fixes in docstrings.Jack Jansen2003-02-101-3/+3
|
* Added docstrings.Jack Jansen2003-02-101-6/+130
|
* - Better exception when the database isn't found.Jack Jansen2003-02-101-1/+3
| | | | | - Allow for "manual:" pseudo-scheme in downloadURL to signal that the download should be done manually.
* Pick up Makefile variable BASECFLAGS too. This is needed since OPT wasJack Jansen2003-02-101-2/+4
| | | | | split into OPT and BASECFLAGS (Makefile.pre.in rev. 1.108), because now there are essential CFLAGS in BASECFLAGS.
* Use MD5 checksums to check archive integrity and forestall downloads.Jack Jansen2003-02-101-11/+38
|
* Change filterstring() and filterunicode(): If theWalter Dörwald2003-02-101-13/+27
| | | | | | | | | | | | object is not a real str or unicode but an instance of a subclass, construct the output via looping over __getitem__. This guarantees that the result is the same for function==None and function==lambda x:x This doesn't happen for tuples, because filtertuple() uses PyTuple_GetItem(). (This was discussed on SF bug #665835).
* Added preInstall and postInstall commands to packages. PIL needs thisJack Jansen2003-02-101-1/+17
| | | | (preInstall, at least).
* patch #683515: "Add unicode support to compile(), eval() and exec"Just van Rossum2003-02-101-0/+4
| | | | Incorporated nnorwitz's comment re. Py__USING_UNICODE.
* Fix SF bug #683467, 'int' ability to generate longs not inheritedNeal Norwitz2003-02-101-0/+8
| | | | | | When subclassing from an int but not overriding __new__, long values were not converted properly. Try to convert longs into an int.
* Add tests and news entry about parser errors from bug #678518.Neal Norwitz2003-02-101-0/+17
|
* Strawman for a Package Install Manager for Python. It isn't CPAN yet, but atJack Jansen2003-02-091-0/+499
| | | | | less than 500 lines it already manages to test whether Numeric is installed, and can install it if it isn't, including any prerequisites.
* patch 680474 that fixes bug 679880: compile/eval/exec refused utf-8 bomJust van Rossum2003-02-091-0/+4
| | | | mark. Added unit test.
* Rename 'proto' keyword arg to 'protocol' . Greg Ward's suggestion.Guido van Rossum2003-02-091-17/+17
|
* C Code:Raymond Hettinger2003-02-092-9/+28
| | | | | | | | | | | | | | | * Removed the ifilter flag wart by splitting it into two simpler functions. * Fixed comment tabbing in C code. * Factored module start-up code into a loop. Documentation: * Re-wrote introduction. * Addede examples for quantifiers. * Simplified python equivalent for islice(). * Documented split of ifilter(). Sets.py: * Replace old ifilter() usage with new.
* The Python implementation of datetime was changed in ways that no longerTim Peters2003-02-081-31/+10
| | | | | | | tickle the 2.2.2 __cmp__ bug test_datetime used to tickle, so the workarounds for that bug no longer make sense in the test suite (which I'm still trying to keep as closely in synch as possible with Zope3's version).
* Fix compatibility for earlier versions of Python (than 2.3), whichBarry Warsaw2003-02-082-5/+15
| | | | doesn't have UserDict.DictMixin.
* Comparison for timedelta, time, date and datetime objects: __eq__ andTim Peters2003-02-071-18/+68
| | | | | | | | | | | | | | | | | __ne__ no longer complain if they don't know how to compare to the other thing. If no meaningful way to compare is known, saying "not equal" is sensible. This allows things like if adatetime in some_sequence: and somedict[adatetime] = whatever to work as expected even if some_sequence contains non-datetime objects, or somedict non-datetime keys, because they only call __eq__. It still complains (raises TypeError) for mixed-type comparisons in contexts that require a total ordering, such as list.sort(), use as a key in a BTree-based data structure, and cmp().
* Merge the test part of the below checkin to the sandbox and Zope3, soGuido van Rossum2003-02-071-0/+8
| | | | | | | | | | | | the tests will remain in sync: """ Tres discovered a weird bug when a datetime is pickled, caused by the shadowing of __year, __month, __day and the use of proxies. Here's a quick fix and a quick unit test. I don't quite understand why this wasn't caught by the pickling unit tests. """
* Reserve a range for Zope, not specifically for Zope 3.Guido van Rossum2003-02-071-1/+1
|
* Fix SF bug #642168, help() fails for some builtin topicsNeal Norwitz2003-02-071-2/+2
| | | | | | Fix pydoc when doing help for: and, or, not, UNICODE. Will backport.
* Somehow, copy() of a classic class object was handledGuido van Rossum2003-02-072-1/+2
| | | | | | atomically, but deepcopy() didn't support this at all. I don't see any reason for this, so I'm adding ClassType to the set of types that are deep-copied atomically.
* Add support for copy_reg.dispatch_table.Guido van Rossum2003-02-072-48/+77
| | | | | Rewrote copy() and deepcopy() without avoidable try/except statements; getattr(x, name, None) or dict.get() are much faster than try/except.
* Made AskFile* dialogs movable-modal by default, by providing a dummyJack Jansen2003-02-071-10/+26
| | | | | | | eventProc (which simply drops all events on the floor). Also added a method SetDefaultEventProc through which frameworks can set a global event handler (which can still be overridden on a per-call basis with the eventProc argument).
* Add __getnewargs__ method to classes that need it.Guido van Rossum2003-02-071-0/+4
| | | | (Yes, this is an incompatibility. I'll document it in PEP 307.)
* SF bug #681003: itertools issuesRaymond Hettinger2003-02-071-0/+3
| | | | | | | | | | | * Fixed typo in exception message for times() * Filled in missing times_traverse() * Document reasons that imap() did not adopt a None fill-in feature * Document that count(sys.maxint) will wrap-around on overflow * Add overflow test to islice() * Check that starmap()'s argument returns a tuple * Verify that imap()'s tuple re-use is safe * Make a similar tuple re-use (with safety check) for izip()
* SF bug 666444: 'help' makes linefeed only under Win32.Tim Peters2003-02-071-2/+2
| | | | | | Reverting one of those irritating "security fixes". fdopen() opens files in binary mode. That makes pydoc skip the \r\n on Windows that's need to make the output readable in the shell. Screw it.
* Got rid of macfs and FSSpecs.Jack Jansen2003-02-061-4/+3
|
* Move _better_reduce from copy.py to copy_reg.py, and also use it inGuido van Rossum2003-02-063-163/+83
| | | | pickle.py, where it makes save_newobj() unnecessary. Tests pass.
* Fix a bug in the way __getnewargs__ was handled.Guido van Rossum2003-02-062-1/+19
|
* Support all the new stuff supported by the new pickle code:Guido van Rossum2003-02-062-13/+109
| | | | | | - subclasses of list or dict - __reduce__ returning a 4-tuple or 5-tuple - slots
* A few naughty external scripts do 'raise getopt.error, "blah"', andAndrew M. Kuchling2003-02-061-1/+1
| | | | | now crash because two arguments are expected. Add a default value to keep those scripts running.
* Add DeprecationWarning when use_statcache argument is suppliedAndrew M. Kuchling2003-02-061-4/+12
| | | | Fix use of GetoptError, so demo() now works
* Remove a debug print statement.Guido van Rossum2003-02-061-1/+0
|
* Support __reduce__ returning a 4-tuple or 5-tuple.Guido van Rossum2003-02-062-1/+56
|
* A test suite for the copy module. This should provide full codeGuido van Rossum2003-02-061-0/+384
| | | | coverage.
* [Bug #680494] filecmp.py uses obsolete statcache module.Andrew M. Kuchling2003-02-061-17/+9
| | | | | | | Simply replace all uses of statcache with os.stat. Should I add a DeprecationWarning triggered if the use_statcache argument is supplied, so we can remove it in 2.4?
* Add test suite for filecmp.py, after some discussion on bug #680494.Andrew M. Kuchling2003-02-061-0/+128
| | | | | | Right now the test cases create a files and a directory in the temp. directory. Raymond suggested checking files in to the test/ directory, simplifying the setup/teardown methods; is that worth doing?
* SF bug 680864: test_datetime fails for non-unix epochTim Peters2003-02-061-12/+11
| | | | | | Apparently MAC OS 9 doesn't have POSIX-conforming timestamps. A test fails as a result, but at least for this specific test it's easy enough to get the POSIX epoch out of it.
* No need for a continuation line.Jeremy Hylton2003-02-061-2/+1
|
* Replace hasattr() + getattr() with single getattr() and default value.Jeremy Hylton2003-02-061-2/+1
|
* Updated version of [ 558544 ] cmd.py: add instance-specific stdin/outAnthony Baxter2003-02-061-20/+31
| | | | | | | | | | This patch adds stdin, stdout as optional arguments to the cmd.Cmd constructor (defaulting to sys.stdin, sys.stdout), and changes the Cmd methods throughout to use self.stdout.write() and self.stdin.foo for output and input. This allows much greater flexibility for using cmd - for instance, hooking it into a telnet server. Patch for library module and for documentation.
* [Patch #654421 from Matthew Mueller]Andrew M. Kuchling2003-02-051-2/+2
| | | | | | | | | gzip shouldn't raise ValueError on corrupt files Currently the gzip module will raise a ValueError if the file was corrupt (bad crc or bad size). I can't see how that applies to reading a corrupt file. IOError seems better, and it's what code will likely be looking for.
* dis(): Added an optional memo argument, so that multiple pickles in aTim Peters2003-02-051-2/+38
| | | | | file can be dumped without (bogus) complaint if the the pickles were created using a single pickle memo.
* [680789] Debug with long array takes foreverTim Peters2003-02-052-0/+30
| | | | | Added array.array to the types repr.py knows about, after a suggestion from Jurjen N.E. Bos.