]> granicus.if.org Git - python/log
python
21 years agoMove the code for BREAK and CONTINUE_LOOP to be near FOR_ITER.
Raymond Hettinger [Fri, 12 Mar 2004 09:12:22 +0000 (09:12 +0000)]
Move the code for BREAK and CONTINUE_LOOP to be near FOR_ITER.
Makes it more likely that all loop operations are in the cache
at the same time.

21 years agoSpeedup for-loops by inlining PyIter_Next(). Saves duplicate tests
Raymond Hettinger [Fri, 12 Mar 2004 08:41:36 +0000 (08:41 +0000)]
Speedup for-loops by inlining PyIter_Next().  Saves duplicate tests
and a function call resulting in a 15% reduction of total loop overhead
(as measured by timeit.Timer('pass')).

21 years agoUse a new macro, PySequence_Fast_ITEMS to factor out code common to
Raymond Hettinger [Fri, 12 Mar 2004 08:04:00 +0000 (08:04 +0000)]
Use a new macro, PySequence_Fast_ITEMS to factor out code common to
three recent optimizations.  Aside from reducing code volume, it
increases readability.

21 years ago- Added a downloader using urllib2 in stead of curl, based on code
Jack Jansen [Thu, 11 Mar 2004 23:03:59 +0000 (23:03 +0000)]
- Added a downloader using urllib2 in stead of curl, based on code
donated by Kevin Ollivier. This is now the default downloader.
- Added a watcher mechanism, whereby downloaders and unpackers (and,
later builders) can give status feedback to the user. When running
pimp as a command line tool in verbose mode print this output.

21 years agoNow that list.extend() is at the root of many list operations, it becomes
Raymond Hettinger [Thu, 11 Mar 2004 09:48:18 +0000 (09:48 +0000)]
Now that list.extend() is at the root of many list operations, it becomes
worth it to in-line the call to PyIter_Next().

Saves another 15% on most list operations that acceptable a general
iterable argument (such as the list constructor).

21 years agoEliminate a big block of duplicate code in PySequence_List() by
Raymond Hettinger [Thu, 11 Mar 2004 09:13:12 +0000 (09:13 +0000)]
Eliminate a big block of duplicate code in PySequence_List() by
exposing _PyList_Extend().

21 years agolist_inplace_concat() is now expressed in terms of list_extend() which
Raymond Hettinger [Thu, 11 Mar 2004 07:34:19 +0000 (07:34 +0000)]
list_inplace_concat() is now expressed in terms of list_extend() which
avoids creating an intermediate tuple for iterable arguments other than
lists or tuples.

In other words, a+=b no longer requires extra memory when b is not a
list or tuple.  The list and tuple cases are unchanged.

21 years agoMake buffer objects based on mutable objects (like array) safe.
Neil Schemenauer [Thu, 11 Mar 2004 02:42:45 +0000 (02:42 +0000)]
Make buffer objects based on mutable objects (like array) safe.

21 years agoDocument one of the many problems with the buffer object.
Neil Schemenauer [Thu, 11 Mar 2004 01:00:44 +0000 (01:00 +0000)]
Document one of the many problems with the buffer object.

21 years agoRename static functions, they should not have the _Py prefix.
Neil Schemenauer [Thu, 11 Mar 2004 00:44:54 +0000 (00:44 +0000)]
Rename static functions, they should not have the _Py prefix.

21 years agoMake test_coercion.py less sensitive to platform fp quirks. Closes
Neil Schemenauer [Wed, 10 Mar 2004 17:30:03 +0000 (17:30 +0000)]
Make test_coercion.py less sensitive to platform fp quirks.  Closes
SF bug #678265.

21 years agoUse memcpy() instead of memmove() when the buffers are known to be distinct.
Raymond Hettinger [Wed, 10 Mar 2004 11:44:04 +0000 (11:44 +0000)]
Use memcpy() instead of memmove() when the buffers are known to be distinct.

