]> granicus.if.org Git - python/log
python
22 years agoInverted test for small speedup
Raymond Hettinger [Tue, 4 Jun 2002 18:45:50 +0000 (18:45 +0000)]
Inverted test for small speedup

22 years agoFiddle wording.
Michael W. Hudson [Tue, 4 Jun 2002 18:27:35 +0000 (18:27 +0000)]
Fiddle wording.

22 years agoFix SF bug #557436, TclError is a str should be an Exception
Neal Norwitz [Tue, 4 Jun 2002 17:14:07 +0000 (17:14 +0000)]
Fix SF bug #557436, TclError is a str should be an Exception

Make Tkinter.TclError derive from Exception, it was a string.

22 years agoFix up Guido's markup.
Fred Drake [Tue, 4 Jun 2002 16:25:57 +0000 (16:25 +0000)]
Fix up Guido's markup.

22 years agoWhen using a Python that has not been installed to build 3rd-party
Fred Drake [Tue, 4 Jun 2002 15:28:21 +0000 (15:28 +0000)]
When using a Python that has not been installed to build 3rd-party
modules, distutils does not understand that the build version of the
source tree is needed.

This patch fixes distutils.sysconfig to understand that the running
Python is part of the build tree and needs to use the appropriate
"shape" of the tree. This does not assume anything about the current
directory, so can be used to build 3rd-party modules using Python's
build tree as well.

This is useful since it allows us to use a non-installed debug-mode
Python with 3rd-party modules for testing. It as the side-effect that
set_python_build() is no longer needed (the hack which was added to
allow distutils to be used to build the "standard" extension modules).

This closes SF patch #547734.

22 years agoAdd constants BOM_UTF8, BOM_UTF16, BOM_UTF16_LE, BOM_UTF16_BE,
Walter Dörwald [Tue, 4 Jun 2002 15:16:29 +0000 (15:16 +0000)]
Add constants BOM_UTF8, BOM_UTF16, BOM_UTF16_LE, BOM_UTF16_BE,
BOM_UTF32, BOM_UTF32_LE and BOM_UTF32_BE that represent the Byte
Order Mark in UTF-8, UTF-16 and UTF-32 encodings for little and
big endian systems.

The old names BOM32_* and BOM64_* were off by a factor of 2.

This closes SF bug http://www.python.org/sf/555360

22 years agoPatch #555929: Cygwin AH_BOTTOM cleanup patch (*** version 2 ***)
Jason Tishler [Tue, 4 Jun 2002 15:07:08 +0000 (15:07 +0000)]
Patch #555929: Cygwin AH_BOTTOM cleanup patch (*** version 2 ***)

This patch complies with the following request found
near the top of configure.in:

# This is for stuff that absolutely must end up in pyconfig.h.
# Please use pyport.h instead, if possible.

I tested this patch under Cygwin, Win32, and Red
Hat Linux. Python built and ran successfully on
each of these platforms.

22 years agoTest repair now that module.__init__ requires a name and initializes
Guido van Rossum [Tue, 4 Jun 2002 06:10:37 +0000 (06:10 +0000)]
Test repair now that module.__init__ requires a name and initializes
__name__ and __doc__.

