]> granicus.if.org Git - python/log
python
23 years agotest for int and long int overflow (allows operation on 64-bit platforms)
Skip Montanaro [Wed, 17 Oct 2001 22:53:33 +0000 (22:53 +0000)]
test for int and long int overflow (allows operation on 64-bit platforms)
closes patch 470254

23 years agoTwo merges from the mimelib project:
Barry Warsaw [Wed, 17 Oct 2001 20:52:26 +0000 (20:52 +0000)]
Two merges from the mimelib project:

    test_no_semis_header_splitter(): This actually should still split.

    test_no_split_long_header(): An example of an unsplittable line.

    test_no_semis_header_splitter(): Test for SF bug # 471918, Generator
    splitting long headers.

23 years agoTwo merges from the mimelib project:
Barry Warsaw [Wed, 17 Oct 2001 20:51:42 +0000 (20:51 +0000)]
Two merges from the mimelib project:

    _split_header(): Split on folding whitespace if the attempt to split
    on semi-colons failed.

    _split_header(): Patch by Matthew Cowles for fixing SF bug # 471918,
    Generator splitting long headers.

23 years agoProtect references to tp_descr_get and tp_dict with the appropriate test:
Guido van Rossum [Wed, 17 Oct 2001 20:26:38 +0000 (20:26 +0000)]
Protect references to tp_descr_get and tp_dict with the appropriate test:
PyType_HasFeature(t, Py_TPFLAGS_HAVE_CLASS).

23 years agoOops. Catching OverflowError from int() doesn't help, since it raises
Guido van Rossum [Wed, 17 Oct 2001 17:21:47 +0000 (17:21 +0000)]
Oops.  Catching OverflowError from int() doesn't help, since it raises
ValueError on too-large inputs.

23 years agoRemove a bunch of stuff that's no longer needed now that update_slot()
Guido van Rossum [Wed, 17 Oct 2001 13:59:09 +0000 (13:59 +0000)]
Remove a bunch of stuff that's no longer needed now that update_slot()
and fixup_slot_dispatchers() always select the proper slot dispatcher.
This affects slot_sq_item(), slot_tp_getattro(), and
slot_tp_getattr_hook().

23 years agoThe Python symtable module depends on .h files that setup.py doesn't track.
Jeremy Hylton [Wed, 17 Oct 2001 13:46:44 +0000 (13:46 +0000)]
The Python symtable module depends on .h files that setup.py doesn't track.

23 years agoMake sure the output lists are sorted, even if run with -r.
Jeremy Hylton [Wed, 17 Oct 2001 13:45:28 +0000 (13:45 +0000)]
Make sure the output lists are sorted, even if run with -r.

23 years agoTest utility to look for bad stacksize calculations.
Jeremy Hylton [Wed, 17 Oct 2001 13:39:06 +0000 (13:39 +0000)]
Test utility to look for bad stacksize calculations.

23 years agoVastly improved stacksize calculation.
Jeremy Hylton [Wed, 17 Oct 2001 13:37:29 +0000 (13:37 +0000)]
Vastly improved stacksize calculation.

There are now no known cases where the compiler package computes a
stack depth lower than the one computed by the builtin compiler.  (To
achieve this state, we had to fix bugs in both compilers :-).

The chief change is to do the depth calculations with respect to basic
blocks.  The stack effect of block is calculated.  Then the flow graph
is traversed using breadth-first search to find the max weight path
through the graph.

Had to fix the StackDepthTracker to calculate the right info for
several opcodes: LOAD_ATTR, CALL_FUNCTION (and friends), MAKE_CLOSURE,
and DUP_TOPX.

XXX Still need to handle free variables in MAKE_CLOSURE.

XXX There are still a lot of places where the computed stack depth is
larger than for the builtin compiler.  These won't cause the
interpreter to overflow the frame, but they waste space.

23 years agoHandle testlist_safe as if it were testlist.
Jeremy Hylton [Wed, 17 Oct 2001 13:32:52 +0000 (13:32 +0000)]
Handle testlist_safe as if it were testlist.

