From mhammond@users.sourceforge.net Tue Jul 1 01:13:30 2003
From: mhammond@users.sourceforge.net (mhammond@users.sourceforge.net)
Date: Mon, 30 Jun 2003 17:13:30 -0700
Subject: [Python-checkins] python/dist/src/Objects unicodeobject.c,2.189,2.190
Message-ID:
Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1:/tmp/cvs-serv6793
Modified Files:
unicodeobject.c
Log Message:
Support 'mbcs' as a 'built-in' encoding, so the C API can use it without
defering to the encodings package.
As described in [ 763111 ] mbcs encoding should skip encodings package
Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.189
retrieving revision 2.190
diff -C2 -d -r2.189 -r2.190
*** unicodeobject.c 28 Jun 2003 20:04:25 -0000 2.189
--- unicodeobject.c 1 Jul 2003 00:13:27 -0000 2.190
***************
*** 532,535 ****
--- 532,539 ----
else if (strcmp(encoding, "latin-1") == 0)
return PyUnicode_DecodeLatin1(s, size, errors);
+ #if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)
+ else if (strcmp(encoding, "mbcs") == 0)
+ return PyUnicode_DecodeMBCS(s, size, errors);
+ #endif
else if (strcmp(encoding, "ascii") == 0)
return PyUnicode_DecodeASCII(s, size, errors);
***************
*** 592,595 ****
--- 596,603 ----
else if (strcmp(encoding, "latin-1") == 0)
return PyUnicode_AsLatin1String(unicode);
+ #if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T)
+ else if (strcmp(encoding, "mbcs") == 0)
+ return PyUnicode_AsMBCSString(unicode);
+ #endif
else if (strcmp(encoding, "ascii") == 0)
return PyUnicode_AsASCIIString(unicode);
***************
*** 2620,2623 ****
--- 2628,2642 ----
}
return repr;
+ }
+
+ PyObject *PyUnicode_AsMBCSString(PyObject *unicode)
+ {
+ if (!PyUnicode_Check(unicode)) {
+ PyErr_BadArgument();
+ return NULL;
+ }
+ return PyUnicode_EncodeMBCS(PyUnicode_AS_UNICODE(unicode),
+ PyUnicode_GET_SIZE(unicode),
+ NULL);
}
From nnorwitz@users.sourceforge.net Tue Jul 1 04:33:33 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Mon, 30 Jun 2003 20:33:33 -0700
Subject: [Python-checkins] python/dist/src/Lib/test test_posixpath.py,1.8,1.9
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv32139/Lib/test
Modified Files:
test_posixpath.py
Log Message:
Fix SF #763362, test_posixpath failed
Don't check expanduser('~') if the home directory == the root directory
(ie, we are running as root).
Index: test_posixpath.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_posixpath.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** test_posixpath.py 29 Jun 2003 05:46:54 -0000 1.8
--- test_posixpath.py 1 Jul 2003 03:33:31 -0000 1.9
***************
*** 339,346 ****
else:
self.assert_(isinstance(posixpath.expanduser("~/"), basestring))
! self.assertEqual(
! posixpath.expanduser("~") + "/",
! posixpath.expanduser("~/")
! )
self.assert_(isinstance(posixpath.expanduser("~root/"), basestring))
self.assert_(isinstance(posixpath.expanduser("~foo/"), basestring))
--- 339,348 ----
else:
self.assert_(isinstance(posixpath.expanduser("~/"), basestring))
! # if home directory == root directory, this test makes no sense
! if posixpath.expanduser("~") != '/':
! self.assertEqual(
! posixpath.expanduser("~") + "/",
! posixpath.expanduser("~/")
! )
self.assert_(isinstance(posixpath.expanduser("~root/"), basestring))
self.assert_(isinstance(posixpath.expanduser("~foo/"), basestring))
From nnorwitz@users.sourceforge.net Tue Jul 1 05:14:30 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Mon, 30 Jun 2003 21:14:30 -0700
Subject: [Python-checkins] python/dist/src/Misc NEWS,1.802,1.803
Message-ID:
Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv6030/Misc
Modified Files:
NEWS
Log Message:
SF bug 753592, websucker bug
Pass the proper variable when the user supplies a directory.
Will backport.
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.802
retrieving revision 1.803
diff -C2 -d -r1.802 -r1.803
*** NEWS 30 Jun 2003 04:18:47 -0000 1.802
--- NEWS 1 Jul 2003 04:14:27 -0000 1.803
***************
*** 25,28 ****
--- 25,30 ----
-----------
+ - SF bug 753592: webchecker/wsgui now handles user supplied directories.
+
Build
-----
From nnorwitz@users.sourceforge.net Tue Jul 1 05:14:30 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Mon, 30 Jun 2003 21:14:30 -0700
Subject: [Python-checkins] python/dist/src/Tools/webchecker wsgui.py,1.6,1.7
Message-ID:
Update of /cvsroot/python/python/dist/src/Tools/webchecker
In directory sc8-pr-cvs1:/tmp/cvs-serv6030/Tools/webchecker
Modified Files:
wsgui.py
Log Message:
SF bug 753592, websucker bug
Pass the proper variable when the user supplies a directory.
Will backport.
Index: wsgui.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/webchecker/wsgui.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** wsgui.py 11 Sep 2002 20:36:02 -0000 1.6
--- wsgui.py 1 Jul 2003 04:14:28 -0000 1.7
***************
*** 162,166 ****
self.sucker.savedir = dir
self.sucker.rootdir = os.path.dirname(
! websucker.Sucker.savefilename(self, url))
self.go_button.configure(state=DISABLED)
self.auto_button.configure(state=DISABLED)
--- 162,166 ----
self.sucker.savedir = dir
self.sucker.rootdir = os.path.dirname(
! websucker.Sucker.savefilename(self.sucker, url))
self.go_button.configure(state=DISABLED)
self.auto_button.configure(state=DISABLED)
From nnorwitz@users.sourceforge.net Tue Jul 1 05:17:27 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Mon, 30 Jun 2003 21:17:27 -0700
Subject: [Python-checkins] python/dist/src/Tools/webchecker wsgui.py,1.5,1.5.18.1
Message-ID:
Update of /cvsroot/python/python/dist/src/Tools/webchecker
In directory sc8-pr-cvs1:/tmp/cvs-serv6464/Tools/webchecker
Modified Files:
Tag: release22-maint
wsgui.py
Log Message:
Backport:
SF bug 753592, websucker
Pass the proper variable when the user supplies a directory.
Index: wsgui.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/webchecker/wsgui.py,v
retrieving revision 1.5
retrieving revision 1.5.18.1
diff -C2 -d -r1.5 -r1.5.18.1
*** wsgui.py 11 May 2001 19:40:10 -0000 1.5
--- wsgui.py 1 Jul 2003 04:17:25 -0000 1.5.18.1
***************
*** 163,167 ****
self.sucker.savedir = dir
self.sucker.rootdir = os.path.dirname(
! websucker.Sucker.savefilename(self, url))
self.go_button.configure(state=DISABLED)
self.auto_button.configure(state=DISABLED)
--- 163,167 ----
self.sucker.savedir = dir
self.sucker.rootdir = os.path.dirname(
! websucker.Sucker.savefilename(self.sucker, url))
self.go_button.configure(state=DISABLED)
self.auto_button.configure(state=DISABLED)
From nnorwitz@users.sourceforge.net Tue Jul 1 05:17:27 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Mon, 30 Jun 2003 21:17:27 -0700
Subject: [Python-checkins] python/dist/src/Misc NEWS,1.337.2.4.2.88,1.337.2.4.2.89
Message-ID:
Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv6464/Misc
Modified Files:
Tag: release22-maint
NEWS
Log Message:
Backport:
SF bug 753592, websucker
Pass the proper variable when the user supplies a directory.
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.337.2.4.2.88
retrieving revision 1.337.2.4.2.89
diff -C2 -d -r1.337.2.4.2.88 -r1.337.2.4.2.89
*** NEWS 14 Jun 2003 07:20:04 -0000 1.337.2.4.2.88
--- NEWS 1 Jul 2003 04:17:24 -0000 1.337.2.4.2.89
***************
*** 4,7 ****
--- 4,9 ----
Classes are now also deepcopyable.
+ - SF #753592: webchecker/wsgui now handles user supplied directories.
+
What's New in Python 2.2.3 (final) ?
Release date: 30-May-2003
From bcannon@users.sourceforge.net Tue Jul 1 06:16:10 2003
From: bcannon@users.sourceforge.net (bcannon@users.sourceforge.net)
Date: Mon, 30 Jun 2003 22:16:10 -0700
Subject: [Python-checkins] python/dist/src/Misc NEWS,1.803,1.804
Message-ID:
Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv13084/Misc
Modified Files:
NEWS
Log Message:
Make temporary change of using _strptime for time.strptime permanent.
Flesh out docs to better explain time.strptime (closes bug #697990).
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.803
retrieving revision 1.804
diff -C2 -d -r1.803 -r1.804
*** NEWS 1 Jul 2003 04:14:27 -0000 1.803
--- NEWS 1 Jul 2003 05:16:07 -0000 1.804
***************
*** 19,22 ****
--- 19,25 ----
- SSL no longer crashes the interpreter when the remote side disconnects.
+ - time.strptime now exclusively uses the Python implementation
+ contained within the _strptime module.
+
Library
-------
From bcannon@users.sourceforge.net Tue Jul 1 06:16:10 2003
From: bcannon@users.sourceforge.net (bcannon@users.sourceforge.net)
Date: Mon, 30 Jun 2003 22:16:10 -0700
Subject: [Python-checkins] python/dist/src/Modules timemodule.c,2.137,2.138
Message-ID:
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv13084/Modules
Modified Files:
timemodule.c
Log Message:
Make temporary change of using _strptime for time.strptime permanent.
Flesh out docs to better explain time.strptime (closes bug #697990).
Index: timemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v
retrieving revision 2.137
retrieving revision 2.138
diff -C2 -d -r2.137 -r2.138
*** timemodule.c 10 May 2003 07:36:55 -0000 2.137
--- timemodule.c 1 Jul 2003 05:16:08 -0000 2.138
***************
*** 417,458 ****
#endif /* HAVE_STRFTIME */
- #undef HAVE_STRPTIME
- #ifdef HAVE_STRPTIME
-
- #if 0
- /* Enable this if it's not declared in */
- extern char *strptime(const char *, const char *, struct tm *);
- #endif
-
- static PyObject *
- time_strptime(PyObject *self, PyObject *args)
- {
- struct tm tm;
- char *fmt = "%a %b %d %H:%M:%S %Y";
- char *buf;
- char *s;
-
- if (!PyArg_ParseTuple(args, "s|s:strptime", &buf, &fmt))
- return NULL;
- memset((void *) &tm, '\0', sizeof(tm));
- s = strptime(buf, fmt, &tm);
- if (s == NULL) {
- PyErr_SetString(PyExc_ValueError, "format mismatch");
- return NULL;
- }
- while (*s && isspace(Py_CHARMASK(*s)))
- s++;
- if (*s) {
- PyErr_Format(PyExc_ValueError,
- "unconverted data remains: '%.400s'", s);
- return NULL;
- }
- return tmtotuple(&tm);
- }
-
- #endif /* HAVE_STRPTIME */
-
- #ifndef HAVE_STRPTIME
-
static PyObject *
time_strptime(PyObject *self, PyObject *args)
--- 417,420 ----
***************
*** 468,475 ****
}
- #endif /* !HAVE_STRPTIME */
-
PyDoc_STRVAR(strptime_doc,
! "strptime(string, format) -> tuple\n\
\n\
Parse a string to a time tuple according to a format specification.\n\
--- 430,435 ----
}
PyDoc_STRVAR(strptime_doc,
! "strptime(string, format) -> struct_time\n\
\n\
Parse a string to a time tuple according to a format specification.\n\
From bcannon@users.sourceforge.net Tue Jul 1 06:16:10 2003
From: bcannon@users.sourceforge.net (bcannon@users.sourceforge.net)
Date: Mon, 30 Jun 2003 22:16:10 -0700
Subject: [Python-checkins] python/dist/src/Doc/lib libtime.tex,1.57,1.58
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv13084/Doc/lib
Modified Files:
libtime.tex
Log Message:
Make temporary change of using _strptime for time.strptime permanent.
Flesh out docs to better explain time.strptime (closes bug #697990).
Index: libtime.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtime.tex,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** libtime.tex 8 Jun 2003 13:57:19 -0000 1.57
--- libtime.tex 1 Jul 2003 05:16:08 -0000 1.58
***************
*** 289,300 ****
directives as those used by \function{strftime()}; it defaults to
\code{"\%a \%b \%d \%H:\%M:\%S \%Y"} which matches the formatting
! returned by \function{ctime()}. The same platform caveats apply; see
! the local \UNIX{} documentation for restrictions or additional
! supported directives. If \var{string} cannot be parsed according to
! \var{format}, \exception{ValueError} is raised. Values which are not
! provided as part of the input string are filled in with default
! values; the specific values are platform-dependent as the XPG standard
! does not provide sufficient information to constrain the result.
! \end{funcdesc}
\begin{datadesc}{struct_time}
--- 289,303 ----
directives as those used by \function{strftime()}; it defaults to
\code{"\%a \%b \%d \%H:\%M:\%S \%Y"} which matches the formatting
! returned by \function{ctime()}. If \var{string} cannot be parsed
! according to \var{format}, \exception{ValueError} is raised. If the
! string to be parsed has excess data after parsing,
! \exception{ValueError} is raised. The default values used to fill in
! any missing data is \code{(1900, 1, 1, 0, 0, 0, 0, 1, -1)} .
!
! Support for the \code{\%Z} directive is based on the values contained in
! \code{tzname} and whether \code{daylight} is true. Because of this
! it is platform-specifc sans recognition for UTC and GMT which are
! always known (and are considered to be non-daylight savings
! timezones).
\begin{datadesc}{struct_time}
From bcannon@users.sourceforge.net Tue Jul 1 06:25:00 2003
From: bcannon@users.sourceforge.net (bcannon@users.sourceforge.net)
Date: Mon, 30 Jun 2003 22:25:00 -0700
Subject: [Python-checkins] python/dist/src/Python ast.c,1.1.2.27,1.1.2.28
Message-ID:
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv14164/Python
Modified Files:
Tag: ast-branch
ast.c
Log Message:
Very minor doc and syntax changes.
Index: ast.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/Attic/ast.c,v
retrieving revision 1.1.2.27
retrieving revision 1.1.2.28
diff -C2 -d -r1.1.2.27 -r1.1.2.28
*** ast.c 28 Apr 2003 12:11:22 -0000 1.1.2.27
--- ast.c 1 Jul 2003 05:24:58 -0000 1.1.2.28
***************
*** 12,16 ****
/* XXX TO DO
re-indent this file
! internal error checking
syntax errors
*/
--- 12,16 ----
/* XXX TO DO
re-indent this file
! internal error checking (such as function return values, etc.)
syntax errors
*/
***************
*** 23,27 ****
static expr_ty ast_for_testlist(const node *);
! /* Note different signature for call */
static expr_ty ast_for_call(const node *, expr_ty);
--- 23,27 ----
static expr_ty ast_for_testlist(const node *);
! /* Note different signature for ast_for_call */
static expr_ty ast_for_call(const node *, expr_ty);
***************
*** 379,386 ****
n_defaults++;
}
! args = n_args ? asdl_seq_new(n_args) : NULL;
if (!args && n_args)
return NULL;
! defaults = n_defaults? asdl_seq_new(n_defaults) : NULL;
if (!defaults && n_defaults) {
if (args) asdl_seq_free(args);
--- 379,386 ----
n_defaults++;
}
! args = (n_args ? asdl_seq_new(n_args) : NULL);
if (!args && n_args)
return NULL;
! defaults = (n_defaults ? asdl_seq_new(n_defaults) : NULL);
if (!defaults && n_defaults) {
if (args) asdl_seq_free(args);
From bcannon@users.sourceforge.net Tue Jul 1 06:32:39 2003
From: bcannon@users.sourceforge.net (bcannon@users.sourceforge.net)
Date: Mon, 30 Jun 2003 22:32:39 -0700
Subject: [Python-checkins] python/dist/src/Python ast.c,1.1.2.28,1.1.2.29
Message-ID:
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv14755/Python
Modified Files:
Tag: ast-branch
ast.c
Log Message:
Catch when function arguments are out of order in terms of kinds of arguments
(default args, *NAME, etc.). Needs better error reporting, though.
Currently causes a bus error (at least under OS X) because calls to the
affected function do not currently check the return value for possible NULL
arguments to flag a failure.
Index: ast.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/Attic/ast.c,v
retrieving revision 1.1.2.28
retrieving revision 1.1.2.29
diff -C2 -d -r1.1.2.28 -r1.1.2.29
*** ast.c 1 Jul 2003 05:24:58 -0000 1.1.2.28
--- ast.c 1 Jul 2003 05:32:37 -0000 1.1.2.29
***************
*** 92,96 ****
}
! mod_ty PyAST_FromNode(const node *n)
{
int i, j, num, total;
--- 92,100 ----
}
! /* Generate AST from concrete syntax tree
! */
!
! mod_ty
! PyAST_FromNode(const node *n)
{
int i, j, num, total;
***************
*** 352,355 ****
--- 356,361 ----
/* XXX TO DO
check for invalid argument lists like normal after default
+ DONE; causes bus error since calls to this function do not check
+ for possible NULL result to signal an error.
handle nested tuple arguments
*/
***************
*** 363,366 ****
--- 369,377 ----
identifier vararg = NULL, kwarg = NULL;
node *ch;
+ /* Used to make sure that different kinds of arguments come in the proper
+ order */
+ enum parameter_kinds
+ {fpdef_kind=1, defaults_kind=2, vararg_kind=3, kwarg_kind=4}
+ parameter_kind = fpdef_kind;
if (TYPE(n) == parameters) {
***************
*** 404,412 ****
return NULL;
}
! if (TYPE(CHILD(ch, 0)) == NAME)
! asdl_seq_APPEND(args, Name(NEW_IDENTIFIER(CHILD(ch, 0)),
! Param));
if (i + 1 < NCH(n) && TYPE(CHILD(n, i + 1)) == EQUAL) {
asdl_seq_APPEND(defaults, ast_for_expr(CHILD(n, i + 2)));
i += 2;
}
--- 415,437 ----
return NULL;
}
! if (TYPE(CHILD(ch, 0)) == NAME) {
! if (parameter_kind > fpdef_kind) {
! fprintf(stderr, "Error in order of arg kinds\n");
! PyErr_Occurred();
! return NULL;
! }
! asdl_seq_APPEND(args, Name(NEW_IDENTIFIER(CHILD(ch, 0)),
! Param));
! /* Don't need to set parameter_kind since that is the
! default */
! }
if (i + 1 < NCH(n) && TYPE(CHILD(n, i + 1)) == EQUAL) {
+ if (parameter_kind > defaults_kind) {
+ fprintf(stderr, "Error in order of arg kinds\n");
+ PyErr_Occurred();
+ return NULL;
+ }
asdl_seq_APPEND(defaults, ast_for_expr(CHILD(n, i + 2)));
+ parameter_kind = defaults_kind;
i += 2;
}
***************
*** 414,422 ****
--- 439,459 ----
break;
case STAR:
+ if (parameter_kind > vararg_kind) {
+ fprintf(stderr, "Error in order of arg kinds\n");
+ PyErr_Occurred();
+ return NULL;
+ }
vararg = NEW_IDENTIFIER(CHILD(n, i+1));
+ parameter_kind = vararg_kind;
i += 3;
break;
case DOUBLESTAR:
+ if (parameter_kind > kwarg_kind) {
+ fprintf(stderr, "Error in order of arg kinds\n");
+ PyErr_Occurred();
+ return NULL;
+ }
kwarg = NEW_IDENTIFIER(CHILD(n, i+1));
+ parameter_kind = kwarg_kind;
i += 3;
break;
From bcannon@users.sourceforge.net Tue Jul 1 06:34:29 2003
From: bcannon@users.sourceforge.net (bcannon@users.sourceforge.net)
Date: Mon, 30 Jun 2003 22:34:29 -0700
Subject: [Python-checkins] python/dist/src/Lib Queue.py,1.18,1.19
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv15225a/Lib
Modified Files:
Queue.py
Log Message:
Add __all__ .
Index: Queue.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/Queue.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** Queue.py 30 Dec 2002 22:36:09 -0000 1.18
--- Queue.py 1 Jul 2003 05:34:27 -0000 1.19
***************
*** 3,6 ****
--- 3,8 ----
from time import time as _time, sleep as _sleep
+ __all__ = ['Empty', 'Full', 'Queue']
+
class Empty(Exception):
"Exception raised by Queue.get(block=0)/get_nowait()."
From rhettinger@users.sourceforge.net Tue Jul 1 06:49:04 2003
From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net)
Date: Mon, 30 Jun 2003 22:49:04 -0700
Subject: [Python-checkins] python/dist/src/Lib/test test___all__.py,1.33,1.34
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv16660
Modified Files:
test___all__.py
Log Message:
Test Brett's addition of __all__ to Queue.
Index: test___all__.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test___all__.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** test___all__.py 10 May 2003 05:37:13 -0000 1.33
--- test___all__.py 1 Jul 2003 05:49:02 -0000 1.34
***************
*** 60,63 ****
--- 60,64 ----
self.check_all("Cookie")
self.check_all("MimeWriter")
+ self.check_all("Queue")
self.check_all("SimpleHTTPServer")
self.check_all("SocketServer")
From rhettinger@users.sourceforge.net Tue Jul 1 07:19:36 2003
From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net)
Date: Mon, 30 Jun 2003 23:19:36 -0700
Subject: [Python-checkins] python/dist/src/Doc/tut tut.tex,1.191,1.192
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/tut
In directory sc8-pr-cvs1:/tmp/cvs-serv19998
Modified Files:
tut.tex
Log Message:
SF #751062: Tutorial: remove string exceptions, add parnassus, #posts
(Contributed by Gerritt Holl)
* Remove the last mentions of string exceptions
* Reference a third-party repository of programs
* Minor clarification of comp.lang.py posting volumes
Index: tut.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v
retrieving revision 1.191
retrieving revision 1.192
diff -C2 -d -r1.191 -r1.192
*** tut.tex 30 Jun 2003 04:27:31 -0000 1.191
--- tut.tex 1 Jul 2003 06:19:34 -0000 1.192
***************
*** 4118,4126 ****
function object corresponding to the method.
! \subsection{Exceptions Can Be Classes \label{exceptionClasses}}
! User-defined exceptions are no longer limited to being string objects
! --- they can be identified by classes as well. Using this mechanism it
! is possible to create extensible hierarchies of exceptions.
There are two new valid (semantic) forms for the raise statement:
--- 4118,4125 ----
function object corresponding to the method.
! \subsection{Exceptions Are Classes Too\label{exceptionClasses}}
! User-defined exceptions are identified by classes as well. Using this
! mechanism it is possible to create extensible hierarchies of exceptions.
There are two new valid (semantic) forms for the raise statement:
***************
*** 4140,4145 ****
\end{verbatim}
! An except clause may list classes as well as string objects. A class
! in an except clause is compatible with an exception if it is the same
class or a base class thereof (but not the other way around --- an
except clause listing a derived class is not compatible with a base
--- 4139,4143 ----
\end{verbatim}
! A class in an except clause is compatible with an exception if it is the same
class or a base class thereof (but not the other way around --- an
except clause listing a derived class is not compatible with a base
***************
*** 4200,4204 ****
informal site is \url{http://starship.python.net/}, which contains a
bunch of Python-related personal home pages; many people have
! downloadable software there.
For Python-related questions and problem reports, you can post to the
--- 4198,4204 ----
informal site is \url{http://starship.python.net/}, which contains a
bunch of Python-related personal home pages; many people have
! downloadable software there. Many more user-created Python modules
! can be found in a third-party repository at
! \url{http://www.vex.net/parnassus}.
For Python-related questions and problem reports, you can post to the
***************
*** 4206,4210 ****
list at \email{python-list@python.org}. The newsgroup and mailing list
are gatewayed, so messages posted to one will automatically be
! forwarded to the other. There are around 120 postings a day,
% Postings figure based on average of last six months activity as
% reported by www.egroups.com; Jan. 2000 - June 2000: 21272 msgs / 182
--- 4206,4211 ----
list at \email{python-list@python.org}. The newsgroup and mailing list
are gatewayed, so messages posted to one will automatically be
! forwarded to the other. There are around 120 postings a day (with peaks
! up to several hundred),
% Postings figure based on average of last six months activity as
% reported by www.egroups.com; Jan. 2000 - June 2000: 21272 msgs / 182
From rhettinger@users.sourceforge.net Tue Jul 1 07:29:20 2003
From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net)
Date: Mon, 30 Jun 2003 23:29:20 -0700
Subject: [Python-checkins] python/dist/src/Doc/lib libtime.tex,1.58,1.59
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv21096a
Modified Files:
libtime.tex
Log Message:
Fix spelling, grammar, usage, and markup.
Index: libtime.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtime.tex,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** libtime.tex 1 Jul 2003 05:16:08 -0000 1.58
--- libtime.tex 1 Jul 2003 06:29:18 -0000 1.59
***************
*** 296,303 ****
Support for the \code{\%Z} directive is based on the values contained in
! \code{tzname} and whether \code{daylight} is true. Because of this
! it is platform-specifc sans recognition for UTC and GMT which are
always known (and are considered to be non-daylight savings
timezones).
\begin{datadesc}{struct_time}
--- 296,304 ----
Support for the \code{\%Z} directive is based on the values contained in
! \code{tzname} and whether \code{daylight} is true. Because of this,
! it is platform-specific without recognition for UTC and GMT which are
always known (and are considered to be non-daylight savings
timezones).
+ \end{funcdesc}
\begin{datadesc}{struct_time}
From rhettinger@users.sourceforge.net Tue Jul 1 08:19:19 2003
From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net)
Date: Tue, 01 Jul 2003 00:19:19 -0700
Subject: [Python-checkins] python/dist/src/Doc/lib libtime.tex,1.59,1.60
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv26257
Modified Files:
libtime.tex
Log Message:
Improve the wording a bit
Index: libtime.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtime.tex,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** libtime.tex 1 Jul 2003 06:29:18 -0000 1.59
--- libtime.tex 1 Jul 2003 07:19:17 -0000 1.60
***************
*** 297,301 ****
Support for the \code{\%Z} directive is based on the values contained in
\code{tzname} and whether \code{daylight} is true. Because of this,
! it is platform-specific without recognition for UTC and GMT which are
always known (and are considered to be non-daylight savings
timezones).
--- 297,301 ----
Support for the \code{\%Z} directive is based on the values contained in
\code{tzname} and whether \code{daylight} is true. Because of this,
! it is platform-specific except for recognizing UTC and GMT which are
always known (and are considered to be non-daylight savings
timezones).
From nnorwitz@users.sourceforge.net Tue Jul 1 14:44:31 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Tue, 01 Jul 2003 06:44:31 -0700
Subject: [Python-checkins] python/dist/src/Lib/test test_socket_ssl.py,1.7,1.8
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv10938/Lib/test
Modified Files:
test_socket_ssl.py
Log Message:
Fix SF bug #763770, test_socket_ssl crash
Don't run any tests if there is no ssl support.
Index: test_socket_ssl.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_socket_ssl.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** test_socket_ssl.py 30 Jun 2003 03:25:20 -0000 1.7
--- test_socket_ssl.py 1 Jul 2003 13:44:28 -0000 1.8
***************
*** 12,17 ****
def test_basic():
test_support.requires('network')
- if not hasattr(socket, "ssl"):
- raise test_support.TestSkipped("socket module has no ssl support")
import urllib
--- 12,15 ----
***************
*** 62,65 ****
--- 60,65 ----
def test_main():
+ if not hasattr(socket, "ssl"):
+ raise test_support.TestSkipped("socket module has no ssl support")
test_rude_shutdown()
test_basic()
From tim_one@users.sourceforge.net Tue Jul 1 15:38:02 2003
From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net)
Date: Tue, 01 Jul 2003 07:38:02 -0700
Subject: [Python-checkins] python/dist/src/Doc/lib libwarnings.tex,1.11,1.12
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv20597/python/Doc/lib
Modified Files:
libwarnings.tex
Log Message:
showwarning() calls formatwarning(), not showwarning().
Bugfix candidate.
Index: libwarnings.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libwarnings.tex,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** libwarnings.tex 6 Feb 2003 14:38:45 -0000 1.11
--- libwarnings.tex 1 Jul 2003 14:37:59 -0000 1.12
***************
*** 185,189 ****
lineno\optional{, file}}
Write a warning to a file. The default implementation calls
! \code{showwarning(\var{message}, \var{category}, \var{filename},
\var{lineno})} and writes the resulting string to \var{file}, which
defaults to \code{sys.stderr}. You may replace this function with an
--- 185,189 ----
lineno\optional{, file}}
Write a warning to a file. The default implementation calls
! \code{formatwarning(\var{message}, \var{category}, \var{filename},
\var{lineno})} and writes the resulting string to \var{file}, which
defaults to \code{sys.stderr}. You may replace this function with an
From tim_one@users.sourceforge.net Tue Jul 1 15:49:34 2003
From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net)
Date: Tue, 01 Jul 2003 07:49:34 -0700
Subject: [Python-checkins] python/dist/src/Lib/test test_socket_ssl.py,1.8,1.9
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv23530/Lib/test
Modified Files:
test_socket_ssl.py
Log Message:
connector(): You can't use an empty string as an argument to connect()
on Windows.
Index: test_socket_ssl.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_socket_ssl.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** test_socket_ssl.py 1 Jul 2003 13:44:28 -0000 1.8
--- test_socket_ssl.py 1 Jul 2003 14:49:32 -0000 1.9
***************
*** 46,50 ****
def connector():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
! s.connect(('', PORT))
try:
ssl_sock = socket.ssl(s)
--- 46,50 ----
def connector():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
! s.connect(('localhost', PORT))
try:
ssl_sock = socket.ssl(s)
From nnorwitz@users.sourceforge.net Tue Jul 1 15:57:10 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Tue, 01 Jul 2003 07:57:10 -0700
Subject: [Python-checkins] python/dist/src/Lib difflib.py,1.14,1.15
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv25889/Lib
Modified Files:
difflib.py
Log Message:
Fix SF bug #763023, difflib.py: ratio() zero division not caught
Backport candidate
Index: difflib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/difflib.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** difflib.py 17 Jun 2003 16:53:25 -0000 1.14
--- difflib.py 1 Jul 2003 14:57:08 -0000 1.15
***************
*** 30,33 ****
--- 30,38 ----
'unified_diff']
+ def _calculate_ratio(matches, length):
+ if length:
+ return 2.0 * matches / length
+ return 1.0
+
class SequenceMatcher:
***************
*** 612,616 ****
matches = reduce(lambda sum, triple: sum + triple[-1],
self.get_matching_blocks(), 0)
! return 2.0 * matches / (len(self.a) + len(self.b))
def quick_ratio(self):
--- 617,621 ----
matches = reduce(lambda sum, triple: sum + triple[-1],
self.get_matching_blocks(), 0)
! return _calculate_ratio(matches, len(self.a) + len(self.b))
def quick_ratio(self):
***************
*** 641,645 ****
if numb > 0:
matches = matches + 1
! return 2.0 * matches / (len(self.a) + len(self.b))
def real_quick_ratio(self):
--- 646,650 ----
if numb > 0:
matches = matches + 1
! return _calculate_ratio(matches, len(self.a) + len(self.b))
def real_quick_ratio(self):
***************
*** 653,657 ****
# can't have more matches than the number of elements in the
# shorter sequence
! return 2.0 * min(la, lb) / (la + lb)
def get_close_matches(word, possibilities, n=3, cutoff=0.6):
--- 658,662 ----
# can't have more matches than the number of elements in the
# shorter sequence
! return _calculate_ratio(min(la, lb), la + lb)
def get_close_matches(word, possibilities, n=3, cutoff=0.6):
From nnorwitz@users.sourceforge.net Tue Jul 1 15:57:10 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Tue, 01 Jul 2003 07:57:10 -0700
Subject: [Python-checkins] python/dist/src/Lib/test test_difflib.py,1.5,1.6
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv25889/Lib/test
Modified Files:
test_difflib.py
Log Message:
Fix SF bug #763023, difflib.py: ratio() zero division not caught
Backport candidate
Index: test_difflib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_difflib.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_difflib.py 23 Jul 2002 19:03:48 -0000 1.5
--- test_difflib.py 1 Jul 2003 14:57:08 -0000 1.6
***************
*** 1,3 ****
! import difflib
! from test import test_support
! test_support.run_doctest(difflib)
--- 1,15 ----
! import difflib
! from test import test_support
! import unittest
!
! class TestSFbugs(unittest.TestCase):
!
! def test_ratio_for_null_seqn(self):
! # Check clearing of SF bug 763023
! s = difflib.SequenceMatcher(None, [], [])
! self.assertEqual(s.ratio(), 1)
! self.assertEqual(s.quick_ratio(), 1)
! self.assertEqual(s.real_quick_ratio(), 1)
!
! test_support.run_unittest(TestSFbugs)
! test_support.run_doctest(difflib)
From nnorwitz@users.sourceforge.net Tue Jul 1 15:59:49 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Tue, 01 Jul 2003 07:59:49 -0700
Subject: [Python-checkins] python/dist/src/Misc NEWS,1.804,1.805
Message-ID:
Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv26606/Misc
Modified Files:
NEWS
Log Message:
Fix SF bug #763023, difflib.py: ratio() zero division not caught
Backport candidate
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.804
retrieving revision 1.805
diff -C2 -d -r1.804 -r1.805
*** NEWS 1 Jul 2003 05:16:07 -0000 1.804
--- NEWS 1 Jul 2003 14:59:46 -0000 1.805
***************
*** 25,28 ****
--- 25,31 ----
-------
+ - SF bug 763023: fix uncaught ZeroDivisionError in difflib ratio methods
+ when there are no lines.
+
Tools/Demos
-----------
From nnorwitz@users.sourceforge.net Tue Jul 1 16:03:51 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Tue, 01 Jul 2003 08:03:51 -0700
Subject: [Python-checkins] python/dist/src/Lib/test test_difflib.py,1.6,1.7
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv27585/Lib/test
Modified Files:
test_difflib.py
Log Message:
Remove carriage returns
Index: test_difflib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_difflib.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** test_difflib.py 1 Jul 2003 14:57:08 -0000 1.6
--- test_difflib.py 1 Jul 2003 15:03:49 -0000 1.7
***************
*** 1,15 ****
! import difflib
! from test import test_support
! import unittest
!
! class TestSFbugs(unittest.TestCase):
!
! def test_ratio_for_null_seqn(self):
! # Check clearing of SF bug 763023
! s = difflib.SequenceMatcher(None, [], [])
! self.assertEqual(s.ratio(), 1)
! self.assertEqual(s.quick_ratio(), 1)
! self.assertEqual(s.real_quick_ratio(), 1)
!
! test_support.run_unittest(TestSFbugs)
! test_support.run_doctest(difflib)
--- 1,15 ----
! import difflib
! from test import test_support
! import unittest
!
! class TestSFbugs(unittest.TestCase):
!
! def test_ratio_for_null_seqn(self):
! # Check clearing of SF bug 763023
! s = difflib.SequenceMatcher(None, [], [])
! self.assertEqual(s.ratio(), 1)
! self.assertEqual(s.quick_ratio(), 1)
! self.assertEqual(s.real_quick_ratio(), 1)
!
! test_support.run_unittest(TestSFbugs)
! test_support.run_doctest(difflib)
From nnorwitz@users.sourceforge.net Tue Jul 1 16:12:35 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Tue, 01 Jul 2003 08:12:35 -0700
Subject: [Python-checkins] python/dist/src/Lib difflib.py,1.6.10.1,1.6.10.2
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv31467/Lib
Modified Files:
Tag: release22-maint
difflib.py
Log Message:
Fix SF bug #763023, difflib.py: ratio() zero division not caught
Index: difflib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/difflib.py,v
retrieving revision 1.6.10.1
retrieving revision 1.6.10.2
diff -C2 -d -r1.6.10.1 -r1.6.10.2
*** difflib.py 30 Oct 2002 06:33:33 -0000 1.6.10.1
--- difflib.py 1 Jul 2003 15:12:33 -0000 1.6.10.2
***************
*** 25,28 ****
--- 25,33 ----
'Differ', 'IS_CHARACTER_JUNK', 'IS_LINE_JUNK']
+ def _calculate_ratio(matches, length):
+ if length:
+ return 2.0 * matches / length
+ return 1.0
+
class SequenceMatcher:
***************
*** 526,530 ****
matches = reduce(lambda sum, triple: sum + triple[-1],
self.get_matching_blocks(), 0)
! return 2.0 * matches / (len(self.a) + len(self.b))
def quick_ratio(self):
--- 531,535 ----
matches = reduce(lambda sum, triple: sum + triple[-1],
self.get_matching_blocks(), 0)
! return _calculate_ratio(matches, len(self.a) + len(self.b))
def quick_ratio(self):
***************
*** 555,559 ****
if numb > 0:
matches = matches + 1
! return 2.0 * matches / (len(self.a) + len(self.b))
def real_quick_ratio(self):
--- 560,564 ----
if numb > 0:
matches = matches + 1
! return _calculate_ratio(matches, len(self.a) + len(self.b))
def real_quick_ratio(self):
***************
*** 567,571 ****
# can't have more matches than the number of elements in the
# shorter sequence
! return 2.0 * min(la, lb) / (la + lb)
def get_close_matches(word, possibilities, n=3, cutoff=0.6):
--- 572,576 ----
# can't have more matches than the number of elements in the
# shorter sequence
! return _calculate_ratio(min(la, lb), la + lb)
def get_close_matches(word, possibilities, n=3, cutoff=0.6):
From nnorwitz@users.sourceforge.net Tue Jul 1 16:12:36 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Tue, 01 Jul 2003 08:12:36 -0700
Subject: [Python-checkins] python/dist/src/Misc NEWS,1.337.2.4.2.89,1.337.2.4.2.90
Message-ID:
Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv31467/Misc
Modified Files:
Tag: release22-maint
NEWS
Log Message:
Fix SF bug #763023, difflib.py: ratio() zero division not caught
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.337.2.4.2.89
retrieving revision 1.337.2.4.2.90
diff -C2 -d -r1.337.2.4.2.89 -r1.337.2.4.2.90
*** NEWS 1 Jul 2003 04:17:24 -0000 1.337.2.4.2.89
--- NEWS 1 Jul 2003 15:12:33 -0000 1.337.2.4.2.90
***************
*** 6,9 ****
--- 6,12 ----
- SF #753592: webchecker/wsgui now handles user supplied directories.
+ - SF bug 763023: fix uncaught ZeroDivisionError in difflib ratio methods
+ when there are no lines.
+
What's New in Python 2.2.3 (final) ?
Release date: 30-May-2003
From fdrake@users.sourceforge.net Tue Jul 1 17:17:52 2003
From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net)
Date: Tue, 01 Jul 2003 09:17:52 -0700
Subject: [Python-checkins] python/dist/src/Doc/ext newtypes.tex,1.30,1.31
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/ext
In directory sc8-pr-cvs1:/tmp/cvs-serv11977
Modified Files:
newtypes.tex
Log Message:
normalize markup for consistency
Index: newtypes.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ext/newtypes.tex,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** newtypes.tex 28 Jun 2003 15:22:16 -0000 1.30
--- newtypes.tex 1 Jul 2003 16:17:50 -0000 1.31
***************
*** 159,163 ****
This is so that Python knows how much memory to allocate when you call
! \cfunction{PyObject_New}.
\begin{verbatim}
--- 159,163 ----
This is so that Python knows how much memory to allocate when you call
! \cfunction{PyObject_New()}.
\begin{verbatim}
***************
*** 193,197 ****
\member{tp_new} implementation. In this case, we can just use the
default implementation provided by the API function
! \cfunction{PyType_GenericNew}. We'd like to just assign this to the
\member{tp_new} slot, but we can't, for portability sake, On some
platforms or compilers, we can't statically initialize a structure
--- 193,197 ----
\member{tp_new} implementation. In this case, we can just use the
default implementation provided by the API function
! \cfunction{PyType_GenericNew()}. We'd like to just assign this to the
\member{tp_new} slot, but we can't, for portability sake, On some
platforms or compilers, we can't statically initialize a structure
***************
*** 210,214 ****
Everything else in the file should be familiar, except for some code
! in \cfunction{initnoddy}:
\begin{verbatim}
--- 210,214 ----
Everything else in the file should be familiar, except for some code
! in \cfunction{initnoddy()}:
\begin{verbatim}
***************
*** 316,320 ****
This method decrements the reference counts of the two Python
! attributes. We use \cfunction{Py_XDECREF} here because the
\member{first} and \member{last} members could be \NULL. It then
calls the \member{tp_free} member of the object's type to free the
--- 316,320 ----
This method decrements the reference counts of the two Python
! attributes. We use \cfunction{Py_XDECREF()} here because the
\member{first} and \member{last} members could be \NULL. It then
calls the \member{tp_free} member of the object's type to free the
***************
*** 363,374 ****
The new member is responsible for creating (as opposed to
initializing) objects of the type. It is exposed in Python as the
! \method{__new__} method. See the paper titled ``Unifying types and
! classes in Python'' for a detailed discussion of the \method{__new__}
method. One reason to implement a new method is to assure the initial
values of instance variables. In this case, we use the new method to
make sure that the initial values of the members \member{first} and
\member{last} are not \NULL. If we didn't care whether the initial
! values were \NULL, we could have used \cfunction{PyType_GenericNew} as
! our new method, as we did before. \cfunction{PyType_GenericNew}
initializes all of the instance variable members to NULLs.
--- 363,374 ----
The new member is responsible for creating (as opposed to
initializing) objects of the type. It is exposed in Python as the
! \method{__new__()} method. See the paper titled ``Unifying types and
! classes in Python'' for a detailed discussion of the \method{__new__()}
method. One reason to implement a new method is to assure the initial
values of instance variables. In this case, we use the new method to
make sure that the initial values of the members \member{first} and
\member{last} are not \NULL. If we didn't care whether the initial
! values were \NULL, we could have used \cfunction{PyType_GenericNew()} as
! our new method, as we did before. \cfunction{PyType_GenericNew()}
initializes all of the instance variable members to NULLs.
***************
*** 423,427 ****
The \member{tp_init} slot is exposed in Python as the
! \method{__init__} method. It is used to initialize an object after
it's created. Unlike the new method, we can't guarantee that the
initializer is called. The initializer isn't called when unpickling
--- 423,427 ----
The \member{tp_init} slot is exposed in Python as the
! \method{__init__()} method. It is used to initialize an object after
it's created. Unlike the new method, we can't guarantee that the
initializer is called. The initializer isn't called when unpickling
***************
*** 551,556 ****
\end{verbatim}
! We rename \cfunction{initnoddy} to \cfunction{initnoddy2}
! and update the module name passed to \cfunction{Py_InitModule3}.
Finally, we update our \file{setup.py} file to build the new module:
--- 551,556 ----
\end{verbatim}
! We rename \cfunction{initnoddy()} to \cfunction{initnoddy2()}
! and update the module name passed to \cfunction{Py_InitModule3()}.
Finally, we update our \file{setup.py} file to build the new module:
***************
*** 662,666 ****
\member{last} members are never NULL so we can remove checks for \NULL
values in almost all cases. This means that most of the
! \cfunction{Py_XDECREF} calls can be converted to \cfunction{Py_DECREF}
calls. The only place we can't change these calls is in the
deallocator, where there is the possibility that the initialization of
--- 662,666 ----
\member{last} members are never NULL so we can remove checks for \NULL
values in almost all cases. This means that most of the
! \cfunction{Py_XDECREF()} calls can be converted to \cfunction{Py_DECREF()}
calls. The only place we can't change these calls is in the
deallocator, where there is the possibility that the initialization of
***************
*** 724,729 ****
For each subobject that can participate in cycles, we need to call the
! \cfunction{visit} function, which is passed to the traversal method.
! The \cfunction{visit} function takes as arguments the subobject and
the extra argument \var{arg} passed to the traversal method.
--- 724,729 ----
For each subobject that can participate in cycles, we need to call the
! \cfunction{visit()} function, which is passed to the traversal method.
! The \cfunction{visit()} function takes as arguments the subobject and
the extra argument \var{arg} passed to the traversal method.
***************
*** 752,756 ****
\end{verbatim}
! Finally, we add the \constant{Py_TPFLAGS_HAVE_GC} flag to the class flags:
\begin{verbatim}
--- 752,757 ----
\end{verbatim}
! Finally, we add the \constant{Py_TPFLAGS_HAVE_GC} flag to the class
! flags:
\begin{verbatim}
From fdrake@users.sourceforge.net Tue Jul 1 17:31:34 2003
From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net)
Date: Tue, 01 Jul 2003 09:31:34 -0700
Subject: [Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.139,1.140
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv14160
Modified Files:
libfuncs.tex
Log Message:
- note that super() only applies to new-style classes;
closes SF bug #764003
- fix markup for consistency
Index: libfuncs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.139
retrieving revision 1.140
diff -C2 -d -r1.139 -r1.140
*** libfuncs.tex 26 Jun 2003 03:11:57 -0000 1.139
--- libfuncs.tex 1 Jul 2003 16:31:26 -0000 1.140
***************
*** 936,941 ****
Return the superclass of \var{type}. If the second argument is omitted
the super object returned is unbound. If the second argument is an
! object, isinstance(obj, type) must be true. If the second argument is a
! type, issubclass(type2, type) must be true.
A typical use for calling a cooperative superclass method is:
--- 936,943 ----
Return the superclass of \var{type}. If the second argument is omitted
the super object returned is unbound. If the second argument is an
! object, \code{isinstance(\var{obj}, \var{type})} must be true. If
! the second argument is a type, \code{issubclass(\var{type2},
! \var{type})} must be true.
! \function{super()} only works for new-style classes.
A typical use for calling a cooperative superclass method is:
From tim_one@users.sourceforge.net Tue Jul 1 20:28:46 2003
From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net)
Date: Tue, 01 Jul 2003 12:28:46 -0700
Subject: [Python-checkins] python/dist/src/Lib threading.py,1.36,1.37
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv12035/Lib
Modified Files:
threading.py
Log Message:
Resolved minor XXX question in the obvious way.
Index: threading.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/threading.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** threading.py 29 Jun 2003 17:24:17 -0000 1.36
--- threading.py 1 Jul 2003 19:28:44 -0000 1.37
***************
*** 27,31 ****
# Debug support (adapted from ihooks.py)
! _VERBOSE = 0 # XXX Bool or int?
if __debug__:
--- 27,31 ----
# Debug support (adapted from ihooks.py)
! _VERBOSE = False
if __debug__:
From tim_one@users.sourceforge.net Tue Jul 1 21:01:57 2003
From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net)
Date: Tue, 01 Jul 2003 13:01:57 -0700
Subject: [Python-checkins] python/dist/src/Misc NEWS,1.805,1.806
Message-ID:
Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv19112/Misc
Modified Files:
NEWS
Log Message:
Make the classes exposed by threading.py new-style classes. This is
mostly for convenience and to aid debugging.
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.805
retrieving revision 1.806
diff -C2 -d -r1.805 -r1.806
*** NEWS 1 Jul 2003 14:59:46 -0000 1.805
--- NEWS 1 Jul 2003 20:01:55 -0000 1.806
***************
*** 25,28 ****
--- 25,31 ----
-------
+ - The classes in threading.py are now new-style classes. That they
+ weren't before was an oversight.
+
- SF bug 763023: fix uncaught ZeroDivisionError in difflib ratio methods
when there are no lines.
From tim_one@users.sourceforge.net Tue Jul 1 21:01:57 2003
From: tim_one@users.sourceforge.net (tim_one@users.sourceforge.net)
Date: Tue, 01 Jul 2003 13:01:57 -0700
Subject: [Python-checkins] python/dist/src/Lib threading.py,1.37,1.38
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv19112/Lib
Modified Files:
threading.py
Log Message:
Make the classes exposed by threading.py new-style classes. This is
mostly for convenience and to aid debugging.
Index: threading.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/threading.py,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** threading.py 1 Jul 2003 19:28:44 -0000 1.37
--- threading.py 1 Jul 2003 20:01:55 -0000 1.38
***************
*** 25,29 ****
! # Debug support (adapted from ihooks.py)
_VERBOSE = False
--- 25,33 ----
! # Debug support (adapted from ihooks.py).
! # All the major classes here derive from _Verbose. We force that to
! # be a new-style class so that all the major classes here are new-style.
! # This helps debugging (type(instance) is more revealing for instances
! # of new-style classes).
_VERBOSE = False
***************
*** 31,35 ****
if __debug__:
! class _Verbose:
def __init__(self, verbose=None):
--- 35,39 ----
if __debug__:
! class _Verbose(object):
def __init__(self, verbose=None):
***************
*** 47,51 ****
else:
# Disable this when using "python -O"
! class _Verbose:
def __init__(self, verbose=None):
pass
--- 51,55 ----
else:
# Disable this when using "python -O"
! class _Verbose(object):
def __init__(self, verbose=None):
pass
From nnorwitz@users.sourceforge.net Tue Jul 1 21:15:23 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Tue, 01 Jul 2003 13:15:23 -0700
Subject: [Python-checkins] python/dist/src/Modules bz2module.c,1.19,1.20 readline.c,2.62,2.63
Message-ID:
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv22688/Modules
Modified Files:
bz2module.c readline.c
Log Message:
Use appropriate macros not the deprecated DL_IMPORT/DL_EXPORT macros
Index: bz2module.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/bz2module.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** bz2module.c 3 May 2003 09:14:53 -0000 1.19
--- bz2module.c 1 Jul 2003 20:15:21 -0000 1.20
***************
*** 2168,2172 ****
");
! DL_EXPORT(void)
initbz2(void)
{
--- 2168,2172 ----
");
! PyMODINIT_FUNC
initbz2(void)
{
Index: readline.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/readline.c,v
retrieving revision 2.62
retrieving revision 2.63
diff -C2 -d -r2.62 -r2.63
*** readline.c 1 Mar 2003 15:19:41 -0000 2.62
--- readline.c 1 Jul 2003 20:15:21 -0000 2.63
***************
*** 33,38 ****
/* Pointers needed from outside (but not declared in a header file). */
! extern DL_IMPORT(int) (*PyOS_InputHook)(void);
! extern DL_IMPORT(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *,char *);
--- 33,38 ----
/* Pointers needed from outside (but not declared in a header file). */
! PyAPI_FUNC(int) (*PyOS_InputHook)(void);
! PyAPI_FUNC(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *,char *);
From nnorwitz@users.sourceforge.net Tue Jul 1 21:15:23 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Tue, 01 Jul 2003 13:15:23 -0700
Subject: [Python-checkins] python/dist/src/Include pyerrors.h,2.64,2.65 stringobject.h,2.38,2.39
Message-ID:
Update of /cvsroot/python/python/dist/src/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv22688/Include
Modified Files:
pyerrors.h stringobject.h
Log Message:
Use appropriate macros not the deprecated DL_IMPORT/DL_EXPORT macros
Index: pyerrors.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pyerrors.h,v
retrieving revision 2.64
retrieving revision 2.65
diff -C2 -d -r2.64 -r2.65
*** pyerrors.h 11 Dec 2002 14:04:57 -0000 2.64
--- pyerrors.h 1 Jul 2003 20:15:21 -0000 2.65
***************
*** 64,68 ****
#endif
#ifdef __VMS
! extern DL_IMPORT(PyObject *) PyExc_VMSError;
#endif
--- 64,68 ----
#endif
#ifdef __VMS
! PyAPI_DATA(PyObject *) PyExc_VMSError;
#endif
Index: stringobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/stringobject.h,v
retrieving revision 2.38
retrieving revision 2.39
diff -C2 -d -r2.38 -r2.39
*** stringobject.h 15 Sep 2002 14:09:46 -0000 2.38
--- stringobject.h 1 Jul 2003 20:15:21 -0000 2.39
***************
*** 66,70 ****
PyAPI_FUNC(PyObject *) _PyString_FormatLong(PyObject*, int, int,
int, char**, int*);
! extern DL_IMPORT(PyObject *) PyString_DecodeEscape(const char *, int,
const char *, int,
const char *);
--- 66,70 ----
PyAPI_FUNC(PyObject *) _PyString_FormatLong(PyObject*, int, int,
int, char**, int*);
! PyAPI_FUNC(PyObject *) PyString_DecodeEscape(const char *, int,
const char *, int,
const char *);
From jvr@users.sourceforge.net Tue Jul 1 21:15:40 2003
From: jvr@users.sourceforge.net (jvr@users.sourceforge.net)
Date: Tue, 01 Jul 2003 13:15:40 -0700
Subject: [Python-checkins] python/dist/src/Lib/plat-mac plistlib.py,1.2,1.3
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib/plat-mac
In directory sc8-pr-cvs1:/tmp/cvs-serv22839
Modified Files:
plistlib.py
Log Message:
- replaced a couple of asserts with proper exceptions
- use isinstance instead of flaky file-detection code
Index: plistlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-mac/plistlib.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** plistlib.py 9 Apr 2003 13:25:43 -0000 1.2
--- plistlib.py 1 Jul 2003 20:15:38 -0000 1.3
***************
*** 143,147 ****
self.writeArray(value)
else:
! assert 0, "unsuported type: %s" % type(value)
def writeData(self, data):
--- 143,147 ----
self.writeArray(value)
else:
! raise TypeError("unsuported type: %s" % type(value))
def writeData(self, data):
***************
*** 157,161 ****
items.sort()
for key, value in items:
! assert isinstance(key, (str, unicode)), "keys must be strings"
self.simpleElement("key", key)
self.writeValue(value)
--- 157,162 ----
items.sort()
for key, value in items:
! if not isinstance(key, (str, unicode)):
! raise TypeError("keys must be strings")
self.simpleElement("key", key)
self.writeValue(value)
***************
*** 205,209 ****
def fromFile(cls, pathOrFile):
didOpen = 0
! if not hasattr(pathOrFile, "write"):
pathOrFile = open(pathOrFile)
didOpen = 1
--- 206,210 ----
def fromFile(cls, pathOrFile):
didOpen = 0
! if isinstance(pathOrFile, (str, unicode)):
pathOrFile = open(pathOrFile)
didOpen = 1
***************
*** 216,220 ****
def write(self, pathOrFile):
! if not hasattr(pathOrFile, "write"):
pathOrFile = open(pathOrFile, "w")
didOpen = 1
--- 217,221 ----
def write(self, pathOrFile):
! if isinstance(pathOrFile, (str, unicode)):
pathOrFile = open(pathOrFile, "w")
didOpen = 1
From jvr@users.sourceforge.net Tue Jul 1 21:22:32 2003
From: jvr@users.sourceforge.net (jvr@users.sourceforge.net)
Date: Tue, 01 Jul 2003 13:22:32 -0700
Subject: [Python-checkins] python/dist/src/Lib/test test_plistlib.py,1.2,1.3
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv24114
Modified Files:
test_plistlib.py
Log Message:
- added (c)StringIO tests; cStringIO usage failed in the previous
version of plistlib.py (r1.2)
Index: test_plistlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_plistlib.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_plistlib.py 7 Mar 2003 17:30:47 -0000 1.2
--- test_plistlib.py 1 Jul 2003 20:22:30 -0000 1.3
***************
*** 50,53 ****
--- 50,69 ----
self.assertEqual(dict(pl), dict(pl2))
+ def test_stringio(self):
+ from StringIO import StringIO
+ f = StringIO()
+ pl = self._create()
+ pl.write(f)
+ pl2 = plistlib.Plist.fromFile(StringIO(f.getvalue()))
+ self.assertEqual(dict(pl), dict(pl2))
+
+ def test_cstringio(self):
+ from cStringIO import StringIO
+ f = StringIO()
+ pl = self._create()
+ pl.write(f)
+ pl2 = plistlib.Plist.fromFile(StringIO(f.getvalue()))
+ self.assertEqual(dict(pl), dict(pl2))
+
From nnorwitz@users.sourceforge.net Tue Jul 1 22:12:49 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Tue, 01 Jul 2003 14:12:49 -0700
Subject: [Python-checkins] python/dist/src/Lib/lib-tk Tkinter.py,1.176,1.177
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib/lib-tk
In directory sc8-pr-cvs1:/tmp/cvs-serv4006/Lib/lib-tk
Modified Files:
Tkinter.py
Log Message:
Fix SF bug #763637, 2.3b2 unpack tuple of wrong size in after_cancel
Tk 8.4 may return different values than 8.3. This fix should handle
either version.
Index: Tkinter.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Tkinter.py,v
retrieving revision 1.176
retrieving revision 1.177
diff -C2 -d -r1.176 -r1.177
*** Tkinter.py 7 Jun 2003 19:52:38 -0000 1.176
--- Tkinter.py 1 Jul 2003 21:12:47 -0000 1.177
***************
*** 476,481 ****
given as first parameter."""
try:
! (script, type) = self.tk.splitlist(
! self.tk.call('after', 'info', id))
self.deletecommand(script)
except TclError:
--- 476,483 ----
given as first parameter."""
try:
! data = self.tk.call('after', 'info', id)
! # In Tk 8.3, splitlist returns: (script, type)
! # In Tk 8.4, splitlist may return (script, type) or (script,)
! script = self.tk.splitlist(data)[0]
self.deletecommand(script)
except TclError:
From nnorwitz@users.sourceforge.net Tue Jul 1 22:12:49 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Tue, 01 Jul 2003 14:12:49 -0700
Subject: [Python-checkins] python/dist/src/Misc NEWS,1.806,1.807
Message-ID:
Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv4006/Misc
Modified Files:
NEWS
Log Message:
Fix SF bug #763637, 2.3b2 unpack tuple of wrong size in after_cancel
Tk 8.4 may return different values than 8.3. This fix should handle
either version.
Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.806
retrieving revision 1.807
diff -C2 -d -r1.806 -r1.807
*** NEWS 1 Jul 2003 20:01:55 -0000 1.806
--- NEWS 1 Jul 2003 21:12:47 -0000 1.807
***************
*** 31,34 ****
--- 31,37 ----
when there are no lines.
+ - SF bug 763637: fix exception in Tkinter with after_cancel
+ which could occur with Tk 8.4
+
Tools/Demos
-----------
From nnorwitz@users.sourceforge.net Tue Jul 1 22:37:40 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Tue, 01 Jul 2003 14:37:40 -0700
Subject: [Python-checkins] python/dist/src/Doc/dist dist.tex,1.36.16.3,1.36.16.4
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/dist
In directory sc8-pr-cvs1:/tmp/cvs-serv9604/Doc/dist
Modified Files:
Tag: release22-maint
dist.tex
Log Message:
Backport theller's checkin:
Document the DISTUTILS_DEBUG variable.
Closes sf #761401.
Index: dist.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/dist/dist.tex,v
retrieving revision 1.36.16.3
retrieving revision 1.36.16.4
diff -C2 -d -r1.36.16.3 -r1.36.16.4
*** dist.tex 31 Mar 2003 16:45:22 -0000 1.36.16.3
--- dist.tex 1 Jul 2003 21:37:38 -0000 1.36.16.4
***************
*** 664,667 ****
--- 664,688 ----
+ \subsection{Debugging the setup script}
+ \label{meta-data}
+
+ Sometimes things go wrong, and the setup script doesn't do what the
+ developer wants.
+
+ Distutils catches any exceptions when running the setup script, and
+ print a simple error message before the script is terminated. The
+ motivation for this behaviour is to not confuse administrators who
+ don't know much about Python and are trying to install a package. If
+ they get a big long traceback from deep inside the guts of Distutils,
+ they may think the package or the Python installation is broken
+ because they don't read all the way down to the bottom and see that
+ it's a permission problem.
+
+ On the other hand, this doesn't help the developer to find the cause
+ of the failure. For this purpose, the DISTUTILS_DEBUG environment
+ variable can be set to anything except an empty string, and distutils
+ will now print detailed information what it is doing, and prints the
+ full traceback in case an exception occurrs.
+
\section{Writing the Setup Configuration File}
\label{setup-config}
From nnorwitz@users.sourceforge.net Tue Jul 1 22:49:00 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Tue, 01 Jul 2003 14:49:00 -0700
Subject: [Python-checkins] python/dist/src/Doc/lib libwarnings.tex,1.6.16.1,1.6.16.2
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv12520/Doc/lib
Modified Files:
Tag: release22-maint
libwarnings.tex
Log Message:
Backport tim_one's checkin:
showwarning() calls formatwarning(), not showwarning().
Index: libwarnings.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libwarnings.tex,v
retrieving revision 1.6.16.1
retrieving revision 1.6.16.2
diff -C2 -d -r1.6.16.1 -r1.6.16.2
*** libwarnings.tex 12 Mar 2002 19:51:16 -0000 1.6.16.1
--- libwarnings.tex 1 Jul 2003 21:48:57 -0000 1.6.16.2
***************
*** 175,179 ****
lineno\optional{, file}}
Write a warning to a file. The default implementation calls
! \code{showwarning(\var{message}, \var{category}, \var{filename},
\var{lineno})} and writes the resulting string to \var{file}, which
defaults to \code{sys.stderr}. You may replace this function with an
--- 175,179 ----
lineno\optional{, file}}
Write a warning to a file. The default implementation calls
! \code{formatwarning(\var{message}, \var{category}, \var{filename},
\var{lineno})} and writes the resulting string to \var{file}, which
defaults to \code{sys.stderr}. You may replace this function with an
From nnorwitz@users.sourceforge.net Wed Jul 2 03:49:36 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Tue, 01 Jul 2003 19:49:36 -0700
Subject: [Python-checkins] python/dist/src/Lib os.py,1.71,1.72
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv13681/Lib
Modified Files:
os.py
Log Message:
SF #764121, docstring for spawnlp incorrect
Index: os.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/os.py,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -d -r1.71 -r1.72
*** os.py 13 May 2003 17:57:23 -0000 1.71
--- os.py 2 Jul 2003 02:49:33 -0000 1.72
***************
*** 581,585 ****
# so it won't have spawnlp[e] either.
def spawnlp(mode, file, *args):
! """spawnlp(mode, file, *args, env) -> integer
Execute file (which is looked for along $PATH) with arguments from
--- 581,585 ----
# so it won't have spawnlp[e] either.
def spawnlp(mode, file, *args):
! """spawnlp(mode, file, *args) -> integer
Execute file (which is looked for along $PATH) with arguments from
From nnorwitz@users.sourceforge.net Wed Jul 2 03:51:18 2003
From: nnorwitz@users.sourceforge.net (nnorwitz@users.sourceforge.net)
Date: Tue, 01 Jul 2003 19:51:18 -0700
Subject: [Python-checkins] python/dist/src/Lib os.py,1.50.8.7,1.50.8.8
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv13821/Lib
Modified Files:
Tag: release22-maint
os.py
Log Message:
SF #764121, docstring for spawnlp incorrect
Index: os.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/os.py,v
retrieving revision 1.50.8.7
retrieving revision 1.50.8.8
diff -C2 -d -r1.50.8.7 -r1.50.8.8
*** os.py 28 Mar 2003 22:31:41 -0000 1.50.8.7
--- os.py 2 Jul 2003 02:51:15 -0000 1.50.8.8
***************
*** 538,542 ****
# so it won't have spawnlp[e] either.
def spawnlp(mode, file, *args):
! """spawnlp(mode, file, *args, env) -> integer
Execute file (which is looked for along $PATH) with arguments from
--- 538,542 ----
# so it won't have spawnlp[e] either.
def spawnlp(mode, file, *args):
! """spawnlp(mode, file, *args) -> integer
Execute file (which is looked for along $PATH) with arguments from
From jackjansen@users.sourceforge.net Wed Jul 2 10:02:29 2003
From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net)
Date: Wed, 02 Jul 2003 02:02:29 -0700
Subject: [Python-checkins] python/dist/src/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide - New directory
Message-ID:
Update of /cvsroot/python/python/dist/src/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide
In directory sc8-pr-cvs1:/tmp/cvs-serv21648/ide
Log Message:
Directory /cvsroot/python/python/dist/src/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide added to the repository
From jackjansen@users.sourceforge.net Wed Jul 2 10:20:09 2003
From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net)
Date: Wed, 02 Jul 2003 02:20:09 -0700
Subject: [Python-checkins] python/dist/src/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide IDE.gif,NONE,1.1 entering_in_new_window.gif,NONE,1.1 hello_world.gif,NONE,1.1 index.html,NONE,1.1 loading_ide.gif,NONE,1.1 making_new_window.gif,NONE,1.1 new_ide_window.gif,NONE,1.1 new_window_made.gif,NONE,1.1 output_window.gif,NONE,1.1 saving_edited_file.gif,NONE,1.1 simple_commands.gif,NONE,1.1 syntax_error.gif,NONE,1.1
Message-ID:
Update of /cvsroot/python/python/dist/src/Mac/OSXResources/app/Resources/English.lproj/Documentation/ide
In directory sc8-pr-cvs1:/tmp/cvs-serv23935/OSXResources/app/Resources/English.lproj/Documentation/ide
Added Files:
IDE.gif entering_in_new_window.gif hello_world.gif index.html
loading_ide.gif making_new_window.gif new_ide_window.gif
new_window_made.gif output_window.gif saving_edited_file.gif
simple_commands.gif syntax_error.gif
Log Message:
Moved the IDE tutorial to a directory with a shorter name. The long
name was giving problems with some tar implementations.
--- NEW FILE: IDE.gif ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: entering_in_new_window.gif ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: hello_world.gif ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: index.html ---
One Day of MacPython IDE Toying
One Day of MacPython IDE Toying
This document gives a very basic introduction to the
MacPython Integrated Development Environment (IDE) on Mac OS. It was
written specifically for MacPython 2.3 on Mac OS X, but most of
it is applicable to MacPython-OS9 too. It is based on
"One
Day of IDLE Toying" by Danny Yoo, which you should read if
you want to use the cross-platform IDLE Python development
environment.
Ok, let's assume that we've already installed Python. (If not, we can
visit: http://www.cwi.nl/~jack/macpython.html
or http://python.org
and download the most recent Python interpreter. Get the Mac OSX binary
installer.) The first thing we'd like to do is actually start running it!
We can do this by opening up the IDE, which should be in Applications
under the newly-created MacPython program folder:
The IDE starts up and shows an interactive window:
If the window does not show up (because you have run the IDE before
and closed it: it remembers that between runs) open it with the Windows->Python Interactive
menu entry.
This is the interactive window to the IDE, it allows us to enter
commands directly into Python, and as soon as we enter a command,
Python will execute it and spit its result back to us. We'll be
using this interactive window a lot when we're exploring Python: it's
very nice because we get back our results immediately. If it helps,
we can think of it as a very powerful calculator.
Let's try something now! As per tradition, let's get Python to say
the immortal words, "Hello World".
Those '>>>' signs act as a prompt
for us: Python is ready to read in a new command by giving us that
visual cue. Also, we notice that as we enter commands, Python will
give us its output immediately.
Ok, this seems pretty simple enough. Let's try a few more
commands. If we look below:
we'll see the result of running a few more commands. Don't worry
too much about knowing the exact rules for making programs yet: the
idea is that we can experiment with Python by typing in commands. If
things don't work, then we can correct the mistake, and try it
again.
If you got to this point, you now know enough to start playing
around with Python! Crack open one of the tutorials from the Python For Beginners web
page, and start exploring with the interpreter. No time limit here. *grin*
Now that we've paddled long enough, we might be asking: ok, this is
neat, but if we close down Python and start it up again, how do we get
the computer to remember what we typed?
The solution is a little subtle: we can't directly save what's in
the interpreter window, because it will include both our commands and
the system's responses. What we'd like is to make a prepared file,
with just our own commands, and to be able to save that file as a
document. When we're in the mood, we can later open that file and
"run" Python over it, saving us the time of retyping the whole
thing over again.
Let's try this. First, let's start with a clean slate by opening
up a new window.
Here's the result of that menu command:
We notice that there's nothing in this new window. What this means
is that this file is purely for our commands: Python won't interject
with its own responses as we enter the program, that is, not until we
tell it to. This is called an edit window, and it is very similar
to edit windows in other editors such as TextEdit or BBEdit.
What we wanted to do before was save some of the stuff we had
tried out on the interpreter window. Let's do that by typing (or
copy/pasting) those commands into our edit window.
Ok, we're done with copying and pasting.
One big thing to notice
is that we're careful to get rid of the ">>>"
prompts because they're not really part of our program. The
interpreter uses them just to tell us that we're in the interpreter,
but now that we're editing in a separate file, we can remove the
artifacts that the interpreter introduces.
I have added
an extra empty print statement so our output ends with a newline.
Let's save the file now. The Save command is located under the File menu:
Now that we've saved the program, how do we run the program? Use the
Run All button at the top of the editing window, or the equivalent
menu command Python->Run Window. The output will appear in a new
window called Output Window.
By the way, one thing to notice is that I made a typo: I didn't
quite copy exactly what I had entered in the interpreter window
before. Does this affect things?
Ooops. Here is an example of what Python calls a "syntax error".
Python sees that we made a typo, and warns us to take a much closer
look at our program. The designers of Python feel that having the
system point out the error is better than trying to guess at what the
programmer meant. Press the Edit button and you will be brought to
the trouble spot.
Python is often perceptive enough to direct us toward the problem,
and in this case, it's telling us that we forgot to put something at
the end of this line. In this case, we need to add a
quotation mark at the end. Let's add that in now.
Other errors, which usually occur later, when your program has
already done something, result in a different dialog that allows you
to look at variables and such in addition to showing you where
the error occurred.
Ok, let's say that we fixed that silly typo. Let's try to run the
program again. This gives us a new window, the Output window, showing
the output of our program:
As we play with Python, we'll find ourselves "switching modes"
between the Interpreter window and the edit window. However,
if we try anything more complicated than two or three lines it
is often a good idea to work in an edit window. Align
your edit and output window such that you can see them at the same time.
This is pretty much all we need to know about the MacPython IDE to actually do
interesting things. There is a lot more to the IDE, here is a quick
breakdown of things to see and explore:
All sorts of edit commands such as find and replace can be
used in the editor windows. See the Edit menu.
The bottom of the edit window has the scrollbar, but at the
left are two navigation devices: a line number box that you can type
numbers into to quickly go to a specific place, and a popup menu
that lists all classes, functions and methods in your file.
Above the vertical scrollbar you find another popup menu, this
influences how the Run command works. You should try the debugger
some time! If you do, and you wonder what the new small column on
the left of your script is: you can click in it to make Python stop
when it reaches this line so you can inspect things. The profiler
is also nifty: it shows you where your program is spending its time.
The module browser (Python->Module Browser) shows you all Python
modules currently loaded. You can look at the contents of the module with
Browse... and (for modules written in Python) at the source with Source...
The Package Manager (under the File menu, also available as a
separate application) allows you to easily install Python extension packages
for all sorts of things: scientific computation, image processing,
building user interfaces and more.
The Help menu gives you quick access to both the Python documentation,
if you have installed it with the Package Manager, and the Apple Developer
documentation.
The File->Save as Applet menu command saves your script as a MacOSX
application. This allows you to create a script that you can drop files on,
and much more. The IDE itself is such an applet, completely written in Python.
--- NEW FILE: loading_ide.gif ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: making_new_window.gif ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: new_ide_window.gif ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: new_window_made.gif ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: output_window.gif ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: saving_edited_file.gif ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: simple_commands.gif ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: syntax_error.gif ---
(This appears to be a binary file; contents omitted.)
From jackjansen@users.sourceforge.net Wed Jul 2 10:20:11 2003
From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net)
Date: Wed, 02 Jul 2003 02:20:11 -0700
Subject: [Python-checkins] python/dist/src/Mac/OSX Makefile,1.45,1.46
Message-ID:
Update of /cvsroot/python/python/dist/src/Mac/OSX
In directory sc8-pr-cvs1:/tmp/cvs-serv23935/OSX
Modified Files:
Makefile
Log Message:
Moved the IDE tutorial to a directory with a shorter name. The long
name was giving problems with some tar implementations.
Index: Makefile
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/OSX/Makefile,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** Makefile 21 Jun 2003 22:07:16 -0000 1.45
--- Makefile 2 Jul 2003 09:20:09 -0000 1.46
***************
*** 47,51 ****
Resources/English.lproj/Documentation \
Resources/English.lproj/Documentation/doc \
! Resources/English.lproj/Documentation/macpython_ide_tutorial
DOCDIR=$(srcdir)/Mac/OSXResources/app/Resources/English.lproj/Documentation
DOCINDEX=$(DOCDIR)/"Documentation idx"
--- 47,51 ----
Resources/English.lproj/Documentation \
Resources/English.lproj/Documentation/doc \
! Resources/English.lproj/Documentation/ide
DOCDIR=$(srcdir)/Mac/OSXResources/app/Resources/English.lproj/Documentation
DOCINDEX=$(DOCDIR)/"Documentation idx"
From jackjansen@users.sourceforge.net Wed Jul 2 10:20:11 2003
From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net)
Date: Wed, 02 Jul 2003 02:20:11 -0700
Subject: [Python-checkins] python/dist/src/Mac/OSXResources/app/Resources/English.lproj/Documentation/macpython_ide_tutorial IDE.gif,1.1,NONE entering_in_new_window.gif,1.1,NONE hello_world.gif,1.1,NONE index.html,1.3,NONE loading_ide.gif,1.1,NONE making_new_window.gif,1.1,NONE new_ide_window.gif,1.1,NONE new_window_made.gif,1.1,NONE output_window.gif,1.1,NONE saving_edited_file.gif,1.1,NONE simple_commands.gif,1.1,NONE syntax_error.gif,1.1,NONE
Message-ID:
Update of /cvsroot/python/python/dist/src/Mac/OSXResources/app/Resources/English.lproj/Documentation/macpython_ide_tutorial
In directory sc8-pr-cvs1:/tmp/cvs-serv23935/OSXResources/app/Resources/English.lproj/Documentation/macpython_ide_tutorial
Removed Files:
IDE.gif entering_in_new_window.gif hello_world.gif index.html
loading_ide.gif making_new_window.gif new_ide_window.gif
new_window_made.gif output_window.gif saving_edited_file.gif
simple_commands.gif syntax_error.gif
Log Message:
Moved the IDE tutorial to a directory with a shorter name. The long
name was giving problems with some tar implementations.
--- IDE.gif DELETED ---
--- entering_in_new_window.gif DELETED ---
--- hello_world.gif DELETED ---
--- index.html DELETED ---
--- loading_ide.gif DELETED ---
--- making_new_window.gif DELETED ---
--- new_ide_window.gif DELETED ---
--- new_window_made.gif DELETED ---
--- output_window.gif DELETED ---
--- saving_edited_file.gif DELETED ---
--- simple_commands.gif DELETED ---
--- syntax_error.gif DELETED ---
From jackjansen@users.sourceforge.net Wed Jul 2 10:20:39 2003
From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net)
Date: Wed, 02 Jul 2003 02:20:39 -0700
Subject: [Python-checkins] python/dist/src/Mac/OSXResources/app/Resources/English.lproj/Documentation index.html,1.4,1.5 intro.html,1.2,1.3
Message-ID:
Update of /cvsroot/python/python/dist/src/Mac/OSXResources/app/Resources/English.lproj/Documentation
In directory sc8-pr-cvs1:/tmp/cvs-serv23935/OSXResources/app/Resources/English.lproj/Documentation
Modified Files:
index.html intro.html
Log Message:
Moved the IDE tutorial to a directory with a shorter name. The long
name was giving problems with some tar implementations.
Index: index.html
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/OSXResources/app/Resources/English.lproj/Documentation/index.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** index.html 18 Jun 2003 22:10:27 -0000 1.4
--- index.html 2 Jul 2003 09:20:07 -0000 1.5
***************
*** 23,27 ****
The MacPython Integrated Development Environment (IDE) allows
easy editing, running and debugging of scripts. Read the
! Introduction
to the IDE to whet your appetite.
--- 46,50 ----
The MacPython Integrated Development Environment (IDE) allows
easy editing, running and debugging of scripts. Read the
! Introduction
to the IDE to whet your appetite.
From fdrake@users.sourceforge.net Wed Jul 2 13:27:45 2003
From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net)
Date: Wed, 02 Jul 2003 05:27:45 -0700
Subject: [Python-checkins] python/dist/src/Doc/inst inst.tex,1.47,1.48
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/inst
In directory sc8-pr-cvs1:/tmp/cvs-serv13911/inst
Modified Files:
inst.tex
Log Message:
Fix a variety of small markup nits.
Index: inst.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/inst/inst.tex,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** inst.tex 4 Mar 2003 19:36:11 -0000 1.47
--- inst.tex 2 Jul 2003 12:27:43 -0000 1.48
***************
*** 700,704 ****
'/usr/local/lib/python2.3/site-packages']
>>>
! \end{verbatim}
The null string in \code{sys.path} represents the current working
--- 700,704 ----
'/usr/local/lib/python2.3/site-packages']
>>>
! \end{verbatim} % $ <-- bow to font-lock
The null string in \code{sys.path} represents the current working
***************
*** 1003,1007 ****
\sectionauthor{Rene Liebscher}{R.Liebscher@gmx.de}
! \subsubsection{Borland C++}
This subsection describes the necessary steps to use Distutils with the
--- 1003,1007 ----
\sectionauthor{Rene Liebscher}{R.Liebscher@gmx.de}
! \subsubsection{Borland \Cpp}
This subsection describes the necessary steps to use Distutils with the
***************
*** 1057,1061 ****
\seetitle[http://www.cyberus.ca/\~{}g_will/pyExtenDL.shtml]
{Creating Python Extensions Using Borland's Free Compiler}
! {Document describing how to use Borland's free command-line C++
compiler to build Python.}
\end{seealso}
--- 1057,1061 ----
\seetitle[http://www.cyberus.ca/\~{}g_will/pyExtenDL.shtml]
{Creating Python Extensions Using Borland's Free Compiler}
! {Document describing how to use Borland's free command-line \Cpp
compiler to build Python.}
\end{seealso}
From fdrake@users.sourceforge.net Wed Jul 2 13:27:45 2003
From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net)
Date: Wed, 02 Jul 2003 05:27:45 -0700
Subject: [Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.140,1.141 libgettext.tex,1.18,1.19 libmsvcrt.tex,1.4,1.5
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv13911/lib
Modified Files:
libfuncs.tex libgettext.tex libmsvcrt.tex
Log Message:
Fix a variety of small markup nits.
Index: libfuncs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.140
retrieving revision 1.141
diff -C2 -d -r1.140 -r1.141
*** libfuncs.tex 1 Jul 2003 16:31:26 -0000 1.140
--- libfuncs.tex 2 Jul 2003 12:27:43 -0000 1.141
***************
*** 142,146 ****
object is passed as the implied first argument.
! Class methods are different than C++ or Java static methods.
If you want those, see \function{staticmethod()} in this section.
\versionadded{2.2}
--- 142,146 ----
object is passed as the implied first argument.
! Class methods are different than \Cpp{} or Java static methods.
If you want those, see \function{staticmethod()} in this section.
\versionadded{2.2}
***************
*** 447,454 ****
(zero or empty) are removed.
! Note that \code{filter(function, list)} equals
! \code{[item for item in list if function(item)]} if function is not
! \code{None} and \code{[item for item in list if item]} if function is
! None.
\end{funcdesc}
--- 447,454 ----
(zero or empty) are removed.
! Note that \code{filter(function, \var{list})} is equivalent to
! \code{[item for item in \var{list} if function(item)]} if function is
! not \code{None} and \code{[item for item in \var{list} if item]} if
! function is \code{None}.
\end{funcdesc}
***************
*** 891,895 ****
Return a slice object representing the set of indices specified by
\code{range(\var{start}, \var{stop}, \var{step})}. The \var{start}
! and \var{step} arguments default to None. Slice objects have
read-only data attributes \member{start}, \member{stop} and
\member{step} which merely return the argument values (or their
--- 891,895 ----
Return a slice object representing the set of indices specified by
\code{range(\var{start}, \var{stop}, \var{step})}. The \var{start}
! and \var{step} arguments default to \code{None}. Slice objects have
read-only data attributes \member{start}, \member{stop} and
\member{step} which merely return the argument values (or their
***************
*** 929,933 ****
to be strings. The fast, correct way to concatenate sequence of
strings is by calling \code{''.join(\var{sequence})}.
! Note that \code{sum(range(n), m)} equals \code{reduce(operator.add, range(n), m)}
\versionadded{2.3}
\end{funcdesc}
--- 929,934 ----
to be strings. The fast, correct way to concatenate sequence of
strings is by calling \code{''.join(\var{sequence})}.
! Note that \code{sum(range(\var{n}), \var{m})} is equivalent to
! \code{reduce(operator.add, range(\var{n}), \var{m})}
\versionadded{2.3}
\end{funcdesc}
Index: libgettext.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libgettext.tex,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** libgettext.tex 24 Apr 2003 18:14:49 -0000 1.18
--- libgettext.tex 2 Jul 2003 12:27:43 -0000 1.19
***************
*** 447,451 ****
previously marked as translatable. It is similar to the GNU
\program{gettext} program except that it understands all the
! intricacies of Python source code, but knows nothing about C or C++
source code. You don't need GNU \code{gettext} unless you're also
going to be translating C code (such as C extension modules).
--- 447,451 ----
previously marked as translatable. It is similar to the GNU
\program{gettext} program except that it understands all the
! intricacies of Python source code, but knows nothing about C or \Cpp
source code. You don't need GNU \code{gettext} unless you're also
going to be translating C code (such as C extension modules).
Index: libmsvcrt.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmsvcrt.tex,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** libmsvcrt.tex 14 Dec 2000 03:11:24 -0000 1.4
--- libmsvcrt.tex 2 Jul 2003 12:27:43 -0000 1.5
***************
*** 1,8 ****
\section{\module{msvcrt} --
! Useful routines from the MS VC++ runtime}
\declaremodule{builtin}{msvcrt}
\platform{Windows}
! \modulesynopsis{Miscellaneous useful routines from the MS VC++ runtime.}
\sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org}
--- 1,8 ----
\section{\module{msvcrt} --
! Useful routines from the MS V\Cpp{} runtime}
\declaremodule{builtin}{msvcrt}
\platform{Windows}
! \modulesynopsis{Miscellaneous useful routines from the MS V\Cpp{} runtime.}
\sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org}
From fdrake@users.sourceforge.net Wed Jul 2 13:27:46 2003
From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net)
Date: Wed, 02 Jul 2003 05:27:46 -0700
Subject: [Python-checkins] python/dist/src/Doc/whatsnew whatsnew20.tex,1.47,1.48
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/whatsnew
In directory sc8-pr-cvs1:/tmp/cvs-serv13911/whatsnew
Modified Files:
whatsnew20.tex
Log Message:
Fix a variety of small markup nits.
Index: whatsnew20.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/whatsnew/whatsnew20.tex,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** whatsnew20.tex 27 Nov 2002 18:53:38 -0000 1.47
--- whatsnew20.tex 2 Jul 2003 12:27:43 -0000 1.48
***************
*** 422,426 ****
Augmented assignment operators were first introduced in the C
programming language, and most C-derived languages, such as
! \program{awk}, C++, Java, Perl, and PHP also support them. The augmented
assignment patch was implemented by Thomas Wouters.
--- 422,426 ----
Augmented assignment operators were first introduced in the C
programming language, and most C-derived languages, such as
! \program{awk}, \Cpp, Java, Perl, and PHP also support them. The augmented
assignment patch was implemented by Thomas Wouters.
***************
*** 634,638 ****
processor, mostly by Trent Mick of ActiveState. (Confusingly,
\code{sys.platform} is still \code{'win32'} on Win64 because it seems
! that for ease of porting, MS Visual C++ treats code as 32 bit on Itanium.)
PythonWin also supports Windows CE; see the Python CE page at
\url{http://starship.python.net/crew/mhammond/ce/} for more
--- 634,638 ----
processor, mostly by Trent Mick of ActiveState. (Confusingly,
\code{sys.platform} is still \code{'win32'} on Win64 because it seems
! that for ease of porting, MS Visual \Cpp{} treats code as 32 bit on Itanium.)
PythonWin also supports Windows CE; see the Python CE page at
\url{http://starship.python.net/crew/mhammond/ce/} for more
From fdrake@users.sourceforge.net Wed Jul 2 13:27:45 2003
From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net)
Date: Wed, 02 Jul 2003 05:27:45 -0700
Subject: [Python-checkins] python/dist/src/Doc/dist dist.tex,1.55,1.56
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/dist
In directory sc8-pr-cvs1:/tmp/cvs-serv13911/dist
Modified Files:
dist.tex
Log Message:
Fix a variety of small markup nits.
Index: dist.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/dist/dist.tex,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** dist.tex 30 Jun 2003 19:33:29 -0000 1.55
--- dist.tex 2 Jul 2003 12:27:43 -0000 1.56
***************
*** 191,200 ****
\item[extension module] a module written in the low-level language of
! the Python implementation: C/C++ for Python, Java for Jython.
Typically contained in a single dynamically loadable pre-compiled
file, e.g. a shared object (\file{.so}) file for Python extensions on
\UNIX, a DLL (given the \file{.pyd} extension) for Python extensions
on Windows, or a Java class file for Jython extensions. (Note that
! currently, the Distutils only handles C/C++ extensions for Python.)
\item[package] a module that contains other modules; typically contained
--- 191,200 ----
\item[extension module] a module written in the low-level language of
! the Python implementation: C/\Cpp{} for Python, Java for Jython.
Typically contained in a single dynamically loadable pre-compiled
file, e.g. a shared object (\file{.so}) file for Python extensions on
\UNIX, a DLL (given the \file{.pyd} extension) for Python extensions
on Windows, or a Java class file for Jython extensions. (Note that
! currently, the Distutils only handles C/\Cpp{} extensions for Python.)
\item[package] a module that contains other modules; typically contained
***************
*** 472,479 ****
list; the \command{build\_ext} command knows how to deal with SWIG
extensions: it will run SWIG on the interface file and compile the
! resulting C/C++ file into your extension.
\XXX{SWIG support is rough around the edges and largely untested;
! especially SWIG support of C++ extensions! Explain in more detail
here when the interface firms up.}
--- 472,479 ----
list; the \command{build\_ext} command knows how to deal with SWIG
extensions: it will run SWIG on the interface file and compile the
! resulting C/\Cpp{} file into your extension.
\XXX{SWIG support is rough around the edges and largely untested;
! especially SWIG support for \Cpp{} extensions! Explain in more detail
here when the interface firms up.}
***************
*** 481,485 ****
by the compiler and included in your extension. Currently, this just
means Windows message text (\file{.mc}) files and resource definition
! (\file{.rc}) files for Visual C++. These will be compiled to binary resource
(\file{.res}) files and linked into the executable.
--- 481,485 ----
by the compiler and included in your extension. Currently, this just
means Windows message text (\file{.mc}) files and resource definition
! (\file{.rc}) files for Visual \Cpp. These will be compiled to binary resource
(\file{.res}) files and linked into the executable.
From fdrake@users.sourceforge.net Wed Jul 2 14:42:53 2003
From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net)
Date: Wed, 02 Jul 2003 06:42:53 -0700
Subject: [Python-checkins] python/dist/src/Doc/lib libdatetime.tex,1.45,1.46
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv23936
Modified Files:
libdatetime.tex
Log Message:
The datetime C API really isn't usable outside the datetime module
implementation, so remove this decoy (it break formatting of the GNU
info version of the docs).
Index: libdatetime.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdatetime.tex,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** libdatetime.tex 10 May 2003 04:21:08 -0000 1.45
--- libdatetime.tex 2 Jul 2003 13:42:51 -0000 1.46
***************
*** 1399,1454 ****
varies across platforms. Regardless of platform, years before 1900
cannot be used.
-
-
- \begin{comment}
-
- \subsection{C API}
-
- Struct typedefs:
-
- PyDateTime_Date
- PyDateTime_DateTime
- PyDateTime_Time
- PyDateTime_Delta
- PyDateTime_TZInfo
-
- Type-check macros:
-
- PyDate_Check(op)
- PyDate_CheckExact(op)
-
- PyDateTime_Check(op)
- PyDateTime_CheckExact(op)
-
- PyTime_Check(op)
- PyTime_CheckExact(op)
-
- PyDelta_Check(op)
- PyDelta_CheckExact(op)
-
- PyTZInfo_Check(op)
- PyTZInfo_CheckExact(op)
-
- Accessor macros:
-
- All objects are immutable, so accessors are read-only. All macros
- return ints:
-
- For \class{date} and \class{datetime} instances:
- PyDateTime_GET_YEAR(o)
- PyDateTime_GET_MONTH(o)
- PyDateTime_GET_DAY(o)
-
- For \class{datetime} instances:
- PyDateTime_DATE_GET_HOUR(o)
- PyDateTime_DATE_GET_MINUTE(o)
- PyDateTime_DATE_GET_SECOND(o)
- PyDateTime_DATE_GET_MICROSECOND(o)
-
- For \class{time} instances:
- PyDateTime_TIME_GET_HOUR(o)
- PyDateTime_TIME_GET_MINUTE(o)
- PyDateTime_TIME_GET_SECOND(o)
- PyDateTime_TIME_GET_MICROSECOND(o)
-
- \end{comment}
--- 1399,1400 ----
From aimacintyre@users.sourceforge.net Wed Jul 2 14:53:27 2003
From: aimacintyre@users.sourceforge.net (aimacintyre@users.sourceforge.net)
Date: Wed, 02 Jul 2003 06:53:27 -0700
Subject: [Python-checkins] python/dist/src configure.in,1.419,1.420 configure,1.408,1.409 pyconfig.h.in,1.81,1.82
Message-ID:
Update of /cvsroot/python/python/dist/src
In directory sc8-pr-cvs1:/tmp/cvs-serv25386
Modified Files:
configure.in configure pyconfig.h.in
Log Message:
FreeBSD 5.x has moved some library routines and typedefs outside the
scope of the _XOPEN_SOURCE and _POSIX_C_SOURCE symbols, including:
- getloadavg()
- typedefs for u_int, u_long, u_char, u_short, ushort & uint
These are now all defined under the control of a __BSD_VISIBLE symbol.
The lack of the typedefs causes several extension modules to build
incorrectly or not at all, and is the cause of failures reported for
test_socket and test_tempfile on this platform
(see python-dev: 29/6/03, pieterb@gewis.nl, "Running tests on freebsd5")
This change does not appear to be needed in the 2.2 branch.
Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.419
retrieving revision 1.420
diff -C2 -d -r1.419 -r1.420
*** configure.in 28 Jun 2003 07:46:38 -0000 1.419
--- configure.in 2 Jul 2003 13:53:23 -0000 1.420
***************
*** 46,49 ****
--- 46,54 ----
AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features])
+ # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
+ # certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
+ # them.
+ AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])
+
define_xopen_source=yes
Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.408
retrieving revision 1.409
diff -C2 -d -r1.408 -r1.409
*** configure 28 Jun 2003 07:46:31 -0000 1.408
--- configure 2 Jul 2003 13:53:23 -0000 1.409
***************
*** 1,4 ****
#! /bin/sh
! # From configure.in Revision: 1.418 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53 for python 2.3.
--- 1,4 ----
#! /bin/sh
! # From configure.in Revision: 1.419 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53 for python 2.3.
***************
*** 909,913 ****
# absolute.
ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
! ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
--- 909,913 ----
# absolute.
ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
! ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
***************
*** 1266,1269 ****
--- 1266,1278 ----
+ # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
+ # certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
+ # them.
+
+ cat >>confdefs.h <<\_ACEOF
+ #define __BSD_VISIBLE 1
+ _ACEOF
+
+
define_xopen_source=yes
***************
*** 18442,18446 ****
# absolute.
ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
! ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
--- 18451,18455 ----
# absolute.
ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
! ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
Index: pyconfig.h.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v
retrieving revision 1.81
retrieving revision 1.82
diff -C2 -d -r1.81 -r1.82
*** pyconfig.h.in 14 Jun 2003 21:03:05 -0000 1.81
--- pyconfig.h.in 2 Jul 2003 13:53:25 -0000 1.82
***************
*** 830,833 ****
--- 830,836 ----
#undef _NETBSD_SOURCE
+ /* Define on FreeBSD to activate all library features */
+ #undef __BSD_VISIBLE
+
/* Define _OSF_SOURCE to get the makedev macro. */
#undef _OSF_SOURCE
From aimacintyre@users.sourceforge.net Wed Jul 2 15:05:10 2003
From: aimacintyre@users.sourceforge.net (aimacintyre@users.sourceforge.net)
Date: Wed, 02 Jul 2003 07:05:10 -0700
Subject: [Python-checkins] python/dist/src/Lib/test test_ossaudiodev.py,1.7,1.8
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv27154
Modified Files:
test_ossaudiodev.py
Log Message:
On those systems lacking the AFMT_S16_NE symbol, the test was failing
because it was still looking in the ossaudiodev module namespace for
this symbol.
As the symbol has already been rebound as a global, use that instead.
Index: test_ossaudiodev.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_ossaudiodev.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** test_ossaudiodev.py 3 Jun 2003 00:32:44 -0000 1.7
--- test_ossaudiodev.py 2 Jul 2003 14:05:08 -0000 1.8
***************
*** 76,80 ****
# most ancient and crufty hardware
config1 = (ossaudiodev.AFMT_U8, 1, 8000)
! config2 = (ossaudiodev.AFMT_S16_NE, 2, 44100)
for config in [config1, config2]:
--- 76,80 ----
# most ancient and crufty hardware
config1 = (ossaudiodev.AFMT_U8, 1, 8000)
! config2 = (AFMT_S16_NE, 2, 44100)
for config in [config1, config2]:
From fdrake@users.sourceforge.net Wed Jul 2 15:22:50 2003
From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net)
Date: Wed, 02 Jul 2003 07:22:50 -0700
Subject: [Python-checkins] python/dist/src/Doc/tools py2texi.el,1.3,1.4
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/tools
In directory sc8-pr-cvs1:/tmp/cvs-serv30942
Modified Files:
py2texi.el
Log Message:
Fill out the set of macros and environments supported somewhat.
Some of this is still pretty iffy.
Index: py2texi.el
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/py2texi.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** py2texi.el 13 Nov 2002 19:31:04 -0000 1.3
--- py2texi.el 2 Jul 2003 14:22:48 -0000 1.4
***************
*** 120,123 ****
--- 120,126 ----
"@bye\n"))
("enumerate" 0 "@enumerate" "@end enumerate")
+ ("envdesc" 2 (concat "\n@table @code"
+ "\n@item @backslash{}begin@{\\1@}\\2")
+ "@end table\n")
("excdesc" 1
(progn (setq obindex t)
***************
*** 145,148 ****
--- 148,154 ----
"@item ------- @tab ------ @tab ------\n")
"@end multitable\n")
+ ("macrodesc" 2 (concat "\n@table @code"
+ "\n@item \\1@{\\2@}")
+ "@end table\n")
("memberdesc" 1
(progn (setq findex t)
***************
*** 232,235 ****
--- 238,242 ----
("e" 0 "@backslash{}")
("else" 0 (concat "@end ifinfo\n@" (setq last-if "iftex")))
+ ("env" 1 "@code{\\1}")
("EOF" 0 "@code{EOF}")
("email" 1 "@email{\\1}")
***************
*** 240,243 ****
--- 247,251 ----
("fi" 0 (concat "@end " last-if))
("file" 1 "@file{\\1}")
+ ("filenq" 1 "@file{\\1}")
("filevar" 1 "@file{@var{\\1}}")
("footnote" 1 "@footnote{\\1}")
***************
*** 271,274 ****
--- 279,283 ----
("localmoduletable" 0 "")
("longprogramopt" 1 "@option{--\\1}")
+ ("macro" 1 "@code{@backslash{}\\1}")
("mailheader" 1 "@code{\\1}")
("makeindex" 0 "")
***************
*** 360,363 ****
--- 369,373 ----
("tableofcontents" 0 "")
("term" 1 "@item \\1")
+ ("TeX" 0 "@TeX{}")
("textasciitilde" 0 "~")
("textasciicircum" 0 "^")
From fdrake@users.sourceforge.net Wed Jul 2 15:25:06 2003
From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net)
Date: Wed, 02 Jul 2003 07:25:06 -0700
Subject: [Python-checkins] python/dist/src/Doc/info Makefile,1.9,1.10
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/info
In directory sc8-pr-cvs1:/tmp/cvs-serv31458
Modified Files:
Makefile
Log Message:
The Macintosh Modules Reference now formats to GNU info without errors
(which is not to say it's right), so re-enable it.
Documenting Python and Installing Python Modules still have problems
when converting to GNU info, so we'll continue to leave them out for
now.
Index: Makefile
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/info/Makefile,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Makefile 13 Nov 2002 19:31:03 -0000 1.9
--- Makefile 2 Jul 2003 14:25:04 -0000 1.10
***************
*** 19,26 ****
python$(VERSION)-api.info python$(VERSION)-ext.info \
python$(VERSION)-lib.info python$(VERSION)-ref.info \
! python$(VERSION)-tut.info python$(VERSION)-dist.info
# python$(VERSION)-doc.info python$(VERSION)-inst.info
- # python$(VERSION)-mac.info
check-emacs-version:
--- 19,26 ----
python$(VERSION)-api.info python$(VERSION)-ext.info \
python$(VERSION)-lib.info python$(VERSION)-ref.info \
! python$(VERSION)-tut.info python$(VERSION)-dist.info \
! python$(VERSION)-mac.info
# python$(VERSION)-doc.info python$(VERSION)-inst.info
check-emacs-version:
From fdrake@users.sourceforge.net Wed Jul 2 15:33:13 2003
From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net)
Date: Wed, 02 Jul 2003 07:33:13 -0700
Subject: [Python-checkins] python/dist/src/Doc/inst inst.tex,1.48,1.49
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/inst
In directory sc8-pr-cvs1:/tmp/cvs-serv32650
Modified Files:
inst.tex
Log Message:
Make the "install schema" tables follow the same table style we use
elsewhere (lines between columns).
Index: inst.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/inst/inst.tex,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** inst.tex 2 Jul 2003 12:27:43 -0000 1.48
--- inst.tex 2 Jul 2003 14:33:11 -0000 1.49
***************
*** 340,344 ****
\newcommand{\installscheme}[8]
! {\begin{tableiii}{lll}{textrm}
{Type of file}
{Installation Directory}
--- 340,344 ----
\newcommand{\installscheme}[8]
! {\begin{tableiii}{l|l|l}{textrm}
{Type of file}
{Installation Directory}
From fdrake@users.sourceforge.net Wed Jul 2 15:44:10 2003
From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net)
Date: Wed, 02 Jul 2003 07:44:10 -0700
Subject: [Python-checkins] python/dist/src/Doc/tools py2texi.el,1.4,1.5
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/tools
In directory sc8-pr-cvs1:/tmp/cvs-serv1936
Modified Files:
py2texi.el
Log Message:
There's a better way to deal with the "comment" environment; I found
this in SF patch #732174.
Index: py2texi.el
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/py2texi.el,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** py2texi.el 2 Jul 2003 14:22:48 -0000 1.4
--- py2texi.el 2 Jul 2003 14:44:08 -0000 1.5
***************
*** 86,89 ****
--- 86,90 ----
"\n@table @code\n@item \\1\n@obindex \\1\n")
"@end table\n")
+ ("comment" 0 "\n@ignore\n" "\n@end ignore\n")
("csimplemacrodesc" 1
(progn (setq cindex t)
From fdrake@users.sourceforge.net Wed Jul 2 15:44:58 2003
From: fdrake@users.sourceforge.net (fdrake@users.sourceforge.net)
Date: Wed, 02 Jul 2003 07:44:58 -0700
Subject: [Python-checkins] python/dist/src/Doc/lib libdatetime.tex,1.46,1.47
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv2027
Modified Files:
libdatetime.tex
Log Message:
Revert the previous change; this is now dealt with in a better way.
Index: libdatetime.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdatetime.tex,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** libdatetime.tex 2 Jul 2003 13:42:51 -0000 1.46
--- libdatetime.tex 2 Jul 2003 14:44:55 -0000 1.47
***************
*** 1399,1400 ****
--- 1399,1454 ----
varies across platforms. Regardless of platform, years before 1900
cannot be used.
+
+
+ \begin{comment}
+
+ \subsection{C API}
+
+ Struct typedefs:
+
+ PyDateTime_Date
+ PyDateTime_DateTime
+ PyDateTime_Time
+ PyDateTime_Delta
+ PyDateTime_TZInfo
+
+ Type-check macros:
+
+ PyDate_Check(op)
+ PyDate_CheckExact(op)
+
+ PyDateTime_Check(op)
+ PyDateTime_CheckExact(op)
+
+ PyTime_Check(op)
+ PyTime_CheckExact(op)
+
+ PyDelta_Check(op)
+ PyDelta_CheckExact(op)
+
+ PyTZInfo_Check(op)
+ PyTZInfo_CheckExact(op)
+
+ Accessor macros:
+
+ All objects are immutable, so accessors are read-only. All macros
+ return ints:
+
+ For \class{date} and \class{datetime} instances:
+ PyDateTime_GET_YEAR(o)
+ PyDateTime_GET_MONTH(o)
+ PyDateTime_GET_DAY(o)
+
+ For \class{datetime} instances:
+ PyDateTime_DATE_GET_HOUR(o)
+ PyDateTime_DATE_GET_MINUTE(o)
+ PyDateTime_DATE_GET_SECOND(o)
+ PyDateTime_DATE_GET_MICROSECOND(o)
+
+ For \class{time} instances:
+ PyDateTime_TIME_GET_HOUR(o)
+ PyDateTime_TIME_GET_MINUTE(o)
+ PyDateTime_TIME_GET_SECOND(o)
+ PyDateTime_TIME_GET_MICROSECOND(o)
+
+ \end{comment}
From jvr@users.sourceforge.net Wed Jul 2 15:37:01 2003
From: jvr@users.sourceforge.net (jvr@users.sourceforge.net)
Date: Wed, 02 Jul 2003 07:37:01 -0700
Subject: [Python-checkins] python/dist/src/Lib/test test_re.py,1.43,1.44
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv789/test
Modified Files:
test_re.py
Log Message:
fixed typo in comment
Index: test_re.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_re.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** test_re.py 20 Jun 2003 00:25:14 -0000 1.43
--- test_re.py 2 Jul 2003 14:36:59 -0000 1.44
***************
*** 9,13 ****
# Misc tests from Tim Peters' re.doc
! # WARNING: Don't change deteails in these tests if you don't know
# what you're doing. Some of these tests were carefuly modeled to
# cover most of the code.
--- 9,13 ----
# Misc tests from Tim Peters' re.doc
! # WARNING: Don't change details in these tests if you don't know
# what you're doing. Some of these tests were carefuly modeled to
# cover most of the code.
From rhettinger@users.sourceforge.net Wed Jul 2 16:10:40 2003
From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net)
Date: Wed, 02 Jul 2003 08:10:40 -0700
Subject: [Python-checkins] python/dist/src/Doc/lib libweakref.tex,1.18,1.19
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv6232
Modified Files:
libweakref.tex
Log Message:
Grammar nit. SF bug #757822
Index: libweakref.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libweakref.tex,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** libweakref.tex 7 Aug 2002 16:18:54 -0000 1.18
--- libweakref.tex 2 Jul 2003 15:10:38 -0000 1.19
***************
*** 20,24 ****
XXX --- need to say more here!
! Not all objects can be weakly referenced; those objects which do
include class instances, functions written in Python (but not in C),
and methods (both bound and unbound). Extension types can easily
--- 20,24 ----
XXX --- need to say more here!
! Not all objects can be weakly referenced; those objects which can
include class instances, functions written in Python (but not in C),
and methods (both bound and unbound). Extension types can easily
From rhettinger@users.sourceforge.net Wed Jul 2 16:31:57 2003
From: rhettinger@users.sourceforge.net (rhettinger@users.sourceforge.net)
Date: Wed, 02 Jul 2003 08:31:57 -0700
Subject: [Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.141,1.142
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv10551
Modified Files:
libfuncs.tex
Log Message:
SF bug #764616: execfile(filename,...) not execfile(file,...)
Clarify parameter name.
Index: libfuncs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.141
retrieving revision 1.142
diff -C2 -d -r1.141 -r1.142
*** libfuncs.tex 2 Jul 2003 12:27:43 -0000 1.141
--- libfuncs.tex 2 Jul 2003 15:31:54 -0000 1.142
***************
*** 355,359 ****
\end{funcdesc}
! \begin{funcdesc}{execfile}{file\optional{, globals\optional{, locals}}}
This function is similar to the
\keyword{exec} statement, but parses a file instead of a string. It
--- 355,359 ----
\end{funcdesc}
! \begin{funcdesc}{execfile}{filename\optional{, globals\optional{, locals}}}
This function is similar to the
\keyword{exec} statement, but parses a file instead of a string. It
From montanaro@users.sourceforge.net Wed Jul 2 16:32:50 2003
From: montanaro@users.sourceforge.net (montanaro@users.sourceforge.net)
Date: Wed, 02 Jul 2003 08:32:50 -0700
Subject: [Python-checkins] python/dist/src/Doc/lib libcsv.tex,1.6,1.7
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv10761
Modified Files:
libcsv.tex
Log Message:
Note that csv files (when they are actual files) must be opened in 'b'inary
mode. Note that the only restriction on the csvfile passed to writer
objects is that it have a write method.
Index: libcsv.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcsv.tex,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** libcsv.tex 4 Jun 2003 15:30:13 -0000 1.6
--- libcsv.tex 2 Jul 2003 15:32:48 -0000 1.7
***************
*** 55,59 ****
{}\var{csvfile}. \var{csvfile} can be any object which supports the
iterator protocol and returns a string each time its \method{next}
! method is called. An optional \var{dialect} parameter can be given
which is used to define a set of parameters specific to a particular CSV
dialect. It may be an instance of a subclass of the \class{Dialect}
--- 55,61 ----
{}\var{csvfile}. \var{csvfile} can be any object which supports the
iterator protocol and returns a string each time its \method{next}
! method is called. If \var{csvfile} is a file object, it must be opened with
! the 'b' flag on platforms where that makes a difference. An optional
! {}\var{dialect} parameter can be given
which is used to define a set of parameters specific to a particular CSV
dialect. It may be an instance of a subclass of the \class{Dialect}
***************
*** 72,76 ****
dialect=\code{'excel'}\optional{, fmtparam}}}
Return a writer object responsible for converting the user's data into
! delimited strings on the given file-like object. An optional
{}\var{dialect} parameter can be given which is used to define a set of
parameters specific to a particular CSV dialect. It may be an instance
--- 74,81 ----
dialect=\code{'excel'}\optional{, fmtparam}}}
Return a writer object responsible for converting the user's data into
! delimited strings on the given file-like object. \var{csvfile} can be any
! object with a \function{write} method. If \var{csvfile} is a file object,
! it must be opened with the 'b' flag on platforms where that makes a
! difference. An optional
{}\var{dialect} parameter can be given which is used to define a set of
parameters specific to a particular CSV dialect. It may be an instance
***************
*** 126,130 ****
has fewer fields than the fieldnames sequence, the remaining keys take the
value of the optiona \var{restval} parameter. All other parameters are
! interpreted as for regular readers.
\end{classdesc}
--- 131,135 ----
has fewer fields than the fieldnames sequence, the remaining keys take the
value of the optiona \var{restval} parameter. All other parameters are
! interpreted as for \class{reader} objects.
\end{classdesc}
***************
*** 144,148 ****
to \code{'raise'} a \exception{ValueError} is raised. If it is set to
\code{'ignore'}, extra values in the dictionary are ignored. All other
! parameters are interpreted as for regular writers.
\end{classdesc}
--- 149,153 ----
to \code{'raise'} a \exception{ValueError} is raised. If it is set to
\code{'ignore'}, extra values in the dictionary are ignored. All other
! parameters are interpreted as for \class{writer} objects.
\end{classdesc}
From jvr@users.sourceforge.net Wed Jul 2 21:03:06 2003
From: jvr@users.sourceforge.net (jvr@users.sourceforge.net)
Date: Wed, 02 Jul 2003 13:03:06 -0700
Subject: [Python-checkins] python/dist/src/Lib/test test_re.py,1.44,1.45
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv23477/Lib/test
Modified Files:
test_re.py
Log Message:
Fix and test for bug #764548:
Use isinstance() instead of comparing types directly, to enable
subclasses of str and unicode to be used as patterns.
Blessed by /F.
Index: test_re.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_re.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -d -r1.44 -r1.45
*** test_re.py 2 Jul 2003 14:36:59 -0000 1.44
--- test_re.py 2 Jul 2003 20:03:04 -0000 1.45
***************
*** 475,478 ****
--- 475,488 ----
('a', None, None))
+ def test_bug_764548(self):
+ # bug 764548, re.compile() barfs on str/unicode subclasses
+ try:
+ unicode
+ except NameError:
+ return # no problem if we have no unicode
+ class my_unicode(unicode): pass
+ pat = re.compile(my_unicode("abc"))
+ self.assertEqual(pat.match("xyz"), None)
+
def test_finditer(self):
iter = re.finditer(r":+", "a:b::c:::d")
From jvr@users.sourceforge.net Wed Jul 2 21:03:06 2003
From: jvr@users.sourceforge.net (jvr@users.sourceforge.net)
Date: Wed, 02 Jul 2003 13:03:06 -0700
Subject: [Python-checkins] python/dist/src/Lib sre.py,1.45,1.46 sre_compile.py,1.47,1.48
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv23477/Lib
Modified Files:
sre.py sre_compile.py
Log Message:
Fix and test for bug #764548:
Use isinstance() instead of comparing types directly, to enable
subclasses of str and unicode to be used as patterns.
Blessed by /F.
Index: sre.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sre.py,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** sre.py 14 Oct 2002 12:22:17 -0000 1.45
--- sre.py 2 Jul 2003 20:03:04 -0000 1.46
***************
*** 220,226 ****
return p
pattern, flags = key
! if type(pattern) is _pattern_type:
return pattern
! if type(pattern) not in sre_compile.STRING_TYPES:
raise TypeError, "first argument must be string or compiled pattern"
try:
--- 220,226 ----
return p
pattern, flags = key
! if isinstance(pattern, _pattern_type):
return pattern
! if not isinstance(pattern, sre_compile.STRING_TYPES):
raise TypeError, "first argument must be string or compiled pattern"
try:
Index: sre_compile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** sre_compile.py 19 Apr 2003 12:56:07 -0000 1.47
--- sre_compile.py 2 Jul 2003 20:03:04 -0000 1.48
***************
*** 429,438 ****
code[skip] = len(code) - skip
- STRING_TYPES = [type("")]
-
try:
! STRING_TYPES.append(type(unicode("")))
except NameError:
! pass
def _code(p, flags):
--- 429,438 ----
code[skip] = len(code) - skip
try:
! unicode
except NameError:
! STRING_TYPES = type("")
! else:
! STRING_TYPES = (type(""), type(unicode("")))
def _code(p, flags):
***************
*** 454,458 ****
# internal: convert pattern list to internal format
! if type(p) in STRING_TYPES:
import sre_parse
pattern = p
--- 454,458 ----
# internal: convert pattern list to internal format
! if isinstance(p, STRING_TYPES):
import sre_parse
pattern = p
From walter@livinglogic.de Wed Jul 2 21:10:14 2003
From: walter@livinglogic.de (=?ISO-8859-15?Q?Walter_D=F6rwald?=)
Date: Wed, 02 Jul 2003 22:10:14 +0200
Subject: [Python-checkins] python/dist/src/Lib sre.py,1.45,1.46 sre_compile.py,1.47,1.48
In-Reply-To:
References:
Message-ID: <3F033C26.50702@livinglogic.de>
jvr@users.sourceforge.net wrote:
> ! STRING_TYPES = (type(""), type(unicode("")))
Is there a reason why this isn't:
STRING_TYPES = (str, unicode)
Bye,
Walter Dörwald
From just@letterror.com Wed Jul 2 21:14:54 2003
From: just@letterror.com (Just van Rossum)
Date: Wed, 2 Jul 2003 22:14:54 +0200
Subject: [Python-checkins] python/dist/src/Lib sre.py,1.45,1.46 sre_compile.py,1.47,1.48
In-Reply-To: <3F033C26.50702@livinglogic.de>
Message-ID:
Walter D=F6rwald wrote:
> > ! STRING_TYPES =3D (type(""), type(unicode("")))
>
> Is there a reason why this isn't:
>=20
> STRING_TYPES =3D (str, unicode)
2.1 compatibility.
Just
From barry@python.org Wed Jul 2 21:24:50 2003
From: barry@python.org (Barry Warsaw)
Date: 02 Jul 2003 16:24:50 -0400
Subject: [Python-checkins] python/dist/src/Lib sre.py,1.45,1.46
sre_compile.py,1.47,1.48
In-Reply-To:
References:
Message-ID: <1057177489.12060.136.camel@yyz>
On Wed, 2003-07-02 at 16:14, Just van Rossum wrote:
> Walter D=F6rwald wrote:
>=20
> > > ! STRING_TYPES =3D (type(""), type(unicode("")))
> >
> > Is there a reason why this isn't:
> >=20
> > STRING_TYPES =3D (str, unicode)
>=20
> 2.1 compatibility.
Still wouldn't this be clearer:
from types import StringType, UnicodeType
STRING_TYPES =3D (StringType, UnicodeType)
?
-B
From just@letterror.com Wed Jul 2 21:30:27 2003
From: just@letterror.com (Just van Rossum)
Date: Wed, 2 Jul 2003 22:30:27 +0200
Subject: [Python-checkins] python/dist/src/Lib sre.py,1.45,1.46 sre_compile.py,1.47,1.48
In-Reply-To: <1057177489.12060.136.camel@yyz>
Message-ID:
Barry Warsaw wrote:
> Still wouldn't this be clearer:
>
> from types import StringType, UnicodeType
>
> STRING_TYPES = (StringType, UnicodeType)
Sure, but I was just moving the code around a bit. It was a bug fix
after all...
Just
From barry@python.org Wed Jul 2 21:37:50 2003
From: barry@python.org (Barry Warsaw)
Date: 02 Jul 2003 16:37:50 -0400
Subject: [Python-checkins] python/dist/src/Lib sre.py,1.45,1.46
sre_compile.py,1.47,1.48
In-Reply-To:
References:
Message-ID: <1057178269.12060.140.camel@yyz>
On Wed, 2003-07-02 at 16:30, Just van Rossum wrote:
> Sure, but I was just moving the code around a bit. It was a bug fix
> after all...
Ah. :)
-B
From jvr@users.sourceforge.net Wed Jul 2 22:07:44 2003
From: jvr@users.sourceforge.net (jvr@users.sourceforge.net)
Date: Wed, 02 Jul 2003 14:07:44 -0700
Subject: [Python-checkins] python/nondist/peps pep-0291.txt,1.4,1.5
Message-ID:
Update of /cvsroot/python/python/nondist/peps
In directory sc8-pr-cvs1:/tmp/cvs-serv3728
Modified Files:
pep-0291.txt
Log Message:
Bumped sre's "baseline" to 2.1, per /F's recommendation in bug #764548
Index: pep-0291.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0291.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** pep-0291.txt 10 Jan 2003 19:13:46 -0000 1.4
--- pep-0291.txt 2 Jul 2003 21:07:42 -0000 1.5
***************
*** 74,78 ****
email Barry Warsaw 2.1
logging Vinay Sajip 1.5.2
! sre Fredrik Lundh 1.5.2
xml (PyXML) Martin v. Loewis 2.0
xmlrpclib Fredrik Lundh 1.5.2
--- 74,78 ----
email Barry Warsaw 2.1
logging Vinay Sajip 1.5.2
! sre Fredrik Lundh 2.1
xml (PyXML) Martin v. Loewis 2.0
xmlrpclib Fredrik Lundh 1.5.2
From nas-python@python.ca Wed Jul 2 22:24:34 2003
From: nas-python@python.ca (Neil Schemenauer)
Date: Wed, 2 Jul 2003 14:24:34 -0700
Subject: [Python-checkins] python/dist/src/Lib sre.py,1.45,1.46 sre_compile.py,1.47,1.48
In-Reply-To:
References: <3F033C26.50702@livinglogic.de>
Message-ID: <20030702212434.GA22641@glacier.arctrix.com>
Just van Rossum wrote:
> Walter D?rwald wrote:
>
> > > ! STRING_TYPES = (type(""), type(unicode("")))
> >
> > Is there a reason why this isn't:
> >
> > STRING_TYPES = (str, unicode)
>
> 2.1 compatibility.
2.1 isinstance does not accepts a tuple for the second argument.
Neil
From just@letterror.com Wed Jul 2 22:26:40 2003
From: just@letterror.com (Just van Rossum)
Date: Wed, 2 Jul 2003 23:26:40 +0200
Subject: [Python-checkins] python/dist/src/Lib sre.py,1.45,1.46 sre_compile.py,1.47,1.48
In-Reply-To: <20030702212434.GA22641@glacier.arctrix.com>
Message-ID:
Neil Schemenauer wrote:
> > > > ! STRING_TYPES = (type(""), type(unicode("")))
> > >
> > > Is there a reason why this isn't:
> > >
> > > STRING_TYPES = (str, unicode)
> >
> > 2.1 compatibility.
>
> 2.1 isinstance does not accepts a tuple for the second argument.
*Gulp*, you're right. I was hoping to be able to go to bed now :-/
Just
From jvr@users.sourceforge.net Wed Jul 2 22:37:18 2003
From: jvr@users.sourceforge.net (jvr@users.sourceforge.net)
Date: Wed, 02 Jul 2003 14:37:18 -0700
Subject: [Python-checkins] python/dist/src/Lib sre.py,1.46,1.47 sre_compile.py,1.48,1.49
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv10352/Lib
Modified Files:
sre.py sre_compile.py
Log Message:
Addendum to #764548: restore 2.1 compatibility.
Index: sre.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sre.py,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** sre.py 2 Jul 2003 20:03:04 -0000 1.46
--- sre.py 2 Jul 2003 21:37:16 -0000 1.47
***************
*** 222,226 ****
if isinstance(pattern, _pattern_type):
return pattern
! if not isinstance(pattern, sre_compile.STRING_TYPES):
raise TypeError, "first argument must be string or compiled pattern"
try:
--- 222,226 ----
if isinstance(pattern, _pattern_type):
return pattern
! if not sre_compile.isstring(pattern):
raise TypeError, "first argument must be string or compiled pattern"
try:
Index: sre_compile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/sre_compile.py,v
retrieving revision 1.48
retrieving revision 1.49
diff -C2 -d -r1.48 -r1.49
*** sre_compile.py 2 Jul 2003 20:03:04 -0000 1.48
--- sre_compile.py 2 Jul 2003 21:37:16 -0000 1.49
***************
*** 432,439 ****
unicode
except NameError:
! STRING_TYPES = type("")
else:
STRING_TYPES = (type(""), type(unicode("")))
def _code(p, flags):
--- 432,445 ----
unicode
except NameError:
! STRING_TYPES = (type(""),)
else:
STRING_TYPES = (type(""), type(unicode("")))
+ def isstring(obj):
+ for tp in STRING_TYPES:
+ if isinstance(obj, tp):
+ return 1
+ return 0
+
def _code(p, flags):
***************
*** 454,458 ****
# internal: convert pattern list to internal format
! if isinstance(p, STRING_TYPES):
import sre_parse
pattern = p
--- 460,464 ----
# internal: convert pattern list to internal format
! if isstring(p):
import sre_parse
pattern = p
From montanaro@users.sourceforge.net Wed Jul 2 22:38:36 2003
From: montanaro@users.sourceforge.net (montanaro@users.sourceforge.net)
Date: Wed, 02 Jul 2003 14:38:36 -0700
Subject: [Python-checkins] python/dist/src/Misc cheatsheet,1.5,1.6
Message-ID:
Update of /cvsroot/python/python/dist/src/Misc
In directory sc8-pr-cvs1:/tmp/cvs-serv10524/Misc
Modified Files:
cheatsheet
Log Message:
Correct documentation of check interval - it's 100 by default, not 10 any
longer. Pointed out by Alex Martelli.
Index: cheatsheet
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/cheatsheet,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** cheatsheet 26 Jan 2003 03:29:15 -0000 1.5
--- cheatsheet 2 Jul 2003 21:38:34 -0000 1.6
***************
*** 1362,1366 ****
reference.
setcheckinterval( Sets the interpreter's thread switching interval (in number
! interval) of virtual code instructions, default:10).
settrace(func) Sets a trace function: called before each line ofcode is
exited.
--- 1362,1366 ----
reference.
setcheckinterval( Sets the interpreter's thread switching interval (in number
! interval) of virtual code instructions, default:100).
settrace(func) Sets a trace function: called before each line ofcode is
exited.
From montanaro@users.sourceforge.net Wed Jul 2 22:38:36 2003
From: montanaro@users.sourceforge.net (montanaro@users.sourceforge.net)
Date: Wed, 02 Jul 2003 14:38:36 -0700
Subject: [Python-checkins] python/dist/src/Doc/lib libsys.tex,1.64,1.65
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv10524/Doc/lib
Modified Files:
libsys.tex
Log Message:
Correct documentation of check interval - it's 100 by default, not 10 any
longer. Pointed out by Alex Martelli.
Index: libsys.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsys.tex,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** libsys.tex 29 May 2003 02:17:23 -0000 1.64
--- libsys.tex 2 Jul 2003 21:38:34 -0000 1.65
***************
*** 395,400 ****
Set the interpreter's ``check interval''. This integer value
determines how often the interpreter checks for periodic things such
! as thread switches and signal handlers. The default is \code{10},
! meaning the check is performed every 10 Python virtual instructions.
Setting it to a larger value may increase performance for programs
using threads. Setting it to a value \code{<=} 0 checks every
--- 395,400 ----
Set the interpreter's ``check interval''. This integer value
determines how often the interpreter checks for periodic things such
! as thread switches and signal handlers. The default is \code{100},
! meaning the check is performed every 100 Python virtual instructions.
Setting it to a larger value may increase performance for programs
using threads. Setting it to a value \code{<=} 0 checks every
From montanaro@users.sourceforge.net Wed Jul 2 22:38:36 2003
From: montanaro@users.sourceforge.net (montanaro@users.sourceforge.net)
Date: Wed, 02 Jul 2003 14:38:36 -0700
Subject: [Python-checkins] python/dist/src/Doc/api init.tex,1.9,1.10
Message-ID:
Update of /cvsroot/python/python/dist/src/Doc/api
In directory sc8-pr-cvs1:/tmp/cvs-serv10524/Doc/api
Modified Files:
init.tex
Log Message:
Correct documentation of check interval - it's 100 by default, not 10 any
longer. Pointed out by Alex Martelli.
Index: init.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/init.tex,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** init.tex 29 Jun 2003 02:14:31 -0000 1.9
--- init.tex 2 Jul 2003 21:38:34 -0000 1.10
***************
*** 349,353 ****
API functions. In order to support multi-threaded Python programs,
the interpreter regularly releases and reacquires the lock --- by
! default, every ten bytecode instructions (this can be changed with
\withsubitem{(in module sys)}{\ttindex{setcheckinterval()}}
\function{sys.setcheckinterval()}). The lock is also released and
--- 349,353 ----
API functions. In order to support multi-threaded Python programs,
the interpreter regularly releases and reacquires the lock --- by
! default, every 100 bytecode instructions (this can be changed with
\withsubitem{(in module sys)}{\ttindex{setcheckinterval()}}
\function{sys.setcheckinterval()}). The lock is also released and
From jackjansen@users.sourceforge.net Wed Jul 2 23:09:32 2003
From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net)
Date: Wed, 02 Jul 2003 15:09:32 -0700
Subject: [Python-checkins] python/dist/src/Mac/OSX Extras.ReadMe.txt,1.2,1.3
Message-ID:
Update of /cvsroot/python/python/dist/src/Mac/OSX
In directory sc8-pr-cvs1:/tmp/cvs-serv17545
Modified Files:
Extras.ReadMe.txt
Log Message:
Skip noticed that the document talks about "setting PythonLauncher as the
default application" but doesn't give a clue on how to do this. Refer to
Apple Help.
Index: Extras.ReadMe.txt
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/OSX/Extras.ReadMe.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Extras.ReadMe.txt 29 Jun 2003 00:24:12 -0000 1.2
--- Extras.ReadMe.txt 2 Jul 2003 22:09:30 -0000 1.3
***************
*** 8,12 ****
that you start them from the command line or with PythonLauncher. In the
latter case, you can supply any needed command line arguments by holding
! the "alt" key while dragging the script to PythonLauncher (or while
! double-clicking the script, if PythonLauncher is set as the default application
! to open Python scripts with).
--- 8,14 ----
that you start them from the command line or with PythonLauncher. In the
latter case, you can supply any needed command line arguments by holding
! the "alt" key while dragging the script to PythonLauncher, or while
! double-clicking the script if PythonLauncher is set as the default application
! to open Python scripts with. See "Changing the application that opens a file"
! in Mac Help for information on making PythonLauncher the default application.
!
From jackjansen@users.sourceforge.net Wed Jul 2 23:08:30 2003
From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net)
Date: Wed, 02 Jul 2003 15:08:30 -0700
Subject: [Python-checkins] python/dist/src/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib objects.nib,1.3,1.4
Message-ID:
Update of /cvsroot/python/python/dist/src/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib
In directory sc8-pr-cvs1:/tmp/cvs-serv17246/English.lproj/MyDocument.nib
Modified Files:
objects.nib
Log Message:
Tooltip for tab/space consistency check was the wrong way around. Spotted
by Skip.
Index: objects.nib
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/objects.nib,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
Binary files /tmp/cvsWp6znV and /tmp/cvsUJ5PuG differ
From jackjansen@users.sourceforge.net Wed Jul 2 23:08:30 2003
From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net)
Date: Wed, 02 Jul 2003 15:08:30 -0700
Subject: [Python-checkins] python/dist/src/Mac/OSX/PythonLauncher/PreferenceWindow.nib info.nib,1.3,1.4 objects.nib,1.3,1.4
Message-ID:
Update of /cvsroot/python/python/dist/src/Mac/OSX/PythonLauncher/PreferenceWindow.nib
In directory sc8-pr-cvs1:/tmp/cvs-serv17246/PreferenceWindow.nib
Modified Files:
info.nib objects.nib
Log Message:
Tooltip for tab/space consistency check was the wrong way around. Spotted
by Skip.
Index: info.nib
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/OSX/PythonLauncher/PreferenceWindow.nib/info.nib,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** info.nib 17 Feb 2003 15:40:00 -0000 1.3
--- info.nib 2 Jul 2003 22:08:28 -0000 1.4
***************
*** 6,16 ****
660 84 519 534 0 0 1280 1002 IBFramework Version
! 286.0
! IBOpenObjects
!
! 5
! IBSystem Version
! 6I32
--- 6,12 ----
660 84 519 534 0 0 1280 1002 IBFramework Version
! 291.0IBSystem Version
! 6L60
Index: objects.nib
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/OSX/PythonLauncher/PreferenceWindow.nib/objects.nib,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
Binary files /tmp/cvslQYYv5 and /tmp/cvsWJt1J0 differ
From eprice@users.sourceforge.net Thu Jul 3 00:48:24 2003
From: eprice@users.sourceforge.net (eprice@users.sourceforge.net)
Date: Wed, 02 Jul 2003 16:48:24 -0700
Subject: [Python-checkins] python/nondist/sandbox/decimal Decimal.py,1.9,1.10
Message-ID:
Update of /cvsroot/python/python/nondist/sandbox/decimal
In directory sc8-pr-cvs1:/tmp/cvs-serv814
Modified Files:
Decimal.py
Log Message:
Bugfixes, removed context indirection.
Index: Decimal.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/Decimal.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Decimal.py 13 Jun 2003 22:47:18 -0000 1.9
--- Decimal.py 2 Jul 2003 23:48:22 -0000 1.10
***************
*** 489,496 ****
--- 489,501 ----
2 if sNaN
"""
+ #print repr(self), repr(self._exp)
+ #print 'here', self._exp
if self._exp == 'n':
+ #print 'Gone'
return 1
elif self._exp == 'N':
+ #print 'Gone'
return 2
+ #print 'Gone'
return 0
***************
*** 557,560 ****
--- 562,618 ----
def __cmp__(self, other, context=None):
+ if context is None:
+ context = getcontext()
+ if not isinstance(other, Decimal):
+ other = Decimal(other)
+
+ ans = self._check_nans(other, context)
+
+ if ans:
+ return 1
+
+ if not self and not other:
+ return 0 #If both 0, sign comparison isn't certain.
+
+ #If different signs, neg one is less
+ if other._sign < self._sign:
+ return -1
+ if self._sign < other._sign:
+ return 1
+
+ # INF = INF
+ if self._isinfinity() and other._isinfinity():
+ return 0
+ if self._isinfinity():
+ return (-1)**self._sign
+ if other._isinfinity():
+ return -((-1)**other._sign)
+
+ if self.adjusted() == other.adjusted() and \
+ self._int + (0,)*(self._exp - other._exp) == \
+ other._int + (0,)*(other._exp - self._exp):
+ return 0 #equal, except in precision. ([0]*(-x) = [])
+ elif self.adjusted() > other.adjusted() and self._int[0] != 0:
+ return (-1)**self._sign
+ elif self.adjusted < other.adjusted() and other._int[0] != 0:
+ return -((-1)**self._sign)
+
+ context = copy.copy(context)
+ rounding = context.set_rounding(ROUND_UP) #round away from 0
+
+ flags = context.ignore_all_flags()
+ res = self.__sub__(other, context=context)
+
+ context.regard_flags(*flags)
+
+ context.rounding = rounding
+
+ if not res:
+ return 0
+ elif res._sign:
+ return -1
+ return 1
+
+ def DecimalCmp(self, other, context=None):
"""Compares one to another.
***************
*** 562,577 ****
0 => a = b
1 => a > b
Returns Decimal instances, though.
"""
if context is None:
context = getcontext()
-
if not isinstance(other, Decimal):
other = Decimal(other)
ans = self._check_nans(other, context)
#compare(NaN, NaN) = NaN
if ans:
return ans
if not self and not other:
--- 620,639 ----
0 => a = b
1 => a > b
+ NaN => one is NaN
Returns Decimal instances, though.
"""
if context is None:
context = getcontext()
if not isinstance(other, Decimal):
other = Decimal(other)
+ #print repr(self), repr(other)
ans = self._check_nans(other, context)
#compare(NaN, NaN) = NaN
+ #print 'Here'
if ans:
+ #print 'Yay', self, other, ans
return ans
+ #print self, other
if not self and not other:
***************
*** 605,609 ****
flags = context.ignore_all_flags()
! res = context.subtract(self, other)
context.regard_flags(*flags)
--- 667,671 ----
flags = context.ignore_all_flags()
! res = self.__sub__(other, context=context)
context.regard_flags(*flags)
***************
*** 768,774 ****
if self._sign:
! ans = context.minus(self)
else:
! ans = context.plus(self)
return ans
--- 830,836 ----
if self._sign:
! ans = self.__neg__(context=context)
else:
! ans = self.__pos__(context=context)
return ans
***************
*** 894,898 ****
tmp._sign = 1-tmp._sign
! return context.add(self, tmp)
def __rsub__(self, other, context=None):
--- 956,960 ----
tmp._sign = 1-tmp._sign
! return self.__add__(tmp, context=context)
def __rsub__(self, other, context=None):
***************
*** 903,907 ****
tmp = Decimal(self)
tmp._sign = 1 - tmp._sign
! return context.add(other, tmp)
def increment(self, round=1, context=None):
--- 965,969 ----
tmp = Decimal(self)
tmp._sign = 1 - tmp._sign
! return other.__add__(tmp, context=context)
def increment(self, round=1, context=None):
***************
*** 1252,1256 ****
flags = context.ignore_flags(Rounded, Inexact)
#keep DivisionImpossible flags
! (side, r) = context.divmod(self, other)
if r._isnan():
--- 1314,1318 ----
flags = context.ignore_flags(Rounded, Inexact)
#keep DivisionImpossible flags
! (side, r) = self.__divmod__(other, context=context)
if r._isnan():
***************
*** 1262,1268 ****
if other._sign:
! comparison = context.divide(other, Decimal(-2))
else:
! comparison = context.divide(other, Decimal(2))
context.set_rounding_decision(rounding)
--- 1324,1330 ----
if other._sign:
! comparison = other.__div__(Decimal(-2), context=context)
else:
! comparison = other.__div__(Decimal(2), context=context)
context.set_rounding_decision(rounding)
***************
*** 1275,1279 ****
r._sign, comparison._sign = s1, s2
#Get flags now
! context.divmod(self, other)
return r.fix(context=context)
r._sign, comparison._sign = s1, s2
--- 1337,1341 ----
r._sign, comparison._sign = s1, s2
#Get flags now
! self.__divmod__(other, context=context)
return r.fix(context=context)
r._sign, comparison._sign = s1, s2
***************
*** 1281,1285 ****
rounding = context.set_rounding_decision(NEVER_ROUND)
! (side, r) = context.divmod(self, other)
context.set_rounding_decision(rounding)
if r._isnan():
--- 1343,1347 ----
rounding = context.set_rounding_decision(NEVER_ROUND)
! (side, r) = self.__divmod__(other, context=context)
context.set_rounding_decision(rounding)
if r._isnan():
***************
*** 1288,1292 ****
decrease = not side._iseven()
rounding = context.set_rounding_decision(NEVER_ROUND)
! side = context.abs(side)
context.set_rounding_decision(rounding)
--- 1350,1354 ----
decrease = not side._iseven()
rounding = context.set_rounding_decision(NEVER_ROUND)
! side = side.__abs__(context=context)
context.set_rounding_decision(rounding)
***************
*** 1296,1307 ****
r._sign, comparison._sign = s1, s2
context.prec += 1
! if len((context.add(side,Decimal(1))._int)) >= context.prec:
context.prec -= 1
return context.raise_error(DivisionImpossible)[1]
context.prec -= 1
if self._sign == other._sign:
! r = context.subtract(r, other)
else:
! r = context.add(r, other)
else:
r._sign, comparison._sign = s1, s2
--- 1358,1369 ----
r._sign, comparison._sign = s1, s2
context.prec += 1
! if len(side.__add__(Decimal(1), context=context)._int) >= context.prec:
context.prec -= 1
return context.raise_error(DivisionImpossible)[1]
context.prec -= 1
if self._sign == other._sign:
! r = r.__sub__(other, context=context)
else:
! r = r.__add__(other, context=context)
else:
r._sign, comparison._sign = s1, s2
***************
*** 1319,1322 ****
--- 1381,1393 ----
def __long__(self):
"""Converts self to a long, truncating if necessary."""
+ if self._isnan():
+
+ print "mmoo"
+ raise "ACK"
+ #raise "AIIII"
+ context = getcontext()
+ return context.raise_error(InvalidContext)
+ elif self._isinfinity():
+ raise OverflowError, "Cannot convert infinity to long"
if not self:
return 0L
***************
*** 1340,1343 ****
--- 1411,1416 ----
Equivalent to int(long(self))
"""
+ #print 'M', repr(self), repr(self._exp)
+ print self._exp == 'n'
return int(self.__long__())
***************
*** 1680,1684 ****
#n is a long now, not Decimal instance
n = -n
! mul = context.divide(Decimal(1), mul)
shouldround = context.rounding_decision in (ALWAYS_ROUND,)
--- 1753,1757 ----
#n is a long now, not Decimal instance
n = -n
! mul = Decimal(1).__div__(mul, context=context)
shouldround = context.rounding_decision in (ALWAYS_ROUND,)
***************
*** 1691,1702 ****
#Spot is the highest power of 2 less than n
while spot:
! val = context.multiply(val, val)
if val._isinfinity():
val = Infsign[sign]
break
if spot & n:
! val = context.multiply(val, mul)
if modulo is not None:
! val = context.remainder(val, modulo)
spot >>= 1
context.prec = firstprec
--- 1764,1775 ----
#Spot is the highest power of 2 less than n
while spot:
! val = val.__mul__(val, context=context)
if val._isinfinity():
val = Infsign[sign]
break
if spot & n:
! val = val.__mul__(mul, context=context)
if modulo is not None:
! val = val.__mod__(modulo, context=context)
spot >>= 1
context.prec = firstprec
***************
*** 1730,1740 ****
def quantize(self, exp, rounding = None, context=None, watchexp = 1):
"""
! """
ans = self._check_nans(exp, context)
if ans:
return ans
- if exp._isinfinity():
- return context.raise_error(InvalidOperation, 'quantize with an INF')
return self.rescale(exp._exp, rounding, context, watchexp)
--- 1803,1817 ----
def quantize(self, exp, rounding = None, context=None, watchexp = 1):
+ """Quantize self so its exponent is the same as that of exp.
+
+ Similar to self.rescale(exp._exp) but with error checking.
"""
! if context is None:
! context = getcontext()
! if exp._isinfinity() or self._isinfinity():
! return context.raise_error(InvalidOperation, 'quantize with an INF')
ans = self._check_nans(exp, context)
if ans:
return ans
return self.rescale(exp._exp, rounding, context, watchexp)
***************
*** 1803,1807 ****
def sqrt(self, context=None):
! """Return the sqrt of self.
Uses a converging algorithm (Xn+1 = 0.5*(Xn + self / Xn))
--- 1880,1884 ----
def sqrt(self, context=None):
! """Return the square root of self.
Uses a converging algorithm (Xn+1 = 0.5*(Xn + self / Xn))
***************
*** 1848,1858 ****
if tmp.adjusted() % 2 == 0:
ans = Decimal( (0, (8,1,9), tmp.adjusted() - 2) )
! ans = context.add(ans, context.multiply(Decimal((0, (2,5,9), -2)),
! tmp))
ans._exp -= 1 + tmp.adjusted()/2
else:
ans = Decimal( (0, (2,5,9), tmp._exp + len(tmp._int)- 3) )
! ans = context.add(ans, context.multiply(Decimal((0, (8,1,9), -3)),
! tmp))
ans._exp -= 1 + tmp.adjusted()/2
--- 1925,1935 ----
if tmp.adjusted() % 2 == 0:
ans = Decimal( (0, (8,1,9), tmp.adjusted() - 2) )
! ans = ans.__add__(tmp.__mul__(Decimal((0, (2,5,9), -2)),
! context=context), context=context)
ans._exp -= 1 + tmp.adjusted()/2
else:
ans = Decimal( (0, (2,5,9), tmp._exp + len(tmp._int)- 3) )
! ans = ans.__add__(tmp.__mul__(Decimal((0, (8,1,9), -3)),
! context=context), context=context)
ans._exp -= 1 + tmp.adjusted()/2
***************
*** 1869,1874 ****
while 1:
context.prec = min(2*context.prec - 2, maxp)
! ans = context.multiply(half, context.add(ans, \
! context.divide(tmp, ans)))
if context.prec == maxp:
break
--- 1946,1951 ----
while 1:
context.prec = min(2*context.prec - 2, maxp)
! ans = half.__mul__(ans.__add__(tmp.__div__(ans, context=context),
! context=context), context=context)
if context.prec == maxp:
break
***************
*** 1877,1881 ****
context.prec = firstprec
prevexp = ans.adjusted()
! ans = context.round(ans)
#Now, check if the other last digits are better.
--- 1954,1958 ----
context.prec = firstprec
prevexp = ans.adjusted()
! ans = ans.round(context=context)
#Now, check if the other last digits are better.
***************
*** 1886,1898 ****
ans._exp -= 1
! lower = context.subtract(ans, Decimal((0, (5,), ans._exp-1) ))
context.set_rounding(ROUND_UP)
! if (context.multiply(lower, lower))> (tmp):
! ans = context.subtract(ans, Decimal( (0, (1,), ans._exp) ))
else:
! upper = context.add(ans, Decimal((0, (5,), ans._exp-1) ))
context.set_rounding(ROUND_DOWN)
! if context.multiply(upper, upper) < tmp:
! ans = context.add(ans, Decimal( (0, (1,), ans._exp) ))
ans._exp += expadd
--- 1963,1977 ----
ans._exp -= 1
!
! lower = ans.__sub__(Decimal((0, (5,), ans._exp-1)), context=context)
context.set_rounding(ROUND_UP)
! if lower.__mul__(lower, context=context) > (tmp):
! ans = ans.__sub__(Decimal((0, (1,), ans._exp)), context=context)
!
else:
! upper = ans.__add__(Decimal((0, (5,), ans._exp-1)),context=context)
context.set_rounding(ROUND_DOWN)
! if upper.__mul__(upper, context=context) < tmp:
! ans = ans.__add__(Decimal((0, (1,), ans._exp)),context=context)
ans._exp += expadd
***************
*** 1903,1907 ****
rounding = context.set_rounding_decision(NEVER_ROUND)
! if not context.multiply(ans, ans) == self:
# Only rounded/inexact if here.
context.regard_flags(flags)
--- 1982,1986 ----
rounding = context.set_rounding_decision(NEVER_ROUND)
! if not ans.__mul__(ans, context=context) == self:
# Only rounded/inexact if here.
context.regard_flags(flags)
***************
*** 2140,2144 ****
# if an error occurs in the middle.
rounding = context.set_rounding(ROUND_UP)
! val = context.subtract(self, other)
context.set_rounding(rounding)
--- 2219,2223 ----
# if an error occurs in the middle.
rounding = context.set_rounding(ROUND_UP)
! val = self.__sub__(other, context=context)
context.set_rounding(rounding)
***************
*** 2157,2161 ****
return str(a.fix(context=self))
def compare(self, a, b):
! return a.__cmp__(b, context=self)
def lt(self, a, b):
return Decimal(int(self.compare(a, b)) == -1)
--- 2236,2240 ----
return str(a.fix(context=self))
def compare(self, a, b):
! return a.DecimalCmp(b, context=self)
def lt(self, a, b):
return Decimal(int(self.compare(a, b)) == -1)
***************
*** 2197,2201 ****
return a.remainder_near(b, context=self)
def quantize(self, a, b):
! return a.rescale(b, context=self)
def rescale(self, a, b):
return a.rescale(b, context=self)
--- 2276,2280 ----
return a.remainder_near(b, context=self)
def quantize(self, a, b):
! return a.quantize(b, context=self)
def rescale(self, a, b):
return a.rescale(b, context=self)
***************
*** 2647,2694 ****
return "%s%se%d" % (sign, str(top), e)
- #Map the test cases' error names to the actual errors
- ErrorNames = {'clamped' : Clamped,
- 'conversion_syntax' : ConversionSyntax,
- 'division_by_zero' : DivisionByZero,
- 'division_impossible' : DivisionImpossible,
- 'division_undefined' : DivisionUndefined,
- 'inexact' : Inexact,
- 'insufficient_storage' : InsufficientStorage,
- 'invalid_context' : InvalidContext,
- 'invalid_operation' : InvalidOperation,
- 'lost_digits' : LostDigits,
- 'overflow' : Overflow,
- 'rounded' : Rounded,
- 'subnormal' : Subnormal,
- 'underflow' : Underflow}
-
- def change_precision(precision):
- """Changes the precision of DefaultContext (used by new threads)."""
- global DEFAULT_PRECISION
- DEFAULT_PRECISION = precision
- SetDefaultContext()
-
- def change_max_exponent(exp):
- """changes Emax used by new threads."""
- global DEFAULT_MAX_EXPONENT
- DEFAULT_MAX_EXPONENT = exp
- SetDefaultContext()
-
- def change_min_exponent(exp):
- """changes Emin used by new threads"""
- global DEFAULT_MIN_EXPONENT
- DEFAULT_MIN_EXPONENT = exp
- SetDefaultContext()
-
- def change_rounding_method(rounding):
- """changes the rounding method used by new threads."""
- global DEFAULT_ROUNDING
- DEFAULT_ROUNDING = rounding
- SetDefaultContext()
-
- def change_rounding_decision(decision):
- """changes the decision of when to round used by new threads."""
- global DEFAULT_ROUNDING_DECISION
- DEFAULT_ROUNDING_DECISION = decision
- SetDefaultContext()
--- 2726,2728 ----
From eprice@users.sourceforge.net Thu Jul 3 00:50:03 2003
From: eprice@users.sourceforge.net (eprice@users.sourceforge.net)
Date: Wed, 02 Jul 2003 16:50:03 -0700
Subject: [Python-checkins] python/nondist/sandbox/decimal test_Decimal.py,1.1,1.2
Message-ID:
Update of /cvsroot/python/python/nondist/sandbox/decimal
In directory sc8-pr-cvs1:/tmp/cvs-serv994
Modified Files:
test_Decimal.py
Log Message:
Changed rescale test cases to the new quantize one.
Moved in a list that had been in the main class.
Index: test_Decimal.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/test_Decimal.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_Decimal.py 21 May 2003 16:20:24 -0000 1.1
--- test_Decimal.py 2 Jul 2003 23:50:01 -0000 1.2
***************
*** 12,15 ****
--- 12,35 ----
skip_expected = not os.path.isdir(dir)
+
+ #Map the test cases' error names to the actual errors
+
+ ErrorNames = {'clamped' : Clamped,
+ 'conversion_syntax' : ConversionSyntax,
+ 'division_by_zero' : DivisionByZero,
+ 'division_impossible' : DivisionImpossible,
+ 'division_undefined' : DivisionUndefined,
+ 'inexact' : Inexact,
+ 'insufficient_storage' : InsufficientStorage,
+ 'invalid_context' : InvalidContext,
+ 'invalid_operation' : InvalidOperation,
+ 'lost_digits' : LostDigits,
+ 'overflow' : Overflow,
+ 'rounded' : Rounded,
+ 'subnormal' : Subnormal,
+ 'underflow' : Underflow}
+
+
+
def Nonfunction(*args):
"""Doesn't do anything."""
***************
*** 102,106 ****
id = L[0]
#print id,
! funct = L[1]
valstemp = L[2:]
L = Sides[1].strip().split()
--- 122,126 ----
id = L[0]
#print id,
! funct = L[1].lower()
valstemp = L[2:]
L = Sides[1].strip().split()
***************
*** 116,119 ****
--- 136,141 ----
fname = funct
funct = getattr(self.context, funct)
+ if fname == 'rescale':
+ return
vals = []
conglomerate = ''
***************
*** 125,129 ****
for exception in theirexceptions:
self.context.trap_enablers[exception] = 0
! for val in valstemp:
if val.count("'") % 2 == 1:
quote = 1 - quote
--- 147,151 ----
for exception in theirexceptions:
self.context.trap_enablers[exception] = 0
! for i, val in enumerate(valstemp):
if val.count("'") % 2 == 1:
quote = 1 - quote
***************
*** 135,140 ****
conglomerate = ''
v = FixQuotes(val)
! if fname in ('toSci', 'toEng'):
v = self.context.new(v)
else:
v = Decimal(v)
--- 157,167 ----
conglomerate = ''
v = FixQuotes(val)
! if fname in ('tosci', 'toeng'):
v = self.context.new(v)
+ #elif fname == 'rescale' and i == 1:
+ # try:
+ # v = int(Decimal(v))
+ # except ValueError:
+ # v = float(v)
else:
v = Decimal(v)
***************
*** 145,150 ****
try:
result = str(funct(*vals))
except: #Catch any error long enough to state the test case.
! #print "ERROR:", s
raise
--- 172,179 ----
try:
result = str(funct(*vals))
+ except ExceptionList, error:
+ self.fail("Raised %s in %s" % (error, s))
except: #Catch any error long enough to state the test case.
! print "ERROR:", s
raise
***************
*** 295,298 ****
--- 324,334 ----
self.eval_file(dir + 'power' + '.decTest')
+ def test_quantize(self):
+ """Tests the Decimal class on Cowlishaw's quantize tests.
+
+ See www2.hursley.ibm.com/decimal/decTest.zip to download the suite.
+ """
+ self.eval_file(dir + 'quantize' + '.decTest')
+
def test_randomBound32(self):
"""Tests the Decimal class on Cowlishaw's randomBound32 tests.
***************
*** 322,332 ****
"""
self.eval_file(dir + 'remainderNear' + '.decTest')
-
- def test_rescale(self):
- """Tests the Decimal class on Cowlishaw's rescale tests.
-
- See www2.hursley.ibm.com/decimal/decTest.zip to download the suite.
- """
- self.eval_file(dir + 'rescale' + '.decTest')
def test_rounding(self):
--- 358,361 ----
From eprice@users.sourceforge.net Thu Jul 3 00:51:19 2003
From: eprice@users.sourceforge.net (eprice@users.sourceforge.net)
Date: Wed, 02 Jul 2003 16:51:19 -0700
Subject: [Python-checkins] python/nondist/sandbox/decimal/tests quantize.decTest,NONE,1.1 abs.decTest,1.2,1.3 add.decTest,1.2,1.3 base.decTest,1.2,1.3 clamp.decTest,1.2,1.3 compare.decTest,1.2,1.3 decimal64.decTest,1.2,1.3 divide.decTest,1.2,1.3 divideint.decTest,1.2,1.3 inexact.decTest,1.2,1.3 integer.decTest,1.2,1.3 max.decTest,1.2,1.3 min.decTest,1.2,1.3 minus.decTest,1.2,1.3 multiply.decTest,1.2,1.3 normalize.decTest,1.2,1.3 plus.decTest,1.2,1.3 power.decTest,1.2,1.3 randomBound32.decTest,1.2,1.3 randoms.decTest,1.2,1.3 remainder.decTest,1.2,1.3 remainderNear.decTest,1.2,1.3 rescale.decTest,1.2,1.3 rounding.decTest,1.2,1.3 squareroot.decTest,1.2,1.3 subtract.decTest,1.2,1.3 testall.decTest,1.2,1.3 trim.decTest,1.2,1.3
Message-ID:
Update of /cvsroot/python/python/nondist/sandbox/decimal/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv1247
Modified Files:
abs.decTest add.decTest base.decTest clamp.decTest
compare.decTest decimal64.decTest divide.decTest
divideint.decTest inexact.decTest integer.decTest max.decTest
min.decTest minus.decTest multiply.decTest normalize.decTest
plus.decTest power.decTest randomBound32.decTest
randoms.decTest remainder.decTest remainderNear.decTest
rescale.decTest rounding.decTest squareroot.decTest
subtract.decTest testall.decTest trim.decTest
Added Files:
quantize.decTest
Log Message:
Newest version of the test cases, including quantize.
--- NEW FILE: quantize.decTest ---
------------------------------------------------------------------------
-- quantize.decTest -- decimal quantize operation --
-- Copyright (c) IBM Corporation, 1981, 2003. All rights reserved. --
------------------------------------------------------------------------
-- Please see the document "General Decimal Arithmetic Testcases" --
-- at http://www2.hursley.ibm.com/decimal for the description of --
-- these testcases. --
-- --
-- These testcases are experimental ('beta' versions), and they --
-- may contain errors. They are offered on an as-is basis. In --
-- particular, achieving the same results as the tests here is not --
-- a guarantee that an implementation complies with any Standard --
-- or specification. The tests are not exhaustive. --
-- --
-- Please send comments, suggestions, and corrections to the author: --
-- Mike Cowlishaw, IBM Fellow --
-- IBM UK, PO Box 31, Birmingham Road, Warwick CV34 5JL, UK --
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
version: 2.26
-- Most of the tests here assume a "regular pattern", where the
-- sign and coefficient are +1.
extended: 1
precision: 9
rounding: half_up
maxExponent: 999
minexponent: -999
-- sanity checks
quax001 quantize 0 1e0 -> 0
quax002 quantize 1 1e0 -> 1
quax003 quantize 0.1 1e+2 -> 0E+2 Inexact Rounded
quax005 quantize 0.1 1e+1 -> 0E+1 Inexact Rounded
quax006 quantize 0.1 1e0 -> 0 Inexact Rounded
quax007 quantize 0.1 1e-1 -> 0.1
quax008 quantize 0.1 1e-2 -> 0.10
quax009 quantize 0.1 1e-3 -> 0.100
quax010 quantize 0.9 1e+2 -> 0E+2 Inexact Rounded
quax011 quantize 0.9 1e+1 -> 0E+1 Inexact Rounded
quax012 quantize 0.9 1e+0 -> 1 Inexact Rounded
quax013 quantize 0.9 1e-1 -> 0.9
quax014 quantize 0.9 1e-2 -> 0.90
quax015 quantize 0.9 1e-3 -> 0.900
-- negatives
quax021 quantize -0 1e0 -> -0
quax022 quantize -1 1e0 -> -1
quax023 quantize -0.1 1e+2 -> -0E+2 Inexact Rounded
quax025 quantize -0.1 1e+1 -> -0E+1 Inexact Rounded
quax026 quantize -0.1 1e0 -> -0 Inexact Rounded
quax027 quantize -0.1 1e-1 -> -0.1
quax028 quantize -0.1 1e-2 -> -0.10
quax029 quantize -0.1 1e-3 -> -0.100
quax030 quantize -0.9 1e+2 -> -0E+2 Inexact Rounded
quax031 quantize -0.9 1e+1 -> -0E+1 Inexact Rounded
quax032 quantize -0.9 1e+0 -> -1 Inexact Rounded
quax033 quantize -0.9 1e-1 -> -0.9
quax034 quantize -0.9 1e-2 -> -0.90
quax035 quantize -0.9 1e-3 -> -0.900
quax036 quantize -0.5 1e+2 -> -0E+2 Inexact Rounded
quax037 quantize -0.5 1e+1 -> -0E+1 Inexact Rounded
quax038 quantize -0.5 1e+0 -> -1 Inexact Rounded
quax039 quantize -0.5 1e-1 -> -0.5
quax040 quantize -0.5 1e-2 -> -0.50
quax041 quantize -0.5 1e-3 -> -0.500
quax042 quantize -0.9 1e+2 -> -0E+2 Inexact Rounded
quax043 quantize -0.9 1e+1 -> -0E+1 Inexact Rounded
quax044 quantize -0.9 1e+0 -> -1 Inexact Rounded
quax045 quantize -0.9 1e-1 -> -0.9
quax046 quantize -0.9 1e-2 -> -0.90
quax047 quantize -0.9 1e-3 -> -0.900
-- examples from Specification
quax060 quantize 2.17 0.001 -> 2.170
quax061 quantize 2.17 0.01 -> 2.17
quax062 quantize 2.17 0.1 -> 2.2 Inexact Rounded
quax063 quantize 2.17 1e+0 -> 2 Inexact Rounded
quax064 quantize 2.17 1e+1 -> 0E+1 Inexact Rounded
quax065 quantize 2 Inf -> NaN Invalid_operation
quax066 quantize -0.1 1 -> -0 Inexact Rounded
quax067 quantize -0 1e+5 -> -0E+5
quax068 quantize +35236450.6 1e-2 -> NaN Invalid_operation
quax069 quantize -35236450.6 1e-2 -> NaN Invalid_operation
quax070 quantize 217 1e-1 -> 217.0
quax071 quantize 217 1e+0 -> 217
quax072 quantize 217 1e+1 -> 2.2E+2 Inexact Rounded
quax073 quantize 217 1e+2 -> 2E+2 Inexact Rounded
-- general tests ..
quax089 quantize 12 1e+4 -> 0E+4 Inexact Rounded
quax090 quantize 12 1e+3 -> 0E+3 Inexact Rounded
quax091 quantize 12 1e+2 -> 0E+2 Inexact Rounded
quax092 quantize 12 1e+1 -> 1E+1 Inexact Rounded
quax093 quantize 1.2345 1e-2 -> 1.23 Inexact Rounded
quax094 quantize 1.2355 1e-2 -> 1.24 Inexact Rounded
quax095 quantize 1.2345 1e-6 -> 1.234500
quax096 quantize 9.9999 1e-2 -> 10.00 Inexact Rounded
quax097 quantize 0.0001 1e-2 -> 0.00 Inexact Rounded
quax098 quantize 0.001 1e-2 -> 0.00 Inexact Rounded
quax099 quantize 0.009 1e-2 -> 0.01 Inexact Rounded
quax100 quantize 92 1e+2 -> 1E+2 Inexact Rounded
quax101 quantize -1 1e0 -> -1
quax102 quantize -1 1e-1 -> -1.0
quax103 quantize -1 1e-2 -> -1.00
quax104 quantize 0 1e0 -> 0
quax105 quantize 0 1e-1 -> 0.0
quax106 quantize 0 1e-2 -> 0.00
quax107 quantize 0.00 1e0 -> 0
quax108 quantize 0 1e+1 -> 0E+1
quax109 quantize 0 1e+2 -> 0E+2
quax110 quantize +1 1e0 -> 1
quax111 quantize +1 1e-1 -> 1.0
quax112 quantize +1 1e-2 -> 1.00
quax120 quantize 1.04 1e-3 -> 1.040
quax121 quantize 1.04 1e-2 -> 1.04
quax122 quantize 1.04 1e-1 -> 1.0 Inexact Rounded
quax123 quantize 1.04 1e0 -> 1 Inexact Rounded
quax124 quantize 1.05 1e-3 -> 1.050
quax125 quantize 1.05 1e-2 -> 1.05
quax126 quantize 1.05 1e-1 -> 1.1 Inexact Rounded
quax127 quantize 1.05 1e0 -> 1 Inexact Rounded
quax128 quantize 1.05 1e-3 -> 1.050
quax129 quantize 1.05 1e-2 -> 1.05
quax130 quantize 1.05 1e-1 -> 1.1 Inexact Rounded
quax131 quantize 1.05 1e0 -> 1 Inexact Rounded
quax132 quantize 1.06 1e-3 -> 1.060
quax133 quantize 1.06 1e-2 -> 1.06
quax134 quantize 1.06 1e-1 -> 1.1 Inexact Rounded
quax135 quantize 1.06 1e0 -> 1 Inexact Rounded
quax140 quantize -10 1e-2 -> -10.00
quax141 quantize +1 1e-2 -> 1.00
quax142 quantize +10 1e-2 -> 10.00
quax143 quantize 1E+10 1e-2 -> NaN Invalid_operation
quax144 quantize 1E-10 1e-2 -> 0.00 Inexact Rounded
quax145 quantize 1E-3 1e-2 -> 0.00 Inexact Rounded
quax146 quantize 1E-2 1e-2 -> 0.01
quax147 quantize 1E-1 1e-2 -> 0.10
quax148 quantize 0E-10 1e-2 -> 0.00
quax150 quantize 1.0600 1e-5 -> 1.06000
quax151 quantize 1.0600 1e-4 -> 1.0600
quax152 quantize 1.0600 1e-3 -> 1.060 Rounded
quax153 quantize 1.0600 1e-2 -> 1.06 Rounded
quax154 quantize 1.0600 1e-1 -> 1.1 Inexact Rounded
quax155 quantize 1.0600 1e0 -> 1 Inexact Rounded
-- base tests with non-1 coefficients
quax161 quantize 0 -9e0 -> 0
quax162 quantize 1 -7e0 -> 1
quax163 quantize 0.1 -1e+2 -> 0E+2 Inexact Rounded
quax165 quantize 0.1 0e+1 -> 0E+1 Inexact Rounded
quax166 quantize 0.1 2e0 -> 0 Inexact Rounded
quax167 quantize 0.1 3e-1 -> 0.1
quax168 quantize 0.1 44e-2 -> 0.10
quax169 quantize 0.1 555e-3 -> 0.100
quax170 quantize 0.9 6666e+2 -> 0E+2 Inexact Rounded
quax171 quantize 0.9 -777e+1 -> 0E+1 Inexact Rounded
quax172 quantize 0.9 -88e+0 -> 1 Inexact Rounded
quax173 quantize 0.9 -9e-1 -> 0.9
quax174 quantize 0.9 0e-2 -> 0.90
quax175 quantize 0.9 1.1e-3 -> 0.9000
-- negatives
quax181 quantize -0 1.1e0 -> -0.0
quax182 quantize -1 -1e0 -> -1
quax183 quantize -0.1 11e+2 -> -0E+2 Inexact Rounded
quax185 quantize -0.1 111e+1 -> -0E+1 Inexact Rounded
quax186 quantize -0.1 71e0 -> -0 Inexact Rounded
quax187 quantize -0.1 -91e-1 -> -0.1
quax188 quantize -0.1 -.1e-2 -> -0.100
quax189 quantize -0.1 -1e-3 -> -0.100
quax190 quantize -0.9 0e+2 -> -0E+2 Inexact Rounded
quax191 quantize -0.9 -0e+1 -> -0E+1 Inexact Rounded
quax192 quantize -0.9 -10e+0 -> -1 Inexact Rounded
quax193 quantize -0.9 100e-1 -> -0.9
quax194 quantize -0.9 999e-2 -> -0.90
-- +ve exponents ..
quax201 quantize -1 1e+0 -> -1
quax202 quantize -1 1e+1 -> -0E+1 Inexact Rounded
quax203 quantize -1 1e+2 -> -0E+2 Inexact Rounded
quax204 quantize 0 1e+0 -> 0
quax205 quantize 0 1e+1 -> 0E+1
quax206 quantize 0 1e+2 -> 0E+2
quax207 quantize +1 1e+0 -> 1
quax208 quantize +1 1e+1 -> 0E+1 Inexact Rounded
quax209 quantize +1 1e+2 -> 0E+2 Inexact Rounded
quax220 quantize 1.04 1e+3 -> 0E+3 Inexact Rounded
quax221 quantize 1.04 1e+2 -> 0E+2 Inexact Rounded
quax222 quantize 1.04 1e+1 -> 0E+1 Inexact Rounded
quax223 quantize 1.04 1e+0 -> 1 Inexact Rounded
quax224 quantize 1.05 1e+3 -> 0E+3 Inexact Rounded
quax225 quantize 1.05 1e+2 -> 0E+2 Inexact Rounded
quax226 quantize 1.05 1e+1 -> 0E+1 Inexact Rounded
quax227 quantize 1.05 1e+0 -> 1 Inexact Rounded
quax228 quantize 1.05 1e+3 -> 0E+3 Inexact Rounded
quax229 quantize 1.05 1e+2 -> 0E+2 Inexact Rounded
quax230 quantize 1.05 1e+1 -> 0E+1 Inexact Rounded
quax231 quantize 1.05 1e+0 -> 1 Inexact Rounded
quax232 quantize 1.06 1e+3 -> 0E+3 Inexact Rounded
quax233 quantize 1.06 1e+2 -> 0E+2 Inexact Rounded
quax234 quantize 1.06 1e+1 -> 0E+1 Inexact Rounded
quax235 quantize 1.06 1e+0 -> 1 Inexact Rounded
quax240 quantize -10 1e+1 -> -1E+1 Rounded
quax241 quantize +1 1e+1 -> 0E+1 Inexact Rounded
quax242 quantize +10 1e+1 -> 1E+1 Rounded
quax243 quantize 1E+1 1e+1 -> 1E+1 -- underneath this is E+1
quax244 quantize 1E+2 1e+1 -> 1.0E+2 -- underneath this is E+1
quax245 quantize 1E+3 1e+1 -> 1.00E+3 -- underneath this is E+1
quax246 quantize 1E+4 1e+1 -> 1.000E+4 -- underneath this is E+1
quax247 quantize 1E+5 1e+1 -> 1.0000E+5 -- underneath this is E+1
quax248 quantize 1E+6 1e+1 -> 1.00000E+6 -- underneath this is E+1
quax249 quantize 1E+7 1e+1 -> 1.000000E+7 -- underneath this is E+1
quax250 quantize 1E+8 1e+1 -> 1.0000000E+8 -- underneath this is E+1
quax251 quantize 1E+9 1e+1 -> 1.00000000E+9 -- underneath this is E+1
-- next one tries to add 9 zeros
quax252 quantize 1E+10 1e+1 -> NaN Invalid_operation
quax253 quantize 1E-10 1e+1 -> 0E+1 Inexact Rounded
quax254 quantize 1E-2 1e+1 -> 0E+1 Inexact Rounded
quax255 quantize 0E-10 1e+1 -> 0E+1
quax256 quantize -0E-10 1e+1 -> -0E+1
quax257 quantize -0E-1 1e+1 -> -0E+1
quax258 quantize -0 1e+1 -> -0E+1
quax259 quantize -0E+1 1e+1 -> -0E+1
quax260 quantize -10 1e+2 -> -0E+2 Inexact Rounded
quax261 quantize +1 1e+2 -> 0E+2 Inexact Rounded
quax262 quantize +10 1e+2 -> 0E+2 Inexact Rounded
quax263 quantize 1E+1 1e+2 -> 0E+2 Inexact Rounded
quax264 quantize 1E+2 1e+2 -> 1E+2
quax265 quantize 1E+3 1e+2 -> 1.0E+3
quax266 quantize 1E+4 1e+2 -> 1.00E+4
quax267 quantize 1E+5 1e+2 -> 1.000E+5
quax268 quantize 1E+6 1e+2 -> 1.0000E+6
quax269 quantize 1E+7 1e+2 -> 1.00000E+7
quax270 quantize 1E+8 1e+2 -> 1.000000E+8
quax271 quantize 1E+9 1e+2 -> 1.0000000E+9
quax272 quantize 1E+10 1e+2 -> 1.00000000E+10
quax273 quantize 1E-10 1e+2 -> 0E+2 Inexact Rounded
quax274 quantize 1E-2 1e+2 -> 0E+2 Inexact Rounded
quax275 quantize 0E-10 1e+2 -> 0E+2
quax280 quantize -10 1e+3 -> -0E+3 Inexact Rounded
quax281 quantize +1 1e+3 -> 0E+3 Inexact Rounded
quax282 quantize +10 1e+3 -> 0E+3 Inexact Rounded
quax283 quantize 1E+1 1e+3 -> 0E+3 Inexact Rounded
quax284 quantize 1E+2 1e+3 -> 0E+3 Inexact Rounded
quax285 quantize 1E+3 1e+3 -> 1E+3
quax286 quantize 1E+4 1e+3 -> 1.0E+4
quax287 quantize 1E+5 1e+3 -> 1.00E+5
quax288 quantize 1E+6 1e+3 -> 1.000E+6
quax289 quantize 1E+7 1e+3 -> 1.0000E+7
quax290 quantize 1E+8 1e+3 -> 1.00000E+8
quax291 quantize 1E+9 1e+3 -> 1.000000E+9
quax292 quantize 1E+10 1e+3 -> 1.0000000E+10
quax293 quantize 1E-10 1e+3 -> 0E+3 Inexact Rounded
quax294 quantize 1E-2 1e+3 -> 0E+3 Inexact Rounded
quax295 quantize 0E-10 1e+3 -> 0E+3
-- round up from below [sign wrong in JIT compiler once]
quax300 quantize 0.0078 1e-5 -> 0.00780
quax301 quantize 0.0078 1e-4 -> 0.0078
quax302 quantize 0.0078 1e-3 -> 0.008 Inexact Rounded
quax303 quantize 0.0078 1e-2 -> 0.01 Inexact Rounded
quax304 quantize 0.0078 1e-1 -> 0.0 Inexact Rounded
quax305 quantize 0.0078 1e0 -> 0 Inexact Rounded
quax306 quantize 0.0078 1e+1 -> 0E+1 Inexact Rounded
quax307 quantize 0.0078 1e+2 -> 0E+2 Inexact Rounded
quax310 quantize -0.0078 1e-5 -> -0.00780
quax311 quantize -0.0078 1e-4 -> -0.0078
quax312 quantize -0.0078 1e-3 -> -0.008 Inexact Rounded
quax313 quantize -0.0078 1e-2 -> -0.01 Inexact Rounded
quax314 quantize -0.0078 1e-1 -> -0.0 Inexact Rounded
quax315 quantize -0.0078 1e0 -> -0 Inexact Rounded
quax316 quantize -0.0078 1e+1 -> -0E+1 Inexact Rounded
quax317 quantize -0.0078 1e+2 -> -0E+2 Inexact Rounded
quax320 quantize 0.078 1e-5 -> 0.07800
quax321 quantize 0.078 1e-4 -> 0.0780
quax322 quantize 0.078 1e-3 -> 0.078
quax323 quantize 0.078 1e-2 -> 0.08 Inexact Rounded
quax324 quantize 0.078 1e-1 -> 0.1 Inexact Rounded
quax325 quantize 0.078 1e0 -> 0 Inexact Rounded
quax326 quantize 0.078 1e+1 -> 0E+1 Inexact Rounded
quax327 quantize 0.078 1e+2 -> 0E+2 Inexact Rounded
quax330 quantize -0.078 1e-5 -> -0.07800
quax331 quantize -0.078 1e-4 -> -0.0780
quax332 quantize -0.078 1e-3 -> -0.078
quax333 quantize -0.078 1e-2 -> -0.08 Inexact Rounded
quax334 quantize -0.078 1e-1 -> -0.1 Inexact Rounded
quax335 quantize -0.078 1e0 -> -0 Inexact Rounded
quax336 quantize -0.078 1e+1 -> -0E+1 Inexact Rounded
quax337 quantize -0.078 1e+2 -> -0E+2 Inexact Rounded
quax340 quantize 0.78 1e-5 -> 0.78000
quax341 quantize 0.78 1e-4 -> 0.7800
quax342 quantize 0.78 1e-3 -> 0.780
quax343 quantize 0.78 1e-2 -> 0.78
quax344 quantize 0.78 1e-1 -> 0.8 Inexact Rounded
quax345 quantize 0.78 1e0 -> 1 Inexact Rounded
quax346 quantize 0.78 1e+1 -> 0E+1 Inexact Rounded
quax347 quantize 0.78 1e+2 -> 0E+2 Inexact Rounded
quax350 quantize -0.78 1e-5 -> -0.78000
quax351 quantize -0.78 1e-4 -> -0.7800
quax352 quantize -0.78 1e-3 -> -0.780
quax353 quantize -0.78 1e-2 -> -0.78
quax354 quantize -0.78 1e-1 -> -0.8 Inexact Rounded
quax355 quantize -0.78 1e0 -> -1 Inexact Rounded
quax356 quantize -0.78 1e+1 -> -0E+1 Inexact Rounded
quax357 quantize -0.78 1e+2 -> -0E+2 Inexact Rounded
quax360 quantize 7.8 1e-5 -> 7.80000
quax361 quantize 7.8 1e-4 -> 7.8000
quax362 quantize 7.8 1e-3 -> 7.800
quax363 quantize 7.8 1e-2 -> 7.80
quax364 quantize 7.8 1e-1 -> 7.8
quax365 quantize 7.8 1e0 -> 8 Inexact Rounded
quax366 quantize 7.8 1e+1 -> 1E+1 Inexact Rounded
quax367 quantize 7.8 1e+2 -> 0E+2 Inexact Rounded
quax368 quantize 7.8 1e+3 -> 0E+3 Inexact Rounded
quax370 quantize -7.8 1e-5 -> -7.80000
quax371 quantize -7.8 1e-4 -> -7.8000
quax372 quantize -7.8 1e-3 -> -7.800
quax373 quantize -7.8 1e-2 -> -7.80
quax374 quantize -7.8 1e-1 -> -7.8
quax375 quantize -7.8 1e0 -> -8 Inexact Rounded
quax376 quantize -7.8 1e+1 -> -1E+1 Inexact Rounded
quax377 quantize -7.8 1e+2 -> -0E+2 Inexact Rounded
quax378 quantize -7.8 1e+3 -> -0E+3 Inexact Rounded
-- some individuals
precision: 9
quax380 quantize 352364.506 1e-2 -> 352364.51 Inexact Rounded
quax381 quantize 3523645.06 1e-2 -> 3523645.06
quax382 quantize 35236450.6 1e-2 -> NaN Invalid_operation
quax383 quantize 352364506 1e-2 -> NaN Invalid_operation
quax384 quantize -352364.506 1e-2 -> -352364.51 Inexact Rounded
quax385 quantize -3523645.06 1e-2 -> -3523645.06
quax386 quantize -35236450.6 1e-2 -> NaN Invalid_operation
quax387 quantize -352364506 1e-2 -> NaN Invalid_operation
rounding: down
quax389 quantize 35236450.6 1e-2 -> NaN Invalid_operation
-- ? should that one instead have been:
-- quax389 quantize 35236450.6 1e-2 -> NaN Invalid_operation
rounding: half_up
-- and a few more from e-mail discussions
precision: 7
quax391 quantize 12.34567 1e-3 -> 12.346 Inexact Rounded
quax392 quantize 123.4567 1e-3 -> 123.457 Inexact Rounded
quax393 quantize 1234.567 1e-3 -> 1234.567
quax394 quantize 12345.67 1e-3 -> NaN Invalid_operation
quax395 quantize 123456.7 1e-3 -> NaN Invalid_operation
quax396 quantize 1234567. 1e-3 -> NaN Invalid_operation
-- some 9999 round-up cases
precision: 9
quax400 quantize 9.999 1e-5 -> 9.99900
quax401 quantize 9.999 1e-4 -> 9.9990
quax402 quantize 9.999 1e-3 -> 9.999
quax403 quantize 9.999 1e-2 -> 10.00 Inexact Rounded
quax404 quantize 9.999 1e-1 -> 10.0 Inexact Rounded
quax405 quantize 9.999 1e0 -> 10 Inexact Rounded
quax406 quantize 9.999 1e1 -> 1E+1 Inexact Rounded
quax407 quantize 9.999 1e2 -> 0E+2 Inexact Rounded
quax410 quantize 0.999 1e-5 -> 0.99900
quax411 quantize 0.999 1e-4 -> 0.9990
quax412 quantize 0.999 1e-3 -> 0.999
quax413 quantize 0.999 1e-2 -> 1.00 Inexact Rounded
quax414 quantize 0.999 1e-1 -> 1.0 Inexact Rounded
quax415 quantize 0.999 1e0 -> 1 Inexact Rounded
quax416 quantize 0.999 1e1 -> 0E+1 Inexact Rounded
quax420 quantize 0.0999 1e-5 -> 0.09990
quax421 quantize 0.0999 1e-4 -> 0.0999
quax422 quantize 0.0999 1e-3 -> 0.100 Inexact Rounded
quax423 quantize 0.0999 1e-2 -> 0.10 Inexact Rounded
quax424 quantize 0.0999 1e-1 -> 0.1 Inexact Rounded
quax425 quantize 0.0999 1e0 -> 0 Inexact Rounded
quax426 quantize 0.0999 1e1 -> 0E+1 Inexact Rounded
quax430 quantize 0.00999 1e-5 -> 0.00999
quax431 quantize 0.00999 1e-4 -> 0.0100 Inexact Rounded
quax432 quantize 0.00999 1e-3 -> 0.010 Inexact Rounded
quax433 quantize 0.00999 1e-2 -> 0.01 Inexact Rounded
quax434 quantize 0.00999 1e-1 -> 0.0 Inexact Rounded
quax435 quantize 0.00999 1e0 -> 0 Inexact Rounded
quax436 quantize 0.00999 1e1 -> 0E+1 Inexact Rounded
quax440 quantize 0.000999 1e-5 -> 0.00100 Inexact Rounded
quax441 quantize 0.000999 1e-4 -> 0.0010 Inexact Rounded
quax442 quantize 0.000999 1e-3 -> 0.001 Inexact Rounded
quax443 quantize 0.000999 1e-2 -> 0.00 Inexact Rounded
quax444 quantize 0.000999 1e-1 -> 0.0 Inexact Rounded
quax445 quantize 0.000999 1e0 -> 0 Inexact Rounded
quax446 quantize 0.000999 1e1 -> 0E+1 Inexact Rounded
precision: 8
quax449 quantize 9.999E-15 1e-23 -> NaN Invalid_operation
quax450 quantize 9.999E-15 1e-22 -> 9.9990000E-15
quax451 quantize 9.999E-15 1e-21 -> 9.999000E-15
quax452 quantize 9.999E-15 1e-20 -> 9.99900E-15
quax453 quantize 9.999E-15 1e-19 -> 9.9990E-15
quax454 quantize 9.999E-15 1e-18 -> 9.999E-15
quax455 quantize 9.999E-15 1e-17 -> 1.000E-14 Inexact Rounded
quax456 quantize 9.999E-15 1e-16 -> 1.00E-14 Inexact Rounded
quax457 quantize 9.999E-15 1e-15 -> 1.0E-14 Inexact Rounded
quax458 quantize 9.999E-15 1e-14 -> 1E-14 Inexact Rounded
quax459 quantize 9.999E-15 1e-13 -> 0E-13 Inexact Rounded
quax460 quantize 9.999E-15 1e-12 -> 0E-12 Inexact Rounded
quax461 quantize 9.999E-15 1e-11 -> 0E-11 Inexact Rounded
quax462 quantize 9.999E-15 1e-10 -> 0E-10 Inexact Rounded
quax463 quantize 9.999E-15 1e-9 -> 0E-9 Inexact Rounded
quax464 quantize 9.999E-15 1e-8 -> 0E-8 Inexact Rounded
quax465 quantize 9.999E-15 1e-7 -> 0E-7 Inexact Rounded
quax466 quantize 9.999E-15 1e-6 -> 0.000000 Inexact Rounded
quax467 quantize 9.999E-15 1e-5 -> 0.00000 Inexact Rounded
quax468 quantize 9.999E-15 1e-4 -> 0.0000 Inexact Rounded
quax469 quantize 9.999E-15 1e-3 -> 0.000 Inexact Rounded
quax470 quantize 9.999E-15 1e-2 -> 0.00 Inexact Rounded
quax471 quantize 9.999E-15 1e-1 -> 0.0 Inexact Rounded
quax472 quantize 9.999E-15 1e0 -> 0 Inexact Rounded
quax473 quantize 9.999E-15 1e1 -> 0E+1 Inexact Rounded
-- long operand checks [rhs checks removed]
maxexponent: 999
minexponent: -999
precision: 9
quax481 quantize 12345678000 1e+3 -> 1.2345678E+10 Rounded
quax482 quantize 1234567800 1e+1 -> 1.23456780E+9 Rounded
quax483 quantize 1234567890 1e+1 -> 1.23456789E+9 Rounded
quax484 quantize 1234567891 1e+1 -> 1.23456789E+9 Inexact Rounded
quax485 quantize 12345678901 1e+2 -> 1.23456789E+10 Inexact Rounded
quax486 quantize 1234567896 1e+1 -> 1.23456790E+9 Inexact Rounded
-- a potential double-round
quax487 quantize 1234.987643 1e-4 -> 1234.9876 Inexact Rounded
quax488 quantize 1234.987647 1e-4 -> 1234.9876 Inexact Rounded
precision: 15
quax491 quantize 12345678000 1e+3 -> 1.2345678E+10 Rounded
quax492 quantize 1234567800 1e+1 -> 1.23456780E+9 Rounded
quax493 quantize 1234567890 1e+1 -> 1.23456789E+9 Rounded
quax494 quantize 1234567891 1e+1 -> 1.23456789E+9 Inexact Rounded
quax495 quantize 12345678901 1e+2 -> 1.23456789E+10 Inexact Rounded
quax496 quantize 1234567896 1e+1 -> 1.23456790E+9 Inexact Rounded
quax497 quantize 1234.987643 1e-4 -> 1234.9876 Inexact Rounded
quax498 quantize 1234.987647 1e-4 -> 1234.9876 Inexact Rounded
-- Zeros
quax500 quantize 0 1e1 -> 0E+1
quax501 quantize 0 1e0 -> 0
quax502 quantize 0 1e-1 -> 0.0
quax503 quantize 0.0 1e-1 -> 0.0
quax504 quantize 0.0 1e0 -> 0
quax505 quantize 0.0 1e+1 -> 0E+1
quax506 quantize 0E+1 1e-1 -> 0.0
quax507 quantize 0E+1 1e0 -> 0
quax508 quantize 0E+1 1e+1 -> 0E+1
quax509 quantize -0 1e1 -> -0E+1
quax510 quantize -0 1e0 -> -0
quax511 quantize -0 1e-1 -> -0.0
quax512 quantize -0.0 1e-1 -> -0.0
quax513 quantize -0.0 1e0 -> -0
quax514 quantize -0.0 1e+1 -> -0E+1
quax515 quantize -0E+1 1e-1 -> -0.0
quax516 quantize -0E+1 1e0 -> -0
quax517 quantize -0E+1 1e+1 -> -0E+1
-- Suspicious RHS values
maxexponent: 999999999
minexponent: -999999999
precision: 15
quax520 quantize 1.234 1e999999000 -> 0E+999999000 Inexact Rounded
quax521 quantize 123.456 1e999999000 -> 0E+999999000 Inexact Rounded
quax522 quantize 1.234 1e999999999 -> 0E+999999999 Inexact Rounded
quax523 quantize 123.456 1e999999999 -> 0E+999999999 Inexact Rounded
quax524 quantize 123.456 1e1000000000 -> NaN Invalid_operation
quax525 quantize 123.456 1e12345678903 -> NaN Invalid_operation
-- next four are "won't fit" overflows
quax526 quantize 1.234 1e-999999000 -> NaN Invalid_operation
quax527 quantize 123.456 1e-999999000 -> NaN Invalid_operation
quax528 quantize 1.234 1e-999999999 -> NaN Invalid_operation
quax529 quantize 123.456 1e-999999999 -> NaN Invalid_operation
quax530 quantize 123.456 1e-1000000014 -> NaN Invalid_operation
quax531 quantize 123.456 1e-12345678903 -> NaN Invalid_operation
maxexponent: 999
minexponent: -999
precision: 15
quax532 quantize 1.234E+999 1e999 -> 1E+999 Inexact Rounded
quax533 quantize 1.234E+998 1e999 -> 0E+999 Inexact Rounded
quax534 quantize 1.234 1e999 -> 0E+999 Inexact Rounded
quax535 quantize 1.234 1e1000 -> NaN Invalid_operation
quax536 quantize 1.234 1e5000 -> NaN Invalid_operation
quax537 quantize 0 1e-999 -> 0E-999
-- next two are "won't fit" overflows
quax538 quantize 1.234 1e-999 -> NaN Invalid_operation
quax539 quantize 1.234 1e-1000 -> NaN Invalid_operation
quax540 quantize 1.234 1e-5000 -> NaN Invalid_operation
-- [more below]
-- check bounds (lhs maybe out of range for destination, etc.)
precision: 7
quax541 quantize 1E+999 1e+999 -> 1E+999
quax542 quantize 1E+1000 1e+999 -> NaN Invalid_operation
quax543 quantize 1E+999 1e+1000 -> NaN Invalid_operation
quax544 quantize 1E-999 1e-999 -> 1E-999
quax545 quantize 1E-1000 1e-999 -> 0E-999 Inexact Rounded
quax546 quantize 1E-999 1e-1000 -> 1.0E-999
quax547 quantize 1E-1005 1e-999 -> 0E-999 Inexact Rounded
quax548 quantize 1E-1006 1e-999 -> 0E-999 Inexact Rounded
quax549 quantize 1E-1007 1e-999 -> 0E-999 Inexact Rounded
quax550 quantize 1E-998 1e-1005 -> NaN Invalid_operation -- won't fit
quax551 quantize 1E-999 1e-1005 -> 1.000000E-999
quax552 quantize 1E-1000 1e-1005 -> 1.00000E-1000 Subnormal
quax553 quantize 1E-999 1e-1006 -> NaN Invalid_operation
quax554 quantize 1E-999 1e-1007 -> NaN Invalid_operation
-- related subnormal rounding
quax555 quantize 1.666666E-999 1e-1005 -> 1.666666E-999
quax556 quantize 1.666666E-1000 1e-1005 -> 1.66667E-1000 Underflow Subnormal Inexact Rounded
quax557 quantize 1.666666E-1001 1e-1005 -> 1.6667E-1001 Underflow Subnormal Inexact Rounded
quax558 quantize 1.666666E-1002 1e-1005 -> 1.667E-1002 Underflow Subnormal Inexact Rounded
quax559 quantize 1.666666E-1003 1e-1005 -> 1.67E-1003 Underflow Subnormal Inexact Rounded
quax560 quantize 1.666666E-1004 1e-1005 -> 1.7E-1004 Underflow Subnormal Inexact Rounded
quax561 quantize 1.666666E-1005 1e-1005 -> 2E-1005 Underflow Subnormal Inexact Rounded
quax562 quantize 1.666666E-1006 1e-1005 -> 0E-1005 Inexact Rounded
quax563 quantize 1.666666E-1007 1e-1005 -> 0E-1005 Inexact Rounded
-- Specials
quax580 quantize Inf -Inf -> NaN Invalid_operation
quax581 quantize Inf 1e-1000 -> NaN Invalid_operation
quax582 quantize Inf 1e-1 -> NaN Invalid_operation
quax583 quantize Inf 1e0 -> NaN Invalid_operation
quax584 quantize Inf 1e1 -> NaN Invalid_operation
quax585 quantize Inf 1e1000 -> NaN Invalid_operation
quax586 quantize Inf Inf -> NaN Invalid_operation
quax587 quantize -1000 Inf -> NaN Invalid_operation
quax588 quantize -Inf Inf -> NaN Invalid_operation
quax589 quantize -1 Inf -> NaN Invalid_operation
quax590 quantize 0 Inf -> NaN Invalid_operation
quax591 quantize 1 Inf -> NaN Invalid_operation
quax592 quantize 1000 Inf -> NaN Invalid_operation
quax593 quantize Inf Inf -> NaN Invalid_operation
quax594 quantize Inf 1e-0 -> NaN Invalid_operation
quax595 quantize -0 Inf -> NaN Invalid_operation
quax600 quantize -Inf -Inf -> NaN Invalid_operation
quax601 quantize -Inf 1e-1000 -> NaN Invalid_operation
quax602 quantize -Inf 1e-1 -> NaN Invalid_operation
quax603 quantize -Inf 1e0 -> NaN Invalid_operation
quax604 quantize -Inf 1e1 -> NaN Invalid_operation
quax605 quantize -Inf 1e1000 -> NaN Invalid_operation
quax606 quantize -Inf Inf -> NaN Invalid_operation
quax607 quantize -1000 Inf -> NaN Invalid_operation
quax608 quantize -Inf -Inf -> NaN Invalid_operation
quax609 quantize -1 -Inf -> NaN Invalid_operation
quax610 quantize 0 -Inf -> NaN Invalid_operation
quax611 quantize 1 -Inf -> NaN Invalid_operation
quax612 quantize 1000 -Inf -> NaN Invalid_operation
quax613 quantize Inf -Inf -> NaN Invalid_operation
quax614 quantize -Inf 1e-0 -> NaN Invalid_operation
quax615 quantize -0 -Inf -> NaN Invalid_operation
quax621 quantize NaN -Inf -> NaN Invalid_operation
quax622 quantize NaN 1e-1000 -> NaN
quax623 quantize NaN 1e-1 -> NaN
quax624 quantize NaN 1e0 -> NaN
quax625 quantize NaN 1e1 -> NaN
quax626 quantize NaN 1e1000 -> NaN
quax627 quantize NaN Inf -> NaN Invalid_operation
quax628 quantize NaN NaN -> NaN
quax629 quantize -Inf NaN -> NaN Invalid_operation
quax630 quantize -1000 NaN -> NaN
quax631 quantize -1 NaN -> NaN
quax632 quantize 0 NaN -> NaN
quax633 quantize 1 NaN -> NaN
quax634 quantize 1000 NaN -> NaN
quax635 quantize Inf NaN -> NaN Invalid_operation
quax636 quantize NaN 1e-0 -> NaN
quax637 quantize -0 NaN -> NaN
quax641 quantize sNaN -Inf -> NaN Invalid_operation
quax642 quantize sNaN 1e-1000 -> NaN Invalid_operation
quax643 quantize sNaN 1e-1 -> NaN Invalid_operation
quax644 quantize sNaN 1e0 -> NaN Invalid_operation
quax645 quantize sNaN 1e1 -> NaN Invalid_operation
quax646 quantize sNaN 1e1000 -> NaN Invalid_operation
quax647 quantize sNaN NaN -> NaN Invalid_operation
quax648 quantize sNaN sNaN -> NaN Invalid_operation
quax649 quantize NaN sNaN -> NaN Invalid_operation
quax650 quantize -Inf sNaN -> NaN Invalid_operation
quax651 quantize -1000 sNaN -> NaN Invalid_operation
quax652 quantize -1 sNaN -> NaN Invalid_operation
quax653 quantize 0 sNaN -> NaN Invalid_operation
quax654 quantize 1 sNaN -> NaN Invalid_operation
quax655 quantize 1000 sNaN -> NaN Invalid_operation
quax656 quantize Inf sNaN -> NaN Invalid_operation
quax657 quantize NaN sNaN -> NaN Invalid_operation
quax658 quantize sNaN 1e-0 -> NaN Invalid_operation
quax659 quantize -0 sNaN -> NaN Invalid_operation
-- subnormals and underflow
precision: 4
maxexponent: 999
minexponent: -999
quax710 quantize 1.00E-999 1e-999 -> 1E-999 Rounded
quax711 quantize 0.1E-999 2e-1000 -> 1E-1000 Subnormal
quax712 quantize 0.10E-999 3e-1000 -> 1E-1000 Subnormal Rounded
quax713 quantize 0.100E-999 4e-1000 -> 1E-1000 Subnormal Rounded
quax714 quantize 0.01E-999 5e-1001 -> 1E-1001 Subnormal
-- next is rounded to Emin
quax715 quantize 0.999E-999 1e-999 -> 1E-999 Inexact Rounded
quax716 quantize 0.099E-999 10e-1000 -> 1E-1000 Inexact Rounded Subnormal Underflow
quax717 quantize 0.009E-999 1e-1001 -> 1E-1001 Inexact Rounded Subnormal Underflow
quax718 quantize 0.001E-999 1e-1001 -> 0E-1001 Inexact Rounded
quax719 quantize 0.0009E-999 1e-1001 -> 0E-1001 Inexact Rounded
quax720 quantize 0.0001E-999 1e-1001 -> 0E-1001 Inexact Rounded
quax730 quantize -1.00E-999 1e-999 -> -1E-999 Rounded
quax731 quantize -0.1E-999 1e-999 -> -0E-999 Rounded Inexact
quax732 quantize -0.10E-999 1e-999 -> -0E-999 Rounded Inexact
quax733 quantize -0.100E-999 1e-999 -> -0E-999 Rounded Inexact
quax734 quantize -0.01E-999 1e-999 -> -0E-999 Inexact Rounded
-- next is rounded to Emin
quax735 quantize -0.999E-999 90e-999 -> -1E-999 Inexact Rounded
quax736 quantize -0.099E-999 -1e-999 -> -0E-999 Inexact Rounded
quax737 quantize -0.009E-999 -1e-999 -> -0E-999 Inexact Rounded
quax738 quantize -0.001E-999 -0e-999 -> -0E-999 Inexact Rounded
quax739 quantize -0.0001E-999 0e-999 -> -0E-999 Inexact Rounded
quax740 quantize -1.00E-999 1e-1000 -> -1.0E-999 Rounded
quax741 quantize -0.1E-999 1e-1000 -> -1E-1000 Subnormal
quax742 quantize -0.10E-999 1e-1000 -> -1E-1000 Subnormal Rounded
quax743 quantize -0.100E-999 1e-1000 -> -1E-1000 Subnormal Rounded
quax744 quantize -0.01E-999 1e-1000 -> -0E-1000 Inexact Rounded
-- next is rounded to Emin
quax745 quantize -0.999E-999 1e-1000 -> -1.0E-999 Inexact Rounded
quax746 quantize -0.099E-999 1e-1000 -> -1E-1000 Inexact Rounded Subnormal Underflow
quax747 quantize -0.009E-999 1e-1000 -> -0E-1000 Inexact Rounded
quax748 quantize -0.001E-999 1e-1000 -> -0E-1000 Inexact Rounded
quax749 quantize -0.0001E-999 1e-1000 -> -0E-1000 Inexact Rounded
quax750 quantize -1.00E-999 1e-1001 -> -1.00E-999
quax751 quantize -0.1E-999 1e-1001 -> -1.0E-1000 Subnormal
quax752 quantize -0.10E-999 1e-1001 -> -1.0E-1000 Subnormal
quax753 quantize -0.100E-999 1e-1001 -> -1.0E-1000 Subnormal Rounded
quax754 quantize -0.01E-999 1e-1001 -> -1E-1001 Subnormal
-- next is rounded to Emin
quax755 quantize -0.999E-999 1e-1001 -> -1.00E-999 Inexact Rounded
quax756 quantize -0.099E-999 1e-1001 -> -1.0E-1000 Inexact Rounded Subnormal Underflow
quax757 quantize -0.009E-999 1e-1001 -> -1E-1001 Inexact Rounded Subnormal Underflow
quax758 quantize -0.001E-999 1e-1001 -> -0E-1001 Inexact Rounded
quax759 quantize -0.0001E-999 1e-1001 -> -0E-1001 Inexact Rounded
quax760 quantize -1.00E-999 1e-1002 -> -1.000E-999
quax761 quantize -0.1E-999 1e-1002 -> -1.00E-1000 Subnormal
quax762 quantize -0.10E-999 1e-1002 -> -1.00E-1000 Subnormal
quax763 quantize -0.100E-999 1e-1002 -> -1.00E-1000 Subnormal
quax764 quantize -0.01E-999 1e-1002 -> -1.0E-1001 Subnormal
quax765 quantize -0.999E-999 1e-1002 -> -9.99E-1000 Subnormal
quax766 quantize -0.099E-999 1e-1002 -> -9.9E-1001 Subnormal
quax767 quantize -0.009E-999 1e-1002 -> -9E-1002 Subnormal
quax768 quantize -0.001E-999 1e-1002 -> -1E-1002 Subnormal
quax769 quantize -0.0001E-999 1e-1002 -> -0E-1002 Inexact Rounded
-- rhs must be no less than Etiny
quax770 quantize -1.00E-999 1e-1003 -> NaN Invalid_operation
quax771 quantize -0.1E-999 1e-1003 -> NaN Invalid_operation
quax772 quantize -0.10E-999 1e-1003 -> NaN Invalid_operation
quax773 quantize -0.100E-999 1e-1003 -> NaN Invalid_operation
quax774 quantize -0.01E-999 1e-1003 -> NaN Invalid_operation
quax775 quantize -0.999E-999 1e-1003 -> NaN Invalid_operation
quax776 quantize -0.099E-999 1e-1003 -> NaN Invalid_operation
quax777 quantize -0.009E-999 1e-1003 -> NaN Invalid_operation
quax778 quantize -0.001E-999 1e-1003 -> NaN Invalid_operation
quax779 quantize -0.0001E-999 1e-1003 -> NaN Invalid_operation
quax780 quantize -0.0001E-999 1e-1004 -> NaN Invalid_operation
precision: 9
maxExponent: 999999999
minexponent: -999999999
-- some extremes derived from Rescale testcases
quax801 quantize 0 1e1000000000 -> NaN Invalid_operation
quax802 quantize 0 1e-1000000000 -> 0E-1000000000
quax803 quantize 0 1e2000000000 -> NaN Invalid_operation
quax804 quantize 0 1e-2000000000 -> NaN Invalid_operation
quax805 quantize 0 1e3000000000 -> NaN Invalid_operation
quax806 quantize 0 1e-3000000000 -> NaN Invalid_operation
quax807 quantize 0 1e4000000000 -> NaN Invalid_operation
quax808 quantize 0 1e-4000000000 -> NaN Invalid_operation
quax809 quantize 0 1e5000000000 -> NaN Invalid_operation
quax810 quantize 0 1e-5000000000 -> NaN Invalid_operation
quax811 quantize 0 1e6000000000 -> NaN Invalid_operation
quax812 quantize 0 1e-6000000000 -> NaN Invalid_operation
quax813 quantize 0 1e7000000000 -> NaN Invalid_operation
quax814 quantize 0 1e-7000000000 -> NaN Invalid_operation
quax815 quantize 0 1e8000000000 -> NaN Invalid_operation
quax816 quantize 0 1e-8000000000 -> NaN Invalid_operation
quax817 quantize 0 1e9000000000 -> NaN Invalid_operation
quax818 quantize 0 1e-9000000000 -> NaN Invalid_operation
quax819 quantize 0 1e9999999999 -> NaN Invalid_operation
quax820 quantize 0 1e-9999999999 -> NaN Invalid_operation
quax821 quantize 0 1e10000000000 -> NaN Invalid_operation
quax822 quantize 0 1e-10000000000 -> NaN Invalid_operation
quax843 quantize 0 1e999999999 -> 0E+999999999
quax844 quantize 0 1e1000000000 -> NaN Invalid_operation
quax845 quantize 0 1e-999999999 -> 0E-999999999
quax846 quantize 0 1e-1000000000 -> 0E-1000000000
quax847 quantize 0 1e-1000000001 -> 0E-1000000001
quax848 quantize 0 1e-1000000002 -> 0E-1000000002
quax849 quantize 0 1e-1000000003 -> 0E-1000000003
quax850 quantize 0 1e-1000000004 -> 0E-1000000004
quax851 quantize 0 1e-1000000005 -> 0E-1000000005
quax852 quantize 0 1e-1000000006 -> 0E-1000000006
quax853 quantize 0 1e-1000000007 -> 0E-1000000007
quax854 quantize 0 1e-1000000008 -> NaN Invalid_operation
quax861 quantize 1 1e+2147483649 -> NaN Invalid_operation
quax862 quantize 1 1e+2147483648 -> NaN Invalid_operation
quax863 quantize 1 1e+2147483647 -> NaN Invalid_operation
quax864 quantize 1 1e-2147483647 -> NaN Invalid_operation
quax865 quantize 1 1e-2147483648 -> NaN Invalid_operation
quax866 quantize 1 1e-2147483649 -> NaN Invalid_operation
-- Null tests
quax900 quantize 10 # -> NaN Invalid_operation
quax901 quantize # 1e10 -> NaN Invalid_operation
Index: abs.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/abs.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** abs.decTest 27 May 2003 22:46:40 -0000 1.2
--- abs.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
-- This set of tests primarily tests the existence of the operator.
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
-- This set of tests primarily tests the existence of the operator.
Index: add.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/add.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** add.decTest 27 May 2003 22:46:40 -0000 1.2
--- add.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
precision: 9
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
precision: 9
Index: base.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/base.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** base.decTest 27 May 2003 22:46:40 -0000 1.2
--- base.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
-- This file tests base conversions from string to a decimal number
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
-- This file tests base conversions from string to a decimal number
***************
*** 1204,1212 ****
basx1012 toSci 1e-000000000001000000007 -> 1E-1000000007 Subnormal
-- check for double-rounded subnormals
precision: 5
maxexponent: 79
minexponent: -79
! basx1021 toSci 1.52444E-80 -> 1.524E-80 Inexact Rounded Subnormal Underflow
! basx1022 toSci 1.52445E-80 -> 1.524E-80 Inexact Rounded Subnormal Underflow
! basx1023 toSci 1.52446E-80 -> 1.524E-80 Inexact Rounded Subnormal Underflow
--- 1204,1231 ----
basx1012 toSci 1e-000000000001000000007 -> 1E-1000000007 Subnormal
+ -- Edge cases for int32 exponents...
+ basx1021 tosci 1e+2147483649 -> Infinity Overflow Inexact Rounded
+ basx1022 tosci 1e+2147483648 -> Infinity Overflow Inexact Rounded
+ basx1023 tosci 1e+2147483647 -> Infinity Overflow Inexact Rounded
+ basx1024 tosci 1e-2147483647 -> 0E-1000000014 Underflow Subnormal Inexact Rounded
+ basx1025 tosci 1e-2147483648 -> 0E-1000000014 Underflow Subnormal Inexact Rounded
+ basx1026 tosci 1e-2147483649 -> 0E-1000000014 Underflow Subnormal Inexact Rounded
+ -- same unbalanced
+ precision: 7
+ maxExponent: 96
+ minexponent: -95
+ basx1031 tosci 1e+2147483649 -> Infinity Overflow Inexact Rounded
+ basx1032 tosci 1e+2147483648 -> Infinity Overflow Inexact Rounded
+ basx1033 tosci 1e+2147483647 -> Infinity Overflow Inexact Rounded
+ basx1034 tosci 1e-2147483647 -> 0E-101 Underflow Subnormal Inexact Rounded
+ basx1035 tosci 1e-2147483648 -> 0E-101 Underflow Subnormal Inexact Rounded
+ basx1036 tosci 1e-2147483649 -> 0E-101 Underflow Subnormal Inexact Rounded
+
-- check for double-rounded subnormals
precision: 5
maxexponent: 79
minexponent: -79
! basx1041 toSci 1.52444E-80 -> 1.524E-80 Inexact Rounded Subnormal Underflow
! basx1042 toSci 1.52445E-80 -> 1.524E-80 Inexact Rounded Subnormal Underflow
! basx1043 toSci 1.52446E-80 -> 1.524E-80 Inexact Rounded Subnormal Underflow
!
Index: clamp.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/clamp.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** clamp.decTest 27 May 2003 22:46:40 -0000 1.2
--- clamp.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
-- This set of tests uses the same limits as the 8-byte concrete
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
-- This set of tests uses the same limits as the 8-byte concrete
Index: compare.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/compare.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** compare.decTest 27 May 2003 22:46:40 -0000 1.2
--- compare.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
-- Note that we cannot assume add/subtract tests cover paths adequately,
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
-- Note that we cannot assume add/subtract tests cover paths adequately,
Index: decimal64.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/decimal64.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** decimal64.decTest 27 May 2003 22:46:40 -0000 1.2
--- decimal64.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
-- This set of tests is for the eight-byte concrete representation.
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
-- This set of tests is for the eight-byte concrete representation.
Index: divide.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/divide.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** divide.decTest 27 May 2003 22:46:40 -0000 1.2
--- divide.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
extended: 1
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
extended: 1
Index: divideint.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/divideint.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** divideint.decTest 27 May 2003 22:46:40 -0000 1.2
--- divideint.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
extended: 1
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
extended: 1
Index: inexact.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/inexact.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** inexact.decTest 27 May 2003 22:46:40 -0000 1.2
--- inexact.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
extended: 1
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
extended: 1
Index: integer.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/integer.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** integer.decTest 27 May 2003 22:46:40 -0000 1.2
--- integer.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
-- This set of tests tests the extended specification 'round-to-integer'
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
-- This set of tests tests the extended specification 'round-to-integer'
Index: max.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/max.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** max.decTest 27 May 2003 22:46:40 -0000 1.2
--- max.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
-- we assume that base comparison is tested in compare.decTest, so
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
-- we assume that base comparison is tested in compare.decTest, so
Index: min.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/min.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** min.decTest 27 May 2003 22:46:40 -0000 1.2
--- min.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
-- we assume that base comparison is tested in compare.decTest, so
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
-- we assume that base comparison is tested in compare.decTest, so
Index: minus.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/minus.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** minus.decTest 27 May 2003 22:46:40 -0000 1.2
--- minus.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
-- This set of tests primarily tests the existence of the operator.
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
-- This set of tests primarily tests the existence of the operator.
Index: multiply.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/multiply.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** multiply.decTest 27 May 2003 22:46:40 -0000 1.2
--- multiply.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
extended: 1
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
extended: 1
Index: normalize.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/normalize.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** normalize.decTest 27 May 2003 22:46:40 -0000 1.2
--- normalize.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
extended: 1
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
extended: 1
Index: plus.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/plus.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** plus.decTest 27 May 2003 22:46:40 -0000 1.2
--- plus.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
-- This set of tests primarily tests the existence of the operator.
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
-- This set of tests primarily tests the existence of the operator.
Index: power.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/power.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** power.decTest 27 May 2003 22:46:40 -0000 1.2
--- power.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
-- This set of testcases tests raising numbers to an integer power only.
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
-- This set of testcases tests raising numbers to an integer power only.
Index: randomBound32.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/randomBound32.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** randomBound32.decTest 27 May 2003 22:46:40 -0000 1.2
--- randomBound32.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
-- These testcases test calculations at precisions 31, 32, and 33, to
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
-- These testcases test calculations at precisions 31, 32, and 33, to
Index: randoms.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/randoms.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** randoms.decTest 27 May 2003 22:46:40 -0000 1.2
--- randoms.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
extended: 1
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
extended: 1
Index: remainder.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/remainder.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** remainder.decTest 27 May 2003 22:46:40 -0000 1.2
--- remainder.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
extended: 1
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
extended: 1
Index: remainderNear.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/remainderNear.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** remainderNear.decTest 27 May 2003 22:46:40 -0000 1.2
--- remainderNear.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
extended: 1
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
extended: 1
Index: rescale.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/rescale.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rescale.decTest 27 May 2003 22:46:40 -0000 1.2
--- rescale.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
extended: 1
--- 18,24 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
!
! -- [obsolete] Quantize.decTest has the improved version
extended: 1
***************
*** 26,30 ****
minexponent: -999
! -- sanity checks (as base, above)
resx001 rescale 0 0 -> 0
--- 28,32 ----
minexponent: -999
! -- sanity checks
resx001 rescale 0 0 -> 0
***************
*** 450,507 ****
minexponent: -999999999
precision: 15
! resx521 rescale 1.234 999999E+3 -> 0E+999999000 Inexact Rounded
! resx522 rescale 123.456 999999E+3 -> 0E+999999000 Inexact Rounded
! resx523 rescale 1.234 999999999 -> 0E+999999999 Inexact Rounded
! resx524 rescale 123.456 999999999 -> 0E+999999999 Inexact Rounded
! resx525 rescale 123.456 1000000000 -> NaN Invalid_operation
! resx526 rescale 123.456 12345678903 -> NaN Invalid_operation
-- next four are "won't fit" overflows
! resx527 rescale 1.234 -999999E+3 -> NaN Invalid_operation
! resx528 rescale 123.456 -999999E+3 -> NaN Invalid_operation
! resx529 rescale 1.234 -999999999 -> NaN Invalid_operation
! resx530 rescale 123.456 -999999999 -> NaN Invalid_operation
! resx531 rescale 123.456 -1000000014 -> NaN Invalid_operation
! resx532 rescale 123.456 -12345678903 -> NaN Invalid_operation
maxexponent: 999
minexponent: -999
precision: 15
! resx540 rescale 1.234E+999 999 -> 1E+999 Inexact Rounded
! resx541 rescale 1.234E+998 999 -> 0E+999 Inexact Rounded
! resx542 rescale 1.234 999 -> 0E+999 Inexact Rounded
! resx543 rescale 1.234 1000 -> NaN Invalid_operation
! resx544 rescale 1.234 5000 -> NaN Invalid_operation
!
! resx545 rescale 0 -999 -> 0E-999
-- next two are "won't fit" overflows
! resx546 rescale 1.234 -999 -> NaN Invalid_operation
! resx547 rescale 1.234 -1000 -> NaN Invalid_operation
! resx548 rescale 1.234 -5000 -> NaN Invalid_operation
-- [more below]
-- fractional RHS, some good and some bad
precision: 9
! resx549 rescale 222 +2.0 -> 2E+2 Inexact Rounded
! resx550 rescale 222 +2.00000000 -> 2E+2 Inexact Rounded
! resx551 rescale 222 +2.00100000000 -> NaN Invalid_operation
! resx552 rescale 222 +2.000001 -> NaN Invalid_operation
! resx553 rescale 222 +2.000000001 -> NaN Invalid_operation
! resx554 rescale 222 +2.0000000001 -> NaN Invalid_operation
! resx555 rescale 222 +2.00000000001 -> NaN Invalid_operation
! resx556 rescale 222 +2.99999999999 -> NaN Invalid_operation
! resx557 rescale 222 -2.00000000 -> 222.00
! resx558 rescale 222 -2.00100000000 -> NaN Invalid_operation
! resx559 rescale 222 -2.0000001000 -> NaN Invalid_operation
! resx560 rescale 222 -2.00000000001 -> NaN Invalid_operation
! resx561 rescale 222 -2.99999999999 -> NaN Invalid_operation
!
-- Specials
resx580 rescale Inf -Inf -> NaN Invalid_operation
! resx581 rescale Inf -1000 -> NaN Invalid_operation
! resx582 rescale Inf -1 -> NaN Invalid_operation
! resx583 rescale Inf 0 -> NaN Invalid_operation
! resx584 rescale Inf 1 -> NaN Invalid_operation
! resx585 rescale Inf 1000 -> NaN Invalid_operation
resx586 rescale Inf Inf -> NaN Invalid_operation
resx587 rescale -1000 Inf -> NaN Invalid_operation
--- 452,534 ----
minexponent: -999999999
precision: 15
! resx520 rescale 1.234 999999E+3 -> 0E+999999000 Inexact Rounded
! resx521 rescale 123.456 999999E+3 -> 0E+999999000 Inexact Rounded
! resx522 rescale 1.234 999999999 -> 0E+999999999 Inexact Rounded
! resx523 rescale 123.456 999999999 -> 0E+999999999 Inexact Rounded
! resx524 rescale 123.456 1000000000 -> NaN Invalid_operation
! resx525 rescale 123.456 12345678903 -> NaN Invalid_operation
-- next four are "won't fit" overflows
! resx526 rescale 1.234 -999999E+3 -> NaN Invalid_operation
! resx527 rescale 123.456 -999999E+3 -> NaN Invalid_operation
! resx528 rescale 1.234 -999999999 -> NaN Invalid_operation
! resx529 rescale 123.456 -999999999 -> NaN Invalid_operation
! resx530 rescale 123.456 -1000000014 -> NaN Invalid_operation
! resx531 rescale 123.456 -12345678903 -> NaN Invalid_operation
maxexponent: 999
minexponent: -999
precision: 15
! resx532 rescale 1.234E+999 999 -> 1E+999 Inexact Rounded
! resx533 rescale 1.234E+998 999 -> 0E+999 Inexact Rounded
! resx534 rescale 1.234 999 -> 0E+999 Inexact Rounded
! resx535 rescale 1.234 1000 -> NaN Invalid_operation
! resx536 rescale 1.234 5000 -> NaN Invalid_operation
! resx537 rescale 0 -999 -> 0E-999
-- next two are "won't fit" overflows
! resx538 rescale 1.234 -999 -> NaN Invalid_operation
! resx539 rescale 1.234 -1000 -> NaN Invalid_operation
! resx540 rescale 1.234 -5000 -> NaN Invalid_operation
-- [more below]
+ -- check bounds (lhs maybe out of range for destination, etc.)
+ precision: 7
+ resx541 rescale 1E+999 +999 -> 1E+999
+ resx542 rescale 1E+1000 +999 -> NaN Invalid_operation
+ resx543 rescale 1E+999 +1000 -> NaN Invalid_operation
+ resx544 rescale 1E-999 -999 -> 1E-999
+ resx545 rescale 1E-1000 -999 -> 0E-999 Inexact Rounded
+ resx546 rescale 1E-999 -1000 -> 1.0E-999
+ resx547 rescale 1E-1005 -999 -> 0E-999 Inexact Rounded
+ resx548 rescale 1E-1006 -999 -> 0E-999 Inexact Rounded
+ resx549 rescale 1E-1007 -999 -> 0E-999 Inexact Rounded
+ resx550 rescale 1E-998 -1005 -> NaN Invalid_operation -- won't fit
+ resx551 rescale 1E-999 -1005 -> 1.000000E-999
+ resx552 rescale 1E-1000 -1005 -> 1.00000E-1000 Subnormal
+ resx553 rescale 1E-999 -1006 -> NaN Invalid_operation
+ resx554 rescale 1E-999 -1007 -> NaN Invalid_operation
+ -- related subnormal rounding
+ resx555 rescale 1.666666E-999 -1005 -> 1.666666E-999
+ resx556 rescale 1.666666E-1000 -1005 -> 1.66667E-1000 Underflow Subnormal Inexact Rounded
+ resx557 rescale 1.666666E-1001 -1005 -> 1.6667E-1001 Underflow Subnormal Inexact Rounded
+ resx558 rescale 1.666666E-1002 -1005 -> 1.667E-1002 Underflow Subnormal Inexact Rounded
+ resx559 rescale 1.666666E-1003 -1005 -> 1.67E-1003 Underflow Subnormal Inexact Rounded
+ resx560 rescale 1.666666E-1004 -1005 -> 1.7E-1004 Underflow Subnormal Inexact Rounded
+ resx561 rescale 1.666666E-1005 -1005 -> 2E-1005 Underflow Subnormal Inexact Rounded
+ resx562 rescale 1.666666E-1006 -1005 -> 0E-1005 Inexact Rounded
+ resx563 rescale 1.666666E-1007 -1005 -> 0E-1005 Inexact Rounded
+
-- fractional RHS, some good and some bad
precision: 9
! resx564 rescale 222 +2.0 -> 2E+2 Inexact Rounded
! resx565 rescale 222 +2.00000000 -> 2E+2 Inexact Rounded
! resx566 rescale 222 +2.00100000000 -> NaN Invalid_operation
! resx567 rescale 222 +2.000001 -> NaN Invalid_operation
! resx568 rescale 222 +2.000000001 -> NaN Invalid_operation
! resx569 rescale 222 +2.0000000001 -> NaN Invalid_operation
! resx570 rescale 222 +2.00000000001 -> NaN Invalid_operation
! resx571 rescale 222 +2.99999999999 -> NaN Invalid_operation
! resx572 rescale 222 -2.00000000 -> 222.00
! resx573 rescale 222 -2.00100000000 -> NaN Invalid_operation
! resx574 rescale 222 -2.0000001000 -> NaN Invalid_operation
! resx575 rescale 222 -2.00000000001 -> NaN Invalid_operation
! resx576 rescale 222 -2.99999999999 -> NaN Invalid_operation
-- Specials
resx580 rescale Inf -Inf -> NaN Invalid_operation
! resx581 rescale Inf -1000 -> NaN Invalid_operation
! resx582 rescale Inf -1 -> NaN Invalid_operation
! resx583 rescale Inf 0 -> NaN Invalid_operation
! resx584 rescale Inf 1 -> NaN Invalid_operation
! resx585 rescale Inf 1000 -> NaN Invalid_operation
resx586 rescale Inf Inf -> NaN Invalid_operation
resx587 rescale -1000 Inf -> NaN Invalid_operation
***************
*** 512,516 ****
resx592 rescale 1000 Inf -> NaN Invalid_operation
resx593 rescale Inf Inf -> NaN Invalid_operation
! resx594 rescale Inf -0 -> NaN Invalid_operation
resx595 rescale -0 Inf -> NaN Invalid_operation
--- 539,543 ----
resx592 rescale 1000 Inf -> NaN Invalid_operation
resx593 rescale Inf Inf -> NaN Invalid_operation
! resx594 rescale Inf -0 -> NaN Invalid_operation
resx595 rescale -0 Inf -> NaN Invalid_operation
Index: rounding.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/rounding.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rounding.decTest 27 May 2003 22:46:40 -0000 1.2
--- rounding.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
-- These tests require that implementations take account of residues in
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
-- These tests require that implementations take account of residues in
Index: squareroot.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/squareroot.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** squareroot.decTest 27 May 2003 22:46:40 -0000 1.2
--- squareroot.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
extended: 1
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
extended: 1
***************
*** 27,55 ****
-- basics
! sqtx001 squareroot 1 -> 1
! sqtx002 squareroot -1 -> NaN Invalid_operation
! sqtx003 squareroot 1.00 -> 1.0
! sqtx004 squareroot -1.00 -> NaN Invalid_operation
! sqtx005 squareroot 0 -> 0
! sqtx006 squareroot 00.0 -> 0
! sqtx007 squareroot 0.00 -> 0.0
! sqtx008 squareroot 00.00 -> 0.0
! sqtx009 squareroot 00 -> 0
! sqtx010 squareroot -2 -> NaN Invalid_operation
! sqtx011 squareroot 2 -> 1.41421356 Inexact Rounded
! sqtx012 squareroot -2.00 -> NaN Invalid_operation
! sqtx013 squareroot 2.00 -> 1.41421356 Inexact Rounded
! sqtx014 squareroot -0 -> -0
! sqtx015 squareroot -0.00 -> -0.0
! sqtx016 squareroot -00.0 -> -0
! sqtx017 squareroot -0E+9 -> -0E+4
! sqtx018 squareroot -0E+10 -> -0E+5
! sqtx019 squareroot -0E+11 -> -0E+5
! sqtx020 squareroot -0E+12 -> -0E+6
! sqtx021 squareroot -00 -> -0
! sqtx022 squareroot 0E+5 -> 0E+2
! sqtx023 squareroot 4.0 -> 2
! sqtx024 squareroot 4.00 -> 2.0
sqtx030 squareroot +0.1 -> 0.316227766 Inexact Rounded
--- 27,59 ----
-- basics
! sqtx001 squareroot 1 -> 1
! sqtx002 squareroot -1 -> NaN Invalid_operation
! sqtx003 squareroot 1.00 -> 1.0
! sqtx004 squareroot -1.00 -> NaN Invalid_operation
! sqtx005 squareroot 0 -> 0
! sqtx006 squareroot 00.0 -> 0.0
! sqtx007 squareroot 0.00 -> 0.0
! sqtx008 squareroot 00.00 -> 0.0
! sqtx009 squareroot 00.000 -> 0.00
! sqtx010 squareroot 00.0000 -> 0.00
! sqtx011 squareroot 00 -> 0
! sqtx012 squareroot -2 -> NaN Invalid_operation
! sqtx013 squareroot 2 -> 1.41421356 Inexact Rounded
! sqtx014 squareroot -2.00 -> NaN Invalid_operation
! sqtx015 squareroot 2.00 -> 1.41421356 Inexact Rounded
! sqtx016 squareroot -0 -> -0
! sqtx017 squareroot -0.0 -> -0.0
! sqtx018 squareroot -00.00 -> -0.0
! sqtx019 squareroot -00.000 -> -0.00
! sqtx020 squareroot -0.0000 -> -0.00
! sqtx021 squareroot -0E+9 -> -0E+4
! sqtx022 squareroot -0E+10 -> -0E+5
! sqtx023 squareroot -0E+11 -> -0E+5
! sqtx024 squareroot -0E+12 -> -0E+6
! sqtx025 squareroot -00 -> -0
! sqtx026 squareroot 0E+5 -> 0E+2
! sqtx027 squareroot 4.0 -> 2.0
! sqtx028 squareroot 4.00 -> 2.0
sqtx030 squareroot +0.1 -> 0.316227766 Inexact Rounded
***************
*** 81,96 ****
sqtx056 squareroot -9.990 -> NaN Invalid_operation
! sqtx060 squareroot 10.0 -> 3.16227766 Inexact Rounded
! sqtx061 squareroot 10.00 -> 3.16227766 Inexact Rounded
! sqtx062 squareroot 100.0 -> 10
! sqtx063 squareroot 100.00 -> 10.0
! sqtx064 squareroot 1.1000E+3 -> 33.1662479 Inexact Rounded
! sqtx065 squareroot 1.10000E+3 -> 33.1662479 Inexact Rounded
! sqtx066 squareroot -10.0 -> NaN Invalid_operation
! sqtx067 squareroot -10.00 -> NaN Invalid_operation
! sqtx068 squareroot -100.0 -> NaN Invalid_operation
! sqtx069 squareroot -100.00 -> NaN Invalid_operation
! sqtx070 squareroot -1.1000E+3 -> NaN Invalid_operation
! sqtx071 squareroot -1.10000E+3 -> NaN Invalid_operation
-- famous squares
--- 85,106 ----
sqtx056 squareroot -9.990 -> NaN Invalid_operation
! sqtx060 squareroot 1 -> 1
! sqtx061 squareroot 1.0 -> 1.0
! sqtx062 squareroot 1.00 -> 1.0
! sqtx063 squareroot 10.0 -> 3.16227766 Inexact Rounded
! sqtx064 squareroot 10.0 -> 3.16227766 Inexact Rounded
! sqtx065 squareroot 10.0 -> 3.16227766 Inexact Rounded
! sqtx066 squareroot 10.00 -> 3.16227766 Inexact Rounded
! sqtx067 squareroot 100 -> 10
! sqtx068 squareroot 100.0 -> 10.0
! sqtx069 squareroot 100.00 -> 10.0
! sqtx070 squareroot 1.1000E+3 -> 33.1662479 Inexact Rounded
! sqtx071 squareroot 1.10000E+3 -> 33.1662479 Inexact Rounded
! sqtx072 squareroot -10.0 -> NaN Invalid_operation
! sqtx073 squareroot -10.00 -> NaN Invalid_operation
! sqtx074 squareroot -100.0 -> NaN Invalid_operation
! sqtx075 squareroot -100.00 -> NaN Invalid_operation
! sqtx076 squareroot -1.1000E+3 -> NaN Invalid_operation
! sqtx077 squareroot -1.10000E+3 -> NaN Invalid_operation
-- famous squares
***************
*** 284,291 ****
sqtx2272 squareroot 9E+3 -> 95 Inexact Rounded
sqtx2273 squareroot 0.10 -> 0.32 Inexact Rounded
! sqtx2274 squareroot 0.010 -> 0.1
sqtx2275 squareroot 10.0E-1 -> 1.0
sqtx2276 squareroot 10.00E-2 -> 0.32 Inexact Rounded
! sqtx2277 squareroot 10E-3 -> 0.1
sqtx2278 squareroot 10E+1 -> 10
sqtx2279 squareroot 10E+2 -> 32 Inexact Rounded
--- 294,301 ----
sqtx2272 squareroot 9E+3 -> 95 Inexact Rounded
sqtx2273 squareroot 0.10 -> 0.32 Inexact Rounded
! sqtx2274 squareroot 0.010 -> 0.10
sqtx2275 squareroot 10.0E-1 -> 1.0
sqtx2276 squareroot 10.00E-2 -> 0.32 Inexact Rounded
! sqtx2277 squareroot 10E-3 -> 0.10
sqtx2278 squareroot 10E+1 -> 10
sqtx2279 squareroot 10E+2 -> 32 Inexact Rounded
***************
*** 524,531 ****
sqtx2512 squareroot 39E+3 -> 2.0E+2 Inexact Rounded
sqtx2513 squareroot 0.40 -> 0.63 Inexact Rounded
! sqtx2514 squareroot 0.040 -> 0.2
sqtx2515 squareroot 40.0E-1 -> 2.0
sqtx2516 squareroot 40.00E-2 -> 0.63 Inexact Rounded
! sqtx2517 squareroot 40E-3 -> 0.2
sqtx2518 squareroot 40E+1 -> 20
sqtx2519 squareroot 40E+2 -> 63 Inexact Rounded
--- 534,541 ----
sqtx2512 squareroot 39E+3 -> 2.0E+2 Inexact Rounded
sqtx2513 squareroot 0.40 -> 0.63 Inexact Rounded
! sqtx2514 squareroot 0.040 -> 0.20
sqtx2515 squareroot 40.0E-1 -> 2.0
sqtx2516 squareroot 40.00E-2 -> 0.63 Inexact Rounded
! sqtx2517 squareroot 40E-3 -> 0.20
sqtx2518 squareroot 40E+1 -> 20
sqtx2519 squareroot 40E+2 -> 63 Inexact Rounded
***************
*** 924,931 ****
sqtx2912 squareroot 89E+3 -> 3.0E+2 Inexact Rounded
sqtx2913 squareroot 0.90 -> 0.95 Inexact Rounded
! sqtx2914 squareroot 0.090 -> 0.3
sqtx2915 squareroot 90.0E-1 -> 3.0
sqtx2916 squareroot 90.00E-2 -> 0.95 Inexact Rounded
! sqtx2917 squareroot 90E-3 -> 0.3
sqtx2918 squareroot 90E+1 -> 30
sqtx2919 squareroot 90E+2 -> 95 Inexact Rounded
--- 934,941 ----
sqtx2912 squareroot 89E+3 -> 3.0E+2 Inexact Rounded
sqtx2913 squareroot 0.90 -> 0.95 Inexact Rounded
! sqtx2914 squareroot 0.090 -> 0.30
sqtx2915 squareroot 90.0E-1 -> 3.0
sqtx2916 squareroot 90.00E-2 -> 0.95 Inexact Rounded
! sqtx2917 squareroot 90E-3 -> 0.30
sqtx2918 squareroot 90E+1 -> 30
sqtx2919 squareroot 90E+2 -> 95 Inexact Rounded
***************
*** 2910,2914 ****
precision: 9 -- Etiny=-17
sqtx800 squareroot 1E-17 -> 3.16227766E-9 Inexact Rounded
! sqtx801 squareroot 10E-17 -> 1E-8
precision: 10 -- Etiny=-18
sqtx802 squareroot 10E-18 -> 3.162277660E-9 Inexact Rounded
--- 2920,2924 ----
precision: 9 -- Etiny=-17
sqtx800 squareroot 1E-17 -> 3.16227766E-9 Inexact Rounded
! sqtx801 squareroot 10E-17 -> 1.0E-8
precision: 10 -- Etiny=-18
sqtx802 squareroot 10E-18 -> 3.162277660E-9 Inexact Rounded
***************
*** 2917,2921 ****
precision: 11 -- Etiny=-19
sqtx804 squareroot 1E-19 -> 3.162277660E-10 Underflow Subnormal Inexact Rounded
! sqtx805 squareroot 10E-19 -> 1E-9
precision: 12 -- Etiny=-20
sqtx806 squareroot 10E-20 -> 3.1622776602E-10 Underflow Subnormal Inexact Rounded
--- 2927,2931 ----
precision: 11 -- Etiny=-19
sqtx804 squareroot 1E-19 -> 3.162277660E-10 Underflow Subnormal Inexact Rounded
! sqtx805 squareroot 10E-19 -> 1.0E-9
precision: 12 -- Etiny=-20
sqtx806 squareroot 10E-20 -> 3.1622776602E-10 Underflow Subnormal Inexact Rounded
***************
*** 2924,2928 ****
precision: 13 -- Etiny=-21
sqtx808 squareroot 1E-21 -> 3.1622776602E-11 Underflow Subnormal Inexact Rounded
! sqtx809 squareroot 10E-21 -> 1E-10 Subnormal
precision: 14 -- Etiny=-22
sqtx810 squareroot 1E-21 -> 3.16227766017E-11 Underflow Subnormal Inexact Rounded
--- 2934,2938 ----
precision: 13 -- Etiny=-21
sqtx808 squareroot 1E-21 -> 3.1622776602E-11 Underflow Subnormal Inexact Rounded
! sqtx809 squareroot 10E-21 -> 1.0E-10 Subnormal
precision: 14 -- Etiny=-22
sqtx810 squareroot 1E-21 -> 3.16227766017E-11 Underflow Subnormal Inexact Rounded
Index: subtract.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/subtract.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** subtract.decTest 27 May 2003 22:46:40 -0000 1.2
--- subtract.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
extended: 1
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
extended: 1
Index: testall.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/testall.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** testall.decTest 27 May 2003 22:46:40 -0000 1.2
--- testall.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
-- core tests (using Extended: 1) --------------------------------------
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
-- core tests (using Extended: 1) --------------------------------------
***************
*** 37,44 ****
dectest: plus
dectest: power
dectest: randoms
dectest: remainder
dectest: remaindernear
! dectest: rescale
dectest: rounding
dectest: squareroot
--- 37,45 ----
dectest: plus
dectest: power
+ dectest: quantize
dectest: randoms
dectest: remainder
dectest: remaindernear
! dectest: rescale -- [obsolete]
dectest: rounding
dectest: squareroot
Index: trim.decTest
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/decimal/tests/trim.decTest,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** trim.decTest 27 May 2003 22:46:40 -0000 1.2
--- trim.decTest 2 Jul 2003 23:51:16 -0000 1.3
***************
*** 18,22 ****
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.23
extended: 1
--- 18,22 ----
-- mfc@uk.ibm.com --
------------------------------------------------------------------------
! version: 2.26
extended: 1
From bcannon@users.sourceforge.net Thu Jul 3 20:59:59 2003
From: bcannon@users.sourceforge.net (bcannon@users.sourceforge.net)
Date: Thu, 03 Jul 2003 12:59:59 -0700
Subject: [Python-checkins] python/dist/src/Lib _strptime.py,1.19,1.20
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv7713/Lib
Modified Files:
_strptime.py
Log Message:
Fixes bug of timezone value being left as -1 when ``time.tzname[0] ==
time.tzname[1] and not time.daylight`` is true when it should only when
time.daylight is true. Tests are also fixed.
Closes bug #763047 and its cohort #763052.
Index: _strptime.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/_strptime.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** _strptime.py 29 Jun 2003 04:16:49 -0000 1.19
--- _strptime.py 3 Jul 2003 19:59:57 -0000 1.20
***************
*** 502,506 ****
# it can be something other than -1.
found_zone = found_dict['Z'].lower()
! if locale_time.timezone[0] == locale_time.timezone[1]:
pass #Deals with bad locale setup where timezone info is
# the same; first found on FreeBSD 4.4.
--- 502,507 ----
# it can be something other than -1.
found_zone = found_dict['Z'].lower()
! if locale_time.timezone[0] == locale_time.timezone[1] and \
! time.daylight:
pass #Deals with bad locale setup where timezone info is
# the same; first found on FreeBSD 4.4.
***************
*** 509,515 ****
elif locale_time.timezone[2].lower() == found_zone:
tz = 0
! elif time.daylight:
! if locale_time.timezone[3].lower() == found_zone:
! tz = 1
# Cannot pre-calculate datetime_date() since can change in Julian
--- 510,516 ----
elif locale_time.timezone[2].lower() == found_zone:
tz = 0
! elif time.daylight and \
! locale_time.timezone[3].lower() == found_zone:
! tz = 1
# Cannot pre-calculate datetime_date() since can change in Julian
From bcannon@users.sourceforge.net Thu Jul 3 20:59:59 2003
From: bcannon@users.sourceforge.net (bcannon@users.sourceforge.net)
Date: Thu, 03 Jul 2003 12:59:59 -0700
Subject: [Python-checkins] python/dist/src/Lib/test test_strptime.py,1.16,1.17
Message-ID:
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv7713/Lib/test
Modified Files:
test_strptime.py
Log Message:
Fixes bug of timezone value being left as -1 when ``time.tzname[0] ==
time.tzname[1] and not time.daylight`` is true when it should only when
time.daylight is true. Tests are also fixed.
Closes bug #763047 and its cohort #763052.
Index: test_strptime.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_strptime.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** test_strptime.py 30 Jun 2003 19:22:12 -0000 1.16
--- test_strptime.py 3 Jul 2003 19:59:57 -0000 1.17
***************
*** 304,308 ****
strp_output = _strptime.strptime(strf_output, "%Z")
locale_time = _strptime.LocaleTime()
! if time.tzname[0] != time.tzname[1]:
self.failUnless(strp_output[8] == time_tuple[8],
"timezone check failed; '%s' -> %s != %s" %
--- 304,308 ----
strp_output = _strptime.strptime(strf_output, "%Z")
locale_time = _strptime.LocaleTime()
! if time.tzname[0] != time.tzname[1] or not time.daylight:
self.failUnless(strp_output[8] == time_tuple[8],
"timezone check failed; '%s' -> %s != %s" %
***************
*** 310,315 ****
else:
self.failUnless(strp_output[8] == -1,
! "LocaleTime().timezone has duplicate values but "
! "timezone value not set to -1")
def test_date_time(self):
--- 310,315 ----
else:
self.failUnless(strp_output[8] == -1,
! "LocaleTime().timezone has duplicate values and "
! "time.daylight but timezone value not set to -1")
def test_date_time(self):
From jackjansen@users.sourceforge.net Thu Jul 3 22:33:05 2003
From: jackjansen@users.sourceforge.net (jackjansen@users.sourceforge.net)
Date: Thu, 03 Jul 2003 14:33:05 -0700
Subject: [Python-checkins] python/dist/src/Mac/OSXResources/app/Resources/English.lproj/Documentation packman.html,1.4,1.5
Message-ID:
Update of /cvsroot/python/python/dist/src/Mac/OSXResources/app/Resources/English.lproj/Documentation
In directory sc8-pr-cvs1:/tmp/cvs-serv3949
Modified Files:
packman.html
Log Message:
Moved two sentences around to make them clearer.
Index: packman.html
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/OSXResources/app/Resources/English.lproj/Documentation/packman.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** packman.html 29 Jun 2003 00:17:23 -0000 1.4
--- packman.html 3 Jul 2003 21:33:02 -0000 1.5
***************
*** 44,52 ****
connected to the internet. If you are connected then the problem
could be that there is no database (yet?) for your version of Mac OS X.
! In the standalone Package Manager you can open an alternative database
! with the File->Open URL... command, but you should realize that
! you are now on untested ground. You may be able to find an alternative
database that works for your system at
! http://www.python.org/packman.