Commit Graph

2046 Commits

Author SHA1 Message Date
Fred Drake 55a0034682 Michael Hudson <mwh21@cam.ac.uk>:
Add many more constants for some systems.

This closes SF patch #410267.
2001-03-26 17:14:02 +00:00
Fred Drake 4113b137cd get_version_string(): New function -- returns a Python string object that
gives the CVS revision of this file even if it does not include the
    extra RCS "$Revision: " cruft.

initpyexpat():  Use get_version_string() instead of hard-coding magic
    indexes into the RCS string (which may be affected by export options).
2001-03-24 19:58:26 +00:00
Guido van Rossum 9dee48f6e7 Fix a memory leak -- there's no need to INCREF() the result of
newreadlinesobject() in xreadlines().
2001-03-23 18:30:19 +00:00
Tim Peters a5d7b748d9 Revert the 1.8 patch, since it's implicated in nasty blowups (see Pyhon-Dev). 2001-03-23 06:14:28 +00:00
Jeremy Hylton 8bf395f1aa add DEF_BOUND constant 2001-03-22 23:10:44 +00:00
Guido van Rossum 8652522442 Update the Tix version (long overdue :-).
This is SF patch # #409044, by Internet Discovery: "Update tcl/tk/tix
versions".
2001-03-22 22:18:55 +00:00
Fred Drake 82f1480d63 Inform the cycle-detector that the a weakref object no longer needs to be
tracked as soon as it is clear; this can decrease the number of roots for
the cycle detector sooner rather than later in applications which hold on
to weak references beyond the time of the invalidation.
2001-03-22 18:05:30 +00:00
Fred Drake 2c77355937 Make cPickle use the recently-added PyInstance_NewRaw() API to create
instance objects without calling the constructor.  This is the same as
the new.instance() function.
2001-03-22 17:52:17 +00:00
Fredrik Lundh b25e1ad253 sre 2.1b2 update:
- take locale into account for word boundary anchors (#410271)
- restored 2.0's *? behaviour (#233283, #408936 and others)
- speed up re.sub/re.subn
2001-03-22 15:50:10 +00:00
Jeremy Hylton bc32024769 Extend support for from __future__ import nested_scopes
If a module has a future statement enabling nested scopes, they are
also enable for the exec statement and the functions compile() and
execfile() if they occur in the module.

If Python is run with the -i option, which enters interactive mode
after executing a script, and the script it runs enables nested
scopes, they are also enabled in interactive mode.

XXX The use of -i with -c "from __future__ import nested_scopes" is
not supported.  What's the point?

To support these changes, many function variants have been added to
pythonrun.c.  All the variants names end with Flags and they take an
extra PyCompilerFlags * argument.  It is possible that this complexity
will be eliminated in a future version of the interpreter in which
nested scopes are not optional.
2001-03-22 02:47:58 +00:00
Guido van Rossum ec24c1bc32 Don't raise MemoryError in keys() when the database is empty.
This fixes SF bug #410146 (python 2.1b shelve is broken).
2001-03-22 00:19:22 +00:00
Tim Peters 26ae7cd75a SF patch 407758, "timemodule patches for Cygwin", from Norman Vine.
http://sourceforge.net/tracker/?func=detail&aid=407758&group_id=5470&atid=305470
2001-03-20 03:26:49 +00:00
Moshe Zadka 8f4eab2345 Committing patch 405101 2001-03-18 17:11:56 +00:00
Tim Peters 84e87f379e SF bug [ #233200 ] cPickle does not use Py_BEGIN_ALLOW_THREADS.
http://sourceforge.net/tracker/?func=detail&aid=233200&group_id=5470&atid=105470
Wrapped the fread/fwrite calls in thread BEGIN_ALLOW/END_ALLOW brackets
Afraid I hit the "delete trailing whitespace key" too!  Only two "real" sections
of code changed here.
2001-03-17 04:50:51 +00:00
Jeremy Hylton 30c9f3991c Variety of small INC/DECREF patches that fix reported memory leaks
with free variables.  Thanks to Martin v. Loewis for finding two of
the problems.  This fixes SF buf 405583.

There is also a C API change: PyFrame_New() is reverting to its
pre-2.1 signature.  The change introduced by nested scopes was a
mistake.  XXX Is this okay between beta releases?

cell_clear(), the GC helper, must decref its reference to break
cycles.

frame_dealloc() must dealloc all cell vars and free vars in addition
to locals.

eval_code2() setup code must INCREF cells it copies out of the
closure.

The STORE_DEREF opcode implementation must DECREF the object it passes
to PyCell_Set().
2001-03-13 01:58:22 +00:00
Fred Drake 8e68eb61f2 Make sure we close the group and password databases when we are done with
them; this closes SF bug #407504.
2001-03-11 03:03:07 +00:00
Martin v. Löwis c4db476c87 Define sunmath prototypes if sunmath.h was not included. 2001-03-07 10:22:20 +00:00
Martin v. Löwis f58de1bd67 Document SIG_* warning causes on Solaris. 2001-03-06 12:13:56 +00:00
Martin v. Löwis 2b6727bd8a Use Py_CHARMASK for ctype macros. Fixes bug #232787. 2001-03-06 12:12:02 +00:00
Fred Drake f585bef504 Be a bit more strict in setting up the export of the C API for this
module; do not attempt to insert the API object into the module dict
if there was an error creating it.
2001-03-03 19:41:55 +00:00
Fred Drake d85556c663 Wrap several more of the constants in #ifdef/#endif for FreeBSD; at least
some fairly recent versions have an anaemic selection of terminal-control
symbols.

This closes SF bug #405567.
2001-03-03 18:08:52 +00:00
Guido van Rossum ad2c3c7b69 Extra fix from bbum (SF #402357) for his previous patch:
It should use the normal CC referenced compiler as ObjC is integrated
  directly into gcc and enabled through the use of the -ObjC flag.
2001-03-02 07:09:54 +00:00
Guido van Rossum 258ccd4126 Fix typo in RISCOS patch inside MS #ifdef. (Probably my own fingers.) 2001-03-02 06:53:29 +00:00
Fred Drake dedbebf9f8 Add more protection around the VSWTC/VSWTCH, CRTSCTS, and XTABS symbols;
these can be missing on some (all?) Irix and Tru64 versions.

Protect the CRTSCTS value with a cast; this can be a larger value on
Solaris/SPARC.

This should fix SF tracker items #405092, #405350, and #405355.
2001-03-02 06:50:58 +00:00
Guido van Rossum 48a680c097 RISCOS changes by dschwertberger. 2001-03-02 06:34:14 +00:00
Guido van Rossum 1ca8bb374e RISCOS changes by dschwertberger 2001-03-02 06:28:17 +00:00
Guido van Rossum 3ed4c15a88 RISCOS changes by dschwertberger. 2001-03-02 06:18:03 +00:00
Fred Drake 9ef7fa875a Solaris defines VSWTCH instead of VSWTC; carefully make sure both are
defined and export both names.

Solaris also does not define CBAUDEX; it is not clear that CBAUDEXT
(which is defined there) is the same thing, so we only protect against
the lack of CBAUDEX.

Reported by Greg V. Wilson.
2001-03-01 21:54:49 +00:00
Fred Drake bb66a200be Wrap some long lines, use only C89 /* */ comments, and add spaces around
some operators (style guide conformance).
2001-03-01 20:48:17 +00:00
Fred Drake abb379e189 Revised version of Jason Tishler's patch to make this compile on Cygwin,
which does not define all the constants.

This closes SF tracker patch #404924.
2001-03-01 03:28:08 +00:00
Tim Peters 5687ffe0c5 SF patch 404928: Support for next Cygwin gcc (2.95.2-8) 2001-02-28 16:44:18 +00:00
Fred Drake df48d14f44 Define the constants needed for working with these functions directly
in this module; no more need for TERMIOS.py.
2001-02-27 21:22:39 +00:00
Andrew M. Kuchling 6efc6e7832 Patch #404680: disables the nis module and enables the dl module when
building under Cygwin.  Makes some fixes to the dlmodule in order to
    compile with Cygwin.
2001-02-27 20:54:23 +00:00
Fred Drake ed5e8234d7 Gustavo Niemeyer <niemeyer@conectiva.com>:
Fixed recno support (keys are integers rather than strings).
Work around DB bug that cause stdin to be closed by rnopen() when the
DB file needed to exist but did not (no longer segfaults).

This closes SF tracker patch #403445.

Also wrapped some long lines and added whitespace around operators -- FLD.
2001-02-27 18:56:46 +00:00
Martin v. Löwis 5e1633365d Patch #403985: Add support for weak-keyed dictionaries 2001-02-27 18:36:56 +00:00
Skip Montanaro 8216c18984 conditionally include unistd.h to pick up confstr declaration. attempt to
squelch warning from GCC 2.95.2 on Solaris - partially addresses bug
#232787.
2001-02-27 17:04:34 +00:00
Andrew M. Kuchling ab354bb9ba Mention setup.py in the instructions
Add note about linuxaudiodev possibly working on BSD
2001-02-27 03:29:52 +00:00
Fred Drake 32efcdbceb cleanup_helper(): Added missing "void" type for the function, updated
comments to reflect reality.
2001-02-26 20:10:51 +00:00
Fred Drake b60654bc15 The return value from PyObject_ClearWeakRefs() is no longer meaningful,
so make it void.
2001-02-26 18:56:37 +00:00
Barry Warsaw 3e13b1e48b Py_Main(): When compiled by Insure (i.e. __INSURE__ is defined), call
the internal API function to release the interned strings as the very
last thing before returning status.  This aids in memory use debugging
because it eliminates a huge source of noise from the reports.  This
is never called during normal (non-debugging) use because releasing
the interned strings slows Python's shutdown and isn't necessary
anyway because the system will always reclaim the memory.
2001-02-23 16:46:39 +00:00
Tim Peters 1c8e1f0654 asin micro-optimization suggested in email. 2001-02-22 19:51:56 +00:00
Andrew M. Kuchling a1a690fa9c Patch #103926: fix two warnings from Tru64's compiler 2001-02-22 15:52:55 +00:00
Andrew M. Kuchling b995509c2f Remove soundex module, as stated by GvR.
(Fred, I'll leave the doc changes to you, because I don't know if you
     want to delete libsoundex.tex or leave it in.
     Someone else will have to tweak PC/os2vacpp/{config.c,makefile} and
     PCbuild/pythoncore.dsp, both of which refer to soundex.c)
2001-02-22 15:45:46 +00:00
Tim Peters 793de09b21 Add a line to "python -h" output about PYTHONCASEOK. 2001-02-22 00:39:47 +00:00
Andrew M. Kuchling 39c4ed6e70 Move the signal module back into Setup.config.in so it can be enabled
and disabled from the configure script.
2001-02-21 21:10:14 +00:00
Tim Peters edf2210221 Bug #133297: cmath.asin is the same as cmath.asinh.
The bug report title isn't correct, but was on the right track.
Rev 2.13 applied a patch intended to improve asinh and acosh, but the
author mistakenly replaced the body of asin with their new code for asinh.
See bug report for all the gory details.
This patch: (a) puts the "new" (as of 2.13) asinh code into the asinh
function; and, (b) repairs asin via what Abramowitz & Stegun say it should
be (which is probably the same as what 2.12 did for asin, although I got
tired of matching parentheses before being 100% sure of that -- and I don't
care!  The source of the old code is a mystery, and I *know* why I picked
the new code.).
2001-02-21 03:22:39 +00:00
Andrew M. Kuchling 9aff4a2ad0 Patch #103373 from Donovan Baarda: This patch:
* fixes the zlib decompress sync flush bug as reported in bug #124981
  * avoids repeat calls to (in|de)flateEnd when destroying (de)compression
    objects
  * raises exception when allocating unused_data fails
  * fixes memory leak when allocating unused_data fails
  * raises exception when allocating decompress data fails
  * removes vestigial code from decompress flush now that decompression
    returns all available data
  * tidies code so object compress/decompress/flush routines are consistent
2001-02-21 02:15:56 +00:00
Tim Peters 8cb82bd5fb Rename some constants for easier readability. 2001-02-20 20:36:38 +00:00
Tim Peters 14e26408f3 Mechanical edits just so I can read it. 2001-02-20 20:15:19 +00:00
Fred Drake c9f7c262bd Wrap a bunch of long lines. 2001-02-19 21:16:00 +00:00