]> granicus.if.org Git - python/log
python
21 years agoFix for line events in the case:
Armin Rigo [Mon, 22 Mar 2004 17:52:53 +0000 (17:52 +0000)]
Fix for line events in the case:
  def f(a):
    if a:
      print 5
    else:
      pass

21 years agoPatch #871657: Set EDOM for `nan' return values on FreeBSD and OpenBSD.
Hye-Shik Chang [Mon, 22 Mar 2004 08:43:55 +0000 (08:43 +0000)]
Patch #871657: Set EDOM for `nan' return values on FreeBSD and OpenBSD.
This fixes a problem that math.sqrt(-1) doesn't raise math.error.

21 years agoNew parser. Next up, making the current parser use this parser
Anthony Baxter [Mon, 22 Mar 2004 00:33:28 +0000 (00:33 +0000)]
New parser. Next up, making the current parser use this parser

21 years agoAdded configure check for broken poll() on some unix systems (MacOS X 10.3)
Nicholas Bastin [Sun, 21 Mar 2004 23:45:42 +0000 (23:45 +0000)]
Added configure check for broken poll() on some unix systems (MacOS X 10.3)
Fixes SF Bug #850981

21 years agoSF bug 847019 datetime.datetime initialization needs more strict checking
Tim Peters [Sun, 21 Mar 2004 23:38:41 +0000 (23:38 +0000)]
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.

21 years agoRestored revision 2.87.
Armin Rigo [Sun, 21 Mar 2004 22:29:05 +0000 (22:29 +0000)]
Restored revision 2.87.

21 years agoChange parse_qsl() to accept control-name's with no equal sign (e.g., "name")
Brett Cannon [Sun, 21 Mar 2004 22:16:15 +0000 (22:16 +0000)]
Change parse_qsl() to accept control-name's with no equal sign (e.g., "name")
when keep_blank_values is true.

21 years agoRemove 'now'
Andrew M. Kuchling [Sun, 21 Mar 2004 22:12:45 +0000 (22:12 +0000)]
Remove 'now'

