]> granicus.if.org Git - python/log
python
24 years agoFixed -D emulation for symbols with a value, as specified with the define_macros...
Just van Rossum [Tue, 19 Jun 2001 19:44:02 +0000 (19:44 +0000)]
Fixed -D emulation for symbols with a value, as specified with the define_macros Extension argument.

24 years agoA unittest-based test for the quopri module.
Barry Warsaw [Tue, 19 Jun 2001 19:08:13 +0000 (19:08 +0000)]
A unittest-based test for the quopri module.

24 years agoBetter support for RFC 1521 quoted-printable specification, along with
Barry Warsaw [Tue, 19 Jun 2001 19:07:46 +0000 (19:07 +0000)]
Better support for RFC 1521 quoted-printable specification, along with
addition of interface for consistency with base64 module.  Namely,

encodestring(), decodestring(): New functions which accept a string
object and return a string object.  They just wrap the string in
StringIOs and pass them to the encode() and decode() methods
respectively.  encodestring() accepts a default argument of quotetabs,
defaulting to zero, which is passed on straight through to encode().

encode(): Fix the bug where an extra newline would always be added to
the output, which prevented an idempotent roundtrip through
encode->decode.  Now, if the source string doesn't end in a newline,
then the result string won't end in a newline.

Also, extend the quotetabs argument semantics to include quoting
embedded strings, which is also optional according to the RFC.

test() -> main()

"from quopri import *" also imports encodestring() and decodestring().

24 years ago(python-font-lock-keywords): Add "yield" as a keyword to support the
Barry Warsaw [Tue, 19 Jun 2001 18:24:42 +0000 (18:24 +0000)]
(python-font-lock-keywords): Add "yield" as a keyword to support the
new "simple generators" feature of 2.2.  See PEP 255.

24 years agoAdded a MACHDEP_OBJS to the python link. Use this on MacOSX to include
Neil Schemenauer [Tue, 19 Jun 2001 15:44:15 +0000 (15:44 +0000)]
Added a MACHDEP_OBJS to the python link. Use this on MacOSX to include
Mac/macglue.c into the core interpreter. This file contains the glue code that
allows extension modules for Mac toolboxes to live in different shared libraries
but still communicate with each other. The glue code is controlled by the
USE_MAC_TOOLBOX_GLUE define. [checked in for Jack]

24 years agoAdded a MACHDEP_OBJS to the python link. Use this on MacOSX to include
Jack Jansen [Tue, 19 Jun 2001 15:00:23 +0000 (15:00 +0000)]
Added a MACHDEP_OBJS to the python link. Use this on MacOSX to include
Mac/macglue.c into the core interpreter. This file contains the glue code that
allows extension modules for Mac toolboxes to live in different shared libraries
but still communicate with each other. The glue code is controlled by the
USE_MAC_TOOLBOX_GLUE define.

24 years agoTaught IDLE's autoident parser that "yield" is a keyword that begins a
Tim Peters [Tue, 19 Jun 2001 00:28:47 +0000 (00:28 +0000)]
Taught IDLE's autoident parser that "yield" is a keyword that begins a
stmt.  Along w/ the preceding change to keyword.py, making all this work
w/ a future-stmt just looks harder and harder.

24 years agoUpdated keyword.py for "yield".
Tim Peters [Tue, 19 Jun 2001 00:26:25 +0000 (00:26 +0000)]
Updated keyword.py for "yield".