23 years agoRemove unused convenience routine.
Jeremy Hylton [Wed, 17 Oct 2001 13:32:02 +0000 (13:32 +0000)]
Remove unused convenience routine.

23 years agoFor debug build, check that the stack pointer never exceeds the stack size.
Jeremy Hylton [Wed, 17 Oct 2001 13:29:30 +0000 (13:29 +0000)]
For debug build, check that the stack pointer never exceeds the stack size.

23 years agoFix computation of stack depth for classdef and closures.
Jeremy Hylton [Wed, 17 Oct 2001 13:22:22 +0000 (13:22 +0000)]
Fix computation of stack depth for classdef and closures.
Also minor tweaks to internal routines.
Use PyCF_MASK instead of explicit list of flags.

For the MAKE_CLOSURE opcode, the number of items popped off the stack
depends on both the oparg and the number of free variables for the
code object.  Fix the code so it accounts for the free variables.

In com_classdef(), record an extra pop to account for the STORE call
after the BUILD_CLASS.

Get rid of some commented out debugging code in com_push() and
com_pop().

Factor string resize logic into helper routine com_check_size().

In com_addbyte(), remove redudant if statement after assert.  (They
test the same condition.)

In several routines, use string macros instead of string functions.

23 years agotrack addition of testlist_safe to Grammar
Jeremy Hylton [Wed, 17 Oct 2001 13:13:04 +0000 (13:13 +0000)]
track addition of testlist_safe to Grammar

23 years agoslot_sq_item(): ensure that self is an instance of the wrapper's
Guido van Rossum [Wed, 17 Oct 2001 07:15:43 +0000 (07:15 +0000)]
slot_sq_item(): ensure that self is an instance of the wrapper's
d_type before calling the wrapped function.

fixup_slot_dispatchers(): fix indentation.

23 years agoSF patch #467430.
Guido van Rossum [Wed, 17 Oct 2001 06:45:56 +0000 (06:45 +0000)]
SF patch #467430.

- replace some log_error() calls with log_message()

- flush self.rfile before forking too (hope this works on Windows)

23 years agoSF patch #471894: Makefile installs pydoc incorrectly
Guido van Rossum [Wed, 17 Oct 2001 06:26:53 +0000 (06:26 +0000)]
SF patch #471894: Makefile installs pydoc incorrectly

Add --install-scripts=$(BINDIR) argument to "setup.py install"
invocation.

23 years agoFolder.getlast(): avoid PyChecker warning.
Guido van Rossum [Wed, 17 Oct 2001 05:59:26 +0000 (05:59 +0000)]
Folder.getlast(): avoid PyChecker warning.

23 years agoSimplify and regularize docstrings. Also reformat so that each docstring
Tim Peters [Wed, 17 Oct 2001 04:16:15 +0000 (04:16 +0000)]
Simplify and regularize docstrings.  Also reformat so that each docstring
line fits in reasonable screen width.

23 years agoTrimmed trailing whitespace.
Tim Peters [Wed, 17 Oct 2001 03:57:20 +0000 (03:57 +0000)]
Trimmed trailing whitespace.

23 years agoRemoved more comments that didn't make much sense.
Tim Peters [Wed, 17 Oct 2001 03:56:45 +0000 (03:56 +0000)]
Removed more comments that didn't make much sense.
Made the presence/absence of a semicolon after macros consistent.