21 years agoPyTuple_New(): vrbl i no longer referenced, so removed it (which kills
Tim Peters [Sun, 21 Mar 2004 21:35:41 +0000 (21:35 +0000)]
PyTuple_New():  vrbl i no longer referenced, so removed it (which kills
off a new compiler wng under MSVC6).

21 years agoNormalized files in test_unicode_file to eliminate failure on OSX
Nicholas Bastin [Sun, 21 Mar 2004 20:55:47 +0000 (20:55 +0000)]
Normalized files in test_unicode_file to eliminate failure on OSX

21 years agoThis is the fastest I could get on Intel GCC. I kept the memset() in to clear
Armin Rigo [Sun, 21 Mar 2004 20:27:49 +0000 (20:27 +0000)]
This is the fastest I could get on Intel GCC.  I kept the memset() in to clear
the newly created tuples, but tuples added in the freelist are now cleared in
tupledealloc already (which is very cheap, because we are already
Py_XDECREF'ing all elements anyway).

Python should have a standard Py_ZAP macro like ZAP in pystate.c.

21 years agoChanged file.name to be the object passed as the 'name' argument to file()
Nicholas Bastin [Sun, 21 Mar 2004 20:24:07 +0000 (20:24 +0000)]
Changed file.name to be the object passed as the 'name' argument to file()
Fixes SF Bug #773356

21 years ago[Part of patch #909005] Added map parameter for file_dispatcher and dispatcher_with_send
Andrew M. Kuchling [Sun, 21 Mar 2004 20:03:18 +0000 (20:03 +0000)]
[Part of patch #909005] Added map parameter for file_dispatcher and dispatcher_with_send

21 years ago[Part of patch #909005] Repeating exception changed from 'raise socket.error, why...
Andrew M. Kuchling [Sun, 21 Mar 2004 19:58:28 +0000 (19:58 +0000)]
[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

21 years ago[Part of patch #909005] Remove Mac code for writable
Andrew M. Kuchling [Sun, 21 Mar 2004 19:52:01 +0000 (19:52 +0000)]
[Part of patch #909005] Remove Mac code for writable

21 years ago[Part of patch #909005] Set initial poll flags
Andrew M. Kuchling [Sun, 21 Mar 2004 19:50:09 +0000 (19:50 +0000)]
[Part of patch #909005] Set initial poll flags

21 years ago[Part of patch #909005] Use True/False
Andrew M. Kuchling [Sun, 21 Mar 2004 19:46:16 +0000 (19:46 +0000)]
[Part of patch #909005] Use True/False

21 years agoBug #920575: Add a workaround for GNU libc nl_langinfo()'s returning NULL.
Hye-Shik Chang [Sun, 21 Mar 2004 19:34:30 +0000 (19:34 +0000)]
Bug #920575: Add a workaround for GNU libc nl_langinfo()'s returning NULL.
(Reported by Matthias Klose)

21 years ago[Patch #900071] Be case-insensitive when removing 'usage:' string
Andrew M. Kuchling [Sun, 21 Mar 2004 19:28:48 +0000 (19:28 +0000)]
[Patch #900071] Be case-insensitive when removing 'usage:' string

21 years ago[Part of patch #909005] Handle POLLPRI flag, and various errors cases. Fixes bug...
Andrew M. Kuchling [Sun, 21 Mar 2004 19:26:00 +0000 (19:26 +0000)]
[Part of patch #909005] Handle POLLPRI flag, and various errors cases.  Fixes bug #887279

21 years ago[Patch #918212] Support XHTML's 'id' attribute, which can be on any element.
Andrew M. Kuchling [Sun, 21 Mar 2004 19:07:23 +0000 (19:07 +0000)]
[Patch #918212] Support XHTML's 'id' attribute, which can be on any element.

21 years ago[Patch #905863] Support the CVS version of Tcl/Tk, which has the version number 8.5
Andrew M. Kuchling [Sun, 21 Mar 2004 18:59:46 +0000 (18:59 +0000)]
[Patch #905863] Support the CVS version of Tcl/Tk, which has the version number 8.5

21 years ago[Patch #850977] Detect Tcl/Tk libraries on FreeBSD/OpenBSD. Bugfix candidate
Andrew M. Kuchling [Sun, 21 Mar 2004 18:57:35 +0000 (18:57 +0000)]
[Patch #850977] Detect Tcl/Tk libraries on FreeBSD/OpenBSD.  Bugfix candidate

21 years agoUpdate URLs
Andrew M. Kuchling [Sun, 21 Mar 2004 18:48:22 +0000 (18:48 +0000)]
Update URLs

21 years agoMoved tracebackobject to traceback.h, Closes SF Bug #497067
Nicholas Bastin [Sun, 21 Mar 2004 18:37:23 +0000 (18:37 +0000)]
Moved tracebackobject to traceback.h, Closes SF Bug #497067

21 years agoFix typo in comment.
Raymond Hettinger [Sun, 21 Mar 2004 17:35:06 +0000 (17:35 +0000)]
Fix typo in comment.

21 years agoSF bug 917108: warnings.py does not define _test().
Tim Peters [Sun, 21 Mar 2004 17:06:20 +0000 (17:06 +0000)]
SF bug 917108:  warnings.py does not define _test().
Removed the entire __name__ == '__main__' block.

21 years agoAdd identity shortcut to PyObject_RichCompareBool.
Raymond Hettinger [Sun, 21 Mar 2004 17:01:44 +0000 (17:01 +0000)]
Add identity shortcut to PyObject_RichCompareBool.

21 years agoModified string.split documentation to reflect behaviour of splitting emtpy string...
Nicholas Bastin [Sun, 21 Mar 2004 16:59:59 +0000 (16:59 +0000)]
Modified string.split documentation to reflect behaviour of splitting emtpy string.  Closes SF bug #811604

21 years agorecursive_isinstance(), recursive_issubclass(): New code here returned
Tim Peters [Sun, 21 Mar 2004 16:59:09 +0000 (16:59 +0000)]
recursive_isinstance(), recursive_issubclass():  New code here returned
NULL in case of error, but the functions are declared to return int.
MSVC 6 properly complains about that.  Return -1 on error instead.

21 years ago[693255] also back out corresponding NEWS item...
Just van Rossum [Sun, 21 Mar 2004 16:26:32 +0000 (16:26 +0000)]
[693255] also back out corresponding NEWS item...

21 years agoconcrete example of why retaining old objects is good
Skip Montanaro [Sun, 21 Mar 2004 16:05:30 +0000 (16:05 +0000)]
concrete example of why retaining old objects is good

21 years agoPatch #853488: Tix hlist missing entryconfigure and entrycget methods.
Martin v. Löwis [Sun, 21 Mar 2004 15:29:41 +0000 (15:29 +0000)]
Patch #853488: Tix hlist missing entryconfigure and entrycget methods.

21 years agoPatch #853488: Add hlist entry_configure and entry_cget methods.
Martin v. Löwis [Sun, 21 Mar 2004 15:26:44 +0000 (15:26 +0000)]
Patch #853488: Add hlist entry_configure and entry_cget methods.

21 years agoRemove unused instance attributes.
Neil Schemenauer [Sun, 21 Mar 2004 15:18:50 +0000 (15:18 +0000)]
Remove unused instance attributes.

21 years agoImprove byte coding for multiple assignments.
Raymond Hettinger [Sun, 21 Mar 2004 15:12:00 +0000 (15:12 +0000)]
Improve byte coding for multiple assignments.
Gives 30% speedup on "a,b=1,2" and 25% on "a,b,c=1,2,3".

21 years agoRemoved extra period from \versionchanged entry; macro adds period
Brett Cannon [Sun, 21 Mar 2004 14:10:18 +0000 (14:10 +0000)]
Removed extra period from \versionchanged entry; macro adds period
automatically.

21 years agoBack out last patch that removed an entry from sys.path if it was not an
Brett Cannon [Sun, 21 Mar 2004 14:06:49 +0000 (14:06 +0000)]
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.

21 years agoDeal with case of when locale time values has characters that can be mistaken
Brett Cannon [Sat, 20 Mar 2004 23:09:40 +0000 (23:09 +0000)]
Deal with case of when locale time values has characters that can be mistaken
for regex syntax.
Fixes bug #883604 .

21 years agoLimit the nesting depth of a tuple passed as the second argument to
Brett Cannon [Sat, 20 Mar 2004 22:52:14 +0000 (22:52 +0000)]
Limit the nesting depth of a tuple passed as the second argument to
isinstance() or issubclass() to the recursion limit of the interpreter.

21 years agoFix for SF 780407.
Guido van Rossum [Sat, 20 Mar 2004 22:34:14 +0000 (22:34 +0000)]
Fix for SF 780407.
Change %08l to %p to print a pointer.
Will backport to 2.3.

21 years agoGet rid of listextend_internal() and explain why the special case
Armin Rigo [Sat, 20 Mar 2004 22:19:23 +0000 (22:19 +0000)]
Get rid of listextend_internal() and explain why the special case
'a.extend(a)' isn't so special anyway.

21 years agoFix for SF 777848.
Guido van Rossum [Sat, 20 Mar 2004 22:18:03 +0000 (22:18 +0000)]
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.

21 years agoSF patch 508730 CGIHTTPServer execfile should save cwd
Tim Peters [Sat, 20 Mar 2004 21:51:12 +0000 (21:51 +0000)]
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>.

21 years agoCancelled checkin, sorry.
Armin Rigo [Sat, 20 Mar 2004 21:50:13 +0000 (21:50 +0000)]
Cancelled checkin, sorry.

21 years agoClarify docs on where .pth files can exist.
Brett Cannon [Sat, 20 Mar 2004 21:41:28 +0000 (21:41 +0000)]
Clarify docs on where .pth files can exist.

21 years agomemset() hunt continuing. This is a net win.
Armin Rigo [Sat, 20 Mar 2004 21:35:09 +0000 (21:35 +0000)]
memset() hunt continuing.  This is a net win.

21 years agoRemove non-existent paths.
Brett Cannon [Sat, 20 Mar 2004 21:31:33 +0000 (21:31 +0000)]
Remove non-existent paths.

21 years agomemset() with small memory sizes just kill us.
Armin Rigo [Sat, 20 Mar 2004 21:10:27 +0000 (21:10 +0000)]
memset() with small memory sizes just kill us.

21 years agoFix how line endings were handled when iterating over a .pth file by stripping
Brett Cannon [Sat, 20 Mar 2004 21:08:17 +0000 (21:08 +0000)]
Fix how line endings were handled when iterating over a .pth file by stripping
all whitespace at the end of the path line.

21 years agoTweaked after following all these instructions.
Guido van Rossum [Sat, 20 Mar 2004 21:00:26 +0000 (21:00 +0000)]
Tweaked after following all these instructions.

Removed Win9x notes (since the .NET compiler requires Win2K or XP anyway).

21 years agotest_email: comment out two fail-test cases that no longer fail with the new
Thomas Wouters [Sat, 20 Mar 2004 20:29:50 +0000 (20:29 +0000)]
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.

21 years agoSpeed HMAC.copy() by installing a secret backdoor argument to
Tim Peters [Sat, 20 Mar 2004 20:11:29 +0000 (20:11 +0000)]
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%.

21 years agoA 2% speed improvement with gcc on low-endian machines. My guess is that this
Armin Rigo [Sat, 20 Mar 2004 20:03:17 +0000 (20:03 +0000)]
A 2% speed improvement with gcc on low-endian machines.  My guess is that this
new pattern for NEXTARG() is detected and optimized as a single (*short)
loading.

21 years agoGCC was complaining that 'value' in dictiter_iternextvalue() wasn't
Guido van Rossum [Sat, 20 Mar 2004 19:11:58 +0000 (19:11 +0000)]
GCC was complaining that 'value' in dictiter_iternextvalue() wasn't
necessarily always set before used.  Between Tim, Armin & me we
couldn't prove GCC wrong, so we decided to fix the algorithm.  This
version is Armin's.

21 years agoSF bug #918371: hasattr()'s return type
Raymond Hettinger [Sat, 20 Mar 2004 18:25:31 +0000 (18:25 +0000)]
SF bug #918371: hasattr()'s return type

Replace 1 and 0 with True and False.

21 years agoMerge in Anthony's new parser code, from the anthony-parser-branch:
Thomas Wouters [Sat, 20 Mar 2004 17:31:29 +0000 (17:31 +0000)]
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.
> =============================================================================

21 years agoUpdate copyright years, and change copyright.tex to use the same spelling
Tim Peters [Sat, 20 Mar 2004 17:24:51 +0000 (17:24 +0000)]
Update copyright years, and change copyright.tex to use the same spelling
as license.tex (SF patch 795531 complained about the spelling discrepancy,
although this "repairs" that flaw in a different way than the patch).

21 years agocommit the portion of PyXML patch #919008 that is relevant to the
Fred Drake [Sat, 20 Mar 2004 08:15:30 +0000 (08:15 +0000)]
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)

21 years agofix two typos that turned text into markup
Fred Drake [Sat, 20 Mar 2004 08:13:32 +0000 (08:13 +0000)]
fix two typos that turned text into markup

21 years agoIgnore oodles of MSVC-generated files.
Tim Peters [Sat, 20 Mar 2004 05:00:56 +0000 (05:00 +0000)]
Ignore oodles of MSVC-generated files.

21 years agoA helper for rt.bat, copied (but with path adjustment) from PCbuild.
Tim Peters [Sat, 20 Mar 2004 04:57:32 +0000 (04:57 +0000)]
A helper for rt.bat, copied (but with path adjustment) from PCbuild.

21 years agoPyFile_WriteObject(): some of the local variables are only used when
Fred Drake [Fri, 19 Mar 2004 15:22:36 +0000 (15:22 +0000)]
PyFile_WriteObject():  some of the local variables are only used when
                       Py_USING_UNICODE is defined

21 years agoExpand on the semantics of reload(). Closes #919099.
Skip Montanaro [Fri, 19 Mar 2004 15:20:16 +0000 (15:20 +0000)]
Expand on the semantics of reload().  Closes #919099.

21 years agoFactor out a double lookup.
Raymond Hettinger [Fri, 19 Mar 2004 10:30:00 +0000 (10:30 +0000)]
Factor out a double lookup.

21 years agoAdd an entry for addition of the ptcp154 codec.
Hye-Shik Chang [Fri, 19 Mar 2004 08:11:56 +0000 (08:11 +0000)]
Add an entry for addition of the ptcp154 codec.

21 years agoAdd a new unicode codec: ptcp154 (Kazakh)
Hye-Shik Chang [Fri, 19 Mar 2004 08:06:07 +0000 (08:06 +0000)]
Add a new unicode codec: ptcp154 (Kazakh)

21 years agoMake iterators length transparent where possible.
Raymond Hettinger [Thu, 18 Mar 2004 22:43:10 +0000 (22:43 +0000)]
Make iterators length transparent where possible.

21 years agoImprove deque iteration.
Raymond Hettinger [Thu, 18 Mar 2004 11:04:57 +0000 (11:04 +0000)]
Improve deque iteration.
* The default __reversed__ performed badly, so reintroduced a custom
  reverse iterator.
* Added length transparency to improve speed with map(), list(), etc.

21 years agoAdd news entries for the dictionary optimizations.
Raymond Hettinger [Thu, 18 Mar 2004 09:48:12 +0000 (09:48 +0000)]
Add news entries for the dictionary optimizations.

21 years agoMake the new dictionary iterators transparent with respect to length.
Raymond Hettinger [Thu, 18 Mar 2004 08:38:00 +0000 (08:38 +0000)]
Make the new dictionary iterators transparent with respect to length.
This gives another 30% speedup for operations such as
map(func, d.iteritems()) or list(d.iteritems()) which can both take
advantage of length information when provided.

21 years agoIgnore error status codes occurred while compiling site-packages
Hye-Shik Chang [Thu, 18 Mar 2004 07:51:27 +0000 (07:51 +0000)]
Ignore error status codes occurred while compiling site-packages
directory.

21 years agoFix capitalization of title for subsection 2.
Brett Cannon [Thu, 18 Mar 2004 07:37:15 +0000 (07:37 +0000)]
Fix capitalization of title for subsection 2.

21 years agoOptimize dictionary iterators.
Raymond Hettinger [Thu, 18 Mar 2004 02:41:19 +0000 (02:41 +0000)]
Optimize dictionary iterators.

* Split into three separate types that share everything except the
  code for iternext.  Saves run time decision making and allows
  each iternext function to be specialized.

* Inlined PyDict_Next().  In addition to saving a function call, this
  allows a redundant test to be eliminated and further specialization
  of the code for the unique needs of each iterator type.

* Created a reusable result tuple for iteritems().  Saves the malloc
  time for tuples when the previous result was not kept by client code
  (this is the typical use case for iteritems).  If the client code
  does keep the reference, then a new tuple is created.

Results in a 20% to 30% speedup depending on the size and sparsity
of the dictionary.

21 years agoMinor grammatical fixes.
Brett Cannon [Thu, 18 Mar 2004 01:38:11 +0000 (01:38 +0000)]
Minor grammatical fixes.

21 years agoExtremely minor typo fixed.
Brett Cannon [Thu, 18 Mar 2004 00:49:01 +0000 (00:49 +0000)]
Extremely minor typo fixed.

21 years agoDictionary optimizations:
Raymond Hettinger [Wed, 17 Mar 2004 21:55:03 +0000 (21:55 +0000)]
Dictionary optimizations:

* Factored constant structure references out of the inner loops for
  PyDict_Next(), dict_keys(), dict_values(), and dict_items().
  Gave measurable speedups to each (the improvement varies depending
  on the sparseness of the dictionary being measured).

* Added a freelist scheme styled after that for tuples.  Saves around
  80% of the calls to malloc and free.  About 10% of the time, the
  previous dictionary was completely empty; in those cases, the
  dictionary initialization with memset() can be skipped.

21 years agoAdd missing decref
Raymond Hettinger [Wed, 17 Mar 2004 05:24:23 +0000 (05:24 +0000)]
Add missing decref

21 years agoSpeedup the inner loops for dropwhile(), islice(), ifilter(), and
Raymond Hettinger [Wed, 17 Mar 2004 04:27:44 +0000 (04:27 +0000)]
Speedup the inner loops for dropwhile(), islice(), ifilter(), and
ifilterfalse().

21 years agoThe example files need to be opened with the "b" flag.
Skip Montanaro [Wed, 17 Mar 2004 01:24:17 +0000 (01:24 +0000)]
The example files need to be opened with the "b" flag.

21 years ago* supply a more useful error message when append() is called on the
Gregory P. Smith [Tue, 16 Mar 2004 18:50:26 +0000 (18:50 +0000)]
* 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

21 years agobugfix for people executing test_all to run the test suite. (call the
Gregory P. Smith [Tue, 16 Mar 2004 07:07:06 +0000 (07:07 +0000)]
bugfix for people executing test_all to run the test suite.  (call the
correct function)

21 years agofixes SF bug 914019 - DB.has_key was not honoring its txn argument
Gregory P. Smith [Tue, 16 Mar 2004 06:56:58 +0000 (06:56 +0000)]
fixes SF bug 914019 - DB.has_key was not honoring its txn argument

21 years ago1. Make builtin foreground Royal Purple instead of Barney Purple.
Kurt B. Kaiser [Tue, 16 Mar 2004 03:36:41 +0000 (03:36 +0000)]
1. Make builtin foreground Royal Purple instead of Barney Purple.
2. Touch up help.txt

M config-highlight.def
M help.txt

21 years agoFix typos and add some elaborations
Raymond Hettinger [Mon, 15 Mar 2004 15:52:22 +0000 (15:52 +0000)]
Fix typos and add some elaborations

21 years agoPort test_binascii.py to PyUnit and enhance tests.
Walter Dörwald [Mon, 15 Mar 2004 12:07:38 +0000 (12:07 +0000)]
Port test_binascii.py to PyUnit and enhance tests.
Code coverage for binascii.c is at 92%.
From SF patch #736962.

21 years agoRevert last change. Found an application that was worse off with resize
Raymond Hettinger [Mon, 15 Mar 2004 09:01:31 +0000 (09:01 +0000)]
Revert last change.  Found an application that was worse off with resize
exact turned on.  The tiny space savings wasn't worth the additional time
and code.

21 years ago1. Bug in Patch 805830 fixed by Nigel Rowe
Kurt B. Kaiser [Mon, 15 Mar 2004 04:26:37 +0000 (04:26 +0000)]
1. Bug in Patch 805830 fixed by Nigel Rowe
2. Convert 1/0 to True/False
3. Fix a couple of long lines

M ColorDelegator.py
M NEWS.txt

21 years agoEliminate an unnecessary test on a common code path.
Raymond Hettinger [Mon, 15 Mar 2004 00:16:34 +0000 (00:16 +0000)]
Eliminate an unnecessary test on a common code path.

21 years agoAdd missing docstrings.
Raymond Hettinger [Sun, 14 Mar 2004 07:54:37 +0000 (07:54 +0000)]
Add missing docstrings.

21 years agolist_resize() now has an "exact" option for bypassing the overallocation
Raymond Hettinger [Sun, 14 Mar 2004 06:42:23 +0000 (06:42 +0000)]
list_resize() now has an "exact" option for bypassing the overallocation
scheme in situations that likely won't benefit from it.  This further
improves memory utilization from Py2.3 which always over-allocates
except for PyList_New().

Situations expected to benefit from over-allocation:
    list.insert(), list.pop(), list.append(), and list.extend()

Situations deemed unlikely to benefit:
    list_inplace_repeat, list_ass_slice, list_ass_subscript

The most gray area was for listextend_internal() which only runs
when the argument is a list or a tuple.  This could be viewed as
a one-time fixed length addition or it could be viewed as wrapping
a series of appends.  I left its over-allocation turned on but
could be convinced otherwise.

21 years agoSF feature request #686323: Minor array module enhancements
Raymond Hettinger [Sun, 14 Mar 2004 05:43:59 +0000 (05:43 +0000)]
SF feature request #686323:  Minor array module enhancements

array.extend() now accepts iterable arguments implements as a series
of appends.  Besides being a user convenience and matching the behavior
for lists, this the saves memory and cycles that would be used to
create a temporary array object.

21 years agoUpdate the array overallocation scheme to match the approach used for
Raymond Hettinger [Sun, 14 Mar 2004 04:37:50 +0000 (04:37 +0000)]
Update the array overallocation scheme to match the approach used for
lists.  Speeds append() operations and reduces memory requirements
(because of more conservative overallocation).

Paves the way for the feature request for array.extend() to support
arbitrary iterable arguments.

21 years agoTwo issues spotted by Ronald OUssoren:
Jack Jansen [Sat, 13 Mar 2004 23:50:48 +0000 (23:50 +0000)]
Two issues spotted by Ronald OUssoren:
- there were no accessor functions for the global per-database fields
- packages and their dependencies were installed in order in stead
  of in reverse order.

21 years agoDon't use "dict" as a variable, it shadows the builtin. Spotted by
Jack Jansen [Sat, 13 Mar 2004 23:32:47 +0000 (23:32 +0000)]
Don't use "dict" as a variable, it shadows the builtin. Spotted by
Bob Ippolito.

21 years agocompile.h and eval.h weren't being included which kept a fair bit of the
Skip Montanaro [Sat, 13 Mar 2004 23:11:44 +0000 (23:11 +0000)]
compile.h and eval.h weren't being included which kept a fair bit of the
public API from being exposed by simply including Python.h (as recommended).

21 years agoForce option should be applied to a single package, not recursively
Jack Jansen [Sat, 13 Mar 2004 23:03:38 +0000 (23:03 +0000)]
Force option should be applied to a single package, not recursively
to its dependencies. Fixes #733819.

21 years agoSF patch #906501: Fix typos in pystate.h comments
Raymond Hettinger [Sat, 13 Mar 2004 20:45:47 +0000 (20:45 +0000)]
SF patch #906501:  Fix typos in pystate.h comments
(Contributed by Greg Chapman.)

21 years agoSF patch #911431: robot.txt must be robots.txt
Raymond Hettinger [Sat, 13 Mar 2004 20:27:23 +0000 (20:27 +0000)]
SF patch #911431: robot.txt must be robots.txt
(Contributed by George Yoshida.)

21 years agoSF bug #910986: copy.copy fails for array.array
Raymond Hettinger [Sat, 13 Mar 2004 18:18:51 +0000 (18:18 +0000)]
SF bug #910986:  copy.copy fails for array.array

Added support for the copy module.