]> granicus.if.org Git - python/log
python
22 years agoadd note about os.path.join and drive letters on Windows.
Skip Montanaro [Thu, 12 Sep 2002 17:39:56 +0000 (17:39 +0000)]
add note about os.path.join and drive letters on Windows.

22 years agoIf PyXML is installed, there is no Node.allnodes, so that portion of
Fred Drake [Thu, 12 Sep 2002 17:03:02 +0000 (17:03 +0000)]
If PyXML is installed, there is no Node.allnodes, so that portion of
the test should be skipped if that's the case.

22 years agoRelax a test so it passes either with the standard library or PyXML.
Fred Drake [Thu, 12 Sep 2002 17:02:01 +0000 (17:02 +0000)]
Relax a test so it passes either with the standard library or PyXML.
The original expected value is actually wrong, but we'll pick up the
real fix and test when we refresh the xml package from PyXML before
2.3a1.

22 years agoFix warnings on 64-bit platforms about casts from pointers to ints.
Guido van Rossum [Thu, 12 Sep 2002 14:43:41 +0000 (14:43 +0000)]
Fix warnings on 64-bit platforms about casts from pointers to ints.
Two of these were real bugs.

22 years agoOnly build the 'dl' extension when sys.maxint equals 2**31-1.
Guido van Rossum [Thu, 12 Sep 2002 14:41:20 +0000 (14:41 +0000)]
Only build the 'dl' extension when sys.maxint equals 2**31-1.
This module raises "SystemError: module dl requires sizeof(int) ==
sizeof(long) == sizeof(char*)" when compiled on 64-bit platforms.

22 years agoRemove another mention of "import string".
Walter Dörwald [Thu, 12 Sep 2002 14:40:44 +0000 (14:40 +0000)]
Remove another mention of "import string".
The file itself still mentions Python 1.5.1,
so it might need further updates.

22 years agoFix typo reported by Paul Clifford.
Fred Drake [Thu, 12 Sep 2002 14:16:07 +0000 (14:16 +0000)]
Fix typo reported by Paul Clifford.
Note that there is no str.joinfields(), use str.join() instead.

22 years agoFix for platforms where int != long.
Michael W. Hudson [Thu, 12 Sep 2002 09:31:30 +0000 (09:31 +0000)]
Fix for platforms where int != long.

22 years agoUndocumented feature: MHMailbox sets the msg object's _mh_msgno
Guido van Rossum [Thu, 12 Sep 2002 05:08:00 +0000 (05:08 +0000)]
Undocumented feature: MHMailbox sets the msg object's _mh_msgno
attribute to the (stringized) message number (if this attribute is
settable).  This is useful so users of this class can report the
correct message number (e.g. when classifying spam).

Also added a blank line before the first method of each class.

22 years agoI don't think it's safe to use map.iteritems() in the various poll
Guido van Rossum [Thu, 12 Sep 2002 04:57:29 +0000 (04:57 +0000)]
I don't think it's safe to use map.iteritems() in the various poll
routines.  I got some errors "dictionary changed size during
iteration" when running ZEO tests on machine while doing heavy
forground work in another window, and thinking about it, I believe
that it should be okay if readable() or writable() modifies the map.

I also finally made all the spacing conform to the Python style guide:
no space between a function/method name and the following left
parenthesis (fixed lots of occurrences), spaces around assignment
operators (fixed a few, always of the form "map=..."), and a blank
line between the class statement and the first method definition (a
few).

22 years agoBump to 2.3.1 to pick up the missing file.
Barry Warsaw [Thu, 12 Sep 2002 03:44:50 +0000 (03:44 +0000)]
Bump to 2.3.1 to pick up the missing file.

22 years agoPass None to AHGotoPage().
Jack Jansen [Wed, 11 Sep 2002 22:05:59 +0000 (22:05 +0000)]
Pass None to AHGotoPage().

22 years agoThe debugger source view only understood mac-style linefeeds. Fixed.
Jack Jansen [Wed, 11 Sep 2002 22:05:02 +0000 (22:05 +0000)]
The debugger source view only understood mac-style linefeeds. Fixed.

