Commit Graph

6702 Commits

Author SHA1 Message Date
Guido van Rossum 8f3c812e22 Fix due to Bill Noon for problem discovered by Ken Manheimer: packing
0.0 as float or double would yield the representation for 1.0!
1997-11-04 17:12:33 +00:00
Guido van Rossum 25c649fdf2 Get rid of another reference to _PyImport_Inittab (now a static array)
that should be PyImport_Inittab (a new pointer initialized to point to
the array).
1997-11-04 17:04:34 +00:00
Guido van Rossum 22348dc0e1 The warning about thread still having a frame now only happens in
verbose mode.
1997-11-03 22:08:36 +00:00
Guido van Rossum 8607ae2e57 Move the Py_{{BEGIN,END}_ALLOW,BLOCK}_THREADS macros in time_sleep()
to inside floatsleep().  This is necessary because floatsleep() does
the error handling and it must have grabbed the interpreter lock and
thread state before it can do so.
1997-11-03 22:04:46 +00:00
Guido van Rossum 3a44e1b9fb Two independent changes (alas):
- The interp->builtins variable (and hence, __main__.__builtins__) is
once again initialized to the built-in *module* instead of its
dictionary.

- The finalization order is once again changed.  Signals are finalized
relatively early, because (1) it DECREF's the signal handlers, and if
a signal handler happens to be a bound method, deleting it could cause
problems when there's no current thread around, and (2) we don't want
to risk executing signal handlers during finalization.
1997-11-03 21:58:47 +00:00
Guido van Rossum 7ff20ac9c7 Change the signal finialization so that it also resets the signal
handlers.  After this has been called, our signal handlers are no
longer active!
1997-11-03 21:53:55 +00:00
Guido van Rossum 615022fbf8 Doing the most complicated CVS dance I've ever seen. Barry has had
his *own* RCS file for python-mode.el, and I've agreed that it would
be better if his version was in the Python source tree.  However I
don't want to totally get rid of the old RCS file (which has
interesting info such as which version was in which Python release).
So I've moved the old one to python-mode-old.el behind the scenes,
and this checkin message indicates that I'm now deleting it.
If you do an update, you will actually get Barry's *new* version!
1997-11-03 17:14:19 +00:00
Barry Warsaw affc0ca0e8 Changes in preparation for integrating into the Python CVS tree.
Introductory comment updates.

(python-font-lock-keywords): Added "assert"

(py-block-closing-keywords-re): New variable.

(py-no-outdent-re): Rewrite to use py-block-closing-keywords-re.

(py-shell): py-process-filter should no longer be necessary.  Comint
should do all the work.  Note that more fixes to the py-shell process
mechanism need to be done.

(py-execute-region): Check for empty region.  Some questionable
changes to set-buffer after shell-command-on-region.  Again, this all
needs to be closely examined for X/Emacs 19/20 compatibility.

(py-goto-beyond-final-line): py-parse-partial-sexp-works-p should no
longer be necessary.

(py-statement-closes-block-p): Use py-block-closing-keywords-re.
1997-11-03 16:59:38 +00:00
Guido van Rossum 6345ac6d61 Add cast to realloc/malloc call to shut up AIX compiler. (Vladimir Marangozov) 1997-10-31 20:32:13 +00:00
Guido van Rossum 197346fafe New policy for package imports: only a directory containing
__init__.py (or __init__.pyc/.pyo, whichever applies) is considered a
package.  All other subdirectories are left alone.  Should make Konrad
Hinsen happy!
1997-10-31 18:38:52 +00:00
Guido van Rossum 771c6c8f7a Instead of using _PyImport_Inittab[] directly, use the new "official"
pointer *PyImport_Inittab which is initialized to _PyImport_Inittab.
1997-10-31 18:37:24 +00:00
Guido van Rossum 66959aff68 Remove the declaration of "internal" table _PyImport_Inittab[]; add
new "official" pointer *PyImport_Inittab.
1997-10-31 18:36:47 +00:00
Guido van Rossum e8d113976c Add empty __init__.py files to the test packages so the new policy
will recognize them.
1997-10-31 18:33:41 +00:00
Guido van Rossum 873c35c437 Take out the setlocale() call. It affects atof() and will break
floating point literals.  Need to do this differently...
1997-10-31 18:25:15 +00:00
Guido van Rossum 3c03fa87b6 Hack suggested by Matthias Klose to pull in all relevant entry points
in libmath.a so they are available to mathmodule.so (in case it is
shared).  While this still gets triggered on Solaris 2.x, this appears
to be harmless there.
1997-10-31 17:00:30 +00:00
Guido van Rossum 86aeb900e5 Add #include "mytime.h", needed for SunOS 4.1 (Matthias Klose). 1997-10-31 16:55:51 +00:00
Guido van Rossum 613418aa09 New version from Sjoerd, small bugfix + optimizations. 1997-10-30 15:27:37 +00:00
Guido van Rossum e475d86bd9 Install Misc/Makefile.pre.in in the config/ install directory.
Suggestion by Konrad Hinsen.
1997-10-29 19:07:30 +00:00
Guido van Rossum 0874f7fdaf Tests for tokenize.py (Ka-Ping Yee) 1997-10-27 22:15:06 +00:00
Guido van Rossum fefc922cef New, fixed version with proper r"..." and R"..." support from Ka-Ping. 1997-10-27 21:17:24 +00:00
Guido van Rossum 3b631775b2 Redone (by Ka-Ping) using the new re module, and adding recognition
for r"..." raw strings.  (And R"..." string support added by Guido.)
1997-10-27 20:44:15 +00:00
Guido van Rossum 9d37a4d332 Small wording change about global and local trace functions. 1997-10-27 19:57:20 +00:00
Guido van Rossum 036309b13e This should hopefully finally clean up the remaining __del__ related
problems with this module, even if an instance of a derived class is
kept alive longer than the urllib module itself...
1997-10-27 18:56:19 +00:00
Guido van Rossum af8d2bf4d8 Bugfix in match() -- the number of registers shouldn't be divided by two! 1997-10-27 18:17:19 +00:00
Guido van Rossum e6eef4b4a3 Use __dict__.update(state) instead of for loop over state.items() and
call to setattr().  This changes semantics, following the change
already implemented in pickle.

