]> granicus.if.org Git - python/log
python
23 years agoUndo last checkin.
Martin v. Löwis [Mon, 1 Oct 2001 17:04:03 +0000 (17:04 +0000)]
Undo last checkin.

23 years agoStraighten out some markup.
Fred Drake [Mon, 1 Oct 2001 17:03:48 +0000 (17:03 +0000)]
Straighten out some markup.
"boolean" --> "Boolean" (per the style guide).

23 years agoUndo last checkin, since it duplicated the code.
Martin v. Löwis [Mon, 1 Oct 2001 17:02:49 +0000 (17:02 +0000)]
Undo last checkin, since it duplicated the code.

23 years agoslot_sq_length(): squash a leak.
Guido van Rossum [Mon, 1 Oct 2001 16:42:49 +0000 (16:42 +0000)]
slot_sq_length(): squash a leak.

23 years agoRefer to the objects which define __len__(), __*item__(), and __iter__()
Fred Drake [Mon, 1 Oct 2001 16:32:13 +0000 (16:32 +0000)]
Refer to the objects which define __len__(), __*item__(), and __iter__()
as container objects rather than as mapping objects (in the index entries).
Change the section heading and intro sentence to be a little more general,
since that's how things have actually evolved.

23 years agoslot_tp_new(): newargs was leaking.
Guido van Rossum [Mon, 1 Oct 2001 15:55:28 +0000 (15:55 +0000)]
slot_tp_new(): newargs was leaking.

23 years agoClarify comments about mailbox objects being iterable.
Fred Drake [Mon, 1 Oct 2001 15:49:56 +0000 (15:49 +0000)]
Clarify comments about mailbox objects being iterable.

23 years agoDocs for SF patch #462628
Guido van Rossum [Mon, 1 Oct 2001 13:50:15 +0000 (13:50 +0000)]
Docs for SF patch #462628

23 years agoAnother SF patch contributor.
Guido van Rossum [Mon, 1 Oct 2001 13:47:46 +0000 (13:47 +0000)]
Another SF patch contributor.

23 years agoSF patch #462628 (Travers Naran) NNTPLib supports saving BODY to a file.
Guido van Rossum [Mon, 1 Oct 2001 13:46:55 +0000 (13:46 +0000)]
SF patch #462628 (Travers Naran) NNTPLib supports saving BODY to a file.

  I modified nntplib so the body method can accept an
  optional second parameter pointing to a filehandle or
  filename (string). This way, really long body
  articles can be stored to disk instead of kept in
  memory. The way I made the modification should make
  it easy to extend this functionality to other extended
  return methods.

23 years agoFix typo found by doerwalter.
Guido van Rossum [Mon, 1 Oct 2001 13:17:24 +0000 (13:17 +0000)]
Fix typo found by doerwalter.

23 years agoPatch #426880: Implement Listbox itemcget and itemconfigure.
Martin v. Löwis [Mon, 1 Oct 2001 10:09:31 +0000 (10:09 +0000)]
Patch #426880: Implement Listbox itemcget and itemconfigure.

23 years agoPatch #462122: add readline startup and pre_event hooks.
Martin v. Löwis [Sun, 30 Sep 2001 21:09:59 +0000 (21:09 +0000)]
Patch #462122: add readline startup and pre_event hooks.

23 years agoPatch #462190, patch #464070: Support quoted printable in the binascii module.
Martin v. Löwis [Sun, 30 Sep 2001 20:32:11 +0000 (20:32 +0000)]
Patch #462190, patch #464070: Support quoted printable in the binascii module.
Decode and encode underscores for header style encoding. Fixes bug #463996.

23 years agoProperly detect recursive structures. Adopted from patch #465298.
Martin v. Löwis [Sun, 30 Sep 2001 20:15:41 +0000 (20:15 +0000)]
Properly detect recursive structures. Adopted from patch #465298.

23 years agoThe execfile() docs imply it acts on locals same as exec. But in truth
Tim Peters [Sun, 30 Sep 2001 06:32:59 +0000 (06:32 +0000)]
The execfile() docs imply it acts on locals same as exec.  But in truth
it acts more like assigning to keys in locals(), i.e. modifications to
function locals aren't reflected in the locals when execfile() returns.

23 years agoCorrect docs for long(float).
Tim Peters [Sun, 30 Sep 2001 06:18:26 +0000 (06:18 +0000)]
Correct docs for long(float).