22 years agoRevise text about the level of DOM support, and provide pointers to
Fred Drake [Wed, 11 Sep 2002 22:03:47 +0000 (22:03 +0000)]
Revise text about the level of DOM support, and provide pointers to
the work of the XML-SIG in the main body of the text.

Modify the markup in a few places to avoid wrapping lines in bad
places, and just general cleanliness.

22 years agoAdd Mats Wichmann, another snake farmhand.
Guido van Rossum [Wed, 11 Sep 2002 21:09:53 +0000 (21:09 +0000)]
Add Mats Wichmann, another snake farmhand.

22 years agoApply diff2.txt from SF patch http://www.python.org/sf/572113
Walter Dörwald [Wed, 11 Sep 2002 20:36:02 +0000 (20:36 +0000)]
Apply diff2.txt from SF patch http://www.python.org/sf/572113
(with one small bugfix in bgen/bgen/scantools.py)

This replaces string module functions with string methods
for the stuff in the Tools directory. Several uses of
string.letters etc. are still remaining.

22 years agoAlphabetize Qvist properly.
Guido van Rossum [Wed, 11 Sep 2002 19:40:10 +0000 (19:40 +0000)]
Alphabetize Qvist properly.

22 years agoInsert an overflow check when the sequence repetition count is outside
Guido van Rossum [Wed, 11 Sep 2002 19:00:52 +0000 (19:00 +0000)]
Insert an overflow check when the sequence repetition count is outside
the range of ints.  The old code would pass random truncated bits to
sq_repeat() on a 64-bit machine.

Backport candidate.

22 years agoAdd Laura "force of nature" Creighton and Anders "snake farmer" Qvist,
Guido van Rossum [Wed, 11 Sep 2002 18:33:56 +0000 (18:33 +0000)]
Add Laura "force of nature" Creighton and Anders "snake farmer" Qvist,
for their contributions to the snake farm.

22 years agoThe list(xrange(sys.maxint / 4)) test blew up on 64-bit platforms.
Guido van Rossum [Wed, 11 Sep 2002 18:32:30 +0000 (18:32 +0000)]
The list(xrange(sys.maxint / 4)) test blew up on 64-bit platforms.
Because ob_size is a 32-bit int but sys.maxint is LONG_MAX which is a
64-bit value, there's no way to make this test succeed on a 64-bit
platform.  So just skip it when sys.maxint isn't 0x7fffffff.

Backport candidate.

22 years agoPatch suggested by Hamish Lawson: add an __iter__() that returns
Guido van Rossum [Wed, 11 Sep 2002 18:20:34 +0000 (18:20 +0000)]
Patch suggested by Hamish Lawson: add an __iter__() that returns
iter(self.keys()).

22 years agoFix *really* embarrassing typo reported by Raymond Hettinger.
Michael W. Hudson [Wed, 11 Sep 2002 17:09:45 +0000 (17:09 +0000)]
Fix *really* embarrassing typo reported by Raymond Hettinger.

22 years agoUse distutils.debug.DEBUG instead of distutils.core.DEBUG.
Jeremy Hylton [Wed, 11 Sep 2002 16:31:53 +0000 (16:31 +0000)]
Use distutils.debug.DEBUG instead of distutils.core.DEBUG.

Note that distutils.core.DEBUG still works if client code uses it, but
the core code avoids circular references by using distutils.debug.

22 years agoDefine DEBUG in a separate module to resolve circular references.
Jeremy Hylton [Wed, 11 Sep 2002 16:28:52 +0000 (16:28 +0000)]
Define DEBUG in a separate module to resolve circular references.

22 years agoRemove mentioning of Python 2.0 limitations. Fixes #607783.
Martin v. Löwis [Wed, 11 Sep 2002 16:26:03 +0000 (16:26 +0000)]
Remove mentioning of Python 2.0 limitations. Fixes #607783.

22 years agoUntested code for 64-bit platforms. range_length() is declared as int
Guido van Rossum [Wed, 11 Sep 2002 15:55:48 +0000 (15:55 +0000)]
Untested code for 64-bit platforms.  range_length() is declared as int
but returns r->len which is a long.  This doesn't even cause a warning
on 32-bit platforms, but can return bogus values on 64-bit platforms
(and should cause a compiler warning).  Fix this by inserting a range
check when LONG_MAX != INT_MAX, and adding an explicit cast to (int)
when the test passes.  When r->len is out of range, PySequence_Size()
and hence len() will report an error (but an iterator will still
work).