Also reindented a few lines properly.
1997-10-26 17:00:25 +00:00
Fred Drake 040e565261 Ooops, found too more references to old conditions on floating point values. 1997-10-24 21:15:55 +00:00
Fred Drake ae18e9fc1c Removed obsolete discussion on _xdr helper module. 1997-10-24 21:14:36 +00:00
Guido van Rossum 31626bce66 re -> regex conversions by Sjoerd. 1997-10-24 14:46:16 +00:00
Guido van Rossum f81e5b9c78 New module -- converts regex regular expressions to re style.
There are two ways to use this -- as a filter (e.g. using C-U M-| on a
regex string literal in an Emacs buffer) or from a Python program
which imports this as a module.  Read the doc string for more info,
and also some caveats (some cases aren't handled right).
1997-10-23 22:43:50 +00:00
Guido van Rossum 1fef181183 Although it's hard to be sure, I *think* this is a working conversion
from regex to re style regular expressions.  This should make sgmllib
and htmllib threadsafe, so I can now create a threaded version of
webchecker...
1997-10-23 19:09:21 +00:00
Guido van Rossum 57a68e08f9 Remove redundant import regsub. 1997-10-23 17:50:10 +00:00
Guido van Rossum 2efa34ba9b Daniel Larsson discovered another cut-n-paste bug in the Olimit story... 1997-10-23 17:43:11 +00:00
Guido van Rossum 9694fcab53 Convert all remaining *simple* cases of regex usage to re usage. 1997-10-22 21:00:49 +00:00
Guido van Rossum 426916e50e Add pcre to the list of safe modules. 1997-10-22 20:56:32 +00:00
Guido van Rossum f7a8b45d71 Remove outdated comments. 1997-10-22 20:54:50 +00:00
Guido van Rossum 12f86ade21 Removed some unneeded imports, moved others around. 1997-10-22 20:52:53 +00:00
Guido van Rossum a8832b45e7 Removed unneeded imports of regex and regsub. 1997-10-22 20:50:37 +00:00
Guido van Rossum acfb82a530 Use re instead of regex. Also remove bogus return statement from __init__(). 1997-10-22 20:49:52 +00:00
Guido van Rossum 8566e474b4 Added pgrep() function, which is like grep/egrep/emgrep but uses Perl
syntax, by virtue of the new re module.
1997-10-22 20:44:58 +00:00
Guido van Rossum b49144244c Deleted this long-obsolete module 1997-10-22 16:29:53 +00:00
Guido van Rossum 24986204cf Added "new" symbol defns for RE_ANSI_HEX and RE_NO_GNU_EXTENSIONS --
hopefully the last maintenance on this module, ever.
1997-10-22 16:28:53 +00:00
Guido van Rossum d7dc2eb708 Put {} around \^ in sets to force latex2html to do the right thing... 1997-10-22 03:03:44 +00:00
Guido van Rossum 1f84449fd8 New CObject from Jim Fulton, adds PyCObject_FromVoidPtrAndDesc() and
PyCObject_GetDesc().
1997-10-21 19:48:35 +00:00
Guido van Rossum 16cb6f4612 Forgot to add .cxx and .cpp to the second case statement.
Thanks to Daniel Larsson.
1997-10-21 19:30:29 +00:00
Guido van Rossum e85da651dd Some patches to Lee Busby's fpectl mods that accidentally didn't make it
into 1.5a4.
1997-10-20 23:50:01 +00:00
Guido van Rossum 9476a78c1e Remove "." or "" from front of sys.path (this bit me once). 1997-10-20 23:48:01 +00:00
Guido van Rossum 4e8ef5fcd3 Catch KeyboardInterrupt separately and propagate it, instead of
reporting a "crash".

Use sys.exc_info() instead of sys.exc_type and sys.exc_value.
1997-10-20 23:46:54 +00:00
Guido van Rossum 1510565cb5 Add optional 4th argument to count(), matching find() etc.
Also change all occurrences of "x == None" to "x is None" (not that it
matters much, these functions are all reimplemented in strop -- but
count() is not).
1997-10-20 23:31:15 +00:00
Guido van Rossum dd65975ac7 Patch by Charles G. Waldman to add optional user and password
arguments to NNTP.__init__(), for nntp servers that need them.
1997-10-20 23:29:44 +00:00
Guido van Rossum 4a2a621907 Write a str() function for class objects that returns
"modulename.classname" instead of returning the same as repr().
1997-10-20 23:26:11 +00:00