Commit Graph

21377 Commits

Author SHA1 Message Date
Steven M. Gava 34b8851c5f remove cruft from other project 2001-12-05 06:39:18 +00:00
Steven M. Gava 5b357b977a cleaner tabbed-page mini implementation through classes 2001-12-05 06:32:46 +00:00
Tim Peters 1691bd9f1e SF bug 482574: audioop.ratecv crashes.
Bugfix candidate.
A numerically naive computation of output buffer size caused crashes
and spurious MemoryErrors for reasonable arguments.
audioop_ratecv():  Avoid spurious overflow by careful reworking of the
buffer size computations, triggering MemoryError if and only if the
final buffer size can't be represented in a C int (although
PyString_FromStringAndSize may legitimately raise MemoryError even if
it does fit in a C int).  All reasonable arguments should work as
intended now, and all unreasonable arguments should be cuaght.
2001-12-05 06:05:07 +00:00
Fred Drake c2f496a138 Add a note to the description of the interaction between the softspace
attribute of file objects, the print statement, and other file operations.
This closes SF bug #484857.

Fix minor markup nits.
2001-12-05 05:46:25 +00:00
Fred Drake 39368c1053 Added documentation of the sendall() method, and a note to the send() method
that it does not guarantee that all data is sent.
This closes SF patch #474307.
2001-12-05 05:25:59 +00:00
Tim Peters 6d30c3e391 Change new tests to use integer division (// instead of /). 2001-12-05 00:30:09 +00:00
Tim Peters a3c01ce696 SF bug #488480: integer multiply to return -max_int-1.
int_mul():  new and vastly simpler overflow checking.  Whether it's
faster or slower will likely vary across platforms, favoring boxes
with fast floating point.  OTOH, we no longer have to worry about
people shipping broken LONG_BIT definitions <0.9 wink>.
2001-12-04 23:05:10 +00:00
Fred Drake d2a557e51e Added entry for the "cgitb" module docs. 2001-12-04 22:48:17 +00:00
Fred Drake 6e70e8b401 Documentation for the "cgitb" module. 2001-12-04 22:47:42 +00:00
Fred Drake 62c1e3c1b9 Make sure to propogate errors that arise when profiling data cannot be
written to the log file, and turn off the profiler.
This closes SF bug #483925.
2001-12-04 21:40:53 +00:00
Guido van Rossum bebfe03617 Another no-longer-nameless contributor... 2001-12-04 21:33:34 +00:00
Guido van Rossum cd7b7d6110 Add note about fixed hash() of mutable objects. 2001-12-04 21:02:07 +00:00
Fred Drake e1ceaa00dc Define NDEBUG when compiling a release build on Unix.
This is the Unix portion of the fix for SF bug #489052.
2001-12-04 20:55:47 +00:00
Guido van Rossum 4ed6be7107 Import the keyword module instead of relying on our own list of
reserved words.  No longer need to import string.
2001-12-04 20:39:36 +00:00
Guido van Rossum 41c6719fe4 Put the keywords back in alphabetical order. Apparently somebody
didn't use reswords.py, as the comment clearly states. :-(
2001-12-04 20:38:44 +00:00
Tim Peters 5defb1736d Stop defining NDEBUG in Python.h, because it can interfere with
extensions that #include Python.h.  See (rejected) patch 487634 for
more detail.  I'll open a new bug report for the rest needed here.
2001-12-04 20:06:11 +00:00
Fred Drake ecd8157a2c Include a warning that scripts should not have the same name as standard
modules, or the module cannot be properly imported.  (Based on a suggestion
sent to python-docs.)

Update the displayed dir() of the sys and __builtin__ module with Python 2.2.
2001-12-04 19:47:46 +00:00
Fred Drake 6016dbecca Talk about str() in the discussion of string representations of values, and
give examples for which str() and repr() yield different results.
This closes SF bug #485446.
2001-12-04 19:20:43 +00:00
Ka-Ping Yee fa78d0fbe4 Add "file" argument to Hook constructor.
By default, save sys.stdout in self.file when a Hook instance is created
    (e.g. when cgitb.enable() is called).
2001-12-04 18:45:17 +00:00
Guido van Rossum 4b402f2074 Address SF patch #485789 (Stefan Schwarzer).
$BROWSER should be split on os.pathsep, not on ":".
2001-12-04 17:43:22 +00:00
Guido van Rossum 64b206c19e Fix SF bug #486144: Uninitialized __slot__ vrbl is None.
There's now a new structmember code, T_OBJECT_EX, which is used for
all __slot__ variables (except __weakref__, which has special behavior
anyway).  This new code raises AttributeError when the variable is
NULL rather than converting NULL to None.
2001-12-04 17:13:22 +00:00
Fred Drake bb7775a6ae Fix SF bug #479967: Appearantly I broke something that made the index
insertion work.  This fix makes things at least somewhat more explicit, and
adds a little sanity checking (and verbosity!) to
add_bbl_and_idx_dummy_commands().
2001-12-04 17:03:54 +00:00
Fred Drake 97e3201220 Add a note that the rgbimg module is only built on 32-bit machines (prompted
by a question to webmaster).
Re-wrapped a long line.
2001-12-04 16:49:00 +00:00
Guido van Rossum 03b3f04542 long_mul(): The PyNumber_Multiply() call can return a long if the
result would overflow an int.  Check for this.  (SF bug #488482, Armin
Rigo.)
2001-12-04 16:36:39 +00:00
Fred Drake b48b6d0737 Remove meaningless comment. 2001-12-04 16:32:04 +00:00
Guido van Rossum 6b70599450 Fix SF bug #486144: Uninitialized __slot__ vrbl is None.
There's now a new structmember code, T_OBJECT_EX, which is used for
all __slot__ variables (except __weakref__, which has special behavior
anyway).  This new code raises AttributeError when the variable is
NULL rather than converting NULL to None.
2001-12-04 16:23:42 +00:00
Guido van Rossum ebca9fc1ba PyObject_Generic{Get,Set}Attr(): ensure that the attribute name is a
string object (or a Unicode that's trivially converted to ASCII).

PyObject_GetAttr(): add an 'else' to the Unicode test like
PyObject_SetAttr() already has.
2001-12-04 15:54:53 +00:00
Guido van Rossum d3d8a1df5c A tiny but useful script that fires off a search on Google.
(Not sure if this is legal according to the Google terms of service. :-)
2001-12-04 15:23:47 +00:00
Jack Jansen b6b6c6c33f Patch by Jason Harper to allow IDE to work again under MacOS 8.1. Plus appearance support for Wlist frames and focussing. Plus commented-out appearance support for the same for Wtext, which still needs some work. 2001-12-04 13:30:29 +00:00
Guido van Rossum f227252c21 The parser now also needs to link with mysnprintf.o. 2001-12-04 03:54:08 +00:00
Tim Peters 88e138c842 PyGrammar_LabelRepr(): sprintf -> PyOS_snprintf. 2001-12-04 03:36:01 +00:00
Tim Peters 1ca1296157 The parser doesn't need its own implementation of assert, and having its
own interfered with including Python.h.  Remove Python's assert.h.
2001-12-04 03:18:48 +00:00
Jeremy Hylton db5a93cd6a Update docs to reflect new compile() and compileFile() 2001-12-04 02:48:52 +00:00
Jeremy Hylton 86424e333f SF bug #488687 reported by Neal Norwitz
The error for assignment to __debug__ used ste->ste_opt_lineno instead
of n->n_lineno.  The latter was at best incorrect; often the slot was
uninitialized.  Two fixes here: Use the correct lineno for the error.
Initialize ste_opt_lineno in PySymtable_New(); while there are no
current cases where it is referenced unless it has already been
assigned to, there is no harm in initializing it.
2001-12-04 02:41:46 +00:00
Tim Peters 22a51efc1c More sprintf -> PyOS_snprintf. 2001-12-04 01:11:32 +00:00
Fred Drake b38784e4a0 Slightly improved indexing for the string-% operator, thanks to comments
from Skip Montanaro.  There is one weirdness in the final index for HTML, but
that is low priority.
2001-12-03 22:15:56 +00:00
Fred Drake fcf94681ed Update lambda description to reflect nested scopes. This was noted by
Andrew Koenig.
2001-12-03 21:47:37 +00:00
Fred Drake 1a76386194 Added documentation on the ScrolledText module. 2001-12-03 21:18:30 +00:00
Andrew M. Kuchling c54fc3179f Oops! Forgot the value parameter. 2001-12-03 20:58:29 +00:00
Andrew M. Kuchling 9455df2a5a Add __delete__ method of properties
Reflow paragraph
2001-12-03 20:55:37 +00:00
Tim Peters c8996f5965 posix_execve(), posix_spawnve(), posix_putenv():
sprintf -> PyOS_snprintf.  This is the last of this
stuff I intend to do.
2001-12-03 20:41:00 +00:00
Guido van Rossum 354797ccad Fix the final two issues in Armin Rigo's SF bug #488477: apply_slice()
and assign_slice() weren't properly DECREF'ing the temporary slice
object they created.  (Shame on me. :-)
2001-12-03 19:45:06 +00:00
Guido van Rossum bb8f59a371 unpack_iterable(): Add a missing DECREF in an error case. Reported by
Armin Rigo (SF bug #488477).  Added a testcase to test_unpack_iter()
in test_iter.py.
2001-12-03 19:33:25 +00:00
Just van Rossum 2009aa66b4 removed some dead code. 2001-12-03 19:27:38 +00:00
Barry Warsaw c44d2c52c9 decode(), encode(): Accepting the minor optimizations from SF patch
#486375, but not the rest of it, since that changes the documented
semantics of encode().
2001-12-03 19:26:40 +00:00
Guido van Rossum be5234610a function_call(): Remove a bogus (and I mean *really* bogus) call to
Py_DECREF(arg) after the PyErr_NoMemory() call.  (Armin Rigo, SF bug
#488477.)
2001-12-03 19:22:38 +00:00
Fred Drake 1da50f6c6e Add a scalar product to the example list comprehensions based on a suggestion
sent to python-docs.
2001-12-03 18:54:33 +00:00
Barry Warsaw f4c20d354c LIBSUBDIRS: Add test/data so it gets installed and test_email.py can
pass.  Closes SF # 485080
2001-12-03 18:51:41 +00:00
Fred Drake 5172adca81 Minor clarification of the zip() description, based on a comment sent to
python-docs.
2001-12-03 18:35:05 +00:00
Fred Drake 14f5c5fa01 Make no assumption about how modules are built when referring to them; this
can vary by platform and installation.
Based on suggestion to python-docs.
2001-12-03 18:33:13 +00:00