22 years agoA slight change to SET_LINENO-less tracing.
Michael W. Hudson [Wed, 11 Sep 2002 15:36:32 +0000 (15:36 +0000)]
A slight change to SET_LINENO-less tracing.

This makes things a touch more like 2.2.  Read the comments in
Python/ceval.c for more details.

22 years agoBunch more tests.
Michael W. Hudson [Wed, 11 Sep 2002 14:47:51 +0000 (14:47 +0000)]
Bunch more tests.

22 years agoget_payload(): Document that calling it with no arguments returns a
Barry Warsaw [Wed, 11 Sep 2002 14:11:35 +0000 (14:11 +0000)]
get_payload(): Document that calling it with no arguments returns a
reference to the payload.

22 years agoIgnore IOError exceptions when writing the message.
Mark Hammond [Wed, 11 Sep 2002 13:22:35 +0000 (13:22 +0000)]
Ignore IOError exceptions when writing the message.

22 years agotest_both(): I believe this was a typo: m is only defined if no
Barry Warsaw [Wed, 11 Sep 2002 02:56:42 +0000 (02:56 +0000)]
test_both(): I believe this was a typo: m is only defined if no
exception occurred so it should only be closed in the else clause.
Without this change we can an UnboundLocalError on Linux:

Traceback (most recent call last):
  File "Lib/test/test_mmap.py", line 304, in ?
    test_both()
  File "Lib/test/test_mmap.py", line 208, in test_both
    m.close()
UnboundLocalError: local variable 'm' referenced before assignment

