]> granicus.if.org Git - python/log
python
22 years agoClarify that even though some of the relevant specifications define the
Fred Drake [Wed, 21 Aug 2002 19:24:21 +0000 (19:24 +0000)]
Clarify that even though some of the relevant specifications define the
order in which form variables should be encoded in a request, a CGI script
should not rely on that since a client may not conform to those specs, or
they may not be relevant to the request.
Closes SF bug #596866.

22 years agoNow that __init__ transforms set elements, we know that all of the
Raymond Hettinger [Wed, 21 Aug 2002 13:20:51 +0000 (13:20 +0000)]
Now that __init__ transforms set elements, we know that all of the
elements are hashable, so we can use dict.update() or dict.copy()
for a C speed Set.copy().

22 years agoAdd regression test for proper construction of sets of sets.
Raymond Hettinger [Wed, 21 Aug 2002 06:38:44 +0000 (06:38 +0000)]
Add regression test for proper construction of sets of sets.

22 years agoReplace all cases of "while 1" with "while True".
Raymond Hettinger [Wed, 21 Aug 2002 04:54:00 +0000 (04:54 +0000)]
Replace all cases of "while 1" with "while True".
Though slightly slower, has better clarity and teaching value.

22 years agoSped ._update() method by factoring try/except out of the inner loop.
Raymond Hettinger [Wed, 21 Aug 2002 04:12:03 +0000 (04:12 +0000)]
Sped ._update() method by factoring try/except out of the inner loop.

22 years agoOuch. The test suite *really* needs work!!!!! There were several
Guido van Rossum [Wed, 21 Aug 2002 03:20:44 +0000 (03:20 +0000)]
Ouch.  The test suite *really* needs work!!!!!  There were several
superficial errors and one deep one that aren't currently caught.  I'm
headed for bed after this checkin.

- Fixed several typos introduced by Raymond Hettinger (through
  cut-n-paste from my template): it's _as_temporarily_immutable, not
  _as_temporary_immutable, and moreover when the element is added, we
  should use _as_immutable.

- Made the seq argument to ImmutableSet.__init__ optional, so we can
  write ImmutableSet() to create an immutable empty set.

- Rename the seq argument to Set and ImmutableSet to iterable.

- Add a Set.__hash__ method that raises a TypeError.  We inherit a
  default __hash__ implementation from object, and we don't want that.
  We can then catch this in update(), so that
  e.g. s.update([Set([1])]) will transform the Set([1]) to
  ImmutableSet([1]).

- Added the dance to catch TypeError and try _as_immutable in the
  constructors too (by calling _update()).  This is needed so that
  Set([Set([1])]) is correctly interpreted as
  Set([ImmutableSet([1])]).  (I was puzzled by a side effect of this
  and the inherited __hash__ when comparing two sets of sets while
  testing different powerset implementations: the Set element passed
  to a Set constructor wasn't transformed to an ImmutableSet, and then
  the dictionary didn't believe the Set found in one dict it was the
  same as ImmutableSet in the other, because the hashes were
  different.)

- Refactored Set.update() and both __init__() methods; moved the body
  of update() into BaseSet as _update(), and call this from __init__()
  and update().

- Changed the NotImplementedError in BaseSet.__init__ to TypeError,
  both for consistency with basestring() and because we have to use
  TypeError when denying Set.__hash__.  Together those provide
  sufficient evidence that an unimplemented method needs to raise
  TypeError.

22 years agoAdd Raymond H to the list of authors; add some XXX comments about
Guido van Rossum [Wed, 21 Aug 2002 02:44:04 +0000 (02:44 +0000)]
Add Raymond H to the list of authors; add some XXX comments about
possible API improvements.

22 years agoFast size check for sub/super set tests
Raymond Hettinger [Wed, 21 Aug 2002 02:22:08 +0000 (02:22 +0000)]
Fast size check for sub/super set tests

22 years agoOptimize try/except ordering in sets.py.
Raymond Hettinger [Wed, 21 Aug 2002 01:35:29 +0000 (01:35 +0000)]
Optimize try/except ordering in sets.py.

Gains a 5:1 speed-up for membership testing by
handling the most common case first (the case
where the element is hashable).

