Commit Graph

9137 Commits

Author SHA1 Message Date
Raymond Hettinger 691d80532b Make sets and deques weak referencable. 2004-05-30 07:26:47 +00:00
Walter Dörwald 80ce6dd564 The default argument in dict.setdefault() defaults to None.
Add this default to weakref.WeakValueDictionary.setdefault()
and weakref.WeakKeyDictionary.setdefault() too.
2004-05-27 18:16:25 +00:00
Walter Dörwald c139909611 The default argument in dict.setdefault() defaults to None.
Add this default to UserDict.DictMixin.setdefault() too.
2004-05-27 09:41:04 +00:00
Raymond Hettinger ddc819c964 Make sure sets are printed in sorted order 2004-05-22 19:37:21 +00:00
Raymond Hettinger 1453e4aa75 * teach repr.repr() about collections.deque()
* rename a variable for clarity
2004-05-21 23:01:18 +00:00
Raymond Hettinger ba6cd3647f * Updated repr.py to handle set() and frozenset().
* Factored out common code to a single private function.
* Use str.join() instead of + concatenation
* Loop over elements directly instead of using indexing
* Use % operator for formatting
2004-05-21 10:00:15 +00:00
Raymond Hettinger 83ee79524a Add a test to verify an early call to iter() on the outermost for
expression.
2004-05-20 23:04:13 +00:00
Piers Lauder c1e32b6518 Fixed IMAP4_SSL read bug introduced by patch 956394 2004-05-20 11:32:35 +00:00
Piers Lauder 8f2b24401e Fixed IMAP4_SSL read and readlines code per patch 956394 2004-05-20 01:16:14 +00:00
Armin Rigo ba91b9fdda Applying SF patch #949329 on behalf of Raymond Hettinger. 2004-05-19 19:10:18 +00:00
Raymond Hettinger 354433a59d SF patch #872326: Generator expression implementation
(Code contributed by Jiwon Seo.)

The documentation portion of the patch is being re-worked and will be
checked-in soon.  Likewise, PEP 289 will be updated to reflect Guido's
rationale for the design decisions on binding behavior (as described in
in his patch comments and in discussions on python-dev).

