]> granicus.if.org Git - python/log
python
23 years agodynamic option menu widget.
Steven M. Gava [Fri, 26 Oct 2001 06:49:14 +0000 (06:49 +0000)]
dynamic option menu widget.

23 years agofurther work on loading config dialog values from the config files
Steven M. Gava [Fri, 26 Oct 2001 06:47:09 +0000 (06:47 +0000)]
further work on loading config dialog values from the config files

23 years agoGeneralize dictionary() to accept a sequence of 2-sequences. At the
Tim Peters [Fri, 26 Oct 2001 05:06:50 +0000 (05:06 +0000)]
Generalize dictionary() to accept a sequence of 2-sequences.  At the
outer level, the iterator protocol is used for memory-efficiency (the
outer sequence may be very large if fully materialized); at the inner
level, PySequence_Fast() is used for time-efficiency (these should
always be sequences of length 2).

dictobject.c, new functions PyDict_{Merge,Update}FromSeq2.  These are
wholly analogous to PyDict_{Merge,Update}, but process a sequence-of-2-
sequences argument instead of a mapping object.  For now, I left these
functions file static, so no corresponding doc changes.  It's tempting
to change dict.update() to allow a sequence-of-2-seqs argument too.

Also changed the name of dictionary's keyword argument from "mapping"
to "x".  Got a better name?  "mapping_or_sequence_of_pairs" isn't
attractive, although more so than "mosop" <wink>.

abstract.h, abstract.tex:  Added new PySequence_Fast_GET_SIZE function,
much faster than going thru the all-purpose PySequence_Size.

libfuncs.tex:
- Document dictionary().
- Fiddle tuple() and list() to admit that their argument is optional.
- The long-winded repetitions of "a sequence, a container that supports
  iteration, or an iterator object" is getting to be a PITA.  Many
  months ago I suggested factoring this out into "iterable object",
  where the definition of that could include being explicit about
  generators too (as is, I'm not sure a reader outside of PythonLabs
  could guess that "an iterator object" includes a generator call).
- Please check my curly braces -- I'm going blind <0.9 wink>.

abstract.c, PySequence_Tuple():  When PyObject_GetIter() fails, leave
its error msg alone now (the msg it produces has improved since
PySequence_Tuple was generalized to accept iterable objects, and
PySequence_Tuple was also stomping on the msg in cases it shouldn't
have even before PyObject_GetIter grew a better msg).

23 years agoUpdate. __dict__ assignment done. Reorder remaining "to do" items by
Guido van Rossum [Fri, 26 Oct 2001 04:31:54 +0000 (04:31 +0000)]
Update.  __dict__ assignment done.  Reorder remaining "to do" items by
priority.  Add tp_cache; add some comments to others.

23 years agoAllow assignment to newinstance.__dict__.
Guido van Rossum [Fri, 26 Oct 2001 04:26:12 +0000 (04:26 +0000)]
Allow assignment to newinstance.__dict__.

