Commit Graph

28923 Commits

Author SHA1 Message Date
Hye-Shik Chang eebb641f23 Add rsplit method for UserString, too.
(Spotted by Raymond Hettinger)
2003-12-15 19:46:09 +00:00
Raymond Hettinger c0d49d82de Fix typo and improve wording a bit. 2003-12-15 19:24:34 +00:00
Hye-Shik Chang 060ebedc40 Add an entry for addition of {str,unicode}.rsplit. 2003-12-15 18:51:19 +00:00
Hye-Shik Chang 3ae811b57d Add rsplit method for str and unicode builtin types.
SF feature request #801847.
Original patch is written by Sean Reifschneider.
2003-12-15 18:49:53 +00:00
Jeremy Hylton dce391cb39 Remove __del__ methods to avoid creating uncollectable cyclic trash.
Keep close() methods for backwards compatibility.

Does any call close() explicitly?
2003-12-15 16:08:48 +00:00
Skip Montanaro 6485a87b9a missing word (should backport - is release23-maint still locked?) 2003-12-15 14:38:57 +00:00
Raymond Hettinger fb4e33a8e2 Improve algorithm for set.difference when the input is not a set. 2003-12-15 13:23:55 +00:00
Walter Dörwald c2fcf9bb6b Make the module docstring a raw string, so that the backslash in
"read until end of line ('\n') or EOF" will be treated literally.
Fixes SF bug #860155.
2003-12-15 10:16:09 +00:00
Guido van Rossum bd311d8e4e Remove a "temporary" piece of code that was probably unneeded since
mid 1990.  Remove an untrue XXX comment.
2003-12-15 06:06:24 +00:00
Neal Norwitz 1ecbd67923 SF #859811, typo in docs 2003-12-14 15:02:54 +00:00
Neal Norwitz 360cd4186a SF #859810, typo in doc 2003-12-14 15:01:35 +00:00
Jeremy Hylton 37c5f2a74f Add news item about processor support in urllib2. 2003-12-14 05:29:45 +00:00
Jeremy Hylton c1be59f40a SF patch 852995: add processors feature to urllib2
John J. Lee writes: "the patch makes it possible to implement
functionality like HTTP cookie handling, Refresh handling,
etc. etc. using handler objects. At the moment urllib2's handler
objects aren't quite up to the job, which results in a lot of
cut-n-paste and subclassing. I believe the changes are
backwards-compatible, with the exception of people who've
reimplemented build_opener()'s functionality -- those people would
need to call opener.add_handler(HTTPErrorProcessor).

The main change is allowing handlers to implement
methods like:

http_request(request)
http_response(request, response)

In addition to the usual

http_open(request)
http_error{_*}(...)
"

Note that the change isn't well documented at least in part because
handlers aren't well documented at all.  Need to fix this.

Add a bunch of new tests.  It appears that none of these tests
actually use the network, so they don't need to be guarded by a
resource flag.
2003-12-14 05:27:34 +00:00
Neal Norwitz 328f338196 SF #736962, port test_future to unittest, add a bit more coverage, by Walter Dörwald 2003-12-13 22:43:34 +00:00
Neal Norwitz 378f7b5dca Add a versionadded tag for traceback.format_exc() 2003-12-13 22:34:09 +00:00
Neal Norwitz 9342fb41c3 Make private/local functions static 2003-12-13 22:31:53 +00:00
Guido van Rossum 5a92175fbc After hearing from someone who gave up on timeout sockets due to a
mistake in his code, I'm adding a note explaining that you should call
settimeout() before connect().
2003-12-13 22:12:53 +00:00
Gustavo Niemeyer 2cbdc2a461 Cleaning up recursive pieces left in the reorganization. 2003-12-13 20:32:08 +00:00
Raymond Hettinger 5469324cde Note that \var{ppos} values are not consecutive and should not be altered. 2003-12-13 19:48:41 +00:00
Raymond Hettinger 438e02dfc8 * Refactor set.__contains__()
* Use Py_RETURN_NONE everywhere.
* Fix-up the firstpass check for the tp_print slot.
2003-12-13 19:38:47 +00:00
Raymond Hettinger 0deab62704 Refactor set.discard() and set.remove(). 2003-12-13 18:53:18 +00:00
Raymond Hettinger 6a8bbdbe7b Improve argument checking speed. 2003-12-13 15:21:55 +00:00
Raymond Hettinger dc5ae11abf Use dictionary specific looping idiom where possible.
Simplifies and speeds-up the code.
2003-12-13 14:46:46 +00:00
Raymond Hettinger 0c66967e3d Simplify previous checkin -- a new function was not needed. 2003-12-13 13:31:55 +00:00
Raymond Hettinger d3ae6729e7 Use PyDict_Contains() instead of PySequence_Contains(). 2003-12-13 11:58:56 +00:00
Raymond Hettinger 8f5cdaa784 * Added a new method flag, METH_COEXIST.
* Used the flag to optimize set.__contains__(), dict.__contains__(),
  dict.__getitem__(), and list.__getitem__().