24 years agoSomebody checked this in w/ an ambiguous tab/space mix (reported by
Tim Peters [Mon, 18 Jun 2001 23:56:36 +0000 (23:56 +0000)]
Somebody checked this in w/ an ambiguous tab/space mix (reported by
Mark Favas).

24 years ago(py-continuation-offset): New variable which controls how much to
Barry Warsaw [Mon, 18 Jun 2001 23:40:35 +0000 (23:40 +0000)]
(py-continuation-offset): New variable which controls how much to
indent continuation lines, defined as lines following those that end
in backslash.

(py-compute-indentation): Support for py-continuation-offset.

24 years agoAdded "i" and "l" to the list of std-mode struct codes that don't range-
Tim Peters [Mon, 18 Jun 2001 22:27:39 +0000 (22:27 +0000)]
Added "i" and "l" to the list of std-mode struct codes that don't range-
check correctly on pack().  While these were checking OK on my 32-bit box,
Mark Favas reported failures on a 64-bit box (alas, easy to believe).

24 years agoMerging the gen-branch into the main line, at Guido's direction. Yay!
Tim Peters [Mon, 18 Jun 2001 22:08:13 +0000 (22:08 +0000)]
Merging the gen-branch into the main line, at Guido's direction.  Yay!
Bugfix candidate in inspect.py:  it was referencing "self" outside of
a method.

24 years agoSF bug 434186: 0x80000000/2 != 0x80000000>>1
Tim Peters [Mon, 18 Jun 2001 19:21:11 +0000 (19:21 +0000)]
SF bug 434186: 0x80000000/2 != 0x80000000>>1
i_divmod:  New and simpler algorithm.  Old one returned gibberish on most
boxes when the numerator was -sys.maxint-1.  Oddly enough, it worked in the
release (not debug) build on Windows, because the compiler optimized away
some tricky sign manipulations that were incorrect in this case.
Makes you wonder <wink> ...
Bugfix candidate.

24 years ago[Bug #433047, reported by Armin Rigo] Remove extra 'i' character in
Andrew M. Kuchling [Mon, 18 Jun 2001 19:04:04 +0000 (19:04 +0000)]
[Bug #433047, reported by Armin Rigo] Remove extra 'i' character in
    PyArg_ParseTuple() call.

(2.1.1 bugfix candidate.)

24 years agoAdd some information on the use of \verbatiminput to display sources from
Fred Drake [Mon, 18 Jun 2001 14:59:58 +0000 (14:59 +0000)]
Add some information on the use of \verbatiminput to display sources from
an external file.

24 years agoFix SF bug #433904 (Alex Martelli) - all s_* methods return None only.
Guido van Rossum [Mon, 18 Jun 2001 12:33:36 +0000 (12:33 +0000)]
Fix SF bug #433904 (Alex Martelli) - all s_* methods return None only.

24 years agoPatch #413171: Implement get, setdefault, update in terms of
Martin v. Löwis [Mon, 18 Jun 2001 01:09:41 +0000 (01:09 +0000)]
Patch #413171: Implement get, setdefault, update in terms of
has_key, __getitem__, and __setitem__.

24 years agoClarification in the fp appendix suggested on c.l.py by Michael Chermside.
Tim Peters [Sun, 17 Jun 2001 21:57:17 +0000 (21:57 +0000)]
Clarification in the fp appendix suggested on c.l.py by Michael Chermside.
Also replaced a *star* style emphasis in the Representation Error section
with an \emph{} thingie.

24 years agoFix for bug [ #433047 ] missing args to PyArg_ParseTuple
Marc-André Lemburg [Sun, 17 Jun 2001 18:32:36 +0000 (18:32 +0000)]
Fix for bug [ #433047 ] missing args to PyArg_ParseTuple

24 years agoSF patch #433619, by Michel Pelletier:
Guido van Rossum [Sun, 17 Jun 2001 13:31:25 +0000 (13:31 +0000)]
SF patch #433619, by Michel Pelletier:

Summary: NAMESPACE support in imaplib.py

Initial Comment:
Support for the IMAP NAMESPACE extension defined in rfc
2342.  This is almost a necessity for working with
modern IMAP servers.

24 years agoSynchronize with 1.13 of PyXML:
Martin v. Löwis [Sun, 17 Jun 2001 07:05:43 +0000 (07:05 +0000)]
Synchronize with 1.13 of PyXML:
Allow application to set a new content handler and lex_prop handler during
parsing. Closes bug #433761.
Small hack to make expat be ignored in Jython.

24 years agoInstead of initializing & interning the strings passed to the profile
Fred Drake [Sat, 16 Jun 2001 21:02:31 +0000 (21:02 +0000)]
Instead of initializing & interning the strings passed to the profile
and trace functions lazily, which incurs extra argument pushing and checks
in the C overhead for profiling/tracing, create the strings semi-lazily
when the Python code first registers a profile or trace function.  This
simplifies the trampoline into the profile/trace functions.

24 years agoPyLong_{As, From}VoidPtr: cleanup, replacing assumptions in comments with
Tim Peters [Sat, 16 Jun 2001 08:48:40 +0000 (08:48 +0000)]
PyLong_{As, From}VoidPtr:  cleanup, replacing assumptions in comments with
#if/#error constructs.

24 years agoDocument that filter is added in 2.2.
Martin v. Löwis [Sat, 16 Jun 2001 08:14:04 +0000 (08:14 +0000)]
Document that filter is added in 2.2.

24 years agoFix error in comment, and in test_long_api and test_longlong_api remove
Tim Peters [Sat, 16 Jun 2001 08:10:13 +0000 (08:10 +0000)]
Fix error in comment, and in test_long_api and test_longlong_api remove
the need for the F_ERROR macro.

24 years agodict_repr: Reuse one of the int vars (minor code simplification).
Tim Peters [Sat, 16 Jun 2001 07:52:53 +0000 (07:52 +0000)]
dict_repr:  Reuse one of the int vars (minor code simplification).

24 years agoReformat decl of new _PyString_Join. Add NEWS blurb about repr() speedup.
Tim Peters [Sat, 16 Jun 2001 05:42:57 +0000 (05:42 +0000)]
Reformat decl of new _PyString_Join.  Add NEWS blurb about repr() speedup.

24 years agoSF bug 433228: repr(list) woes when len(list) big.
Tim Peters [Sat, 16 Jun 2001 05:11:17 +0000 (05:11 +0000)]
SF bug 433228: repr(list) woes when len(list) big.
Gave Python linear-time repr() implementations for dicts, lists, strings.
This means, e.g., that repr(range(50000)) is no longer 50x slower than
pprint.pprint() in 2.2 <wink>.

I don't consider this a bugfix candidate, as it's a performance boost.

Added _PyString_Join() to the internal string API.  If we want that in the
public API, fine, but then it requires runtime error checks instead of
asserts.

24 years agoSF bug 433228: repr(list) woes when len(list) big
Tim Peters [Sat, 16 Jun 2001 00:09:28 +0000 (00:09 +0000)]
SF bug 433228:  repr(list) woes when len(list) big
call_object:  If the object isn't callable, display its type in the error
msg rather than its repr.
Bugfix candidate.

24 years agoImplement the \verbatiminput LaTeX macro; this contains more magic than
Fred Drake [Fri, 15 Jun 2001 21:31:57 +0000 (21:31 +0000)]
Implement the \verbatiminput LaTeX macro; this contains more magic than
it should, but only enough that LaTeX2HTML doesn't bite us.

24 years agoAdd a version annotation for the Q and q format codes.
Fred Drake [Fri, 15 Jun 2001 14:13:07 +0000 (14:13 +0000)]
Add a version annotation for the Q and q format codes.

24 years agoForward-port revision 2.24.2.4 from the release21-maint branch:
Thomas Wouters [Fri, 15 Jun 2001 12:05:44 +0000 (12:05 +0000)]
Forward-port revision 2.24.2.4 from the release21-maint branch:

Protect several more uses of constants with #ifdefs; these are necessary on
(at least) SCO OpenServer 5. Fixes a non-SF-submitted bugreport by Michael
Kent.

24 years agoNote that 2.0.1 is also a PSF release. (Gregor Hoffleit, SF #433223.)
Guido van Rossum [Thu, 14 Jun 2001 19:36:59 +0000 (19:36 +0000)]
Note that 2.0.1 is also a PSF release.  (Gregor Hoffleit, SF #433223.)

24 years agoChange IS_LITTLE_ENDIAN macro -- a little faster now.
Tim Peters [Thu, 14 Jun 2001 18:42:50 +0000 (18:42 +0000)]
Change IS_LITTLE_ENDIAN macro -- a little faster now.

24 years agoFix a mis-indentation in _PyUnicode_New() that caused me to stare at
Guido van Rossum [Thu, 14 Jun 2001 17:52:02 +0000 (17:52 +0000)]
Fix a mis-indentation in _PyUnicode_New() that caused me to stare at
some code for longer than needed.

24 years agoFix an improperly placed comma.
Fred Drake [Thu, 14 Jun 2001 13:57:16 +0000 (13:57 +0000)]
Fix an improperly placed comma.

24 years ago_PyLong_AsByteArray: simplify the logic for dealing with the most-
Tim Peters [Thu, 14 Jun 2001 08:53:38 +0000 (08:53 +0000)]
_PyLong_AsByteArray:  simplify the logic for dealing with the most-
significant digits sign bits.  Again no change in semantics.

24 years agoPyLong_From{Unsigned,}Long: count the # of digits first, so no more space
Tim Peters [Thu, 14 Jun 2001 04:56:19 +0000 (04:56 +0000)]
PyLong_From{Unsigned,}Long:  count the # of digits first, so no more space
is allocated than needed (used to allocate 80 bytes of digit space no
matter how small the long input).  This also runs faster, at least on 32-
bit boxes.

24 years agoFixed typo in comment.
Tim Peters [Thu, 14 Jun 2001 01:11:03 +0000 (01:11 +0000)]
Fixed typo in comment.

24 years agoAdd tests of PyLong_{As,From}{Unsigned,}Long. These are very much like
Tim Peters [Thu, 14 Jun 2001 00:55:41 +0000 (00:55 +0000)]
Add tests of PyLong_{As,From}{Unsigned,}Long.  These are very much like
the new PyLong_{As,From}{Unsigned,}LongLong tests, so the bulk of the
code is in the new #include file testcapi_long.h, which generates
different code depending on how macros are set.  This sucks, but I couldn't
think of anything that sucked less.

UNIX headache?  If we still maintain dependencies by hand, someone who
knows what they're doing should teach whatever needs it that
_testcapimodule.c includes testcapi_long.h.

24 years agoGeneralize the new qQ std-mode tests to all int codes (bBhHiIlLqQ).
Tim Peters [Wed, 13 Jun 2001 22:45:27 +0000 (22:45 +0000)]
Generalize the new qQ std-mode tests to all int codes (bBhHiIlLqQ).
Unfortunately, the std-mode bBhHIL codes don't do any range-checking; if
and when some of those get fixed, remove their letters from the
IntTester.BUGGY_RANGE_CHECK string.  In the meantime, a msg saying that
range-tests are getting skipped is printed to stdout whenever one is
skipped.

24 years ago_PyLong_FromByteArray: changed decl of "carry" to match "thisbyte". No
Tim Peters [Wed, 13 Jun 2001 21:09:15 +0000 (21:09 +0000)]
_PyLong_FromByteArray:  changed decl of "carry" to match "thisbyte".  No
semantic change, but a bit clearer and may help a really stupid compiler
avoid pointless runtime length conversions.

24 years ago_PyLong_AsByteArray: Don't do the "delicate overflow" check unless it's
Tim Peters [Wed, 13 Jun 2001 21:01:27 +0000 (21:01 +0000)]
_PyLong_AsByteArray:  Don't do the "delicate overflow" check unless it's
truly needed; usually saves a little time, but no change in semantics.

24 years ago_PyLong_AsByteArray: added assert that the input is normalized. This is
Tim Peters [Wed, 13 Jun 2001 20:50:08 +0000 (20:50 +0000)]
_PyLong_AsByteArray:  added assert that the input is normalized.  This is
outside the function's control, but is crucial to correct operation.

24 years agoPyLong_As{Unsigned,}LongLong: fiddled final result casting.
Tim Peters [Wed, 13 Jun 2001 20:45:17 +0000 (20:45 +0000)]
PyLong_As{Unsigned,}LongLong:  fiddled final result casting.

24 years agoRecord Windows buildno for 2.0.1c1.
Tim Peters [Wed, 13 Jun 2001 19:17:32 +0000 (19:17 +0000)]
Record Windows buildno for 2.0.1c1.

24 years agoTemporarily disable the message to stderr. Jeremy will know what to do
Marc-André Lemburg [Wed, 13 Jun 2001 17:18:06 +0000 (17:18 +0000)]
Temporarily disable the message to stderr. Jeremy will know what to do
about this...

24 years agoGot rid of mactoolboxglue.c
Jack Jansen [Wed, 13 Jun 2001 12:41:25 +0000 (12:41 +0000)]
Got rid of mactoolboxglue.c

24 years agoFixed an error in the signature of the QdRGB converter routines.
Jack Jansen [Wed, 13 Jun 2001 12:39:02 +0000 (12:39 +0000)]
Fixed an error in the signature of the QdRGB converter routines.

24 years agoThe new {b,l}p_{u,}longlong() didn't check get_pylong()'s return for NULL.
Tim Peters [Wed, 13 Jun 2001 01:26:35 +0000 (01:26 +0000)]
The new {b,l}p_{u,}longlong() didn't check get_pylong()'s return for NULL.
Repaired that, and added appropriate tests for it to test_struct.py.

24 years agolongobject.c:
Tim Peters [Wed, 13 Jun 2001 00:35:57 +0000 (00:35 +0000)]
longobject.c:
    Replaced PyLong_{As,From}{Unsigned,}LongLong guts with calls
    to _PyLong_{As,From}ByteArray.
_testcapimodule.c:
    Added strong tests of PyLong_{As,From}{Unsigned,}LongLong.

Fixes SF bug #432552 PyLong_AsLongLong() problems.
Possible bugfix candidate, but the fix relies on code added to longobject
to support the new q/Q structmodule format codes.

24 years agoThe merest start of a test for the PyLong_{As,From}{Unsigned,}LongLong()
Tim Peters [Tue, 12 Jun 2001 20:10:01 +0000 (20:10 +0000)]
The merest start of a test for the PyLong_{As,From}{Unsigned,}LongLong()
functions.  I intend to replace their guts with calls to the new
_PyLong_{As,From}ByteArray() functions, but AFAICT there's no tests for
them at all now; I also suspect PyLong_AsLongLong() isn't catching all
overflow cases, but without a std test to demonstrate that why should you
believe me <wink>.

Also added a raiseTestError() utility function.

24 years ago_PyLong_{As,From}ByteArray: Minor code rearrangement aimed at improving
Tim Peters [Tue, 12 Jun 2001 19:17:03 +0000 (19:17 +0000)]
_PyLong_{As,From}ByteArray:  Minor code rearrangement aimed at improving
clarity.  Should have no effect visible to callers.

24 years agoAdd new built-in 'help' which invokes pydoc.help (with a twist).
Guido van Rossum [Tue, 12 Jun 2001 16:48:52 +0000 (16:48 +0000)]
Add new built-in 'help' which invokes pydoc.help (with a twist).

24 years agoRemoved the Python version from the PYTHONHOMEHELP string. It was
Marc-André Lemburg [Tue, 12 Jun 2001 16:13:51 +0000 (16:13 +0000)]
Removed the Python version from the PYTHONHOMEHELP string. It was
still set to python2.0 ...

24 years agoMake the option processing more robust.
Fred Drake [Tue, 12 Jun 2001 13:31:37 +0000 (13:31 +0000)]
Make the option processing more robust.
Add a -F option similar to "cvs commit -F <file>".
Add a -t option to allow specifying the prefix to the directory into which
the docs should be unpacked (useful when I start trying out new styles for
the presentation).

24 years agoFix for bug #432384: Recursion in PyString_AsEncodedString?
Marc-André Lemburg [Tue, 12 Jun 2001 13:14:10 +0000 (13:14 +0000)]
Fix for bug #432384: Recursion in PyString_AsEncodedString?

24 years agoFixed reference to table notes for {}.keys() and {}.items() -- these
Fred Drake [Tue, 12 Jun 2001 03:31:56 +0000 (03:31 +0000)]
Fixed reference to table notes for {}.keys() and {}.items() -- these
references did not get updated when the notes were renumbered in a
previous update.

This fixes SF bug #432208.

24 years agoAdded q/Q standard (x-platform 8-byte ints) mode in struct module.
Tim Peters [Tue, 12 Jun 2001 01:22:22 +0000 (01:22 +0000)]
Added q/Q standard (x-platform 8-byte ints) mode in struct module.
This completes the q/Q project.

longobject.c _PyLong_AsByteArray:  The original code had a gross bug:
the most-significant Python digit doesn't necessarily have SHIFT
significant bits, and you really need to count how many copies of the sign
bit it has else spurious overflow errors result.

test_struct.py:  This now does exhaustive std q/Q testing at, and on both
sides of, all relevant power-of-2 boundaries, both positive and negative.

NEWS:  Added brief dict news while I was at it.

24 years agoMake copy, cut and paste events case insensitive. Reported by Patrick
Guido van Rossum [Tue, 12 Jun 2001 00:30:33 +0000 (00:30 +0000)]
Make copy, cut and paste events case insensitive.  Reported by Patrick
K. O'Brien on idle-dev.

(Should other bindings follow suit?)

24 years agoTwo new private longobject API functions,
Tim Peters [Mon, 11 Jun 2001 21:23:58 +0000 (21:23 +0000)]
Two new private longobject API functions,
    _PyLong_FromByteArray
    _PyLong_AsByteArray
Untested and probably buggy -- they compile OK, but nothing calls them
yet.  Will soon be called by the struct module, to implement x-platform
'q' and 'Q'.
If other people have uses for them, we could move them into the public API.
See longobject.h for usage details.

24 years agoAdd the appropriate availability annotations for the popen*() family of
Fred Drake [Mon, 11 Jun 2001 18:25:34 +0000 (18:25 +0000)]
Add the appropriate availability annotations for the popen*() family of
functions -- these are not available on traditional Mac OS platforms.

Corrected the version annotations for the spawn*() functions and related
constants; these were added in Python 1.6, not 1.5.2.

24 years agoTrimmed trailing whitespace.
Tim Peters [Mon, 11 Jun 2001 16:57:33 +0000 (16:57 +0000)]
Trimmed trailing whitespace.

24 years agoSimplify some convolution by simply not recognizing 'q' and 'Q' at all
Tim Peters [Mon, 11 Jun 2001 16:51:56 +0000 (16:51 +0000)]
Simplify some convolution by simply not recognizing 'q' and 'Q' at all
in native mode on platforms that don't HAVE_LONG_LONG.

24 years agoMake clear in the docstring that "std" applies to both size and alignment,
Tim Peters [Mon, 11 Jun 2001 16:45:33 +0000 (16:45 +0000)]
Make clear in the docstring that "std" applies to both size and alignment,
not just to alignment.  Spotted by Guido.

Bugfix candidate.

24 years agoProtect the use of the VWERASE symbol by an #ifdef, it's apparently missing
Thomas Wouters [Mon, 11 Jun 2001 15:25:16 +0000 (15:25 +0000)]
Protect the use of the VWERASE symbol by an #ifdef, it's apparently missing
on (some versions of ?) AIX.

24 years agoFixed parameter order for os.popen2(), os.popen3(), and os.popen(4). Added
Fred Drake [Mon, 11 Jun 2001 15:21:48 +0000 (15:21 +0000)]
Fixed parameter order for os.popen2(), os.popen3(), and os.popen(4).  Added
a reference to these functions and popen() from the "Process Management"
section.

Based on a suggestion from comp.lang.python.

24 years agoFix recent changes so that this section will format again.
Fred Drake [Mon, 11 Jun 2001 14:55:01 +0000 (14:55 +0000)]
Fix recent changes so that this section will format again.

24 years agoRenamed some stuff to tell the truth about what it does.
Tim Peters [Sun, 10 Jun 2001 23:52:59 +0000 (23:52 +0000)]
Renamed some stuff to tell the truth about what it does.

24 years agoInitial support for 'q' and 'Q' struct format codes: for now, only in
Tim Peters [Sun, 10 Jun 2001 23:40:19 +0000 (23:40 +0000)]
Initial support for 'q' and 'Q' struct format codes:  for now, only in
native mode, and only when config #defines HAVE_LONG_LONG.  Standard mode
will eventually treat them as 8-byte ints across all platforms, but that
likely requires a new set of routines in longobject.c first (while
sizeof(long) >= 4 is guaranteed by C, there's nothing in C we can rely
on x-platform to hold 8 bytes of int, so we'll have to roll our own;
I'm thinking of a simple pair of conversion functions, Python long
to/from sized vector of unsigned bytes; that may be useful for GMP
conversions too; std q/Q would call them with size fixed at 8).

test_struct.py:  In addition to adding some native-mode 'q' and 'Q' tests,
got rid of unused code, and repaired a non-portable assumption about
native sizeof(short) (it isn't 2 on some Cray boxes).

libstruct.tex:  In addition to adding a bit of 'q'/'Q' docs (more needed
later), removed an erroneous footnote about 'I' behavior.

24 years agoAdded a missing cast to the hashfunc initializer.
Jack Jansen [Sun, 10 Jun 2001 21:43:28 +0000 (21:43 +0000)]
Added a missing cast to the hashfunc initializer.

24 years agoSF bug 431772: traceback.print_exc() causes traceback
Tim Peters [Sun, 10 Jun 2001 18:58:26 +0000 (18:58 +0000)]
SF bug 431772:  traceback.print_exc() causes traceback
Patch from Michael Hundson.
format_exception_only() blew up when trying to report a SyntaxError
from a string input (line is None in this case, but it assumed a string).
Bugfix candidate.

24 years agoannoying whitespace inconsistency
Peter Schneider-Kamp [Sun, 10 Jun 2001 16:45:08 +0000 (16:45 +0000)]
annoying whitespace inconsistency

24 years agoSF bug 430991: wrong co_lnotab
Tim Peters [Sat, 9 Jun 2001 09:26:21 +0000 (09:26 +0000)]
SF bug 430991: wrong co_lnotab
Armin Rigo pointed out that the way the line-# table got built didn't work
for lines generating more than 255 bytes of bytecode.  Fixed as he
suggested, plus corresponding changes to pyassem.py, plus added some
long overdue docs about this subtle table to compile.c.

Bugfix candidate (line numbers may be off in tracebacks under -O).

24 years agoCast the result of xxxPyCObject_Import to PycStringIO_CAPI*.
Martin v. Löwis [Sat, 9 Jun 2001 07:59:43 +0000 (07:59 +0000)]
Cast the result of xxxPyCObject_Import to PycStringIO_CAPI*.
This fixes bug #431557.

24 years agoPatch #424475: Speed-up tp_compare usage, by special-casing the common
Martin v. Löwis [Sat, 9 Jun 2001 07:34:05 +0000 (07:34 +0000)]
Patch #424475: Speed-up tp_compare usage, by special-casing the common
case of objects with equal types which support tp_compare. Give
type objects a tp_compare function.
Also add c<0 tests before a few PyErr_Occurred tests.

24 years agoFix the attributions for the new floating point text.
Fred Drake [Fri, 8 Jun 2001 17:09:01 +0000 (17:09 +0000)]
Fix the attributions for the new floating point text.

24 years agoAdded credits in the right places.
Fred Drake [Fri, 8 Jun 2001 16:28:53 +0000 (16:28 +0000)]
Added credits in the right places.

24 years agoText from Tim & Guido discussing floating point arithmetic and what users
Fred Drake [Fri, 8 Jun 2001 16:24:58 +0000 (16:24 +0000)]
Text from Tim & Guido discussing floating point arithmetic and what users
need to understand about the binary & decimal fp, so that representation
weirdness is documented somewhere.  This makes it easier to repond to "bug"
reports caused by user confusion & ignorance of the issues.

This closes SF patch #426208.

24 years agoadd warning about situation where code may be executed twice, once when
Skip Montanaro [Fri, 8 Jun 2001 14:40:28 +0000 (14:40 +0000)]
add warning about situation where code may be executed twice, once when
module is __main__ and once when module is imported.

24 years agoIn the section on extending the profiler, add some additional discussion
Fred Drake [Fri, 8 Jun 2001 05:04:19 +0000 (05:04 +0000)]
In the section on extending the profiler, add some additional discussion
about setting up the dispatch table, and update the OldProfile and
HotProfile classes to the current implementations, showing the adjusted
construction for the dispatch table.

24 years agocall_trace(): Add an additional parameter -- pointer to a PyObject*
Fred Drake [Fri, 8 Jun 2001 04:33:09 +0000 (04:33 +0000)]
call_trace():  Add an additional parameter -- pointer to a PyObject*
    that should be used to cache an interned version of the event
    string passed to the profile/trace function.  call_trace() will
    create interned strings and cache them in using the storage
    specified by this additional parameter, avoiding a lot of string
    object creation at runtime when using the profiling or tracing
    functions.

All call sites are modified to pass the additional parameter, and four
static PyObject* variables are allocated to cache the interned string
objects.

This closes SF patch #431257.

24 years agoPerformance improvements to the profiler:
Fred Drake [Fri, 8 Jun 2001 04:25:24 +0000 (04:25 +0000)]
Performance improvements to the profiler:

Ensure that all the default timers are called as functions, not an
expensive method wrapper around a variety of different functions.

Agressively avoid dictionary lookups.

Modify the dispatch scheme (Profile.trace_dispatch_*(), where * is not
'call', 'exception' or 'return') so that the callables dispatched to
are simple functions and not bound methods -- this reduces the number
of layers of Python call machinery that gets touched.

Remove a couple of duplicate imports from the "if __name__ == ..."
section.

This closes SF patch #430948.

24 years agoPatch #429957: Add support for cp1140, which is identical to cp037,
Martin v. Löwis [Thu, 7 Jun 2001 19:39:25 +0000 (19:39 +0000)]
Patch #429957: Add support for cp1140, which is identical to cp037,
with the addition of the euro character.
Also added a few EDBDIC aliases.

24 years agoDocument filter.
Martin v. Löwis [Thu, 7 Jun 2001 19:01:24 +0000 (19:01 +0000)]
Document filter.

24 years agocheck in for patch #430846
Peter Schneider-Kamp [Thu, 7 Jun 2001 18:56:13 +0000 (18:56 +0000)]
check in for patch #430846

use faster code for base64.encodestring (courtesy of Mr. Tim Peters)
and for base64.decodestring (courtesy of Anthony Baxter)

24 years agoPatch #430754: Makes ftpmirror.py .netrc aware
Martin v. Löwis [Thu, 7 Jun 2001 17:17:00 +0000 (17:17 +0000)]
Patch #430754: Makes ftpmirror.py .netrc aware

24 years agoFixes [ #430986 ] Buglet in PyUnicode_FromUnicode.
Marc-André Lemburg [Thu, 7 Jun 2001 12:26:56 +0000 (12:26 +0000)]
Fixes [ #430986 ] Buglet in PyUnicode_FromUnicode.

24 years agoPrevious check-in was by mistake, undo it.
Martin v. Löwis [Thu, 7 Jun 2001 05:52:17 +0000 (05:52 +0000)]
Previous check-in was by mistake, undo it.

24 years agoThis closes bug #430849 (internal error produced by binascii.a2b_base64)
Peter Schneider-Kamp [Thu, 7 Jun 2001 05:51:36 +0000 (05:51 +0000)]
This closes bug #430849 (internal error produced by binascii.a2b_base64)

24 years agoPatch #416220: Fix misplaced paren.
Martin v. Löwis [Thu, 7 Jun 2001 05:49:05 +0000 (05:49 +0000)]
Patch #416220: Fix misplaced paren.

24 years agoAcknowledge the existence of the 'platform' file, generated by the
Guido van Rossum [Wed, 6 Jun 2001 17:51:57 +0000 (17:51 +0000)]
Acknowledge the existence of the 'platform' file, generated by the
Makefile and used by the setup.py script.  Ignore it in .cvsignore;
remove it in "make clobber".

24 years agoTypo: "descrition" --> "description"
Fred Drake [Wed, 6 Jun 2001 16:02:47 +0000 (16:02 +0000)]
Typo:  "descrition" --> "description"

Add reference to the documentation for the Python documentation markup.

Fixed up a couple of descriptions.

This closes SF bug #430627.

24 years agoAdd references to the documentation for the Python documentation markup.
Fred Drake [Wed, 6 Jun 2001 15:59:04 +0000 (15:59 +0000)]
Add references to the documentation for the Python documentation markup.
Suggested by the comments in SF bug #430627.

24 years agoAdded quopri codec.
Guido van Rossum [Wed, 6 Jun 2001 13:30:54 +0000 (13:30 +0000)]
Added quopri codec.

24 years agoReport on fnmatch.filter.
Martin v. Löwis [Wed, 6 Jun 2001 06:25:40 +0000 (06:25 +0000)]
Report on fnmatch.filter.

24 years agoPatch #409973: Speedup glob.glob, add fnmatch.filter.
Martin v. Löwis [Wed, 6 Jun 2001 06:24:38 +0000 (06:24 +0000)]
Patch #409973: Speedup glob.glob, add fnmatch.filter.

24 years agoWrap with extern "C". Fixes bug #428419.
Martin v. Löwis [Tue, 5 Jun 2001 05:58:44 +0000 (05:58 +0000)]
Wrap with extern "C". Fixes bug #428419.
Also protect against multiple inclusion.

24 years agoFix bug #422702: Make flag argument to open optional, and document it that way.
Martin v. Löwis [Tue, 5 Jun 2001 05:33:19 +0000 (05:33 +0000)]
Fix bug #422702: Make flag argument to open optional, and document it that way.

24 years agoAdd .pyo as an extension, fixes bug #416462. Also restore alphabetic order.
Martin v. Löwis [Tue, 5 Jun 2001 05:17:00 +0000 (05:17 +0000)]
Add .pyo as an extension, fixes bug #416462. Also restore alphabetic order.