23 years agoFix two typos, one noted by Noah Spurrier in SF bug #475166, the
Guido van Rossum [Fri, 26 Oct 2001 03:38:46 +0000 (03:38 +0000)]
Fix two typos, one noted by Noah Spurrier in SF bug #475166, the
second noted after a second's thought about what the next line should
do. :-(

23 years agoAdd sendall() method, which loops until all data is written or an
Guido van Rossum [Fri, 26 Oct 2001 03:25:00 +0000 (03:25 +0000)]
Add sendall() method, which loops until all data is written or an
error occurs, and doesn't return a count.  (This is my second patch
from SF patch #474307, with small change to the docstring for send().)

2.1.2 "bugfix" candidate.

23 years agoAdd yet more markup that let's a stylesheet pick out a small bit of the
Fred Drake [Fri, 26 Oct 2001 03:09:27 +0000 (03:09 +0000)]
Add yet more markup that let's a stylesheet pick out a small bit of the
presentation.  This is acceptable since it only occurs in the formatted
output and does not affect the document markup.

23 years agoEnforce a bit of markup consistency.
Fred Drake [Fri, 26 Oct 2001 03:04:23 +0000 (03:04 +0000)]
Enforce a bit of markup consistency.
When describing a Boolean return value, use "true" and "false" instead of
"1" and "0".
Style-guide conformance:  no "iff" -- to obscure for many readers.  ;-(

23 years agoMinor textual adjustment, and style-guide conformance (no use of "iff").
Fred Drake [Fri, 26 Oct 2001 03:00:39 +0000 (03:00 +0000)]
Minor textual adjustment, and style-guide conformance (no use of "iff").

23 years agoA fix for SF bug #472560, extra newlines returned by get_param() when
Barry Warsaw [Thu, 25 Oct 2001 22:43:46 +0000 (22:43 +0000)]
A fix for SF bug #472560, extra newlines returned by get_param() when
the separating semi-colon shows up on a continuation line (legal, but
weird).

Bug reported and fixed by Matthew Cowles.  Test case and sample email
included.

23 years agoAdded various tidbits.
Jack Jansen [Thu, 25 Oct 2001 22:26:00 +0000 (22:26 +0000)]
Added various tidbits.

23 years agoI went back and figured out the release date for Python 2.2a1.
Barry Warsaw [Thu, 25 Oct 2001 21:53:30 +0000 (21:53 +0000)]
I went back and figured out the release date for Python 2.2a1.

23 years agoApplying proposed patch for bug #474583, optional support for
Barry Warsaw [Thu, 25 Oct 2001 21:49:18 +0000 (21:49 +0000)]
Applying proposed patch for bug #474583, optional support for
non-standard but common types.  Including Martin's suggestion to add
rejected non-standard types from patch #438790.  Specifically,

guess_type(), guess_extension(): Both the functions and the methods
grow an optional "strict" flag, defaulting to true, which determines
whether to recognize non-standard, but commonly found types or not.

Also, I sorted, reformatted, and culled duplicates from the big
types_map dictionary.  Note that there are a few non-equivalent
duplicates (e.g. .cdf and .xls) for which the first will just get
thrown away.  I didn't remove those though.

Finally, use of the module as a script as grown the -l and -e options
to toggle strictness and to do guess_extension(), respectively.

Doc and unittest updates too.

23 years agoUse PyDict_Copy() and PyDict_Update() instead of using PyObject_CallMethod()
Fred Drake [Thu, 25 Oct 2001 21:38:59 +0000 (21:38 +0000)]
Use PyDict_Copy() and PyDict_Update() instead of using PyObject_CallMethod()
to call the corresponding methods.  This is not a performance improvement
since the times are still swamped by disk I/O, but cleans up the code just
a little.

23 years agoTypo: NamedNodeList --> NamedNodeMap
Fred Drake [Thu, 25 Oct 2001 20:42:57 +0000 (20:42 +0000)]
Typo: NamedNodeList --> NamedNodeMap

23 years agoFix SF bug #474538: Memory (reference) leak in poller.register (Dave Brueck)
Guido van Rossum [Thu, 25 Oct 2001 20:18:35 +0000 (20:18 +0000)]
Fix SF bug #474538: Memory (reference) leak in poller.register (Dave Brueck)

Replace some tortuous code that was trying to be clever but forgot to
DECREF the key and value, by more longwinded but obviously correct
code.

(Inspired by but not copying the fix from SF patch #475033.)

23 years agoIgnore the posixfile deprecation warning for the test suite.
Fred Drake [Thu, 25 Oct 2001 18:11:10 +0000 (18:11 +0000)]
Ignore the posixfile deprecation warning for the test suite.

23 years agocomplex_subtype_from_string(): move the declaration of s_buffer[] out
Guido van Rossum [Thu, 25 Oct 2001 18:07:22 +0000 (18:07 +0000)]
complex_subtype_from_string(): move the declaration of s_buffer[] out
of the if block where it was before.  The name is only used inside
that if block, but the storage is referenced outside it via the 's'
variable.

(This patch was part of SF patch #474590 -- RISC OS support.)

23 years agoSlightly better conformance to the Python C style guide.
Fred Drake [Thu, 25 Oct 2001 15:53:44 +0000 (15:53 +0000)]
Slightly better conformance to the Python C style guide.

23 years agoOne more LaTeX-ism that we'd rather ignore.
Fred Drake [Thu, 25 Oct 2001 15:14:57 +0000 (15:14 +0000)]
One more LaTeX-ism that we'd rather ignore.

23 years agoNo need to run make twice here.
Fred Drake [Thu, 25 Oct 2001 15:13:30 +0000 (15:13 +0000)]
No need to run make twice here.

23 years agoUpdate the rules so that changes to the HTML stylesheet cause appropriate
Fred Drake [Thu, 25 Oct 2001 15:12:31 +0000 (15:12 +0000)]
Update the rules so that changes to the HTML stylesheet cause appropriate
work to be done, but do not require the HTML to be re-built.

23 years agoAfter discussion with itojun, it was clarified that Tru64 is in error,
Martin v. Löwis [Thu, 25 Oct 2001 09:04:03 +0000 (09:04 +0000)]
After discussion with itojun, it was clarified that Tru64 is in error,
and that the work-around should be restricted to that system.

23 years ago(experimental) "finditer" method/function. this works pretty much
Fredrik Lundh [Wed, 24 Oct 2001 22:16:30 +0000 (22:16 +0000)]
(experimental) "finditer" method/function.  this works pretty much
like findall, but returns an iterator (which returns match objects)
instead of a list of strings/tuples.

23 years agoAdd a warning to the posixfile module stating that it will go away.
Fred Drake [Wed, 24 Oct 2001 22:03:35 +0000 (22:03 +0000)]
Add a warning to the posixfile module stating that it will go away.

23 years agoMake the deprecation notice use the same form as other such notices.
Fred Drake [Wed, 24 Oct 2001 21:56:59 +0000 (21:56 +0000)]
Make the deprecation notice use the same form as other such notices.
This has sat around in a deprecated state for a *long* time!

23 years agoMinor revision of the text.
Fred Drake [Wed, 24 Oct 2001 21:10:52 +0000 (21:10 +0000)]
Minor revision of the text.

23 years agoNote updated RISCOS port. Remove reference in the 2.1 release notes
Guido van Rossum [Wed, 24 Oct 2001 20:51:44 +0000 (20:51 +0000)]
Note updated RISCOS port.  Remove reference in the 2.1 release notes
to os.extsep -- that variable actually didn't exist in that release!

23 years agoConvert getrefcount() to METH_O, and sys_excepthook() to use
Fred Drake [Wed, 24 Oct 2001 20:47:48 +0000 (20:47 +0000)]
Convert getrefcount() to METH_O, and sys_excepthook() to use
PyArg_UnpackTuple().

23 years agoSF patch #474590 -- RISC OS support
Guido van Rossum [Wed, 24 Oct 2001 20:42:55 +0000 (20:42 +0000)]
SF patch #474590 -- RISC OS support

23 years agoSF bug #473525 pyclbr broken
Tim Peters [Wed, 24 Oct 2001 20:22:40 +0000 (20:22 +0000)]
SF bug #473525 pyclbr broken
As the comments in the module implied, pyclbr was easily confused by
"strange stuff" inside single- (but not triple-) quoted strings.  It
isn't anymore.  Its behavior remains flaky in the presence of nested
functions and classes, though.
Bugfix candidate.

23 years agoSF patch #474590 -- RISC OS support
Guido van Rossum [Wed, 24 Oct 2001 20:13:15 +0000 (20:13 +0000)]
SF patch #474590 -- RISC OS support

23 years agoSF patch #474590 -- RISC OS support
Guido van Rossum [Wed, 24 Oct 2001 20:04:51 +0000 (20:04 +0000)]
SF patch #474590 -- RISC OS support

23 years agoWhen describing "import *", add a level of indirection between "*" and the
Fred Drake [Wed, 24 Oct 2001 19:50:31 +0000 (19:50 +0000)]
When describing "import *", add a level of indirection between "*" and the
set of names imported (the "public names"), adding a definition of "public
names" that describes the use of __all__.
This closes SF bug #473986.

Flesh out the vague reference to __import__().

23 years agoFix typo. Thanks to Jack Jansen for spotting it.
Martin v. Löwis [Wed, 24 Oct 2001 17:35:46 +0000 (17:35 +0000)]
Fix typo. Thanks to Jack Jansen for spotting it.

23 years agoCheck for HP/UX curses problems. Define _XOPEN_SOURCE_EXTENDED and
Martin v. Löwis [Wed, 24 Oct 2001 17:10:49 +0000 (17:10 +0000)]
Check for HP/UX curses problems. Define  _XOPEN_SOURCE_EXTENDED and
STRICT_SYSV_CURSES when compiling curses module on HP/UX. Generalize
access to _flags on systems where WINDOW is opaque. Fixes bugs
#432497, #422265, and the curses parts of #467145 and #473150.

23 years agoInclude netdb.h to detect getaddrinfo. Work around problem with getaddrinfo
Martin v. Löwis [Wed, 24 Oct 2001 14:36:00 +0000 (14:36 +0000)]
Include netdb.h to detect getaddrinfo. Work around problem with getaddrinfo
not properly processing numeric IPv4 addresses. Fixes V5.1 part of #472675.

23 years agoOops, undo previous change, which wasn't supposed to escape from my
Jack Jansen [Wed, 24 Oct 2001 08:49:59 +0000 (08:49 +0000)]
Oops, undo previous change, which wasn't supposed to escape from my
machine. Luckily everyone is asleep, so I didn't have to use the time
machine.

23 years agoAdded missing cast.
Jack Jansen [Tue, 23 Oct 2001 22:29:06 +0000 (22:29 +0000)]
Added missing cast.

23 years agoSome escaped newlines had spaces between the backslash and the newline. Also slightly...
Jack Jansen [Tue, 23 Oct 2001 22:28:23 +0000 (22:28 +0000)]
Some escaped newlines had spaces between the backslash and the newline. Also slightly changed the comment on xstat().

23 years agoNew URL for Joe Strouts example page.
Jack Jansen [Tue, 23 Oct 2001 22:27:17 +0000 (22:27 +0000)]
New URL for Joe Strouts example page.

23 years agoGot this to work in MacPython. The code is #ifdef macintosh style (to match the exist...
Jack Jansen [Tue, 23 Oct 2001 22:26:16 +0000 (22:26 +0000)]
Got this to work in MacPython. The code is #ifdef macintosh style (to match the existing #ifdef MS_WINDOWS), but eventually ifdeffing on configure features is probably better.

23 years agoAdded _hotshot.
Jack Jansen [Tue, 23 Oct 2001 22:23:44 +0000 (22:23 +0000)]
Added _hotshot.

23 years agoquit() wasn't included in the suite. This is a quick manual patch to add it.
Jack Jansen [Tue, 23 Oct 2001 22:23:02 +0000 (22:23 +0000)]
quit() wasn't included in the suite. This is a quick manual patch to add it.

23 years agoTweaks for MacPython 2.2b1
Jack Jansen [Tue, 23 Oct 2001 22:22:09 +0000 (22:22 +0000)]
Tweaks for MacPython 2.2b1

23 years agoTweaks for MacPython 2.2b1.
Jack Jansen [Tue, 23 Oct 2001 22:18:10 +0000 (22:18 +0000)]
Tweaks for MacPython 2.2b1.

23 years agoApply the first chunk of the second patch from SF bug #471720:
Guido van Rossum [Tue, 23 Oct 2001 21:42:45 +0000 (21:42 +0000)]
Apply the first chunk of the second patch from SF bug #471720:
ThreadingMixIn/TCPServer forgets close (Max Neunhöffer).

This ensures that handle_error() and close_request() are called when
an error occurs in the thread.

(I am not applying the second chunk of the patch, which moved the
finish() call into the finally clause in BaseRequestHandler's __init__
method; that would be a semantic change that I cannot accept at this
point - the data would be sent even if the handler raised an
exception.)

23 years agoSF patch #474175 (Jay T Miller): file.readinto arg parsing bug
Guido van Rossum [Tue, 23 Oct 2001 21:25:24 +0000 (21:25 +0000)]
SF patch #474175 (Jay T Miller): file.readinto arg parsing bug

    The C-code in fileobject.readinto(buffer) which parses
    the arguments assumes that size_t is interchangeable
    with int:

    size_t ntodo, ndone, nnow;

    if (f->f_fp == NULL)
    return err_closed();
    if (!PyArg_Parse(args, "w#", &ptr, &ntodo))
    return NULL;

    This causes a problem on Alpha / Tru64 / OSF1 v5.1
    where size_t is a long and sizeof(long) != sizeof(int).

    The patch I'm proposing declares ntodo as an int.  An
    alternative might be to redefine w# to expect size_t.

[We can't change w# because there are probably third party modules
relying on it. GvR]

23 years agoConvert the ref() and proxy() implementations to use the new
Fred Drake [Tue, 23 Oct 2001 21:12:47 +0000 (21:12 +0000)]
Convert the ref() and proxy() implementations to use the new
PyArg_UnpackTuple() function (serves as an example and test case).

23 years agoDocumentation for the new PyArg_UnpackTuple() function.
Fred Drake [Tue, 23 Oct 2001 21:10:18 +0000 (21:10 +0000)]
Documentation for the new PyArg_UnpackTuple() function.

23 years agoPyArg_UnpackTuple(): New argument unpacking function suggested by Jim
Fred Drake [Tue, 23 Oct 2001 21:09:29 +0000 (21:09 +0000)]
PyArg_UnpackTuple():  New argument unpacking function suggested by Jim
    Fulton, based on code Jim supplied.

23 years agoFill out section on how to write a new-style class
Andrew M. Kuchling [Tue, 23 Oct 2001 20:26:16 +0000 (20:26 +0000)]
Fill out section on how to write a new-style class

23 years agotest_curses is an expected skip on Linux too.
Guido van Rossum [Tue, 23 Oct 2001 15:10:55 +0000 (15:10 +0000)]
test_curses is an expected skip on Linux too.

23 years agoStyle conformance: function name begins a new line *consistently*.
Fred Drake [Tue, 23 Oct 2001 14:41:08 +0000 (14:41 +0000)]
Style conformance: function name begins a new line *consistently*.
Make convertbuffer() static like the prototype says.  Not used elsewhere.

23 years agofont/tabs config dialog page now reads its data from the config file
Steven M. Gava [Tue, 23 Oct 2001 10:42:12 +0000 (10:42 +0000)]
font/tabs  config dialog page now reads its data from the config file

23 years agoSF bug [#473864] doctest expects spurios space.
Tim Peters [Tue, 23 Oct 2001 02:21:52 +0000 (02:21 +0000)]
SF bug [#473864] doctest expects spurios space.
Repair unlikely surprise due to magical softspace attr and the use of
print with a trailing comma in doctest examples.
Bugfix candidate.

23 years agoAdd function attributes that allow GCC to check the arguments of printf-like
Neil Schemenauer [Tue, 23 Oct 2001 02:21:22 +0000 (02:21 +0000)]
Add function attributes that allow GCC to check the arguments of printf-like
functions.

23 years agoHide GCC attributes fom compilers that don't support them.
Neil Schemenauer [Tue, 23 Oct 2001 02:20:37 +0000 (02:20 +0000)]
Hide GCC attributes fom compilers that don't support them.

23 years agoDoc and NEWS changes due to Jeremy adding traceback objects to gc.
Tim Peters [Tue, 23 Oct 2001 01:59:54 +0000 (01:59 +0000)]
Doc and NEWS changes due to Jeremy adding traceback objects to gc.

23 years agoMake traceback objects collectable.
Jeremy Hylton [Mon, 22 Oct 2001 22:17:41 +0000 (22:17 +0000)]
Make traceback objects collectable.

This should eliminate the traceback returned by sys.exc_info() as a
common source of memory leaks.

23 years agoRecord that test_curses doesn't run on win32.
Tim Peters [Mon, 22 Oct 2001 22:06:08 +0000 (22:06 +0000)]
Record that test_curses doesn't run on win32.

23 years agoFixed denial-of-weak-ref-support test; Jeremy changed the error message
Fred Drake [Mon, 22 Oct 2001 21:45:25 +0000 (21:45 +0000)]
Fixed denial-of-weak-ref-support test; Jeremy changed the error message
used by the weakref code since he didn't like the word "referencable".
Is it really necessary to be more specific than to test for TypeError here,
though?

23 years agoanother major speedup: let sre.sub/subn check for escapes in the
Fredrik Lundh [Mon, 22 Oct 2001 21:18:08 +0000 (21:18 +0000)]
another major speedup: let sre.sub/subn check for escapes in the
template string, and don't call the template compiler if we can
avoid it.

23 years agoFixed an example in the use of email.Utils.getaddresses(). The
Barry Warsaw [Mon, 22 Oct 2001 20:53:45 +0000 (20:53 +0000)]
Fixed an example in the use of email.Utils.getaddresses().  The
failobj has to be a list or the `+' can fail.

23 years agoRemoved two pointless and obfuscating macros.
Tim Peters [Mon, 22 Oct 2001 19:34:09 +0000 (19:34 +0000)]
Removed two pointless and obfuscating macros.

23 years agoAdded two very tardy notes about the 2.2b1 release, fixed a typo.
Fred Drake [Mon, 22 Oct 2001 18:41:51 +0000 (18:41 +0000)]
Added two very tardy notes about the 2.2b1 release, fixed a typo.

23 years agoA few formatting nits:
Jeremy Hylton [Mon, 22 Oct 2001 18:14:15 +0000 (18:14 +0000)]
A few formatting nits:
    Don't put paren in column 0 (to please font-lock mode).
    Put space after comma in argument list.

23 years agoAdd better support for Mozilla's use of <link> elements.
Fred Drake [Mon, 22 Oct 2001 16:57:49 +0000 (16:57 +0000)]
Add better support for Mozilla's use of <link> elements.

23 years agoAdd curses-related news items
Andrew M. Kuchling [Mon, 22 Oct 2001 16:37:10 +0000 (16:37 +0000)]
Add curses-related news items

23 years agoReferencable is not a word, so don't use it in an error message <wink>.
Jeremy Hylton [Mon, 22 Oct 2001 16:31:40 +0000 (16:31 +0000)]
Referencable is not a word, so don't use it in an error message <wink>.

23 years agocleanup indentation
Jeremy Hylton [Mon, 22 Oct 2001 16:30:36 +0000 (16:30 +0000)]
cleanup indentation

23 years agoUpdate bug/patch counts
Andrew M. Kuchling [Mon, 22 Oct 2001 15:32:05 +0000 (15:32 +0000)]
Update bug/patch counts

23 years agoPatch #473187: Add a test script that exercises most of the functions in
Andrew M. Kuchling [Mon, 22 Oct 2001 15:26:09 +0000 (15:26 +0000)]
Patch #473187: Add a test script that exercises most of the functions in
    the curses module.  It's not run automatically; '-u curses' must be
    specified as an argument to regrtest

23 years agoDo a little bit more to try and add <link> elements to the header, not that
Fred Drake [Mon, 22 Oct 2001 15:07:16 +0000 (15:07 +0000)]
Do a little bit more to try and add <link> elements to the header, not that
Mozilla 0.9.5 can make intelligent use of them.  Specifically, this causes
the "Acknowledgements" and "Global Module Index" pages to acquire "up"
links in the Mozilla "Site Navigation Bar".
This partially responds to SF bug #469772.

23 years agoClarify that the resource module does not attempt to mask platform
Fred Drake [Mon, 22 Oct 2001 14:18:23 +0000 (14:18 +0000)]
Clarify that the resource module does not attempt to mask platform
differences by defining symbols not defined on particular platforms.
This closes SF bug #473433.

23 years agoAdd correction from /F about SRE
Andrew M. Kuchling [Mon, 22 Oct 2001 14:11:06 +0000 (14:11 +0000)]
Add correction from /F about SRE
\filename{} should be \file{}

23 years agosre.split should return the last segment, even if empty
Fredrik Lundh [Mon, 22 Oct 2001 06:01:56 +0000 (06:01 +0000)]
sre.split should return the last segment, even if empty
(sorry, barry)

23 years agoMake the error message for unsupported operand types cleaner, in
Guido van Rossum [Mon, 22 Oct 2001 04:12:44 +0000 (04:12 +0000)]
Make the error message for unsupported operand types cleaner, in
response to a message by Laura Creighton on c.l.py.  E.g.

    >>> 0+''
    TypeError: unsupported operand types for +: 'int' and 'str'

(previously this did not mention the operand types)

    >>> ''+0
    TypeError: cannot concatenate 'str' and 'int' objects

23 years agoPartly fill out the PEP 252 section
Andrew M. Kuchling [Mon, 22 Oct 2001 02:03:40 +0000 (02:03 +0000)]
Partly fill out the PEP 252 section

23 years agoA bunch of minor rewordings
Andrew M. Kuchling [Mon, 22 Oct 2001 02:00:11 +0000 (02:00 +0000)]
A bunch of minor rewordings

23 years agoFix for SF bug #472940: can't getattr() attribute shown by dir()
Guido van Rossum [Mon, 22 Oct 2001 02:00:09 +0000 (02:00 +0000)]
Fix for SF bug #472940: can't getattr() attribute shown by dir()

There really isn't a good reason for instance method objects to have
their own __dict__, __doc__ and __name__ properties that just delegate
the request to the function (callable); the default attribute behavior
already does this.

The test suite had to be fixed because the error changes from
TypeError to AttributeError.

23 years agoFix some typos
Andrew M. Kuchling [Mon, 22 Oct 2001 01:47:26 +0000 (01:47 +0000)]
Fix some typos

23 years agoMethods of built-in types now properly check for keyword arguments
Guido van Rossum [Mon, 22 Oct 2001 00:43:43 +0000 (00:43 +0000)]
Methods of built-in types now properly check for keyword arguments
(formerly these were silently ignored).  The only built-in methods
that take keyword arguments are __call__, __init__ and __new__.

23 years agoMake tabnanny happy. (Piers, please run the test suite before
Guido van Rossum [Mon, 22 Oct 2001 00:42:26 +0000 (00:42 +0000)]
Make tabnanny happy.  (Piers, please run the test suite before
checking in changes.  The test suite requires consistent use of spaces
and tabs.)

23 years agoupdate version number
Piers Lauder [Sun, 21 Oct 2001 22:37:28 +0000 (22:37 +0000)]
update version number

23 years agoinstall on HP-UX does not support the -d option. Using the install-sh instead.
Neil Schemenauer [Sun, 21 Oct 2001 22:32:04 +0000 (22:32 +0000)]
install on HP-UX does not support the -d option.  Using the install-sh instead.
This fixes SF bug: [ #473491 ] "install -d" doesn't work on HP-UX.

23 years agoAdd missing "static" declarations (found by "make smelly").
Neil Schemenauer [Sun, 21 Oct 2001 22:28:58 +0000 (22:28 +0000)]
Add missing "static" declarations (found by "make smelly").

23 years agoAdding missing "static" declarations (found by "make smelly").
Neil Schemenauer [Sun, 21 Oct 2001 22:26:43 +0000 (22:26 +0000)]
Adding missing "static" declarations (found by "make smelly").

23 years ago- Build dbm module using libdb1 if it's available. This fixes SF bug "[
Neil Schemenauer [Sun, 21 Oct 2001 22:14:44 +0000 (22:14 +0000)]
- Build dbm module using libdb1 if it's available.  This fixes SF bug "[
  #230075 ] dbmmodule build fails on Debian GNU/Linux unstable (Sid)".

- Build bsddb module with libdb3 if it's available.  It also fixes a bug that
  causes the build of bsddb to fail on Debian if bsddb3-dev is installed.

23 years agofixed character set description in docstring (SRE uses Python
Fredrik Lundh [Sun, 21 Oct 2001 21:48:30 +0000 (21:48 +0000)]
fixed character set description in docstring (SRE uses Python
strings, not C strings)

removed USE_PYTHON defines, and related sre.py helpers

skip calling the subx helper if the template is callable.
interestingly enough, this means that

def callback(m):
    return literal
result = pattern.sub(callback, string)

is much faster than

result = pattern.sub(literal, string)

23 years agofix send method not noticing when partial sends happen
Piers Lauder [Sun, 21 Oct 2001 20:26:37 +0000 (20:26 +0000)]
fix send method not noticing when partial sends happen

23 years agosre.Scanner fixes (from Greg Chapman). also added a Scanner sanity
Fredrik Lundh [Sun, 21 Oct 2001 18:04:11 +0000 (18:04 +0000)]
sre.Scanner fixes (from Greg Chapman).  also added a Scanner sanity
check to the test suite.

added a few missing exception checks in the _sre module

23 years agorewrote the pattern.sub and pattern.subn methods in C
Fredrik Lundh [Sun, 21 Oct 2001 16:47:57 +0000 (16:47 +0000)]
rewrote the pattern.sub and pattern.subn methods in C

removed (conceptually flawed) getliteral helper; the new sub/subn code
uses a faster code path for literal replacement strings, but doesn't
(yet) look for literal patterns.

added STATE_OFFSET macro, and use it to convert state.start/ptr to
char indexes

23 years agoChange clear_handlers argument to indicate whether this is an initialization.
Martin v. Löwis [Sun, 21 Oct 2001 08:53:52 +0000 (08:53 +0000)]
Change clear_handlers argument to indicate whether this is an initialization.
Do not set the Expat handlers if it is. Fixes PyXML bug #473195.

23 years agoBig internal change that should have no external effects: unify the
Guido van Rossum [Sun, 21 Oct 2001 00:44:31 +0000 (00:44 +0000)]
Big internal change that should have no external effects: unify the
'slotdef' structure typedef and 'struct wrapperbase'.  By adding the
wrapper docstrings to the slotdef structure, the slotdefs array can
serve as the data structure that drives add_operators(); the wrapper
descriptor contains a pointer to slotdef structure.  This replaces
lots of custom code from add_operators() by a loop over the slotdefs
array, and does away with all the tab_xxx tables.

23 years agorewrote the pattern.split method in C
Fredrik Lundh [Sat, 20 Oct 2001 17:48:46 +0000 (17:48 +0000)]
rewrote the pattern.split method in C

also restored SRE Unicode support for 1.6/2.0/2.1

23 years agoUpdate description of border()
Andrew M. Kuchling [Sat, 20 Oct 2001 16:07:41 +0000 (16:07 +0000)]
Update description of border()

23 years agoAdd two forgotten 'break' statements
Andrew M. Kuchling [Sat, 20 Oct 2001 16:05:52 +0000 (16:05 +0000)]
Add two forgotten 'break' statements
Allow passing strings to the .border() method
Correct some error messages ("1 or 4" -> "1 to 4")
Bump version number
Tweak code formatting
Update my e-mail address

23 years agoPatch from SF bug #472956: UMR when there is a syntax error (Neal Norwitz)
Guido van Rossum [Sat, 20 Oct 2001 14:27:56 +0000 (14:27 +0000)]
Patch from SF bug #472956: UMR when there is a syntax error (Neal Norwitz)

    perrdetail.token is unitialized when there is a syntax
    error in a file.