22 years agotest_quote_unquote(): Added a test for the rfc822.unquote() patch
Barry Warsaw [Wed, 11 Sep 2002 02:32:57 +0000 (02:32 +0000)]
test_quote_unquote(): Added a test for the rfc822.unquote() patch
(adapted from Quinn Dunkan's mimelib SF patch #573204).

22 years agounquote(): Didn't properly de-backslash-ify. This patch (adapted from
Barry Warsaw [Wed, 11 Sep 2002 02:32:14 +0000 (02:32 +0000)]
unquote(): Didn't properly de-backslash-ify.  This patch (adapted from
Quinn Dunkan's mimelib SF patch #573204) fixes the problem.

22 years agotest_utils_quote_unquote(): Test for unquote() properly
Barry Warsaw [Wed, 11 Sep 2002 02:31:24 +0000 (02:31 +0000)]
test_utils_quote_unquote(): Test for unquote() properly
de-backslash-ifying.

22 years agorfc822.unquote() doesn't properly de-backslash-ify in Python prior to
Barry Warsaw [Wed, 11 Sep 2002 02:22:48 +0000 (02:22 +0000)]
rfc822.unquote() doesn't properly de-backslash-ify in Python prior to
2.3.  This patch (adapted from Quinn Dunkan's SF patch #573204) fixes
the problem and should get ported to rfc822.py.

22 years agoConverted to Vise 8.
Jack Jansen [Wed, 11 Sep 2002 00:55:48 +0000 (00:55 +0000)]
Converted to Vise 8.

22 years agoClarify who maintains Tkinter and who maintains Tk.
Fred Drake [Tue, 10 Sep 2002 21:59:17 +0000 (21:59 +0000)]
Clarify who maintains Tkinter and who maintains Tk.

22 years agoAt Jim Fulton's request, increase the maxstring value of _saferepr to
Guido van Rossum [Tue, 10 Sep 2002 21:57:14 +0000 (21:57 +0000)]
At Jim Fulton's request, increase the maxstring value of _saferepr to
a more reasonable value.

Backport candidate.

22 years agoI left some debugging junk in here; removed it. Also replaced a few
Tim Peters [Tue, 10 Sep 2002 21:19:55 +0000 (21:19 +0000)]
I left some debugging junk in here; removed it.  Also replaced a few
more instances of the bizarre "del f; del m" ways to spell .close() (del
won't do any good here under Jython, etc).

22 years agoAll set for 2.3 installer, except for upgrade of Vise version.
Jack Jansen [Tue, 10 Sep 2002 21:15:44 +0000 (21:15 +0000)]
All set for 2.3 installer, except for upgrade of Vise version.

22 years agoA few days ago a test was added here to ensure that creating an mmap
Tim Peters [Tue, 10 Sep 2002 20:49:15 +0000 (20:49 +0000)]
A few days ago a test was added here to ensure that creating an mmap
with a size larger than the underlying file worked on Windows.  It
does <wink>.  However, merely creating an mmap that way has the side
effect of growing the file on disk to match the specified size.  A
*later* test assumed that the file on disk was still exactly as it was
before the new "size too big" test was added, but that's no longer true.
So added a hack at the end of the "size too big" test to truncate the
disk file back to its original size on Windows.

22 years agoFixed typo spotted by Whomas Touters.
Jack Jansen [Tue, 10 Sep 2002 20:07:34 +0000 (20:07 +0000)]
Fixed typo spotted by Whomas Touters.

22 years ago_parsebody(): Instead of raising a BoundaryError when no start
Barry Warsaw [Tue, 10 Sep 2002 16:14:56 +0000 (16:14 +0000)]
_parsebody(): Instead of raising a BoundaryError when no start
boundary could be found -- in a lax parser -- the entire body is
assigned to the message payload.

22 years agoImport _isstring() from the compatibility layer.
Barry Warsaw [Tue, 10 Sep 2002 16:13:45 +0000 (16:13 +0000)]
Import _isstring() from the compatibility layer.

_handle_text(): Use _isstring() for stringiness test.

_handle_multipart(): Add a test before the ListType test, checking for
stringiness of the payload.  String payloads for multitypes means a
message with broken MIME chrome was parsed by a lax parser.  Instead
of raising a BoundaryError in those cases, the entire body is assigned
to the message payload (but since the content type is still
multipart/*, the Generator needs to be updated too).

22 years ago_isstring(): Factor out "stringiness" test, e.g. for StringType or
Barry Warsaw [Tue, 10 Sep 2002 16:09:06 +0000 (16:09 +0000)]
_isstring(): Factor out "stringiness" test, e.g. for StringType or
UnicodeType, which is different between Python 2.1 and 2.2.

22 years ago_ascii_split(): Don't lstrip continuation lines. Closes SF bug #601392.
Barry Warsaw [Tue, 10 Sep 2002 15:57:29 +0000 (15:57 +0000)]
_ascii_split(): Don't lstrip continuation lines.  Closes SF bug #601392.

22 years agotest_splitting_first_line_only_is_long(): New test for SF bug #601392,
Barry Warsaw [Tue, 10 Sep 2002 15:46:44 +0000 (15:46 +0000)]
test_splitting_first_line_only_is_long(): New test for SF bug #601392,
broken wrapping of long ASCII headers.

22 years agoA sample message with broken MIME boundaries.
Barry Warsaw [Tue, 10 Sep 2002 15:43:30 +0000 (15:43 +0000)]
A sample message with broken MIME boundaries.

22 years agoextract_time(): Squash compiler warning about possibly information-
Tim Peters [Tue, 10 Sep 2002 15:37:28 +0000 (15:37 +0000)]
extract_time():  Squash compiler warning about possibly information-
losing implicit double->long cast.

22 years agoAdd missing return statement.
Martin v. Löwis [Tue, 10 Sep 2002 15:04:41 +0000 (15:04 +0000)]
Add missing return statement.

22 years agoDocument type and semantics of the tp_print return value. Closes SF 606464.
Raymond Hettinger [Tue, 10 Sep 2002 13:48:01 +0000 (13:48 +0000)]
Document type and semantics of the tp_print return value.  Closes SF 606464.

22 years agoAdded include guards and C++ extern "C" {} constructs. Partial fix for #607253.
Jack Jansen [Tue, 10 Sep 2002 12:32:47 +0000 (12:32 +0000)]
Added include guards and C++ extern "C" {} constructs. Partial fix for #607253.
Bugfix candidate.

22 years agoReverted previous change, I was confused.
Jack Jansen [Tue, 10 Sep 2002 12:22:32 +0000 (12:22 +0000)]
Reverted previous change, I was confused.

22 years agoUse utimes(2) where available to support microsecond timestamps.
Martin v. Löwis [Tue, 10 Sep 2002 09:16:13 +0000 (09:16 +0000)]
Use utimes(2) where available to support microsecond timestamps.

22 years agoAlways generate floats for stat_result; fix configure test.
Martin v. Löwis [Mon, 9 Sep 2002 16:17:47 +0000 (16:17 +0000)]
Always generate floats for stat_result; fix configure test.

22 years agoPatch #606592: Subsecond timestamps in stat_result.
Martin v. Löwis [Mon, 9 Sep 2002 14:24:16 +0000 (14:24 +0000)]
Patch #606592: Subsecond timestamps in stat_result.

22 years agoThe .preprocess() method didn't work, because it didn't add the input file
Andrew M. Kuchling [Mon, 9 Sep 2002 12:16:58 +0000 (12:16 +0000)]
The .preprocess() method didn't work, because it didn't add the input file
    to the command-line arguments.  Fix this by adding the source filename.

22 years agoInclude an empty body when checking for a header file
Andrew M. Kuchling [Mon, 9 Sep 2002 12:10:00 +0000 (12:10 +0000)]
Include an empty body when checking for a header file

(Bugfix candidate for 2.2, and likely 2.1 as well)

22 years agoFix escaping of non-ASCII characters.
Martin v. Löwis [Mon, 9 Sep 2002 06:17:05 +0000 (06:17 +0000)]
Fix escaping of non-ASCII characters.

22 years agoFix typo. Close SF Bug 606354.
Raymond Hettinger [Sun, 8 Sep 2002 22:26:13 +0000 (22:26 +0000)]
Fix typo.  Close SF Bug 606354.

22 years agoClarified that the footnote applies to versions 1.5 and after instead of
Raymond Hettinger [Sun, 8 Sep 2002 21:10:54 +0000 (21:10 +0000)]
Clarified that the footnote applies to versions 1.5 and after instead of
just version 1.5.  Closes SF bug 577793.

22 years agoshutil.copyfile(src,dst) was clobbering the file when the src and dst were
Raymond Hettinger [Sun, 8 Sep 2002 20:43:59 +0000 (20:43 +0000)]
shutil.copyfile(src,dst) was clobbering the file when the src and dst were
the same.   Added check to verify the two names are not the same.  Does not
check the actual files to see if there is a symbolic link.

Closes SF bug 490165 and Tzot's patch 604600.

22 years agoFix API typo. The write buffer is not const. Closes SF 606216.
Raymond Hettinger [Sun, 8 Sep 2002 04:39:28 +0000 (04:39 +0000)]
Fix API typo.  The write buffer is not const.  Closes SF 606216.

22 years agoExtended IDLE's open module menu item to handle hierarchical module names.
Raymond Hettinger [Sun, 8 Sep 2002 03:42:01 +0000 (03:42 +0000)]
Extended IDLE's open module menu item to handle hierarchical module names.

Will look at doing something similar in import.c so that the effort won't
have to be repeated elsewhere.

Closes SF patch 600152.

22 years agoA little refactoring.
Jeremy Hylton [Sun, 8 Sep 2002 00:14:54 +0000 (00:14 +0000)]
A little refactoring.

Add read(), write(), and readwrite() helper functions to shorten poll
functions.  Use get() instead of try/except KeyError for lookup.
XXX How could the lookup ever fail?

Remove module-level DEBUG flag.

Use iteritems() instead of items() when walking the socket map.

Reformat the functions I touched so that are consistently Pythonic.

22 years agotightened up the definition of \b and \B some more based upon discussion
Skip Montanaro [Sat, 7 Sep 2002 18:48:14 +0000 (18:48 +0000)]
tightened up the definition of \b and \B some more based upon discussion
after the last checkin.

22 years agoTry to get test to pass on Windows
Neal Norwitz [Sat, 7 Sep 2002 05:56:21 +0000 (05:56 +0000)]
Try to get test to pass on Windows

22 years agoChange UserDict to IterableUserDict
Raymond Hettinger [Sat, 7 Sep 2002 04:48:03 +0000 (04:48 +0000)]
Change UserDict to IterableUserDict

22 years agoNext few steps towards a 2.3 installer.
Jack Jansen [Sat, 7 Sep 2002 00:10:31 +0000 (00:10 +0000)]
Next few steps towards a 2.3 installer.

22 years agoFirst steps towards a 2.3 installer.
Jack Jansen [Fri, 6 Sep 2002 23:37:07 +0000 (23:37 +0000)]
First steps towards a 2.3 installer.

22 years agoEnable _AH module.
Jack Jansen [Fri, 6 Sep 2002 23:33:40 +0000 (23:33 +0000)]
Enable _AH module.

22 years agoImport Carbon.AH, not Carbon.Help
Jack Jansen [Fri, 6 Sep 2002 23:33:31 +0000 (23:33 +0000)]
Import Carbon.AH, not Carbon.Help

22 years agoReorganized order of help menu, and don't show Carbon documentation
Jack Jansen [Fri, 6 Sep 2002 23:03:32 +0000 (23:03 +0000)]
Reorganized order of help menu, and don't show Carbon documentation
entries on OS9 (where they are never available, and simply disabling
them might lead people to think otherwise).

22 years agoSilly me, I enabled the old help module. Fixed.
Jack Jansen [Fri, 6 Sep 2002 22:59:00 +0000 (22:59 +0000)]
Silly me, I enabled the old help module. Fixed.

22 years agoAdded carbon Help module.
Jack Jansen [Fri, 6 Sep 2002 22:41:03 +0000 (22:41 +0000)]
Added carbon Help module.

22 years agoUpped the stack size to 256KB. test_class ran afoul of the 64K limit, and this is...
Jack Jansen [Fri, 6 Sep 2002 21:59:21 +0000 (21:59 +0000)]
Upped the stack size to 256KB. test_class ran afoul of the 64K limit, and this is probably a better fix than lowering the recursion limit.

22 years agoSkip UDP testing for MacPython (for now), it hangs. This may be due to
Jack Jansen [Fri, 6 Sep 2002 21:57:50 +0000 (21:57 +0000)]
Skip UDP testing for MacPython (for now), it hangs. This may be due to
GUSI/Threading interaction, I'm not sure, but I don't have the time to fix this right now.

22 years agoUpdated the notes on building a binary installer.
Jack Jansen [Fri, 6 Sep 2002 21:55:47 +0000 (21:55 +0000)]
Updated the notes on building a binary installer.

22 years agoThe script was very sloppy about which variables held source pathnames
Jack Jansen [Fri, 6 Sep 2002 21:55:13 +0000 (21:55 +0000)]
The script was very sloppy about which variables held source pathnames
and which held destination pathnames. Fixed.

22 years agoFixed a typo in the binary install notes
Jack Jansen [Fri, 6 Sep 2002 21:00:55 +0000 (21:00 +0000)]
Fixed a typo in the binary install notes
rewrapped: as usual with my files everything was far wider than 80 chars.

22 years agoGet rid of non-ascii characters.
Jack Jansen [Fri, 6 Sep 2002 20:43:28 +0000 (20:43 +0000)]
Get rid of non-ascii characters.

22 years agoUse PyString_CHECK_INTERNED.
Jack Jansen [Fri, 6 Sep 2002 20:42:27 +0000 (20:42 +0000)]
Use PyString_CHECK_INTERNED.

22 years agoStarted on documentation for building a MacOSX binary installer.
Jack Jansen [Fri, 6 Sep 2002 20:24:51 +0000 (20:24 +0000)]
Started on documentation for building a MacOSX binary installer.
Unfinished.

22 years agoRemove .pyo files too.
Jack Jansen [Fri, 6 Sep 2002 20:23:09 +0000 (20:23 +0000)]
Remove .pyo files too.

22 years agoScript to generate .pkg packages, donated by Dinu Gherman. This is his
Jack Jansen [Fri, 6 Sep 2002 19:47:49 +0000 (19:47 +0000)]
Script to generate .pkg packages, donated by Dinu Gherman. This is his
original code, it still needs fiddling to make it work in general
circumstances.

22 years agoHave os.environ() inherit from the iterable version of UserDict.
Raymond Hettinger [Fri, 6 Sep 2002 19:36:31 +0000 (19:36 +0000)]
Have os.environ() inherit from the iterable version of UserDict.
Closes SF bug 605731.

22 years agoAdded a tutorial note and example regarding the scope of loop variables
Raymond Hettinger [Fri, 6 Sep 2002 18:06:04 +0000 (18:06 +0000)]
Added a tutorial note and example regarding the scope of loop variables
in a list comprehension.  Includes a justification and a comparision
to regular for-loops.

Closes SF bug 605047.

22 years agoAdd a test case that checks that the proper exception is raises
Walter Dörwald [Fri, 6 Sep 2002 17:21:40 +0000 (17:21 +0000)]
Add a test case that checks that the proper exception is raises
when the replacement from an encoding error callback is itself
unencodable.

22 years agoApply diff3.txt (plus additional documentation)
Walter Dörwald [Fri, 6 Sep 2002 16:15:58 +0000 (16:15 +0000)]
Apply diff3.txt (plus additional documentation)
from SF patch http://www.python.org/sf/554192

This adds two new functions to mimetypes:
guess_all_extensions() which returns a list of all known
extensions for a mime type, and add_type() which adds one
mapping between a mime type and an extension.

22 years agoupdate docs to reflect that \b considers underscore to be part of a word.
Skip Montanaro [Fri, 6 Sep 2002 14:38:23 +0000 (14:38 +0000)]
update docs to reflect that \b considers underscore to be part of a word.

22 years agotest_set_param(), test_del_param(): Test RFC 2231 encoding support by
Barry Warsaw [Fri, 6 Sep 2002 03:56:26 +0000 (03:56 +0000)]
test_set_param(), test_del_param(): Test RFC 2231 encoding support by
Oleg Broytmann in SF patch #600096.  Whitespace normalized by Barry.

22 years ago_formatparam(), set_param(): RFC 2231 encoding support by Oleg
Barry Warsaw [Fri, 6 Sep 2002 03:55:04 +0000 (03:55 +0000)]
_formatparam(), set_param(): RFC 2231 encoding support by Oleg
Broytmann in SF patch #600096.  Specifically, the former function now
encodes the triplets, while the latter adds optional charset and
language arguments.

22 years agotest_mondo_message(): "binary" is not a legal content type, so with
Barry Warsaw [Fri, 6 Sep 2002 03:41:27 +0000 (03:41 +0000)]
test_mondo_message(): "binary" is not a legal content type, so with
the previous RFC 2045, $5.2 repair to get_content_type() this
subpart's type will now be text/plain.

22 years agotest_replace_header(): New test for Message.replace_header().
Barry Warsaw [Fri, 6 Sep 2002 03:39:59 +0000 (03:39 +0000)]
test_replace_header(): New test for Message.replace_header().

22 years agoreplace_header(): New method given by Skip Montanaro in SF patch
Barry Warsaw [Fri, 6 Sep 2002 03:38:12 +0000 (03:38 +0000)]
replace_header(): New method given by Skip Montanaro in SF patch
#601959.  Modified slightly by Barry (who added the KeyError in case
the header is missing.

22 years agoSF bug # 585792, Invalid mmap crashes Python interpreter
Neal Norwitz [Thu, 5 Sep 2002 21:48:07 +0000 (21:48 +0000)]
SF bug # 585792, Invalid mmap crashes Python interpreter

Raise ValueError if user passes a size to mmap which is larger
than the file.

22 years agoAdded "that" to correct grammar, the rest is due to wrapping
Neal Norwitz [Thu, 5 Sep 2002 21:42:24 +0000 (21:42 +0000)]
Added "that" to correct grammar, the rest is due to wrapping

22 years agoPyObject_RichCompareBool() already returns -1, 0, or 1, so return its value
Neal Norwitz [Thu, 5 Sep 2002 21:32:55 +0000 (21:32 +0000)]
PyObject_RichCompareBool() already returns -1, 0, or 1, so return its value

22 years ago--with(out)-thread is deprecated according to configure --help
Neal Norwitz [Thu, 5 Sep 2002 21:31:04 +0000 (21:31 +0000)]
--with(out)-thread is deprecated according to configure --help

22 years agoSF # 555779, import user doesn't work with CGIs
Neal Norwitz [Thu, 5 Sep 2002 21:08:25 +0000 (21:08 +0000)]
SF # 555779, import user doesn't work with CGIs