]> granicus.if.org Git - python/log
python
24 years agoFix a very minor (but annoying when looking for things!) markup nit.
Fred Drake [Sat, 23 Jun 2001 05:27:20 +0000 (05:27 +0000)]
Fix a very minor (but annoying when looking for things!) markup nit.

24 years agoPyFrameObject: rename f_stackbottom to f_stacktop, since it points to
Tim Peters [Sat, 23 Jun 2001 05:26:56 +0000 (05:26 +0000)]
PyFrameObject:  rename f_stackbottom to f_stacktop, since it points to
the next free valuestack slot, not to the base (in America, stacks push
and pop at the top -- they mutate at the bottom in Australia <winK>).
eval_frame():  assert that f_stacktop isn't NULL upon entry.
frame_delloc():  avoid ordered pointer comparisons involving f_stacktop
when f_stacktop is NULL.

24 years agoAdd "yeild" to the list of keywords.
Fred Drake [Sat, 23 Jun 2001 05:26:52 +0000 (05:26 +0000)]
Add "yeild" to the list of keywords.

Fix a very minor (but annoying when looking for things!) markup nit.

24 years agoConsistently use semi-colons after the last property for each selector.
Fred Drake [Sat, 23 Jun 2001 04:53:43 +0000 (04:53 +0000)]
Consistently use semi-colons after the last property for each selector.

24 years agoGive the pattern used to pick out a source anchor a more specific pattern.
Fred Drake [Sat, 23 Jun 2001 04:35:09 +0000 (04:35 +0000)]
Give the pattern used to pick out a source anchor a more specific pattern.

24 years agoAdded several names.
Fred Drake [Sat, 23 Jun 2001 03:17:02 +0000 (03:17 +0000)]
Added several names.

24 years agoContributed updates from Harald Hanche-Olsen, giving details of the branch
Fred Drake [Sat, 23 Jun 2001 03:16:29 +0000 (03:16 +0000)]
Contributed updates from Harald Hanche-Olsen, giving details of the branch
cuts for the complex math functions.  Includes a brief description of
what branch cuts are.

24 years agoAdded support for our new \infinity and \plusminus macros, and the
Fred Drake [Sat, 23 Jun 2001 03:13:30 +0000 (03:13 +0000)]
Added support for our new \infinity and \plusminus macros, and the
standard \textbar macro (not supported in many versions of LaTeX2HTML).

Added newline to error message.

24 years ago\infinity,
Fred Drake [Sat, 23 Jun 2001 03:11:45 +0000 (03:11 +0000)]
\infinity,
\plusminus:  New macros to allow us to avoid math mode for these symbols.

24 years agoMiscellaneous code cleanups.
Fred Drake [Sat, 23 Jun 2001 03:06:01 +0000 (03:06 +0000)]
Miscellaneous code cleanups.

Make sure we do not lose track of the build directory -- convert a user-
supplied directory to an absolute path.

24 years agoDisallow 'yield' in a 'try' block when there's a 'finally' clause.
Tim Peters [Sat, 23 Jun 2001 02:07:08 +0000 (02:07 +0000)]
Disallow 'yield' in a 'try' block when there's a 'finally' clause.
Derived from Thomas Wouters's patch on the Iterators list, but doesn't
try to read c->c_block[c->c_nblocks].

24 years agoRemove an extra tab character.
Fred Drake [Fri, 22 Jun 2001 18:36:07 +0000 (18:36 +0000)]
Remove an extra tab character.

24 years agoRe-organize a little, clean up some markup.
Fred Drake [Fri, 22 Jun 2001 18:21:53 +0000 (18:21 +0000)]
Re-organize a little, clean up some markup.

Added some comments about sys.exit(), SystemExit, and preventing restricted
code from exiting the interpreter.

This closes SF bug #434743.

24 years agoAdd sha and _sre to the list of allowed built-in modules.
Fred Drake [Fri, 22 Jun 2001 18:19:16 +0000 (18:19 +0000)]
Add sha and _sre to the list of allowed built-in modules.

24 years agoCorrected an error in the information on supporting weak references in
Fred Drake [Fri, 22 Jun 2001 17:20:29 +0000 (17:20 +0000)]
Corrected an error in the information on supporting weak references in
extension types (the docs reflected a development version of the API).

This closes SF bug #435066.