22 years agoRepair the test (adding a docstring to the module type changed the
Guido van Rossum [Tue, 4 Jun 2002 06:06:54 +0000 (06:06 +0000)]
Repair the test (adding a docstring to the module type changed the
docstring for an uninitialized module object).

22 years agoAdd a docstring to the module type.
Guido van Rossum [Tue, 4 Jun 2002 06:02:35 +0000 (06:02 +0000)]
Add a docstring to the module type.

22 years agoSurprising fix for SF bug 563060: module can be used as base class.
Guido van Rossum [Tue, 4 Jun 2002 05:58:34 +0000 (05:58 +0000)]
Surprising fix for SF bug 563060: module can be used as base class.

Change the module constructor (module_init) to have the signature
__init__(name:str, doc=None); this prevents the call from type_new()
to succeed.  While we're at it, prevent repeated calling of
module_init for the same module from leaking the dict, changing the
semantics so that __dict__ is only initialized if NULL.

Also adding a unittest, test_module.py.

This is an incompatibility with 2.2, if anybody was instantiating the
module class before, their argument list was probably empty; so this
can't be backported to 2.2.x.

22 years agoSurprising fix for SF bug 563060: module can be used as base class.
Guido van Rossum [Tue, 4 Jun 2002 05:52:47 +0000 (05:52 +0000)]
Surprising fix for SF bug 563060: module can be used as base class.

Change the module constructor (module_init) to have the signature
__init__(name:str, doc=None); this prevents the call from type_new()
to succeed.  While we're at it, prevent repeated calling of
module_init for the same module from leaking the dict, changing the
semantics so that __dict__ is only initialized if NULL.

Also adding a unittest, test_module.py.

This is an incompatibility with 2.2, if anybody was instantiating the
module class before, their argument list was probably empty; so this
can't be backported to 2.2.x.

22 years agoReplace .keys() with .iteritems(). Second review and test by Alex.
Raymond Hettinger [Tue, 4 Jun 2002 02:17:04 +0000 (02:17 +0000)]
Replace .keys() with .iteritems().  Second review and test by Alex.

22 years agoAddress the residual issue with the fix for SF 551412 in
Guido van Rossum [Mon, 3 Jun 2002 19:52:41 +0000 (19:52 +0000)]
Address the residual issue with the fix for SF 551412 in
_PyType_Lookup().  Decided to clear the error condition in the
unfortunate but unlikely case that PyType_Ready() fails.

Will fix in 2.2.x too.

22 years agoThe warning filter was ineffective when this module was invoked as a
Guido van Rossum [Mon, 3 Jun 2002 19:45:32 +0000 (19:45 +0000)]
The warning filter was ineffective when this module was invoked as a
script.

22 years agoAddressed SF bug 421973 (finally).
Guido van Rossum [Mon, 3 Jun 2002 19:06:41 +0000 (19:06 +0000)]
Addressed SF bug 421973 (finally).

Rewrote the subsection on coercion rules (and made it a proper
subsection, with a label).  The new section is much less precise,
because precise rules would be too hard to give (== I don't know what
they are any more :-).  OTOH, the new section gives much more
up-to-date information.

Also noted that __coerce__ may return NotImplemented, with the same
meaning as None.

I beg Fred forgiveness: my use of \code{} is probably naive.  Please
fix this and other markup nits.  An index entry would be nice.

This could be a 2.2 bugfix candidate, if we bother about old docs
(Fred?)

22 years agoFix HTTPError __init__ for cases where fp is None.
Jeremy Hylton [Mon, 3 Jun 2002 16:53:00 +0000 (16:53 +0000)]
Fix HTTPError __init__ for cases where fp is None.

The HTTPError class tries to act as a regular response objects for
HTTP protocol errors that include full responses.  If the failure is
more basic, like no valid response, the __init__ choked when it tried
to initialize its superclasses in addinfourl hierarchy that requires a
valid response.

The solution isn't elegant but seems to be effective.  Do not
initialize the base classes if there isn't a file object containing
the response.  In this case, user code expecting to use the addinfourl
methods will fail; but it was going to fail anyway.

It might be cleaner to factor out HTTPError into two classes, only one
of which inherits from addinfourl.  Not sure that the extra complexity
would lead to any improved functionality, though.

Partial fix for SF bug # 563665.

Bug fix candidate for 2.1 and 2.2.

22 years agoRemove uses of the string and types modules:
Walter Dörwald [Mon, 3 Jun 2002 15:58:32 +0000 (15:58 +0000)]
Remove uses of the string and types modules:

x in string.whitespace => x.isspace()
type(x) in types.StringTypes => isinstance(x, basestring)
isinstance(x, types.StringTypes) => isinstance(x, basestring)
type(x) is types.StringType => isinstance(x, str)
type(x) == types.StringType => isinstance(x, str)
string.split(x, ...) => x.split(...)
string.join(x, y) => y.join(x)
string.zfill(x, ...) => x.zfill(...)
string.count(x, ...) => x.count(...)
hasattr(types, "UnicodeType") => try: unicode except NameError:
type(x) != types.TupleTuple => not isinstance(x, tuple)
isinstance(x, types.TupleType) => isinstance(x, tuple)
type(x) is types.IntType => isinstance(x, int)

Do not mention the string module in the rlcompleter docstring.

This partially applies SF patch http://www.python.org/sf/562373
(with basestring instead of string). (It excludes the changes to
unittest.py and does not change the os.stat stuff.)

22 years agoFix a regression from the 1.68->1.69 checkin:
Walter Dörwald [Mon, 3 Jun 2002 10:41:45 +0000 (10:41 +0000)]
Fix a regression from the 1.68->1.69 checkin:

string.split(foo, bar) must be foo.split(bar) instead of bar.split(foo).

22 years agoregrtest has a new
Tim Peters [Sun, 2 Jun 2002 21:42:01 +0000 (21:42 +0000)]
regrtest has a new
   -f/--fromfile <filename>
option.  This runs all and only the tests named in the file, in the
order given (although -x may weed that list, and -r may shuffle it).
Lines starting with '#' are ignored.

This goes a long way toward helping to automate the binary-search-like
procedure I keep reinventing by hand when a test fails due to interaction
among tests (no failure in isolation, and some unknown number of
predecessor tests need to run first -- now you can stick all the test
names in a file, and comment/uncomment blocks of lines until finding a
minimal set of predecessors).

22 years ago_parsebody(): Fix for the new message/rfc822 tree structure (the
Barry Warsaw [Sun, 2 Jun 2002 19:12:03 +0000 (19:12 +0000)]
_parsebody(): Fix for the new message/rfc822 tree structure (the
parent is now a multipart with one element, the sub-message object).

22 years agoGenerator.__call__() => Generator.flatten()
Barry Warsaw [Sun, 2 Jun 2002 19:09:27 +0000 (19:09 +0000)]
Generator.__call__() => Generator.flatten()

Also, adjust to the new message/rfc822 tree layout.

22 years agoheader_encode(), encode(): Use _floordiv() from the appropriate
Barry Warsaw [Sun, 2 Jun 2002 19:08:31 +0000 (19:08 +0000)]
header_encode(), encode(): Use _floordiv() from the appropriate
compatibility module.

22 years agoUse absolute import paths for intrapackage imports.
Barry Warsaw [Sun, 2 Jun 2002 19:07:16 +0000 (19:07 +0000)]
Use absolute import paths for intrapackage imports.

22 years agoUse absolute import paths for intrapackage imports.
Barry Warsaw [Sun, 2 Jun 2002 19:05:51 +0000 (19:05 +0000)]
Use absolute import paths for intrapackage imports.

as_string(): Use Generator.flatten() for better performance.

22 years agoUse absolute import paths for intrapackage imports.
Barry Warsaw [Sun, 2 Jun 2002 19:05:08 +0000 (19:05 +0000)]
Use absolute import paths for intrapackage imports.

Use MIMENonMultipart as the base class so that you can't attach() to
these non-multipart message types.

22 years agoflatten(): Renamed from __call__() which is (silently) deprecated.
Barry Warsaw [Sun, 2 Jun 2002 19:02:37 +0000 (19:02 +0000)]
flatten(): Renamed from __call__() which is (silently) deprecated.
__call__() can be 2-3x slower than the equivalent normal method.

_handle_message(): The structure of message/rfc822 message has
changed.  Now parent's payload is a list of length 1, and the zeroth
element is the Message sub-object.  Adjust the printing of such
message trees to reflect this change.

22 years ago_intdiv2() -> _floordiv(), merge of uncommitted changes.
Barry Warsaw [Sun, 2 Jun 2002 18:59:06 +0000 (18:59 +0000)]
_intdiv2() -> _floordiv(), merge of uncommitted changes.

22 years agoReplaced .keys() with dictionary iterators
Raymond Hettinger [Sun, 2 Jun 2002 18:55:56 +0000 (18:55 +0000)]
Replaced .keys() with dictionary iterators

22 years agoGet email test to pass. Barry, hope this is what you had in mind
Neal Norwitz [Sun, 2 Jun 2002 16:38:14 +0000 (16:38 +0000)]
Get email test to pass.  Barry, hope this is what you had in mind

22 years agoMake test_mhlib run again.
Michael W. Hudson [Sun, 2 Jun 2002 16:12:06 +0000 (16:12 +0000)]
Make test_mhlib run again.

There's some wierdness here, but the test ran before and not after,
so I'm just hacking the change out.  Someone more motivated than
me can work out what's really happening.

Raymond: *PLEASE* run the test suite before checking things like
this in!

22 years agoPatch #552060: Add SSLFakeSocket.sendall. Also committed for 2.2 maint.
Martin v. Löwis [Sun, 2 Jun 2002 12:33:22 +0000 (12:33 +0000)]
Patch #552060: Add SSLFakeSocket.sendall. Also committed for 2.2 maint.

22 years agoReplaced boolean tests with is None.
Raymond Hettinger [Sun, 2 Jun 2002 03:04:52 +0000 (03:04 +0000)]
Replaced boolean tests with is None.

22 years agoReplace boolean test with is None.
Raymond Hettinger [Sun, 2 Jun 2002 00:40:05 +0000 (00:40 +0000)]
Replace boolean test with is None.

22 years agoUse somewhat longer C++ program to detect whether linking requires the C++
Martin v. Löwis [Sat, 1 Jun 2002 21:39:58 +0000 (21:39 +0000)]
Use somewhat longer C++ program to detect whether linking requires the C++
compiler. Fixes #559429. 2.2 bugfix candidate.

22 years agoReplaced obsolete stat module constants with equivalent attributes
Raymond Hettinger [Sat, 1 Jun 2002 19:51:15 +0000 (19:51 +0000)]
Replaced obsolete stat module constants with equivalent attributes

22 years agoReplace boolean test with is None.
Raymond Hettinger [Sat, 1 Jun 2002 16:07:16 +0000 (16:07 +0000)]
Replace boolean test with is None.

22 years agoSF 563203. Replaced 'has_key()' with 'in'.
Raymond Hettinger [Sat, 1 Jun 2002 14:25:41 +0000 (14:25 +0000)]
SF 563203. Replaced 'has_key()' with 'in'.

22 years agoSF 563203. Replaced 'has_key()' with 'in'.
Raymond Hettinger [Sat, 1 Jun 2002 14:18:47 +0000 (14:18 +0000)]
SF 563203. Replaced 'has_key()' with 'in'.

22 years agoBump to version 2.0.5, and also use absolute import paths.
Barry Warsaw [Sat, 1 Jun 2002 06:03:09 +0000 (06:03 +0000)]
Bump to version 2.0.5, and also use absolute import paths.

22 years agoThese two classes provide bases for more specific content type
Barry Warsaw [Sat, 1 Jun 2002 05:59:12 +0000 (05:59 +0000)]
These two classes provide bases for more specific content type
subclasses.

MIMENonMultipart: Base class for non-multipart/* content type subclass
specializations, e.g. image/gif.  This class overrides attach() which
raises an exception, since it makes no sense to attach a subpart to
e.g. an image/gif message.

MIMEMultipart: Base class for multipart/* content type subclass
specializations, e.g. multipart/mixed.  Does little more than provide
a useful constructor.

22 years agoThe _compat modules now export _floordiv() instead of _intdiv2() for
Barry Warsaw [Sat, 1 Jun 2002 05:49:17 +0000 (05:49 +0000)]
The _compat modules now export _floordiv() instead of _intdiv2() for
better code reuse.

_split() Use _floordiv().

22 years agoSlightly better docstring
Barry Warsaw [Sat, 1 Jun 2002 05:45:37 +0000 (05:45 +0000)]
Slightly better docstring

22 years agoA bogus assert in the new listiter code prevented starting Python in a
Tim Peters [Sat, 1 Jun 2002 05:22:55 +0000 (05:22 +0000)]
A bogus assert in the new listiter code prevented starting Python in a
debug build.  Repaired that, and rewrote other parts to reduce
long-winded casting.

22 years ago_is_unicode(): Use UnicodeType instead of the unicode builtin for
Barry Warsaw [Sat, 1 Jun 2002 03:56:07 +0000 (03:56 +0000)]
_is_unicode(): Use UnicodeType instead of the unicode builtin for
Python 2.1 compatibility.

22 years agoReplaced boolean test with is None
Raymond Hettinger [Sat, 1 Jun 2002 03:06:31 +0000 (03:06 +0000)]
Replaced boolean test with is None

22 years agoReplace boolean test with is None
Raymond Hettinger [Sat, 1 Jun 2002 01:29:16 +0000 (01:29 +0000)]
Replace boolean test with is None

22 years agoReplaced boolean test with 'is None'
Raymond Hettinger [Sat, 1 Jun 2002 00:57:55 +0000 (00:57 +0000)]
Replaced boolean test with 'is None'

22 years agoUse is None rather than general boolean
Raymond Hettinger [Sat, 1 Jun 2002 00:06:20 +0000 (00:06 +0000)]
Use is None rather than general boolean

22 years agoUse is None rather than general boolean
Raymond Hettinger [Fri, 31 May 2002 23:54:44 +0000 (23:54 +0000)]
Use is None rather than general boolean

22 years agoUse is None rather than general boolean
Raymond Hettinger [Fri, 31 May 2002 23:03:33 +0000 (23:03 +0000)]
Use is None rather than general boolean

22 years agoRemove unused static function
Neal Norwitz [Fri, 31 May 2002 21:47:02 +0000 (21:47 +0000)]
Remove unused static function

22 years agoSF 560736. Optimize list iteration by filling the tp_iter slot.
Raymond Hettinger [Fri, 31 May 2002 21:40:38 +0000 (21:40 +0000)]
SF 560736.  Optimize list iteration by filling the tp_iter slot.

22 years agoSF bug 533625 (Armin Rigo). rexec: potential security hole
Guido van Rossum [Fri, 31 May 2002 21:12:53 +0000 (21:12 +0000)]
SF bug 533625 (Armin Rigo). rexec: potential security hole

If a rexec instance allows writing in the current directory (a common
thing to do), there's a way to execute bogus bytecode.  Fix this by
not allowing imports from .pyc files (in a way that allows a site to
configure things so that .pyc files *are* allowed, if writing is not
allowed).

I'll apply this to 2.2 and 2.1 too.

22 years agoExplain that tp_basicsize must provide alignment for the items.
Guido van Rossum [Fri, 31 May 2002 21:00:18 +0000 (21:00 +0000)]
Explain that tp_basicsize must provide alignment for the items.

22 years agoUse string methods, remove import string
Neal Norwitz [Fri, 31 May 2002 20:51:31 +0000 (20:51 +0000)]
Use string methods, remove import string

22 years agoUse more string methods, remove import string
Neal Norwitz [Fri, 31 May 2002 20:46:39 +0000 (20:46 +0000)]
Use more string methods, remove import string

22 years agoFix typo
Neal Norwitz [Fri, 31 May 2002 20:23:33 +0000 (20:23 +0000)]
Fix typo

22 years agoImplement the intention of SF patch 472523 (but coded differently).
Guido van Rossum [Fri, 31 May 2002 20:03:54 +0000 (20:03 +0000)]
Implement the intention of SF patch 472523 (but coded differently).

In the past, an object's tp_compare could return any value.  In 2.2
the docs were tightened to require it to return -1, 0 or 1; and -1 for
an error.

We now issue a warning if the value is not in this range.  When an
exception is raised, we allow -1 or -2 as return value, since -2 will
the recommended return value for errors in the future.  (Eventually
tp_compare will also be allowed to return +2, to indicate
NotImplemented; but that can only be implemented once we know all
extensions return a value in [-2...1].  Or perhaps it will require the
type to set a flag bit.)

I haven't decided yet whether to backport this to 2.2.x.  The patch
applies fine.  But is it fair to start warning in 2.2.2 about code
that worked flawlessly in 2.2.1?

22 years agoChange name from string to basestring
Neal Norwitz [Fri, 31 May 2002 19:58:02 +0000 (19:58 +0000)]
Change name from string to basestring

22 years agoUpdate links and information on PyQt/PyKDE.
Fred Drake [Fri, 31 May 2002 18:21:56 +0000 (18:21 +0000)]
Update links and information on PyQt/PyKDE.

22 years agoReplace '== None' with 'is None'
Raymond Hettinger [Fri, 31 May 2002 17:49:10 +0000 (17:49 +0000)]
Replace '==  None' with 'is None'

22 years agoAdd definition of Py_IgnoreEnvironmentFlag (needed at least in debug
Guido van Rossum [Fri, 31 May 2002 14:32:07 +0000 (14:32 +0000)]
Add definition of Py_IgnoreEnvironmentFlag (needed at least in debug
mode).

22 years agoFix printing plural (s or "").
Neal Norwitz [Fri, 31 May 2002 14:15:11 +0000 (14:15 +0000)]
Fix printing plural (s or "").

22 years agoRemove import of re, it is not used
Neal Norwitz [Fri, 31 May 2002 14:14:06 +0000 (14:14 +0000)]
Remove import of re, it is not used

22 years agoUse string methods where possible, and remove import string
Neal Norwitz [Fri, 31 May 2002 14:13:04 +0000 (14:13 +0000)]
Use string methods where possible, and remove import string

22 years agoFix SF bug [ 561825 ] Confusing error for "del f()"
Jeremy Hylton [Fri, 31 May 2002 14:08:29 +0000 (14:08 +0000)]
Fix SF bug [ 561825 ] Confusing error for "del f()"

In the error message, say del for del and assign for everything else.

22 years agoPy_IgnoreEnvironmentFlag should be extern, since it is declared in pythonrun.c
Neal Norwitz [Fri, 31 May 2002 13:11:40 +0000 (13:11 +0000)]
Py_IgnoreEnvironmentFlag should be extern, since it is declared in pythonrun.c

22 years agoRemove unneeded import
Andrew M. Kuchling [Thu, 30 May 2002 19:15:16 +0000 (19:15 +0000)]
Remove unneeded import

22 years agoimp_load_module(): correct and comment the sense of the test for '+'
Guido van Rossum [Thu, 30 May 2002 17:33:07 +0000 (17:33 +0000)]
imp_load_module(): correct and comment the sense of the test for '+'
in the mode (it's forbidden).

22 years agoCover a few corners in the 'U' mode integration to make imp work.
Jeremy Hylton [Thu, 30 May 2002 17:15:25 +0000 (17:15 +0000)]
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.

22 years agoVerify that the imp can find and load .py files.
Jeremy Hylton [Thu, 30 May 2002 17:10:20 +0000 (17:10 +0000)]
Verify that the imp can find and load .py files.

22 years agoTypo fixes.
Fred Drake [Thu, 30 May 2002 16:41:14 +0000 (16:41 +0000)]
Typo fixes.

22 years agoAdd the pymemcompat.h header as discussed on python-dev.
Michael W. Hudson [Thu, 30 May 2002 16:22:29 +0000 (16:22 +0000)]
Add the pymemcompat.h header as discussed on python-dev.

Now we just need to make sure people know about it...

22 years agoHolger Krekel.
Guido van Rossum [Thu, 30 May 2002 15:42:58 +0000 (15:42 +0000)]
Holger Krekel.

22 years agoSF #558432: Prevent Annoying ' ' from readline (Holker Krekel).
Guido van Rossum [Thu, 30 May 2002 15:41:56 +0000 (15:41 +0000)]
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.]

22 years agoRemove comment about inheritance, look one line up
Neal Norwitz [Thu, 30 May 2002 12:12:04 +0000 (12:12 +0000)]
Remove comment about inheritance, look one line up

22 years agoMove statement out of comment block
Raymond Hettinger [Thu, 30 May 2002 00:06:01 +0000 (00:06 +0000)]
Move statement out of comment block

22 years agoUse floor division where appropriate.
Guido van Rossum [Wed, 29 May 2002 20:38:21 +0000 (20:38 +0000)]
Use floor division where appropriate.

22 years agoMinor cleanup:
Fred Drake [Wed, 29 May 2002 19:40:36 +0000 (19:40 +0000)]
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.

22 years agoAdd OS/2 text
Andrew M. Kuchling [Wed, 29 May 2002 19:20:57 +0000 (19:20 +0000)]
Add OS/2 text

22 years agoThe logreader object did not always refill the input buffer correctly
Neil Schemenauer [Wed, 29 May 2002 18:19:14 +0000 (18:19 +0000)]
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.

22 years agoVarious minor rewrites
Andrew M. Kuchling [Wed, 29 May 2002 17:33:48 +0000 (17:33 +0000)]
Various minor rewrites

22 years agoMore additions
Andrew M. Kuchling [Wed, 29 May 2002 17:30:34 +0000 (17:30 +0000)]
More additions

22 years agoPatch 560023 adding docstrings. 2.2 Candidate (after verifying modules were not...
Raymond Hettinger [Wed, 29 May 2002 16:18:42 +0000 (16:18 +0000)]
Patch 560023 adding docstrings.  2.2 Candidate (after verifying modules were not updated after 2.2).

22 years agoAs discussed on python-dev, add a mechanism to indicate features
Neal Norwitz [Wed, 29 May 2002 15:54:55 +0000 (15:54 +0000)]
As discussed on python-dev, add a mechanism to indicate features
that are in the process of deprecation (PendingDeprecationWarning).
Docs could be improved.

22 years agoIssue an explicit error when we can't find an appropriate type for
Guido van Rossum [Wed, 29 May 2002 14:00:22 +0000 (14:00 +0000)]
Issue an explicit error when we can't find an appropriate type for
UINT4.

22 years agoFix a possible segfault. Found be Neal Norvitz.
Marc-André Lemburg [Wed, 29 May 2002 13:46:29 +0000 (13:46 +0000)]
Fix a possible segfault. Found be Neal Norvitz.

22 years agoFix for bug [ 561796 ] string.find causes lazy error
Marc-André Lemburg [Wed, 29 May 2002 11:33:13 +0000 (11:33 +0000)]
Fix for bug [ 561796 ] string.find causes lazy error

22 years agoThis is patch
Michael W. Hudson [Wed, 29 May 2002 10:32:24 +0000 (10:32 +0000)]
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.

22 years agoWhitespace normalization
Neal Norwitz [Wed, 29 May 2002 00:54:38 +0000 (00:54 +0000)]
Whitespace normalization

22 years agoImporting Charset should not fail when Unicode is disabled. (XXX
Guido van Rossum [Tue, 28 May 2002 18:49:03 +0000 (18:49 +0000)]
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.)

22 years agoAccept u"..." literals even when Unicode is disabled. But these
Guido van Rossum [Tue, 28 May 2002 18:47:29 +0000 (18:47 +0000)]
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?)

22 years agoFile modes in filedescr entries are also passed to Python, so we now put "U"
Jack Jansen [Tue, 28 May 2002 10:58:19 +0000 (10:58 +0000)]
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.

22 years agoThis is a Python 2.1 and 2.2 bugfix candidate:
Christian Tismer [Tue, 28 May 2002 08:04:00 +0000 (08:04 +0000)]
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

22 years agoGeiger Ho's patch for better subclassing
Steven M. Gava [Mon, 27 May 2002 21:58:05 +0000 (21:58 +0000)]
Geiger Ho's patch for better subclassing

22 years agoRearrange paragraph
Andrew M. Kuchling [Mon, 27 May 2002 17:19:46 +0000 (17:19 +0000)]
Rearrange paragraph

22 years agoThis is patch
Michael W. Hudson [Mon, 27 May 2002 15:08:24 +0000 (15:08 +0000)]
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.

22 years agoSilly typo.
Michael W. Hudson [Mon, 27 May 2002 14:05:31 +0000 (14:05 +0000)]
Silly typo.

22 years agoUse self.__class__ to instantiate a TreeNode item recursively, to
Guido van Rossum [Mon, 27 May 2002 13:35:05 +0000 (13:35 +0000)]
Use self.__class__ to instantiate a TreeNode item recursively, to
allow subclassing.