23 years agoSF bug [#466173] unpack TypeError unclear
Tim Peters [Sun, 30 Sep 2001 05:58:42 +0000 (05:58 +0000)]
SF bug [#466173] unpack TypeError unclear
Replaced 3 instances of "iter() of non-sequence" with
"iteration over non-sequence".
Restored "unpack non-sequence" for stuff like "a, b = 1".

23 years agoSF [#466125] PyLong_AsLongLong works for any integer.
Tim Peters [Sun, 30 Sep 2001 05:09:37 +0000 (05:09 +0000)]
SF [#466125] PyLong_AsLongLong works for any integer.
Generalize PyLong_AsLongLong to accept int arguments too.  The real point
is so that PyArg_ParseTuple's 'L' code does too.  That code was
undocumented (AFAICT), so documented it.

23 years agoHandle PEP references the same way RFC references.
Fred Drake [Sat, 29 Sep 2001 19:07:22 +0000 (19:07 +0000)]
Handle PEP references the same way RFC references.

23 years agoFix two typos in the text about compile(), and add two caveats from
Guido van Rossum [Sat, 29 Sep 2001 14:28:52 +0000 (14:28 +0000)]
Fix two typos in the text about compile(), and add two caveats from
recent user feedback: you must end the input with \n and you must use
\n, not \r\n to represent line endings.

23 years agoforgot to mark use of StringType and UnicodeType in the text.
Skip Montanaro [Sat, 29 Sep 2001 13:53:21 +0000 (13:53 +0000)]
forgot to mark use of StringType and UnicodeType in the text.

23 years agoadded description of StringTypes object
Skip Montanaro [Sat, 29 Sep 2001 13:49:41 +0000 (13:49 +0000)]
added description of StringTypes object

23 years agoFix up whitespace in <args> elements; reduce sequences of consecutive
Fred Drake [Sat, 29 Sep 2001 05:05:25 +0000 (05:05 +0000)]
Fix up whitespace in <args> elements; reduce sequences of consecutive
whitespace characters to a single space.
Small changes elsewhere, mostly to clean up the code a little.

23 years agoMinor markup improvement.
Fred Drake [Sat, 29 Sep 2001 05:01:59 +0000 (05:01 +0000)]
Minor markup improvement.

23 years agoFor Python 2.2, do not use __getattr__(), only use computed properties.
Fred Drake [Sat, 29 Sep 2001 04:58:32 +0000 (04:58 +0000)]
For Python 2.2, do not use __getattr__(), only use computed properties.
This is probably a little bit faster, but mostly is just cleaner code.
The old-style support is still used for Python versions < 2.2 so this
source file can be shared with PyXML.

23 years ago_dispatch(): Do no re-define the resolve_dotted_atttribute() function
Fred Drake [Sat, 29 Sep 2001 04:54:33 +0000 (04:54 +0000)]
_dispatch():  Do no re-define the resolve_dotted_atttribute() function
    every time this gets called; move it out as a global helper function.
    Simplify the call to the _dispatch() method of the registered instance.

23 years agoThe list.sort() docs require a function that returns -1, 0 or +1. That's
Tim Peters [Sat, 29 Sep 2001 01:08:19 +0000 (01:08 +0000)]
The list.sort() docs require a function that returns -1, 0 or +1.  That's
never been true, and in particular implies cmp() can't be used(!).  Get
closer to the truth.

23 years agoThe changes to ternary_op could cause a core dump. Fix this, and
Guido van Rossum [Sat, 29 Sep 2001 01:05:03 +0000 (01:05 +0000)]
The changes to ternary_op could cause a core dump.  Fix this, and
rewrite the code a bit to avoid calling the same slot more than once.

23 years agoClarify the warning about the relative dates of Setup.dist and Setup;
Guido van Rossum [Sat, 29 Sep 2001 00:42:19 +0000 (00:42 +0000)]
Clarify the warning about the relative dates of Setup.dist and Setup;
Jeremy had seen the warning but not realized what he should do about
it.  Add the hint "Usually, copying Setup.dist to Setup will work."

23 years agoAdd a few ``__dynamic__ = 0'' lines in classes that need to preserve
Guido van Rossum [Sat, 29 Sep 2001 00:40:25 +0000 (00:40 +0000)]
Add a few ``__dynamic__ = 0'' lines in classes that need to preserve
staticness when __dynamic__ = 1 becomes the default:

- Some classes which are used to test the difference between static
  and dynamic.

- Subclasses of complex: complex uses old-style numbers and the slot
  wrappers used by dynamic classes only support new-style numbers.
  (Ideally, the complex type should be fixed, but that looks like a
  labor-intensive job.)

23 years agoIt's a fact: for binary operators, *under certain circumstances*,
Guido van Rossum [Fri, 28 Sep 2001 23:49:48 +0000 (23:49 +0000)]
It's a fact: for binary operators, *under certain circumstances*,
__rop__ now takes precendence over __op__.  Those circumstances are:

  - Both arguments are new-style classes
  - Both arguments are new-style numbers
  - Their implementation slots for tp_op differ
  - Their types differ
  - The right argument's type is a subtype of the left argument's type

Also did this for the ternary operator (pow) -- only the binary case
is dealt with properly though, since __rpow__ is not supported anyway.

23 years agoOuch. The wrapper for __rpow__ was the same as for __pow__, resulting
Guido van Rossum [Fri, 28 Sep 2001 22:58:52 +0000 (22:58 +0000)]
Ouch.  The wrapper for __rpow__ was the same as for __pow__, resulting
in bizarre outcomes.  Test forthcoming.

23 years agoMove XML-RPC-related docs to the "Internet Protocols" chapter.
Fred Drake [Fri, 28 Sep 2001 22:03:40 +0000 (22:03 +0000)]
Move XML-RPC-related docs to the "Internet Protocols" chapter.
Add entry for the SimpleXMLRPCServer module.

23 years agoAdd entry for the SimpleXMLRPCServer module.
Fred Drake [Fri, 28 Sep 2001 22:02:49 +0000 (22:02 +0000)]
Add entry for the SimpleXMLRPCServer module.

23 years agoPreliminary documentation for the SimpleXMLRPCServer module.
Fred Drake [Fri, 28 Sep 2001 22:02:21 +0000 (22:02 +0000)]
Preliminary documentation for the SimpleXMLRPCServer module.

23 years agoPost-release fiddling (prep for 2.2b1).
Tim Peters [Fri, 28 Sep 2001 21:53:42 +0000 (21:53 +0000)]
Post-release fiddling (prep for 2.2b1).

23 years agoMinor additions and rewrites.
Andrew M. Kuchling [Fri, 28 Sep 2001 20:46:46 +0000 (20:46 +0000)]
Minor additions and rewrites.
Bump version number.

23 years agoUpdate the xml.dom.minidom tests to cover the DOM-compliant parts of the
Fred Drake [Fri, 28 Sep 2001 20:31:50 +0000 (20:31 +0000)]
Update the xml.dom.minidom tests to cover the DOM-compliant parts of the
NodeList interface.

23 years agoInstall the new compiler and email packages
Andrew M. Kuchling [Fri, 28 Sep 2001 20:29:15 +0000 (20:29 +0000)]
Install the new compiler and email packages

23 years agoTighten up the new NodeList implementation.
Fred Drake [Fri, 28 Sep 2001 20:25:45 +0000 (20:25 +0000)]
Tighten up the new NodeList implementation.
Clean up a little; do not create an alias that is only used once, or store
attributes with constant values in an instance.

23 years agoRemove an infelicitous space.
Fred Drake [Fri, 28 Sep 2001 20:16:30 +0000 (20:16 +0000)]
Remove an infelicitous space.

23 years agoregrtest's -g option stopped working, during the changes to improve
Tim Peters [Fri, 28 Sep 2001 20:14:46 +0000 (20:14 +0000)]
regrtest's -g option stopped working, during the changes to improve
 error-reporting for the classic compare-expected-output tests.
Curiously, the bug consisted of not simplifying the logic enough!

23 years agoReflect recent refinements of the regression testing framework.
Fred Drake [Fri, 28 Sep 2001 20:05:25 +0000 (20:05 +0000)]
Reflect recent refinements of the regression testing framework.

23 years agoBe more rigorous about making pathnames absolute, to address SF bug
Guido van Rossum [Fri, 28 Sep 2001 20:00:29 +0000 (20:00 +0000)]
Be more rigorous about making pathnames absolute, to address SF bug
#424002.

Refactor init_path_from_argv0() and rename to copy_absolute(); add
absolutize() which does the same in-place.

Clean up whitespace (leading tabs -> spaces, delete trailing
spaces/tabs).

23 years agoClean up circular references in the Weak*Dictionary classes; this avoids
Fred Drake [Fri, 28 Sep 2001 19:01:26 +0000 (19:01 +0000)]
Clean up circular references in the Weak*Dictionary classes; this avoids
depending on the cycle detector code in the library implementation.
This is a *slightly* different patch than SF patch #417795, but takes
the same approach.  (This version avoids calling the __len__() method of
the dict in the remove() functions.)
This closes SF patch #417795.

23 years agoReorder Still To Do items (highest priority on top), add one.
Guido van Rossum [Fri, 28 Sep 2001 18:19:21 +0000 (18:19 +0000)]
Reorder Still To Do items (highest priority on top), add one.

23 years agoAdd complex to the dispatch tables, to avoid going through the whole
Guido van Rossum [Fri, 28 Sep 2001 18:16:13 +0000 (18:16 +0000)]
Add complex to the dispatch tables, to avoid going through the whole
rigmarole of __reduce__.

23 years agoChanges to copy() and deepcopy() in copy.py to support __reduce__ as a
Guido van Rossum [Fri, 28 Sep 2001 18:13:29 +0000 (18:13 +0000)]
Changes to copy() and deepcopy() in copy.py to support __reduce__ as a
fallback for objects that are neither supported by our dispatch table
nor have a __copy__ or __deepcopy__ method.

Changes to _reduce() in copy_reg.py to support reducing objects that
don't have a __dict__ -- copy.copy(complex()) now invokes _reduce().

Add tests for copy.copy() and copy.deepcopy() to test_regrtest.py.

23 years agoRemoved files no longer needed.
Fred Drake [Fri, 28 Sep 2001 17:22:35 +0000 (17:22 +0000)]
Removed files no longer needed.

23 years agoPY_RELEASE_SERIAL => 4
Barry Warsaw [Fri, 28 Sep 2001 17:15:23 +0000 (17:15 +0000)]
PY_RELEASE_SERIAL => 4
PY_VERSION => "2.2a4+"

23 years agoConvert to string methods.
Fred Drake [Fri, 28 Sep 2001 17:14:35 +0000 (17:14 +0000)]
Convert to string methods.

For the real document element, make sure the prolog is migrated into
the document element so it isn't left stranded.

Make fixup_trailing_whitespace() whitespace do what was really intended.

Add the *desc environments used in the C API manual to the list of
things that can exist at the paragraph level so they don't get wrapped
in <para>...</para>.

23 years agoFixed a minor typo.
Barry Warsaw [Fri, 28 Sep 2001 17:01:02 +0000 (17:01 +0000)]
Fixed a minor typo.

23 years agoUse consistent version annotations instead of something ad hoc.
Fred Drake [Fri, 28 Sep 2001 16:57:16 +0000 (16:57 +0000)]
Use consistent version annotations instead of something ad hoc.

23 years agoConvert most uses of the string module to string methods.
Fred Drake [Fri, 28 Sep 2001 16:26:13 +0000 (16:26 +0000)]
Convert most uses of the string module to string methods.
(string.join() lives!)

23 years agoAdded note about non-support of UNC paths on Windows.
Fred Drake [Fri, 28 Sep 2001 16:14:18 +0000 (16:14 +0000)]
Added note about non-support of UNC paths on Windows.
This fixes SF bug #465447.

23 years agoState that encode() and encodestring() append a newline to the input data
Fred Drake [Fri, 28 Sep 2001 16:01:46 +0000 (16:01 +0000)]
State that encode() and encodestring() append a newline to the input data
if it does not already end with a newline.
This fixes SF bug #463330.

23 years agoFix SF bug 419062: building pbs on AIX 4.3.2
Guido van Rossum [Fri, 28 Sep 2001 15:59:38 +0000 (15:59 +0000)]
Fix SF bug 419062: building pbs on AIX 4.3.2

Apply patch from "china@thewrittenword.com" to put the correct
location for ld_so_aix in BLDSHARED.

23 years agoMerged changes from 22a4 branch.
Barry Warsaw [Fri, 28 Sep 2001 15:26:12 +0000 (15:26 +0000)]
Merged changes from 22a4 branch.

23 years agoFor Python 2.2 and newer, actually support the full NodeList interface by
Fred Drake [Fri, 28 Sep 2001 04:33:06 +0000 (04:33 +0000)]
For Python 2.2 and newer, actually support the full NodeList interface by
subclassing list to add the length and item() attributes.

23 years agoMerge branch changes (coercion, rich comparisons) into trunk.
Guido van Rossum [Thu, 27 Sep 2001 20:30:07 +0000 (20:30 +0000)]
Merge branch changes (coercion, rich comparisons) into trunk.

23 years agoAdd entries for the email and compiler packages.
Fred Drake [Thu, 27 Sep 2001 20:11:07 +0000 (20:11 +0000)]
Add entries for the email and compiler packages.

23 years agoMarkup adjustments.
Fred Drake [Thu, 27 Sep 2001 20:09:39 +0000 (20:09 +0000)]
Markup adjustments.

23 years agoAdded dependencies for the compiler and email packages.
Fred Drake [Thu, 27 Sep 2001 20:08:20 +0000 (20:08 +0000)]
Added dependencies for the compiler and email packages.
(Migrate to branch, along with new files compiler.tex and asttable.tex.)

23 years agoMigrate the compiler documentation from the Tools/compiler/doc/ directory.
Fred Drake [Thu, 27 Sep 2001 20:06:07 +0000 (20:06 +0000)]
Migrate the compiler documentation from the Tools/compiler/doc/ directory.
Changes made to make it work in the new location.

23 years agoDo not distinguish \refmodule from \module in the generated output;
Fred Drake [Thu, 27 Sep 2001 17:01:59 +0000 (17:01 +0000)]
Do not distinguish \refmodule from \module in the generated output;
whether or not a link will be generated will depend on the link database.
Add a couple of explanatory comments for one of the stranger constructs
(giving input an empty name).

23 years agoRe-write <ulink> elements as described in the conversion spec.
Fred Drake [Thu, 27 Sep 2001 16:52:22 +0000 (16:52 +0000)]
Re-write <ulink> elements as described in the conversion spec.

23 years agoChange the sense of a test in how the profiler interprets exception events.
Fred Drake [Thu, 27 Sep 2001 16:28:42 +0000 (16:28 +0000)]
Change the sense of a test in how the profiler interprets exception events.
This should fix a bug in how time is allocated during exception propogation
(esp. in the presence of finally clauses).

23 years agoBump Windows build numbers for 2.2a4; installer changes were done earlier.
Tim Peters [Thu, 27 Sep 2001 16:28:15 +0000 (16:28 +0000)]
Bump Windows build numbers for 2.2a4; installer changes were done earlier.

23 years agoTurn \input, \include, and \verbatiminput into XInclude elements instead
Fred Drake [Thu, 27 Sep 2001 15:49:23 +0000 (15:49 +0000)]
Turn \input, \include, and \verbatiminput into XInclude elements instead
of something ad-hoc.

23 years agoAdded note about new StringIO/cStringIO feature.
Marc-André Lemburg [Thu, 27 Sep 2001 14:17:33 +0000 (14:17 +0000)]
Added note about new StringIO/cStringIO feature.

23 years agoAdd support for some more markup that had slipped in.
Fred Drake [Thu, 27 Sep 2001 04:18:39 +0000 (04:18 +0000)]
Add support for some more markup that had slipped in.
Fixed a typo in a comment.

23 years agoFix comment typo
Andrew M. Kuchling [Thu, 27 Sep 2001 04:18:36 +0000 (04:18 +0000)]
Fix comment typo

23 years agoFix some markup errors.
Fred Drake [Thu, 27 Sep 2001 04:17:20 +0000 (04:17 +0000)]
Fix some markup errors.

23 years agoMarkup adjustment: \[...\] is math markup and does not translate well when
Fred Drake [Thu, 27 Sep 2001 04:16:27 +0000 (04:16 +0000)]
Markup adjustment: \[...\] is math markup and does not translate well when
used with text as was done here.  Fixed so that the typeset version wraps
the warning text and the HTML version does not create images of the warning
text.

23 years agodocroutine() (both instances): Docstrings for class methods weren't
Tim Peters [Thu, 27 Sep 2001 04:08:16 +0000 (04:08 +0000)]
docroutine() (both instances):  Docstrings for class methods weren't
getting displayed, due to a special case here whose purpose I didn't
understand.  So just disabled the doc suppression here.

Another special case here skips the docs when picking apart a method
and finding that the im_func is also in the class __dict__ under
the same name.  That one I understood.  It has a curious consequence,
though, wrt inherited properties:  a static class copies inherited stuff
into the inheriting class's dict, and that affects whether or not this
special case triggers.  The upshoot is that pydoc doesn't show the
function docstrings of getter/setter/deleter functions of inherited
properties in the property section when the class is static, but does
when the class is dynamic (bring up Lib/test/pydocfodder.py under
GUI pydoc to see this).

23 years agoList class attrs in MRO order of defining class instead of by alphabetic
Tim Peters [Thu, 27 Sep 2001 03:29:51 +0000 (03:29 +0000)]
List class attrs in MRO order of defining class instead of by alphabetic
order of defining class's name.

23 years agoRemoved no-longer-true comment about pydoc working under all versions of
Tim Peters [Wed, 26 Sep 2001 22:39:22 +0000 (22:39 +0000)]
Removed no-longer-true comment about pydoc working under all versions of
Python since 1.5 (virtually everything I changed over the last week relies
on "modern" features, particularly nested scopes).

23 years agoRemove comment that no longer applies.
Fred Drake [Wed, 26 Sep 2001 22:26:45 +0000 (22:26 +0000)]
Remove comment that no longer applies.

23 years agoUpdates do email package documentation for markup, style, and
Barry Warsaw [Wed, 26 Sep 2001 22:21:52 +0000 (22:21 +0000)]
Updates do email package documentation for markup, style, and
organization.

23 years agoDisplay a class's method resolution order, if it's non-trivial. "Trivial"
Tim Peters [Wed, 26 Sep 2001 21:31:51 +0000 (21:31 +0000)]
Display a class's method resolution order, if it's non-trivial.  "Trivial"
here means it has no more than one base class to rummage through (in which
cases there's no potential confusion about resolution order).

23 years agoMore test cases, including something that simulates what the profiler
Fred Drake [Wed, 26 Sep 2001 21:00:33 +0000 (21:00 +0000)]
More test cases, including something that simulates what the profiler
probably *should* be doing.

23 years agoA file just to look at (using pydoc).
Tim Peters [Wed, 26 Sep 2001 20:31:52 +0000 (20:31 +0000)]
A file just to look at (using pydoc).

23 years agoAdd tests for new PyErr_NormalizeException() behavior
Jeremy Hylton [Wed, 26 Sep 2001 20:01:13 +0000 (20:01 +0000)]
Add tests for new PyErr_NormalizeException() behavior

Add raise_exception() to the _testcapi module.  It isn't a test, but
the C API exists only to support test_exceptions.  raise_exception()
takes two arguments -- an exception class and an integer specifying
how many arguments it should be called with.

test_exceptions uses BadException() to test the interpreter's behavior
when there is a problem instantiating the exception.  test_capi1()
calls it with too many arguments.  test_capi2() causes an exception to
be raised in the Python code of the constructor.

23 years agoPyErr_NormalizeException()
Jeremy Hylton [Wed, 26 Sep 2001 19:58:38 +0000 (19:58 +0000)]
PyErr_NormalizeException()

If a new exception occurs while an exception instance is being
created, try harder to make sure there is a traceback.  If the
original exception had a traceback associated with it and the new
exception does not, keep the old exception.

Of course, callers to PyErr_NormalizeException() must still be
prepared to have tb set to NULL.

XXX This isn't an ideal solution, but it's better than no traceback at
all.  It occurs if, for example, the exception occurs when the call to
the constructor fails before any Python code is executed.  Guido
suggests that it there is Python code that was about to be executed
-- but wasn't, say, because it was called with the wrong number of
arguments -- then we should point at the first line of the code object
anyway.

23 years agoDon't export generators future info
Jeremy Hylton [Wed, 26 Sep 2001 19:54:08 +0000 (19:54 +0000)]
Don't export generators future info

23 years agoPrevent a NULL pointer from being pushed onto the stack.
Jeremy Hylton [Wed, 26 Sep 2001 19:24:45 +0000 (19:24 +0000)]
Prevent a NULL pointer from being pushed onto the stack.

It's possible for PyErr_NormalizeException() to set the traceback
pointer to NULL.  I'm not sure how to provoke this directly from
Python, although it may be possible.  The error occurs when an
exception is set using PyErr_SetObject() and another exception occurs
while PyErr_NormalizeException() is creating the exception instance.

XXX As a result of this change, it's possible for an exception to
occur but sys.last_traceback to be left undefined.  Not sure if this
is a problem.

23 years agoMove the styling for the HTML version of \mailheader into the CSS file.
Fred Drake [Wed, 26 Sep 2001 18:46:36 +0000 (18:46 +0000)]
Move the styling for the HTML version of \mailheader into the CSS file.
In both the HTML and typeset versions of the documentation, add a colon
after the name of a mail header so that it is more easily distinguished
from other text.

23 years agoNote that the colon following a mail header name should not be included
Fred Drake [Wed, 26 Sep 2001 18:43:20 +0000 (18:43 +0000)]
Note that the colon following a mail header name should not be included
when using the \mailheader markup.
Change a couple of inline examples to show the markup rather than the
result.

23 years agoTypo fix.
Greg Ward [Wed, 26 Sep 2001 18:12:49 +0000 (18:12 +0000)]
Typo fix.

23 years agoMove the \mailheader description to the right place.
Fred Drake [Wed, 26 Sep 2001 17:01:58 +0000 (17:01 +0000)]
Move the \mailheader description to the right place.
Clarify the \mimetype description; it can be used to refer to a part of a
MIME type name, so \mimetype{text} or \mimetype{plain} can be used, not
just \mimetype{text/plain}.

23 years agoStart making some markup adjustments; Barry has indicated he will work on
Fred Drake [Wed, 26 Sep 2001 16:52:18 +0000 (16:52 +0000)]
Start making some markup adjustments; Barry has indicated he will work on
this before we finish the integration, along with some restructuring.

23 years agoTest case for SF bugs #463359 and #462937, added to test_grammar for lack of
Thomas Wouters [Wed, 26 Sep 2001 12:43:39 +0000 (12:43 +0000)]
Test case for SF bugs #463359 and #462937, added to test_grammar for lack of
a better place. Excessively fragile code, but at least it breaks when
something in this area changes!

23 years agoUpdate the tests for the current incarnation of the email package, and
Barry Warsaw [Wed, 26 Sep 2001 05:47:08 +0000 (05:47 +0000)]
Update the tests for the current incarnation of the email package, and
added some new tests of message/delivery-status content type messages.

23 years agoMore test messages for test_email.py
Barry Warsaw [Wed, 26 Sep 2001 05:45:17 +0000 (05:45 +0000)]
More test messages for test_email.py

23 years ago_parsebody(): Use get_boundary() and get_type().
Barry Warsaw [Wed, 26 Sep 2001 05:44:09 +0000 (05:44 +0000)]
_parsebody(): Use get_boundary() and get_type().

    Also, add a clause to the big-if to handle message/delivery-status
    content types.  These create a message with subparts that are
    Message instances, which best represent the header blocks of this
    content type.

23 years agohas_key(): Implement in terms of get().
Barry Warsaw [Wed, 26 Sep 2001 05:41:51 +0000 (05:41 +0000)]
has_key(): Implement in terms of get().

get_type(): Use a compiled regular expression, which can be shared.

_get_params_preserve(): A helper method which extracts the header's
    parameter list preserving value quoting.  I'm not sure that this
    needs to be a public method.  It's necessary because we want
    get_param() and friends to return the unquoted parameter value,
    however we want the quote-preserved form for set_boundary().

get_params(), get_param(), set_boundary(): Implement in terms of
    _get_params_preserve().

walk(): Yield ourself first, then recurse over our subparts (if any).

23 years ago__init__(): Arguments major renamed to maintype and minor renamed to
Barry Warsaw [Wed, 26 Sep 2001 05:36:36 +0000 (05:36 +0000)]
__init__(): Arguments major renamed to maintype and minor renamed to
    subtype for consistency with the rest of the package.

23 years agoUpdated docstrings. Also,
Barry Warsaw [Wed, 26 Sep 2001 05:35:47 +0000 (05:35 +0000)]
Updated docstrings.  Also,

typed_subpart_iterator(): Arguments major renamed to maintype and
    minor renamed to subtype for consistency with the rest of the
    package.

23 years agoImage.py and class Image => MIMEImage.py and MIMEImage
Barry Warsaw [Wed, 26 Sep 2001 05:34:30 +0000 (05:34 +0000)]
Image.py and class Image => MIMEImage.py and MIMEImage

Text.py and class Text => MIMEText.py and MIMEText

MessageRFC822.py and class MessageRFC822 => MIMEMessage.py and MIMEMessage

These are renamed so as to be more consistent; these are MIME specific
derived classes for when creating the object model out of whole cloth.