2003-12-13 11:26:12 +00:00
Raymond Hettinger feb78c94fa Expand the groupby() example to:
* show that it is typically used with sorted data,
* highlight commonalities with SQL's groupby and Unix's uniq,
* demonstrate valid uses for the default identity function,
* add some excitement by suggesting the range of possibilities.
2003-12-12 13:13:47 +00:00
Fred Drake 1f84ed0d8a fix typo and join two paragraphs 2003-12-11 19:45:53 +00:00
Walter Dörwald b167b04a2e Add tests to test_weakref.py to bring code coverage in _weakref.c up to 100%.
Port test_md5.py to PyUnit.

(Written by Neal Norwitz; from SF patch 736962)

(Backport candidate)
2003-12-11 12:34:05 +00:00
Brett Cannon 35415da67c Fix broken link (closes bug #852236). Thanks to Fedor Baart for bug file and
finding proper link.
2003-12-11 04:37:24 +00:00
Raymond Hettinger bbd290ab8d Revert previous change which didn't make sense the next day :-) 2003-12-10 15:22:23 +00:00
Jack Jansen 0b565a6e42 - Renamed OSA.ComponentInstance to OSA.OSAComponentInstance. It is not
a real subtype of Cm.ComponentInstance right now, it turns out that is
too difficult.
- OSA.OSAComponentInstance initializer does accept a Cm.ComponentInstance
instance, though, so at least things are becoming useable.
2003-12-10 15:18:18 +00:00
Hye-Shik Chang 19cb193244 Fix memory error treatment correctly. Going to dsu_fail causes
deallocating garbage pointers; saved_ob_item and empty_ob_item.
(Reviewed by Raymond Hettinger)
2003-12-10 07:31:08 +00:00
Raymond Hettinger e807da807c Update to use python ints and int/long unification. 2003-12-10 01:58:52 +00:00
Jack Jansen 73b94da93f Wrapper modules for _Launch and _OSA weren't added yet. Fixed. 2003-12-09 15:07:01 +00:00
Jack Jansen 2e20a63bc9 Make this module Python 2.3 compatible, and add a setup script that allows
it to be built for that python.
2003-12-09 15:06:18 +00:00
Jack Jansen 2af4ce8f30 Made this module compatible with Python2.3, and added a temporary setup
script that allows it to be built for that Python.
2003-12-09 14:51:21 +00:00
Walter Dörwald 1dde95dffa Move list and tuple tests from test_types.py to their own scripts:
test_tuple.py and test_list.py. Common tests for tuple, list and UserList
are shared (in seq_tests.py and list_tests.py). Port tests to PyUnit.
(From SF patch #736962)
2003-12-08 11:38:45 +00:00
Thomas Heller 6b70f8b91d Sigh. dsp files must be marked as binary files for cvs, otherwise
MSVC isn't able to read them.  Thanks to David Rushby.
2003-12-08 09:31:52 +00:00
Jack Jansen c8607b76f0 Revamped framework search path handling for MacOSX. This should allow
two framework builds (in /Library and /System/Library) to coexist
with distutils linking against the right one.

Should be backported to 2.3, but getting Apple-supplied Python to pick
up these fixes is going to be non-trivial.
2003-12-08 01:10:12 +00:00
Jack Jansen 48e02e4c39 forward port of 1.136.6.2:
$(prefix) wasn't communicated to Mac/OSX/Makefile for all targets. Fixed.
2003-12-07 21:52:07 +00:00
Just van Rossum 001734ca7f fixed long standing typo 2003-12-07 18:11:51 +00:00
Raymond Hettinger ff294fea40 SF patch #855195: fix typos
(Contributed by George Yoshida.)
2003-12-07 13:00:25 +00:00
Raymond Hettinger e180307c10 Fix missing paren. 2003-12-07 12:49:48 +00:00
Raymond Hettinger 295530585b Fix double hyphen markup. 2003-12-07 12:46:16 +00:00
Raymond Hettinger 2619c9ec89 SF patch #838938: Typos in the docs (Extending/Embedding + Python/C API)
(Contributed by Florent Rougon.)
2003-12-07 11:40:17 +00:00
Raymond Hettinger e3d5f98180 Put str() in alphabetical order. 2003-12-07 11:24:03 +00:00
Raymond Hettinger a4ce2f5116 SF bug #855317: unittest: 5.3.9 Getting Extended Error Information
The example code did not work and could not easily be made to work.
Since the docs were already complex and the feature was not used
(it took two years for the errors to surface), we decided to dedocument
it entirely, leaving unittest cleaner than before.
2003-12-07 10:48:03 +00:00
Andrew M. Kuchling ad809556ba Add groupby() 2003-12-06 23:19:23 +00:00
Andrew M. Kuchling db7dcffa27 Edit description a bit 2003-12-06 22:29:43 +00:00