The test file, test_genexps.py, is written in doctest format and is
meant to exercise all aspects of the the patch.  Further additions are
welcome from everyone.  Please stress test this new feature as much as
possible before the alpha release.
2004-05-19 08:20:33 +00:00
Fred Drake 82903148a8 ConfigParser:
- read() method returns a list of files parsed successfully
- add tests, documentation
(closes SF patch #677651)
2004-05-18 04:24:02 +00:00
Fred Drake abc086fb0d ConfigParser:
- don't allow setting options to non-string values; raise TypeError
  when the value is set, instead of raising an arbitrary exception
  later (such as when string interpolation is performed)
- add tests, documentation
(closes SF bug #810843)
2004-05-18 03:29:52 +00:00
Fred Drake bc12b01d83 ConfigParser:
- ensure that option names in interpolations are handled by
  self.optionxform in the same way that other references to option
  names
- add tests, documentation
(closes SF bug #857881, patch #865455)
2004-05-18 02:25:51 +00:00
Tim Peters ad9a7c4489 test_alias_nofallback(): Someone broke this test, after 2.3, by
converting it into assertRaises() form.  Restored the 2.3 code, and
explained why assertRaises() cannot be used instead.
2004-05-16 05:36:30 +00:00
Barry Warsaw e4aeb7d1f1 _parsegen(): Add a missing check for NeedMoreData. 2004-05-15 16:26:28 +00:00
Skip Montanaro 2dc0c13840 typo - fixes 954030. 2004-05-14 16:31:56 +00:00
Barry Warsaw ac606ccb79 forward porting from release23-maint 2004-05-13 23:18:54 +00:00
Barry Warsaw 2178a6d1a2 test_boundary_in_non_multipart(): Added a test for SF bug # 846938. 2004-05-13 23:17:04 +00:00
Barry Warsaw 61e5616d74 encode_7or8bit(): Clearing out some old patches; iso-2202 is non-ASCII but
still 7-bit.
2004-05-13 22:50:12 +00:00
Barry Warsaw 4e59bc1e67 readline(): RFC 2046, section 5.1.2 (and partially 5.1) both state that the
parser must recognize outer boundaries in inner parts.  So cruise through the
EOF stack backwards testing each predicate against the current line.

There's still some discussion about whether this is (always) the best thing to
do.  Anthony would rather parse these messages as if the outer boundaries were
ignored.  I think that's counter to the RFC, but might be practically more
useful.  Can you say behavior flag?  (ug).
2004-05-13 20:17:51 +00:00
Barry Warsaw 58eb0fcb8f test_nested_inner_contains_outer_boundary(), test_nested_with_same_boundary():
Two evil samples from Anthony's MIME torture tests.
2004-05-13 20:15:20 +00:00
Barry Warsaw d49f1d6c5a _structure(): Make sure all output goes the to fp object. 2004-05-13 20:14:20 +00:00
Barry Warsaw d0c12af7ef Another evil test from Anthony's suite. This one has an inner part with the
same boundary as the outer part.
2004-05-13 20:13:48 +00:00
Barry Warsaw dce231fb14 A boiled down example from Anthony's MIME torture tests. This one has a
separating boundary for an outer part inside an inner part.
2004-05-13 20:12:32 +00:00
Greg Ward f0ba764dbb SF #847346: merge from release23-maint branch: remove misguided
optimization for short input; beef up tests for fix_sentence_endings
feature.
2004-05-13 01:53:10 +00:00
Raymond Hettinger 0e371f2cb6 Make sure "del d[n]" is properly supported. Was necessary because the
same method that implements __setitem__ also implements __delitem__.
Also, there were several good use cases (removing items from a queue
and implementing Forth style stack ops).
2004-05-12 20:55:56 +00:00
Fred Drake 1cd6e4dc38 fix various descriptions of "ctime"
(closes SF patch #870287)
2004-05-12 03:51:40 +00:00
Barry Warsaw 486cb0ac2a Tests for message/external-body and for duplicate boundary lines. 2004-05-11 22:23:59 +00:00
Barry Warsaw b067e6287b More boiled down tests from Anthony's big torture suite. 2004-05-11 22:21:56 +00:00
Barry Warsaw 769f14a7c9 A boiled down message/external-body example from Anthony's torture test. 2004-05-11 22:20:59 +00:00
Barry Warsaw bce827bf12 An example with multiple boundary lines. 2004-05-11 22:20:05 +00:00
Barry Warsaw d38f448865 _parsegen(): Move the message/rfc822 clause to after the
message/delivery-status clause, and genericize it to handle all (other)
message/* content types.  This lets us correctly parse 2 more of Anthony's
MIME torture tests (specifically, the message/external-body examples).
2004-05-11 20:19:09 +00:00
Tim Peters c312b07d77 Reverting local change checked in by mistake. 2004-05-11 18:18:35 +00:00
Tim Peters 926bc22c65 Added 2.3.3 and 2.3.4 to the release table. Added 2004 to the list of
copyright years.
2004-05-11 18:13:10 +00:00
Barry Warsaw 5b44cd64d7 _parsegen(): Watch out for empty epilogues. 2004-05-11 18:10:15 +00:00
Thomas Heller 2e7c8328ae Fix SF item #876278: Unbounded recursion in modulefinder.
Already backported to release23-maint.
2004-05-11 15:10:59 +00:00
Barry Warsaw c29db26529 _parse_headers(): Strip a trailing newline from the envelope header. Closes
SF #951088.
2004-05-10 14:48:30 +00:00
Barry Warsaw 6f3b033774 _split_ascii(): Small optimization by RH. 2004-05-10 14:44:04 +00:00
Raymond Hettinger 300fa1d3b2 Temporarily disable doctest until genexps are in CVS 2004-05-10 14:08:42 +00:00
Mark Hammond c533c986e8 Fix [ 738973 ] urllib2 CacheFTPHandler doesn't work on multiple dirs, as
implemented in patch [ 851736 ].
2004-05-10 07:35:33 +00:00
Barry Warsaw d285600883 SF patch # 884030 by Amit Aronovitch; fixes the _subpart argument to match
documented semantics.
2004-05-09 18:04:24 +00:00
Barry Warsaw bfe18c096f test_mime_attachments_in_constructor(): New test to check for SF bug # 884030. 2004-05-09 18:03:36 +00:00
Barry Warsaw 2c823d67e3 we dont support any Python's before 2.3 now. 2004-05-09 03:57:09 +00:00
Barry Warsaw 24f79762a1 Update to Python 2.3, getting rid of backward compatiblity crud. 2004-05-09 03:55:11 +00:00
Barry Warsaw 235c8eba62 Update to Python 2.3, getting rid of backward compatiblity crud.
This Parser is now just a backward compatible front-end to the FeedParser.
2004-05-09 03:46:42 +00:00
Barry Warsaw 5d84053e2c Update to Python 2.3, getting rid of backward compatiblity crud. 2004-05-09 03:44:55 +00:00
Barry Warsaw 4c3e33a80b Update to Python 2.3, getting rid of backward compatiblity crud. We don't
need the _compat21 or _compat22 modules either.
2004-05-09 03:42:37 +00:00
Barry Warsaw 3d1f397f1a Update to Python 2.3, getting rid of backward compatiblity crud. Get rid of a
bunch of module globals that aren't used.
2004-05-09 03:40:17 +00:00
Barry Warsaw 36112f2d34 Update to Python 2.3, getting rid of backward compatiblity crud. Get rid of a
bunch of module globals that aren't used.

__maxheaderlen -> _maxheaderlen

_handle_multipart(): This should be more RFC compliant now, and does match the
updated/fixed semantics for preamble and epilogue.
2004-05-09 03:35:17 +00:00
Barry Warsaw 418101fd64 An updated FeedParser that should be RFC complaint, passes all existing
(standard) tests, and doesn't throw parse errors.  I still need throw
Anthony's torture test at it, but I wanted to get this checked in and off my
disk.
2004-05-09 03:29:23 +00:00
Barry Warsaw 333e830b83 Add MessageDefect and subclasses. 2004-05-09 03:26:07 +00:00
Barry Warsaw 41f6ad6171 Update to Python 2.3, getting rid of backward compatiblity crud. 2004-05-09 03:24:43 +00:00
Barry Warsaw 09356d419c Like msg_12.txt but with some extra vertical whitespace around the inner
message's end boundary.
2004-05-09 03:17:29 +00:00
Barry Warsaw b8b57e75b2 A bunch of new tests, and updated tests for the email 3.0 FeedParser. 2004-05-09 03:16:03 +00:00
Raymond Hettinger e7169eb9ed Add more examples. 2004-05-09 01:15:01 +00:00
Raymond Hettinger 9d7c870c6d SF #950057: itertools.chain doesn't "process" exceptions as they occur
Both cycle() and chain() were handling exceptions only when switching
input sources.  The patch makes the handle more immediate.

Will backport.
2004-05-08 19:49:42 +00:00
Martin v. Löwis 7d9c6c7e8c Fix _sre.CODESIZE on 64-bit machines in UCS-4 mode. Fixes #931848.
Backported to 2.3.
2004-05-07 07:18:13 +00:00
Raymond Hettinger 156c49ad1c Revert last change. 2004-05-07 05:50:35 +00:00
Raymond Hettinger 6924a00d10 Use sets instead of lists for membership testing 2004-05-06 16:55:07 +00:00
Andrew M. Kuchling 30633c9a64 [Bug #945063] Get file extension correct. (2.3 bugfix candidate) 2004-05-06 13:13:44 +00:00
Fred Drake e143bbb610 fix documentation for ContentHandler.ignorableWhitespace()
(closes SF bug #881707)
2004-05-06 03:47:48 +00:00
Martin v. Löwis ae20722d96 Consider output encoding in XMLGenerator. Fixes #938076.
Backported to 2.3.
2004-05-06 02:22:43 +00:00
Martin v. Löwis 0ea558f7b4 Properly delegate startElementNS in saxutils.XMLFilterBase. Fixes #936637.
Backported to 2.3.
2004-05-06 02:04:21 +00:00
Martin v. Löwis 456ab1d271 Swap public and system ID in start_doctype_decl. Fixes #780300. 2004-05-06 01:54:36 +00:00
Martin v. Löwis 8b3e871a19 Patch #944110: Properly process empty passwords. Fixes #944082.
Backported to 2.3.
2004-05-06 01:41:26 +00:00
Guido van Rossum 843c734ddd Using reversed() is not compatible with Python 1.5.2. 2004-05-04 18:18:59 +00:00
Raymond Hettinger bac788a3cd Replace str.find()!=1 with the more readable "in" operator. 2004-05-04 09:21:43 +00:00
Raymond Hettinger c5e378da41 Testing for None should be done with 'is' 2004-05-04 08:34:56 +00:00
Raymond Hettinger 0b569bb399 Stacks based on lists work better and read more clearly when they
grow and shrink on the right.
2004-05-04 08:21:52 +00:00
Martin v. Löwis 9f1340b9f2 Do not use the default namespace for attributes.
Fixes http://bugs.debian.org/229885
Will backport to 2.3.
2004-05-02 20:37:13 +00:00
Walter Dörwald c60c203670 Add a test script for the colorsys module. 2004-04-28 17:07:50 +00:00
Kurt B. Kaiser e3636e05de Fix a bug I introduced which causes all block openers at an indent level
to be shown, instead of outdenting each level.
2004-04-26 22:26:04 +00:00
Kurt B. Kaiser d00587a2ed 1. Add an Options menu entry: Code Context
2. Add a <<toggle-code-context>> envent to the [CodeContext] section of
   config-extensions.def and also a default-on variable, set to 0.
3. Update the help file to include Code Context.

M CodeContext.py
M config-extensions.def
M help.txt
2004-04-24 03:08:13 +00:00
Kurt B. Kaiser 610c7e07f3 1. Polish variables in EditorWindow extension loading and Tkinter variable code.
2. Add exception handling to EditorWindow Tkinter variable setvar() and getvar() fcns.
3. EditorWindow: remove some unneeded comments.
4. Add a separator to the Options menu
5. extend.txt: describe how to create a menu entry which has no keybinding.

M Bindings.py
M EditorWindow.py
M extend.txt
2004-04-24 03:01:48 +00:00
Kurt B. Kaiser 54d1a3b920 - New Extension: CodeContext. Provides block structuring hints for code
which has scrolled above an edit window. Patch 936169 Noam Raphael.

A CodeContext.py
M NEWS.txt
M config-extensions.def
2004-04-21 20:06:26 +00:00
Hye-Shik Chang 9f62eccb66 SF #926075: Fixed the bug that returns a wrong pattern object for
a string or unicode object in sre.compile() when a different type
pattern with the same value exists.
2004-04-20 21:30:07 +00:00
Hye-Shik Chang 0f5bf1ebdd SF #926075: Fixed the bug that returns a wrong pattern object for
a string or unicode object in sre.compile() when a different type
pattern with the same value exists.
2004-04-20 21:11:11 +00:00
Raymond Hettinger c46cb2a1a9 * Restore the pure python version of heapq.py.
* Mark the C version as private and only use when available.
2004-04-19 19:06:21 +00:00
Martin v. Löwis 61e40bd897 Special case normalization of empty strings. Fixes #924361.
Backported to 2.3.
2004-04-17 19:36:48 +00:00
Skip Montanaro c00fc8452e Open file in universal newline mode when passing to compile(). Solution
from Felix Wiemann.  Closes patch #934971.
2004-04-16 03:28:19 +00:00
Raymond Hettinger 7892b1c651 * Add unittests for iterators that report their length
* Document the differences between them
* Fix corner cases covered by the unittests
* Use Py_RETURN_NONE where possible for dictionaries
2004-04-12 18:10:01 +00:00
Andrew MacIntyre daedf21852 Fixes for AF_UNIX support on OS/2:
- return the full size of the sockaddr_un structure, without which
  bind() fails with EINVAL;
- set test_socketserver to use a socket name that meets the form
  required by the underlying implementation;
- don't bother exercising the forking AF_UNIX tests on EMX - its
  fork() can't handle the stress.
2004-04-11 12:03:57 +00:00
Kurt B. Kaiser cf6f1b69eb M EditorWindow.py
M IOBinding.py
M NEWS.txt
M configDialog.py

- If nulls somehow got into the strings in recent-files.lst
  EditorWindow.update_recent_files_list() was failing.  Python Bug 931336.
2004-04-11 03:16:07 +00:00
Skip Montanaro 249369c7f0 atof: correct parameter name 2004-04-10 16:39:32 +00:00
Skip Montanaro 5bfd98498a Refactor common code out of globaltrace_trackcallers() and
globaltrace_countfuncs() into file_module_function_of().

In that function use Michael Hudson's suggestion of gc.get_referrers() to
back up from the code object to a function, then to a class's dict and
finally to a class object if one exists.
2004-04-10 16:29:58 +00:00
Skip Montanaro cafc811415 Added --trackcalls command line arg to display crude caller/callee
relationships at program exit.  Output is a bit prettier than that for
--listfuncs but won't parse as easily using downstream postprocessing tools.
2004-04-07 15:46:05 +00:00
Andrew M. Kuchling 22ab06e4de Fix comment typo 2004-04-06 19:43:03 +00:00
Andrew M. Kuchling d9b38d2729 Remove specific Python version from #! 2004-04-06 19:42:34 +00:00
Andrew MacIntyre 69e18c9344 OS/2 has support for spawnvp() and spawnvpe() in the C libraries supplied
with major C compilers (VACPP, EMX+gcc and [Open]Watcom).

Also tidy up the export of spawn*() symbols in the os module to match what
is found/implemented.
2004-04-04 07:11:43 +00:00
Andrew MacIntyre 4e10ed3b86 If a file is opened with an explicit buffer size >= 1, repeated
close() calls would attempt to free() the buffer already free()ed on
the first close().     [bug introduced with patch #788249]

Making sure that the buffer is free()ed in file object deallocation is
a belt-n-braces bit of insurance against a memory leak.
2004-04-04 07:01:35 +00:00
Fred Drake 456d3258d6 Fix support for the "prog" keyword to the OptionParser constructor, as well
as directly setting the .prog attribute (which should be supported based on
the class docstring).
Closes SF bug #850964.
2004-04-01 07:40:35 +00:00
Andrew M. Kuchling b67c94318e [Bugfix candidate] Escape traceback type and value. There are probably additional cases where cgitb.py doesn't escape as paranoidly as it should (e.g. attribute names) 2004-03-31 20:17:56 +00:00
Guido van Rossum 59db96f2a3 When /tmp has certain sticky bits set, newly created subdirectories
inherit those bits, causing the test_mkdtemp.test_mode() test to fail.
Remove those before comparing the actual mode to the expected mode.
2004-03-31 18:53:29 +00:00
Tim Peters 116d83ce71 SF bug 924242: socket._fileobject._getclosed() returns wrong value
The .closed property always returned the wrong result.

Bugfix candidate!
2004-03-28 02:20:45 +00:00
Raymond Hettinger d732c95eb0 Revert 1.51 booleans so that sre will still run on old pythons. 2004-03-27 09:24:36 +00:00
Raymond Hettinger 968c56a626 Simple Optimizations:
* Factor constant expressions out of loops.
* Presize a list being grown to a known length.
2004-03-26 23:24:00 +00:00
Raymond Hettinger 29e383754e Remove unnecessary test. (Thanks Skip) 2004-03-26 20:16:39 +00:00
David Ascher 1c5701d36c Fix test failure for test_tcl on OS/X and Windows if a
version of Tcl other than ActiveTcl is installed (ActiveTcl
included TclX, other Tcl distros didn't).

I'm removing the package loading test because it's hard to
come up with a package that is guaranteed to be in any Tcl installation.

Special-casing darwin and windows is ok since that leaves the
only Tk platform (X) which the test was trying to address.
2004-03-26 15:10:25 +00:00
Armin Rigo 01ab279056 Marshal clean-up (SF patch #873224) 2004-03-26 15:09:27 +00:00
Raymond Hettinger 01c9f8c35f Simple optimizations:
* pre-build a single identity function for the fixup function
* pre-build membership tests in dictionaries instead of in-line tuples
* assign len() to a local variable
* assign append() methods to a local variable
* use xrange() instead of range()
* replace "x<<1" with "x+x"
2004-03-26 11:16:55 +00:00
Fred Drake 4b49823edd make sure the default manifest generation includes files identified as
scripts
closes SF bug 796042
2004-03-25 22:04:52 +00:00
Marc-André Lemburg 91e83e209d Added more Windows version names (thanks to Thomas Heller).
Fixed bug in platform() cache (thanks to Brett Cannon).

(Restored Python 1.5.2 compatibility.)
2004-03-25 18:35:12 +00:00
Brett Cannon 9001cde559 Fix last patch to be backwards-compatible with Python 1.5.2 .
Bumped version micro number.
2004-03-25 18:32:11 +00:00
Brett Cannon 21beb4c2ce Fixed a caching bug in platform.platform() where the argument of 'terse' was
not taken into consideration when caching value.
2004-03-25 16:55:12 +00:00
Martin v. Löwis 1c0f1f97fb Defer compilation of regular expressions until first use. 2004-03-25 14:58:19 +00:00
Martin v. Löwis bc503d1e90 Use True/False instead of 0/1 for character classes. 2004-03-25 13:50:59 +00:00
Phillip J. Eby 91a968af76 Ensure super() lookup of descriptor from classmethod works (SF #743627) 2004-03-25 02:19:34 +00:00
Piers Lauder f167dc3380 fix name in setacl method doc string 2004-03-25 00:12:21 +00:00
Nicholas Bastin c69ebe8d50 Enable the profiling of C functions (builtins and extensions) 2004-03-24 21:57:10 +00:00
Martin v. Löwis a1dde13389 Add test case for unicode(somestring, "idna"). 2004-03-24 16:48:24 +00:00
Brett Cannon aaeffaf01e Replace sequential split/join calls on strings with a single replace call.
Thanks Andrew Gaul.
2004-03-23 23:50:17 +00:00
Martin v. Löwis 708b4dacf4 Convert input to a string object. Fixes #909230.
Backported 2.3.
2004-03-23 23:40:36 +00:00
Brett Cannon 69200fa85b Replace code in urllib for basejoin (undocumented) with urlparse.urljoin .
Test suites for urllib and urlparse run with each other's function to verify
correctness of replacement and both test suites pass.

Bumped urllib's __version__ attribute up a minor number.
2004-03-23 21:26:39 +00:00
Guido van Rossum 48713e8798 Add runctx to __all__. 2004-03-23 19:19:21 +00:00
Nicholas Bastin 824b1b2da8 Added command line options for profile.py - one for stats output file
and one for sort order when using stdout.  Uses optparse.
2004-03-23 18:44:39 +00:00
Anthony Baxter 05f842bae2 Basic dependency checking. setup() has two new optional arguments
requires and provides. requires is a sequence of strings, of the
form 'packagename-version'. The dependency checking so far merely
does an '__import__(packagename)' and checks for packagename.__version__
You can also leave off the version, and any version of the package
will be installed.
There's a special case for the package 'python' - sys.version_info
is used, so
requires= ( 'python-2.3', )
just works.

Provides is of the same format as requires - but if it's not supplied,
a provides is generated by adding the version to each entry in packages,
or modules if packages isn't there.
Provides is currently only used in the PKG-INFO file. Shortly, PyPI
will grow the ability to accept these lines, and register will be
updated to send them.

There's a new command 'checkdep' command that runs these checks.
For this version, only greater-than-or-equal checking is done. We'll
add the ability to specify an optional operator later.
2004-03-22 22:22:05 +00:00
Martin v. Löwis a3837a0d63 Patch #911176: Move test function into __main__ 2004-03-22 21:49:47 +00:00
Nicholas Bastin 1eb4bfc657 Added global runctx function to profile to fix SF Bug #716587 2004-03-22 20:12:56 +00:00
Armin Rigo 706933821c The fix in ceval.c 2.386 allows iteration-by-iteration line tracing even in
single-line loops.
2004-03-22 19:30:39 +00:00
Nicholas Bastin ee6c9b8613 Fix (really) for tight loop line events 2004-03-22 19:23:46 +00:00
Nicholas Bastin fa7bec7e83 Test for tight loop line event fix, SF bug #765624 2004-03-22 19:21:47 +00:00
Nicholas Bastin aea9459cb1 Test for lack of implicit return line event 2004-03-22 18:30:42 +00:00
Anthony Baxter 39a0f04421 New parser. Next up, making the current parser use this parser 2004-03-22 00:33:28 +00:00
Tim Peters 3f60629242 SF bug 847019 datetime.datetime initialization needs more strict checking
It's possible to create insane datetime objects by using the constructor
"backdoor" inserted for fast unpickling.  Doing extensive range checking
would eliminate the backdoor's purpose (speed), but at least a little
checking can stop honest mistakes.

Bugfix candidate.
2004-03-21 23:38:41 +00:00
Brett Cannon 8d9b60f102 Change parse_qsl() to accept control-name's with no equal sign (e.g., "name")
when keep_blank_values is true.
2004-03-21 22:16:15 +00:00
Nicholas Bastin 668034173b Normalized files in test_unicode_file to eliminate failure on OSX 2004-03-21 20:55:47 +00:00
Andrew M. Kuchling 67867eaf8c [Part of patch #909005] Added map parameter for file_dispatcher and dispatcher_with_send 2004-03-21 20:03:18 +00:00
Andrew M. Kuchling 174bdbc999 [Part of patch #909005] Repeating exception changed from 'raise socket.error, why' to just raise. Make use of connect_ex() raise socket.error with 2-tuple instead of just error code 2004-03-21 19:58:28 +00:00
Andrew M. Kuchling 419af88b34 [Part of patch #909005] Remove Mac code for writable 2004-03-21 19:52:01 +00:00
Andrew M. Kuchling 0ebbbe30f1 [Part of patch #909005] Set initial poll flags 2004-03-21 19:50:09 +00:00
Andrew M. Kuchling 68522b1895 [Part of patch #909005] Use True/False 2004-03-21 19:46:16 +00:00
Andrew M. Kuchling 56d7913bae [Patch #900071] Be case-insensitive when removing 'usage:' string 2004-03-21 19:28:48 +00:00
Andrew M. Kuchling 9303777f22 [Part of patch #909005] Handle POLLPRI flag, and various errors cases. Fixes bug #887279 2004-03-21 19:26:00 +00:00
Tim Peters 6602520473 SF bug 917108: warnings.py does not define _test().
Removed the entire __name__ == '__main__' block.
2004-03-21 17:06:20 +00:00
Martin v. Löwis 433fa69c40 Patch #853488: Add hlist entry_configure and entry_cget methods. 2004-03-21 15:26:44 +00:00
Neil Schemenauer 4848557924 Remove unused instance attributes. 2004-03-21 15:18:50 +00:00
Brett Cannon 46cf4fc249 Back out last patch that removed an entry from sys.path if it was not an
existent path.  Pointed out by jvr that entries could be non-file items for
custom importers.
2004-03-21 14:06:49 +00:00
Brett Cannon c82208eecb Deal with case of when locale time values has characters that can be mistaken
for regex syntax.
Fixes bug #883604 .
2004-03-20 23:09:40 +00:00
Brett Cannon 4f65331483 Limit the nesting depth of a tuple passed as the second argument to
isinstance() or issubclass() to the recursion limit of the interpreter.
2004-03-20 22:52:14 +00:00
Guido van Rossum 70ec0b42b5 Fix for SF 777848.
I've been bitten by this myself in the past half year.
I hope this fix is right.
I'll backport this to 2.3.
2004-03-20 22:18:03 +00:00
Tim Peters 27f49610af SF patch 508730 CGIHTTPServer execfile should save cwd
UNTESTED!!!

This simple two-line patch has been sitting on SF for more than 2 years.
I'm guessing it's because nobody knows how to test it -- I sure don't.
It doesn't look like you can get to this part of the code on Unixish
or Windows systems, so the "how to test it?" puzzle has more than one
part.  OTOH, if this is dead code, it doesn't matter either if I just
broke it <wink>.
2004-03-20 21:51:12 +00:00
Brett Cannon cc45466b8f Remove non-existent paths. 2004-03-20 21:31:33 +00:00
Brett Cannon 497331fa2b Fix how line endings were handled when iterating over a .pth file by stripping
all whitespace at the end of the path line.
2004-03-20 21:08:17 +00:00
Thomas Wouters 1e1305491b test_email: comment out two fail-test cases that no longer fail with the new
parser -- for now. Failure behaviour of the new parser(s) will change in any
case, so this will be revisited later anyway.
2004-03-20 20:29:50 +00:00
Tim Peters 934d31b1d3 Speed HMAC.copy() by installing a secret backdoor argument to
HMAC.__init__().  Adapted from SF patch 895445 "hmac.HMAC.copy() speedup"
by Trevor Perrin, who reported that this approach increased throughput
of his hmac-intensive app by 30%.
2004-03-20 20:11:29 +00:00
Thomas Wouters 0813d76cb0 Merge in Anthony's new parser code, from the anthony-parser-branch:
> ----------------------------
> revision 1.20.4.4
> date: 2003/06/12 09:14:17;  author: anthonybaxter;  state: Exp;  lines: +13 -6
> preamble is None when missing, not ''.
> Handle a couple of bogus formatted messages - now parses my main testsuite.
> Handle message/external-body.
> ----------------------------
> revision 1.20.4.3
> date: 2003/06/12 07:16:40;  author: anthonybaxter;  state: Exp;  lines: +6 -4
> epilogue-processing is now the same as the old parser - the newline at the
> end of the line with the --endboundary-- is included as part of the epilogue.
> Note that any whitespace after the boundary is _not_ part of the epilogue.
> ----------------------------
> revision 1.20.4.2
> date: 2003/06/12 06:39:09;  author: anthonybaxter;  state: Exp;  lines: +6 -4
> message/delivery-status fixed.
> HeaderParser fixed.
> ----------------------------
> revision 1.20.4.1
> date: 2003/06/12 06:08:56;  author: anthonybaxter;  state: Exp;  lines: +163 -129
> A work-in-progress snapshot of the new parser. A couple of known problems:
>
> - first (blank) line of MIME epilogues is being consumed
> - message/delivery-status isn't quite right
>
> It still needs a lot of cleanup, but right now it parses a whole lot of
> badness that the old parser failed on. I also need to think about adding
> back the old 'strict' flag in some way.
> =============================================================================
2004-03-20 17:31:29 +00:00
Fred Drake 6fd0b0d5ba commit the portion of PyXML patch #919008 that is relevant to the
standard library:
str() of xml.sax.SAXParseException should not fail if the line and/or
column number returned by the locator are None
(tests added)
2004-03-20 08:15:30 +00:00
Hye-Shik Chang 5c5316f111 Add a new unicode codec: ptcp154 (Kazakh) 2004-03-19 08:06:07 +00:00
Gregory P. Smith 1281f76606 * supply a more useful error message when append() is called on the
wrong type of database in dbshelve.
* fix a typo in the exception name when checking args
2004-03-16 18:50:26 +00:00