24 years agoAdjust to understand use of either single- or double-quotes to quote
Fred Drake [Fri, 22 Jun 2001 17:11:30 +0000 (17:11 +0000)]
Adjust to understand use of either single- or double-quotes to quote
attribute values, and make the logic surrounding the platform
annotations just a little easier to read.  Also make the platform
notes appear in the generated page; they were supposed to, but did not.

24 years agoAdd the new texinputs/license.tex to the shared dependencies.
Fred Drake [Fri, 22 Jun 2001 17:07:02 +0000 (17:07 +0000)]
Add the new texinputs/license.tex to the shared dependencies.

24 years agoThis is a trivial command line utility to print MD5 checksums.
Guido van Rossum [Fri, 22 Jun 2001 16:05:48 +0000 (16:05 +0000)]
This is a trivial command line utility to print MD5 checksums.
I published it on the web as http://www.python.org/2.1/md5sum.py
so I thought I might as well check it in.

Works with Python 1.5.2 and later.

Works like the Linux tool ``mdfsum file ...'' except it doesn't take
any options or read stdin.

24 years agoFix & clean up the information about building Python with large file support
Fred Drake [Fri, 22 Jun 2001 16:01:20 +0000 (16:01 +0000)]
Fix & clean up the information about building Python with large file support
for Linux.

This closes SF bug #434975.

24 years agoChanged the order of the buttons for EasyDialogs.AskYesNoCancel() from the unusual...
Just van Rossum [Fri, 22 Jun 2001 15:09:56 +0000 (15:09 +0000)]
Changed the order of the buttons for EasyDialogs.AskYesNoCancel() from the unusual [cancel, no, yes] to the more standard [no, cancel, yes].

24 years agoRecord Windows build number for 2.0.1 final.
Tim Peters [Fri, 22 Jun 2001 02:06:04 +0000 (02:06 +0000)]
Record Windows build number for 2.0.1 final.

24 years agodon't blow up when the charno SyntaxError value is None
Just van Rossum [Thu, 21 Jun 2001 21:52:15 +0000 (21:52 +0000)]
don't blow up when the charno SyntaxError value is None

24 years agorepaired expandselection and uncomment breakage
Just van Rossum [Thu, 21 Jun 2001 17:51:17 +0000 (17:51 +0000)]
repaired expandselection and uncomment breakage

24 years agoAdded support for the gc module (!).
Just van Rossum [Thu, 21 Jun 2001 14:50:03 +0000 (14:50 +0000)]
Added support for the gc module (!).

24 years agoSomehow, under certain circumstances, config.h and rename1.h would pop back up.
Guido van Rossum [Thu, 21 Jun 2001 12:34:50 +0000 (12:34 +0000)]
Somehow, under certain circumstances, config.h and rename1.h would pop back up.
Try to see if 'cvs delete' fixes this.

24 years agoTeach the UNPACK_SEQUENCE opcode how to tease an iterable object into
Tim Peters [Thu, 21 Jun 2001 02:49:55 +0000 (02:49 +0000)]
Teach the UNPACK_SEQUENCE opcode how to tease an iterable object into
giving up the goods.
NEEDS DOC CHANGES

24 years agoTry to avoid creating reference cycles involving generators. Only keep a
Neil Schemenauer [Thu, 21 Jun 2001 02:41:10 +0000 (02:41 +0000)]
Try to avoid creating reference cycles involving generators.  Only keep a
reference to f_back when its really needed.  Do a little whitespace
normalization as well.  This whole file is a big war between tabs and spaces
but now is probably not the time to reindent everything.

24 years agoGot rid of a silly #if.
Jack Jansen [Wed, 20 Jun 2001 21:44:38 +0000 (21:44 +0000)]
Got rid of a silly #if.

24 years agoMove license information to a less annoying location in the document.
Fred Drake [Wed, 20 Jun 2001 21:39:12 +0000 (21:39 +0000)]
Move license information to a less annoying location in the document.

Add documentation for PyErr_SetFromErrnoWithFilename().

24 years agoUpdate to include the license information in a less annoying place.
Fred Drake [Wed, 20 Jun 2001 21:37:34 +0000 (21:37 +0000)]
Update to include the license information in a less annoying place.

24 years agoSeparate the copyright statements and license text; include some new
Fred Drake [Wed, 20 Jun 2001 21:34:35 +0000 (21:34 +0000)]
Separate the copyright statements and license text; include some new
comments regarding the history of Python licensing from Guido.