23 years agoRemoved obsolete comments about confused string refcount tricks (Jeremy
Tim Peters [Wed, 17 Oct 2001 03:43:54 +0000 (03:43 +0000)]
Removed obsolete comments about confused string refcount tricks (Jeremy
removed the tricks).

Changed the ENTER/LEAVE_ZLIB macros so as not to create a new block (a
new block is neither necessary nor helpful).

23 years agoRemove unused import; reported by Neal Norwitz.
Fred Drake [Wed, 17 Oct 2001 01:51:04 +0000 (01:51 +0000)]
Remove unused import; reported by Neal Norwitz.

23 years agoMinor code cleanups based on comments from Neal Norwitz.
Fred Drake [Wed, 17 Oct 2001 01:49:50 +0000 (01:49 +0000)]
Minor code cleanups based on comments from Neal Norwitz.

23 years agoYAPC.
Guido van Rossum [Wed, 17 Oct 2001 00:17:52 +0000 (00:17 +0000)]
YAPC.

23 years agoUndo needless INCREF chicanery introduced by SF patch #450702.
Jeremy Hylton [Tue, 16 Oct 2001 23:26:08 +0000 (23:26 +0000)]
Undo needless INCREF chicanery introduced by SF patch #450702.

    Apparently this patch (rev 2.41) replaced all the good old "s#"
    formats in PyArg_ParseTuple() with "S".  Then it did
    PyString_FromStringAndSize() to get back the values setup by the
    "s#" format.  It also incref'd and decref'd the string obtained by
    "S" even though the argument tuple had a reference to it.

Replace PyString_AsString() calls with PyString_AS_STRING().

    A good rule of thumb -- if you never check the return value of
    PyString_AsString() to see if it's NULL, you ought to be using the
    macro <wink>.

23 years agoSimplify and fix error handling for most cases.
Jeremy Hylton [Tue, 16 Oct 2001 23:02:32 +0000 (23:02 +0000)]
Simplify and fix error handling for most cases.

Many functions used a local variable called return_error, which was
initialized to zero.  If an error occurred, it was set to true.  Most
of the code paths checked were only executed if return_error was
false.  goto is clearer.

The code also seemed to be written under the curious assumption that
calling Py_DECREF() on a local variable would assign the variable to
NULL.  As a result, more of the error-exit code paths returned an
object that had a reference count of zero instead of just returning
NULL.  Fixed the code to explicitly assign NULL after the DECREF.

A bit more reformatting, but not much.

XXX Need a much better test suite for zlib, since it the current tests
don't exercise any of this broken code.

23 years agoSF bug [#471111] inspect.getframeinfo() needs docs.
Tim Peters [Tue, 16 Oct 2001 23:01:06 +0000 (23:01 +0000)]
SF bug [#471111] inspect.getframeinfo() needs docs.
TeX-ified its docstring.

23 years agoMore reformatting.
Jeremy Hylton [Tue, 16 Oct 2001 21:59:35 +0000 (21:59 +0000)]
More reformatting.

23 years agoAdd zlib_error() helper.
Jeremy Hylton [Tue, 16 Oct 2001 21:56:09 +0000 (21:56 +0000)]
Add zlib_error() helper.

It sets a ZlibError exception, using the msg from the z_stream pointer
if one is available.

23 years agoFix a bug in the previous checkin. The wrong bootstrap function was
Guido van Rossum [Tue, 16 Oct 2001 21:50:04 +0000 (21:50 +0000)]
Fix a bug in the previous checkin.  The wrong bootstrap function was
passed to _beginthread().

23 years agoAdd fix for getattr(obj, name, default). Rearrange a few things.
Guido van Rossum [Tue, 16 Oct 2001 21:34:49 +0000 (21:34 +0000)]
Add fix for getattr(obj, name, default).  Rearrange a few things.

23 years agoSF patch #471852 (anonymous) notes that getattr(obj, name, default)
Guido van Rossum [Tue, 16 Oct 2001 21:31:32 +0000 (21:31 +0000)]
SF patch #471852 (anonymous) notes that getattr(obj, name, default)
masks any exception, not just AttributeError.  Fix this.

23 years agoRemove many calls to set MemoryError exceptions.
Jeremy Hylton [Tue, 16 Oct 2001 21:23:58 +0000 (21:23 +0000)]
Remove many calls to set MemoryError exceptions.

When PyString_FromStringAndSize() and _PyString_Resize() fail, they
set an exception.  There's no need to set a new exception.

23 years agoReformat!
Jeremy Hylton [Tue, 16 Oct 2001 21:19:45 +0000 (21:19 +0000)]
Reformat!

Consistently indent 4 spaces.
Use whitespace around operators.
Put braces in the right places.

23 years agoPartial patch from SF #452266, by Jason Petrone.
Guido van Rossum [Tue, 16 Oct 2001 21:13:49 +0000 (21:13 +0000)]
Partial patch from SF #452266, by Jason Petrone.

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.)

23 years agoAdd note about new zlib feature.
Jeremy Hylton [Tue, 16 Oct 2001 20:42:52 +0000 (20:42 +0000)]
Add note about new zlib feature.

23 years ago[ #403753 ] zlib decompress; uncontrollable memory usage
Jeremy Hylton [Tue, 16 Oct 2001 20:39:49 +0000 (20:39 +0000)]
[ #403753 ] zlib decompress; uncontrollable memory usage

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.

23 years agoDocument required return values -1, 0, 1 for tp_compare handler, as
Guido van Rossum [Tue, 16 Oct 2001 20:32:05 +0000 (20:32 +0000)]
Document required return values -1, 0, 1 for tp_compare handler, as
suggested in SF patch #424475.  Also document exception return.

23 years agoSF bug [#468061] __str__ ignored in str subclass.
Tim Peters [Tue, 16 Oct 2001 20:18:24 +0000 (20:18 +0000)]
SF bug [#468061] __str__ ignored in str subclass.

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.

23 years agoAdd Shane.
Guido van Rossum [Tue, 16 Oct 2001 20:13:53 +0000 (20:13 +0000)]
Add Shane.

23 years agoSF patch #471839: Bug when extensions import extensions (Shane Hathaway)
Guido van Rossum [Tue, 16 Oct 2001 20:07:34 +0000 (20:07 +0000)]
SF patch #471839: Bug when extensions import extensions (Shane Hathaway)

    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.

23 years agoFix SF bug #459767: ftplib fails with files > 2GB
Guido van Rossum [Tue, 16 Oct 2001 19:45:52 +0000 (19:45 +0000)]
Fix SF bug #459767: ftplib fails with files > 2GB

size(), parse150(): try int() first, catch OverflowError, fall back to
long().

23 years agoUpdate the description of PyTrace_EXCEPT.
Fred Drake [Tue, 16 Oct 2001 19:23:55 +0000 (19:23 +0000)]
Update the description of PyTrace_EXCEPT.

23 years agoFix a few usage and style-guide conformance issues.
Fred Drake [Tue, 16 Oct 2001 19:22:51 +0000 (19:22 +0000)]
Fix a few usage and style-guide conformance issues.

23 years agoMust terminate the Pickler_members[] and Pickler_getsets with NULL.
Jeremy Hylton [Tue, 16 Oct 2001 17:10:49 +0000 (17:10 +0000)]
Must terminate the Pickler_members[] and Pickler_getsets with NULL.

23 years agoRefactored the update_slot() code a bit to be hopefully slightly more
Guido van Rossum [Tue, 16 Oct 2001 17:00:48 +0000 (17:00 +0000)]
Refactored the update_slot() code a bit to be hopefully slightly more
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().

23 years agoPut descr name in "bad memberdescr type" error message.
Jeremy Hylton [Tue, 16 Oct 2001 16:51:56 +0000 (16:51 +0000)]
Put descr name in "bad memberdescr type" error message.

23 years agoAdded information about setprofile() and settrace() hooks being thread-
Fred Drake [Tue, 16 Oct 2001 14:54:22 +0000 (14:54 +0000)]
Added information about setprofile() and settrace() hooks being thread-
specific, and updated some of the comments about the profile hook.
This closes SF bug #471725.

23 years agoFix thinko in a comment about seeking with a file object.
Fred Drake [Tue, 16 Oct 2001 03:25:00 +0000 (03:25 +0000)]
Fix thinko in a comment about seeking with a file object.
Reported by Francesco Trentini.

23 years agoReword the text on the demise of __dynamic__ somewhat, correcting a
Guido van Rossum [Tue, 16 Oct 2001 00:46:57 +0000 (00:46 +0000)]
Reword the text on the demise of __dynamic__ somewhat, correcting a
typo.

23 years agoRemove obsolete __dynamic__ distinction.
Tim Peters [Mon, 15 Oct 2001 22:59:59 +0000 (22:59 +0000)]
Remove obsolete __dynamic__ distinction.

23 years agoRemove obsolete __dynamic__ distinction.
Tim Peters [Mon, 15 Oct 2001 22:53:29 +0000 (22:53 +0000)]
Remove obsolete __dynamic__ distinction.

23 years agoRemove obsolete __static__/__dynamic__ distinction.
Tim Peters [Mon, 15 Oct 2001 22:49:27 +0000 (22:49 +0000)]
Remove obsolete __static__/__dynamic__ distinction.

23 years agopstats-compatible analysis module.
Fred Drake [Mon, 15 Oct 2001 22:18:53 +0000 (22:18 +0000)]
pstats-compatible analysis module.
hotshot.stats.load(logfilename) returns a pstats.Stats instance, which is
about as compatible as it gets.

23 years agoruncall(): Expose the return value of the profiled function; this allows
Fred Drake [Mon, 15 Oct 2001 22:14:29 +0000 (22:14 +0000)]
runcall():  Expose the return value of the profiled function; this allows
    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.

23 years agoRemoved useless code to count the number of calls into the profiler.
Fred Drake [Mon, 15 Oct 2001 22:11:02 +0000 (22:11 +0000)]
Removed useless code to count the number of calls into the profiler.
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.

23 years agoAvoid deep recursion when reading the header of the log file.
Fred Drake [Mon, 15 Oct 2001 22:05:32 +0000 (22:05 +0000)]
Avoid deep recursion when reading the header of the log file.
Add support for extracting function names from the log file, keeping the
extract-names-from-sources support as a fallback.

23 years agoGet rid of __defined__ and tp_defined -- there's no need to
Guido van Rossum [Mon, 15 Oct 2001 22:03:32 +0000 (22:03 +0000)]
Get rid of __defined__ and tp_defined -- there's no need to
distinguish __dict__ and __defined__ any more.  In the C structure,
tp_cache takes its place -- but this hasn't been implemented yet.

23 years agoCovert pickle tests to use unittest.
Jeremy Hylton [Mon, 15 Oct 2001 21:38:56 +0000 (21:38 +0000)]
Covert pickle tests to use unittest.

Extend tests to cover a few more cases.  For cPickle, test several of
the undocumented features.

23 years agoBetter fix for core dumps on recursive objects in fast mode.
Jeremy Hylton [Mon, 15 Oct 2001 21:37:58 +0000 (21:37 +0000)]
Better fix for core dumps on recursive objects in fast mode.

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.

23 years agoUse cStringIO when available.
Jeremy Hylton [Mon, 15 Oct 2001 21:29:28 +0000 (21:29 +0000)]
Use cStringIO when available.

Remove test code.  It's available in Lib/test/picklertester.py.

23 years agoRemove a couple of tp_xxx fields that you are not expected to
Guido van Rossum [Mon, 15 Oct 2001 21:24:12 +0000 (21:24 +0000)]
Remove a couple of tp_xxx fields that you are not expected to
initialize (or use or even know about :-).

23 years agoFix a bunch of warnings reported by Skip.
Guido van Rossum [Mon, 15 Oct 2001 21:12:54 +0000 (21:12 +0000)]
Fix a bunch of warnings reported by Skip.

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.

23 years agoCompletely get rid of __dynamic__ and the corresponding
Guido van Rossum [Mon, 15 Oct 2001 21:05:10 +0000 (21:05 +0000)]
Completely get rid of __dynamic__ and the corresponding
Py_TPFLAGS_DYNAMICTYPE bit.  There is no longer a performance benefit,
and I don't really see the use case any more.

23 years agomake getarray static - it's only called from ceval.c and is not an
Skip Montanaro [Mon, 15 Oct 2001 20:51:38 +0000 (20:51 +0000)]
make getarray static - it's only called from ceval.c and is not an
extern-able name.

23 years agoAnother contributor.
Guido van Rossum [Mon, 15 Oct 2001 19:55:12 +0000 (19:55 +0000)]
Another contributor.

23 years agoAdd (void *) casts to solve some problems on HP-UX 11.0, as discussed
Guido van Rossum [Mon, 15 Oct 2001 19:44:24 +0000 (19:44 +0000)]
Add (void *) casts to solve some problems on HP-UX 11.0, as discussed
on SF bug #467145.

23 years agoPatch 471400: escape single-dot lines; by Jason Hildebrand.
Guido van Rossum [Mon, 15 Oct 2001 18:44:26 +0000 (18:44 +0000)]
Patch 471400: escape single-dot lines; by Jason Hildebrand.

RFC 2049 recommends never outputting a line consisting of a single
dot.

23 years agoUse an assert() for the REQ() macro instead of making up our own
Guido van Rossum [Mon, 15 Oct 2001 17:23:13 +0000 (17:23 +0000)]
Use an assert() for the REQ() macro instead of making up our own
assertion.

23 years agoNote about fix in list comprehensions.
Guido van Rossum [Mon, 15 Oct 2001 15:53:58 +0000 (15:53 +0000)]
Note about fix in list comprehensions.

23 years agoVery subtle syntax change: in a list comprehension, the testlist in
Guido van Rossum [Mon, 15 Oct 2001 15:44:05 +0000 (15:44 +0000)]
Very subtle syntax change: in a list comprehension, the testlist in
"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)+ [',']]

23 years agoDo not define _POSIX_THREADS if unistd.h defines it.
Martin v. Löwis [Mon, 15 Oct 2001 14:34:42 +0000 (14:34 +0000)]
Do not define _POSIX_THREADS if unistd.h defines it.
Check for pthread_sigmask before using it. Fixes remaining problem in #470781.

23 years agoSF bug #469910 by Alfonso Baciero: Bugfix for imaplib for macintosh
Guido van Rossum [Mon, 15 Oct 2001 13:47:08 +0000 (13:47 +0000)]
SF bug #469910 by Alfonso Baciero: Bugfix for imaplib for macintosh

Pass binary mode to makefile().

23 years agoAdded notes to clarify that binascii.crc32(), zlib.crc32(), and
Fred Drake [Mon, 15 Oct 2001 13:45:49 +0000 (13:45 +0000)]
Added notes to clarify that binascii.crc32(), zlib.crc32(), and
zlib.adler32() are not suitable as general hash functions.

23 years agoCheck whether pthreads are available without any options before checking
Martin v. Löwis [Mon, 15 Oct 2001 08:06:29 +0000 (08:06 +0000)]
Check whether pthreads are available without any options before checking
that -Kpthread is supported. Fixes #470781.
Port to autoconf 2.52.

23 years agotest_typed_subpart_iterator_default_type(): Test for when the message
Barry Warsaw [Mon, 15 Oct 2001 04:39:02 +0000 (04:39 +0000)]
test_typed_subpart_iterator_default_type(): Test for when the message
has no Content-Type: header, it should be treated as text/plain.

23 years agotyped_subpart_iterator(): When getting the main type use 'text' as the
Barry Warsaw [Mon, 15 Oct 2001 04:38:22 +0000 (04:38 +0000)]
typed_subpart_iterator(): When getting the main type use 'text' as the
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.

23 years agoAdded documentation for the functions listed in marshal.h.
Fred Drake [Sun, 14 Oct 2001 04:45:51 +0000 (04:45 +0000)]
Added documentation for the functions listed in marshal.h.
Prompted by Jim Ahlstrom.  This closes SF patch #470614.

23 years agoAn MSVC makefile to rebuild the grammar files (graminit.[ch]) manually.
Tim Peters [Sat, 13 Oct 2001 20:16:17 +0000 (20:16 +0000)]
An MSVC makefile to rebuild the grammar files (graminit.[ch]) manually.
Ugly, but it works.

23 years agoRedid the slot computation. The initial slot assignments are now done
Guido van Rossum [Sat, 13 Oct 2001 20:02:41 +0000 (20:02 +0000)]
Redid the slot computation.  The initial slot assignments are now done
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.

23 years ago"ib" should be "boundary"; reported by Neal Norwitz.
Fred Drake [Sat, 13 Oct 2001 18:38:53 +0000 (18:38 +0000)]
"ib" should be "boundary"; reported by Neal Norwitz.

23 years agoAdded missing parameter in call to http_error_default();
Fred Drake [Sat, 13 Oct 2001 18:37:07 +0000 (18:37 +0000)]
Added missing parameter in call to http_error_default();
reported by Neal Norwitz.

23 years agoSMTPError should be SMTPException; reported by Neal Norwitz.
Fred Drake [Sat, 13 Oct 2001 18:35:32 +0000 (18:35 +0000)]
SMTPError should be SMTPException; reported by Neal Norwitz.

23 years agoIgnore execfile() return value; reported by Neal Norwitz.
Fred Drake [Sat, 13 Oct 2001 18:34:42 +0000 (18:34 +0000)]
Ignore execfile() return value; reported by Neal Norwitz.

23 years ago"f" should be "self"; reported by Neal Norwitz.
Fred Drake [Sat, 13 Oct 2001 18:33:51 +0000 (18:33 +0000)]
"f" should be "self"; reported by Neal Norwitz.

23 years ago_os should be os; reported by Neal Norwitz.
Fred Drake [Sat, 13 Oct 2001 16:00:52 +0000 (16:00 +0000)]
_os should be os; reported by Neal Norwitz.

23 years agoRemove extra param from call to self.error().
Fred Drake [Sat, 13 Oct 2001 15:59:47 +0000 (15:59 +0000)]
Remove extra param from call to self.error().
Reported by Neal Norwitz.

23 years agoRemove extra "]" in splitlines() docstring.
Fred Drake [Sat, 13 Oct 2001 15:57:55 +0000 (15:57 +0000)]
Remove extra "]" in splitlines() docstring.
Reported by Neal Norwitz.

23 years agoMove grid_location into Misc. Fixes bug #426892.
Martin v. Löwis [Sat, 13 Oct 2001 09:33:51 +0000 (09:33 +0000)]
Move grid_location into Misc. Fixes bug #426892.

23 years agoCheck for term.h and include it on non-ncurses system to get a declaration
Martin v. Löwis [Sat, 13 Oct 2001 09:12:41 +0000 (09:12 +0000)]
Check for term.h and include it on non-ncurses system to get a declaration
for tigetstr.

23 years agoTest for __sun instead of __sun__, since SUNWspro only defines the latter;
Martin v. Löwis [Sat, 13 Oct 2001 09:00:42 +0000 (09:00 +0000)]
Test for __sun instead of __sun__, since SUNWspro only defines the latter;
gcc defines both.

23 years agoCast argument to set_panel_userptr to void*. Fixes bug #417240.
Martin v. Löwis [Sat, 13 Oct 2001 08:50:10 +0000 (08:50 +0000)]
Cast argument to set_panel_userptr to void*. Fixes bug #417240.

23 years agoSpeed the Windows code by using native 64-bit int compiler support instead
Tim Peters [Sat, 13 Oct 2001 07:37:52 +0000 (07:37 +0000)]
Speed the Windows code by using native 64-bit int compiler support instead
of calling external functions.

23 years agoSuppress a bunch of "value computed is not used" warnings when building in
Fred Drake [Sat, 13 Oct 2001 06:11:28 +0000 (06:11 +0000)]
Suppress a bunch of "value computed is not used" warnings when building in
debug mode (--with-pydebug).

23 years agoRemove some unused imports.
Fred Drake [Sat, 13 Oct 2001 03:00:11 +0000 (03:00 +0000)]
Remove some unused imports.
Remove the log file after we are done with it.  This should clean up after
the test even on Windows, since the file is now closed before we attempt
removal.

23 years agoWhen we reach the end of the log file, close the logreader object.
Fred Drake [Sat, 13 Oct 2001 02:55:40 +0000 (02:55 +0000)]
When we reach the end of the log file, close the logreader object.

23 years agoAdded new hotshot pkg to the Windows installer.
Tim Peters [Sat, 13 Oct 2001 00:26:25 +0000 (00:26 +0000)]
Added new hotshot pkg to the Windows installer.
Rearranged the growing number of Lib packages into alphabetical order.

23 years agoYou can't unlink open files on Windows.
Tim Peters [Sat, 13 Oct 2001 00:19:39 +0000 (00:19 +0000)]
You can't unlink open files on Windows.
Simply commented it out, and then test_hotshot passes on Windows.
Leaving to Fred to fix "the right way" (it seems to be a feature of
unittest that all unittests try to unlink open files <wink>).