]> granicus.if.org Git - python/log
python
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.

23 years agoPatch from SF bug #473150: configure weaknesses on HP-UX (Michael Piotrowski)
Guido van Rossum [Sat, 20 Oct 2001 14:21:45 +0000 (14:21 +0000)]
Patch from SF bug #473150: configure weaknesses on HP-UX (Michael Piotrowski)

    1. configure doesn't handle HP-UX release numbers
    (e.g., B.11.00), resulting in MACHDEP = "hpuxB".

    2. After checking for wchar.h, configure doesn't
    include it when checking the size of wchar_t.

    (Python 2.2b1 on HP-UX 11.00)

23 years agoUse the \note and \warning macros where appropriate.
Fred Drake [Sat, 20 Oct 2001 04:24:09 +0000 (04:24 +0000)]
Use the \note and \warning macros where appropriate.

23 years agoDescribe the content given as the parameter to the \note and \warning macros
Fred Drake [Sat, 20 Oct 2001 04:18:14 +0000 (04:18 +0000)]
Describe the content given as the parameter to the \note and \warning macros
in more detail, and use them where appropriate.

23 years agoAdditional rules to support the iSilo conversion.
Fred Drake [Fri, 19 Oct 2001 21:12:57 +0000 (21:12 +0000)]
Additional rules to support the iSilo conversion.

23 years agoHush up CVS.
Fred Drake [Fri, 19 Oct 2001 21:09:19 +0000 (21:09 +0000)]
Hush up CVS.

23 years agoSupport for the iSilo conversion.
Fred Drake [Fri, 19 Oct 2001 21:08:36 +0000 (21:08 +0000)]
Support for the iSilo conversion.

23 years agoThe usual post-release fiddling.
Tim Peters [Fri, 19 Oct 2001 17:55:30 +0000 (17:55 +0000)]
The usual post-release fiddling.

23 years agoWhen stating that some parameters to makefile() are similar to the open()
Fred Drake [Fri, 19 Oct 2001 17:22:29 +0000 (17:22 +0000)]
When stating that some parameters to makefile() are similar to the open()
parameters, given a hyperlink to the right part of the documentation to
make it easier to look those up.  Also, refer to the file() function/
constructor instead of open() now that that is where the actual docs for
those parameters live.
This closes SF bug #472004.

23 years agoUpdated version numbers for post 2.2b1 development.
Barry Warsaw [Fri, 19 Oct 2001 17:11:58 +0000 (17:11 +0000)]
Updated version numbers for post 2.2b1 development.

23 years agoadded tests for long ints and ints where they are > 32 bits.
Skip Montanaro [Fri, 19 Oct 2001 16:06:52 +0000 (16:06 +0000)]
added tests for long ints and ints where they are > 32 bits.
should have been checked in as part of patch #470254.

23 years agoFix for Bug #216405:
Thomas Heller [Fri, 19 Oct 2001 13:49:35 +0000 (13:49 +0000)]
Fix for Bug #216405:
use the correct base for a buffer object in _PyBuffer_FromObject.

23 years ago(Hopefully) fix SF bug #472675: CVS socketmodule now doesn't compile
Guido van Rossum [Fri, 19 Oct 2001 12:40:40 +0000 (12:40 +0000)]
(Hopefully) fix SF bug #472675: CVS socketmodule now doesn't compile

This appears to be a case of a missing \n\ in a multiline string
literal.

23 years agoAdditional test and documentation for the unicode() changes.
Marc-André Lemburg [Fri, 19 Oct 2001 12:02:29 +0000 (12:02 +0000)]
Additional test and documentation for the unicode() changes.

This patch should also be applied to the 2.2b1 trunk.

23 years agoLast minute updates for changes since 2.2a4. Unless Fred wants to add
Barry Warsaw [Fri, 19 Oct 2001 05:35:40 +0000 (05:35 +0000)]
Last minute updates for changes since 2.2a4.  Unless Fred wants to add
anything about the hotshot profiler, this file is ready for the 2.2b1
Windows build.

23 years agoAdded a note about the somewhat kludgey behavior of the message
Barry Warsaw [Fri, 19 Oct 2001 04:34:42 +0000 (04:34 +0000)]
Added a note about the somewhat kludgey behavior of the message
epilogue, based on the discussion in this SF bug report:

https://sourceforge.net/tracker/index.php?func=detail&aid=472481&group_id=25568&atid=384678

23 years agoAnother merge from mimelib:
Barry Warsaw [Fri, 19 Oct 2001 04:08:59 +0000 (04:08 +0000)]
Another merge from mimelib:

    TestMIMEMessage.test_epilogue(), TestIdempotent.test_preamble_epilogue():
    Test cases for SF bug #472481.

23 years agoAnother email package test file
Barry Warsaw [Fri, 19 Oct 2001 04:07:27 +0000 (04:07 +0000)]
Another email package test file

23 years agoAnother merge from mimelib:
Barry Warsaw [Fri, 19 Oct 2001 04:06:39 +0000 (04:06 +0000)]
Another merge from mimelib:

    _handle_multipart(): If there is an epilogue and the epilogue does
    not itself start with a newline, add a newline before writing the
    epilogue.  Closes SF bug #472481.