21 years agoTidied up the implementations of reversed (including the custom ones
Raymond Hettinger [Wed, 10 Mar 2004 10:10:42 +0000 (10:10 +0000)]
Tidied up the implementations of reversed (including the custom ones
for xrange and list objects).

* list.__reversed__ now checks the length of the sequence object before
  calling PyList_GET_ITEM() because the mutable could have changed length.

* all three implementations are now tranparent with respect to length and
  maintain the invariant len(it) == len(list(it)) even when the underlying
  sequence mutates.

* __builtin__.reversed() now frees the underlying sequence as soon
  as the iterator is exhausted.

* the code paths were rearranged so that the most common paths
  do not require a jump.

21 years agoEliminate the double reverse option. It's only use case
Raymond Hettinger [Wed, 10 Mar 2004 08:32:47 +0000 (08:32 +0000)]
Eliminate the double reverse option.  It's only use case
was academic and it was potentially confusing to use.

21 years agoOptimize inner loops for subscript, repeat, and concat.
Raymond Hettinger [Tue, 9 Mar 2004 13:05:22 +0000 (13:05 +0000)]
Optimize inner loops for subscript, repeat, and concat.

21 years agoOptimize slice assignments.
Raymond Hettinger [Tue, 9 Mar 2004 08:04:33 +0000 (08:04 +0000)]
Optimize slice assignments.

* Replace sprintf message with a constant message string -- this error
  message ran on every invocation except straight deletions but it was
  only needed when the rhs was not iterable.  The message was also
  out-of-date and did not reflect that iterable arguments were allowed.

* For inner loops that do not make ref count adjustments, use memmove()
  for fast copying and better readability.

* For inner loops that do make ref count adjustments, speed them up by
  factoring out the constant structure reference and using vitem[] instead.

21 years agoSF Patch #912462: Relocate \end tag to the right place.
Hye-Shik Chang [Tue, 9 Mar 2004 05:53:15 +0000 (05:53 +0000)]
SF Patch #912462: Relocate \end tag to the right place.
(Submitted by George Yoshida)

21 years agoRefactor and optimize code for UNPACK_SEQUENCE.
Raymond Hettinger [Mon, 8 Mar 2004 23:25:30 +0000 (23:25 +0000)]
Refactor and optimize code for UNPACK_SEQUENCE.

* Defer error handling for wrong number of arguments to the
  unpack_iterable() function.  Cuts the code size almost in half.

* Replace function calls to PyList_Size() and PyTuple_Size() with
  their smaller and faster macro counterparts.

* Move the constant structure references outside of the inner loops.

21 years agoRemove calls to currentThread() in _Condition methods that were side-effect.
Brett Cannon [Mon, 8 Mar 2004 22:18:57 +0000 (22:18 +0000)]
Remove calls to currentThread() in _Condition methods that were side-effect.
Side-effects were deemed unnecessary and were causing problems at shutdown
time when threads were catching exceptions at start time and then triggering
exceptions trying to call currentThread() after gc'ed.  Masked the initial
exception which was deemed bad.

Fixes bug #754449 .

21 years agoThe copy module now handles sets directly. The __copy__ methods are no
Raymond Hettinger [Mon, 8 Mar 2004 18:31:10 +0000 (18:31 +0000)]
The copy module now handles sets directly.  The __copy__ methods are no
longer needed.

21 years agoSF patch #907403: Improvements to cStringIO.writelines()
Raymond Hettinger [Mon, 8 Mar 2004 18:22:35 +0000 (18:22 +0000)]
SF patch #907403:  Improvements to cStringIO.writelines()

The writelines() method now accepts any iterable argument and writes
the lines one at a time rather than using ''.join(lines) followed by
a single write.  Results in considerable memory savings and makes the
method suitable for use with generator expressions.

21 years agoSF patch #907403: Improvements to cStringIO.writelines()
Raymond Hettinger [Mon, 8 Mar 2004 18:17:31 +0000 (18:17 +0000)]
SF patch #907403:  Improvements to cStringIO.writelines()

The writelines() method now accepts any iterable argument and writes
the lines one at a time rather than using ''.join(lines) followed by
a single write.  Results in considerable memory savings and makes
the method suitable for use with generator expressions.

21 years agoAdd a highlight theme for builtin keywords. Python Patch 805830 Nigel Rowe
Kurt B. Kaiser [Mon, 8 Mar 2004 18:15:31 +0000 (18:15 +0000)]
Add a highlight theme for builtin keywords.  Python Patch 805830 Nigel Rowe

M ClassBrowser.py
M ColorDelegator.py
M EditorWindow.py
M NEWS.txt
M PyShell.py
M TreeWidget.py
M config-highlight.def
M configDialog.py
M configHandler.py

21 years agoRemoved spurious import statement
Vinay Sajip [Mon, 8 Mar 2004 16:57:19 +0000 (16:57 +0000)]
Removed spurious import statement

21 years agoOptimize tuple_slice() and make further improvements to list_slice()
Raymond Hettinger [Mon, 8 Mar 2004 07:25:05 +0000 (07:25 +0000)]
Optimize tuple_slice() and make further improvements to list_slice()
and list.extend().  Factoring the inner loops to remove the constant
structure references and fixed offsets gives speedups ranging from
20% to 30%.

21 years agoRefactor the copy dispatcher code in copy.py. Simplifies and shortens
Raymond Hettinger [Mon, 8 Mar 2004 05:59:33 +0000 (05:59 +0000)]
Refactor the copy dispatcher code in copy.py.  Simplifies and shortens
the code by grouping common cases together.

21 years agoSmall optimizations for list_slice() and list_extend_internal().
Raymond Hettinger [Mon, 8 Mar 2004 05:56:15 +0000 (05:56 +0000)]
Small optimizations for list_slice() and list_extend_internal().

* Using addition instead of substraction on array indices allows the
  compiler to use a fast addressing mode.  Saves about 10%.

* Using PyTuple_GET_ITEM and PyList_SET_ITEM is about 7% faster than
  PySequenceFast_GET_ITEM which has to make a list check on every pass.

21 years agoFactor out code common to PyDict_Copy() and PyDict_Merge().
Raymond Hettinger [Mon, 8 Mar 2004 04:19:01 +0000 (04:19 +0000)]
Factor out code common to PyDict_Copy() and PyDict_Merge().

21 years agoDeal with possible case of having time.tzname[1] containing UTC or GMT.
Brett Cannon [Sun, 7 Mar 2004 23:16:27 +0000 (23:16 +0000)]
Deal with possible case of having time.tzname[1] containing UTC or GMT.
Since it is known ahead of time that UTC and GMT always have no DST adjustment
then just set the isdst value to 0 even if tzname[0] == tzname[1] .
Fixes bug #897817 .

21 years agoSF patch #910929: Optimize list comprehensions
Raymond Hettinger [Sun, 7 Mar 2004 07:31:06 +0000 (07:31 +0000)]
SF patch #910929:  Optimize list comprehensions

Add a new opcode, LIST_APPEND, and apply it to the code generation for
list comprehensions.  Reduces the per-loop overhead by about a third.

21 years agoupdate version at top of file
Skip Montanaro [Fri, 5 Mar 2004 14:33:21 +0000 (14:33 +0000)]
update version at top of file

21 years agoSF #904720: dict.update should take a 2-tuple sequence like dict.__init_
Raymond Hettinger [Thu, 4 Mar 2004 08:25:44 +0000 (08:25 +0000)]
SF #904720:  dict.update should take a 2-tuple sequence like dict.__init_
(Championed by Bob Ippolito.)

The update() method for mappings now accepts all the same argument forms
as the dict() constructor.  This includes item lists and/or keyword
arguments.

21 years agoSpecial case endpoint access for speed.
Raymond Hettinger [Thu, 4 Mar 2004 08:00:54 +0000 (08:00 +0000)]
Special case endpoint access for speed.

21 years agoSF Patch #902444: Use process scope thread on FreeBSD. System scope
Hye-Shik Chang [Thu, 4 Mar 2004 06:35:57 +0000 (06:35 +0000)]
SF Patch #902444: Use process scope thread on FreeBSD. System scope
is too expensive on FreeBSD's KSE threading infrastructure and
even test_threadedimport fails on default setting.

21 years ago* explain flags in doc strings
Skip Montanaro [Wed, 3 Mar 2004 17:42:08 +0000 (17:42 +0000)]
* explain flags in doc strings

* reverse order of files on the command line in pickle2db.py to make it
  symmetrical with db2pickle.py in the two-arg case (src, then dest)

21 years agoFixed invalid syntax.
Sjoerd Mullender [Wed, 3 Mar 2004 16:34:31 +0000 (16:34 +0000)]
Fixed invalid syntax.

21 years agotypo
Skip Montanaro [Wed, 3 Mar 2004 08:42:23 +0000 (08:42 +0000)]
typo

21 years agoAdded license notices that are required to be included in the
Raymond Hettinger [Wed, 3 Mar 2004 08:27:25 +0000 (08:27 +0000)]
Added license notices that are required to be included in the
documentation as well as the source code.

21 years agoHave strftime() check its time tuple argument to make sure the tuple's values
Brett Cannon [Tue, 2 Mar 2004 04:38:10 +0000 (04:38 +0000)]
Have strftime() check its time tuple argument to make sure the tuple's values
are within proper boundaries as specified in the docs.

This can break possible code (datetime module needed changing, for instance)
that uses 0 for values that need to be greater 1 or greater (month, day, and
day of year).

Fixes bug #897625.

21 years agoReplace left(), right(), and __reversed__() with the more general purpose
Raymond Hettinger [Mon, 1 Mar 2004 23:16:22 +0000 (23:16 +0000)]
Replace left(), right(), and __reversed__() with the more general purpose
__getitem__() and __setitem__().

Simplifies the API, reduces the code size, adds flexibility, and makes
deques work with bisect.bisect(), random.shuffle(), and random.sample().

21 years agoAdd pystack definition to Misc/gdbinit with some explanation of its behavior
Skip Montanaro [Mon, 1 Mar 2004 15:44:05 +0000 (15:44 +0000)]
Add pystack definition to Misc/gdbinit with some explanation of its behavior
and add flag comments to ceval.c and main.c alerting people to the coupling
between pystack and the layout of those files.

21 years agoMake deque_type static so namespace is not polluted.
Neal Norwitz [Sun, 29 Feb 2004 15:40:53 +0000 (15:40 +0000)]
Make deque_type static so namespace is not polluted.

21 years agoCleanup: remove test file after it is used.
Neal Norwitz [Sun, 29 Feb 2004 15:37:50 +0000 (15:37 +0000)]
Cleanup: remove test file after it is used.

21 years agoImprovements to collections.deque():
Raymond Hettinger [Sun, 29 Feb 2004 02:15:56 +0000 (02:15 +0000)]
Improvements to collections.deque():

* Add doctests for the examples in the library reference.
* Add two methods, left() and right(), modeled after deques in C++ STL.
* Apply the new method to asynchat.py.
* Add comparison operators to make deques more substitutable for lists.
* Replace the LookupErrors with IndexErrors to more closely match lists.

21 years ago- Allow easy opening of experimental database, if pimp >= 0.4
Jack Jansen [Sat, 28 Feb 2004 23:19:42 +0000 (23:19 +0000)]
- Allow easy opening of experimental database, if pimp >= 0.4
- Allow easy access to the PackMan homepage, for even more databases.

21 years agogetDefaultDatabase() should be a toplevel function, not a method of the
Jack Jansen [Sat, 28 Feb 2004 23:18:43 +0000 (23:18 +0000)]
getDefaultDatabase() should be a toplevel function, not a method of the
preferences object.

21 years agoStarted on version 0.4: better scheme for finding correct database:
Jack Jansen [Sat, 28 Feb 2004 22:34:02 +0000 (22:34 +0000)]
Started on version 0.4: better scheme for finding correct database:
- Try not only "darwin-7.X.Y" but also "darwin-7.X" and "darwin-7",
  so far we've never had to create anew database for a minor release.
- Distinguish between the various different installs (user-installed
  MacPython, apple-installed MacPython, other).

21 years agoMinor documentation changes
Vinay Sajip [Sat, 28 Feb 2004 16:07:46 +0000 (16:07 +0000)]
Minor documentation changes

21 years agoUse versionadded for new features
Neal Norwitz [Sat, 28 Feb 2004 16:00:23 +0000 (16:00 +0000)]
Use versionadded for new features

21 years agoGet rid of unused variable
Neal Norwitz [Sat, 28 Feb 2004 15:56:27 +0000 (15:56 +0000)]
Get rid of unused variable

21 years agoAdd version changed/added to doc
Neal Norwitz [Sat, 28 Feb 2004 15:19:33 +0000 (15:19 +0000)]
Add version changed/added to doc

21 years agoSpeed-up the joiner call by avoiding Py_BuildValue().
Raymond Hettinger [Fri, 27 Feb 2004 10:30:49 +0000 (10:30 +0000)]
Speed-up the joiner call by avoiding Py_BuildValue().

21 years agomade cPickle fall back to the copy_reg/reduce protocol,
Christian Tismer [Thu, 26 Feb 2004 16:21:45 +0000 (16:21 +0000)]
made cPickle fall back to the copy_reg/reduce protocol,
if a function cannot be stored as global.
This is for compatibility with pickle.py .

21 years agoIgnore sizehint argument. Fixes SF #844561.
Marc-André Lemburg [Thu, 26 Feb 2004 15:22:17 +0000 (15:22 +0000)]
Ignore sizehint argument. Fixes SF #844561.

21 years agoOops, didn't mean to commit the removal of float_compare!
Michael W. Hudson [Thu, 26 Feb 2004 13:16:03 +0000 (13:16 +0000)]
Oops, didn't mean to commit the removal of float_compare!

21 years agoPass a variable that actually exists to PyFPE_END_PROTECT in
Michael W. Hudson [Thu, 26 Feb 2004 12:33:09 +0000 (12:33 +0000)]
Pass a variable that actually exists to PyFPE_END_PROTECT in
float_richcompare.  Reported on c.l.py by Helmut Jarausch.

21 years agoFixes SF bug # 778421
Gregory P. Smith [Thu, 26 Feb 2004 10:07:14 +0000 (10:07 +0000)]
Fixes SF bug # 778421

 * Fixed a bug in the compatibility interface set_location() method
   where it would not properly search to the next nearest key when
   used on BTree databases.  [SF bug id 788421]
 * Fixed a bug in the compatibility interface set_location() method
   where it could crash when looking up keys in a hash or recno
   format database due to an incorrect free().

21 years agoMake _spawn_posix be ready for EINTR. waitpid(2) can be interrupted
Hye-Shik Chang [Tue, 24 Feb 2004 23:54:17 +0000 (23:54 +0000)]
Make _spawn_posix be ready for EINTR. waitpid(2) can be interrupted
by SIGCHLD or sth because no signal is masked before. This fixes
an optimized installation problem on FreeBSD libpthread.

21 years agokLsUnknownType and kLSUnknownCreator were ints in stead of OSTypes.
Jack Jansen [Tue, 24 Feb 2004 21:49:10 +0000 (21:49 +0000)]
kLsUnknownType and kLSUnknownCreator were ints in stead of OSTypes.
Reported by Bob Ippolito.

21 years agoSetup file to allow the QuickTime for 2.4 to be compiled
Jack Jansen [Tue, 24 Feb 2004 21:25:31 +0000 (21:25 +0000)]
Setup file to allow the QuickTime for 2.4 to be compiled
for MacPython 2.3 (and, hopefully, python 2.3 for windows too).

21 years agofix typo in reference to RFC 3464 DSN MIME type
Fred Drake [Tue, 24 Feb 2004 20:58:10 +0000 (20:58 +0000)]
fix typo in reference to RFC 3464 DSN MIME type

21 years agoFix two bugs in the new do_open() implementation for HTTPHandler.
Jeremy Hylton [Tue, 24 Feb 2004 19:40:35 +0000 (19:40 +0000)]
Fix two bugs in the new do_open() implementation for HTTPHandler.

Invoke the standard error handlers for non-200 responses.

Always supply a "Connection: close" header to prevent the server from
leaving the connection open.  Downstream users of the socket may
attempt recv()/read() with no arguments, which would block if the
connection were kept open.

21 years agofix English usage error reported by Ken Fuchs
Fred Drake [Tue, 24 Feb 2004 16:13:36 +0000 (16:13 +0000)]
fix English usage error reported by Ken Fuchs

21 years agoReflow long line.
Jeremy Hylton [Mon, 23 Feb 2004 17:27:57 +0000 (17:27 +0000)]
Reflow long line.

21 years agoFix wrong character mapping in koi8_u: SF bug #902501.
Marc-André Lemburg [Mon, 23 Feb 2004 09:00:43 +0000 (09:00 +0000)]
Fix wrong character mapping in koi8_u: SF bug #902501.

21 years agoAdded close() (which flushes) to BufferingHandler and tidied MemoryHandler.close...
Vinay Sajip [Sat, 21 Feb 2004 22:14:34 +0000 (22:14 +0000)]
Added close() (which flushes) to BufferingHandler and tidied MemoryHandler.close() [SF #901330]

21 years agoHandler close() functions call flush() [SF #901330]
Vinay Sajip [Sat, 21 Feb 2004 22:12:32 +0000 (22:12 +0000)]
Handler close() functions call flush() [SF #901330]

21 years agoadding passing test. testing for g(*Nothing()) where Nothing is a user-defined iterator.
Samuele Pedroni [Sat, 21 Feb 2004 21:03:30 +0000 (21:03 +0000)]
adding passing test. testing for g(*Nothing()) where Nothing is a user-defined iterator.

21 years agoUse the right wininstXX.exe, depending on
Thomas Heller [Fri, 20 Feb 2004 19:38:50 +0000 (19:38 +0000)]
Use the right wininstXX.exe, depending on
msvccompiler.get_build_version().

Distributions without a pre-install-script didn't work any longer, we
must at least provide the terminating NUL character.

21 years agowininst-6.exe and wininst-7.1.exe are in CVS, so that they can be
Thomas Heller [Fri, 20 Feb 2004 18:33:38 +0000 (18:33 +0000)]
wininst-6.exe and wininst-7.1.exe are in CVS, so that they can be
included in Python distributions for systems other than Windows.
Windows installers can be build on non-Windows systems as long as they
only include pure python module distributions.

21 years agowininst.exe is no longer used - we now need wininst-6.exe or wininst-7.1.exe.
Thomas Heller [Fri, 20 Feb 2004 18:26:55 +0000 (18:26 +0000)]
wininst.exe is no longer used - we now need wininst-6.exe or wininst-7.1.exe.

21 years agoSolution and project file to build wininstXX.exe with MSVC7.1 (Visual
Thomas Heller [Fri, 20 Feb 2004 18:23:47 +0000 (18:23 +0000)]
Solution and project file to build wininstXX.exe with MSVC7.1 (Visual
Studio .NET 2003).

The output files are named wininst-7.1.exe and wininst-7.1_d.exe.

21 years agoTo avoid problems with conflicting dlls, the windows installers built
Thomas Heller [Fri, 20 Feb 2004 18:05:13 +0000 (18:05 +0000)]
To avoid problems with conflicting dlls, the windows installers built
by bdist_wininst *must* use the same runtime libary as the Python
version.

Actually this means the Python version where the installer is run, not
the one which is used to build it.  Must think about that - for now I
assume MSVC6 is used up to Python 2.3, and MSVC7.1 is used starting at
Python 2.4.

So the filename for wininst.exe is now wininst-6.exe for the Release
version and wininst-6_d.exe for the Debug version, when built with
MSVC6.

21 years agoRecompiled the binary wininst.exe.
Thomas Heller [Fri, 20 Feb 2004 14:44:32 +0000 (14:44 +0000)]
Recompiled the binary wininst.exe.

Patch #892660 from Mark Hammond, for distutils bdist_wininst command.

install.c: support for a 'pre-install-script', run before anything has
been installed. Provides a 'message_box' module function for use by
either the pre-install or post-install scripts.

bdist_wininst.py: support for pre-install script. Typo (build->built),
fixes so that --target-version can still work, even when the
distribution has extension modules - in this case, we insist on
--skip-build, as we still can't actually build other versions.

21 years agoPatch #892660 from Mark Hammond, for distutils bdist_wininst command.
Thomas Heller [Fri, 20 Feb 2004 14:43:21 +0000 (14:43 +0000)]
Patch #892660 from Mark Hammond, for distutils bdist_wininst command.

install.c: support for a 'pre-install-script', run before anything has
been installed. Provides a 'message_box' module function for use by
either the pre-install or post-install scripts.

bdist_wininst.py: support for pre-install script. Typo (build->built),
fixes so that --target-version can still work, even when the
distribution has extension modules - in this case, we insist on
--skip-build, as we still can't actually build other versions.

21 years agoSocket handler closed prior to end of test.
Vinay Sajip [Fri, 20 Feb 2004 13:19:16 +0000 (13:19 +0000)]
Socket handler closed prior to end of test.

21 years agoCopyright year & version number/version date changes.
Vinay Sajip [Fri, 20 Feb 2004 13:18:36 +0000 (13:18 +0000)]
Copyright year & version number/version date changes.
Exception traceback text is now cached.
Closing a handler now removes it from the internal _handlers list.
Handlers now chain to Handler.close() from their close() methods.
Exception info can be passed as a tuple in exc_info.
shutdown() is registered to be called at application exit.

21 years agoCopyright year change.
Vinay Sajip [Fri, 20 Feb 2004 13:17:27 +0000 (13:17 +0000)]
Copyright year change.
Corrections to comments.
Tracebacks can now be sent via SocketHandler.
SocketHandler now uses exponential backoff strategy.
Handlers now chain to Handler.close() from their close() methods.

21 years agoCopyright year change.
Vinay Sajip [Fri, 20 Feb 2004 13:16:36 +0000 (13:16 +0000)]
Copyright year change.
Corrections to comments.
Added RESET_ERROR definition.

21 years ago- "Mac OS" should always include the space
Fred Drake [Thu, 19 Feb 2004 23:17:46 +0000 (23:17 +0000)]
- "Mac OS" should always include the space
- comment out documentation for a non-existant feature (--spec-file)
  that the comments indicate isn't clearly needed
- lots of minor markup adjustments to get a more consistent
  presentation

21 years ago- according to Apple's publication style guide, yes, "Mac people" use
Fred Drake [Thu, 19 Feb 2004 23:03:29 +0000 (23:03 +0000)]
- according to Apple's publication style guide, yes, "Mac people" use
  the term Installer (always capitalized, however)
- generalize the text about the term "installer" in a fairly
  reasonable way

21 years agouse API documentation style for the descriptions of the additional
Fred Drake [Thu, 19 Feb 2004 22:28:15 +0000 (22:28 +0000)]
use API documentation style for the descriptions of the additional
functions made available in the post-installation script run by the
Windows installer

21 years agominor markup improvements
Fred Drake [Thu, 19 Feb 2004 22:16:05 +0000 (22:16 +0000)]
minor markup improvements

21 years ago"Fix" (for certain configurations of the planets, including
Michael W. Hudson [Thu, 19 Feb 2004 19:35:22 +0000 (19:35 +0000)]
"Fix" (for certain configurations of the planets, including
recent gcc on Linux/x86)

[ 899109 ] 1==float('nan')

by implementing rich comparisons for floats.

Seems to make comparisons involving NaNs somewhat less surprising
when the underlying C compiler actually implements C99 semantics.

21 years agoFix two small bugs: (1) on Windows, pathname munging didn't work
Guido van Rossum [Thu, 19 Feb 2004 19:16:50 +0000 (19:16 +0000)]
Fix two small bugs: (1) on Windows, pathname munging didn't work
right; (2) write_results_file() didn't return a tuple of two ints when
it couldn't create the file.  Will backport.

21 years agoKeep the list.pop() optimization while restoring the many possibility
Raymond Hettinger [Thu, 19 Feb 2004 06:12:06 +0000 (06:12 +0000)]
Keep the list.pop() optimization while restoring the many possibility
for types other than PyInt being accepted for the optional argument.
(Spotted by Neal Norwitz.)

21 years agoRemove gcc warning from using "main". Use METH_NOARGS instead of METH_VARARGS
Neal Norwitz [Thu, 19 Feb 2004 02:44:22 +0000 (02:44 +0000)]
Remove gcc warning from using "main".  Use METH_NOARGS instead of METH_VARARGS

21 years agoGet test to work when run from regrtest (add test_main), remove all CRs (^M)s
Neal Norwitz [Thu, 19 Feb 2004 02:37:29 +0000 (02:37 +0000)]
Get test to work when run from regrtest (add test_main), remove all CRs (^M)s

21 years agoImplementation of patch 869468
David Ascher [Wed, 18 Feb 2004 05:59:53 +0000 (05:59 +0000)]
Implementation of patch 869468

Allow the user to create Tkinter.Tcl objects which are
just like Tkinter.Tk objects except that they do not
initialize Tk. This is useful in circumstances where the
script is being run on machines that do not have an X
server running -- in those cases, Tk initialization fails,
even if no window is ever created.

Includes documentation change and tests.

Tested on Linux, Solaris and Windows.

Reviewed by Martin von Loewis.

21 years agocommentary about how bad ConfigParser is doesn't help here, and the
Fred Drake [Tue, 17 Feb 2004 22:35:19 +0000 (22:35 +0000)]
commentary about how bad ConfigParser is doesn't help here, and the
suggested approach to dealing with it isn't a good one; we need a
better general purpose config reader, not a distutils-specific reader

21 years agoOops. Return -1 to distinguish error from empty dict.
Jeremy Hylton [Tue, 17 Feb 2004 20:10:11 +0000 (20:10 +0000)]
Oops.  Return -1 to distinguish error from empty dict.

This change probably isn't work a bug fix.  It's unlikely that anyone
was calling this method without passing it a real dict.

21 years agoDouble the speed of list.pop() which was spending most of its time parsing
Raymond Hettinger [Tue, 17 Feb 2004 11:36:16 +0000 (11:36 +0000)]
Double the speed of list.pop() which was spending most of its time parsing
arguments.

21 years agoMention the optimization of list.extend().
Raymond Hettinger [Tue, 17 Feb 2004 10:46:32 +0000 (10:46 +0000)]
Mention the optimization of list.extend().

21 years agomarkup correction
Fred Drake [Tue, 17 Feb 2004 04:17:36 +0000 (04:17 +0000)]
markup correction

21 years agoMake socketmodule compile again on a modern Linux (that supports Bluetooth).
Anthony Baxter [Mon, 16 Feb 2004 05:35:28 +0000 (05:35 +0000)]
Make socketmodule compile again on a modern Linux (that supports Bluetooth).
The Bluetooth code was obviously never tested on Linux.

21 years agoFix docstrings to mention the correct function
Neal Norwitz [Mon, 16 Feb 2004 01:26:34 +0000 (01:26 +0000)]
Fix docstrings to mention the correct function

21 years agoPatch #892673: Replace /usr/local/bin/python with
Martin v. Löwis [Sun, 15 Feb 2004 21:27:03 +0000 (21:27 +0000)]
Patch #892673: Replace /usr/local/bin/python with
/usr/bin/env python'%{binsuffix}
Backported to 2.3.

21 years agoPatch #711838: Allow non-anonymous ftp urls in urllib2.
Martin v. Löwis [Sun, 15 Feb 2004 21:19:18 +0000 (21:19 +0000)]
Patch #711838: Allow non-anonymous ftp urls in urllib2.
Backported to 2.3.

21 years agoPatch #893566: Document that tp_dealloc may be called from any thread.
Martin v. Löwis [Sun, 15 Feb 2004 21:01:17 +0000 (21:01 +0000)]
Patch #893566: Document that tp_dealloc may be called from any thread.

21 years agoPatch #817379: Allow for absolute ftp paths.
Martin v. Löwis [Sun, 15 Feb 2004 20:51:39 +0000 (20:51 +0000)]
Patch #817379: Allow for absolute ftp paths.
Backported to 2.3.