Commit Graph

22560 Commits

Author SHA1 Message Date
Guido van Rossum
5e2c5fa1bd imp_load_module(): correct and comment the sense of the test for '+'
in the mode (it's forbidden).
2002-05-30 17:33:07 +00:00
Jeremy Hylton
4ae6faed9f Cover a few corners in the 'U' mode integration to make imp work.
get_file() must convert 'U' to "r" PY_STDIOTEXTMODE before calling
fopen().

imp_load_module() must accept 'r' or 'U' or something with '+'.

Also reflow some long lines.
2002-05-30 17:15:25 +00:00
Jeremy Hylton
40b7703f1c Verify that the imp can find and load .py files. 2002-05-30 17:10:20 +00:00
Fred Drake
1e9abf0efd Typo fixes. 2002-05-30 16:41:14 +00:00
Michael W. Hudson
e4df27f084 Add the pymemcompat.h header as discussed on python-dev.
Now we just need to make sure people know about it...
2002-05-30 16:22:29 +00:00
Guido van Rossum
5c16468ada Holger Krekel. 2002-05-30 15:42:58 +00:00
Guido van Rossum
84271bb34f SF #558432: Prevent Annoying ' ' from readline (Holker Krekel).
readline in all python versions is configured
    to append a 'space' character for a successful
    completion. But for almost all python expressions
    'space' is not wanted (see coding conventions PEP 8).
    For example if you have a function 'longfunction'
    and you type 'longf<TAB>' you get 'longfunction '
    as a completion. note the unwanted space at the
    end.

    The patch fixes this behaviour by setting readline's
    append_character to '\0' which means don't append
    anything. This doesn't work with readline < 2.1
    (AFAIK nowadays readline2.2 is in good use).

    An alternative approach would be to make the
    append_character
    accessable from python so that modules like
    the rlcompleter.py can set it to '\0'.

[Ed.: I think expecting readline >= 2.2 is fine.  If a completer wants
another character they can append that to the keyword in the list.]
2002-05-30 15:41:56 +00:00
Neal Norwitz
efbb67b1a7 Remove comment about inheritance, look one line up 2002-05-30 12:12:04 +00:00
Raymond Hettinger
1dbe6c0728 Move statement out of comment block 2002-05-30 00:06:01 +00:00
Guido van Rossum
ca948b40b4 Use floor division where appropriate. 2002-05-29 20:38:21 +00:00
Fred Drake
127ee1607f Minor cleanup:
- Add comment explaining the structure of the stack.
- Minor optimization: make stack tuple directly usable as part of return
  value for enter/exit events.
2002-05-29 19:40:36 +00:00
Andrew M. Kuchling
187b1d8260 Add OS/2 text 2002-05-29 19:20:57 +00:00
Neil Schemenauer
8b6b491ed7 The logreader object did not always refill the input buffer correctly
and got confused by certain log files.  Remove logreader_refill and the
associated logic and replace with fgetc.
2002-05-29 18:19:14 +00:00
Andrew M. Kuchling
d7abe2a0fb Various minor rewrites 2002-05-29 17:33:48 +00:00
Andrew M. Kuchling
72b58e0c5f More additions 2002-05-29 17:30:34 +00:00
Raymond Hettinger
aef22fb9cd Patch 560023 adding docstrings. 2.2 Candidate (after verifying modules were not updated after 2.2). 2002-05-29 16:18:42 +00:00
Neal Norwitz
d68f5171eb As discussed on python-dev, add a mechanism to indicate features
that are in the process of deprecation (PendingDeprecationWarning).
Docs could be improved.
2002-05-29 15:54:55 +00:00
Guido van Rossum
e85ee8d815 Issue an explicit error when we can't find an appropriate type for
UINT4.
2002-05-29 14:00:22 +00:00
Marc-André Lemburg
4164439240 Fix a possible segfault. Found be Neal Norvitz. 2002-05-29 13:46:29 +00:00
Marc-André Lemburg
4da6fd63bc Fix for bug [ 561796 ] string.find causes lazy error 2002-05-29 11:33:13 +00:00
Michael W. Hudson
1e1542fcff This is patch
[ 558914 ] Build md5.c fails on Cray T3E

I've also deleted a comment that I didn't understand.  Feel free to
put it back if it makes/made sense to you.
2002-05-29 10:32:24 +00:00
Neal Norwitz
72a2b4d43f Whitespace normalization 2002-05-29 00:54:38 +00:00
Guido van Rossum
1a7ac359a0 Importing Charset should not fail when Unicode is disabled. (XXX
Using Unicode-aware methods may still die with a NameError on unicode.
Maybe there's a more elegant solution but I doubt anybody cares.)
2002-05-28 18:49:03 +00:00
Guido van Rossum
05459c5e5e Accept u"..." literals even when Unicode is disabled. But these
literals must not contain \u, \U or \N escapes.  (XXX Should they also
not contain non-ASCII characters?)
2002-05-28 18:47:29 +00:00
Jack Jansen
c88da1faa5 File modes in filedescr entries are also passed to Python, so we now put "U"
in there, and convert it to "rb" (or "r" for non-universal-newline builds)
before passing it to fopen().

Fixes #561326.
2002-05-28 10:58:19 +00:00
Christian Tismer
313a7513b0 This is a Python 2.1 and 2.2 bugfix candidate:
(or how do I "mark" something to be a candidate?)

fixed an old buglet that caused bdb to be unable to
continue in the botframe, after a breakpoint was set.
the key idea is not to set botframe to the bottom level frame,
but its f_back, which actually might be None.
Additional changes: migrated old exception trick to use
sys._getframe(), which exists both in 2.1 and 2.2 .

Note: I believe Mark Hammond needs to look over his code now.
F5 correctly starts up in the debugger, but later on doesn't stop at a given
breakpoint any longer.

kind regards - chris
2002-05-28 08:04:00 +00:00
Steven M. Gava
72de9c7a9c Geiger Ho's patch for better subclassing 2002-05-27 21:58:05 +00:00
Andrew M. Kuchling
2b6edce773 Rearrange paragraph 2002-05-27 17:19:46 +00:00
Michael W. Hudson
34f20eac98 This is patch
[ 559250 ] more POSIX signal stuff

Adds support (and docs and tests and autoconfery) for posix signal
mask handling -- sigpending, sigprocmask and sigsuspend.
2002-05-27 15:08:24 +00:00
Michael W. Hudson
e5df1058f1 Silly typo. 2002-05-27 14:05:31 +00:00
Guido van Rossum
24989727b9 Use self.__class__ to instantiate a TreeNode item recursively, to
allow subclassing.
2002-05-27 13:35:05 +00:00
Chui Tey
5d2af63cc3 GvR's rpc patch 2002-05-26 13:36:41 +00:00
Fred Drake
38d53451b7 Define the "all" target more reasonably, but retain "html" as the default
target.
2002-05-25 20:28:46 +00:00
Guido van Rossum
9fc8a29663 Fix for SF bug 551412. When _PyType_Lookup() is called on a type
whose tp_mro hasn't been initialized, it would dump core.  Fix this by
checking for NULL and calling PyType_Ready().  Will fix this in 2.2.1
too.
2002-05-24 21:40:08 +00:00
Andrew M. Kuchling
a2a206b917 Mention math.degrees() and math.radians()
Other minor rewrites
2002-05-24 21:08:58 +00:00
Guido van Rossum
cacfc07d08 - A new type object, 'string', is added. This is a common base type
for 'str' and 'unicode', and can be used instead of
  types.StringTypes, e.g. to test whether something is "a string":
  isinstance(x, string) is True for Unicode and 8-bit strings.  This
  is an abstract base class and cannot be instantiated directly.
2002-05-24 19:01:59 +00:00
Guido van Rossum
9ee4b94f51 Add a safeguard against setting the class to something with a
different free or alloc slot.
2002-05-24 18:47:47 +00:00
Guido van Rossum
4b46c0a15f Don't require Unicode support. 2002-05-24 17:58:05 +00:00
Andrew M. Kuchling
0cc8c37357 Move really open-ended XXX items into comments
Remove 1.5.2 reference: who cares?
2002-05-24 17:06:17 +00:00
Guido van Rossum
2d3b986480 Disambiguate the grammar for backtick.
The old syntax suggested that a trailing comma was OK inside backticks,
but in fact (due to ideosyncrasies of pgen) it was not.  Fix the grammar
to avoid the ambiguity.  Fred: you may want to update the refman.
2002-05-24 15:47:06 +00:00
Guido van Rossum
a0a6c5a042 Add missing \ to macro definition only used when universal newlines
are disabled.
2002-05-24 15:24:38 +00:00
Raymond Hettinger
ef4d4bdc3c Whitespace normalized. 2002-05-23 23:58:17 +00:00
Jack Jansen
b66e1a3dd2 Allow the shared library initialization routine to be overridden with an initialize=xxx argument.
Should fix #492465.
2002-05-23 22:34:18 +00:00
Jack Jansen
dc74568782 Added missing dirs to LIBSUBDIRS, and reformatted it so it's easier to read
and maintain. Fixes #557482.
2002-05-23 22:18:13 +00:00
Fred Drake
92bf9dacc9 Markup adjustments; fix the names of modules referenced in an expression. 2002-05-23 21:07:19 +00:00
Tim Peters
84ee323cb9 John Aycock correctly pointed out that the grammar for
"power" was formally ambiguous.  Here's his fix.
2002-05-23 20:05:40 +00:00
Raymond Hettinger
c32f0336e0 Deprecated Random.cunifvariate clearing bug 506647. Also, added docstrings. 2002-05-23 19:44:49 +00:00
Barry Warsaw
f070cce6af (py-goto-statement-below): Watch out for landing in a triple quoted
string with text in column zero.  Skip that stuff when looking for the
"first statement following the statement containing point".
2002-05-23 19:42:16 +00:00
Fred Drake
db2e3e3c9c Added missing dependency on the refcount data file. 2002-05-23 19:41:25 +00:00
Tim Peters
1ccb3eeb7b Link with the right C library! This has always been wrong (& my fault). 2002-05-23 19:25:59 +00:00