summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Partial patch from SF #452266, by Jason Petrone.Guido van Rossum2001-10-1616-42/+97
| | | | | | This changes Pythread_start_thread() to return the thread ID, or -1 for an error. (It's technically an incompatible API change, but I doubt anyone calls it.)
* Add note about new zlib feature.Jeremy Hylton2001-10-161-1/+6
|
* [ #403753 ] zlib decompress; uncontrollable memory usageJeremy Hylton2001-10-164-12/+113
| | | | | | | | | | | | | Mostly by Toby Dickenson and Titus Brown. Add an optional argument to a decompression object's decompress() method. The argument specifies the maximum length of the return value. If the uncompressed data exceeds this length, the excess data is stored as the unconsumed_tail attribute. (Not to be confused with unused_data, which is a separate issue.) Difference from SF patch: Default value for unconsumed_tail is "" rather than None. It's simpler if the attribute is always a string.
* Document required return values -1, 0, 1 for tp_compare handler, asGuido van Rossum2001-10-161-2/+11
| | | | suggested in SF patch #424475. Also document exception return.
* SF bug [#468061] __str__ ignored in str subclass.Tim Peters2001-10-163-8/+52
| | | | | | | | | | | | | | | | | object.c, PyObject_Str: Don't try to optimize anything except exact string objects here; in particular, let str subclasses go thru tp_str, same as non-str objects. This allows overrides of tp_str to take effect. stringobject.c: + string_print (str's tp_print): If the argument isn't an exact string object, get one from PyObject_Str. + string_str (str's tp_str): Make a genuine-string copy of the object if it's of a proper str subclass type. str() applied to a str subclass that doesn't override __str__ ends up here. test_descr.py: New str_of_str_subclass() test.
* Add Shane.Guido van Rossum2001-10-161-0/+1
|
* SF patch #471839: Bug when extensions import extensions (Shane Hathaway)Guido van Rossum2001-10-161-2/+3
| | | | | | | | | | | | | | | | | When an extension imports another extension in its initXXX() function, the variable _Py_PackageContext is prematurely reset to NULL. If the outer extension then calls Py_InitModule(), the extension is installed in sys.modules without its package name. The manifestation of this bug is a "SystemError: _PyImport_FixupExtension: module <package>.<extension> not loaded". To fix this, importdl.c just needs to retain the old value of _Py_PackageContext and restore it after the initXXX() method is called. The attached patch does this. This patch applies to Python 2.1.1 and the current CVS.
* Fix SF bug #459767: ftplib fails with files > 2GBGuido van Rossum2001-10-161-5/+13
| | | | | size(), parse150(): try int() first, catch OverflowError, fall back to long().
* Update the description of PyTrace_EXCEPT.Fred Drake2001-10-161-5/+8
|
* Fix a few usage and style-guide conformance issues.Fred Drake2001-10-161-10/+10
|
* Must terminate the Pickler_members[] and Pickler_getsets with NULL.Jeremy Hylton2001-10-161-1/+3
|
* Refactored the update_slot() code a bit to be hopefully slightly moreGuido van Rossum2001-10-161-57/+61
| | | | | | | | | | | | | efficient: - recurse down subclasses only once rather than for each affected slot; - short-circuit recursing down subclasses when a subclass has its own definition of the name that caused the update_slot() calls in the first place; - inline collect_ptrs().
* Put descr name in "bad memberdescr type" error message.Jeremy Hylton2001-10-161-1/+2
|
* Added information about setprofile() and settrace() hooks being thread-Fred Drake2001-10-161-2/+9
| | | | | specific, and updated some of the comments about the profile hook. This closes SF bug #471725.
* Fix thinko in a comment about seeking with a file object.Fred Drake2001-10-161-1/+1
| | | | Reported by Francesco Trentini.
* Reword the text on the demise of __dynamic__ somewhat, correcting aGuido van Rossum2001-10-161-4/+5
| | | | typo.
* Remove obsolete __dynamic__ distinction.Tim Peters2001-10-151-126/+8
|
* Remove obsolete __dynamic__ distinction.Tim Peters2001-10-152-76/+1
|
* Remove obsolete __static__/__dynamic__ distinction.Tim Peters2001-10-151-11/+3
|
* pstats-compatible analysis module.Fred Drake2001-10-151-0/+93
| | | | | hotshot.stats.load(logfilename) returns a pstats.Stats instance, which is about as compatible as it gets.
* runcall(): Expose the return value of the profiled function; this allowsFred Drake2001-10-151-1/+1
| | | | | | changing an application to collect profile data on one part of the app while still making use of the profiled component, without relying on side effects.
* Removed useless code to count the number of calls into the profiler.Fred Drake2001-10-151-51/+177
| | | | | | | | | | | Added support for saving the names of the functions observed into the profile log. Added support for using the profiler to measure coverage without collecting timing information (which is the slow part). Coverage logs can also be substantially smaller than profiling logs where per-line information is being collected. Updated comments on the log format; corrected record type values in some of the record descriptions.
* Avoid deep recursion when reading the header of the log file.Fred Drake2001-10-151-28/+39
| | | | | Add support for extracting function names from the log file, keeping the extract-names-from-sources support as a fallback.
* Get rid of __defined__ and tp_defined -- there's no need toGuido van Rossum2001-10-154-67/+33
| | | | | distinguish __dict__ and __defined__ any more. In the C structure, tp_cache takes its place -- but this hasn't been implemented yet.
* Covert pickle tests to use unittest.Jeremy Hylton2001-10-155-193/+294
| | | | | Extend tests to cover a few more cases. For cPickle, test several of the undocumented features.
* Better fix for core dumps on recursive objects in fast mode.Jeremy Hylton2001-10-151-32/+64
| | | | | | | | | | | | | | | | | | | Raise ValueError when an object contains an arbitrarily nested reference to itself. (The previous fix just produced invalid pickles.) Solution is very much like Py_ReprEnter() and Py_ReprLeave(): fast_save_enter() and fast_save_leave() that tracks the fast_container limit and keeps a fast_memo of objects currently being pickled. The cost of the solution is moderately expensive for deeply nested structures, but it still seems to be faster than normal pickling, based on tests with deeply nested lists. Once FAST_LIMIT is exceeded, the new code is about twice as slow as fast-mode code that doesn't check for recursion. It's still twice as fast as the normal pickling code. In the absence of deeply nested structures, I couldn't measure a difference.
* Use cStringIO when available.Jeremy Hylton2001-10-151-36/+4
| | | | Remove test code. It's available in Lib/test/picklertester.py.
* Remove a couple of tp_xxx fields that you are not expected toGuido van Rossum2001-10-151-5/+0
| | | | initialize (or use or even know about :-).
* Fix a bunch of warnings reported by Skip.Guido van Rossum2001-10-151-8/+8
| | | | | | | To whoever who changed a bunch of (PyCFunction) casts to (PyNoArgsFunction) in PyMethodDef initializers: don't do that. The cast is to shut the compiler up. The compiler wants the function pointer initializer to be a PyCFunction.
* Completely get rid of __dynamic__ and the correspondingGuido van Rossum2001-10-153-157/+42
| | | | | Py_TPFLAGS_DYNAMICTYPE bit. There is no longer a performance benefit, and I don't really see the use case any more.
* make getarray static - it's only called from ceval.c and is not anSkip Montanaro2001-10-151-1/+1
| | | | extern-able name.
* Another contributor.Guido van Rossum2001-10-151-0/+1
|
* Add (void *) casts to solve some problems on HP-UX 11.0, as discussedGuido van Rossum2001-10-151-3/+3
| | | | on SF bug #467145.
* Patch 471400: escape single-dot lines; by Jason Hildebrand.Guido van Rossum2001-10-152-0/+3
| | | | | RFC 2049 recommends never outputting a line consisting of a single dot.
* Use an assert() for the REQ() macro instead of making up our ownGuido van Rossum2001-10-151-10/+1
| | | | assertion.
* Note about fix in list comprehensions.Guido van Rossum2001-10-151-0/+9
|
* Very subtle syntax change: in a list comprehension, the testlist inGuido van Rossum2001-10-155-111/+150
| | | | | | | | | | | | | | | "for <var> in <testlist> may no longer be a single test followed by a comma. This solves SF bug #431886. Note that if the testlist contains more than one test, a trailing comma is still allowed, for maximum backward compatibility; but this example is not: [(x, y) for x in range(10), for y in range(10)] ^ The fix involved creating a new nonterminal 'testlist_safe' whose definition doesn't allow the trailing comma if there's only one test: testlist_safe: test [(',' test)+ [',']]
* Do not define _POSIX_THREADS if unistd.h defines it.Martin v. Löwis2001-10-154-289/+336
| | | | Check for pthread_sigmask before using it. Fixes remaining problem in #470781.
* SF bug #469910 by Alfonso Baciero: Bugfix for imaplib for macintoshGuido van Rossum2001-10-152-1/+2
| | | | Pass binary mode to makefile().
* Added notes to clarify that binascii.crc32(), zlib.crc32(), andFred Drake2001-10-152-3/+9
| | | | zlib.adler32() are not suitable as general hash functions.
* Check whether pthreads are available without any options before checkingMartin v. Löwis2001-10-152-401/+520
| | | | | that -Kpthread is supported. Fixes #470781. Port to autoconf 2.52.
* test_typed_subpart_iterator_default_type(): Test for when the messageBarry Warsaw2001-10-151-0/+18
| | | | has no Content-Type: header, it should be treated as text/plain.
* typed_subpart_iterator(): When getting the main type use 'text' as theBarry Warsaw2001-10-151-2/+2
| | | | | | failobj, and when getting the subtype use 'plain' as the failobj. text/plain is supposed to be the default if the message contains no Content-Type: header.
* Added documentation for the functions listed in marshal.h.Fred Drake2001-10-141-0/+80
| | | | Prompted by Jim Ahlstrom. This closes SF patch #470614.
* An MSVC makefile to rebuild the grammar files (graminit.[ch]) manually.Tim Peters2001-10-131-0/+42
| | | | Ugly, but it works.
* Redid the slot computation. The initial slot assignments are now doneGuido van Rossum2001-10-131-64/+91
| | | | | | | using the same algorithm as the slot updates. The slotdefs array is now sorted by slot offset and has an interned string object corresponding to the name added to each item. More can be done but I need to commit this first as a working intermediate stage.
* "ib" should be "boundary"; reported by Neal Norwitz.Fred Drake2001-10-131-1/+1
|
* Added missing parameter in call to http_error_default();Fred Drake2001-10-131-1/+1
| | | | reported by Neal Norwitz.
* SMTPError should be SMTPException; reported by Neal Norwitz.Fred Drake2001-10-131-2/+2
|
* Ignore execfile() return value; reported by Neal Norwitz.Fred Drake2001-10-131-1/+1
|