Closes SF Patch 597444.

22 years agoMinor typo
Raymond Hettinger [Tue, 20 Aug 2002 23:34:01 +0000 (23:34 +0000)]
Minor typo

22 years agoRename popitem() to pop(). (An idea from SF patch 597444.)
Guido van Rossum [Tue, 20 Aug 2002 21:51:59 +0000 (21:51 +0000)]
Rename popitem() to pop().  (An idea from SF patch 597444.)

22 years agoMove __init__ from BaseSet into Set and ImmutableSet. This causes a
Guido van Rossum [Tue, 20 Aug 2002 21:38:37 +0000 (21:38 +0000)]
Move __init__ from BaseSet into Set and ImmutableSet.  This causes a
tiny amount of code duplication, but makes it possible to give BaseSet
an __init__ that raises an exception.

22 years agoTypo repair. Please include in any backports.
Guido van Rossum [Tue, 20 Aug 2002 20:07:10 +0000 (20:07 +0000)]
Typo repair.  Please include in any backports.

22 years agoAdd a note reminding the reader that sets are not sequences. I
Guido van Rossum [Tue, 20 Aug 2002 20:05:23 +0000 (20:05 +0000)]
Add a note reminding the reader that sets are not sequences.  I
received feedback that was based in the misunderstanding that sets
were sequences.

22 years agoSF patch 595846 by Brett Cannon: Update environ for CGIHTTPServer.py
Guido van Rossum [Tue, 20 Aug 2002 19:55:06 +0000 (19:55 +0000)]
SF patch 595846 by Brett Cannon: Update environ for CGIHTTPServer.py

This patch causes CGIHTTPServer to update os.environ regardless of how
it tries to handle calls (fork, popen*, etc.).

Backport bugfix candidate.

22 years agolong_format(), long_lshift(): Someone on c.l.py is trying to boost
Tim Peters [Tue, 20 Aug 2002 19:00:22 +0000 (19:00 +0000)]
long_format(), long_lshift():  Someone on c.l.py is trying to boost
SHIFT and MASK, and widen digit.  One problem is that code of the form

    digit << small_integer

implicitly assumes that the result fits in an int or unsigned int
(platform-dependent, but "int sized" in any case), since digit is
promoted "just" to int or unsigned via the usual integer promotions.
But if digit is typedef'ed as unsigned int, this loses information.
The cure for this is just to cast digit to twodigits first.

22 years agoFix some endcase bugs in unicode rfind()/rindex() and endswith().
Guido van Rossum [Tue, 20 Aug 2002 17:29:29 +0000 (17:29 +0000)]
Fix some endcase bugs in unicode rfind()/rindex() and endswith().
These were reported and fixed by Inyeol Lee in SF bug 595350.  The
endswith() bug was already fixed in 2.3, but this adds some more test
cases.

22 years agoComment typo repair.
Michael W. Hudson [Tue, 20 Aug 2002 15:43:16 +0000 (15:43 +0000)]
Comment typo repair.

22 years agoMy patch #597221. Use f_lasti more consistently.
Michael W. Hudson [Tue, 20 Aug 2002 15:19:14 +0000 (15:19 +0000)]
My patch #597221.  Use f_lasti more consistently.

22 years agoBump version number to 2.3
Barry Warsaw [Tue, 20 Aug 2002 14:51:34 +0000 (14:51 +0000)]
Bump version number to 2.3

22 years agoAdded tests for SF patch #597593, syntactically invalid Content-Type: headers.
Barry Warsaw [Tue, 20 Aug 2002 14:51:10 +0000 (14:51 +0000)]
Added tests for SF patch #597593, syntactically invalid Content-Type: headers.

22 years agoget_content_type(), get_content_maintype(), get_content_subtype(): RFC
Barry Warsaw [Tue, 20 Aug 2002 14:50:09 +0000 (14:50 +0000)]
get_content_type(), get_content_maintype(), get_content_subtype(): RFC
2045, section 5.2 states that if the Content-Type: header is
syntactically invalid, the default type should be text/plain.
Implement minimal sanity checking of the header -- it must have
exactly one slash in it.  This closes SF patch #597593 by Skip, but in
a different way.