24 years agoSeparate the version number and release status into two separate values.
Fred Drake [Wed, 20 Jun 2001 21:33:13 +0000 (21:33 +0000)]
Separate the version number and release status into two separate values.

24 years agoUpdate to use the newly separated values $PACKAGE_VERSION and $RELEASE_INFO.
Fred Drake [Wed, 20 Jun 2001 21:31:36 +0000 (21:31 +0000)]
Update to use the newly separated values $PACKAGE_VERSION and $RELEASE_INFO.

Normalize all HTML attributes to be written as name="value" instead of
name='value'.

24 years agoDon't use extern when we mean staticforward (OSX gcc is picky about it).
Jack Jansen [Wed, 20 Jun 2001 21:31:28 +0000 (21:31 +0000)]
Don't use extern when we mean staticforward (OSX gcc is picky about it).
Blacklist SendControlMessage: it's signature has changed between Universal Headers 3.3 and 3.4.

24 years agoAdded support for new \setreleaseinfo macro.
Fred Drake [Wed, 20 Jun 2001 21:29:30 +0000 (21:29 +0000)]
Added support for new \setreleaseinfo macro.
Normalize all generated HTML so that attribute names come out as
name="value" instead of name='value'.
Changed the target of RFC links to point to the hypertext RFCs at
www.faqs.org instead of the plain text RFCs at www.ietf.org.

24 years ago{Is,Set}AntiAliasedTextEnabled don't exist on MacOS 8.5.5 and earlier. For now: cop...
Jack Jansen [Wed, 20 Jun 2001 21:29:19 +0000 (21:29 +0000)]
{Is,Set}AntiAliasedTextEnabled don't exist on MacOS 8.5.5 and earlier. For now: cop out and blacklist them.

24 years agoANSIfied function headers to shut up compiler warnings on OSX/Mach-o.
Jack Jansen [Wed, 20 Jun 2001 21:22:23 +0000 (21:22 +0000)]
ANSIfied function headers to shut up compiler warnings on OSX/Mach-o.

24 years agoAdded a const to shut up a compiler warning.
Jack Jansen [Wed, 20 Jun 2001 21:21:07 +0000 (21:21 +0000)]
Added a const to shut up a compiler warning.

24 years agoReversed the order of the checks for None or a Dialog where a Window is expected...
Jack Jansen [Wed, 20 Jun 2001 21:20:22 +0000 (21:20 +0000)]
Reversed the order of the checks for None or a Dialog where a Window is expected so it doesn't crash under OSX/Mach-o.

24 years agoAdd a little more support for describing version information. This
Fred Drake [Wed, 20 Jun 2001 21:17:09 +0000 (21:17 +0000)]
Add a little more support for describing version information.  This
is not pretty, but does what is needed.

24 years agoRemoved some unused routines under Carbon. They caused compile errors with UH34.
Jack Jansen [Wed, 20 Jun 2001 20:55:05 +0000 (20:55 +0000)]
Removed some unused routines under Carbon. They caused compile errors with UH34.

24 years agoAdapted to Universal Headers 3.4: new refcontype and use UPP names in stead of Proc...
Jack Jansen [Wed, 20 Jun 2001 20:53:38 +0000 (20:53 +0000)]
Adapted to Universal Headers 3.4: new refcontype and use UPP names in stead of Proc names for callback creation.

24 years agoAdapted for Universal Headers 3.4: refcon type has changed (sigh) and use modern...
Jack Jansen [Wed, 20 Jun 2001 20:50:19 +0000 (20:50 +0000)]
Adapted for Universal Headers 3.4: refcon type has changed (sigh) and use modern (UPP in stead of Proc) names for callback object creation.

24 years agoOverride bdb's canonic() method with a no-op: with bdb's version we couldn't edit...
Just van Rossum [Wed, 20 Jun 2001 19:57:55 +0000 (19:57 +0000)]
Override bdb's canonic() method with a no-op: with bdb's version we couldn't edit breakpoints in file-less ("Untitled" script windows). Besides, we did't need it as we always use full path names anyway.

24 years agowrite(): Karl Eichwalder points out that the #, flag comments should
Barry Warsaw [Wed, 20 Jun 2001 19:41:40 +0000 (19:41 +0000)]
write(): Karl Eichwalder points out that the #, flag comments should
be outputted just before the msgid lines.