23 years agoAdd entry for RAND_xxx() functions in socket module.
Jeremy Hylton [Fri, 19 Oct 2001 03:40:19 +0000 (03:40 +0000)]
Add entry for RAND_xxx() functions in socket module.

23 years agoNote the Unicode changes from SF patch #470578.
Guido van Rossum [Fri, 19 Oct 2001 02:05:35 +0000 (02:05 +0000)]
Note the Unicode changes from SF patch #470578.

23 years agoSF patch #470578: Fixes to synchronize unicode() and str()
Guido van Rossum [Fri, 19 Oct 2001 02:01:31 +0000 (02:01 +0000)]
SF patch #470578: Fixes to synchronize unicode() and str()

    This patch implements what we have discussed on python-dev late in
    September: str(obj) and unicode(obj) should behave similar, while
    the old behaviour is retained for unicode(obj, encoding, errors).

    The patch also adds a new feature with which objects can provide
    unicode(obj) with input data: the __unicode__ method. Currently no
    new tp_unicode slot is implemented; this is left as option for the
    future.

    Note that PyUnicode_FromEncodedObject() no longer accepts Unicode
    objects as input. The API name already suggests that Unicode
    objects do not belong in the list of acceptable objects and the
    functionality was only needed because
    PyUnicode_FromEncodedObject() was being used directly by
    unicode(). The latter was changed in the discussed way:

    * unicode(obj) calls PyObject_Unicode()
    * unicode(obj, encoding, errors) calls PyUnicode_FromEncodedObject()

    One thing left open to discussion is whether to leave the
    PyUnicode_FromObject() API as a thin API extension on top of
    PyUnicode_FromEncodedObject() or to turn it into a (macro) alias
    for PyObject_Unicode() and deprecate it. Doing so would have some
    surprising consequences though, e.g.  u"abc" + 123 would turn out
    as u"abc123"...

[Marc-Andre didn't have time to check this in before the deadline.  I
hope this is OK, Marc-Andre!  You can still make changes and commit
them on the trunk after the branch has been made, but then please mail
Barry a context diff if you want the change to be merged into the
2.2b1 release branch.  GvR]

23 years agoAnother.
Guido van Rossum [Fri, 19 Oct 2001 01:51:11 +0000 (01:51 +0000)]
Another.

23 years agoSF patch #470393 (Jim Ahlstrom): Add missing marshal function
Guido van Rossum [Fri, 19 Oct 2001 01:46:21 +0000 (01:46 +0000)]
SF patch #470393 (Jim Ahlstrom): Add missing marshal function

    In Include/, marshal.h declares both
    PyMarshal_ReadLongFromFile()
    and PyMarshal_ReadShortFromFile(),
    but the second is missing from marshal.c.

[Shouldn't the return type be declared as 'short' instead of 'int'?
But 'int' is what was in marshal.h all those years...  --Guido]

23 years agoSF patch #460805 by Chris Gonnerman: Support for unsetenv()
Guido van Rossum [Fri, 19 Oct 2001 01:31:59 +0000 (01:31 +0000)]
SF patch #460805 by Chris Gonnerman: Support for unsetenv()

This adds unsetenv to posix, and uses it in the __delitem__ method of
os.environ.

(XXX Should we change the preferred name for putenv to setenv, for
consistency?)

23 years agoSF patch #443759: Add Interface to readline's add_history
Guido van Rossum [Fri, 19 Oct 2001 01:18:43 +0000 (01:18 +0000)]
SF patch #443759: Add Interface to readline's add_history

This was submitted by Moshe, but apparently he's too busy to check it
in himself.  He wrote:

    Here is a function in GNU readline called add_history,
    which is used to manage the history list. Though Python
    uses this function internally, it does not expose it to
    the Python programmer. This patch adds direct interface
    to this function with documentation.

    This could be used by friendly modules to "seed" the
    history with commands.

23 years agoAssume a 64-bit start and len if O_LARGEFILE is available.
Martin v. Löwis [Thu, 18 Oct 2001 22:07:48 +0000 (22:07 +0000)]
Assume a 64-bit start and len if O_LARGEFILE is available.

23 years agoExpose O_LARGEFILE, O_DIRECT, O_DIRECTORY, and O_NOFOLLOW.
Martin v. Löwis [Thu, 18 Oct 2001 22:05:36 +0000 (22:05 +0000)]
Expose O_LARGEFILE, O_DIRECT, O_DIRECTORY, and O_NOFOLLOW.

23 years agoWhitespace normalization.
Tim Peters [Thu, 18 Oct 2001 21:57:37 +0000 (21:57 +0000)]
Whitespace normalization.

23 years agoMove dlfcn.h block out of NetBSD block, assuming that NetBSD before
Martin v. Löwis [Thu, 18 Oct 2001 21:24:04 +0000 (21:24 +0000)]
Move dlfcn.h block out of NetBSD block, assuming that NetBSD before
199712 didn't have dlfcn.h, or that it wouldn't conflict with the other
stuff defined.