Note that these methods used to raise ValueError for invalid ctypes,
but now they won't.

22 years ago_dispatch(): Use get_content_maintype() and get_content_subtype() to
Barry Warsaw [Tue, 20 Aug 2002 14:47:30 +0000 (14:47 +0000)]
_dispatch(): Use get_content_maintype() and get_content_subtype() to
get the MIME main and sub types, instead of getting the whole ctype
and splitting it here.   The two more specific methods now correctly
implement RFC 2045, section 5.2.

22 years agogetinstclassname(): Squash new compiler wng in assert (comparison of
Tim Peters [Tue, 20 Aug 2002 14:31:35 +0000 (14:31 +0000)]
getinstclassname():  Squash new compiler wng in assert (comparison of
signed vs unsigned).

22 years agoClarify the endpos argument to the rx.match() method.
Fred Drake [Tue, 20 Aug 2002 13:57:47 +0000 (13:57 +0000)]
Clarify the endpos argument to the rx.match() method.
Closes SF bug #597177.

22 years agotest_three_lines(): Test case reported by Andrew McNamara. Works in
Barry Warsaw [Tue, 20 Aug 2002 12:54:07 +0000 (12:54 +0000)]
test_three_lines(): Test case reported by Andrew McNamara.  Works in
email 2.2 but fails in email 1.0.

22 years agoCover the sets module.
Andrew M. Kuchling [Tue, 20 Aug 2002 01:34:06 +0000 (01:34 +0000)]
Cover the sets module.

(There's a link to PEP218; has PEP218 been updated to match the actual
module implementation?)

22 years agoCreate two subsections of the "Core Language Changes" section, because
Andrew M. Kuchling [Tue, 20 Aug 2002 00:54:36 +0000 (00:54 +0000)]
Create two subsections of the "Core Language Changes" section, because
   the list is getting awfully long
Mention Karatsuba multiplication and some other items

22 years agoAdd versionadded for operator.pow
Neal Norwitz [Mon, 19 Aug 2002 22:38:01 +0000 (22:38 +0000)]
Add versionadded for operator.pow

22 years agoExtend some comments on the order of values in the returns from
Fred Drake [Mon, 19 Aug 2002 21:58:58 +0000 (21:58 +0000)]
Extend some comments on the order of values in the returns from
dict.items/keys/values/iteritems/iterkeys/itervalues().

22 years agoSF patch 576101, by Oren Tirosh: alternative implementation of
Guido van Rossum [Mon, 19 Aug 2002 21:43:18 +0000 (21:43 +0000)]
SF patch 576101, by Oren Tirosh: alternative implementation of
interning.  I modified Oren's patch significantly, but the basic idea
and most of the implementation is unchanged.  Interned strings created
with PyString_InternInPlace() are now mortal, and you must keep a
reference to the resulting string around; use the new function
PyString_InternImmortal() to create immortal interned strings.

22 years agoAdd a warning comment to the LOAD_GLOBAL inline code.
Guido van Rossum [Mon, 19 Aug 2002 21:17:53 +0000 (21:17 +0000)]
Add a warning comment to the LOAD_GLOBAL inline code.

22 years agoAnother ugly inlining hack, expanding the two PyDict_GetItem() calls
Guido van Rossum [Mon, 19 Aug 2002 20:24:07 +0000 (20:24 +0000)]
Another ugly inlining hack, expanding the two PyDict_GetItem() calls
in LOAD_GLOBAL.  Besides saving a C function call, it saves checks
whether f_globals and f_builtins are dicts, and extracting and testing
the string object's hash code is done only once.  We bail out of the
inlining if the name is not exactly a string, or when its hash is -1;
because of interning, neither should ever happen.  I believe interning
guarantees that the hash code is set, and I believe that the 'names'
tuple of a code object always contains interned strings, but I'm not
assuming that -- I'm simply testing hash != -1.

On my home machine, this makes a pystone variant with new-style
classes and slots run at the same speed as classic pystone!  (With
new-style classes but without slots, it is still a lot slower.)

22 years agoCall me anal, but there was a particular phrase that was speading to
Guido van Rossum [Mon, 19 Aug 2002 19:26:42 +0000 (19:26 +0000)]
Call me anal, but there was a particular phrase that was speading to
comments everywhere that bugged me: /* Foo is inlined */ instead of
/* Inline Foo */.  Somehow the "is inlined" phrase always confused me
for half a second (thinking, "No it isn't" until I added the missing
"here").  The new phrase is hopefully unambiguous.

22 years agoAnother modest speedup in PyObject_GenericGetAttr(): inline the call
Guido van Rossum [Mon, 19 Aug 2002 19:22:50 +0000 (19:22 +0000)]
Another modest speedup in PyObject_GenericGetAttr(): inline the call
to _PyType_Lookup().

22 years agoMake PyDescr_IsData() a macro. It's too simple to be a function.
Guido van Rossum [Mon, 19 Aug 2002 18:45:37 +0000 (18:45 +0000)]
Make PyDescr_IsData() a macro.  It's too simple to be a function.
Should save 4% on slot lookups.

22 years agoCheck in my ultra-shortlived patch #597220.
Michael W. Hudson [Mon, 19 Aug 2002 16:54:08 +0000 (16:54 +0000)]
Check in my ultra-shortlived patch #597220.

Move some debugging checks inside Py_DEBUG.

They were causing cache misses according to cachegrind.

22 years agoInline call to _PyObject_GetDictPtr() in PyObject_GenericGetAttr().
Guido van Rossum [Mon, 19 Aug 2002 16:50:48 +0000 (16:50 +0000)]
Inline call to _PyObject_GetDictPtr() in PyObject_GenericGetAttr().
This causes a modest speedup.

22 years agoFix typo in __slots__ of ImmutableSet.
Guido van Rossum [Mon, 19 Aug 2002 16:29:58 +0000 (16:29 +0000)]
Fix typo in __slots__ of ImmutableSet.

22 years agoNews about sets. (There's no documentation; if someone wants to
Guido van Rossum [Mon, 19 Aug 2002 16:25:46 +0000 (16:25 +0000)]
News about sets.  (There's no documentation; if someone wants to
convert the doc strings to LaTeX, be my guest.)

22 years agoSet classes and their unit tests, from sandbox.
Guido van Rossum [Mon, 19 Aug 2002 16:19:15 +0000 (16:19 +0000)]
Set classes and their unit tests, from sandbox.

22 years agoSimple but important optimization for descr_check(): instead of the
Guido van Rossum [Mon, 19 Aug 2002 16:02:33 +0000 (16:02 +0000)]
Simple but important optimization for descr_check(): instead of the
expensive and overly general PyObject_IsInstance(), call
PyObject_TypeCheck() which is a macro that often avoids a call, and if
it does make a call, calls the much more efficient PyType_IsSubtype().
This saved 6% on a benchmark for slot lookups.

22 years agoFix spelling errors and note the addition of operator.pow()
Raymond Hettinger [Mon, 19 Aug 2002 14:25:03 +0000 (14:25 +0000)]
Fix spelling errors and note the addition of operator.pow()

22 years agoMerged the MacPython thanks list into the general acknowledgements.
Jack Jansen [Mon, 19 Aug 2002 13:17:39 +0000 (13:17 +0000)]
Merged the MacPython thanks list into the general acknowledgements.
There's really no point in a separate list of thank-you notes.

22 years agoAdded __pow__(a,b) to the operator module. Completes the pattern of
Raymond Hettinger [Mon, 19 Aug 2002 03:19:09 +0000 (03:19 +0000)]
Added __pow__(a,b) to the operator module. Completes the pattern of
all operators having a counterpart in the operator module.

Closes SF bug #577513.

22 years agoSF bug 595919: popenN return only text mode pipes
Tim Peters [Mon, 19 Aug 2002 00:42:29 +0000 (00:42 +0000)]
SF bug 595919: popenN return only text mode pipes
popen2() and popen3() created text-mode pipes even when binary mode
was asked for.  This was specific to Windows.

22 years agoAdd Steve Purcell for unittest.py
Raymond Hettinger [Sun, 18 Aug 2002 22:22:14 +0000 (22:22 +0000)]
Add Steve Purcell for unittest.py

22 years agoRefuse to run if the last bit of the destination path contains a # character.
Jack Jansen [Sun, 18 Aug 2002 21:57:09 +0000 (21:57 +0000)]
Refuse to run if the last bit of the destination path contains a # character.
This is a silly workaround for a rather serious bug in MacOSX: if you take
a long filename and convert it to an FSSpec the fsspec gets a magic
cooky (containing a #, indeed). If you then massage the extension of this
fsspec and convert back to a pathname you may end up referring to the
same file. This could destroy your sourcefile. The problem only occcurs
in MacPython-OS9, not MacPython-OSX (I think).

Closes bug #505562.

22 years agoModify splituser() method to allow an @ in the userinfo field.
Raymond Hettinger [Sun, 18 Aug 2002 20:08:56 +0000 (20:08 +0000)]
Modify splituser() method to allow an @ in the userinfo field.
Jeremy reported that this is not allowed by RFC 2396; however,
other tools support unescaped @'s so we should also.

Apply SF patch 596581 closing bug 581529.

22 years agoOS/2 EMX behaves like Windows where file permissions are concerned
Andrew MacIntyre [Sun, 18 Aug 2002 06:47:19 +0000 (06:47 +0000)]
OS/2 EMX behaves like Windows where file permissions are concerned

22 years agoupdate contact info
Andrew MacIntyre [Sun, 18 Aug 2002 06:32:46 +0000 (06:32 +0000)]
update contact info

22 years agoPrep for 2.3:
Andrew MacIntyre [Sun, 18 Aug 2002 06:31:01 +0000 (06:31 +0000)]
Prep for 2.3:
 - update DLL version number
 - add files required for 2.3 (no changes to modules though)
 - restructure build of pgen.exe

NOTE:  As I don't have the VACPP compiler, these changes are untested.
Apart from slightly re-ordering some file lists, and matching file name
casing, I believe these changes are the minimum necessary to build 2.3
with VACPP.

22 years agomake port notes current
Andrew MacIntyre [Sun, 18 Aug 2002 06:28:21 +0000 (06:28 +0000)]
make port notes current

22 years agoBuild process updates:
Andrew MacIntyre [Sun, 18 Aug 2002 06:26:33 +0000 (06:26 +0000)]
Build process updates:
 - the security fixes to tempfile have lead to test_tempfile wanting
   to create 100 temporary files.  as the EMX default is only 40,
   the number of file handles has been bumped (up to 250).
 - changes to pgen have required restructuring its build support.

22 years agoGet rid of _once(); inlining it takes less code. :-)
Guido van Rossum [Sat, 17 Aug 2002 14:50:24 +0000 (14:50 +0000)]
Get rid of _once(); inlining it takes less code. :-)

Also, don't call gettempdir() in the default expression for the 'dir'
argument to various functions; use 'dir=None' for the default and
insert 'if dir is None: dir = gettemptir()' in the bodies.  That way
the work done by gettempdir is postponed until needed.

22 years agoPatch by Zack W to make test_noinherit() more robust: spawn a Python
Guido van Rossum [Sat, 17 Aug 2002 11:41:01 +0000 (11:41 +0000)]
Patch by Zack W to make test_noinherit() more robust: spawn a Python
subprocess that does the right checks.  This now works on Windows as
well.

22 years agoGet this to compile again if Py_USING_UNICODE is not defined.
Neal Norwitz [Fri, 16 Aug 2002 23:20:39 +0000 (23:20 +0000)]
Get this to compile again if Py_USING_UNICODE is not defined.
com_error() is static in Python/compile.c.

22 years agoDrop the number of test files to 100 for all the tests
Neal Norwitz [Fri, 16 Aug 2002 19:28:59 +0000 (19:28 +0000)]
Drop the number of test files to 100 for all the tests

22 years agoInline fast_cfunction() in new call_function().
Jeremy Hylton [Fri, 16 Aug 2002 18:36:11 +0000 (18:36 +0000)]
Inline fast_cfunction() in new call_function().

Also, don't handle METH_OLDARGS on the fast path.  All the interesting
builtins have been converted to use METH_NOARGS, METH_O, or
METH_VARARGS.

Result is another 1-2% speedup.  If I can cobble together 10 of these,
it might make a difference.

22 years agoRemove the outdated PLAN.txt file.
Guido van Rossum [Fri, 16 Aug 2002 18:32:53 +0000 (18:32 +0000)]
Remove the outdated PLAN.txt file.

22 years agoMove body of CALL_FUNCTION opcode into helper function.
Jeremy Hylton [Fri, 16 Aug 2002 17:47:26 +0000 (17:47 +0000)]
Move body of CALL_FUNCTION opcode into helper function.

This makes the code much easier to ready, because it is at a sane
indentation level.  On my box this shows a 1-2% speedup, which means
nothing, except that I'm not going to worry about the performance
effects of the change.

22 years agoSquash a few calls to the hideously expensive PyObject_CallObject(o,a)
Guido van Rossum [Fri, 16 Aug 2002 17:01:09 +0000 (17:01 +0000)]
Squash a few calls to the hideously expensive PyObject_CallObject(o,a)
-- replace then with slightly faster PyObject_Call(o,a,NULL).  (The
difference is that the latter requires a to be a tuple; the former
allows other values and wraps them in a tuple if necessary; it
involves two more levels of C function calls to accomplish all that.)

22 years agoStreamline the fast track for CFunction calls a bit more: there was
Guido van Rossum [Fri, 16 Aug 2002 16:14:00 +0000 (16:14 +0000)]
Streamline the fast track for CFunction calls a bit more: there was
nothing special done if keyword arguments were present, so test for
that earlier and fall through to the normal case if there are any.
This ought to slow down CFunction calls with keyword args, but I don't
care; it's a tiny (1%) improvement for pystone.

22 years agoRegenerated with PyDoc_STR() around docstrings.
Jack Jansen [Fri, 16 Aug 2002 09:09:31 +0000 (09:09 +0000)]
Regenerated with PyDoc_STR() around docstrings.

22 years agoiUse PyDoc_STR() around docstrings.
Jack Jansen [Fri, 16 Aug 2002 09:07:42 +0000 (09:07 +0000)]
iUse PyDoc_STR() around docstrings.

22 years agoA nice little speed-up for filter():
Guido van Rossum [Fri, 16 Aug 2002 07:04:56 +0000 (07:04 +0000)]
A nice little speed-up for filter():

- Use PyObject_Call() instead of PyEval_CallObject(), saves several
  layers of calls and checks.

- Pre-allocate the argument tuple rather than calling Py_BuildValue()
  each time round the loop.

- For filter(None, seq), avoid an INCREF and a DECREF.

22 years agoFix SF bug 595838 -- buffer in type_new() should not be static. Moved
Guido van Rossum [Fri, 16 Aug 2002 03:47:49 +0000 (03:47 +0000)]
Fix SF bug 595838 -- buffer in type_new() should not be static.  Moved
to inner scope, too.

22 years agoSF bug 594996: OverflowError in random.randrange
Tim Peters [Fri, 16 Aug 2002 03:41:39 +0000 (03:41 +0000)]
SF bug 594996:  OverflowError in random.randrange
Loosened the acceptable 'start' and 'stop' arguments so that any
Python (bounded) ints can be used.  So, e.g., randrange(-sys.maxint-1,
sys.maxint) no longer blows up.

22 years agoNewly-relaxed limits on random.randrange(). Also added some info about
Tim Peters [Fri, 16 Aug 2002 03:40:07 +0000 (03:40 +0000)]
Newly-relaxed limits on random.randrange().  Also added some info about
Karatsuba's better cache behavior with extremely large multiplicands.

22 years agoMention warnings about defining None.
Guido van Rossum [Fri, 16 Aug 2002 03:38:10 +0000 (03:38 +0000)]
Mention warnings about defining None.

22 years agoAdd warnings for arguments named None. All set. (I could add a
Guido van Rossum [Fri, 16 Aug 2002 02:48:11 +0000 (02:48 +0000)]
Add warnings for arguments named None.  All set.  (I could add a
warning for 'global None', but that's either accompanied by an
assignment to None, which will trigger a warning, or not, in which
case it's harmless. :-)

22 years agocheck_events(): This was failing under -O, due to not expecting any
Tim Peters [Fri, 16 Aug 2002 02:27:15 +0000 (02:27 +0000)]
check_events():  This was failing under -O, due to not expecting any
LINE events when not __debug__.  But we get them anyway under -O now,
so just stop special-casing non-__debug__ mode.

22 years agoAdd warning for None used as keyword argument name in function call.
Guido van Rossum [Fri, 16 Aug 2002 02:24:56 +0000 (02:24 +0000)]
Add warning for None used as keyword argument name in function call.
Still to do: function definition arguments (including *None and
**None).

22 years agoAdd warnings for assignment or deletion of variables and attributes
Guido van Rossum [Fri, 16 Aug 2002 02:13:49 +0000 (02:13 +0000)]
Add warnings for assignment or deletion of variables and attributes
named 'None'.  Still to do: function definition parameter lists, and
function call keyword arguments.

22 years agoMinor cleanup of parsename() and parsestr(): the 'struct compiling *'
Guido van Rossum [Fri, 16 Aug 2002 01:57:32 +0000 (01:57 +0000)]
Minor cleanup of parsename() and parsestr(): the 'struct compiling *'
argument should be called 'c', like everywhere else.  Renamed a
complex variable 'c' to 'z' and moved it inside the only scope where
it's used.

22 years agobase64.decodestring('') should return '' instead of raising an
Barry Warsaw [Thu, 15 Aug 2002 22:14:24 +0000 (22:14 +0000)]
base64.decodestring('') should return '' instead of raising an
exception.  The bug fix for SF #430849 wasn't quite right.  This
closes SF bug #595671.  I'll backport this to Python 2.2.

22 years agoFixed the bugs in the constant definitions, and in the code to test
Jack Jansen [Thu, 15 Aug 2002 22:05:58 +0000 (22:05 +0000)]
Fixed the bugs in the constant definitions, and in the code to test
them.
The FutureWarnings are still there, until a way has been found to
say "I know what I'm doing here when I say 0xff000000".

22 years agoAfter generating the Python file with definitions try to run it, so
Jack Jansen [Thu, 15 Aug 2002 21:48:16 +0000 (21:48 +0000)]
After generating the Python file with definitions try to run it, so
we catch errors during the build process in stead of later during runtime.

22 years agoTry to cater for a source tree checked out with MacCVS in stead of
Jack Jansen [Thu, 15 Aug 2002 21:31:18 +0000 (21:31 +0000)]
Try to cater for a source tree checked out with MacCVS in stead of
unix cvs. In this case the resource files are actual resource files
in stead of AppleSingle encoded files.

22 years agoIllustrating by example one good reason not to trust a proof <wink>.
Tim Peters [Thu, 15 Aug 2002 20:10:45 +0000 (20:10 +0000)]
Illustrating by example one good reason not to trust a proof <wink>.

22 years agok_mul() comments: In honor of Dijkstra, made the proof that "t3 fits"
Tim Peters [Thu, 15 Aug 2002 20:06:00 +0000 (20:06 +0000)]
k_mul() comments:  In honor of Dijkstra, made the proof that "t3 fits"
rigorous instead of hoping for testing not to turn up counterexamples.
Call me heretical, but despite that I'm wholly confident in the proof,
and have done it two different ways now, I still put more faith in
testing ...

22 years agolong_mul(): Simplified exit code. In particular, k_mul() returns a
Tim Peters [Thu, 15 Aug 2002 19:41:06 +0000 (19:41 +0000)]
long_mul():  Simplified exit code.  In particular, k_mul() returns a
normalized result, so no point to normalizing it again.  The number
of test+branches was also excessive.

22 years agoThis is my patch
Michael W. Hudson [Thu, 15 Aug 2002 14:59:02 +0000 (14:59 +0000)]
This is my patch

[ 587993 ] SET_LINENO killer

Remove SET_LINENO.  Tracing is now supported by inspecting co_lnotab.

Many sundry changes to document and adapt to this change.

22 years agoAdd notes about universal newlines.
Guido van Rossum [Thu, 15 Aug 2002 14:01:14 +0000 (14:01 +0000)]
Add notes about universal newlines.

22 years agoFix typo. It's --with-universal-newlines, not
Guido van Rossum [Thu, 15 Aug 2002 13:56:35 +0000 (13:56 +0000)]
Fix typo.  It's --with-universal-newlines, not
--with-universal-newline.

22 years agoSlight reordering of directories searched for BerkDB libs and include files.
Skip Montanaro [Thu, 15 Aug 2002 01:34:38 +0000 (01:34 +0000)]
Slight reordering of directories searched for BerkDB libs and include files.
Push /usr/... further down the list - always check /usr/local/... before
/usr/...

Doubt this will help with http://python.org/sf/589427 or not, but these
changes were prompted by my investigation of that bug report.  I wasn't able
to reproduce that problem though

22 years agoforgot the best part - the new tests...
Skip Montanaro [Thu, 15 Aug 2002 01:28:54 +0000 (01:28 +0000)]
forgot the best part - the new tests...
see patch 586561

22 years agoprovide less mysterious error messages when seeing end-of-line in
Skip Montanaro [Thu, 15 Aug 2002 01:20:16 +0000 (01:20 +0000)]
provide less mysterious error messages when seeing end-of-line in
single-quoted strings or end-of-file in triple-quoted strings.
closes patch 586561.

22 years agoAdd 'in' change
Andrew M. Kuchling [Thu, 15 Aug 2002 00:40:21 +0000 (00:40 +0000)]
Add 'in' change
Revise sentence
Add two reminders

22 years agoAdd news about Fred's change to Py_InitModule4().
Guido van Rossum [Wed, 14 Aug 2002 21:20:32 +0000 (21:20 +0000)]
Add news about Fred's change to Py_InitModule4().

22 years agoReflow long lines.
Jeremy Hylton [Wed, 14 Aug 2002 21:01:41 +0000 (21:01 +0000)]
Reflow long lines.

22 years agoPy_InitModule() and friends now accept NULL for the 'methods'
Fred Drake [Wed, 14 Aug 2002 20:59:38 +0000 (20:59 +0000)]
Py_InitModule() and friends now accept NULL for the 'methods'
argument.  This makes sense now that extension types can support
__init__ directly rather than requiring function constructors.

22 years agoPy_InitModule4(): Accept NULL for the 'methods' argument. This makes
Fred Drake [Wed, 14 Aug 2002 20:57:56 +0000 (20:57 +0000)]
Py_InitModule4():  Accept NULL for the 'methods' argument.  This makes
sense now that extension types can support __init__ directly rather
than requiring function constructors.

22 years agoDocstring nits: The module is neither proposed nor new.
Jeremy Hylton [Wed, 14 Aug 2002 19:25:42 +0000 (19:25 +0000)]
Docstring nits: The module is neither proposed nor new.

22 years agoAdded Hisao Suzuki.
Martin v. Löwis [Wed, 14 Aug 2002 18:52:54 +0000 (18:52 +0000)]
Added Hisao Suzuki.

22 years agoMore changes of DeprecationWarning to FutureWarning.
Guido van Rossum [Wed, 14 Aug 2002 18:38:27 +0000 (18:38 +0000)]
More changes of DeprecationWarning to FutureWarning.

22 years agoExplain use of currentThread() in _Condition methods.
Jeremy Hylton [Wed, 14 Aug 2002 17:56:13 +0000 (17:56 +0000)]
Explain use of currentThread() in _Condition methods.

22 years agoThe filterwarnings() call here should be updated to filter out
Guido van Rossum [Wed, 14 Aug 2002 17:54:48 +0000 (17:54 +0000)]
The filterwarnings() call here should be updated to filter out
FutureWarning.

22 years agoExplain a little more.
Jeremy Hylton [Wed, 14 Aug 2002 17:46:40 +0000 (17:46 +0000)]
Explain a little more.

22 years agoExplain a minor mystery.
Jeremy Hylton [Wed, 14 Aug 2002 17:43:59 +0000 (17:43 +0000)]
Explain a minor mystery.