24 years agogen_iternext(): repair subtle refcount problem.
Tim Peters [Wed, 20 Jun 2001 06:57:32 +0000 (06:57 +0000)]
gen_iternext():  repair subtle refcount problem.
NeilS, please check!  This came from staring at your genbug.py, but I'm
not sure it plugs all possible holes.  Without this, I caught a
frameobject refcount going negative, and it was also the cause (in debug
build) of _Py_ForgetReference's attempt to forget an object with already-
NULL _ob_prev and _ob_next pointers -- although I'm still not entirely
sure how!  Part of the difficulty is that frameobjects are stored on a
free list that gets recycled very quickly, so if there's a stray pointer
to one of them it never looks like an insane frameobject (never goes
trough the free() mangling MS debug forces, etc).

24 years agoRemove unused code.
Neil Schemenauer [Wed, 20 Jun 2001 00:39:28 +0000 (00:39 +0000)]
Remove unused code.

24 years agoAdd a bunch of sample strings to test soft line breaks of varying end
Barry Warsaw [Tue, 19 Jun 2001 22:48:42 +0000 (22:48 +0000)]
Add a bunch of sample strings to test soft line breaks of varying end
cases.

24 years agoencode(): Fixed the handling of soft line breaks for lines over 76
Barry Warsaw [Tue, 19 Jun 2001 22:48:10 +0000 (22:48 +0000)]
encode(): Fixed the handling of soft line breaks for lines over 76
characters in length.  Remember that when calculating the soft breaks,
the trailing `=' sign counts against the max length!

24 years agomade 7-bit-clean.
Just van Rossum [Tue, 19 Jun 2001 21:38:42 +0000 (21:38 +0000)]
made 7-bit-clean.

24 years agoSome long overdue maintainance. Made all IDE sources 7-bit-clean, to avoid any furthe...
Just van Rossum [Tue, 19 Jun 2001 21:37:33 +0000 (21:37 +0000)]
Some long overdue maintainance. Made all IDE sources 7-bit-clean, to avoid any further encoding conversion troubles.

24 years ago- _filename_to_abs() didn't cater for .. components in the pathname. Fixed.
Jack Jansen [Tue, 19 Jun 2001 21:23:11 +0000 (21:23 +0000)]
- _filename_to_abs() didn't cater for .. components in the pathname. Fixed.
- compile() didn't return a (empty) list of objects. Fixed.
- the various _fix_xxx_args() methods weren't called (are they new or did I overlook them?). Fixed.

24 years agoThe test used int(time.time()) to get a random number, but this doesn't work on the...
Jack Jansen [Tue, 19 Jun 2001 20:20:05 +0000 (20:20 +0000)]
The test used int(time.time()) to get a random number, but this doesn't work on the mac (where times are bigger than ints). Changed to int(time.time()%1000000).

24 years agoAn import MacOS was missing after the code-rearranging. Added.
Jack Jansen [Tue, 19 Jun 2001 20:11:36 +0000 (20:11 +0000)]
An import MacOS was missing after the code-rearranging. Added.

24 years agoTest by Martin v. Loewis for the new UTF-16 codec handling of BOM
Marc-André Lemburg [Tue, 19 Jun 2001 20:09:28 +0000 (20:09 +0000)]
Test by Martin v. Loewis for the new UTF-16 codec handling of BOM
marks.

24 years agoThis patch by Martin v. Loewis changes the UTF-16 codec to only
Marc-André Lemburg [Tue, 19 Jun 2001 20:07:51 +0000 (20:07 +0000)]
This patch by Martin v. Loewis changes the UTF-16 codec to only
write a BOM at the start of the stream and also to only read it as
BOM at the start of a stream.

Subsequent reading/writing of BOMs will read/write the BOM as ZWNBSP
character. This is in sync with the Unicode specifications.

Note that UTF-16 files will now *have* to start with a BOM mark
in order to be readable by the codec.

24 years agowrite(): It's been generally agreed on the i18n-sig that the docstring
Barry Warsaw [Tue, 19 Jun 2001 19:54:19 +0000 (19:54 +0000)]
write(): It's been generally agreed on the i18n-sig that the docstring
marker should be output as a #, flag, e.g. "#, docstring".

24 years agoDocument the new encodestring() and decodestring() functions. Also,
Barry Warsaw [Tue, 19 Jun 2001 19:44:42 +0000 (19:44 +0000)]
Document the new encodestring() and decodestring() functions.  Also,
add some description of what the quotetabs argument does for the
encode*() functions.  Finally, add a "see also" pointing to the base64
module.

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.