From tim_one@users.sourceforge.net Sat Dec 1 02:52:59 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Fri, 30 Nov 2001 18:52:59 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects intobject.c,2.77,2.78 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv12272/python/Objects Modified Files: intobject.c Log Message: SF bug #487743: test_builtin fails on 64 bit platform. Bugfix candidate. int_repr(): we've never had a buffer big enough to hold the largest possible result on a 64-bit box. Now that we're using snprintf instead of sprintf, this can lead to nonsense results instead of random stack corruption. Index: intobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/intobject.c,v retrieving revision 2.77 retrieving revision 2.78 diff -C2 -d -r2.77 -r2.78 *** intobject.c 2001/11/28 20:55:34 2.77 --- intobject.c 2001/12/01 02:52:56 2.78 *************** *** 259,263 **** int_repr(PyIntObject *v) { ! char buf[20]; PyOS_snprintf(buf, sizeof(buf), "%ld", v->ob_ival); return PyString_FromString(buf); --- 259,263 ---- int_repr(PyIntObject *v) { ! char buf[64]; PyOS_snprintf(buf, sizeof(buf), "%ld", v->ob_ival); return PyString_FromString(buf); From tim_one@users.sourceforge.net Sat Dec 1 04:11:18 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Fri, 30 Nov 2001 20:11:18 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_unicode.py,1.45,1.46 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv24077/python/Lib/test Modified Files: test_unicode.py Log Message: Whitespace normalization. Index: test_unicode.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unicode.py,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** test_unicode.py 2001/11/28 14:03:14 1.45 --- test_unicode.py 2001/12/01 04:11:16 1.46 *************** *** 669,671 **** print u'def\n' print 'done.' - --- 669,670 ---- From gvanrossum@users.sourceforge.net Sat Dec 1 16:00:12 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Sat, 01 Dec 2001 08:00:12 -0800 Subject: [Python-checkins] CVS: python/dist/src/Python mysnprintf.c,2.2,2.3 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory usw-pr-cvs1:/tmp/cvs-serv26620 Modified Files: mysnprintf.c Log Message: When the number of bytes written to the malloc'ed buffer is larger than the argument string size, copy as many bytes as will fit (including a terminating '\0'), rather than not copying anything. This to make it satisfy the C99 spec. Index: mysnprintf.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/mysnprintf.c,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -d -r2.2 -r2.3 *** mysnprintf.c 2001/07/31 22:10:29 2.2 --- mysnprintf.c 2001/12/01 16:00:10 2.3 *************** *** 41,49 **** if ((size_t)len > size + 512) Py_FatalError("Buffer overflow in PyOS_snprintf/PyOS_vsnprintf"); ! if ((size_t)len > size) { ! PyMem_Free(buffer); ! return len - 1; ! } ! memcpy(str, buffer, len); PyMem_Free(buffer); return len - 1; --- 41,49 ---- if ((size_t)len > size + 512) Py_FatalError("Buffer overflow in PyOS_snprintf/PyOS_vsnprintf"); ! if ((size_t)len > size) ! buffer[size-1] = '\0'; ! else ! size = len; ! memcpy(str, buffer, size); PyMem_Free(buffer); return len - 1; From tim_one@users.sourceforge.net Sun Dec 2 08:29:18 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Sun, 02 Dec 2001 00:29:18 -0800 Subject: [Python-checkins] CVS: python/dist/src/Python sysmodule.c,2.96,2.97 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory usw-pr-cvs1:/tmp/cvs-serv578/python/Python Modified Files: sysmodule.c Log Message: mywrite(): The test for trouble in PyOS_vsnprintf was wrong on both ends. Also, when there is trouble, ensure the buffer has a traiing 0 byte. Index: sysmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v retrieving revision 2.96 retrieving revision 2.97 diff -C2 -d -r2.96 -r2.97 *** sysmodule.c 2001/11/28 21:44:53 2.96 --- sysmodule.c 2001/12/02 08:29:16 2.97 *************** *** 1024,1034 **** else { char buffer[1001]; ! int written = PyOS_vsnprintf(buffer, sizeof(buffer), ! format, va); if (PyFile_WriteString(buffer, file) != 0) { PyErr_Clear(); fputs(buffer, fp); } ! if (written == -1 || written > sizeof(buffer)) { const char *truncated = "... truncated"; if (PyFile_WriteString(truncated, file) != 0) { --- 1024,1041 ---- else { char buffer[1001]; ! const int written = PyOS_vsnprintf(buffer, sizeof(buffer), ! format, va); ! const int trouble = written < 0 || written >= sizeof(buffer); ! if (trouble) { ! /* Ensure there's a trailing null byte -- MS ! vsnprintf fills the buffer to the very end ! if it's not big enough. */ ! buffer[sizeof(buffer) - 1] = '\0'; ! } if (PyFile_WriteString(buffer, file) != 0) { PyErr_Clear(); fputs(buffer, fp); } ! if (trouble) { const char *truncated = "... truncated"; if (PyFile_WriteString(truncated, file) != 0) { From loewis@users.sourceforge.net Sun Dec 2 10:15:39 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Sun, 02 Dec 2001 02:15:39 -0800 Subject: [Python-checkins] CVS: python/dist/src configure,1.272,1.273 configure.in,1.281,1.282 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv13970 Modified Files: configure configure.in Log Message: Remove INET6 define. Use ENABLE_IPV6 instead. Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.272 retrieving revision 1.273 diff -C2 -d -r1.272 -r1.273 *** configure 2001/11/14 10:59:57 1.272 --- configure 2001/12/02 10:15:36 1.273 *************** *** 1,5 **** #! /bin/sh ! # From configure.in Revision: 1.280 # Guess values for system-dependent variables and create Makefiles. --- 1,5 ---- #! /bin/sh ! # From configure.in Revision: 1.281 [...2354 lines suppressed...] if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 7522,7526 **** SRCDIRS="Parser Grammar Objects Python Modules" echo $ac_n "checking for build directories""... $ac_c" 1>&6 ! echo "configure:7525: checking for build directories" >&5 for dir in $SRCDIRS; do if test ! -d $dir; then --- 7516,7520 ---- SRCDIRS="Parser Grammar Objects Python Modules" echo $ac_n "checking for build directories""... $ac_c" 1>&6 ! echo "configure:7519: checking for build directories" >&5 for dir in $SRCDIRS; do if test ! -d $dir; then Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.281 retrieving revision 1.282 diff -C2 -d -r1.281 -r1.282 *** configure.in 2001/11/14 10:59:57 1.281 --- configure.in 2001/12/02 10:15:37 1.282 *************** *** 1190,1195 **** yes #endif], ! [ipv6type=$i; ! OPT="-DINET6 $OPT"]) ;; kame) --- 1190,1194 ---- yes #endif], ! [ipv6type=$i]) ;; kame) *************** *** 1203,1208 **** ipv6lib=inet6 ipv6libdir=/usr/local/v6/lib ! ipv6trylibc=yes ! OPT="-DINET6 $OPT"]) ;; linux-glibc) --- 1202,1206 ---- ipv6lib=inet6 ipv6libdir=/usr/local/v6/lib ! ipv6trylibc=yes]) ;; linux-glibc) *************** *** 1214,1219 **** #endif], [ipv6type=$i; ! ipv6trylibc=yes ! OPT="-DINET6 $OPT"]) ;; linux-inet6) --- 1212,1216 ---- #endif], [ipv6type=$i; ! ipv6trylibc=yes]) ;; linux-inet6) *************** *** 1223,1227 **** ipv6lib=inet6 ipv6libdir=/usr/inet6/lib ! OPT="-DINET6 -I/usr/inet6/include $OPT" fi ;; --- 1220,1224 ---- ipv6lib=inet6 ipv6libdir=/usr/inet6/lib ! OPT="-I/usr/inet6/include $OPT" fi ;; *************** *** 1231,1235 **** ipv6type=$i ipv6trylibc=yes - OPT="-DINET6 $OPT" fi fi --- 1228,1231 ---- *************** *** 1243,1248 **** [ipv6type=$i; ipv6lib=inet6; ! ipv6libdir=/usr/local/v6/lib; ! OPT="-DINET6 $OPT"]) ;; v6d) --- 1239,1243 ---- [ipv6type=$i; ipv6lib=inet6; ! ipv6libdir=/usr/local/v6/lib]) ;; v6d) *************** *** 1265,1270 **** [ipv6type=$i; ipv6lib=inet6; ! ipv6libdir=/usr/local/v6/lib; ! OPT="-DINET6 $OPT"]) ;; esac --- 1260,1264 ---- [ipv6type=$i; ipv6lib=inet6; ! ipv6libdir=/usr/local/v6/lib]) ;; esac From loewis@users.sourceforge.net Sun Dec 2 10:15:39 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Sun, 02 Dec 2001 02:15:39 -0800 Subject: [Python-checkins] CVS: python/dist/src/Modules getaddrinfo.c,1.9,1.10 getnameinfo.c,1.4,1.5 socketmodule.c,1.199,1.200 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv13970/Modules Modified Files: getaddrinfo.c getnameinfo.c socketmodule.c Log Message: Remove INET6 define. Use ENABLE_IPV6 instead. Index: getaddrinfo.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getaddrinfo.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** getaddrinfo.c 2001/11/07 08:31:03 1.9 --- getaddrinfo.c 2001/12/02 10:15:37 1.10 *************** *** 58,62 **** #endif ! #if defined(__KAME__) && defined(INET6) # define FAITH #endif --- 58,62 ---- #endif ! #if defined(__KAME__) && defined(ENABLE_IPV6) # define FAITH #endif *************** *** 95,99 **** const char *a_loopback; } gai_afdl [] = { ! #ifdef INET6 #define N_INET6 0 {PF_INET6, sizeof(struct in6_addr), --- 95,99 ---- const char *a_loopback; } gai_afdl [] = { ! #ifdef ENABLE_IPV6 #define N_INET6 0 {PF_INET6, sizeof(struct in6_addr), *************** *** 112,116 **** }; ! #ifdef INET6 #define PTON_MAX 16 #else --- 112,116 ---- }; ! #ifdef ENABLE_IPV6 #define PTON_MAX 16 #else *************** *** 289,293 **** case PF_UNSPEC: case PF_INET: ! #ifdef INET6 case PF_INET6: #endif --- 289,293 ---- case PF_UNSPEC: case PF_INET: ! #ifdef ENABLE_IPV6 case PF_INET6: #endif *************** *** 418,422 **** if (inet_pton(gai_afdl[i].a_af, hostname, pton)) { u_long v4a; ! #ifdef INET6 u_char pfx; #endif --- 418,422 ---- if (inet_pton(gai_afdl[i].a_af, hostname, pton)) { u_long v4a; ! #ifdef ENABLE_IPV6 u_char pfx; #endif *************** *** 431,435 **** pai->ai_flags &= ~AI_CANONNAME; break; ! #ifdef INET6 case AF_INET6: pfx = ((struct in6_addr *)pton)->s6_addr8[0]; --- 431,435 ---- pai->ai_flags &= ~AI_CANONNAME; break; ! #ifdef ENABLE_IPV6 case AF_INET6: pfx = ((struct in6_addr *)pton)->s6_addr8[0]; *************** *** 496,504 **** struct addrinfo *cur; int error = 0; ! #ifdef INET6 int h_error; #endif ! #ifdef INET6 hp = getipnodebyaddr(addr, gai_afd->a_addrlen, gai_afd->a_af, &h_error); #else --- 496,504 ---- struct addrinfo *cur; int error = 0; ! #ifdef ENABLE_IPV6 int h_error; #endif ! #ifdef ENABLE_IPV6 hp = getipnodebyaddr(addr, gai_afd->a_addrlen, gai_afd->a_af, &h_error); #else *************** *** 511,515 **** GET_AI(cur, gai_afd, numaddr, port); ! #ifdef INET6 if (hp) freehostent(hp); --- 511,515 ---- GET_AI(cur, gai_afd, numaddr, port); ! #ifdef ENABLE_IPV6 if (hp) freehostent(hp); *************** *** 520,524 **** if (cur) freeaddrinfo(cur); ! #ifdef INET6 if (hp) freehostent(hp); --- 520,524 ---- if (cur) freeaddrinfo(cur); ! #ifdef ENABLE_IPV6 if (hp) freehostent(hp); *************** *** 548,552 **** sentinel.ai_next = NULL; cur = &sentinel; ! #ifdef INET6 if (af == AF_UNSPEC) { hp = getipnodebyname(hostname, AF_INET6, --- 548,552 ---- sentinel.ai_next = NULL; cur = &sentinel; ! #ifdef ENABLE_IPV6 if (af == AF_UNSPEC) { hp = getipnodebyname(hostname, AF_INET6, *************** *** 583,592 **** for (i = 0; (ap = hp->h_addr_list[i]) != NULL; i++) { switch (af) { ! #ifdef INET6 case AF_INET6: gai_afd = &gai_afdl[N_INET6]; break; #endif ! #ifndef INET6 default: /* AF_UNSPEC */ #endif --- 583,592 ---- for (i = 0; (ap = hp->h_addr_list[i]) != NULL; i++) { switch (af) { ! #ifdef ENABLE_IPV6 case AF_INET6: gai_afd = &gai_afdl[N_INET6]; break; #endif ! #ifndef ENABLE_IPV6 default: /* AF_UNSPEC */ #endif *************** *** 594,598 **** gai_afd = &gai_afdl[N_INET]; break; ! #ifdef INET6 default: /* AF_UNSPEC */ if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ap)) { --- 594,598 ---- gai_afd = &gai_afdl[N_INET]; break; ! #ifdef ENABLE_IPV6 default: /* AF_UNSPEC */ if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ap)) { *************** *** 623,627 **** cur = cur->ai_next; } ! #ifdef INET6 freehostent(hp); #endif --- 623,627 ---- cur = cur->ai_next; } ! #ifdef ENABLE_IPV6 freehostent(hp); #endif *************** *** 631,635 **** if (top) freeaddrinfo(top); ! #ifdef INET6 if (hp) freehostent(hp); --- 631,635 ---- if (top) freeaddrinfo(top); ! #ifdef ENABLE_IPV6 if (hp) freehostent(hp); Index: getnameinfo.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getnameinfo.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** getnameinfo.c 2001/08/15 17:14:33 1.4 --- getnameinfo.c 2001/12/02 10:15:37 1.5 *************** *** 59,63 **** int a_off; } gni_afdl [] = { ! #ifdef INET6 {PF_INET6, sizeof(struct in6_addr), sizeof(struct sockaddr_in6), offsetof(struct sockaddr_in6, sin6_addr)}, --- 59,63 ---- int a_off; } gni_afdl [] = { ! #ifdef ENABLE_IPV6 {PF_INET6, sizeof(struct in6_addr), sizeof(struct sockaddr_in6), offsetof(struct sockaddr_in6, sin6_addr)}, *************** *** 103,107 **** char *addr, *p; u_long v4a; ! #ifdef INET6 u_char pfx; #endif --- 103,107 ---- char *addr, *p; u_long v4a; ! #ifdef ENABLE_IPV6 u_char pfx; #endif *************** *** 160,164 **** flags |= NI_NUMERICHOST; break; ! #ifdef INET6 case AF_INET6: pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr8[0]; --- 160,164 ---- flags |= NI_NUMERICHOST; break; ! #ifdef ENABLE_IPV6 case AF_INET6: pfx = ((struct sockaddr_in6 *)sa)->sin6_addr.s6_addr8[0]; *************** *** 178,182 **** strcpy(host, numaddr); } else { ! #ifdef INET6 hp = getipnodebyaddr(addr, gni_afd->a_addrlen, gni_afd->a_af, &h_error); #else --- 178,182 ---- strcpy(host, numaddr); } else { ! #ifdef ENABLE_IPV6 hp = getipnodebyaddr(addr, gni_afd->a_addrlen, gni_afd->a_af, &h_error); #else *************** *** 191,195 **** } if (strlen(hp->h_name) > hostlen) { ! #ifdef INET6 freehostent(hp); #endif --- 191,195 ---- } if (strlen(hp->h_name) > hostlen) { ! #ifdef ENABLE_IPV6 freehostent(hp); #endif *************** *** 197,201 **** } strcpy(host, hp->h_name); ! #ifdef INET6 freehostent(hp); #endif --- 197,201 ---- } strcpy(host, hp->h_name); ! #ifdef ENABLE_IPV6 freehostent(hp); #endif Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.199 retrieving revision 1.200 diff -C2 -d -r1.199 -r1.200 *** socketmodule.c 2001/11/28 22:07:30 1.199 --- socketmodule.c 2001/12/02 10:15:37 1.200 *************** *** 480,484 **** struct sockaddr_un un; #endif ! #ifdef INET6 struct sockaddr_in6 in6; struct sockaddr_storage storage; --- 480,484 ---- struct sockaddr_un un; #endif ! #ifdef ENABLE_IPV6 struct sockaddr_in6 in6; struct sockaddr_storage storage; *************** *** 595,599 **** siz = 4; break; ! #ifdef INET6 case AF_INET6: siz = 16; --- 595,599 ---- siz = 4; break; ! #ifdef ENABLE_IPV6 case AF_INET6: siz = 16; *************** *** 652,656 **** case AF_INET: return 4; ! #ifdef INET6 case AF_INET6: return 16; --- 652,656 ---- case AF_INET: return 4; ! #ifdef ENABLE_IPV6 case AF_INET6: return 16; *************** *** 726,730 **** #endif /* AF_UNIX */ ! #ifdef INET6 case AF_INET6: { --- 726,730 ---- #endif /* AF_UNIX */ ! #ifdef ENABLE_IPV6 case AF_INET6: { *************** *** 831,835 **** } ! #ifdef INET6 case AF_INET6: { --- 831,835 ---- } ! #ifdef ENABLE_IPV6 case AF_INET6: { *************** *** 920,924 **** } ! #ifdef INET6 case AF_INET6: { --- 920,924 ---- } ! #ifdef ENABLE_IPV6 case AF_INET6: { *************** *** 1994,1998 **** return NULL; break; ! #ifdef INET6 case AF_INET6: if (alen < sizeof(struct sockaddr_in6)) --- 1994,1998 ---- return NULL; break; ! #ifdef ENABLE_IPV6 case AF_INET6: if (alen < sizeof(struct sockaddr_in6)) *************** *** 2032,2036 **** break; } ! #ifdef INET6 case AF_INET6: { --- 2032,2036 ---- break; } ! #ifdef ENABLE_IPV6 case AF_INET6: { *************** *** 2139,2143 **** PySocket_gethostbyaddr(PyObject *self, PyObject *args) { ! #ifdef INET6 struct sockaddr_storage addr; #else --- 2139,2143 ---- PySocket_gethostbyaddr(PyObject *self, PyObject *args) { ! #ifdef ENABLE_IPV6 struct sockaddr_storage addr; #else *************** *** 2178,2182 **** al = sizeof(((struct sockaddr_in *)sa)->sin_addr); break; ! #ifdef INET6 case AF_INET6: ap = (char *)&((struct sockaddr_in6 *)sa)->sin6_addr; --- 2178,2182 ---- al = sizeof(((struct sockaddr_in *)sa)->sin_addr); break; ! #ifdef ENABLE_IPV6 case AF_INET6: ap = (char *)&((struct sockaddr_in6 *)sa)->sin6_addr; *************** *** 2589,2593 **** break; } ! #ifdef INET6 case AF_INET6: { --- 2589,2593 ---- break; } ! #ifdef ENABLE_IPV6 case AF_INET6: { From mal@lemburg.com Sun Dec 2 10:18:44 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Sun, 02 Dec 2001 11:18:44 +0100 Subject: [Python-checkins] CVS: python/dist/src/Python sysmodule.c,2.96,2.97 References: Message-ID: <3C0A0004.97A8E339@lemburg.com> Tim Peters wrote: > > Update of /cvsroot/python/python/dist/src/Python > In directory usw-pr-cvs1:/tmp/cvs-serv578/python/Python > > Modified Files: > sysmodule.c > Log Message: > mywrite(): The test for trouble in PyOS_vsnprintf was wrong on both > ends. Also, when there is trouble, ensure the buffer has a traiing > 0 byte. > > Index: sysmodule.c > =================================================================== > RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v > retrieving revision 2.96 > retrieving revision 2.97 > diff -C2 -d -r2.96 -r2.97 > *** sysmodule.c 2001/11/28 21:44:53 2.96 > --- sysmodule.c 2001/12/02 08:29:16 2.97 > *************** > *** 1024,1034 **** > else { > char buffer[1001]; > ! int written = PyOS_vsnprintf(buffer, sizeof(buffer), > ! format, va); > if (PyFile_WriteString(buffer, file) != 0) { > PyErr_Clear(); > fputs(buffer, fp); > } > ! if (written == -1 || written > sizeof(buffer)) { > const char *truncated = "... truncated"; > if (PyFile_WriteString(truncated, file) != 0) { > --- 1024,1041 ---- > else { > char buffer[1001]; > ! const int written = PyOS_vsnprintf(buffer, sizeof(buffer), > ! format, va); > ! const int trouble = written < 0 || written >= sizeof(buffer); > ! if (trouble) { > ! /* Ensure there's a trailing null byte -- MS > ! vsnprintf fills the buffer to the very end > ! if it's not big enough. */ > ! buffer[sizeof(buffer) - 1] = '\0'; > ! } Wouldn't it be bette to put this code into PyOS_vsnprintf() for both cases (snprintf available/not available) ? -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From mal@lemburg.com Sun Dec 2 10:20:31 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Sun, 02 Dec 2001 11:20:31 +0100 Subject: [Python-checkins] CVS: python/dist/src configure,1.272,1.273 configure.in,1.281,1.282 References: Message-ID: <3C0A006F.CE61BF02@lemburg.com> "Martin v. L?wis" wrote: > > Update of /cvsroot/python/python/dist/src > In directory usw-pr-cvs1:/tmp/cvs-serv13970 > > Modified Files: > configure configure.in > Log Message: > Remove INET6 define. Use ENABLE_IPV6 instead. Thanks, Martin ! -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From loewis@users.sourceforge.net Sun Dec 2 12:08:08 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Sun, 02 Dec 2001 04:08:08 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib types.py,1.24,1.25 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv29198 Modified Files: types.py Log Message: Patch #487455: make types.StringTypes a tuple. Index: types.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/types.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** types.py 2001/10/29 22:25:44 1.24 --- types.py 2001/12/02 12:08:06 1.25 *************** *** 27,33 **** try: UnicodeType = unicode ! StringTypes = [StringType, UnicodeType] except NameError: ! StringTypes = [StringType] BufferType = type(buffer('')) --- 27,33 ---- try: UnicodeType = unicode ! StringTypes = (StringType, UnicodeType) except NameError: ! StringTypes = (StringType,) BufferType = type(buffer('')) From loewis@users.sourceforge.net Sun Dec 2 12:21:36 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Sun, 02 Dec 2001 04:21:36 -0800 Subject: [Python-checkins] CVS: python/dist/src/Modules gcmodule.c,2.31,2.32 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv31011 Modified Files: gcmodule.c Log Message: Patch #486743: remove bad INCREF, propagate exception in append_objects. Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -d -r2.31 -r2.32 *** gcmodule.c 2001/11/29 18:08:31 2.31 --- gcmodule.c 2001/12/02 12:21:34 2.32 *************** *** 702,706 **** /* appending objects in a GC list to a Python list */ ! static void append_objects(PyObject *py_list, PyGC_Head *gc_list) { --- 702,706 ---- /* appending objects in a GC list to a Python list */ ! static int append_objects(PyObject *py_list, PyGC_Head *gc_list) { *************** *** 709,716 **** PyObject *op = FROM_GC(gc); if (op != py_list) { ! Py_INCREF(op); ! PyList_Append(py_list, op); } } } --- 709,718 ---- PyObject *op = FROM_GC(gc); if (op != py_list) { ! if (PyList_Append(py_list, op)) { ! return -1; /* exception */ ! } } } + return 0; } *************** *** 723,729 **** return NULL; result = PyList_New(0); ! append_objects(result, &_PyGC_generation0); ! append_objects(result, &generation1); ! append_objects(result, &generation2); return result; } --- 725,734 ---- return NULL; result = PyList_New(0); ! if (append_objects(result, &_PyGC_generation0) || ! append_objects(result, &generation1) || ! append_objects(result, &generation2)) { ! Py_DECREF(result); ! return NULL; ! } return result; } From loewis@users.sourceforge.net Sun Dec 2 12:24:21 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Sun, 02 Dec 2001 04:24:21 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/encodings aliases.py,1.10,1.11 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/encodings In directory usw-pr-cvs1:/tmp/cvs-serv31492 Modified Files: aliases.py Log Message: Patch #487275: Add windows-1251 charset alias. Index: aliases.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/encodings/aliases.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** aliases.py 2001/09/20 10:35:45 1.10 --- aliases.py 2001/12/02 12:24:19 1.11 *************** *** 72,75 **** --- 72,76 ---- # Windows + 'windows_1251': 'cp1251', 'windows_1252': 'cp1252', 'windows_1254': 'cp1254', From loewis@users.sourceforge.net Sun Dec 2 12:26:05 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Sun, 02 Dec 2001 04:26:05 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.321,1.322 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv31724/Misc Modified Files: NEWS Log Message: Patch #487275: windows-1251 charset alias. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.321 retrieving revision 1.322 diff -C2 -d -r1.321 -r1.322 *** NEWS 2001/11/29 03:26:37 1.321 --- NEWS 2001/12/02 12:26:03 1.322 *************** *** 17,20 **** --- 17,22 ---- - Tix.ResizeHandle exposes detach_widget, hide, and show. + - The charset alias windows_1252 has been added. + Tools/Demos From loewis@users.sourceforge.net Sun Dec 2 12:27:45 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Sun, 02 Dec 2001 04:27:45 -0800 Subject: [Python-checkins] CVS: python/dist/src/Modules timemodule.c,2.116,2.117 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv31918 Modified Files: timemodule.c Log Message: Patch #481718: Time module doc string changes. Index: timemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/timemodule.c,v retrieving revision 2.116 retrieving revision 2.117 diff -C2 -d -r2.116 -r2.117 *** timemodule.c 2001/10/24 20:37:10 2.116 --- timemodule.c 2001/12/02 12:27:43 2.117 *************** *** 290,294 **** static char gmtime_doc[] = ! "gmtime([seconds]) -> tuple\n\ \n\ Convert seconds since the Epoch to a time tuple expressing UTC (a.k.a.\n\ --- 290,294 ---- static char gmtime_doc[] = ! "gmtime([seconds]) -> (year,month,day,hour,minute,second,weekday,dayofyear,dst)\n\ \n\ Convert seconds since the Epoch to a time tuple expressing UTC (a.k.a.\n\ *************** *** 307,311 **** static char localtime_doc[] = ! "localtime([seconds]) -> tuple\n\ Convert seconds since the Epoch to a time tuple expressing local time.\n\ When 'seconds' is not passed in, convert the current time instead."; --- 307,312 ---- static char localtime_doc[] = ! "localtime([seconds]) -> (year,month,day,hour,minute,second,weekday,dayofyear,dst)\n\ ! \n\ Convert seconds since the Epoch to a time tuple expressing local time.\n\ When 'seconds' is not passed in, convert the current time instead."; *************** *** 445,448 **** --- 446,450 ---- static char strptime_doc[] = "strptime(string, format) -> tuple\n\ + \n\ Parse a string to a time tuple according to a format specification.\n\ See the library reference manual for formatting codes (same as strftime())."; From loewis@users.sourceforge.net Sun Dec 2 13:02:36 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Sun, 02 Dec 2001 05:02:36 -0800 Subject: [Python-checkins] CVS: python/dist/src Makefile.pre.in,1.67,1.68 configure.in,1.282,1.283 configure,1.273,1.274 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv4991 Modified Files: Makefile.pre.in configure.in configure Log Message: Compute thread headers through shell expansion in configure. Fixes #485679. Index: Makefile.pre.in =================================================================== RCS file: /cvsroot/python/python/dist/src/Makefile.pre.in,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** Makefile.pre.in 2001/11/24 09:39:05 1.67 --- Makefile.pre.in 2001/12/02 13:02:32 1.68 *************** *** 895,899 **** # Dependencies ! Python/thread.o: $(srcdir)/Python/thread_*.h # IF YOU PUT ANYTHING HERE IT WILL GO AWAY --- 895,899 ---- # Dependencies ! Python/thread.o: @THREADHEADERS@ # IF YOU PUT ANYTHING HERE IT WILL GO AWAY Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.282 retrieving revision 1.283 diff -C2 -d -r1.282 -r1.283 *** configure.in 2001/12/02 10:15:37 1.282 --- configure.in 2001/12/02 13:02:32 1.283 *************** *** 2019,2022 **** --- 2019,2029 ---- #fi + AC_SUBST(THREADHEADERS) + + for h in `(cd $srcdir;echo Python/thread_*.h)` + do + THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" + done + AC_SUBST(SRCDIRS) SRCDIRS="Parser Grammar Objects Python Modules" Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.273 retrieving revision 1.274 diff -C2 -d -r1.273 -r1.274 *** configure 2001/12/02 10:15:36 1.273 --- configure 2001/12/02 13:02:32 1.274 *************** *** 1,5 **** #! /bin/sh ! # From configure.in Revision: 1.281 # Guess values for system-dependent variables and create Makefiles. --- 1,5 ---- #! /bin/sh ! # From configure.in Revision: 1.282 # Guess values for system-dependent variables and create Makefiles. *************** *** 7514,7520 **** SRCDIRS="Parser Grammar Objects Python Modules" echo $ac_n "checking for build directories""... $ac_c" 1>&6 ! echo "configure:7519: checking for build directories" >&5 for dir in $SRCDIRS; do if test ! -d $dir; then --- 7514,7527 ---- + + for h in `(cd $srcdir;echo Python/thread_*.h)` + do + THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" + done + + SRCDIRS="Parser Grammar Objects Python Modules" echo $ac_n "checking for build directories""... $ac_c" 1>&6 ! echo "configure:7526: checking for build directories" >&5 for dir in $SRCDIRS; do if test ! -d $dir; then *************** *** 7707,7710 **** --- 7714,7718 ---- s%@LIBC@%$LIBC%g s%@UNICODE_OBJS@%$UNICODE_OBJS%g + s%@THREADHEADERS@%$THREADHEADERS%g s%@SRCDIRS@%$SRCDIRS%g From loewis@users.sourceforge.net Sun Dec 2 13:32:17 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Sun, 02 Dec 2001 05:32:17 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib popen2.py,1.19,1.20 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv9461 Modified Files: popen2.py Log Message: Patch #487784: Support Unicode commands in popen3/4 handling on UNIX. Index: popen2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/popen2.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** popen2.py 2001/02/09 20:06:00 1.19 --- popen2.py 2001/12/02 13:32:15 1.20 *************** *** 9,12 **** --- 9,13 ---- import os import sys + import types __all__ = ["popen2", "popen3", "popen4"] *************** *** 57,61 **** def _run_child(self, cmd): ! if type(cmd) == type(''): cmd = ['/bin/sh', '-c', cmd] for i in range(3, MAXFD): --- 58,62 ---- def _run_child(self, cmd): ! if isinstance(cmd, types.StringTypes): cmd = ['/bin/sh', '-c', cmd] for i in range(3, MAXFD): From fdrake@users.sourceforge.net Sun Dec 2 15:10:48 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Sun, 02 Dec 2001 07:10:48 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libstrings.tex,1.7,1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv29753/lib Modified Files: libstrings.tex Log Message: Add reference to the "String Methods" section to make that information easier to find. Based on the comment from Steve Alexander on the zope-coders mailing list. Index: libstrings.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstrings.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** libstrings.tex 1998/07/23 17:59:15 1.7 --- libstrings.tex 2001/12/02 15:10:46 1.8 *************** *** 6,7 **** --- 6,10 ---- \localmoduletable + + Information on the methods of string objects can be found in + section~\ref{string-methods}, ``String Methods.'' From fdrake@users.sourceforge.net Sun Dec 2 15:13:37 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Sun, 02 Dec 2001 07:13:37 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc ACKS,1.31,1.32 Message-ID: Update of /cvsroot/python/python/dist/src/Doc In directory usw-pr-cvs1:/tmp/cvs-serv30183 Modified Files: ACKS Log Message: Another name. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** ACKS 2001/11/30 06:06:40 1.31 --- ACKS 2001/12/02 15:13:35 1.32 *************** *** 18,21 **** --- 18,22 ---- Aahz Michael Abbott + Steve Alexander Jim Ahlstrom Fred Allen From loewis@users.sourceforge.net Sun Dec 2 18:09:43 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Sun, 02 Dec 2001 10:09:43 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.141,2.142 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv2949 Modified Files: stringobject.c Log Message: Patch 487906: update inline docs. Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.141 retrieving revision 2.142 diff -C2 -d -r2.141 -r2.142 *** stringobject.c 2001/11/28 20:27:42 2.141 --- stringobject.c 2001/12/02 18:09:41 2.142 *************** *** 20,36 **** /* ! Newsizedstringobject() and newstringobject() try in certain cases ! to share string objects. When the size of the string is zero, ! these routines always return a pointer to the same string object; ! when the size is one, they return a pointer to an already existing ! object if the contents of the string is known. For ! newstringobject() this is always the case, for ! newsizedstringobject() this is the case when the first argument in ! not NULL. ! A common practice to allocate a string and then fill it in or ! change it must be done carefully. It is only allowed to change the ! contents of the string if the obect was gotten from ! newsizedstringobject() with a NULL first argument, because in the ! future these routines may try to do even more sharing of objects. */ PyObject * --- 20,44 ---- /* ! PyString_FromStringAndSize() and PyString_FromString() try in certain cases ! to share string objects. When the size of the string is zero, these ! routines always return a pointer to the same string object; when the size ! is one, they return a pointer to an already existing object if the contents ! of the string is known. For PyString_FromString() this is always the case, ! for PyString_FromStringAndSize() this is the case when the first argument ! in not NULL. ! ! A common practice of allocating a string and then filling it in or changing ! it must be done carefully. It is only allowed to change the contents of ! the string if the object was gotten from PyString_FromStringAndSize() with ! a NULL first argument, because in the future these routines may try to do ! even more sharing of objects. ! ! The parameter `size' denotes number of characters to allocate, not counting ! the null terminating character. If the `str' argument is not NULL, then it ! must point to a null-terminated string of length `size'. ! ! The member `op->ob_size' denotes the number of bytes of data in the string, ! not counting the null terminating character, and is therefore equal to the ! `size' parameter. */ PyObject * From loewis@users.sourceforge.net Sun Dec 2 18:31:04 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Sun, 02 Dec 2001 10:31:04 -0800 Subject: [Python-checkins] CVS: python/dist/src/Modules gcmodule.c,2.32,2.33 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv8200 Modified Files: gcmodule.c Log Message: Check for NULL return value of PyList_New (follow-up to patch #486743). Index: gcmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v retrieving revision 2.32 retrieving revision 2.33 diff -C2 -d -r2.32 -r2.33 *** gcmodule.c 2001/12/02 12:21:34 2.32 --- gcmodule.c 2001/12/02 18:31:02 2.33 *************** *** 725,728 **** --- 725,731 ---- return NULL; result = PyList_New(0); + if (result == NULL) { + return NULL; + } if (append_objects(result, &_PyGC_generation0) || append_objects(result, &generation1) || From jackjansen@users.sourceforge.net Sun Dec 2 21:41:38 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Sun, 02 Dec 2001 13:41:38 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test regrtest.py,1.67,1.68 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv16801 Modified Files: regrtest.py Log Message: Added tests expected to be skipped on Mac OS X. Index: regrtest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/regrtest.py,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** regrtest.py 2001/11/30 14:16:26 1.67 --- regrtest.py 2001/12/02 21:41:36 1.68 *************** *** 620,623 **** --- 620,644 ---- test_winsound """, + 'darwin1': + """ + test_al + test_cd + test_cl + test_curses + test_dl + test_gdbm + test_gl + test_imgfile + test_largefile + test_linuxaudiodev + test_minidom + test_nis + test_ntpath + test_poll + test_socket_ssl + test_sunaudiodev + test_winreg + test_winsound + """, } From jackjansen@users.sourceforge.net Sun Dec 2 23:56:30 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Sun, 02 Dec 2001 15:56:30 -0800 Subject: [Python-checkins] CVS: python/dist/src/Modules getpath.c,1.39,1.40 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv12930 Modified Files: getpath.c Log Message: Changed logic for finding python home in Mac OS X framework Pythons. Now sys.executable points to the executable again, in stead of to the shared library. The latter is used only for locating the python home. Index: getpath.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/getpath.c,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** getpath.c 2001/09/28 20:00:29 1.39 --- getpath.c 2001/12/02 23:56:28 1.40 *************** *** 375,379 **** --- 375,422 ---- #endif + /* If there is no slash in the argv0 path, then we have to + * assume python is on the user's $PATH, since there's no + * other way to find a directory to start the search from. If + * $PATH isn't exported, you lose. + */ + if (strchr(prog, SEP)) + strncpy(progpath, prog, MAXPATHLEN); + else if (path) { + while (1) { + char *delim = strchr(path, DELIM); + + if (delim) { + size_t len = delim - path; + if (len > MAXPATHLEN) + len = MAXPATHLEN; + strncpy(progpath, path, len); + *(progpath + len) = '\0'; + } + else + strncpy(progpath, path, MAXPATHLEN); + + joinpath(progpath, prog); + if (isxfile(progpath)) + break; + + if (!delim) { + progpath[0] = '\0'; + break; + } + path = delim + 1; + } + } + else + progpath[0] = '\0'; + if (progpath[0] != SEP) + absolutize(progpath); + strncpy(argv0_path, progpath, MAXPATHLEN); + #ifdef WITH_NEXT_FRAMEWORK + /* On Mac OS X we have a special case if we're running from a framework. + ** This is because the python home should be set relative to the library, + ** which is in the framework, not relative to the executable, which may + ** be outside of the framework. Except when we're in the build directory... + */ pythonModule = NSModuleForSymbol(NSLookupAndBindSymbol("_Py_Initialize")); /* Use dylib functions to find out where the framework was loaded from */ *************** *** 395,451 **** /* We are in the build directory so use the name of the executable - we know that the absolute path is passed */ ! strncpy(progpath, prog, MAXPATHLEN); } else { /* Use the location of the library as the progpath */ ! strncpy(progpath, buf, MAXPATHLEN); ! } ! } ! else { ! /* If we're not in a framework, fall back to the old way ! (even though NSNameOfModule() probably does the same thing.) */ ! #endif ! ! /* If there is no slash in the argv0 path, then we have to ! * assume python is on the user's $PATH, since there's no ! * other way to find a directory to start the search from. If ! * $PATH isn't exported, you lose. ! */ ! if (strchr(prog, SEP)) ! strncpy(progpath, prog, MAXPATHLEN); ! else if (path) { ! while (1) { ! char *delim = strchr(path, DELIM); ! ! if (delim) { ! size_t len = delim - path; ! if (len > MAXPATHLEN) ! len = MAXPATHLEN; ! strncpy(progpath, path, len); ! *(progpath + len) = '\0'; ! } ! else ! strncpy(progpath, path, MAXPATHLEN); ! ! joinpath(progpath, prog); ! if (isxfile(progpath)) ! break; ! ! if (!delim) { ! progpath[0] = '\0'; ! break; ! } ! path = delim + 1; ! } } - else - progpath[0] = '\0'; - if (progpath[0] != SEP) - absolutize(progpath); - #ifdef WITH_NEXT_FRAMEWORK } #endif - - strncpy(argv0_path, progpath, MAXPATHLEN); #if HAVE_READLINK --- 438,449 ---- /* We are in the build directory so use the name of the executable - we know that the absolute path is passed */ ! strncpy(argv0_path, prog, MAXPATHLEN); } else { /* Use the location of the library as the progpath */ ! strncpy(argv0_path, buf, MAXPATHLEN); } } #endif #if HAVE_READLINK From gvanrossum@users.sourceforge.net Mon Dec 3 00:08:39 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Sun, 02 Dec 2001 16:08:39 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects typeobject.c,2.118,2.119 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv14860 Modified Files: typeobject.c Log Message: Fix for SF bug #485678. slot_tp_descr_set(): When deleting an attribute described by a descriptor implemented in Python, the descriptor's __del__ method is called by the slot_tp_descr_set dispatch function. This is bogus -- __del__ already has a different meaning. Renaming this use of __del__ is renamed to __delete__. Index: typeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v retrieving revision 2.118 retrieving revision 2.119 diff -C2 -d -r2.118 -r2.119 *** typeobject.c 2001/11/14 23:32:33 2.118 --- typeobject.c 2001/12/03 00:08:33 2.119 *************** *** 3282,3286 **** if (value == NULL) ! res = call_method(self, "__del__", &del_str, "(O)", target); else --- 3282,3286 ---- if (value == NULL) ! res = call_method(self, "__delete__", &del_str, "(O)", target); else From jackjansen@users.sourceforge.net Mon Dec 3 00:09:57 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Sun, 02 Dec 2001 16:09:57 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Contrib/mpwsystem - New directory Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Contrib/mpwsystem In directory usw-pr-cvs1:/tmp/cvs-serv15056/mpwsystem Log Message: Directory /cvsroot/python/python/dist/src/Mac/Contrib/mpwsystem added to the repository From jackjansen@users.sourceforge.net Mon Dec 3 00:11:37 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Sun, 02 Dec 2001 16:11:37 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Contrib/mpwsystem mpwsystem.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Contrib/mpwsystem In directory usw-pr-cvs1:/tmp/cvs-serv15391/Python/Mac/Contrib/mpwsystem Added Files: mpwsystem.py Log Message: A system() lookalike that sends commands to ToolServer, by Daniel Brotsky. The semantics aren't enough like system() to add this to the main Lib folder, but it is pretty useful nonetheless for selected people. --- NEW FILE: mpwsystem.py --- """mpwsystem - A simple example of how to use Apple Events to implement a "system()" call that invokes ToolServer on the command. Contributed by Daniel Brotsky . (renamed from aesystem to mpwsystem by Jack) system(cmd, infile = None, outfile = None, errfile = None) 1. Every call to system sets "lastStatus" and "lastOutput" to the status and output produced by the command when executed in ToolServer. (lastParameters and lastAttributes are set to the values of the AppleEvent result.) 2. system returns lastStatus unless the command result indicates a MacOS error, in which case os.Error is raised with the errnum as associated value. 3. You can specify ToolServer-understandable pathnames for redirection of input, output, and error streams. By default, input is Dev:Null, output is captured and returned to the caller, diagnostics are captured and returned to the caller. (There's a 64K limit to how much can be captured and returned this way.)""" import os import aetools try: server except NameError: server = aetools.TalkTo("MPSX", 1) lastStatus = None lastOutput = None lastErrorOutput = None lastScript = None lastEvent = None lastReply = None lastParameters = None lastAttributes = None def system(cmd, infile = None, outfile = None, errfile = None): global lastStatus, lastOutput, lastErrorOutput global lastScript, lastEvent, lastReply, lastParameters, lastAttributes cmdline = cmd if infile: cmdline += " <" + infile if outfile: cmdline += " >" + outfile if errfile: cmdline += " " + str(chr(179)) + errfile lastScript = "set Exit 0\r" + cmdline + "\rexit {Status}" lastEvent = server.newevent("misc", "dosc", {"----" : lastScript}) (lastReply, lastParameters, lastAttributes) = server.sendevent(lastEvent) if lastParameters.has_key('stat'): lastStatus = lastParameters['stat'] else: lastStatus = None if lastParameters.has_key('----'): lastOutput = lastParameters['----'] else: lastOutput = None if lastParameters.has_key('diag'): lastErrorOutput = lastParameters['diag'] else: lastErrorOutput = None if lastParameters['errn'] != 0: raise os.Error, lastParameters['errn'] return lastStatus if __name__ == '__main__': sts = system('alert "Hello World"') print 'system returned', sts From tim_one@users.sourceforge.net Mon Dec 3 00:43:35 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Sun, 02 Dec 2001 16:43:35 -0800 Subject: [Python-checkins] CVS: python/dist/src/Include pyerrors.h,2.52,2.53 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory usw-pr-cvs1:/tmp/cvs-serv19336/python/Include Modified Files: pyerrors.h Log Message: mysnprintf.c: Massive rewrite of PyOS_snprintf and PyOS_vsnprintf, to use wrappers on all platforms, to make this as consistent as possible x- platform (in particular, make sure there's at least one \0 byte in the output buffer). Also document more of the truth about what these do. getargs.c, seterror(): Three computations of remaining buffer size were backwards, thus telling PyOS_snprintf the buffer is larger than it actually is. This matters a lot now that PyOS_snprintf ensures there's a trailing \0 byte (because it didn't get the truth about the buffer size, it was storing \0 beyond the true end of the buffer). sysmodule.c, mywrite(): Simplify, now that PyOS_vsnprintf guarantees to produce a \0 byte. Index: pyerrors.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/pyerrors.h,v retrieving revision 2.52 retrieving revision 2.53 diff -C2 -d -r2.52 -r2.53 *** pyerrors.h 2001/11/28 16:51:49 2.52 --- pyerrors.h 2001/12/03 00:43:33 2.53 *************** *** 124,128 **** #endif - #ifndef HAVE_SNPRINTF #include extern DL_IMPORT(int) PyOS_snprintf(char *str, size_t size, const char *format, ...) --- 124,127 ---- *************** *** 130,137 **** extern DL_IMPORT(int) PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va) __attribute__((format(printf, 3, 0))); - #else - # define PyOS_vsnprintf vsnprintf - # define PyOS_snprintf snprintf - #endif #ifdef __cplusplus --- 129,132 ---- From tim_one@users.sourceforge.net Mon Dec 3 00:43:35 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Sun, 02 Dec 2001 16:43:35 -0800 Subject: [Python-checkins] CVS: python/dist/src/Python getargs.c,2.89,2.90 mysnprintf.c,2.3,2.4 sysmodule.c,2.97,2.98 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory usw-pr-cvs1:/tmp/cvs-serv19336/python/Python Modified Files: getargs.c mysnprintf.c sysmodule.c Log Message: mysnprintf.c: Massive rewrite of PyOS_snprintf and PyOS_vsnprintf, to use wrappers on all platforms, to make this as consistent as possible x- platform (in particular, make sure there's at least one \0 byte in the output buffer). Also document more of the truth about what these do. getargs.c, seterror(): Three computations of remaining buffer size were backwards, thus telling PyOS_snprintf the buffer is larger than it actually is. This matters a lot now that PyOS_snprintf ensures there's a trailing \0 byte (because it didn't get the truth about the buffer size, it was storing \0 beyond the true end of the buffer). sysmodule.c, mywrite(): Simplify, now that PyOS_vsnprintf guarantees to produce a \0 byte. Index: getargs.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/getargs.c,v retrieving revision 2.89 retrieving revision 2.90 diff -C2 -d -r2.89 -r2.90 *** getargs.c 2001/11/29 03:26:37 2.89 --- getargs.c 2001/12/03 00:43:33 2.90 *************** *** 232,236 **** } if (iarg != 0) { ! PyOS_snprintf(p, sizeof(buf) - (buf - p), "argument %d", iarg); i = 0; --- 232,236 ---- } if (iarg != 0) { ! PyOS_snprintf(p, sizeof(buf) - (p - buf), "argument %d", iarg); i = 0; *************** *** 244,251 **** } else { ! PyOS_snprintf(p, sizeof(buf) - (buf - p), "argument"); p += strlen(p); } ! PyOS_snprintf(p, sizeof(buf) - (buf - p), " %.256s", msg); message = buf; } --- 244,251 ---- } else { ! PyOS_snprintf(p, sizeof(buf) - (p - buf), "argument"); p += strlen(p); } ! PyOS_snprintf(p, sizeof(buf) - (p - buf), " %.256s", msg); message = buf; } Index: mysnprintf.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/mysnprintf.c,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -d -r2.3 -r2.4 *** mysnprintf.c 2001/12/01 16:00:10 2.3 --- mysnprintf.c 2001/12/03 00:43:33 2.4 *************** *** 1,97 **** - #include "Python.h" ! /* snprintf() emulation for platforms which don't have it (yet). ! ! Return value ! The number of characters printed (not including the trailing ! `\0' used to end output to strings) or a negative number in ! case of an error. ! PyOS_snprintf and PyOS_vsnprintf do not write more than size ! bytes (including the trailing '\0'). ! If the output would have been truncated, they return the number ! of characters (excluding the trailing '\0') which would have ! been written to the final string if enough space had been ! available. This is inline with the C99 standard. ! */ ! #include ! #ifndef HAVE_SNPRINTF ! static ! int myvsnprintf(char *str, size_t size, const char *format, va_list va) ! { ! char *buffer = PyMem_Malloc(size + 512); ! int len; ! ! if (buffer == NULL) ! return -1; ! len = vsprintf(buffer, format, va); ! if (len < 0) { ! PyMem_Free(buffer); ! return len; ! } ! len++; ! assert(len >= 0); ! if ((size_t)len > size + 512) ! Py_FatalError("Buffer overflow in PyOS_snprintf/PyOS_vsnprintf"); ! if ((size_t)len > size) ! buffer[size-1] = '\0'; ! else ! size = len; ! memcpy(str, buffer, size); ! PyMem_Free(buffer); ! return len - 1; ! } ! int PyOS_snprintf(char *str, size_t size, const char *format, ...) { ! int rc; ! va_list va; ! va_start(va, format); ! rc = myvsnprintf(str, size, format, va); ! va_end(va); ! return rc; } ! int PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va) { ! return myvsnprintf(str, size, format, va); ! } #else ! ! /* Make sure that a C API is included in the lib */ ! ! #ifdef PyOS_snprintf ! # undef PyOS_snprintf ! #endif ! int PyOS_snprintf(char *str, size_t size, const char *format, ...) ! { ! int rc; ! va_list va; ! va_start(va, format); ! rc = vsnprintf(str, size, format, va); ! va_end(va); ! return rc; ! } ! #ifdef PyOS_vsnprintf ! # undef PyOS_vsnprintf #endif ! ! int PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va) ! { ! return vsnprintf(str, size, format, va); } - - #endif - --- 1,93 ---- #include "Python.h" + #include ! /* snprintf() wrappers. If the platform has vsnprintf, we use it, else we ! emulate it in a half-hearted way. Even if the platform has it, we wrap ! it because platforms differ in what vsnprintf does in case the buffer ! is too small: C99 behavior is to return the number of characters that ! would have been written had the buffer not been too small, and to set ! the last byte of the buffer to \0. At least MS _vsnprintf returns a ! negative value instead, and fills the entire buffer with non-\0 data. ! The wrappers ensure that str[size-1] is always \0 upon return. ! PyOS_snprintf and PyOS_vsnprintf never write more than size bytes ! (including the trailing '\0') into str. ! If the platform doesn't have vsnprintf, and the buffer size needed to ! avoid truncation exceeds size by more than 512, Python aborts with a ! Py_FatalError. ! Return value (rv): ! When 0 <= rv < size, the output conversion was unexceptional, and ! rv characters were written to str (excluding a trailing \0 byte at ! str[rv]). ! When rv >= size, output conversion was truncated, and a buffer of ! size rv+1 would have been needed to avoid truncation. str[size-1] ! is \0 in this case. ! When rv < 0, "something bad happened". str[size-1] is \0 in this ! case too, but the rest of str is unreliable. It could be that ! an error in format codes was detected by libc, or on platforms ! with a non-C99 vsnprintf simply that the buffer wasn't big enough ! to avoid truncation, or on platforms without any vsnprintf that ! PyMem_Malloc couldn't obtain space for a temp buffer. ! CAUTION: Unlike C99, str != NULL and size > 0 are required. ! */ ! ! int ! PyOS_snprintf(char *str, size_t size, const char *format, ...) { ! int rc; ! va_list va; ! va_start(va, format); ! rc = PyOS_vsnprintf(str, size, format, va); ! va_end(va); ! return rc; } ! int ! PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va) { ! int len; /* # bytes written, excluding \0 */ ! #ifndef HAVE_SNPRINTF ! char *buffer; ! #endif ! assert(str != NULL); ! assert(size > 0); ! assert(format != NULL); + #ifdef HAVE_SNPRINTF + len = vsnprintf(str, size, format, va); #else ! /* Emulate it. */ ! buffer = PyMem_Malloc(size + 512); ! if (buffer == NULL) { ! len = -666; ! goto Done; ! } ! len = vsprintf(buffer, format, va); ! if (len < 0) ! /* ignore the error */; ! else if ((size_t)len >= size + 512) ! Py_FatalError("Buffer overflow in PyOS_snprintf/PyOS_vsnprintf"); ! else { ! const size_t to_copy = (size_t)len < size ? ! (size_t)len : size - 1; ! assert(to_copy < size); ! memcpy(str, buffer, to_copy); ! str[to_copy] = '\0'; ! } ! PyMem_Free(buffer); ! Done: #endif ! str[size-1] = '\0'; ! return len; } Index: sysmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/sysmodule.c,v retrieving revision 2.97 retrieving revision 2.98 diff -C2 -d -r2.97 -r2.98 *** sysmodule.c 2001/12/02 08:29:16 2.97 --- sysmodule.c 2001/12/03 00:43:33 2.98 *************** *** 1026,1041 **** const int written = PyOS_vsnprintf(buffer, sizeof(buffer), format, va); - const int trouble = written < 0 || written >= sizeof(buffer); - if (trouble) { - /* Ensure there's a trailing null byte -- MS - vsnprintf fills the buffer to the very end - if it's not big enough. */ - buffer[sizeof(buffer) - 1] = '\0'; - } if (PyFile_WriteString(buffer, file) != 0) { PyErr_Clear(); fputs(buffer, fp); } ! if (trouble) { const char *truncated = "... truncated"; if (PyFile_WriteString(truncated, file) != 0) { --- 1026,1034 ---- const int written = PyOS_vsnprintf(buffer, sizeof(buffer), format, va); if (PyFile_WriteString(buffer, file) != 0) { PyErr_Clear(); fputs(buffer, fp); } ! if (written < 0 || written >= sizeof(buffer)) { const char *truncated = "... truncated"; if (PyFile_WriteString(truncated, file) != 0) { From gvanrossum@users.sourceforge.net Mon Dec 3 00:54:54 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Sun, 02 Dec 2001 16:54:54 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.322,1.323 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv22008 Modified Files: NEWS Log Message: Fix for SF bug #485678. slot_tp_descr_set(): When deleting an attribute described by a descriptor implemented in Python, the descriptor's __del__ method is called by the slot_tp_descr_set dispatch function. This is bogus -- __del__ already has a different meaning. Renaming this use of __del__ is renamed to __delete__. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.322 retrieving revision 1.323 diff -C2 -d -r1.322 -r1.323 *** NEWS 2001/12/02 12:26:03 1.322 --- NEWS 2001/12/03 00:54:52 1.323 *************** *** 5,8 **** --- 5,14 ---- Type/class unification and new-style classes + - The "delete attribute" method of descriptor objects is called + __delete__, not __del__. In previous releases, it was mistakenly + called __del__, which created an unfortunate overloading condition + with finalizers. (The "get attribute" and "set attribute" methods + are still called __get__ and __set__, respectively.) + Core and builtins From tim.one@home.com Mon Dec 3 01:07:32 2001 From: tim.one@home.com (Tim Peters) Date: Sun, 2 Dec 2001 20:07:32 -0500 Subject: [Python-checkins] CVS: python/dist/src/Python sysmodule.c,2.96,2.97 In-Reply-To: <3C0A0004.97A8E339@lemburg.com> Message-ID: [M.-A. Lemburg] > Wouldn't it be bette to put this code into PyOS_vsnprintf() > for both cases (snprintf available/not available) ? Yes, and I just checked in rewrites of those guys to do this. From tim_one@users.sourceforge.net Mon Dec 3 01:55:40 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Sun, 02 Dec 2001 17:55:40 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.142,2.143 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv31521/python/Objects Modified Files: stringobject.c Log Message: PyString_FromFormatV, string_repr: document why these use sprintf instead of PyOS_snprintf; add some relevant comments and asserts. Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.142 retrieving revision 2.143 diff -C2 -d -r2.142 -r2.143 *** stringobject.c 2001/12/02 18:09:41 2.142 --- stringobject.c 2001/12/03 01:55:38 2.143 *************** *** 180,184 **** width. although only %d is supported (see "expand" section below), others can be easily ! add */ if (*f == 'l' && *(f+1) == 'd') ++f; --- 180,184 ---- width. although only %d is supported (see "expand" section below), others can be easily ! added */ if (*f == 'l' && *(f+1) == 'd') ++f; *************** *** 193,198 **** case 'd': case 'i': case 'x': (void) va_arg(count, int); ! /* 20 bytes should be enough to hold a 64-bit ! integer */ n += 20; break; --- 193,199 ---- case 'd': case 'i': case 'x': (void) va_arg(count, int); ! /* 20 bytes is enough to hold a 64-bit ! integer. Decimal takes the most space. ! This isn't enough for octal. */ n += 20; break; *************** *** 206,209 **** --- 207,211 ---- * 0xffffffffffffffff * so 19 characters is enough. + * XXX I count 18 -- what's the extra for? */ n += 19; *************** *** 224,227 **** --- 226,231 ---- expand: /* step 2: fill the buffer */ + /* Since we've analyzed how much space we need for the worst case, + use sprintf directly instead of the slower PyOS_snprintf. */ string = PyString_FromStringAndSize(NULL, n); if (!string) *************** *** 641,647 **** quote = '"'; ! p = ((PyStringObject *)v)->ob_sval; *p++ = quote; for (i = 0; i < op->ob_size; i++) { c = op->ob_sval[i]; if (c == quote || c == '\\') --- 645,654 ---- quote = '"'; ! p = PyString_AS_STRING(v); *p++ = quote; for (i = 0; i < op->ob_size; i++) { + /* There's at least enough room for a hex escape + and a closing quote. */ + assert(newsize - (p - PyString_AS_STRING(v)) >= 5); c = op->ob_sval[i]; if (c == quote || c == '\\') *************** *** 654,657 **** --- 661,667 ---- *p++ = '\\', *p++ = 'r'; else if (c < ' ' || c >= 0x7f) { + /* For performance, we don't want to call + PyOS_snprintf here (extra layers of + function call). */ sprintf(p, "\\x%02x", c & 0xff); p += 4; *************** *** 660,667 **** *p++ = c; } *p++ = quote; *p = '\0'; _PyString_Resize( ! &v, (int) (p - ((PyStringObject *)v)->ob_sval)); return v; } --- 670,678 ---- *p++ = c; } + assert(newsize - (p - PyString_AS_STRING(v)) >= 1); *p++ = quote; *p = '\0'; _PyString_Resize( ! &v, (int) (p - PyString_AS_STRING(v))); return v; } From fdrake@users.sourceforge.net Mon Dec 3 06:12:25 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Sun, 02 Dec 2001 22:12:25 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib tkinter.tex,1.7,1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv9334/lib Modified Files: tkinter.tex Log Message: Clean up some material that is not part of the standard documentation. This closes SF bug #487308. Index: tkinter.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/tkinter.tex,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tkinter.tex 2001/11/30 19:24:49 1.7 --- tkinter.tex 2001/12/03 06:12:23 1.8 *************** *** 247,259 **** \end{verbatim} - \ifhtml - \subsection{An Overview of The Tkinter Classes} % TkClassHier.html ! %begin{latexonly} ! %\begin{figure}[hbtp] ! %\centerline{\epsfig{file=TkClassHier.gif,width=.9\textwidth}} ! %\caption{Class Hierarchy Image} ! %\end{figure} ! %end{latexonly} The class hierarchy looks complicated, but in actual practice, --- 247,252 ---- \end{verbatim} ! \subsection{A (Very) Quick Look at Tcl/Tk} % BriefTclTk.html The class hierarchy looks complicated, but in actual practice, *************** *** 261,291 **** bottom of the hierarchy. - Here are links to the interfaces for each of the concrete widgets: - - \begin{itemize} - \item \citetitle[classes/ClassButton.html]{Button} - \item \citetitle[classes/ClassCanvas.html]{Canvas} - \item \citetitle[classes/ClassCheckbutton.html]{Checkbutton} - \item \citetitle[classes/ClassEntry.html]{Entry} - \item \citetitle[classes/ClassFrame.html]{Frame} - \item \citetitle[classes/ClassLabel.html]{Label} - \item \citetitle[classes/ClassListbox.html]{Listbox} - \item \citetitle[classes/ClassMenu.html]{Menu} - \item \citetitle[classes/ClassMenubutton.html]{Menubutton} - \item \citetitle[classes/ClassMessage.html]{Message} - \item \citetitle[classes/ClassMisc.html]{*Misc} - \item \citetitle[classes/ClassPacker.html]{*Pack} - \item \citetitle[classes/ClassPlacer.html]{*Place} - \item \citetitle[classes/ClassRadiobutton.html]{Radiobutton} - \item \citetitle[classes/ClassScale.html]{Scale} - \item \citetitle[classes/ClassScrollbar.html]{Scrollbar} - \item \citetitle[classes/ClassText.html]{Text} - \item \citetitle[classes/ClassTk.html]{**Tk} - \item \citetitle[classes/ClassToplevel.html]{Toplevel} - \item \citetitle[classes/ClassWidget.html]{***Widget} - \item \citetitle[classes/ClassWm.html]{*Wm} - \end{itemize} - - Notes: \begin{itemize} --- 254,257 ---- *************** *** 293,308 **** organizing certain functions under one namespace. They aren't meant to be instantiated independently. ! \item The Tk class is meant to be instantiated only once in an application. Application programmers need not instantiate one explicitly, the system creates one whenever any of the other classes are instantiated. - \item The Widget class is not meant to be instantiated, it - is meant only for subclassing to make ``real'' widgets. (in \Cpp, this - is called an `abstract class') - \end{itemize} - \fi ! ! \subsection{A (Very) Quick Look at Tcl/Tk} % BriefTclTk.html To make use of this reference material, there will be times when you --- 259,272 ---- organizing certain functions under one namespace. They aren't meant to be instantiated independently. ! ! \item The \class{Tk} class is meant to be instantiated only once in an application. Application programmers need not instantiate one explicitly, the system creates one whenever any of the other classes are instantiated. ! \item The \class{Widget} class is not meant to be instantiated, it ! is meant only for subclassing to make ``real'' widgets (in \Cpp, this ! is called an `abstract class'). ! \end{itemize} To make use of this reference material, there will be times when you From loewis@users.sourceforge.net Mon Dec 3 08:24:54 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Mon, 03 Dec 2001 00:24:54 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects stringobject.c,2.143,2.144 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv32612 Modified Files: stringobject.c Log Message: Add more inline documentation, as contributed in #487906. Index: stringobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v retrieving revision 2.143 retrieving revision 2.144 diff -C2 -d -r2.143 -r2.144 *** stringobject.c 2001/12/03 01:55:38 2.143 --- stringobject.c 2001/12/03 08:24:52 2.144 *************** *** 34,40 **** even more sharing of objects. ! The parameter `size' denotes number of characters to allocate, not counting ! the null terminating character. If the `str' argument is not NULL, then it ! must point to a null-terminated string of length `size'. The member `op->ob_size' denotes the number of bytes of data in the string, --- 34,45 ---- even more sharing of objects. ! The string in the `str' parameter does not have to be null-character ! terminated. (Therefore it is safe to construct a substring by using ! `PyString_FromStringAndSize(origstring, substrlen)'.) ! ! The parameter `size' denotes number of characters to allocate, not ! counting the null terminating character. If the `str' argument is ! not NULL, then it points to a of length `size'. For ! PyString_FromString, this string must be null-terminated. The member `op->ob_size' denotes the number of bytes of data in the string, From gvanrossum@users.sourceforge.net Mon Dec 3 15:36:30 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Mon, 03 Dec 2001 07:36:30 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects typeobject.c,2.119,2.120 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv7905 Modified Files: typeobject.c Log Message: Address SF patch #480716 as well as related issues. SF patch #480716 by Greg Chapman fixes the problem that super's __get__ method always returns an instance of super, even when the instance whose __get__ method is called is an instance of a subclass of super. Other issues fixed: - super(C, C()).__class__ would return the __class__ attribute of C() rather than the __class__ attribute of the super object. This is confusing. To fix this, I decided to change the semantics of super so that it only applies to code attributes, not to data attributes. After all, overriding data attributes is not supported anyway. - While super(C, x) carefully checked that x is an instance of C, super(C).__get__(x) made no such check, allowing for a loophole. This is now fixed. Index: typeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v retrieving revision 2.119 retrieving revision 2.120 diff -C2 -d -r2.119 -r2.120 *** typeobject.c 2001/12/03 00:08:33 2.119 --- typeobject.c 2001/12/03 15:36:28 2.120 *************** *** 3930,3934 **** continue; res = PyDict_GetItem(dict, name); ! if (res != NULL) { Py_INCREF(res); f = res->ob_type->tp_descr_get; --- 3930,3934 ---- continue; res = PyDict_GetItem(dict, name); ! if (res != NULL && !PyDescr_IsData(res)) { Py_INCREF(res); f = res->ob_type->tp_descr_get; *************** *** 3945,3948 **** --- 3945,3963 ---- } + static int + supercheck(PyTypeObject *type, PyObject *obj) + { + if (!PyType_IsSubtype(obj->ob_type, type) && + !(PyType_Check(obj) && + PyType_IsSubtype((PyTypeObject *)obj, type))) { + PyErr_SetString(PyExc_TypeError, + "super(type, obj): " + "obj must be an instance or subtype of type"); + return -1; + } + else + return 0; + } + static PyObject * super_descr_get(PyObject *self, PyObject *obj, PyObject *type) *************** *** 3956,3967 **** return self; } ! new = (superobject *)PySuper_Type.tp_new(&PySuper_Type, NULL, NULL); ! if (new == NULL) ! return NULL; ! Py_INCREF(su->type); ! Py_INCREF(obj); ! new->type = su->type; ! new->obj = obj; ! return (PyObject *)new; } --- 3971,3993 ---- return self; } ! if (su->ob_type != &PySuper_Type) ! /* If su is an instance of a subclass of super, ! call its type */ ! return PyObject_CallFunction((PyObject *)su->ob_type, ! "OO", su->type, obj); ! else { ! /* Inline the common case */ ! if (supercheck(su->type, obj) < 0) ! return NULL; ! new = (superobject *)PySuper_Type.tp_new(&PySuper_Type, ! NULL, NULL); ! if (new == NULL) ! return NULL; ! Py_INCREF(su->type); ! Py_INCREF(obj); ! new->type = su->type; ! new->obj = obj; ! return (PyObject *)new; ! } } *************** *** 3977,3989 **** if (obj == Py_None) obj = NULL; ! if (obj != NULL && ! !PyType_IsSubtype(obj->ob_type, type) && ! !(PyType_Check(obj) && ! PyType_IsSubtype((PyTypeObject *)obj, type))) { ! PyErr_SetString(PyExc_TypeError, ! "super(type, obj): " ! "obj must be an instance or subtype of type"); return -1; - } Py_INCREF(type); Py_XINCREF(obj); --- 4003,4008 ---- if (obj == Py_None) obj = NULL; ! if (obj != NULL && supercheck(type, obj) < 0) return -1; Py_INCREF(type); Py_XINCREF(obj); From gvanrossum@users.sourceforge.net Mon Dec 3 15:37:42 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Mon, 03 Dec 2001 07:37:42 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc ACKS,1.138,1.139 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv8348 Modified Files: ACKS Log Message: Add Greg Chapman. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.138 retrieving revision 1.139 diff -C2 -d -r1.138 -r1.139 *** ACKS 2001/11/27 20:30:42 1.138 --- ACKS 2001/12/03 15:37:40 1.139 *************** *** 75,78 **** --- 75,79 ---- Jeffrey Chang Brad Chapman + Greg Chapman Mitch Chapman David Chaum From gvanrossum@users.sourceforge.net Mon Dec 3 15:38:30 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Mon, 03 Dec 2001 07:38:30 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_descr.py,1.105,1.106 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv8575 Modified Files: test_descr.py Log Message: Address SF patch #480716 as well as related issues. SF patch #480716 by Greg Chapman fixes the problem that super's __get__ method always returns an instance of super, even when the instance whose __get__ method is called is an instance of a subclass of super. Other issues fixed: - super(C, C()).__class__ would return the __class__ attribute of C() rather than the __class__ attribute of the super object. This is confusing. To fix this, I decided to change the semantics of super so that it only applies to code attributes, not to data attributes. After all, overriding data attributes is not supported anyway. - While super(C, x) carefully checked that x is an instance of C, super(C).__get__(x) made no such check, allowing for a loophole. This is now fixed. Index: test_descr.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -d -r1.105 -r1.106 *** test_descr.py 2001/11/24 21:07:01 1.105 --- test_descr.py 2001/12/03 15:38:28 1.106 *************** *** 1573,1577 **** return "D(%r)" % a + super(D, self).meth(a) ! verify (D().meth(4) == "D(4)C(4)B(4)A(4)") def inherits(): --- 1573,1627 ---- return "D(%r)" % a + super(D, self).meth(a) ! vereq(D().meth(4), "D(4)C(4)B(4)A(4)") ! ! # Test for subclassing super ! ! class mysuper(super): ! def __init__(self, *args): ! return super(mysuper, self).__init__(*args) ! ! class E(D): ! def meth(self, a): ! return "E(%r)" % a + mysuper(E, self).meth(a) ! ! vereq(E().meth(5), "E(5)D(5)C(5)B(5)A(5)") ! ! class F(E): ! def meth(self, a): ! s = self.__super ! return "F(%r)[%s]" % (a, s.__class__.__name__) + s.meth(a) ! F._F__super = mysuper(F) ! ! vereq(F().meth(6), "F(6)[mysuper]E(6)D(6)C(6)B(6)A(6)") ! ! # Make sure certain errors are raised ! ! try: ! super(D, 42) ! except TypeError: ! pass ! else: ! raise TestFailed, "shouldn't allow super(D, 42)" ! ! try: ! super(D, C()) ! except TypeError: ! pass ! else: ! raise TestFailed, "shouldn't allow super(D, C())" ! ! try: ! super(D).__get__(12) ! except TypeError: ! pass ! else: ! raise TestFailed, "shouldn't allow super(D).__get__(12)" ! ! try: ! super(D).__get__(C()) ! except TypeError: ! pass ! else: ! raise TestFailed, "shouldn't allow super(D).__get__(C())" def inherits(): From jackjansen@users.sourceforge.net Mon Dec 3 15:44:19 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Mon, 03 Dec 2001 07:44:19 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib webbrowser.py,1.23,1.24 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv10690/python/Lib Modified Files: webbrowser.py Log Message: Missing comma in tuple initializer caused webbrowser.open() not to work at all in MacPython. (why did noone ever notice this?) Index: webbrowser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/webbrowser.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** webbrowser.py 2001/11/25 14:35:58 1.23 --- webbrowser.py 2001/12/03 15:44:17 1.24 *************** *** 297,301 **** # internet-config is the only supported controller on MacOS, # so don't mess with the default! ! _tryorder = ("internet-config") register("internet-config", InternetConfig) --- 297,301 ---- # internet-config is the only supported controller on MacOS, # so don't mess with the default! ! _tryorder = ("internet-config", ) register("internet-config", InternetConfig) From gvanrossum@users.sourceforge.net Mon Dec 3 15:47:02 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Mon, 03 Dec 2001 07:47:02 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.323,1.324 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv11421 Modified Files: NEWS Log Message: New about super. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.323 retrieving revision 1.324 diff -C2 -d -r1.323 -r1.324 *** NEWS 2001/12/03 00:54:52 1.323 --- NEWS 2001/12/03 15:46:59 1.324 *************** *** 11,14 **** --- 11,29 ---- are still called __get__ and __set__, respectively.) + - Some subtle issues with the super built-in were fixed: + + (a) When super itself is subclassed, its __get__ method would still + return an instance of the base class (i.e., of super). + + (b) super(C, C()).__class__ would return C rather than super. This + is confusing. To fix this, I decided to change the semantics of + super so that it only applies to code attributes, not to data + attributes. After all, overriding data attributes is not + supported anyway. + + (c) The __get__ method didn't check whether the argument was an + instance of the type used in creation of the super instance. + + Core and builtins From gvanrossum@users.sourceforge.net Mon Dec 3 15:51:33 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Mon, 03 Dec 2001 07:51:33 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib webbrowser.py,1.24,1.25 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv12845 Modified Files: webbrowser.py Log Message: _tryorder should always be a list, then the problem Jack had to fix in 1.24 wouldn't have occurred in the first place. Remove a debug print command accidentally inserted by Martin in 1.23. Index: webbrowser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/webbrowser.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** webbrowser.py 2001/12/03 15:44:17 1.24 --- webbrowser.py 2001/12/03 15:51:31 1.25 *************** *** 117,121 **** raise_opt, action) - print cmd rc = os.system(cmd) if rc: --- 117,120 ---- *************** *** 234,238 **** # an xterm. if os.environ.get("TERM") or os.environ.get("DISPLAY"): ! _tryorder = ("mozilla","netscape","kfm","grail","links","lynx","w3m") # Easy cases first -- register console browsers if we have them. --- 233,237 ---- # an xterm. if os.environ.get("TERM") or os.environ.get("DISPLAY"): ! _tryorder = ["mozilla","netscape","kfm","grail","links","lynx","w3m"] # Easy cases first -- register console browsers if we have them. *************** *** 283,287 **** if sys.platform[:3] == "win": ! _tryorder = ("netscape", "windows-default") register("windows-default", WindowsDefault) --- 282,286 ---- if sys.platform[:3] == "win": ! _tryorder = ["netscape", "windows-default"] register("windows-default", WindowsDefault) *************** *** 297,301 **** # internet-config is the only supported controller on MacOS, # so don't mess with the default! ! _tryorder = ("internet-config", ) register("internet-config", InternetConfig) --- 296,300 ---- # internet-config is the only supported controller on MacOS, # so don't mess with the default! ! _tryorder = ["internet-config"] register("internet-config", InternetConfig) *************** *** 305,309 **** if sys.platform[:3] == "os2" and _iscommand("netscape.exe"): ! _tryorder = ("os2netscape",) register("os2netscape", None, GenericBrowser("start netscape.exe %s")) --- 304,308 ---- if sys.platform[:3] == "os2" and _iscommand("netscape.exe"): ! _tryorder = ["os2netscape"] register("os2netscape", None, GenericBrowser("start netscape.exe %s")) From gvanrossum@users.sourceforge.net Mon Dec 3 16:32:20 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Mon, 03 Dec 2001 08:32:20 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_descr.py,1.106,1.107 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv25230/Lib/test Modified Files: test_descr.py Log Message: Fix of SF bug #475877 (Mutable subtype instances are hashable). Rather than tweaking the inheritance of type object slots (which turns out to be too messy to try), this fix adds a __hash__ to the list and dict types (the only mutable types I'm aware of) that explicitly raises an error. This has the advantage that list.__hash__([]) also raises an error (previously, this would invoke object.__hash__([]), returning the argument's address); ditto for dict.__hash__. The disadvantage for this fix is that 3rd party mutable types aren't automatically fixed. This should be added to the rules for creating subclassable extension types: if you don't want your object to be hashable, add a tp_hash function that raises an exception. Also, it's possible that I've forgotten about other mutable types for which this should be done. Index: test_descr.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -d -r1.106 -r1.107 *** test_descr.py 2001/12/03 15:38:28 1.106 --- test_descr.py 2001/12/03 16:32:17 1.107 *************** *** 2572,2575 **** --- 2572,2598 ---- vereq(log, [1]) + def hashinherit(): + if verbose: print "Testing hash of mutable subclasses..." + + class mydict(dict): + pass + d = mydict() + try: + hash(d) + except TypeError: + pass + else: + raise TestFailed, "hash() of dict subclass should fail" + + class mylist(list): + pass + d = mylist() + try: + hash(d) + except TypeError: + pass + else: + raise TestFailed, "hash() of list subclass should fail" + def test_main(): class_docstrings() *************** *** 2624,2627 **** --- 2647,2651 ---- kwdargs() delhook() + hashinherit() if verbose: print "All OK" From gvanrossum@users.sourceforge.net Mon Dec 3 16:32:20 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Mon, 03 Dec 2001 08:32:20 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects dictobject.c,2.117,2.118 listobject.c,2.102,2.103 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv25230/Objects Modified Files: dictobject.c listobject.c Log Message: Fix of SF bug #475877 (Mutable subtype instances are hashable). Rather than tweaking the inheritance of type object slots (which turns out to be too messy to try), this fix adds a __hash__ to the list and dict types (the only mutable types I'm aware of) that explicitly raises an error. This has the advantage that list.__hash__([]) also raises an error (previously, this would invoke object.__hash__([]), returning the argument's address); ditto for dict.__hash__. The disadvantage for this fix is that 3rd party mutable types aren't automatically fixed. This should be added to the rules for creating subclassable extension types: if you don't want your object to be hashable, add a tp_hash function that raises an exception. Also, it's possible that I've forgotten about other mutable types for which this should be done. Index: dictobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v retrieving revision 2.117 retrieving revision 2.118 diff -C2 -d -r2.117 -r2.118 *** dictobject.c 2001/10/29 22:25:44 2.117 --- dictobject.c 2001/12/03 16:32:18 2.118 *************** *** 1798,1801 **** --- 1798,1808 ---- } + static long + dict_nohash(PyObject *self) + { + PyErr_SetString(PyExc_TypeError, "dict objects are unhashable"); + return -1; + } + static PyObject * dict_iter(dictobject *dict) *************** *** 1828,1832 **** &dict_as_sequence, /* tp_as_sequence */ &dict_as_mapping, /* tp_as_mapping */ ! 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ --- 1835,1839 ---- &dict_as_sequence, /* tp_as_sequence */ &dict_as_mapping, /* tp_as_mapping */ ! dict_nohash, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ Index: listobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v retrieving revision 2.102 retrieving revision 2.103 diff -C2 -d -r2.102 -r2.103 *** listobject.c 2001/10/05 20:51:38 2.102 --- listobject.c 2001/12/03 16:32:18 2.103 *************** *** 1618,1621 **** --- 1618,1628 ---- } + static long + list_nohash(PyObject *self) + { + PyErr_SetString(PyExc_TypeError, "list objects are unhashable"); + return -1; + } + static char append_doc[] = "L.append(object) -- append object to end"; *************** *** 1682,1686 **** &list_as_sequence, /* tp_as_sequence */ 0, /* tp_as_mapping */ ! 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ --- 1689,1693 ---- &list_as_sequence, /* tp_as_sequence */ 0, /* tp_as_mapping */ ! list_nohash, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ *************** *** 1772,1776 **** &immutable_list_as_sequence, /* tp_as_sequence */ 0, /* tp_as_mapping */ ! 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ --- 1779,1783 ---- &immutable_list_as_sequence, /* tp_as_sequence */ 0, /* tp_as_mapping */ ! list_nohash, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ From fdrake@users.sourceforge.net Mon Dec 3 16:36:45 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Mon, 03 Dec 2001 08:36:45 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/api exceptions.tex,1.1,1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/api In directory usw-pr-cvs1:/tmp/cvs-serv28145/api Modified Files: exceptions.tex Log Message: PyErr_Format() does not return a new reference; it always returns NULL. This closes SF bug #488387. Index: exceptions.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/exceptions.tex,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** exceptions.tex 2001/10/12 19:01:43 1.1 --- exceptions.tex 2001/12/03 16:36:43 1.2 *************** *** 122,130 **** \begin{cfuncdesc}{PyObject*}{PyErr_Format}{PyObject *exception, const char *format, \moreargs} ! This function sets the error indicator. \var{exception} should be a ! Python exception (string or class, not an instance). \var{format} ! should be a string, containing format codes, similar to ! \cfunction{printf()}. The \code{width.precision} before a format ! code is parsed, but the width part is ignored. \begin{tableii}{c|l}{character}{Character}{Meaning} --- 122,130 ---- \begin{cfuncdesc}{PyObject*}{PyErr_Format}{PyObject *exception, const char *format, \moreargs} ! This function sets the error indicator and returns \NULL.. ! \var{exception} should be a Python exception (string or class, not ! an instance). \var{format} should be a string, containing format ! codes, similar to \cfunction{printf()}. The \code{width.precision} ! before a format code is parsed, but the width part is ignored. \begin{tableii}{c|l}{character}{Character}{Meaning} *************** *** 138,143 **** string to be copied as-is to the result string, and any extra arguments discarded. - - A new reference is returned, which is owned by the caller. \end{cfuncdesc} --- 138,141 ---- From fdrake@users.sourceforge.net Mon Dec 3 16:44:11 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Mon, 03 Dec 2001 08:44:11 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_htmlparser.py,1.7,1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv30752 Modified Files: test_htmlparser.py Log Message: Add a test that makes sure unclosed entity references are handled consitently. Index: test_htmlparser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_htmlparser.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_htmlparser.py 2001/09/24 20:19:08 1.7 --- test_htmlparser.py 2001/12/03 16:44:09 1.8 *************** *** 135,138 **** --- 135,144 ---- ]) + def test_unclosed_entityref(self): + self._run_check("&entityref foo", [ + ("entityref", "entityref"), + ("data", " foo"), + ]) + def test_doctype_decl(self): inside = """\ From fdrake@users.sourceforge.net Mon Dec 3 17:09:53 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Mon, 03 Dec 2001 09:09:53 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib HTMLParser.py,1.9,1.10 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv6260 Modified Files: HTMLParser.py Log Message: Convert to using string methods instead of the string module. In goahead(), use a bound version of rawdata.startswith() since we use the same method all the time and never change the value of rawdata. This can save a lot of bound method creation. Index: HTMLParser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/HTMLParser.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** HTMLParser.py 2001/09/24 20:10:28 1.9 --- HTMLParser.py 2001/12/03 17:09:50 1.10 *************** *** 11,15 **** import markupbase import re - import string # Regular expressions used for parsing --- 11,14 ---- *************** *** 24,28 **** starttagopen = re.compile('<[a-zA-Z]') piclose = re.compile('>') - endtagopen = re.compile('') tagfind = re.compile('[a-zA-Z][-.a-zA-Z0-9:_]*') --- 23,26 ---- *************** *** 97,101 **** """Reset this instance. Loses all unprocessed data.""" self.rawdata = '' - self.stack = [] self.lasttag = '???' self.interesting = interesting_normal --- 95,98 ---- *************** *** 146,161 **** i = self.updatepos(i, j) if i == n: break ! if rawdata[i] == '<': if starttagopen.match(rawdata, i): # < + letter k = self.parse_starttag(i) ! elif endtagopen.match(rawdata, i): # = 0: self.clear_cdata_mode() ! elif rawdata.startswith(" character Index: ref2.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref2.tex,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** ref2.tex 2001/12/04 20:38:44 1.33 --- ref2.tex 2001/12/11 17:46:38 1.34 *************** *** 196,206 **** \begin{verbatim} ! def perm(l): # error: first line indented ! for i in range(len(l)): # error: not indented ! s = l[:i] + l[i+1:] ! p = perm(l[:i] + l[i+1:]) # error: unexpected indent ! for x in p: ! r.append(l[i:i+1] + x) ! return r # error: inconsistent dedent \end{verbatim} --- 196,206 ---- \begin{verbatim} ! def perm(l): # error: first line indented ! for i in range(len(l)): # error: not indented ! s = l[:i] + l[i+1:] ! p = perm(l[:i] + l[i+1:]) # error: unexpected indent ! for x in p: ! r.append(l[i:i+1] + x) ! return r # error: inconsistent dedent \end{verbatim} *************** *** 328,332 **** {} \production{longstringchar} ! {} \production{escapeseq} {"\e" } --- 328,332 ---- {} \production{longstringchar} ! {} \production{escapeseq} {"\e" } From loewis@users.sourceforge.net Tue Dec 11 17:57:28 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Tue, 11 Dec 2001 09:57:28 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_largefile.py,1.11,1.12 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv18814 Modified Files: test_largefile.py Log Message: Ignore SIGXFSZ. Fixes #490453. Index: test_largefile.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_largefile.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** test_largefile.py 2001/09/10 15:03:48 1.11 --- test_largefile.py 2001/12/11 17:57:26 1.12 *************** *** 9,12 **** --- 9,21 ---- import os, struct, stat, sys + try: + import signal + # The default handler for SIGXFSZ is to abort the process. + # By ignoring it, system calls exceeding the file size resource + # limit will raise IOError instead of crashing the interpreter. + oldhandler = signal.signal(signal.SIGXFSZ, signal.SIG_IGN) + except (ImportError, AttributeError): + pass + # create >2GB file (2GB = 2147483648 bytes) From tim_one@users.sourceforge.net Tue Dec 11 18:51:10 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Tue, 11 Dec 2001 10:51:10 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects dictobject.c,2.118,2.119 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv2320/python/Objects Modified Files: dictobject.c Log Message: SF bug #491415 PyDict_UpdateFromSeq2() unused PyDict_UpdateFromSeq2(): removed it. PyDict_MergeFromSeq2(): made it public and documented it. PyDict_Merge() docs: updated to reveal that the second argument can be any mapping object. Index: dictobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v retrieving revision 2.118 retrieving revision 2.119 diff -C2 -d -r2.118 -r2.119 *** dictobject.c 2001/12/03 16:32:18 2.118 --- dictobject.c 2001/12/11 18:51:08 2.119 *************** *** 998,1006 **** PyDict_{Update,Merge} update/merge from a mapping object. ! PyDict_{Update,Merge}FromSeq2 update/merge from any iterable object producing iterable objects of length 2. */ ! static int PyDict_MergeFromSeq2(PyObject *d, PyObject *seq2, int override) { --- 998,1006 ---- PyDict_{Update,Merge} update/merge from a mapping object. ! PyDict_MergeFromSeq2 updates/merges from any iterable object producing iterable objects of length 2. */ ! int PyDict_MergeFromSeq2(PyObject *d, PyObject *seq2, int override) { *************** *** 1070,1079 **** Py_DECREF(it); return i; - } - - static int - PyDict_UpdateFromSeq2(PyObject *d, PyObject *seq2) - { - return PyDict_MergeFromSeq2(d, seq2, 1); } --- 1070,1073 ---- From tim_one@users.sourceforge.net Tue Dec 11 18:51:10 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Tue, 11 Dec 2001 10:51:10 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.331,1.332 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv2320/python/Misc Modified Files: NEWS Log Message: SF bug #491415 PyDict_UpdateFromSeq2() unused PyDict_UpdateFromSeq2(): removed it. PyDict_MergeFromSeq2(): made it public and documented it. PyDict_Merge() docs: updated to reveal that the second argument can be any mapping object. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.331 retrieving revision 1.332 diff -C2 -d -r1.331 -r1.332 *** NEWS 2001/12/07 20:35:42 1.331 --- NEWS 2001/12/11 18:51:08 1.332 *************** *** 76,81 **** C API - PyArg_ParseTupleAndKeywords() requires that the number of entries in ! the keyword list equals the number of argument specifiers. This wasn't checked correctly, and PyArg_ParseTupleAndKeywords could even dump core in some bad cases. This has been repaired. As a result, --- 76,85 ---- C API + - New function PyDict_MergeFromSeq2() exposes the builtin dict + constructor's logic for updating a dictionary from an iterable object + producing key-value pairs. + - PyArg_ParseTupleAndKeywords() requires that the number of entries in ! the keyword list equal the number of argument specifiers. This wasn't checked correctly, and PyArg_ParseTupleAndKeywords could even dump core in some bad cases. This has been repaired. As a result, From tim_one@users.sourceforge.net Tue Dec 11 18:51:10 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Tue, 11 Dec 2001 10:51:10 -0800 Subject: [Python-checkins] CVS: python/dist/src/Include dictobject.h,2.22,2.23 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory usw-pr-cvs1:/tmp/cvs-serv2320/python/Include Modified Files: dictobject.h Log Message: SF bug #491415 PyDict_UpdateFromSeq2() unused PyDict_UpdateFromSeq2(): removed it. PyDict_MergeFromSeq2(): made it public and documented it. PyDict_Merge() docs: updated to reveal that the second argument can be any mapping object. Index: dictobject.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/dictobject.h,v retrieving revision 2.22 retrieving revision 2.23 diff -C2 -d -r2.22 -r2.23 *** dictobject.h 2001/08/10 20:28:28 2.22 --- dictobject.h 2001/12/11 18:51:08 2.23 *************** *** 98,104 **** extern DL_IMPORT(int) PyDict_Size(PyObject *mp); extern DL_IMPORT(PyObject *) PyDict_Copy(PyObject *mp); extern DL_IMPORT(int) PyDict_Update(PyObject *mp, PyObject *other); - extern DL_IMPORT(int) PyDict_Merge(PyObject *mp, PyObject *other, int override); extern DL_IMPORT(PyObject *) PyDict_GetItemString(PyObject *dp, char *key); --- 98,122 ---- extern DL_IMPORT(int) PyDict_Size(PyObject *mp); extern DL_IMPORT(PyObject *) PyDict_Copy(PyObject *mp); + + /* PyDict_Update(mp, other) is equivalent to PyDict_Merge(mp, other, 1). */ extern DL_IMPORT(int) PyDict_Update(PyObject *mp, PyObject *other); + /* PyDict_Merge updates/merges from a mapping object (an object that + supports PyMapping_Keys() and PyObject_GetItem()). If override is true, + the last occurrence of a key wins, else the first. The Python + dict.update(other) is equivalent to PyDict_Merge(dict, other, 1). + */ + extern DL_IMPORT(int) PyDict_Merge(PyObject *mp, + PyObject *other, + int override); + + /* PyDict_MergeFromSeq2 updates/merges from an iterable object producing + iterable objects of length 2. If override is true, the last occurrence + of a key wins, else the first. The Python dict constructor dict(seq2) + is equivalent to dict={}; PyDict_MergeFromSeq(dict, seq2, 1). + */ + extern DL_IMPORT(int) PyDict_MergeFromSeq2(PyObject *d, + PyObject *seq2, + int override); extern DL_IMPORT(PyObject *) PyDict_GetItemString(PyObject *dp, char *key); From tim_one@users.sourceforge.net Tue Dec 11 18:51:10 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Tue, 11 Dec 2001 10:51:10 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/api concrete.tex,1.4,1.5 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/api In directory usw-pr-cvs1:/tmp/cvs-serv2320/python/Doc/api Modified Files: concrete.tex Log Message: SF bug #491415 PyDict_UpdateFromSeq2() unused PyDict_UpdateFromSeq2(): removed it. PyDict_MergeFromSeq2(): made it public and documented it. PyDict_Merge() docs: updated to reveal that the second argument can be any mapping object. Index: concrete.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/concrete.tex,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** concrete.tex 2001/12/06 20:36:59 1.4 --- concrete.tex 2001/12/11 18:51:08 1.5 *************** *** 19,23 **** \section{Fundamental Objects \label{fundamental}} ! This section describes Python type objects and the singleton object \code{None}. --- 19,23 ---- \section{Fundamental Objects \label{fundamental}} ! This section describes Python type objects and the singleton object \code{None}. *************** *** 93,97 **** \begin{cvardesc}{PyTypeObject}{PyInt_Type} ! This instance of \ctype{PyTypeObject} represents the Python plain integer type. This is the same object as \code{types.IntType}. \withsubitem{(in modules types)}{\ttindex{IntType}} --- 93,97 ---- \begin{cvardesc}{PyTypeObject}{PyInt_Type} ! This instance of \ctype{PyTypeObject} represents the Python plain integer type. This is the same object as \code{types.IntType}. \withsubitem{(in modules types)}{\ttindex{IntType}} *************** *** 235,239 **** \constant{ULONG_MAX}\ttindex{ULONG_MAX}, an \exception{OverflowError} is raised. ! \withsubitem{(built-in exception)}{\ttindex{OverflowError}} \end{cfuncdesc} --- 235,239 ---- \constant{ULONG_MAX}\ttindex{ULONG_MAX}, an \exception{OverflowError} is raised. ! \withsubitem{(built-in exception)}{\ttindex{OverflowError}} \end{cfuncdesc} *************** *** 428,433 **** \obindex{sequence} ! Generic operations on sequence objects were discussed in the previous ! chapter; this section deals with the specific kinds of sequence objects that are intrinsic to the Python language. --- 428,433 ---- \obindex{sequence} ! Generic operations on sequence objects were discussed in the previous ! chapter; this section deals with the specific kinds of sequence objects that are intrinsic to the Python language. *************** *** 796,800 **** \begin{cfuncdesc}{PyObject*}{PyUnicode_FromUnicode}{const Py_UNICODE *u, ! int size} Create a Unicode Object from the Py_UNICODE buffer \var{u} of the given size. \var{u} may be \NULL{} which causes the contents to be --- 796,800 ---- \begin{cfuncdesc}{PyObject*}{PyUnicode_FromUnicode}{const Py_UNICODE *u, ! int size} Create a Unicode Object from the Py_UNICODE buffer \var{u} of the given size. \var{u} may be \NULL{} which causes the contents to be *************** *** 1074,1078 **** \end{cfuncdesc} ! % --- Latin-1 Codecs ----------------------------------------------------- These are the Latin-1 codec APIs: --- 1074,1078 ---- \end{cfuncdesc} ! % --- Latin-1 Codecs ----------------------------------------------------- These are the Latin-1 codec APIs: *************** *** 1102,1106 **** \end{cfuncdesc} ! % --- ASCII Codecs ------------------------------------------------------- These are the \ASCII{} codec APIs. Only 7-bit \ASCII{} data is --- 1102,1106 ---- \end{cfuncdesc} ! % --- ASCII Codecs ------------------------------------------------------- These are the \ASCII{} codec APIs. Only 7-bit \ASCII{} data is *************** *** 1129,1133 **** \end{cfuncdesc} ! % --- Character Map Codecs ----------------------------------------------- These are the mapping codec APIs: --- 1129,1133 ---- \end{cfuncdesc} ! % --- Character Map Codecs ----------------------------------------------- These are the mapping codec APIs: *************** *** 1140,1144 **** Decoding mappings must map single string characters to single Unicode characters, integers (which are then interpreted as Unicode ordinals) ! or None (meaning "undefined mapping" and causing an error). Encoding mappings must map single Unicode characters to single string --- 1140,1144 ---- Decoding mappings must map single string characters to single Unicode characters, integers (which are then interpreted as Unicode ordinals) ! or None (meaning "undefined mapping" and causing an error). Encoding mappings must map single Unicode characters to single string *************** *** 1357,1362 **** the object data directly, without needing to copy it first. ! Two examples of objects that support ! the buffer interface are strings and arrays. The string object exposes the character contents in the buffer interface's byte-oriented form. An array can also expose its contents, but it should be noted --- 1357,1362 ---- the object data directly, without needing to copy it first. ! Two examples of objects that support ! the buffer interface are strings and arrays. The string object exposes the character contents in the buffer interface's byte-oriented form. An array can also expose its contents, but it should be noted *************** *** 1366,1370 **** \method{write()} method. Any object that can export a series of bytes through the buffer interface can be written to a file. There are a ! number of format codes to \cfunction{PyArg_ParseTuple()} that operate against an object's buffer interface, returning data from the target object. --- 1366,1370 ---- \method{write()} method. Any object that can export a series of bytes through the buffer interface can be written to a file. There are a ! number of format codes to \cfunction{PyArg_ParseTuple()} that operate against an object's buffer interface, returning data from the target object. *************** *** 1547,1551 **** \exception{MemoryError} or \exception{SystemError}. ! \versionchanged[Removed unused third parameter, \var{last_is_sticky}]{2.2} \end{cfuncdesc} --- 1547,1551 ---- \exception{MemoryError} or \exception{SystemError}. ! \versionchanged[Removed unused third parameter, \var{last_is_sticky}]{2.2} \end{cfuncdesc} *************** *** 1818,1826 **** \begin{cfuncdesc}{int}{PyDict_Merge}{PyObject *a, PyObject *b, int override} ! Iterate over dictionary \var{b} adding key-value pairs to dictionary ! \var{a}. If \var{override} is true, existing pairs in \var{a} will be replaced if a matching key is found in \var{b}, otherwise pairs will only be added if there is not a matching key in \var{a}. ! Returns \code{0} on success or \code{-1} if an exception was raised. \versionadded{2.2} --- 1818,1829 ---- \begin{cfuncdesc}{int}{PyDict_Merge}{PyObject *a, PyObject *b, int override} ! Iterate over mapping object \var{b} adding key-value pairs to dictionary ! \var{a}. ! \var{b} may be a dictionary, or any object supporting ! \function{PyMapping_Keys()} and \function{PyObject_GetItem()}. ! If \var{override} is true, existing pairs in \var{a} will be replaced if a matching key is found in \var{b}, otherwise pairs will only be added if there is not a matching key in \var{a}. ! Return \code{0} on success or \code{-1} if an exception was raised. \versionadded{2.2} *************** *** 1829,1838 **** \begin{cfuncdesc}{int}{PyDict_Update}{PyObject *a, PyObject *b} This is the same as \code{PyDict_Merge(\var{a}, \var{b}, 1)} in C, ! or \code{\var{a}.update(\var{b})} in Python. Returns \code{0} on success or \code{-1} if an exception was raised. \versionadded{2.2} \end{cfuncdesc} \section{Other Objects \label{otherObjects}} --- 1832,1861 ---- \begin{cfuncdesc}{int}{PyDict_Update}{PyObject *a, PyObject *b} This is the same as \code{PyDict_Merge(\var{a}, \var{b}, 1)} in C, ! or \code{\var{a}.update(\var{b})} in Python. Return \code{0} on success or \code{-1} if an exception was raised. \versionadded{2.2} \end{cfuncdesc} + \begin{cfuncdesc}{int}{PyDict_MergeFromSeq2}{PyObject *a, PyObject *seq2, + int override} + Update or merge into dictionary \var{a}, from the key-value pairs in + \var{seq2}. \var{seq2} must be an iterable object producing + iterable objects of length 2, viewed as key-value pairs. In case of + duplicate keys, the last wins if \var{override} is true, else the + first wins. + Return \code{0} on success or \code{-1} if an exception + was raised. + Equivalent Python (except for the return value): + + \begin{verbatim} + def PyDict_MergeFromSeq2(a, seq2, override): + for key, value in seq2: + if override or key not in a: + a[key] = value + \end{verbatim} + \versionadded{2.2} + \end{cfuncdesc} + \section{Other Objects \label{otherObjects}} *************** *** 2301,2305 **** \obindex{CObject} Refer to \emph{Extending and Embedding the Python Interpreter}, ! section 1.12 (``Providing a C API for an Extension Module), for more information on using these objects. --- 2324,2328 ---- \obindex{CObject} Refer to \emph{Extending and Embedding the Python Interpreter}, ! section 1.12 (``Providing a C API for an Extension Module), for more information on using these objects. *************** *** 2318,2322 **** \end{cfuncdesc} ! \begin{cfuncdesc}{PyObject*}{PyCObject_FromVoidPtr}{void* cobj, void (*destr)(void *)} Creates a \ctype{PyCObject} from the \code{void *}\var{cobj}. The --- 2341,2345 ---- \end{cfuncdesc} ! \begin{cfuncdesc}{PyObject*}{PyCObject_FromVoidPtr}{void* cobj, void (*destr)(void *)} Creates a \ctype{PyCObject} from the \code{void *}\var{cobj}. The From fdrake@users.sourceforge.net Tue Dec 11 18:47:38 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Tue, 11 Dec 2001 10:47:38 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs python.sty,1.86,1.87 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory usw-pr-cvs1:/tmp/cvs-serv1934/texinputs Modified Files: python.sty Log Message: Save a new version of the productionlist environment for safe-keeping; this will be replaced shortly. See the comments for more details. Index: python.sty =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/python.sty,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -d -r1.86 -r1.87 *** python.sty 2001/11/30 18:09:54 1.86 --- python.sty 2001/12/11 18:47:36 1.87 *************** *** 889,904 **** \newcommand{\grammartoken}[1]{\texttt{#1}} \newenvironment{productionlist}[1][\py@badkey]{ \def\optional##1{{\Large[}##1{\Large]}} \def\production##1##2{\code{##1}&::=&\code{##2}\\} ! \def\orgroup##1{{\def\or{\textbar\ }##1}} \def\token##1{##1} \let\grammartoken=\token ! \begin{center} ! \begin{tabular}{lcl} }{% ! \end{tabular} ! \end{center} } --- 889,921 ---- + % This version is being checked in for the historical record; it shows + % how I've managed to get some aspects of this to work. It will not + % be used in practice, so a subsequent revision will change things + % again. This version has problems, but shows how to do something + % that proved more tedious than I'd expected, so I don't want to lose + % the example completely. + % \newcommand{\grammartoken}[1]{\texttt{#1}} \newenvironment{productionlist}[1][\py@badkey]{ \def\optional##1{{\Large[}##1{\Large]}} \def\production##1##2{\code{##1}&::=&\code{##2}\\} ! \def\orgroup##1{{\def\oritem{\textbar\ }##1}} ! \def\orgroup*##1{{ ! \def\oritem{\\ \textbar&} ! % This uses math mode's ``negative thin space'' to avoid a weird ! % indentation that I've not been able to figure out, but ! % probably relates to nesting tabular environments. ! $\!\!\!\!\!\!\!\!\!\!$% ! \begin{tabular}[t]{ll} ! \ & ##1 ! \end{tabular} ! }} \def\token##1{##1} \let\grammartoken=\token ! \parindent=2em ! \indent ! \begin{tabular}{lcl} }{% ! \end{tabular} } From tim_one@users.sourceforge.net Tue Dec 11 19:20:18 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Tue, 11 Dec 2001 11:20:18 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_augassign.py,1.4,1.5 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv11796/python/Lib/test Modified Files: test_augassign.py Log Message: Fiddle test_augassign so it passes under -Qnew. Index: test_augassign.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_augassign.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_augassign.py 2001/09/04 19:14:14 1.4 --- test_augassign.py 2001/12/11 19:20:15 1.5 *************** *** 218,224 **** x *= 1 ! x / 1 ! 1 / x ! x /= 1 x // 1 --- 218,231 ---- x *= 1 ! if 1/2 == 0: ! x / 1 ! 1 / x ! x /= 1 ! else: ! # True division is in effect, so "/" doesn't map to __div__ etc; ! # but the canned expected-output file requires that those get called. ! x.__div__(1) ! x.__rdiv__(1) ! x.__idiv__(1) x // 1 From fdrake@users.sourceforge.net Tue Dec 11 19:28:24 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Tue, 11 Dec 2001 11:28:24 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/ext newtypes.tex,1.5,1.6 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ext In directory usw-pr-cvs1:/tmp/cvs-serv15717/ext Modified Files: newtypes.tex Log Message: Added discussion of protecting against screwing up the exception state in an object's deallocator, including an example of how to do this. Index: newtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/newtypes.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** newtypes.tex 2001/11/17 06:50:42 1.5 --- newtypes.tex 2001/12/11 19:28:22 1.6 *************** *** 450,453 **** --- 450,458 ---- \subsection{Finalization and De-allocation} + \index{object!deallocation} + \index{deallocation, object} + \index{object!finalization} + \index{finalization, of objects} + \begin{verbatim} destructor tp_dealloc; *************** *** 465,468 **** --- 470,516 ---- { free(obj->obj_UnderlyingDatatypePtr); + PyObject_DEL(obj); + } + \end{verbatim} + + One important requirement of the deallocator function is that it + leaves any pending exceptions alone. This is important since + deallocators are frequently called as the interpreter unwinds the + Python stack; when the stack is unwound due to an exception (rather + than normal returns), nothing is done to protect the deallocators from + seeing that an exception has already been set. Any actions which a + deallocator performs which may cause additional Python code to be + executed may detect that an exception has been set. This can lead to + misleading errors from the interpreter. The proper way to protect + against this is to save a pending exception before performing the + unsafe action, and restoring it when done. This can be done using the + \cfunction{PyErr_Fetch()}\ttindex{PyErr_Fetch()} and + \cfunction{PyErr_Restore()}\ttindex{PyErr_Restore()} functions: + + \begin{verbatim} + static void + my_dealloc(PyObject *obj) + { + MyObject *self = (MyObject *) obj; + PyObject *cbresult; + + if (self->my_callback != NULL) { + PyObject *err_type, *err_value, *err_traceback; + int have_error = PyErr_Occurred() ? 1 : 0; + + if (have_error) + PyErr_Fetch(&err_type, &err_value, &err_traceback); + + cbresult = PyObject_CallObject(self->my_callback, NULL); + if (cbresult == NULL) + PyErr_WriteUnraisable(); + else + Py_DECREF(cbresult); + + if (have_error) + PyErr_Restore(err_type, err_value, err_traceback); + + Py_DECREF(self->my_callback); + } PyObject_DEL(obj); } From tim_one@users.sourceforge.net Tue Dec 11 19:28:49 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Tue, 11 Dec 2001 11:28:49 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_class.py,1.6,1.7 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv15788/python/Lib/test Modified Files: test_class.py Log Message: Fiddle test_class so it passes with -Qnew. Index: test_class.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_class.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test_class.py 2001/08/20 20:29:07 1.6 --- test_class.py 2001/12/11 19:28:47 1.7 *************** *** 89,96 **** print "__del__:", args for method in testmeths: ! exec """def __%(method)s__(self, *args): ! print "__%(method)s__:", args ! """%locals() in AllTests.__dict__ # this also tests __init__ of course. --- 89,103 ---- print "__del__:", args + # Synthesize AllTests methods from the names in testmeths. + + method_template = """\ + def __%(method)s__(self, *args): + print "__%(method)s__:", args + """ + for method in testmeths: ! exec method_template % locals() in AllTests.__dict__ ! ! del method, method_template # this also tests __init__ of course. *************** *** 108,113 **** 1 * testme ! testme / 1 ! 1 / testme testme % 1 --- 115,128 ---- 1 * testme ! if 1/2 == 0: ! testme / 1 ! 1 / testme ! else: ! # True division is in effect, so "/" doesn't map to __div__ etc; but ! # the canned expected-output file requires that __div__ etc get called. ! testme.__coerce__(1) ! testme.__div__(1) ! testme.__coerce__(1) ! testme.__rdiv__(1) testme % 1 From fdrake@users.sourceforge.net Tue Dec 11 19:40:18 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Tue, 11 Dec 2001 11:40:18 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/api concrete.tex,1.5,1.6 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/api In directory usw-pr-cvs1:/tmp/cvs-serv19699/api Modified Files: concrete.tex Log Message: A number of small adjustments. Index: concrete.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/concrete.tex,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** concrete.tex 2001/12/11 18:51:08 1.5 --- concrete.tex 2001/12/11 19:40:16 1.6 *************** *** 1371,1375 **** More information on the buffer interface is provided in the section ! ``Buffer Object Structures'' (section \ref{buffer-structs}), under the description for \ctype{PyBufferProcs}\ttindex{PyBufferProcs}. --- 1371,1375 ---- More information on the buffer interface is provided in the section ! ``Buffer Object Structures'' (section~\ref{buffer-structs}), under the description for \ctype{PyBufferProcs}\ttindex{PyBufferProcs}. *************** *** 1858,1861 **** --- 1858,1862 ---- \end{cfuncdesc} + \section{Other Objects \label{otherObjects}} *************** *** 2189,2194 **** \subsection{Descriptor Objects \label{descriptor-objects}} \begin{cvardesc}{PyTypeObject}{PyProperty_Type} ! The type object for a descriptor. \versionadded{2.2} \end{cvardesc} --- 2190,2198 ---- \subsection{Descriptor Objects \label{descriptor-objects}} + ``Descriptors'' are objects that describe some attribute of an object. + They are found in the dictionary of type objects. + \begin{cvardesc}{PyTypeObject}{PyProperty_Type} ! The type object for the built-in descriptor types. \versionadded{2.2} \end{cvardesc} *************** *** 2324,2328 **** \obindex{CObject} Refer to \emph{Extending and Embedding the Python Interpreter}, ! section 1.12 (``Providing a C API for an Extension Module), for more information on using these objects. --- 2328,2332 ---- \obindex{CObject} Refer to \emph{Extending and Embedding the Python Interpreter}, ! section~1.12, ``Providing a C API for an Extension Module,'' for more information on using these objects. *************** *** 2342,2346 **** \begin{cfuncdesc}{PyObject*}{PyCObject_FromVoidPtr}{void* cobj, ! void (*destr)(void *)} Creates a \ctype{PyCObject} from the \code{void *}\var{cobj}. The \var{destr} function will be called when the object is reclaimed, --- 2346,2350 ---- \begin{cfuncdesc}{PyObject*}{PyCObject_FromVoidPtr}{void* cobj, ! void (*destr)(void *)} Creates a \ctype{PyCObject} from the \code{void *}\var{cobj}. The \var{destr} function will be called when the object is reclaimed, *************** *** 2378,2381 **** --- 2382,2389 ---- the generated byte-code; these are not automatically de-referenced when accessed. Cell objects are not likely to be useful elsewhere. + + \begin{ctypedesc}{PyCellObject} + The C structure used for cell objects. + \end{ctypedesc} \begin{cvardesc}{PyTypeObject}{PyCell_Type} From tim_one@users.sourceforge.net Tue Dec 11 19:57:27 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Tue, 11 Dec 2001 11:57:27 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects floatobject.c,2.108,2.109 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv24742/python/objects Modified Files: floatobject.c Log Message: float_int_div(): For clarity, move this closer to the other float division functions, and rename to float_floor_div. Index: floatobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v retrieving revision 2.108 retrieving revision 2.109 diff -C2 -d -r2.108 -r2.109 *** floatobject.c 2001/11/28 22:43:45 2.108 --- floatobject.c 2001/12/11 19:57:24 2.109 *************** *** 515,518 **** --- 515,533 ---- static PyObject * + float_floor_div(PyObject *v, PyObject *w) + { + PyObject *t, *r; + + t = float_divmod(v, w); + if (t != NULL) { + r = PyTuple_GET_ITEM(t, 0); + Py_INCREF(r); + Py_DECREF(t); + return r; + } + return NULL; + } + + static PyObject * float_pow(PyObject *v, PyObject *w, PyObject *z) { *************** *** 570,588 **** static PyObject * - float_int_div(PyObject *v, PyObject *w) - { - PyObject *t, *r; - - t = float_divmod(v, w); - if (t != NULL) { - r = PyTuple_GET_ITEM(t, 0); - Py_INCREF(r); - Py_DECREF(t); - return r; - } - return NULL; - } - - static PyObject * float_neg(PyFloatObject *v) { --- 585,588 ---- *************** *** 758,762 **** 0, /* nb_inplace_xor */ 0, /* nb_inplace_or */ ! float_int_div, /* nb_floor_divide */ float_div, /* nb_true_divide */ 0, /* nb_inplace_floor_divide */ --- 758,762 ---- 0, /* nb_inplace_xor */ 0, /* nb_inplace_or */ ! float_floor_div, /* nb_floor_divide */ float_div, /* nb_true_divide */ 0, /* nb_inplace_floor_divide */ From tim_one@users.sourceforge.net Tue Dec 11 20:31:37 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Tue, 11 Dec 2001 12:31:37 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects floatobject.c,2.109,2.110 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv1187/python/objects Modified Files: floatobject.c Log Message: float_floor_div: An expression like 3.//1j crashed the interpreter, or delivered bizarre results. Check float_divmod for a Py_NotImplemented return and pass it along (instead of treating Py_NotImplemented as a 2-tuple). CONVERT_TO_DOUBLE: Added comments; this macro is obscure. Index: floatobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v retrieving revision 2.109 retrieving revision 2.110 diff -C2 -d -r2.109 -r2.110 *** floatobject.c 2001/12/11 19:57:24 2.109 --- floatobject.c 2001/12/11 20:31:34 2.110 *************** *** 266,271 **** /* Macro and helper that convert PyObject obj to a C double and store the value in dbl; this replaces the functionality of the coercion ! slot function */ ! #define CONVERT_TO_DOUBLE(obj, dbl) \ if (PyFloat_Check(obj)) \ --- 266,274 ---- /* Macro and helper that convert PyObject obj to a C double and store the value in dbl; this replaces the functionality of the coercion ! slot function. If conversion to double raises an exception, obj is ! set to NULL, and the function invoking this macro returns NULL. If ! obj is not of float, int or long type, Py_NotImplemented is incref'ed, ! stored in obj, and returned from the function invoking this macro. ! */ #define CONVERT_TO_DOUBLE(obj, dbl) \ if (PyFloat_Check(obj)) \ *************** *** 520,530 **** t = float_divmod(v, w); ! if (t != NULL) { ! r = PyTuple_GET_ITEM(t, 0); ! Py_INCREF(r); ! Py_DECREF(t); ! return r; ! } ! return NULL; } --- 523,533 ---- t = float_divmod(v, w); ! if (t == NULL || t == Py_NotImplemented) ! return t; ! assert(PyTuple_CheckExact(t)); ! r = PyTuple_GET_ITEM(t, 0); ! Py_INCREF(r); ! Py_DECREF(t); ! return r; } From lemburg@users.sourceforge.net Tue Dec 11 20:44:44 2001 From: lemburg@users.sourceforge.net (M.-A. Lemburg) Date: Tue, 11 Dec 2001 12:44:44 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/distutils/command build_scripts.py,1.13,1.14 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils/command In directory usw-pr-cvs1:/tmp/cvs-serv5845 Modified Files: build_scripts.py Log Message: Joe VanAndel wrote: > > When using 'distutils' (shipped with Python 2.1) I've found that my > Python scripts installed with a first line of: > > #!/usr/bin/python2.1None > > This is caused by distutils trying to patch the first line of the python > script to use the current interpreter. Index: build_scripts.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_scripts.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** build_scripts.py 2001/12/10 16:15:44 1.13 --- build_scripts.py 2001/12/11 20:44:42 1.14 *************** *** 81,85 **** if match: adjust = 1 ! post_interp = match.group(1) if adjust: --- 81,85 ---- if match: adjust = 1 ! post_interp = match.group(1) or '' if adjust: From fdrake@users.sourceforge.net Tue Dec 11 20:49:25 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Tue, 11 Dec 2001 12:49:25 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/perl python.perl,1.113,1.114 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory usw-pr-cvs1:/tmp/cvs-serv7339/perl Modified Files: python.perl Log Message: Remove crufty whitespace in a block of index entries. Minor, but generates slightly smaller HTML & makes it easier to see what's happening when debugging the HTML. Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** python.perl 2001/11/30 18:09:50 1.113 --- python.perl 2001/12/11 20:49:23 1.114 *************** *** 442,445 **** --- 442,446 ---- my $br_id = ++$globals{'max_id'}; my $marker = "$O$br_id$C"; + $stuff =~ s/^\s+//; return $stuff From akuchlin@mems-exchange.org Tue Dec 11 20:50:36 2001 From: akuchlin@mems-exchange.org (Andrew Kuchling) Date: Tue, 11 Dec 2001 15:50:36 -0500 Subject: [Python-checkins] CVS: python/dist/src/Lib/distutils/command build_scripts.py,1.13,1.14 In-Reply-To: References: Message-ID: <20011211155036.A6924@ute.mems-exchange.org> On Tue, Dec 11, 2001 at 12:44:44PM -0800, M.-A. Lemburg wrote: >*** build_scripts.py 2001/12/10 16:15:44 1.13 >--- build_scripts.py 2001/12/11 20:44:42 1.14 >*************** >*** 81,85 **** > if match: > adjust = 1 >! post_interp = match.group(1) > > if adjust: >--- 81,85 ---- > if match: > adjust = 1 >! post_interp = match.group(1) or '' Careful; a similar fix was suggested for bug #475009, but the correct fix was to tighten up the regex pattern for the first line. --amk From fdrake@users.sourceforge.net Tue Dec 11 21:10:10 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Tue, 11 Dec 2001 13:10:10 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref3.tex,1.80,1.81 ref6.tex,1.43,1.44 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory usw-pr-cvs1:/tmp/cvs-serv14031/ref Modified Files: ref3.tex ref6.tex Log Message: Document generators and the yield statement, avoiding implementation details. Index: ref3.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref3.tex,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** ref3.tex 2001/12/07 23:13:53 1.80 --- ref3.tex 2001/12/11 21:10:08 1.81 *************** *** 504,507 **** --- 504,519 ---- function is an attribute of the class. + \item[Generator functions\index{generator!function}\index{generator!iterator}] + A function or method which uses the \keyword{yield} statement (see + section~\ref{yield}, ``The \keyword{yield} statement'') is called a + \dfn{generator function}. Such a function, when called, always + returns an iterator object which can be used to execute the body of + the function: calling the iterator's \method{next()} method will + cause the function to execute until it provides a value using the + \keyword{yield} statement. When the function executes a + \keyword{return} statement or falls off the end, a + \exception{StopIteration} exception is raised and the iterator will + have reached the end of the set of values to be returned. + \item[Built-in functions] A built-in function object is a wrapper around a \C{} function. Examples *************** *** 525,529 **** \var{list} is a list object. In this case, the special read-only attribute \member{__self__} is set ! to the object denoted by \code{list}. \obindex{built-in method} \obindex{method} --- 537,541 ---- \var{list} is a list object. In this case, the special read-only attribute \member{__self__} is set ! to the object denoted by \var{list}. \obindex{built-in method} \obindex{method} Index: ref6.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref6.tex,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** ref6.tex 2001/12/05 05:46:25 1.43 --- ref6.tex 2001/12/11 21:10:08 1.44 *************** *** 16,19 **** --- 16,20 ---- | \token{print_stmt} | \token{return_stmt} + | \token{yield_stmt} | \token{raise_stmt} | \token{break_stmt} *************** *** 436,439 **** --- 437,491 ---- before really leaving the function. \kwindex{finally} + + In a generator function, the \keyword{return} statement is not allowed + to include an \grammartoken{expression_list}. In that context, a bare + \keyword{return} indicates that the generator is done and will cause + \exception{StopIteration} to be raised. + + + \section{The \keyword{yield} statement \label{yield}} + \stindex{yield} + + \begin{productionlist} + \production{yield_stmt} + {"yield" \token{expression_list}} + \end{productionlist} + + \index{generator!function} + \index{generator!iterator} + \index{function!generator} + \exindex{StopIteration} + + The \keyword{yield} statement is only used when defining a generator + function, and is only used in the body of the generator function. + Using a \keyword{yield} statement in a function definition is + sufficient to cause that definition to create a generator function + instead of a normal function. + + When a generator function is called, it returns an iterator known as a + generator iterator, or more commonly, a generator. The body of the + generator function is executed by calling the generator's + \method{next()} method repeatedly until it raises an exception. + + When a \keyword{yield} statement is executed, the state of the + generator is frozen and the value of \grammartoken{expression_list} is + returned to \method{next()}'s caller. By ``frozen'' we mean that all + local state is retained, including the current bindings of local + variables, the instruction pointer, and the internal evaluation stack: + enough information is saved so that the next time \method{next()} is + invoked, the function can proceed exactly as if the \keyword{yield} + statement were just another external call. + + One restriction in the use of the \keyword{yield} statement is is that + is is not allowed in the try clause of a \keyword{try} + ...\ \keyword{finally} construct. The difficulty is that there's no + guarantee the generator will ever be resumed, hence no guarantee that + the \keyword{finally} block will ever get executed. + + \begin{seealso} + \seepep{0255}{Simple Generators} + {The proposal for adding generators and the \keyword{yield} + statement to Python.} + \end{seealso} From mal@lemburg.com Tue Dec 11 21:16:23 2001 From: mal@lemburg.com (M.-A. Lemburg) Date: Tue, 11 Dec 2001 22:16:23 +0100 Subject: [Python-checkins] CVS: python/dist/src/Lib/distutils/command build_scripts.py,1.13,1.14 References: <20011211155036.A6924@ute.mems-exchange.org> Message-ID: <3C1677A7.92B08312@lemburg.com> Andrew Kuchling wrote: > > On Tue, Dec 11, 2001 at 12:44:44PM -0800, M.-A. Lemburg wrote: > >*** build_scripts.py 2001/12/10 16:15:44 1.13 > >--- build_scripts.py 2001/12/11 20:44:42 1.14 > >*************** > >*** 81,85 **** > > if match: > > adjust = 1 > >! post_interp = match.group(1) > > > > if adjust: > >--- 81,85 ---- > > if match: > > adjust = 1 > >! post_interp = match.group(1) or '' > > Careful; a similar fix was suggested for bug #475009, but the correct > fix was to tighten up the regex pattern for the first line. I did see the '$' but still think that the code is wrong: >>> first_line_re.match('#!/usr/bin/python').groups() (None,) That is: the first line can match, but not include any extra flags such as ' -O' or ' -uO', so 'None' is still a possible outcome (due to the '?' behind the group). -- Marc-Andre Lemburg CEO eGenix.com Software GmbH ______________________________________________________________________ Consulting & Company: http://www.egenix.com/ Python Software: http://www.lemburg.com/python/ From tim_one@users.sourceforge.net Tue Dec 11 21:43:16 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Tue, 11 Dec 2001 13:43:16 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.332,1.333 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv23364/python/Misc Modified Files: NEWS Log Message: Added -Qnew news about the test_coercion.py failure. That's the only test that still fails under -Qnew, and is so tied to details of current behavior that fixing it before new division becomes the default is impractical. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.332 retrieving revision 1.333 diff -C2 -d -r1.332 -r1.333 *** NEWS 2001/12/11 18:51:08 1.332 --- NEWS 2001/12/11 21:43:14 1.333 *************** *** 46,49 **** --- 46,53 ---- your own code. As the PEP says, -Qnew is intended for use only in educational environments with control over the libraries in use. + Note that test_coercion.py in the standard Python test suite fails + under -Qnew; this is expected, and won't be repaired until true + division becomes the default (in the meantime, test_coercion is + testing the current rules). Extension modules From jvr@users.sourceforge.net Tue Dec 11 21:52:04 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Tue, 11 Dec 2001 13:52:04 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/carbonevt _CarbonEvtmodule.c,NONE,1.1 CarbonEvtsupport.py,1.3,1.4 _CarbonEvt.c,1.2,NONE Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/carbonevt In directory usw-pr-cvs1:/tmp/cvs-serv26780 Modified Files: CarbonEvtsupport.py Added Files: _CarbonEvtmodule.c Removed Files: _CarbonEvt.c Log Message: Fixed to the extend that it now builds in CW6, and actually works a little. --- NEW FILE: _CarbonEvtmodule.c --- /* ======================= Module _CarbonEvt ======================== */ #include "Python.h" #ifdef WITHOUT_FRAMEWORKS #include #else #include #endif #include "macglue.h" #define USE_MAC_MP_MULTITHREADING 1 #if USE_MAC_MP_MULTITHREADING static PyThreadState *_save; [...1564 lines suppressed...] EventHandlerRef_Type.ob_type = &PyType_Type; Py_INCREF(&EventHandlerRef_Type); if (PyDict_SetItemString(d, "EventHandlerRefType", (PyObject *)&EventHandlerRef_Type) != 0) Py_FatalError("can't initialize EventHandlerRefType"); EventHandlerCallRef_Type.ob_type = &PyType_Type; Py_INCREF(&EventHandlerCallRef_Type); if (PyDict_SetItemString(d, "EventHandlerCallRefType", (PyObject *)&EventHandlerCallRef_Type) != 0) Py_FatalError("can't initialize EventHandlerCallRefType"); EventTargetRef_Type.ob_type = &PyType_Type; Py_INCREF(&EventTargetRef_Type); if (PyDict_SetItemString(d, "EventTargetRefType", (PyObject *)&EventTargetRef_Type) != 0) Py_FatalError("can't initialize EventTargetRefType"); EventHotKeyRef_Type.ob_type = &PyType_Type; Py_INCREF(&EventHotKeyRef_Type); if (PyDict_SetItemString(d, "EventHotKeyRefType", (PyObject *)&EventHotKeyRef_Type) != 0) Py_FatalError("can't initialize EventHotKeyRefType"); } /* ===================== End module _CarbonEvt ====================== */ Index: CarbonEvtsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/carbonevt/CarbonEvtsupport.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CarbonEvtsupport.py 2001/11/05 16:21:45 1.3 --- CarbonEvtsupport.py 2001/12/11 21:52:01 1.4 *************** *** 25,29 **** exec execstr ! EventTypeSpec_ptr = OpaqueType("EventTypeSpec *", "EventTypeSpec") # is this the right type for the void * in GetEventParameter --- 25,29 ---- exec execstr ! EventTypeSpec_ptr = OpaqueType("EventTypeSpec", "EventTypeSpec") # is this the right type for the void * in GetEventParameter *************** *** 53,57 **** --- 53,62 ---- includestuff = """ + #ifdef WITHOUT_FRAMEWORKS + #include + #else #include + #endif + #include "macglue.h" *************** *** 82,86 **** EventTypeSpec_Convert(PyObject *v, EventTypeSpec *out) { ! if (PyArg_ParseTuple(v, "ll", &(out->eventClass), &(out->eventKind))) return 1; return NULL; --- 87,91 ---- EventTypeSpec_Convert(PyObject *v, EventTypeSpec *out) { ! if (PyArg_Parse(v, "(O&l)", PyMac_GetOSType, &(out->eventClass), &(out->eventKind))) return 1; return NULL; *************** *** 91,94 **** --- 96,100 ---- /********** HIPoint *******/ + #if 0 /* XXX doesn't compile */ static PyObject* HIPoint_New(HIPoint *in) *************** *** 104,107 **** --- 110,114 ---- return NULL; } + #endif /********** end HIPoint *******/ *************** *** 127,131 **** /******** handlecommand ***********/ ! pascal OSStatus CarbonEvents_HandleCommand(EventHandlerCallRef handlerRef, EventRef event, void *outPyObject) { PyObject *retValue; int status; --- 134,140 ---- /******** handlecommand ***********/ ! static EventHandlerUPP gEventHandlerUPP; ! ! pascal OSStatus CarbonEvents_HandleEvent(EventHandlerCallRef handlerRef, EventRef event, void *outPyObject) { PyObject *retValue; int status; *************** *** 151,155 **** """ ! module = MacModule('CarbonEvents', 'CarbonEvents', includestuff, finalstuff, initstuff) #class CFReleaserObj(GlobalObjectDefinition): --- 160,167 ---- """ ! initstuff = initstuff + """ ! gEventHandlerUPP = NewEventHandlerUPP(CarbonEvents_HandleEvent); ! """ ! module = MacModule('_CarbonEvt', 'CarbonEvents', includestuff, finalstuff, initstuff) #class CFReleaserObj(GlobalObjectDefinition): *************** *** 182,196 **** EventHandlerRef outRef; OSStatus _err; - EventHandlerUPP event; if (!PyArg_ParseTuple(_args, "O&O", EventTypeSpec_Convert, &inSpec, &callback)) return NULL; ! event = NewEventHandlerUPP(CarbonEvents_HandleCommand); ! _err = InstallEventHandler(_self->ob_itself, event, 1, &inSpec, (void *)callback, &outRef); if (_err != noErr) return PyMac_Error(_err); ! return Py_BuildValue("l", outRef); ! """ f = ManualGenerator("InstallEventHandler", installeventhandler); --- 194,205 ---- EventHandlerRef outRef; OSStatus _err; if (!PyArg_ParseTuple(_args, "O&O", EventTypeSpec_Convert, &inSpec, &callback)) return NULL; ! _err = InstallEventHandler(_self->ob_itself, gEventHandlerUPP, 1, &inSpec, (void *)callback, &outRef); if (_err != noErr) return PyMac_Error(_err); ! return Py_BuildValue("O&", EventHandlerRef_New, outRef);""" f = ManualGenerator("InstallEventHandler", installeventhandler); *************** *** 201,205 **** #if USE_MAC_MP_MULTITHREADING if (MPCreateCriticalRegion(&reentrantLock) != noErr) { ! printf("lock failure\n"); return NULL; } --- 210,214 ---- #if USE_MAC_MP_MULTITHREADING if (MPCreateCriticalRegion(&reentrantLock) != noErr) { ! printf("lock failure\\n"); return NULL; } *************** *** 224,228 **** module.add(f) ! SetOutputFileName('_CarbonEvt.c') module.generate() --- 233,237 ---- module.add(f) ! SetOutputFileName('_CarbonEvtmodule.c') module.generate() --- _CarbonEvt.c DELETED --- From fdrake@users.sourceforge.net Tue Dec 11 21:58:37 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Tue, 11 Dec 2001 13:58:37 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref6.tex,1.44,1.45 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory usw-pr-cvs1:/tmp/cvs-serv28813/ref Modified Files: ref6.tex Log Message: Clean up a sad sentence in the yield description. Index: ref6.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref6.tex,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** ref6.tex 2001/12/11 21:10:08 1.44 --- ref6.tex 2001/12/11 21:58:35 1.45 *************** *** 477,485 **** statement were just another external call. ! One restriction in the use of the \keyword{yield} statement is is that ! is is not allowed in the try clause of a \keyword{try} ! ...\ \keyword{finally} construct. The difficulty is that there's no ! guarantee the generator will ever be resumed, hence no guarantee that ! the \keyword{finally} block will ever get executed. \begin{seealso} --- 477,485 ---- statement were just another external call. ! The \keyword{yield} statement is not allowed in the \keyword{try} ! clause of a \keyword{try} ...\ \keyword{finally} construct. The ! difficulty is that there's no guarantee the generator will ever be ! resumed, hence no guarantee that the \keyword{finally} block will ever ! get executed. \begin{seealso} From gvanrossum@users.sourceforge.net Tue Dec 11 22:41:27 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Tue, 11 Dec 2001 14:41:27 -0800 Subject: [Python-checkins] CVS: python/dist/src/Tools/webchecker webchecker.py,1.24,1.25 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/webchecker In directory usw-pr-cvs1:/tmp/cvs-serv9982 Modified Files: webchecker.py Log Message: Fix SF bug #482171: webchecker dies on file: URLs w/o robots.txt The cause seems to be that when a file URL doesn't exist, urllib.urlopen() raises OSError instead of IOError. Simply add this to the except clause. Not elegant, but effective. :-) Index: webchecker.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/webchecker/webchecker.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** webchecker.py 2001/04/05 18:14:50 1.24 --- webchecker.py 2001/12/11 22:41:24 1.25 *************** *** 336,340 **** try: rp.read() ! except IOError, msg: self.note(1, "I/O error parsing %s: %s", url, msg) --- 336,340 ---- try: rp.read() ! except (OSError, IOError), msg: self.note(1, "I/O error parsing %s: %s", url, msg) *************** *** 534,538 **** try: return self.urlopener.open(url) ! except IOError, msg: msg = self.sanitize(msg) self.note(0, "Error %s", msg) --- 534,538 ---- try: return self.urlopener.open(url) ! except (OSError, IOError), msg: msg = self.sanitize(msg) self.note(0, "Error %s", msg) From bwarsaw@users.sourceforge.net Tue Dec 11 23:39:47 2001 From: bwarsaw@users.sourceforge.net (Barry Warsaw) Date: Tue, 11 Dec 2001 15:39:47 -0800 Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.147,1.148 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv31088 Modified Files: pep-0000.txt Log Message: Added PEP 666, Reject Foolish Indentation, Laura Creighton And I'm channeling Guido by rejecting this outright. :) Spellchecked by Barry. Index: pep-0000.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v retrieving revision 1.147 retrieving revision 1.148 diff -C2 -d -r1.147 -r1.148 *** pep-0000.txt 2001/11/13 20:52:20 1.147 --- pep-0000.txt 2001/12/11 23:39:45 1.148 *************** *** 134,137 **** --- 134,138 ---- SR 259 Omit printing newline after newline van Rossum SR 271 Prefixing sys.path by command line option Giacometti + SR 666 Reject Foolish Indentation Creighton *************** *** 233,236 **** --- 234,238 ---- S 275 Switching on Multiple Values Lemburg S 276 Simple Iterator for ints Althoff + SR 666 Reject Foolish Indentation Creighton *************** *** 254,257 **** --- 256,260 ---- Ascher, David davida@activestate.com Barrett, Paul barrett@stsci.edu + Creighton, Laura lac@strakt.com Drake, Fred fdrake@acm.org Dubois, Paul F. paul@pfdubois.com From bwarsaw@users.sourceforge.net Tue Dec 11 23:40:11 2001 From: bwarsaw@users.sourceforge.net (Barry Warsaw) Date: Tue, 11 Dec 2001 15:40:11 -0800 Subject: [Python-checkins] CVS: python/nondist/peps pep-0666.txt,NONE,1.1 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv31330 Added Files: pep-0666.txt Log Message: Added PEP 666, Reject Foolish Indentation, Laura Creighton And I'm channeling Guido by rejecting this outright. :) Spellchecked by Barry. --- NEW FILE: pep-0666.txt --- PEP: 666 Title: Reject Foolish Indentation Version: $Revision: 1.1 $ Last-Modified: $Date: 2001/12/11 23:40:09 $ Author: lac@strakt.com (Laura Creighton) Status: Rejected Type: Standards Track Created: 3-Dec-2001 Python-Version: 2.2 Post-History: 5-Dec-2001 Abstract Everybody agrees that mixing tabs and spaces is a bad idea. Some people want more than this. I propose that we let people define whatever Python behaviour they want, so it will only run the way they like it, and will not run the way they don't like it. We will do this with a command line switch. Programs that aren't formatted the way the programmer wants things will raise IndentationError: Python -TNone will refuse to run when there are any tabs. Python -Tn will refuse to run when tabs are not exactly n spaces Python -TOnly will refuse to run when blocks are indented by anything other than tabs People who mix tabs and spaces, naturally, will find that their programs do not run. Alas, we haven't found a way to give them an electric shock as from a cattle prod remotely. (Though if somebody finds out a way to do this, I will be pleased to add this option to the PEP.) Rationale Python-list@python.org (a.k.a. comp.lang.python) is periodically awash with discussions about tabs and spaces. This is inevitable, given that indentation is syntactically significant in Python. This has never solved anything, and just makes various people frustrated and angry. Eventually they start saying rude things to each other which is sad for all of us. And it is also sad that they are wasting their valuable time which they could spend creating something with Python. Moreover, for the Python community as a whole, from a public relations point of view, this is quite unfortunate. The people who aren't posting about tabs and spaces, are, (unsurprisingly) invisible, while the people who are posting make the rest of us look somewhat foolish. The problem is that there is no polite way to say 'Stop wasting your valuable time and mine.' People who are already in the middle of a flame war are not well disposed to believe that you are acting out of compassion for them, and quite rightly insist that their own time is their own to do with as they please. They are stuck like flies in treacle in this wretched argument, and it is self-evident that they cannot disengage or they would have already done so. But today I had to spend time cleaning my keyboard because the 'n' key is sticking. So, in addition to feeling compassion for these people, I am pretty annoyed. I figure if I make this PEP, we can then ask Guido to quickly reject it, and then when this argument next starts up again, we can say 'Guido isn't changing things to suit the tab-haters or the only-tabbers, so this conversation is a waste of time.' Then everybody can quietly believe that a) they are correct and b) other people are fools and c) they are undeniably fortunate to not have to share a lab with idiots, (which is something the arguers could do _now_, but apparently have forgotten). And python-list can go back to worrying if it is too smug, rather than whether it is too hostile for newcomers. Possibly somebody could get around to explaining to me what is the difference between __getattr__ and __getattribute__ in non-Classic classes in 2.2, a question I have foolishly posted in the middle of the current tab thread. I would like to know the answer to that question.[2] This proposal, if accepted, will probably mean a heck of a lot of work for somebody. But since I don't want it accepted, I don't care. References [1] PEP 1, PEP Purpose and Guidelines http://www.python.org/peps/pep-0001.html [2] Tim Peters already has (private correspondence). My early 2.2 didn't have a __getattribute__, and __getattr__ was implemented like __getattribute__ now is. This has been fixed. The important conclusion is that my Decorator Pattern is safe and all is right with the world. Copyright This document has been placed in the public domain. Local Variables: mode: indented-text indent-tabs-mode: nil fill-column: 70 End: From fdrake@users.sourceforge.net Wed Dec 12 05:38:10 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Tue, 11 Dec 2001 21:38:10 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_calendar.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv5332/Lib/test Added Files: test_calendar.py Log Message: Very small test suite for the calendar module, mostly to check a constraint on the return values from isleap(). Also checks firstweekday() and setfirstweekday(). --- NEW FILE: test_calendar.py --- import calendar import unittest from test_support import run_unittest class CalendarTestCase(unittest.TestCase): def test_isleap(self): # Make sure that the return is right for a few years, and # ensure that the return values are 1 or 0, not just true or # false (see SF bug #485794). Specific additional tests may # be appropriate; this tests a single "cycle". self.assertEqual(calendar.isleap(2000), 1) self.assertEqual(calendar.isleap(2001), 0) self.assertEqual(calendar.isleap(2002), 0) self.assertEqual(calendar.isleap(2003), 0) def test_setfirstweekday(self): self.assertRaises(ValueError, calendar.setfirstweekday, 'flabber') self.assertRaises(ValueError, calendar.setfirstweekday, -1) self.assertRaises(ValueError, calendar.setfirstweekday, 200) orig = calendar.firstweekday() calendar.setfirstweekday(calendar.SUNDAY) self.assertEqual(calendar.firstweekday(), calendar.SUNDAY) calendar.setfirstweekday(calendar.MONDAY) self.assertEqual(calendar.firstweekday(), calendar.MONDAY) calendar.setfirstweekday(orig) def test_main(): run_unittest(CalendarTestCase) if __name__ == "__main__": test_main() From fdrake@users.sourceforge.net Wed Dec 12 05:40:48 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Tue, 11 Dec 2001 21:40:48 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcalendar.tex,1.13,1.14 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv5801/Doc/lib Modified Files: libcalendar.tex Log Message: Document that isleap() returns exactly 1 or 0, which is guaranteed by the docstring. This closes SF bug #485794. Additional (very) small details were added. Index: libcalendar.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcalendar.tex,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** libcalendar.tex 2001/11/28 07:26:15 1.13 --- libcalendar.tex 2001/12/12 05:40:46 1.14 *************** *** 13,17 **** the first day of the week, and Sunday as the last (the European convention). Use \function{setfirstweekday()} to set the first day of the ! week to Sunday (6) or to any other weekday. \begin{funcdesc}{setfirstweekday}{weekday} --- 13,18 ---- the first day of the week, and Sunday as the last (the European convention). Use \function{setfirstweekday()} to set the first day of the ! week to Sunday (6) or to any other weekday. Parameters that specify ! dates are given as integers. \begin{funcdesc}{setfirstweekday}{weekday} *************** *** 33,42 **** \begin{funcdesc}{isleap}{year} ! Returns true if \var{year} is a leap year. \end{funcdesc} \begin{funcdesc}{leapdays}{y1, y2} Returns the number of leap years in the range ! [\var{y1}\ldots\var{y2}). \end{funcdesc} --- 34,43 ---- \begin{funcdesc}{isleap}{year} ! Returns \code{1} if \var{year} is a leap year, otherwise \code{0}. \end{funcdesc} \begin{funcdesc}{leapdays}{y1, y2} Returns the number of leap years in the range ! [\var{y1}\ldots\var{y2}), where \var{y1} and \var{y2} are years. \end{funcdesc} From fdrake@users.sourceforge.net Wed Dec 12 06:06:45 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Tue, 11 Dec 2001 22:06:45 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref6.tex,1.45,1.46 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory usw-pr-cvs1:/tmp/cvs-serv10652/ref Modified Files: ref6.tex Log Message: Add a note about yield requiring a __future__ directive. Index: ref6.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref6.tex,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** ref6.tex 2001/12/11 21:58:35 1.45 --- ref6.tex 2001/12/12 06:06:43 1.46 *************** *** 483,486 **** --- 483,496 ---- get executed. + \note{In Python 2.2, the \keyword{yield} statement is only allowed + when the \code{generators} feature has been enabled. It will always + be enabled in Python 2.3. This \code{__future__} import statment can + be used to enable the feature:} + + \begin{verbatim} + from __future__ import generators + \end{verbatim} + + \begin{seealso} \seepep{0255}{Simple Generators} From fdrake@users.sourceforge.net Wed Dec 12 06:20:37 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Tue, 11 Dec 2001 22:20:37 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib getopt.py,1.15,1.16 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv13662/Lib Modified Files: getopt.py Log Message: Wrapped a long line. Converted to use "".startswith() to avoid slicing (& temp string creation). Index: getopt.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/getopt.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** getopt.py 2001/01/20 23:34:12 1.15 --- getopt.py 2001/12/12 06:20:34 1.16 *************** *** 69,73 **** args = args[1:] break ! if args[0][:2] == '--': opts, args = do_longs(opts, args[0][2:], longopts, args[1:]) else: --- 69,73 ---- args = args[1:] break ! if args[0].startswith('--'): opts, args = do_longs(opts, args[0][2:], longopts, args[1:]) else: *************** *** 125,129 **** if optstring == '': if not args: ! raise GetoptError('option -%s requires argument' % opt, opt) optstring, args = args[0], args[1:] optarg, optstring = optstring, '' --- 125,130 ---- if optstring == '': if not args: ! raise GetoptError('option -%s requires argument' % opt, ! opt) optstring, args = args[0], args[1:] optarg, optstring = optstring, '' *************** *** 136,140 **** for i in range(len(shortopts)): if opt == shortopts[i] != ':': ! return shortopts[i+1:i+2] == ':' raise GetoptError('option -%s not recognized' % opt, opt) --- 137,141 ---- for i in range(len(shortopts)): if opt == shortopts[i] != ':': ! return shortopts.startswith(':', i+1) raise GetoptError('option -%s not recognized' % opt, opt) From fdrake@users.sourceforge.net Wed Dec 12 06:22:45 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Tue, 11 Dec 2001 22:22:45 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile,1.233,1.234 Message-ID: Update of /cvsroot/python/python/dist/src/Doc In directory usw-pr-cvs1:/tmp/cvs-serv14149/Doc Modified Files: Makefile Log Message: Added the iSilo documentation to the standard target for distribution files for "online" (as opposed to typeset) formats. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.233 retrieving revision 1.234 diff -C2 -d -r1.233 -r1.234 *** Makefile 2001/11/16 17:34:38 1.233 --- Makefile 2001/12/12 06:22:43 1.234 *************** *** 588,592 **** paperdist: distpdf distps ! edist: disthtml distfiles: paperdist edist --- 588,592 ---- paperdist: distpdf distps ! edist: disthtml zipisilo distfiles: paperdist edist From mwh@users.sourceforge.net Wed Dec 12 11:46:55 2001 From: mwh@users.sourceforge.net (Michael Hudson) Date: Wed, 12 Dec 2001 03:46:55 -0800 Subject: [Python-checkins] CVS: python/dist/src README,1.131,1.132 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv24395 Modified Files: README Log Message: This is what Jason Tishler and I believe to be the state of play on Cygwin at present. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.131 retrieving revision 1.132 diff -C2 -d -r1.131 -r1.132 *** README 2001/12/06 21:49:02 1.131 --- README 2001/12/12 11:46:52 1.132 *************** *** 412,439 **** executable deep down in the framework. ! Cygwin: Cygwin Python builds OOTB when configured as follows: ! ! configure --with-threads=no ! assuming Cygwin 1.1.8-2 and gcc 2.95.3-1 or later. At the time ! of this writing, Cygwin pthread support is being significantly ! enhanced. Hopefully, there will be a Cygwin Python with thread ! support soon. ! Cygwin Python supports the building of shared extensions via the ! traditional Misc/Makefile.pre.in and the newer distutils methods. ! On NT/2000, the following regression tests fail: ! test_poll (hang) ! test_strftime ! Due to the test_poll hang on NT/2000, one should run the ! regression test using the following: ! PYTHONPATH= ./python.exe -tt ./Lib/test/regrtest.py -l -x test_poll ! On 9X/Me, in addition the above NT/2000 failures, it has been ! reported that the following regression tests also fail: test_pwd --- 412,449 ---- executable deep down in the framework. ! Cygwin: With recent (relative to the time of writing, 2001-12-11) ! Cygwin installations, Python builds and passes all tests on ! NT/2000 if the _socket module is linked statically. If the ! _socket module is linked dynamically (the default), then ! failures can occur under certain conditions related to fork(). ! This is a known Cygwin problem that may be resolved by rebasing ! the necessary DLLs to prevent base address conflicts. ! Threads support should still be disable due to a known bug in ! Cygwin pthreads that causes test_threadedtempfile to hang. ! To workaround the above, run "./configure --with-threads=no" and ! include any other options you need (--prefix, etc.). Then in ! Modules/Setup uncomment the lines: ! #SSL=/usr/local/ssl ! #_socket socketmodule.c \ ! # -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ ! # -L$(SSL)/lib -lssl -lcrypto ! and remove "local/" from the SSL variable. And finally, just ! run "make"! ! The _curses module does not build. This is an known Cygwin ! ncurses problem that should be resolved the next time that this ! package is released. ! On older versions of Cygwin, test_poll may hang and test_strftime ! may fail. ! The situation on 9X/Me/XP is not accurately known at present. ! However, it is expected that XP should be the same (or at least ! very similar to) NT/2000. Some time ago, there were reports that ! the following regression tests failed on 9X/Me: test_pwd *************** *** 441,452 **** test_socket ! Due to the test_poll and test_select hang on 9X/Me, one should ! run the regression test using the following: ! ! PYTHONPATH= ./python.exe -tt ./Lib/test/regrtest.py -l -x test_poll -x test_select ! Help trying to track down the root causes for these known problems ! will be greatly appreciated. Configuring threads --- 451,461 ---- test_socket ! Due to the test_select hang on 9X/Me, one should run the regression ! test using the following: ! make TESTOPTS='-l -x test_select' test + News regarding these platforms with more recent Cygwin verions would + be appreciated! Configuring threads From mwh@users.sourceforge.net Wed Dec 12 11:56:35 2001 From: mwh@users.sourceforge.net (Michael Hudson) Date: Wed, 12 Dec 2001 03:56:35 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref5.tex,1.51,1.52 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory usw-pr-cvs1:/tmp/cvs-serv27164 Modified Files: ref5.tex Log Message: Fix for [ #429329 ] actual-parameters *arg, **kws not doc'd Index: ref5.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref5.tex,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** ref5.tex 2001/10/01 20:25:26 1.51 --- ref5.tex 2001/12/12 11:56:33 1.52 *************** *** 440,445 **** {\token{primary} "(" [\token{argument_list} [","]] ")"} \production{argument_list} ! {\token{positional_arguments} ["," \token{keyword_arguments}] ! | \token{keyword_arguments}} \production{positional_arguments} {\token{expression} ("," \token{expression})*} --- 440,450 ---- {\token{primary} "(" [\token{argument_list} [","]] ")"} \production{argument_list} ! {\token{positional_arguments} ["," \token{keyword_arguments} ! ["," "*" \token{expression} ["," "**" \token{expression}]]] ! | \token{keyword_arguments} ["," "*" \token{expression} ! ["," "**" \token{expression}]] ! | "*" \token{expression} ["," "**" \token{expression}] ! | "**" \token{expression} ! } \production{positional_arguments} {\token{expression} ("," \token{expression})*} *************** *** 495,498 **** --- 500,541 ---- values as corresponding values), or a (new) empty dictionary if there were no excess keyword arguments. + + If the syntax \samp{*expression} appears in the function call, + \samp{expression} must evaluate to a sequence. Elements from this + sequence are treated as if they were additional positional arguments; + if there are postional arguments \var{x1},...,\var{xN} , and + \samp{expression} evaluates to a sequence \var{y1},...,\var{yM}, this + is equivalent to a call with M+N positional arguments + \var{x1},...,\var{xN},\var{y1},...,\var{yM}. + + A consequence of this is that although the \samp{*expression} syntax + appears \emph{after} any keyword arguments, it is processed + \emph{before} the keyword arguments (and the \samp{**expression} + argument, if any -- see below). So: + + \begin{verbatim} + >>> def f(a, b): + ... print a, b + ... + >>> f(b=1, *(2,)) + 2 1 + >>> f(a=1, *(2,)) + Traceback (most recent call last): + File "", line 1, in ? + TypeError: f() got multiple values for keyword argument 'a' + >>> f(1, *(2,)) + 1 2 + \end{verbatim} + + It is unusual for both keyword arguments and the \samp{*expression} + syntax to be used in the same call, so in practice this confusion does + not arise. + + If the syntax \samp{**expression} appears in the function call, + \samp{expression} must evaluate to a (subclass of) dictionary, the + contents of which are treated as additional keyword arguments. In the + case of a keyword appearing in both \samp{expression} and as an + explicit keyword argument, a \exception{TypeError} exception is + raised. Formal parameters using the syntax \samp{*identifier} or From gvanrossum@users.sourceforge.net Wed Dec 12 12:48:01 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Wed, 12 Dec 2001 04:48:01 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/lib-tk ScrolledText.py,1.11,1.12 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/lib-tk In directory usw-pr-cvs1:/tmp/cvs-serv6613 Modified Files: ScrolledText.py Log Message: Fix for SF #491953 (Andrew Dalke): ScrolledText.py has TabError Untabified. Index: ScrolledText.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/ScrolledText.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ScrolledText.py 2001/12/10 16:42:43 1.11 --- ScrolledText.py 2001/12/12 12:47:57 1.12 *************** *** 35,41 **** # Copy geometry methods of self.frame -- hack! ! methods = Pack.__dict__.keys() ! methods = methods + Grid.__dict__.keys() ! methods = methods + Place.__dict__.keys() for m in methods: --- 35,41 ---- # Copy geometry methods of self.frame -- hack! ! methods = Pack.__dict__.keys() ! methods = methods + Grid.__dict__.keys() ! methods = methods + Place.__dict__.keys() for m in methods: From jvr@users.sourceforge.net Wed Dec 12 20:48:56 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Wed, 12 Dec 2001 12:48:56 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/carbonevt CarbonEvtscan.py,1.2,1.3 CarbonEvtsupport.py,1.4,1.5 _CarbonEvtmodule.c,1.1,1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/carbonevt In directory usw-pr-cvs1:/tmp/cvs-serv19463 Modified Files: CarbonEvtscan.py CarbonEvtsupport.py _CarbonEvtmodule.c Log Message: Exposed quite a few more calls. Index: CarbonEvtscan.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/carbonevt/CarbonEvtscan.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CarbonEvtscan.py 2001/11/05 16:15:40 1.2 --- CarbonEvtscan.py 2001/12/12 20:48:53 1.3 *************** *** 36,40 **** ] ! class CarbonEvents_Scanner(Scanner): def destination(self, type, name, arglist): classname = "CarbonEventsFunction" --- 36,40 ---- ] ! class CarbonEvents_Scanner(Scanner_OSX): def destination(self, type, name, arglist): classname = "CarbonEventsFunction" *************** *** 51,56 **** --- 51,65 ---- return classname, listname + def writeinitialdefs(self): + self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n") + self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n") + self.defsfile.write("false = 0\n") + self.defsfile.write("true = 1\n") + self.defsfile.write("keyAEEventClass = FOUR_CHAR_CODE('evcl')\n") + self.defsfile.write("keyAEEventID = FOUR_CHAR_CODE('evti')\n") + def makeblacklistnames(self): return [ + "sHandler", "MacCreateEvent", "TrackMouseLocationWithOptions", *************** *** 65,68 **** --- 74,83 ---- "InvokeEventComparatorUPP", "InvokeEventLoopTimerUPP", + "NewEventComparatorUPP", + "NewEventLoopTimerUPP", + "NewEventHandlerUPP", + "DisposeEventComparatorUPP", + "DisposeEventLoopTimerUPP", + "DisposeEventHandlerUPP", # Wrote by hand Index: CarbonEvtsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/carbonevt/CarbonEvtsupport.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CarbonEvtsupport.py 2001/12/11 21:52:01 1.4 --- CarbonEvtsupport.py 2001/12/12 20:48:53 1.5 *************** *** 12,28 **** exec execstr ! # these types will have no methods and will merely be opaque blobs ! # should write getattr and setattr for them? ! StructObjectTypes = ["EventTypeSpec", ! "HIPoint", ! "HICommand", ! "EventHotKeyID", ! ] ! for typ in StructObjectTypes: ! execstr = "%(name)s = OpaqueType('%(name)s')" % {"name": typ} ! exec execstr EventTypeSpec_ptr = OpaqueType("EventTypeSpec", "EventTypeSpec") --- 12,30 ---- exec execstr ! if 0: ! # these types will have no methods and will merely be opaque blobs ! # should write getattr and setattr for them? ! StructObjectTypes = ["EventTypeSpec", ! "HIPoint", ! "HICommand", ! "EventHotKeyID", ! ] ! for typ in StructObjectTypes: ! execstr = "%(name)s = OpaqueType('%(name)s')" % {"name": typ} ! exec execstr + EventHotKeyID = OpaqueByValueType("EventHotKeyID", "EventHotKeyID") EventTypeSpec_ptr = OpaqueType("EventTypeSpec", "EventTypeSpec") *************** *** 52,56 **** CarbonEventsMethod = OSErrMethodGenerator ! includestuff = """ #ifdef WITHOUT_FRAMEWORKS #include --- 54,58 ---- CarbonEventsMethod = OSErrMethodGenerator ! includestuff = r""" #ifdef WITHOUT_FRAMEWORKS #include *************** *** 61,66 **** #include "macglue.h" ! #define USE_MAC_MP_MULTITHREADING 1 #if USE_MAC_MP_MULTITHREADING static PyThreadState *_save; --- 63,76 ---- #include "macglue.h" ! /* Macro to test whether a weak-loaded CFM function exists */ ! #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ ! PyErr_SetString(PyExc_NotImplementedError, \ ! "Not available in this shared library/OS version"); \ ! return; \ ! }} while(0) + + #define USE_MAC_MP_MULTITHREADING 0 + #if USE_MAC_MP_MULTITHREADING static PyThreadState *_save; *************** *** 132,140 **** /********** end EventHotKeyID *******/ ! /******** handlecommand ***********/ ! static EventHandlerUPP gEventHandlerUPP; ! pascal OSStatus CarbonEvents_HandleEvent(EventHandlerCallRef handlerRef, EventRef event, void *outPyObject) { PyObject *retValue; int status; --- 142,150 ---- /********** end EventHotKeyID *******/ ! /******** myEventHandler ***********/ ! static EventHandlerUPP myEventHandlerUPP; ! pascal OSStatus myEventHandler(EventHandlerCallRef handlerRef, EventRef event, void *outPyObject) { PyObject *retValue; int status; *************** *** 156,165 **** } ! /******** end handlecommand ***********/ """ initstuff = initstuff + """ ! gEventHandlerUPP = NewEventHandlerUPP(CarbonEvents_HandleEvent); """ module = MacModule('_CarbonEvt', 'CarbonEvents', includestuff, finalstuff, initstuff) --- 166,176 ---- } ! /******** end myEventHandler ***********/ """ initstuff = initstuff + """ ! PyMac_PRECHECK(NewEventHandlerUPP); /* This can fail if CarbonLib is too old */ ! myEventHandlerUPP = NewEventHandlerUPP(myEventHandler); """ module = MacModule('_CarbonEvt', 'CarbonEvents', includestuff, finalstuff, initstuff) *************** *** 198,202 **** return NULL; ! _err = InstallEventHandler(_self->ob_itself, gEventHandlerUPP, 1, &inSpec, (void *)callback, &outRef); if (_err != noErr) return PyMac_Error(_err); --- 209,213 ---- return NULL; ! _err = InstallEventHandler(_self->ob_itself, myEventHandlerUPP, 1, &inSpec, (void *)callback, &outRef); if (_err != noErr) return PyMac_Error(_err); *************** *** 210,214 **** #if USE_MAC_MP_MULTITHREADING if (MPCreateCriticalRegion(&reentrantLock) != noErr) { ! printf("lock failure\\n"); return NULL; } --- 221,225 ---- #if USE_MAC_MP_MULTITHREADING if (MPCreateCriticalRegion(&reentrantLock) != noErr) { ! PySys_WriteStderr("lock failure\\n"); return NULL; } Index: _CarbonEvtmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/carbonevt/_CarbonEvtmodule.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** _CarbonEvtmodule.c 2001/12/11 21:52:02 1.1 --- _CarbonEvtmodule.c 2001/12/12 20:48:53 1.2 *************** *** 14,18 **** #include "macglue.h" ! #define USE_MAC_MP_MULTITHREADING 1 #if USE_MAC_MP_MULTITHREADING --- 14,26 ---- #include "macglue.h" ! /* Macro to test whether a weak-loaded CFM function exists */ ! #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ ! PyErr_SetString(PyExc_NotImplementedError, \ ! "Not available in this shared library/OS version"); \ ! return; \ ! }} while(0) ! ! ! #define USE_MAC_MP_MULTITHREADING 0 #if USE_MAC_MP_MULTITHREADING *************** *** 85,93 **** /********** end EventHotKeyID *******/ ! /******** handlecommand ***********/ ! static EventHandlerUPP gEventHandlerUPP; ! pascal OSStatus CarbonEvents_HandleEvent(EventHandlerCallRef handlerRef, EventRef event, void *outPyObject) { PyObject *retValue; int status; --- 93,101 ---- /********** end EventHotKeyID *******/ ! /******** myEventHandler ***********/ ! static EventHandlerUPP myEventHandlerUPP; ! pascal OSStatus myEventHandler(EventHandlerCallRef handlerRef, EventRef event, void *outPyObject) { PyObject *retValue; int status; *************** *** 109,113 **** } ! /******** end handlecommand ***********/ --- 117,121 ---- } ! /******** end myEventHandler ***********/ *************** *** 1060,1064 **** return NULL; ! _err = InstallEventHandler(_self->ob_itself, gEventHandlerUPP, 1, &inSpec, (void *)callback, &outRef); if (_err != noErr) return PyMac_Error(_err); --- 1068,1072 ---- return NULL; ! _err = InstallEventHandler(_self->ob_itself, myEventHandlerUPP, 1, &inSpec, (void *)callback, &outRef); if (_err != noErr) return PyMac_Error(_err); *************** *** 1147,1151 **** --- 1155,1174 ---- } + static PyObject *EventHotKeyRef_UnregisterEventHotKey(EventHotKeyRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + OSStatus _err; + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _err = UnregisterEventHotKey(_self->ob_itself); + if (_err != noErr) return PyMac_Error(_err); + Py_INCREF(Py_None); + _res = Py_None; + return _res; + } + static PyMethodDef EventHotKeyRef_methods[] = { + {"UnregisterEventHotKey", (PyCFunction)EventHotKeyRef_UnregisterEventHotKey, 1, + "() -> None"}, {NULL, NULL, 0} }; *************** *** 1367,1370 **** --- 1390,1405 ---- } + static PyObject *CarbonEvents_GetEventDispatcherTarget(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + EventTargetRef _rv; + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = GetEventDispatcherTarget(); + _res = Py_BuildValue("O&", + EventTargetRef_New, _rv); + return _res; + } + static PyObject *CarbonEvents_QuitApplicationEventLoop(PyObject *_self, PyObject *_args) { *************** *** 1378,1381 **** --- 1413,1476 ---- } + static PyObject *CarbonEvents_RunAppModalLoopForWindow(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + OSStatus _err; + WindowPtr inWindow; + if (!PyArg_ParseTuple(_args, "O&", + WinObj_Convert, &inWindow)) + return NULL; + _err = RunAppModalLoopForWindow(inWindow); + if (_err != noErr) return PyMac_Error(_err); + Py_INCREF(Py_None); + _res = Py_None; + return _res; + } + + static PyObject *CarbonEvents_QuitAppModalLoopForWindow(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + OSStatus _err; + WindowPtr inWindow; + if (!PyArg_ParseTuple(_args, "O&", + WinObj_Convert, &inWindow)) + return NULL; + _err = QuitAppModalLoopForWindow(inWindow); + if (_err != noErr) return PyMac_Error(_err); + Py_INCREF(Py_None); + _res = Py_None; + return _res; + } + + static PyObject *CarbonEvents_BeginAppModalStateForWindow(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + OSStatus _err; + WindowPtr inWindow; + if (!PyArg_ParseTuple(_args, "O&", + WinObj_Convert, &inWindow)) + return NULL; + _err = BeginAppModalStateForWindow(inWindow); + if (_err != noErr) return PyMac_Error(_err); + Py_INCREF(Py_None); + _res = Py_None; + return _res; + } + + static PyObject *CarbonEvents_EndAppModalStateForWindow(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + OSStatus _err; + WindowPtr inWindow; + if (!PyArg_ParseTuple(_args, "O&", + WinObj_Convert, &inWindow)) + return NULL; + _err = EndAppModalStateForWindow(inWindow); + if (_err != noErr) return PyMac_Error(_err); + Py_INCREF(Py_None); + _res = Py_None; + return _res; + } + static PyObject *CarbonEvents_SetUserFocusWindow(PyObject *_self, PyObject *_args) { *************** *** 1475,1478 **** --- 1570,1602 ---- } + static PyObject *CarbonEvents_RegisterEventHotKey(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + OSStatus _err; + UInt32 inHotKeyCode; + UInt32 inHotKeyModifiers; + EventHotKeyID inHotKeyID; + EventTargetRef inTarget; + OptionBits inOptions; + EventHotKeyRef outRef; + if (!PyArg_ParseTuple(_args, "llO&O&l", + &inHotKeyCode, + &inHotKeyModifiers, + EventHotKeyID_Convert, &inHotKeyID, + EventTargetRef_Convert, &inTarget, + &inOptions)) + return NULL; + _err = RegisterEventHotKey(inHotKeyCode, + inHotKeyModifiers, + inHotKeyID, + inTarget, + inOptions, + &outRef); + if (_err != noErr) return PyMac_Error(_err); + _res = Py_BuildValue("O&", + EventHotKeyRef_New, outRef); + return _res; + } + static PyObject *CarbonEvents_RunApplicationEventLoop(PyObject *_self, PyObject *_args) { *************** *** 1481,1485 **** #if USE_MAC_MP_MULTITHREADING if (MPCreateCriticalRegion(&reentrantLock) != noErr) { ! printf("lock failure\n"); return NULL; } --- 1605,1609 ---- #if USE_MAC_MP_MULTITHREADING if (MPCreateCriticalRegion(&reentrantLock) != noErr) { ! PySys_WriteStderr("lock failure\n"); return NULL; } *************** *** 1528,1533 **** --- 1652,1667 ---- {"GetUserFocusEventTarget", (PyCFunction)CarbonEvents_GetUserFocusEventTarget, 1, "() -> (EventTargetRef _rv)"}, + {"GetEventDispatcherTarget", (PyCFunction)CarbonEvents_GetEventDispatcherTarget, 1, + "() -> (EventTargetRef _rv)"}, {"QuitApplicationEventLoop", (PyCFunction)CarbonEvents_QuitApplicationEventLoop, 1, "() -> None"}, + {"RunAppModalLoopForWindow", (PyCFunction)CarbonEvents_RunAppModalLoopForWindow, 1, + "(WindowPtr inWindow) -> None"}, + {"QuitAppModalLoopForWindow", (PyCFunction)CarbonEvents_QuitAppModalLoopForWindow, 1, + "(WindowPtr inWindow) -> None"}, + {"BeginAppModalStateForWindow", (PyCFunction)CarbonEvents_BeginAppModalStateForWindow, 1, + "(WindowPtr inWindow) -> None"}, + {"EndAppModalStateForWindow", (PyCFunction)CarbonEvents_EndAppModalStateForWindow, 1, + "(WindowPtr inWindow) -> None"}, {"SetUserFocusWindow", (PyCFunction)CarbonEvents_SetUserFocusWindow, 1, "(WindowPtr inWindow) -> None"}, *************** *** 1542,1545 **** --- 1676,1681 ---- {"GetWindowCancelButton", (PyCFunction)CarbonEvents_GetWindowCancelButton, 1, "(WindowPtr inWindow) -> (ControlHandle outControl)"}, + {"RegisterEventHotKey", (PyCFunction)CarbonEvents_RegisterEventHotKey, 1, + "(UInt32 inHotKeyCode, UInt32 inHotKeyModifiers, EventHotKeyID inHotKeyID, EventTargetRef inTarget, OptionBits inOptions) -> (EventHotKeyRef outRef)"}, {"RunApplicationEventLoop", (PyCFunction)CarbonEvents_RunApplicationEventLoop, 1, "() -> ()"}, *************** *** 1557,1561 **** ! gEventHandlerUPP = NewEventHandlerUPP(CarbonEvents_HandleEvent); --- 1693,1698 ---- ! PyMac_PRECHECK(NewEventHandlerUPP); /* This can fail if CarbonLib is too old */ ! myEventHandlerUPP = NewEventHandlerUPP(myEventHandler); From jvr@users.sourceforge.net Wed Dec 12 20:51:24 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Wed, 12 Dec 2001 12:51:24 -0800 Subject: [Python-checkins] CVS: python/dist/src/Tools/bgen/bgen scantools.py,1.24,1.25 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/bgen/bgen In directory usw-pr-cvs1:/tmp/cvs-serv20139 Modified Files: scantools.py Log Message: OSX tweak: recognize both EXTERN_API_C and EXTERN_API declarations. Jack: I hope I didn't break anything for you! Index: scantools.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/bgen/bgen/scantools.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** scantools.py 2001/10/30 13:11:24 1.24 --- scantools.py 2001/12/12 20:51:22 1.25 *************** *** 586,591 **** def initpatterns(self): Scanner.initpatterns(self) ! self.head_pat = "^EXTERN_API_C" ! self.type_pat = "EXTERN_API_C" + \ "[ \t\n]*([ \t\n]*" + \ "\([a-zA-Z0-9_* \t]*[a-zA-Z0-9_*]\)" + \ --- 586,591 ---- def initpatterns(self): Scanner.initpatterns(self) ! self.head_pat = "^EXTERN_API\(_C\)?" ! self.type_pat = "EXTERN_API\(_C\)?" + \ "[ \t\n]*([ \t\n]*" + \ "\([a-zA-Z0-9_* \t]*[a-zA-Z0-9_*]\)" + \ From jackjansen@users.sourceforge.net Wed Dec 12 21:40:30 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 12 Dec 2001 13:40:30 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/OSXResources/framework Info.plist,1.1,1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/OSXResources/framework In directory usw-pr-cvs1:/tmp/cvs-serv3638/Python/Mac/OSXResources/framework Modified Files: Info.plist Log Message: Ready for 2.2 distribution. Index: Info.plist =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/OSXResources/framework/Info.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Info.plist 2001/08/08 22:00:26 1.1 --- Info.plist 2001/12/12 21:40:28 1.2 *************** *** 18,26 **** FMWK CFBundleShortVersionString ! 2.2a1 CFBundleSignature ???? CFBundleVersion ! vecLib 1.1-4 --- 18,26 ---- FMWK CFBundleShortVersionString ! 2.2 CFBundleSignature ???? CFBundleVersion ! 2.2 From jackjansen@users.sourceforge.net Wed Dec 12 21:40:35 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 12 Dec 2001 13:40:35 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/OSXResources/framework version.plist,1.1,1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/OSXResources/framework In directory usw-pr-cvs1:/tmp/cvs-serv3682/Python/Mac/OSXResources/framework Modified Files: version.plist Log Message: Ready for 2.2 distribution. Index: version.plist =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/OSXResources/framework/version.plist,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** version.plist 2001/08/08 22:00:26 1.1 --- version.plist 2001/12/12 21:40:33 1.2 *************** *** 6,18 **** 1 CFBundleShortVersionString ! 2.2a1 CFBundleVersion ! Python 2.2a1 ProjectName Python ReleaseStatus ! alfa SourceVersion ! 2.2a1 --- 6,18 ---- 1 CFBundleShortVersionString ! 2.2 CFBundleVersion ! Python 2.2 ProjectName Python ReleaseStatus ! final SourceVersion ! 2.2 From jackjansen@users.sourceforge.net Wed Dec 12 21:40:40 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 12 Dec 2001 13:40:40 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/OSXResources/app Info.plist,1.3,1.4 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/OSXResources/app In directory usw-pr-cvs1:/tmp/cvs-serv3741/Python/Mac/OSXResources/app Modified Files: Info.plist Log Message: Ready for 2.2 distribution. Index: Info.plist =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/OSXResources/app/Info.plist,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Info.plist 2001/09/11 13:01:07 1.3 --- Info.plist 2001/12/12 21:40:38 1.4 *************** *** 52,57 **** CFBundleExecutable python CFBundleGetInfoString ! Python Interpreter version 2.2a3, (c) 2001 Python Software Foundation. CFBundleIconFile PythonInterpreter.icns --- 52,65 ---- CFBundleExecutable python + CFBundleGetInfoString ! Python Interpreter version 2.2, (c) 2001 Python Software Foundation. ! CFBundleLongVersionString ! 2.2, (c) 2001 Python Software Foundation. ! NSHumanReadableCopyright ! Copyright 2001 Python Software Foundation. ! CFBundleShortVersionString ! 6.5 ! CFBundleIconFile PythonInterpreter.icns *************** *** 64,73 **** CFBundlePackageType APPL - CFBundleShortVersionString - Python Interpreter version 2.2a3 CFBundleSignature PytX CFBundleVersion ! 2.2a3 CSResourcesFileMapped --- 72,81 ---- CFBundlePackageType APPL CFBundleSignature PytX CFBundleVersion ! 2.2 ! LSRequiresCarbon ! CSResourcesFileMapped From jvr@users.sourceforge.net Wed Dec 12 21:48:03 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Wed, 12 Dec 2001 13:48:03 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/carbonevt CarbonEvtsupport.py,1.5,1.6 _CarbonEvtmodule.c,1.2,1.3 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/carbonevt In directory usw-pr-cvs1:/tmp/cvs-serv5843 Modified Files: CarbonEvtsupport.py _CarbonEvtmodule.c Log Message: Added proper error checking in event callback handler Index: CarbonEvtsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/carbonevt/CarbonEvtsupport.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CarbonEvtsupport.py 2001/12/12 20:48:53 1.5 --- CarbonEvtsupport.py 2001/12/12 21:48:00 1.6 *************** *** 65,72 **** /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ ! PyErr_SetString(PyExc_NotImplementedError, \ ! "Not available in this shared library/OS version"); \ ! return; \ ! }} while(0) --- 65,72 ---- /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ ! PyErr_SetString(PyExc_NotImplementedError, \ ! "Not available in this shared library/OS version"); \ ! return; \ ! }} while(0) *************** *** 146,167 **** static EventHandlerUPP myEventHandlerUPP; ! pascal OSStatus myEventHandler(EventHandlerCallRef handlerRef, EventRef event, void *outPyObject) { PyObject *retValue; int status; #if USE_MAC_MP_MULTITHREADING ! MPEnterCriticalRegion(reentrantLock, kDurationForever); ! PyEval_RestoreThread(_save); #endif /* USE_MAC_MP_MULTITHREADING */ ! retValue = PyObject_CallFunction((PyObject *)outPyObject, "O&O&", EventHandlerCallRef_New, handlerRef, EventRef_New, event); ! status = PyInt_AsLong(retValue); #if USE_MAC_MP_MULTITHREADING ! _save = PyEval_SaveThread(); ! MPExitCriticalRegion(reentrantLock); #endif /* USE_MAC_MP_MULTITHREADING */ ! return status; } --- 146,180 ---- static EventHandlerUPP myEventHandlerUPP; ! static pascal OSStatus ! myEventHandler(EventHandlerCallRef handlerRef, EventRef event, void *outPyObject) { PyObject *retValue; int status; #if USE_MAC_MP_MULTITHREADING ! MPEnterCriticalRegion(reentrantLock, kDurationForever); ! PyEval_RestoreThread(_save); #endif /* USE_MAC_MP_MULTITHREADING */ ! retValue = PyObject_CallFunction((PyObject *)outPyObject, "O&O&", EventHandlerCallRef_New, handlerRef, EventRef_New, event); ! if (retValue == NULL) { ! PySys_WriteStderr("Error in event handler callback:\n"); ! PyErr_Print(); /* this also clears the error */ ! status = noErr; /* complain? how? */ ! } else { ! if (retValue == Py_None) ! status = noErr; ! else if (PyInt_Check(retValue)) { ! status = PyInt_AsLong(retValue); ! } else ! status = noErr; /* wrong object type, complain? */ ! Py_DECREF(retValue); ! } #if USE_MAC_MP_MULTITHREADING ! _save = PyEval_SaveThread(); ! MPExitCriticalRegion(reentrantLock); #endif /* USE_MAC_MP_MULTITHREADING */ ! return status; } Index: _CarbonEvtmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/carbonevt/_CarbonEvtmodule.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** _CarbonEvtmodule.c 2001/12/12 20:48:53 1.2 --- _CarbonEvtmodule.c 2001/12/12 21:48:00 1.3 *************** *** 16,23 **** /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ ! PyErr_SetString(PyExc_NotImplementedError, \ ! "Not available in this shared library/OS version"); \ ! return; \ ! }} while(0) --- 16,23 ---- /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ ! PyErr_SetString(PyExc_NotImplementedError, \ ! "Not available in this shared library/OS version"); \ ! return; \ ! }} while(0) *************** *** 97,118 **** static EventHandlerUPP myEventHandlerUPP; ! pascal OSStatus myEventHandler(EventHandlerCallRef handlerRef, EventRef event, void *outPyObject) { PyObject *retValue; int status; #if USE_MAC_MP_MULTITHREADING ! MPEnterCriticalRegion(reentrantLock, kDurationForever); ! PyEval_RestoreThread(_save); #endif /* USE_MAC_MP_MULTITHREADING */ ! retValue = PyObject_CallFunction((PyObject *)outPyObject, "O&O&", EventHandlerCallRef_New, handlerRef, EventRef_New, event); ! status = PyInt_AsLong(retValue); #if USE_MAC_MP_MULTITHREADING ! _save = PyEval_SaveThread(); ! MPExitCriticalRegion(reentrantLock); #endif /* USE_MAC_MP_MULTITHREADING */ ! return status; } --- 97,131 ---- static EventHandlerUPP myEventHandlerUPP; ! static pascal OSStatus ! myEventHandler(EventHandlerCallRef handlerRef, EventRef event, void *outPyObject) { PyObject *retValue; int status; #if USE_MAC_MP_MULTITHREADING ! MPEnterCriticalRegion(reentrantLock, kDurationForever); ! PyEval_RestoreThread(_save); #endif /* USE_MAC_MP_MULTITHREADING */ ! retValue = PyObject_CallFunction((PyObject *)outPyObject, "O&O&", EventHandlerCallRef_New, handlerRef, EventRef_New, event); ! if (retValue == NULL) { ! PySys_WriteStderr("Error in event handler callback:\n"); ! PyErr_Print(); /* this also clears the error */ ! status = noErr; /* complain? how? */ ! } else { ! if (retValue == Py_None) ! status = noErr; ! else if (PyInt_Check(retValue)) { ! status = PyInt_AsLong(retValue); ! } else ! status = noErr; /* wrong object type, complain? */ ! Py_DECREF(retValue); ! } #if USE_MAC_MP_MULTITHREADING ! _save = PyEval_SaveThread(); ! MPExitCriticalRegion(reentrantLock); #endif /* USE_MAC_MP_MULTITHREADING */ ! return status; } From jvr@users.sourceforge.net Wed Dec 12 22:38:29 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Wed, 12 Dec 2001 14:38:29 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/ctl _Ctlmodule.c,1.5,1.6 ctlscan.py,1.20,1.21 ctlsupport.py,1.43,1.44 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/ctl In directory usw-pr-cvs1:/tmp/cvs-serv20455 Modified Files: _Ctlmodule.c ctlscan.py ctlsupport.py Log Message: Updated for Universal Headers 3.4. Index: _Ctlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/_Ctlmodule.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** _Ctlmodule.c 2001/12/08 18:02:52 1.5 --- _Ctlmodule.c 2001/12/12 22:38:27 1.6 *************** *** 476,480 **** { PyObject *_res = NULL; ! SInt16 _rv; SInt16 inKeyCode; SInt16 inCharCode; --- 476,480 ---- { PyObject *_res = NULL; ! ControlPartCode _rv; SInt16 inKeyCode; [...2355 lines suppressed...] + {"CreateStaticTextControl", (PyCFunction)Ctl_CreateStaticTextControl, 1, + "(WindowPtr window, Rect boundsRect, CFStringRef text, ControlFontStyleRec style) -> (ControlHandle outControl)"}, + {"CreateWindowHeaderControl", (PyCFunction)Ctl_CreateWindowHeaderControl, 1, + "(WindowPtr window, Rect boundsRect, Boolean isListHeader) -> (ControlHandle outControl)"}, + {"CreatePushButtonControl", (PyCFunction)Ctl_CreatePushButtonControl, 1, + "(WindowPtr window, Rect boundsRect, CFStringRef title) -> (ControlHandle outControl)"}, + {"CreateRadioButtonControl", (PyCFunction)Ctl_CreateRadioButtonControl, 1, + "(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)"}, + {"CreateCheckBoxControl", (PyCFunction)Ctl_CreateCheckBoxControl, 1, + "(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)"}, + {"CreatePopupButtonControl", (PyCFunction)Ctl_CreatePopupButtonControl, 1, + "(WindowPtr window, Rect boundsRect, CFStringRef title, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle) -> (ControlHandle outControl)"}, + {"CreateRadioGroupControl", (PyCFunction)Ctl_CreateRadioGroupControl, 1, + "(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)"}, + {"CreateScrollingTextBoxControl", (PyCFunction)Ctl_CreateScrollingTextBoxControl, 1, + "(WindowPtr window, Rect boundsRect, SInt16 contentResID, Boolean autoScroll, UInt32 delayBeforeAutoScroll, UInt32 delayBetweenAutoScroll, UInt16 autoScrollAmount) -> (ControlHandle outControl)"}, + {"CreateDataBrowserControl", (PyCFunction)Ctl_CreateDataBrowserControl, 1, + "(WindowPtr window, Rect boundsRect, OSType style) -> (ControlHandle outControl)"}, {"as_Control", (PyCFunction)Ctl_as_Control, 1, "(Handle h) -> (ControlHandle _rv)"}, Index: ctlscan.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctlscan.py,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ctlscan.py 2001/06/20 21:31:23 1.20 --- ctlscan.py 2001/12/12 22:38:27 1.21 *************** *** 37,40 **** --- 37,45 ---- self.defsfile.write("from QuickDraw import *\n") self.defsfile.write("from Dragconst import *\n") + self.defsfile.write("from CarbonEvents import *\n") + self.defsfile.write("from Appearance import *\n") + self.defsfile.write("kDataBrowserItemAnyState = -1\n") + self.defsfile.write("kControlBevelButtonCenterPopupGlyphTag = -1\n") + self.defsfile.write("kDataBrowserClientPropertyFlagsMask = 0xFF << 24 # kDataBrowserClientPropertyFlagsOffset\n") self.defsfile.write("\n") *************** *** 49,53 **** 'GetControlData', # Generated manually 'kControlBevelButtonCenterPopupGlyphTag', # Constant with funny definition ! 'kControlProgressBarIndeterminateTag', # ditto # The following are unavailable for static 68k (appearance manager) ## 'GetBevelButtonMenuValue', --- 54,59 ---- 'GetControlData', # Generated manually 'kControlBevelButtonCenterPopupGlyphTag', # Constant with funny definition ! 'kDataBrowserClientPropertyFlagsMask', # ditto ! 'kDataBrowserItemAnyState', # and ditto # The following are unavailable for static 68k (appearance manager) ## 'GetBevelButtonMenuValue', *************** *** 81,84 **** --- 87,98 ---- 'GetControlPropertySize', 'SendControlMessage', # Parameter changed from long to void* from UH3.3 to UH3.4 + # unavailable in Just's CW6 + UH 3.4 libs + 'CreateDisclosureButtonControl', + 'CreateRelevanceBarControl', + 'DisableControl', + 'EnableControl', + 'IsControlEnabled', + 'CreateEditUnicodeTextControl', + 'CopyDataBrowserEditText', ] *************** *** 139,142 **** --- 153,173 ---- 'ControlDefSpec_ptr', # ditto 'Collection', # Ditto + # not-yet-supported stuff in Universal Headers 3.4: + 'ControlColorUPP', + 'ControlKind', # XXX easy: 2-tuple containing 2 OSType's + 'ControlTabEntry_ptr', # XXX needed for tabs + 'ControlButtonContentInfo', # XXX ugh: a union + 'ControlButtonContentInfo_ptr', # XXX ugh: a union + 'ListDefSpec_ptr', # XXX see _Listmodule.c, tricky but possible + 'DataBrowserItemID_ptr', # XXX array of UInt32, for BrowserView + 'DataBrowserItemUPP', + 'DataBrowserItemDataRef', # XXX void * + 'DataBrowserCallbacks', # difficult struct + 'DataBrowserCallbacks_ptr', + 'DataBrowserCustomCallbacks', + 'DataBrowserCustomCallbacks_ptr', + 'DataBrowserTableViewColumnDesc', + 'DataBrowserListViewColumnDesc', + 'CFDataRef', ] Index: ctlsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctlsupport.py,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** ctlsupport.py 2001/11/30 14:16:32 1.43 --- ctlsupport.py 2001/12/12 22:38:27 1.44 *************** *** 49,52 **** --- 49,84 ---- DragReference = OpaqueByValueType("DragReference", "DragObj") + CFStringRef = OpaqueByValueType("CFStringRef", "CFStringRefObj") + CFMutableStringRef = OpaqueByValueType("CFMutableStringRef", "CFMutableStringRefObj") + CFDataRef = OpaqueByValueType("CFDataRef", "CFDataRefObj") + + ControlTabSize = UInt16 + ControlTabDirection = UInt16 + ControlPopupArrowOrientation = UInt16 + ControlPopupArrowSize = UInt16 + ControlClockType = UInt16 + ControlClockFlags = UInt32 + ControlRoundButtonSize = SInt16 + DataBrowserViewStyle = OSType + DataBrowserItemID = UInt32 + DataBrowserEditCommand = UInt32 + DataBrowserSelectionAnchorDirection = UInt32 + DataBrowserItemState = UInt32 + DataBrowserPropertyID = UInt32 + DataBrowserRevealOptions = UInt8 + DataBrowserSortOrder = UInt16 + DataBrowserSelectionFlags = UInt32 + DataBrowserPropertyFlags = UInt32 + DataBrowserPropertyPart = OSType + DataBrowserTableViewColumnID = DataBrowserPropertyID + #DataBrowserTableViewColumnDesc = DataBrowserPropertyDesc + DataBrowserTableViewHiliteStyle = UInt32 + DataBrowserTableViewRowIndex = UInt32 + DataBrowserTableViewColumnIndex = UInt32 + DataBrowserPropertyType = OSType + ControlDisclosureTriangleOrientation = UInt16 + + + includestuff = includestuff + """ #ifdef WITHOUT_FRAMEWORKS From jvr@users.sourceforge.net Wed Dec 12 22:39:54 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Wed, 12 Dec 2001 14:39:54 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Lib/Carbon CarbonEvt.py,NONE,1.1 CarbonEvents.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Lib/Carbon In directory usw-pr-cvs1:/tmp/cvs-serv20839 Added Files: CarbonEvt.py CarbonEvents.py Log Message: Support files for CarbonEvents --- NEW FILE: CarbonEvt.py --- from _CarbonEvt import * --- NEW FILE: CarbonEvents.py --- # Generated from 'CarbonEvents.h' def FOUR_CHAR_CODE(x): return x def FOUR_CHAR_CODE(x): return x false = 0 true = 1 keyAEEventClass = FOUR_CHAR_CODE('evcl') keyAEEventID = FOUR_CHAR_CODE('evti') eventAlreadyPostedErr = -9860 eventClassInvalidErr = -9862 eventClassIncorrectErr = -9864 eventHandlerAlreadyInstalledErr = -9866 eventInternalErr = -9868 eventKindIncorrectErr = -9869 eventParameterNotFoundErr = -9870 eventNotHandledErr = -9874 eventLoopTimedOutErr = -9875 eventLoopQuitErr = -9876 eventNotInQueueErr = -9877 eventHotKeyExistsErr = -9878 eventHotKeyInvalidErr = -9879 kEventPriorityLow = 0 kEventPriorityStandard = 1 kEventPriorityHigh = 2 kEventLeaveInQueue = false kEventRemoveFromQueue = true kTrackMouseLocationOptionDontConsumeMouseUp = (1 << 0) kMouseTrackingMousePressed = 1 kMouseTrackingMouseReleased = 2 kMouseTrackingMouseExited = 3 kMouseTrackingMouseEntered = 4 kMouseTrackingMouseMoved = 5 kMouseTrackingKeyModifiersChanged = 6 kMouseTrackingUserCancelled = 7 kMouseTrackingTimedOut = 8 kEventAttributeNone = 0 kEventAttributeUserEvent = (1 << 0) kEventClassMouse = FOUR_CHAR_CODE('mous') kEventClassKeyboard = FOUR_CHAR_CODE('keyb') kEventClassTextInput = FOUR_CHAR_CODE('text') kEventClassApplication = FOUR_CHAR_CODE('appl') kEventClassAppleEvent = FOUR_CHAR_CODE('eppc') kEventClassMenu = FOUR_CHAR_CODE('menu') kEventClassWindow = FOUR_CHAR_CODE('wind') kEventClassControl = FOUR_CHAR_CODE('cntl') kEventClassCommand = FOUR_CHAR_CODE('cmds') kEventClassTablet = FOUR_CHAR_CODE('tblt') kEventClassVolume = FOUR_CHAR_CODE('vol ') kEventMouseDown = 1 kEventMouseUp = 2 kEventMouseMoved = 5 kEventMouseDragged = 6 kEventMouseWheelMoved = 10 kEventMouseButtonPrimary = 1 kEventMouseButtonSecondary = 2 kEventMouseButtonTertiary = 3 kEventMouseWheelAxisX = 0 kEventMouseWheelAxisY = 1 kEventTextInputUpdateActiveInputArea = 1 kEventTextInputUnicodeForKeyEvent = 2 kEventTextInputOffsetToPos = 3 kEventTextInputPosToOffset = 4 kEventTextInputShowHideBottomWindow = 5 kEventTextInputGetSelectedText = 6 kEventRawKeyDown = 1 kEventRawKeyRepeat = 2 kEventRawKeyUp = 3 kEventRawKeyModifiersChanged = 4 kEventHotKeyPressed = 5 kEventHotKeyReleased = 6 kEventKeyModifierNumLockBit = 16 kEventKeyModifierFnBit = 17 kEventKeyModifierNumLockMask = 1L << kEventKeyModifierNumLockBit kEventKeyModifierFnMask = 1L << kEventKeyModifierFnBit kEventAppActivated = 1 kEventAppDeactivated = 2 kEventAppQuit = 3 kEventAppLaunchNotification = 4 kEventAppLaunched = 5 kEventAppTerminated = 6 kEventAppFrontSwitched = 7 kEventAppleEvent = 1 kEventWindowUpdate = 1 kEventWindowDrawContent = 2 kEventWindowActivated = 5 kEventWindowDeactivated = 6 kEventWindowGetClickActivation = 7 kEventWindowShowing = 22 kEventWindowHiding = 23 kEventWindowShown = 24 kEventWindowHidden = 25 kEventWindowBoundsChanging = 26 kEventWindowBoundsChanged = 27 kEventWindowResizeStarted = 28 kEventWindowResizeCompleted = 29 kEventWindowDragStarted = 30 kEventWindowDragCompleted = 31 kWindowBoundsChangeUserDrag = (1 << 0) kWindowBoundsChangeUserResize = (1 << 1) kWindowBoundsChangeSizeChanged = (1 << 2) kWindowBoundsChangeOriginChanged = (1 << 3) kEventWindowClickDragRgn = 32 kEventWindowClickResizeRgn = 33 kEventWindowClickCollapseRgn = 34 kEventWindowClickCloseRgn = 35 kEventWindowClickZoomRgn = 36 kEventWindowClickContentRgn = 37 kEventWindowClickProxyIconRgn = 38 kEventWindowCursorChange = 40 kEventWindowCollapse = 66 kEventWindowCollapsed = 67 kEventWindowCollapseAll = 68 kEventWindowExpand = 69 kEventWindowExpanded = 70 kEventWindowExpandAll = 71 kEventWindowClose = 72 kEventWindowClosed = 73 kEventWindowCloseAll = 74 kEventWindowZoom = 75 kEventWindowZoomed = 76 kEventWindowZoomAll = 77 kEventWindowContextualMenuSelect = 78 kEventWindowPathSelect = 79 kEventWindowGetIdealSize = 80 kEventWindowGetMinimumSize = 81 kEventWindowGetMaximumSize = 82 kEventWindowConstrain = 83 kEventWindowHandleContentClick = 85 kEventWindowProxyBeginDrag = 128 kEventWindowProxyEndDrag = 129 kEventWindowFocusAcquired = 200 kEventWindowFocusRelinquish = 201 kEventWindowDrawFrame = 1000 kEventWindowDrawPart = 1001 kEventWindowGetRegion = 1002 kEventWindowHitTest = 1003 kEventWindowInit = 1004 kEventWindowDispose = 1005 kEventWindowDragHilite = 1006 kEventWindowModified = 1007 kEventWindowSetupProxyDragImage = 1008 kEventWindowStateChanged = 1009 kEventWindowMeasureTitle = 1010 kEventWindowDrawGrowBox = 1011 kEventWindowGetGrowImageRegion = 1012 kEventWindowPaint = 1013 kEventMenuBeginTracking = 1 kEventMenuEndTracking = 2 kEventMenuChangeTrackingMode = 3 kEventMenuOpening = 4 kEventMenuClosed = 5 kEventMenuTargetItem = 6 kEventMenuMatchKey = 7 kEventMenuEnableItems = 8 kEventMenuDispose = 1001 kEventProcessCommand = 1 kEventCommandProcess = 1 kEventCommandUpdateStatus = 2 kHICommandOK = FOUR_CHAR_CODE('ok ') kHICommandCancel = FOUR_CHAR_CODE('not!') kHICommandQuit = FOUR_CHAR_CODE('quit') kHICommandUndo = FOUR_CHAR_CODE('undo') kHICommandRedo = FOUR_CHAR_CODE('redo') kHICommandCut = FOUR_CHAR_CODE('cut ') kHICommandCopy = FOUR_CHAR_CODE('copy') kHICommandPaste = FOUR_CHAR_CODE('past') kHICommandClear = FOUR_CHAR_CODE('clea') kHICommandSelectAll = FOUR_CHAR_CODE('sall') kHICommandHide = FOUR_CHAR_CODE('hide') kHICommandPreferences = FOUR_CHAR_CODE('pref') kHICommandZoomWindow = FOUR_CHAR_CODE('zoom') kHICommandMinimizeWindow = FOUR_CHAR_CODE('mini') kHICommandArrangeInFront = FOUR_CHAR_CODE('frnt') kHICommandAbout = FOUR_CHAR_CODE('abou') kHICommandFromMenu = (1L << 0) kEventControlInitialize = 1000 kEventControlDispose = 1001 kEventControlGetOptimalBounds = 1003 kEventControlDefInitialize = kEventControlInitialize kEventControlDefDispose = kEventControlDispose kEventControlHit = 1 kEventControlSimulateHit = 2 kEventControlHitTest = 3 kEventControlDraw = 4 kEventControlApplyBackground = 5 kEventControlApplyTextColor = 6 kEventControlSetFocusPart = 7 kEventControlGetFocusPart = 8 kEventControlActivate = 9 kEventControlDeactivate = 10 kEventControlSetCursor = 11 kEventControlContextualMenuClick = 12 kEventControlClick = 13 kEventControlTrack = 51 kEventControlGetScrollToHereStartPoint = 52 kEventControlGetIndicatorDragConstraint = 53 kEventControlIndicatorMoved = 54 kEventControlGhostingFinished = 55 kEventControlGetActionProcPart = 56 kEventControlGetPartRegion = 101 kEventControlGetPartBounds = 102 kEventControlSetData = 103 kEventControlGetData = 104 kEventControlValueFieldChanged = 151 kEventControlAddedSubControl = 152 kEventControlRemovingSubControl = 153 kEventControlBoundsChanged = 154 kEventControlOwningWindowChanged = 159 kEventControlArbitraryMessage = 201 kControlBoundsChangeSizeChanged = (1 << 2) kControlBoundsChangePositionChanged = (1 << 3) kEventTabletPointer = 1 kEventTabletProximity = 2 kEventVolumeMounted = 1 kEventVolumeUnmounted = 2 typeFSVolumeRefNum = FOUR_CHAR_CODE('voln') kEventParamDirectObject = FOUR_CHAR_CODE('----') kEventParamWindowRef = FOUR_CHAR_CODE('wind') kEventParamGrafPort = FOUR_CHAR_CODE('graf') kEventParamDragRef = FOUR_CHAR_CODE('drag') kEventParamMenuRef = FOUR_CHAR_CODE('menu') kEventParamEventRef = FOUR_CHAR_CODE('evnt') kEventParamControlRef = FOUR_CHAR_CODE('ctrl') kEventParamRgnHandle = FOUR_CHAR_CODE('rgnh') kEventParamEnabled = FOUR_CHAR_CODE('enab') kEventParamDimensions = FOUR_CHAR_CODE('dims') kEventParamAvailableBounds = FOUR_CHAR_CODE('avlb') kEventParamAEEventID = keyAEEventID kEventParamAEEventClass = keyAEEventClass kEventParamCGContextRef = FOUR_CHAR_CODE('cntx') typeWindowRef = FOUR_CHAR_CODE('wind') typeGrafPtr = FOUR_CHAR_CODE('graf') typeGWorldPtr = FOUR_CHAR_CODE('gwld') typeDragRef = FOUR_CHAR_CODE('drag') typeMenuRef = FOUR_CHAR_CODE('menu') typeControlRef = FOUR_CHAR_CODE('ctrl') typeCollection = FOUR_CHAR_CODE('cltn') typeQDRgnHandle = FOUR_CHAR_CODE('rgnh') typeOSStatus = FOUR_CHAR_CODE('osst') typeCGContextRef = FOUR_CHAR_CODE('cntx') kEventParamMouseLocation = FOUR_CHAR_CODE('mloc') kEventParamMouseButton = FOUR_CHAR_CODE('mbtn') kEventParamClickCount = FOUR_CHAR_CODE('ccnt') kEventParamMouseWheelAxis = FOUR_CHAR_CODE('mwax') kEventParamMouseWheelDelta = FOUR_CHAR_CODE('mwdl') kEventParamMouseDelta = FOUR_CHAR_CODE('mdta') kEventParamMouseChord = FOUR_CHAR_CODE('chor') typeMouseButton = FOUR_CHAR_CODE('mbtn') typeMouseWheelAxis = FOUR_CHAR_CODE('mwax') kEventParamKeyCode = FOUR_CHAR_CODE('kcod') kEventParamKeyMacCharCodes = FOUR_CHAR_CODE('kchr') kEventParamKeyModifiers = FOUR_CHAR_CODE('kmod') kEventParamKeyUnicodes = FOUR_CHAR_CODE('kuni') typeEventHotKeyID = FOUR_CHAR_CODE('hkid') kEventParamTextInputSendRefCon = FOUR_CHAR_CODE('tsrc') kEventParamTextInputSendComponentInstance = FOUR_CHAR_CODE('tsci') kEventParamTextInputSendSLRec = FOUR_CHAR_CODE('tssl') kEventParamTextInputReplySLRec = FOUR_CHAR_CODE('trsl') kEventParamTextInputSendText = FOUR_CHAR_CODE('tstx') kEventParamTextInputReplyText = FOUR_CHAR_CODE('trtx') kEventParamTextInputSendUpdateRng = FOUR_CHAR_CODE('tsup') kEventParamTextInputSendHiliteRng = FOUR_CHAR_CODE('tshi') kEventParamTextInputSendClauseRng = FOUR_CHAR_CODE('tscl') kEventParamTextInputSendPinRng = FOUR_CHAR_CODE('tspn') kEventParamTextInputSendFixLen = FOUR_CHAR_CODE('tsfx') kEventParamTextInputSendLeadingEdge = FOUR_CHAR_CODE('tsle') kEventParamTextInputReplyLeadingEdge = FOUR_CHAR_CODE('trle') kEventParamTextInputSendTextOffset = FOUR_CHAR_CODE('tsto') kEventParamTextInputReplyTextOffset = FOUR_CHAR_CODE('trto') kEventParamTextInputReplyRegionClass = FOUR_CHAR_CODE('trrg') kEventParamTextInputSendCurrentPoint = FOUR_CHAR_CODE('tscp') kEventParamTextInputSendDraggingMode = FOUR_CHAR_CODE('tsdm') kEventParamTextInputReplyPoint = FOUR_CHAR_CODE('trpt') kEventParamTextInputReplyFont = FOUR_CHAR_CODE('trft') kEventParamTextInputReplyPointSize = FOUR_CHAR_CODE('trpz') kEventParamTextInputReplyLineHeight = FOUR_CHAR_CODE('trlh') kEventParamTextInputReplyLineAscent = FOUR_CHAR_CODE('trla') kEventParamTextInputReplyTextAngle = FOUR_CHAR_CODE('trta') kEventParamTextInputSendShowHide = FOUR_CHAR_CODE('tssh') kEventParamTextInputReplyShowHide = FOUR_CHAR_CODE('trsh') kEventParamTextInputSendKeyboardEvent = FOUR_CHAR_CODE('tske') kEventParamTextInputSendTextServiceEncoding = FOUR_CHAR_CODE('tsse') kEventParamTextInputSendTextServiceMacEncoding = FOUR_CHAR_CODE('tssm') kEventParamHICommand = FOUR_CHAR_CODE('hcmd') typeHICommand = FOUR_CHAR_CODE('hcmd') kEventParamWindowFeatures = FOUR_CHAR_CODE('wftr') kEventParamWindowDefPart = FOUR_CHAR_CODE('wdpc') kEventParamCurrentBounds = FOUR_CHAR_CODE('crct') kEventParamOriginalBounds = FOUR_CHAR_CODE('orct') kEventParamPreviousBounds = FOUR_CHAR_CODE('prct') kEventParamClickActivation = FOUR_CHAR_CODE('clac') kEventParamWindowRegionCode = FOUR_CHAR_CODE('wshp') kEventParamWindowDragHiliteFlag = FOUR_CHAR_CODE('wdhf') kEventParamWindowModifiedFlag = FOUR_CHAR_CODE('wmff') kEventParamWindowProxyGWorldPtr = FOUR_CHAR_CODE('wpgw') kEventParamWindowProxyImageRgn = FOUR_CHAR_CODE('wpir') kEventParamWindowProxyOutlineRgn = FOUR_CHAR_CODE('wpor') kEventParamWindowStateChangedFlags = FOUR_CHAR_CODE('wscf') kEventParamWindowTitleFullWidth = FOUR_CHAR_CODE('wtfw') kEventParamWindowTitleTextWidth = FOUR_CHAR_CODE('wttw') kEventParamWindowGrowRect = FOUR_CHAR_CODE('grct') kEventParamAttributes = FOUR_CHAR_CODE('attr') typeWindowRegionCode = FOUR_CHAR_CODE('wshp') typeWindowDefPartCode = FOUR_CHAR_CODE('wdpt') typeClickActivationResult = FOUR_CHAR_CODE('clac') kEventParamControlPart = FOUR_CHAR_CODE('cprt') kEventParamInitCollection = FOUR_CHAR_CODE('icol') kEventParamControlMessage = FOUR_CHAR_CODE('cmsg') kEventParamControlParam = FOUR_CHAR_CODE('cprm') kEventParamControlResult = FOUR_CHAR_CODE('crsl') kEventParamControlRegion = FOUR_CHAR_CODE('crgn') kEventParamControlAction = FOUR_CHAR_CODE('caup') kEventParamControlIndicatorDragConstraint = FOUR_CHAR_CODE('cidc') kEventParamControlIndicatorRegion = FOUR_CHAR_CODE('cirn') kEventParamControlIsGhosting = FOUR_CHAR_CODE('cgst') kEventParamControlIndicatorOffset = FOUR_CHAR_CODE('ciof') kEventParamControlClickActivationResult = FOUR_CHAR_CODE('ccar') kEventParamControlSubControl = FOUR_CHAR_CODE('csub') kEventParamControlOptimalBounds = FOUR_CHAR_CODE('cobn') kEventParamControlOptimalBaselineOffset = FOUR_CHAR_CODE('cobo') kEventParamControlDataTag = FOUR_CHAR_CODE('cdtg') kEventParamControlDataBuffer = FOUR_CHAR_CODE('cdbf') kEventParamControlDataBufferSize = FOUR_CHAR_CODE('cdbs') kEventParamControlDrawDepth = FOUR_CHAR_CODE('cddp') kEventParamControlDrawInColor = FOUR_CHAR_CODE('cdic') kEventParamControlFeatures = FOUR_CHAR_CODE('cftr') kEventParamControlPartBounds = FOUR_CHAR_CODE('cpbd') kEventParamControlOriginalOwningWindow = FOUR_CHAR_CODE('coow') kEventParamControlCurrentOwningWindow = FOUR_CHAR_CODE('ccow') typeControlActionUPP = FOUR_CHAR_CODE('caup') typeIndicatorDragConstraint = FOUR_CHAR_CODE('cidc') typeControlPartCode = FOUR_CHAR_CODE('cprt') kEventParamCurrentMenuTrackingMode = FOUR_CHAR_CODE('cmtm') kEventParamNewMenuTrackingMode = FOUR_CHAR_CODE('nmtm') kEventParamMenuFirstOpen = FOUR_CHAR_CODE('1sto') kEventParamMenuItemIndex = FOUR_CHAR_CODE('item') kEventParamMenuCommand = FOUR_CHAR_CODE('mcmd') kEventParamEnableMenuForKeyEvent = FOUR_CHAR_CODE('fork') kEventParamMenuEventOptions = FOUR_CHAR_CODE('meop') typeMenuItemIndex = FOUR_CHAR_CODE('midx') typeMenuCommand = FOUR_CHAR_CODE('mcmd') typeMenuTrackingMode = FOUR_CHAR_CODE('mtmd') typeMenuEventOptions = FOUR_CHAR_CODE('meop') kEventParamProcessID = FOUR_CHAR_CODE('psn ') kEventParamLaunchRefCon = FOUR_CHAR_CODE('lref') kEventParamLaunchErr = FOUR_CHAR_CODE('err ') kEventParamTabletPointerRec = FOUR_CHAR_CODE('tbrc') kEventParamTabletProximityRec = FOUR_CHAR_CODE('tbpx') typeTabletPointerRec = FOUR_CHAR_CODE('tbrc') typeTabletProximityRec = FOUR_CHAR_CODE('tbpx') # sHandler = NewEventHandlerUPP( x ) kUserFocusAuto = -1 From jvr@users.sourceforge.net Wed Dec 12 22:40:29 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Wed, 12 Dec 2001 14:40:29 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Lib/Carbon Controls.py,1.1,1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Lib/Carbon In directory usw-pr-cvs1:/tmp/cvs-serv21063 Modified Files: Controls.py Log Message: Updated for Universal Headers 3.4. Index: Controls.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Lib/Carbon/Controls.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Controls.py 2001/08/19 22:11:18 1.1 --- Controls.py 2001/12/12 22:40:27 1.2 *************** *** 5,8 **** --- 5,13 ---- from QuickDraw import * from Dragconst import * + from CarbonEvents import * + from Appearance import * + kDataBrowserItemAnyState = -1 + kControlBevelButtonCenterPopupGlyphTag = -1 + kDataBrowserClientPropertyFlagsMask = 0xFF << 24 # kDataBrowserClientPropertyFlagsOffset kControlDefProcType = FOUR_CHAR_CODE('CDEF') *************** *** 13,23 **** controlNotifyClick = FOUR_CHAR_CODE('clik') controlNotifyFocus = FOUR_CHAR_CODE('focu') ! controlNotifyKey = FOUR_CHAR_CODE('key ') ! kControlCanAutoInvalidate = 1L << 0 staticTextProc = 256 editTextProc = 272 iconProc = 288 userItemProc = 304 ! pictItemProc = 320 cFrameColor = 0 cBodyColor = 1 --- 18,28 ---- controlNotifyClick = FOUR_CHAR_CODE('clik') controlNotifyFocus = FOUR_CHAR_CODE('focu') ! controlNotifyKey = FOUR_CHAR_CODE('key ') ! kControlCanAutoInvalidate = 1L << 0 staticTextProc = 256 editTextProc = 272 iconProc = 288 userItemProc = 304 ! pictItemProc = 320 cFrameColor = 0 cBodyColor = 1 *************** *** 26,30 **** kNumberCtlCTabEntries = 4 kControlNoVariant = 0 ! kControlUsesOwningWindowsFontVariant = 1 << 3 kControlNoPart = 0 kControlIndicatorPart = 129 --- 31,35 ---- kNumberCtlCTabEntries = 4 kControlNoVariant = 0 ! kControlUsesOwningWindowsFontVariant = 1 << 3 kControlNoPart = 0 kControlIndicatorPart = 129 *************** *** 36,40 **** kControlFocusNoPart = 0 kControlFocusNextPart = -1 ! kControlFocusPrevPart = -2 kControlCollectionTagBounds = FOUR_CHAR_CODE('boun') kControlCollectionTagValue = FOUR_CHAR_CODE('valu') --- 41,45 ---- kControlFocusNoPart = 0 kControlFocusNextPart = -1 ! kControlFocusPrevPart = -2 kControlCollectionTagBounds = FOUR_CHAR_CODE('boun') kControlCollectionTagValue = FOUR_CHAR_CODE('valu') *************** *** 45,52 **** kControlCollectionTagRefCon = FOUR_CHAR_CODE('refc') kControlCollectionTagTitle = FOUR_CHAR_CODE('titl') kControlCollectionTagIDSignature = FOUR_CHAR_CODE('idsi') kControlCollectionTagIDID = FOUR_CHAR_CODE('idid') ! kControlCollectionTagCommand = FOUR_CHAR_CODE('cmd ') ! kControlCollectionTagSubControls = FOUR_CHAR_CODE('subc') kControlContentTextOnly = 0 kControlNoContent = 0 --- 50,59 ---- kControlCollectionTagRefCon = FOUR_CHAR_CODE('refc') kControlCollectionTagTitle = FOUR_CHAR_CODE('titl') + kControlCollectionTagUnicodeTitle = FOUR_CHAR_CODE('uttl') kControlCollectionTagIDSignature = FOUR_CHAR_CODE('idsi') kControlCollectionTagIDID = FOUR_CHAR_CODE('idid') ! kControlCollectionTagCommand = FOUR_CHAR_CODE('cmd ') ! kControlCollectionTagVarCode = FOUR_CHAR_CODE('varc') ! kControlCollectionTagSubControls = FOUR_CHAR_CODE('subc') kControlContentTextOnly = 0 kControlNoContent = 0 *************** *** 66,70 **** kControlFontSmallSystemFont = -2 kControlFontSmallBoldSystemFont = -3 ! kControlFontViewSystemFont = -4 kControlUseFontMask = 0x0001 kControlUseFaceMask = 0x0002 --- 73,77 ---- kControlFontSmallSystemFont = -2 kControlFontSmallBoldSystemFont = -3 ! kControlFontViewSystemFont = -4 kControlUseFontMask = 0x0001 kControlUseFaceMask = 0x0002 *************** *** 76,86 **** kControlUseAllMask = 0x00FF kControlAddFontSizeMask = 0x0100 ! kControlAddToMetaFontMask = 0x0200 kDoNotActivateAndIgnoreClick = 0 kDoNotActivateAndHandleClick = 1 kActivateAndIgnoreClick = 2 ! kActivateAndHandleClick = 3 kControlFontStyleTag = FOUR_CHAR_CODE('font') kControlKeyFilterTag = FOUR_CHAR_CODE('fltr') kControlSupportsGhosting = 1 << 0 kControlSupportsEmbedding = 1 << 1 --- 83,96 ---- kControlUseAllMask = 0x00FF kControlAddFontSizeMask = 0x0100 ! kControlAddToMetaFontMask = 0x0200 ! kControlUseThemeFontIDMask = 0x0080 kDoNotActivateAndIgnoreClick = 0 kDoNotActivateAndHandleClick = 1 kActivateAndIgnoreClick = 2 ! kActivateAndHandleClick = 3 kControlFontStyleTag = FOUR_CHAR_CODE('font') kControlKeyFilterTag = FOUR_CHAR_CODE('fltr') + kControlKindTag = FOUR_CHAR_CODE('kind') + kControlSizeTag = FOUR_CHAR_CODE('size') kControlSupportsGhosting = 1 << 0 kControlSupportsEmbedding = 1 << 1 *************** *** 101,105 **** kControlSupportsSetCursor = 1 << 20 kControlSupportsContextualMenus = 1 << 21 ! kControlSupportsClickActivation = 1 << 22 drawCntl = 0 testCntl = 1 --- 111,116 ---- kControlSupportsSetCursor = 1 << 20 kControlSupportsContextualMenus = 1 << 21 ! kControlSupportsClickActivation = 1 << 22 ! kControlIdlesWithTimer = 1 << 23 drawCntl = 0 testCntl = 1 *************** *** 140,144 **** kControlMsgDisplayDebugInfo = 46 kControlMsgContextualMenuClick = 47 ! kControlMsgGetClickActivation = 48 kDrawControlEntireControl = 0 kDrawControlIndicatorOnly = 129 --- 151,159 ---- kControlMsgDisplayDebugInfo = 46 kControlMsgContextualMenuClick = 47 ! kControlMsgGetClickActivation = 48 ! kControlSizeNormal = 0 ! kControlSizeSmall = 1 ! kControlSizeLarge = 2 ! kControlSizeAuto = 0xFFFF kDrawControlEntireControl = 0 kDrawControlIndicatorOnly = 129 *************** *** 151,159 **** hAxisOnly = 1 vAxisOnly = 2 ! kControlDefProcPtr = 0 ! kControlPropertyPersistent = 0x00000001 ! kDragTrackingEnterControl = kDragTrackingEnterWindow ! kDragTrackingInControl = kDragTrackingInWindow ! kDragTrackingLeaveControl = kDragTrackingLeaveWindow useWFont = kControlUsesOwningWindowsFontVariant inThumb = kControlIndicatorPart --- 166,176 ---- hAxisOnly = 1 vAxisOnly = 2 ! kControlDefProcPtr = 0 ! kControlDefObjectClass = 1 ! kControlKindSignatureApple = FOUR_CHAR_CODE('appl') ! kControlPropertyPersistent = 0x00000001 ! kDragTrackingEnterControl = 2 ! kDragTrackingInControl = 3 ! kDragTrackingLeaveControl = 4 useWFont = kControlUsesOwningWindowsFontVariant inThumb = kControlIndicatorPart *************** *** 163,167 **** kControlInactiveControlPart = kControlInactivePart kControlTabListResType = FOUR_CHAR_CODE('tab#') ! kControlListDescResType = FOUR_CHAR_CODE('ldes') kControlCheckBoxUncheckedValue = 0 kControlCheckBoxCheckedValue = 1 --- 180,184 ---- kControlInactiveControlPart = kControlInactivePart kControlTabListResType = FOUR_CHAR_CODE('tab#') ! kControlListDescResType = FOUR_CHAR_CODE('ldes') kControlCheckBoxUncheckedValue = 0 kControlCheckBoxCheckedValue = 1 *************** *** 213,217 **** kControlClockAMPMPart = 12 kControlDataBrowserPart = 24 ! kControlDataBrowserDraggedPart = 25 kControlBevelButtonSmallBevelProc = 32 kControlBevelButtonNormalBevelProc = 33 --- 230,234 ---- kControlClockAMPMPart = 12 kControlDataBrowserPart = 24 ! kControlDataBrowserDraggedPart = 25 kControlBevelButtonSmallBevelProc = 32 kControlBevelButtonNormalBevelProc = 33 *************** *** 230,236 **** kControlBehaviorMultiValueMenu = 0x4000 kControlBehaviorOffsetContents = 0x8000 ! kControlBehaviorCommandMenu = 0x2000 kControlBevelButtonMenuOnBottom = 0 kControlBevelButtonMenuOnRight = (1 << 2) kControlBevelButtonAlignSysDirection = -1 kControlBevelButtonAlignCenter = 0 --- 247,254 ---- kControlBehaviorMultiValueMenu = 0x4000 kControlBehaviorOffsetContents = 0x8000 ! kControlBehaviorCommandMenu = 0x2000 kControlBevelButtonMenuOnBottom = 0 kControlBevelButtonMenuOnRight = (1 << 2) + kControlKindBevelButton = FOUR_CHAR_CODE('bevl') kControlBevelButtonAlignSysDirection = -1 kControlBevelButtonAlignCenter = 0 *************** *** 262,269 **** kControlBevelButtonMenuValueTag = FOUR_CHAR_CODE('mval') kControlBevelButtonMenuHandleTag = FOUR_CHAR_CODE('mhnd') ! # kControlBevelButtonCenterPopupGlyphTag = FOUR_CHAR_CODE('pglc') kControlBevelButtonLastMenuTag = FOUR_CHAR_CODE('lmnu') ! kControlBevelButtonMenuDelayTag = FOUR_CHAR_CODE('mdly') ! kControlBevelButtonScaleIconTag = FOUR_CHAR_CODE('scal') kControlSliderProc = 48 kControlSliderLiveFeedback = (1 << 0) --- 280,290 ---- kControlBevelButtonMenuValueTag = FOUR_CHAR_CODE('mval') kControlBevelButtonMenuHandleTag = FOUR_CHAR_CODE('mhnd') ! kControlBevelButtonMenuRefTag = FOUR_CHAR_CODE('mhnd') ! kControlBevelButtonOwnedMenuRefTag = FOUR_CHAR_CODE('omrf') ! # kControlBevelButtonCenterPopupGlyphTag = FOUR_CHAR_CODE('pglc') ! kControlBevelButtonKindTag = FOUR_CHAR_CODE('bebk') kControlBevelButtonLastMenuTag = FOUR_CHAR_CODE('lmnu') ! kControlBevelButtonMenuDelayTag = FOUR_CHAR_CODE('mdly') ! kControlBevelButtonScaleIconTag = FOUR_CHAR_CODE('scal') kControlSliderProc = 48 kControlSliderLiveFeedback = (1 << 0) *************** *** 271,283 **** kControlSliderReverseDirection = (1 << 2) kControlSliderNonDirectional = (1 << 3) kControlTriangleProc = 64 kControlTriangleLeftFacingProc = 65 kControlTriangleAutoToggleProc = 66 kControlTriangleLeftFacingAutoToggleProc = 67 ! kControlTriangleLastValueTag = FOUR_CHAR_CODE('last') kControlProgressBarProc = 80 ! # kControlProgressBarIndeterminateTag = FOUR_CHAR_CODE('inde') kControlLittleArrowsProc = 96 kControlChasingArrowsProc = 112 kControlTabLargeProc = 128 kControlTabSmallProc = 129 --- 292,319 ---- kControlSliderReverseDirection = (1 << 2) kControlSliderNonDirectional = (1 << 3) + kControlSliderPointsDownOrRight = 0 + kControlSliderPointsUpOrLeft = 1 + kControlSliderDoesNotPoint = 2 + kControlKindSlider = FOUR_CHAR_CODE('sldr') kControlTriangleProc = 64 kControlTriangleLeftFacingProc = 65 kControlTriangleAutoToggleProc = 66 kControlTriangleLeftFacingAutoToggleProc = 67 ! kControlDisclosureTrianglePointDefault = 0 ! kControlDisclosureTrianglePointRight = 1 ! kControlDisclosureTrianglePointLeft = 2 ! kControlKindDisclosureTriangle = FOUR_CHAR_CODE('dist') ! kControlTriangleLastValueTag = FOUR_CHAR_CODE('last') kControlProgressBarProc = 80 ! kControlRelevanceBarProc = 81 ! kControlKindProgressBar = FOUR_CHAR_CODE('prgb') ! kControlKindRelevanceBar = FOUR_CHAR_CODE('relb') ! kControlProgressBarIndeterminateTag = FOUR_CHAR_CODE('inde') ! kControlProgressBarAnimatingTag = FOUR_CHAR_CODE('anim') kControlLittleArrowsProc = 96 + kControlKindLittleArrows = FOUR_CHAR_CODE('larr') kControlChasingArrowsProc = 112 + kControlKindChasingArrows = FOUR_CHAR_CODE('carr') + kControlChasingArrowsAnimatingTag = FOUR_CHAR_CODE('anim') kControlTabLargeProc = 128 kControlTabSmallProc = 129 *************** *** 289,299 **** kControlTabSmallEastProc = 133 kControlTabLargeWestProc = 134 ! kControlTabSmallWestProc = 135 kControlTabContentRectTag = FOUR_CHAR_CODE('rect') kControlTabEnabledFlagTag = FOUR_CHAR_CODE('enab') ! kControlTabFontStyleTag = kControlFontStyleTag ! kControlTabInfoTag = FOUR_CHAR_CODE('tabi') kControlTabInfoVersionZero = 0 kControlSeparatorLineProc = 144 kControlGroupBoxTextTitleProc = 160 kControlGroupBoxCheckBoxProc = 161 --- 325,345 ---- kControlTabSmallEastProc = 133 kControlTabLargeWestProc = 134 ! kControlTabSmallWestProc = 135 ! kControlTabDirectionNorth = 0 ! kControlTabDirectionSouth = 1 ! kControlTabDirectionEast = 2 ! kControlTabDirectionWest = 3 ! kControlTabSizeLarge = kControlSizeNormal ! kControlTabSizeSmall = kControlSizeSmall ! kControlKindTabs = FOUR_CHAR_CODE('tabs') kControlTabContentRectTag = FOUR_CHAR_CODE('rect') kControlTabEnabledFlagTag = FOUR_CHAR_CODE('enab') ! kControlTabFontStyleTag = kControlFontStyleTag ! kControlTabInfoTag = FOUR_CHAR_CODE('tabi') ! kControlTabImageContentTag = FOUR_CHAR_CODE('cont') kControlTabInfoVersionZero = 0 + kControlTabInfoVersionOne = 1 kControlSeparatorLineProc = 144 + kControlKindSeparator = FOUR_CHAR_CODE('sepa') kControlGroupBoxTextTitleProc = 160 kControlGroupBoxCheckBoxProc = 161 *************** *** 302,311 **** kControlGroupBoxSecondaryCheckBoxProc = 165 kControlGroupBoxSecondaryPopupButtonProc = 166 kControlGroupBoxMenuHandleTag = FOUR_CHAR_CODE('mhan') ! kControlGroupBoxFontStyleTag = kControlFontStyleTag ! kControlGroupBoxTitleRectTag = FOUR_CHAR_CODE('trec') kControlImageWellProc = 176 kControlImageWellContentTag = FOUR_CHAR_CODE('cont') ! kControlImageWellTransformTag = FOUR_CHAR_CODE('tran') kControlPopupArrowEastProc = 192 kControlPopupArrowWestProc = 193 --- 348,363 ---- kControlGroupBoxSecondaryCheckBoxProc = 165 kControlGroupBoxSecondaryPopupButtonProc = 166 + kControlKindGroupBox = FOUR_CHAR_CODE('grpb') + kControlKindCheckGroupBox = FOUR_CHAR_CODE('cgrp') + kControlKindPopupGroupBox = FOUR_CHAR_CODE('pgrp') kControlGroupBoxMenuHandleTag = FOUR_CHAR_CODE('mhan') ! kControlGroupBoxMenuRefTag = FOUR_CHAR_CODE('mhan') ! kControlGroupBoxFontStyleTag = kControlFontStyleTag ! kControlGroupBoxTitleRectTag = FOUR_CHAR_CODE('trec') kControlImageWellProc = 176 + kControlKindImageWell = FOUR_CHAR_CODE('well') kControlImageWellContentTag = FOUR_CHAR_CODE('cont') ! kControlImageWellTransformTag = FOUR_CHAR_CODE('tran') ! kControlImageWellIsDragDestinationTag = FOUR_CHAR_CODE('drag') kControlPopupArrowEastProc = 192 kControlPopupArrowWestProc = 193 *************** *** 320,324 **** --- 372,380 ---- kControlPopupArrowOrientationNorth = 2 kControlPopupArrowOrientationSouth = 3 + kControlPopupArrowSizeNormal = 0 + kControlPopupArrowSizeSmall = 1 + kControlKindPopupArrow = FOUR_CHAR_CODE('parr') kControlPlacardProc = 224 + kControlKindPlacard = FOUR_CHAR_CODE('plac') kControlClockTimeProc = 240 kControlClockTimeSecondsProc = 241 *************** *** 327,332 **** kControlClockTypeHourMinute = 0 kControlClockTypeHourMinuteSecond = 1 ! kControlClockTypeMonthDay = 2 ! kControlClockTypeMonthDayYear = 3 kControlClockFlagStandard = 0 kControlClockNoFlags = 0 --- 383,388 ---- kControlClockTypeHourMinute = 0 kControlClockTypeHourMinuteSecond = 1 ! kControlClockTypeMonthDayYear = 2 ! kControlClockTypeMonthYear = 3 kControlClockFlagStandard = 0 kControlClockNoFlags = 0 *************** *** 335,341 **** kControlClockFlagLive = 2 kControlClockIsLive = 2 kControlClockLongDateTag = FOUR_CHAR_CODE('date') ! kControlClockFontStyleTag = kControlFontStyleTag kControlUserPaneProc = 256 kControlUserItemDrawProcTag = FOUR_CHAR_CODE('uidp') kControlUserPaneDrawProcTag = FOUR_CHAR_CODE('draw') --- 391,400 ---- kControlClockFlagLive = 2 kControlClockIsLive = 2 + kControlKindClock = FOUR_CHAR_CODE('clck') kControlClockLongDateTag = FOUR_CHAR_CODE('date') ! kControlClockFontStyleTag = kControlFontStyleTag ! kControlClockAnimatingTag = FOUR_CHAR_CODE('anim') kControlUserPaneProc = 256 + kControlKindUserPane = FOUR_CHAR_CODE('upan') kControlUserItemDrawProcTag = FOUR_CHAR_CODE('uidp') kControlUserPaneDrawProcTag = FOUR_CHAR_CODE('draw') *************** *** 346,353 **** kControlUserPaneActivateProcTag = FOUR_CHAR_CODE('acti') kControlUserPaneFocusProcTag = FOUR_CHAR_CODE('foci') ! kControlUserPaneBackgroundProcTag = FOUR_CHAR_CODE('back') kControlEditTextProc = 272 kControlEditTextPasswordProc = 274 ! kControlEditTextInlineInputProc = 276 kControlEditTextStyleTag = kControlFontStyleTag kControlEditTextTextTag = FOUR_CHAR_CODE('text') --- 405,413 ---- kControlUserPaneActivateProcTag = FOUR_CHAR_CODE('acti') kControlUserPaneFocusProcTag = FOUR_CHAR_CODE('foci') ! kControlUserPaneBackgroundProcTag = FOUR_CHAR_CODE('back') kControlEditTextProc = 272 kControlEditTextPasswordProc = 274 ! kControlEditTextInlineInputProc = 276 ! kControlKindEditText = FOUR_CHAR_CODE('etxt') kControlEditTextStyleTag = kControlFontStyleTag kControlEditTextTextTag = FOUR_CHAR_CODE('text') *************** *** 355,359 **** kControlEditTextKeyFilterTag = kControlKeyFilterTag kControlEditTextSelectionTag = FOUR_CHAR_CODE('sele') ! kControlEditTextPasswordTag = FOUR_CHAR_CODE('pass') kControlEditTextKeyScriptBehaviorTag = FOUR_CHAR_CODE('kscr') kControlEditTextLockedTag = FOUR_CHAR_CODE('lock') --- 415,419 ---- kControlEditTextKeyFilterTag = kControlKeyFilterTag kControlEditTextSelectionTag = FOUR_CHAR_CODE('sele') ! kControlEditTextPasswordTag = FOUR_CHAR_CODE('pass') kControlEditTextKeyScriptBehaviorTag = FOUR_CHAR_CODE('kscr') kControlEditTextLockedTag = FOUR_CHAR_CODE('lock') *************** *** 362,403 **** kControlEditTextInlinePreUpdateProcTag = FOUR_CHAR_CODE('prup') kControlEditTextInlinePostUpdateProcTag = FOUR_CHAR_CODE('poup') kControlStaticTextProc = 288 kControlStaticTextStyleTag = kControlFontStyleTag kControlStaticTextTextTag = FOUR_CHAR_CODE('text') ! kControlStaticTextTextHeightTag = FOUR_CHAR_CODE('thei') ! kControlStaticTextTruncTag = FOUR_CHAR_CODE('trun') kControlPictureProc = 304 ! kControlPictureNoTrackProc = 305 ! kControlPictureHandleTag = FOUR_CHAR_CODE('pich') kControlIconProc = 320 kControlIconNoTrackProc = 321 kControlIconSuiteProc = 322 ! kControlIconSuiteNoTrackProc = 323 kControlIconRefProc = 324 ! kControlIconRefNoTrackProc = 325 kControlIconTransformTag = FOUR_CHAR_CODE('trfm') ! kControlIconAlignmentTag = FOUR_CHAR_CODE('algn') kControlIconResourceIDTag = FOUR_CHAR_CODE('ires') ! kControlIconContentTag = FOUR_CHAR_CODE('cont') kControlWindowHeaderProc = 336 ! kControlWindowListViewHeaderProc = 337 kControlListBoxProc = 352 kControlListBoxAutoSizeProc = 353 kControlListBoxListHandleTag = FOUR_CHAR_CODE('lhan') kControlListBoxKeyFilterTag = kControlKeyFilterTag ! kControlListBoxFontStyleTag = kControlFontStyleTag kControlListBoxDoubleClickTag = FOUR_CHAR_CODE('dblc') ! kControlListBoxLDEFTag = FOUR_CHAR_CODE('ldef') kControlPushButtonProc = 368 kControlCheckBoxProc = 369 kControlRadioButtonProc = 370 kControlPushButLeftIconProc = 374 ! kControlPushButRightIconProc = 375 kControlCheckBoxAutoToggleProc = 371 kControlRadioButtonAutoToggleProc = 372 kControlPushButtonDefaultTag = FOUR_CHAR_CODE('dflt') ! kControlPushButtonCancelTag = FOUR_CHAR_CODE('cncl') kControlScrollBarProc = 384 ! kControlScrollBarLiveProc = 386 kControlPopupButtonProc = 400 kControlPopupFixedWidthVariant = 1 << 0 --- 422,478 ---- kControlEditTextInlinePreUpdateProcTag = FOUR_CHAR_CODE('prup') kControlEditTextInlinePostUpdateProcTag = FOUR_CHAR_CODE('poup') + kControlEditTextCFStringTag = FOUR_CHAR_CODE('cfst') kControlStaticTextProc = 288 + kControlKindStaticText = FOUR_CHAR_CODE('stxt') kControlStaticTextStyleTag = kControlFontStyleTag kControlStaticTextTextTag = FOUR_CHAR_CODE('text') ! kControlStaticTextTextHeightTag = FOUR_CHAR_CODE('thei') ! kControlStaticTextTruncTag = FOUR_CHAR_CODE('trun') ! kControlStaticTextCFStringTag = FOUR_CHAR_CODE('cfst') kControlPictureProc = 304 ! kControlPictureNoTrackProc = 305 ! kControlKindPicture = FOUR_CHAR_CODE('pict') ! kControlPictureHandleTag = FOUR_CHAR_CODE('pich') kControlIconProc = 320 kControlIconNoTrackProc = 321 kControlIconSuiteProc = 322 ! kControlIconSuiteNoTrackProc = 323 kControlIconRefProc = 324 ! kControlIconRefNoTrackProc = 325 ! kControlKindIcon = FOUR_CHAR_CODE('icon') kControlIconTransformTag = FOUR_CHAR_CODE('trfm') ! kControlIconAlignmentTag = FOUR_CHAR_CODE('algn') kControlIconResourceIDTag = FOUR_CHAR_CODE('ires') ! kControlIconContentTag = FOUR_CHAR_CODE('cont') kControlWindowHeaderProc = 336 ! kControlWindowListViewHeaderProc = 337 ! kControlKindWindowHeader = FOUR_CHAR_CODE('whed') kControlListBoxProc = 352 kControlListBoxAutoSizeProc = 353 + kControlKindListBox = FOUR_CHAR_CODE('lbox') kControlListBoxListHandleTag = FOUR_CHAR_CODE('lhan') kControlListBoxKeyFilterTag = kControlKeyFilterTag ! kControlListBoxFontStyleTag = kControlFontStyleTag kControlListBoxDoubleClickTag = FOUR_CHAR_CODE('dblc') ! kControlListBoxLDEFTag = FOUR_CHAR_CODE('ldef') kControlPushButtonProc = 368 kControlCheckBoxProc = 369 kControlRadioButtonProc = 370 kControlPushButLeftIconProc = 374 ! kControlPushButRightIconProc = 375 kControlCheckBoxAutoToggleProc = 371 kControlRadioButtonAutoToggleProc = 372 + kControlPushButtonIconOnLeft = 6 + kControlPushButtonIconOnRight = 7 + kControlKindPushButton = FOUR_CHAR_CODE('push') + kControlKindPushIconButton = FOUR_CHAR_CODE('picn') + kControlKindRadioButton = FOUR_CHAR_CODE('rdio') + kControlKindCheckBox = FOUR_CHAR_CODE('cbox') kControlPushButtonDefaultTag = FOUR_CHAR_CODE('dflt') ! kControlPushButtonCancelTag = FOUR_CHAR_CODE('cncl') kControlScrollBarProc = 384 ! kControlScrollBarLiveProc = 386 ! kControlKindScrollBar = FOUR_CHAR_CODE('sbar') ! kControlScrollBarShowsArrowsTag = FOUR_CHAR_CODE('arro') kControlPopupButtonProc = 400 kControlPopupFixedWidthVariant = 1 << 0 *************** *** 405,418 **** kControlPopupUseAddResMenuVariant = 1 << 2 kControlPopupUseWFontVariant = kControlUsesOwningWindowsFontVariant kControlPopupButtonMenuHandleTag = FOUR_CHAR_CODE('mhan') ! kControlPopupButtonMenuIDTag = FOUR_CHAR_CODE('mnid') ! kControlPopupButtonExtraHeightTag = FOUR_CHAR_CODE('exht') kControlRadioGroupProc = 416 kControlScrollTextBoxProc = 432 kControlScrollTextBoxAutoScrollProc = 433 kControlScrollTextBoxDelayBeforeAutoScrollTag = FOUR_CHAR_CODE('stdl') kControlScrollTextBoxDelayBetweenAutoScrollTag = FOUR_CHAR_CODE('scdl') kControlScrollTextBoxAutoScrollAmountTag = FOUR_CHAR_CODE('samt') ! kControlScrollTextBoxContentsTag = FOUR_CHAR_CODE('tres') kControlCheckboxUncheckedValue = kControlCheckBoxUncheckedValue kControlCheckboxCheckedValue = kControlCheckBoxCheckedValue --- 480,648 ---- kControlPopupUseAddResMenuVariant = 1 << 2 kControlPopupUseWFontVariant = kControlUsesOwningWindowsFontVariant + kControlKindPopupButton = FOUR_CHAR_CODE('popb') kControlPopupButtonMenuHandleTag = FOUR_CHAR_CODE('mhan') ! kControlPopupButtonMenuRefTag = FOUR_CHAR_CODE('mhan') ! kControlPopupButtonMenuIDTag = FOUR_CHAR_CODE('mnid') ! kControlPopupButtonExtraHeightTag = FOUR_CHAR_CODE('exht') ! kControlPopupButtonOwnedMenuRefTag = FOUR_CHAR_CODE('omrf') ! kControlPopupButtonCheckCurrentTag = FOUR_CHAR_CODE('chck') kControlRadioGroupProc = 416 + kControlKindRadioGroup = FOUR_CHAR_CODE('rgrp') kControlScrollTextBoxProc = 432 kControlScrollTextBoxAutoScrollProc = 433 + kControlKindScrollingTextBox = FOUR_CHAR_CODE('stbx') kControlScrollTextBoxDelayBeforeAutoScrollTag = FOUR_CHAR_CODE('stdl') kControlScrollTextBoxDelayBetweenAutoScrollTag = FOUR_CHAR_CODE('scdl') kControlScrollTextBoxAutoScrollAmountTag = FOUR_CHAR_CODE('samt') ! kControlScrollTextBoxContentsTag = FOUR_CHAR_CODE('tres') ! kControlScrollTextBoxAnimatingTag = FOUR_CHAR_CODE('anim') ! kControlKindDisclosureButton = FOUR_CHAR_CODE('disb') ! kControlDisclosureButtonClosed = 0 ! kControlDisclosureButtonDisclosed = 1 ! kControlRoundButtonNormalSize = kControlSizeNormal ! kControlRoundButtonLargeSize = kControlSizeLarge ! kControlRoundButtonContentTag = FOUR_CHAR_CODE('cont') ! kControlRoundButtonSizeTag = FOUR_CHAR_CODE('size') ! kControlKindRoundButton = FOUR_CHAR_CODE('rndb') ! kControlKindDataBrowser = FOUR_CHAR_CODE('datb') ! errDataBrowserNotConfigured = -4970 ! errDataBrowserItemNotFound = -4971 ! errDataBrowserItemNotAdded = -4975 ! errDataBrowserPropertyNotFound = -4972 ! errDataBrowserInvalidPropertyPart = -4973 ! errDataBrowserInvalidPropertyData = -4974 ! errDataBrowserPropertyNotSupported = -4979 ! kControlDataBrowserIncludesFrameAndFocusTag = FOUR_CHAR_CODE('brdr') ! kControlDataBrowserKeyFilterTag = kControlEditTextKeyFilterTag ! kControlDataBrowserEditTextKeyFilterTag = kControlDataBrowserKeyFilterTag ! kControlDataBrowserEditTextValidationProcTag = kControlEditTextValidationProcTag ! kDataBrowserNoView = 0x3F3F3F3F ! kDataBrowserListView = FOUR_CHAR_CODE('lstv') ! kDataBrowserColumnView = FOUR_CHAR_CODE('clmv') ! kDataBrowserDragSelect = 1 << 0 ! kDataBrowserSelectOnlyOne = 1 << 1 ! kDataBrowserResetSelection = 1 << 2 ! kDataBrowserCmdTogglesSelection = 1 << 3 ! kDataBrowserNoDisjointSelection = 1 << 4 ! kDataBrowserAlwaysExtendSelection = 1 << 5 ! kDataBrowserNeverEmptySelectionSet = 1 << 6 ! kDataBrowserOrderUndefined = 0 ! kDataBrowserOrderIncreasing = 1 ! kDataBrowserOrderDecreasing = 2 ! kDataBrowserNoItem = 0L ! kDataBrowserItemNoState = 0 ! # kDataBrowserItemAnyState = (unsigned long)(-1) ! kDataBrowserItemIsSelected = 1 << 0 ! kDataBrowserContainerIsOpen = 1 << 1 ! kDataBrowserItemIsDragTarget = 1 << 2 ! kDataBrowserRevealOnly = 0 ! kDataBrowserRevealAndCenterInView = 1 << 0 ! kDataBrowserRevealWithoutSelecting = 1 << 1 ! kDataBrowserItemsAdd = 0 ! kDataBrowserItemsAssign = 1 ! kDataBrowserItemsToggle = 2 ! kDataBrowserItemsRemove = 3 ! kDataBrowserSelectionAnchorUp = 0 ! kDataBrowserSelectionAnchorDown = 1 ! kDataBrowserSelectionAnchorLeft = 2 ! kDataBrowserSelectionAnchorRight = 3 ! kDataBrowserEditMsgUndo = kHICommandUndo ! kDataBrowserEditMsgRedo = kHICommandRedo ! kDataBrowserEditMsgCut = kHICommandCut ! kDataBrowserEditMsgCopy = kHICommandCopy ! kDataBrowserEditMsgPaste = kHICommandPaste ! kDataBrowserEditMsgClear = kHICommandClear ! kDataBrowserEditMsgSelectAll = kHICommandSelectAll ! kDataBrowserItemAdded = 1 ! kDataBrowserItemRemoved = 2 ! kDataBrowserEditStarted = 3 ! kDataBrowserEditStopped = 4 ! kDataBrowserItemSelected = 5 ! kDataBrowserItemDeselected = 6 ! kDataBrowserItemDoubleClicked = 7 ! kDataBrowserContainerOpened = 8 ! kDataBrowserContainerClosing = 9 ! kDataBrowserContainerClosed = 10 ! kDataBrowserContainerSorting = 11 ! kDataBrowserContainerSorted = 12 ! kDataBrowserUserToggledContainer = 16 ! kDataBrowserTargetChanged = 15 ! kDataBrowserUserStateChanged = 13 ! kDataBrowserSelectionSetChanged = 14 ! kDataBrowserItemNoProperty = 0L ! kDataBrowserItemIsActiveProperty = 1L ! kDataBrowserItemIsSelectableProperty = 2L ! kDataBrowserItemIsEditableProperty = 3L ! kDataBrowserItemIsContainerProperty = 4L ! kDataBrowserContainerIsOpenableProperty = 5L ! kDataBrowserContainerIsClosableProperty = 6L ! kDataBrowserContainerIsSortableProperty = 7L ! kDataBrowserItemSelfIdentityProperty = 8L ! kDataBrowserContainerAliasIDProperty = 9L ! kDataBrowserColumnViewPreviewProperty = 10L ! kDataBrowserItemParentContainerProperty = 11L ! kDataBrowserCustomType = 0x3F3F3F3F ! kDataBrowserIconType = FOUR_CHAR_CODE('icnr') ! kDataBrowserTextType = FOUR_CHAR_CODE('text') ! kDataBrowserDateTimeType = FOUR_CHAR_CODE('date') ! kDataBrowserSliderType = FOUR_CHAR_CODE('sldr') ! kDataBrowserCheckboxType = FOUR_CHAR_CODE('chbx') ! kDataBrowserProgressBarType = FOUR_CHAR_CODE('prog') ! kDataBrowserRelevanceRankType = FOUR_CHAR_CODE('rank') ! kDataBrowserPopupMenuType = FOUR_CHAR_CODE('menu') ! kDataBrowserIconAndTextType = FOUR_CHAR_CODE('ticn') ! kDataBrowserPropertyEnclosingPart = 0L ! kDataBrowserPropertyContentPart = FOUR_CHAR_CODE('----') ! kDataBrowserPropertyDisclosurePart = FOUR_CHAR_CODE('disc') ! kDataBrowserPropertyTextPart = kDataBrowserTextType ! kDataBrowserPropertyIconPart = kDataBrowserIconType ! kDataBrowserPropertySliderPart = kDataBrowserSliderType ! kDataBrowserPropertyCheckboxPart = kDataBrowserCheckboxType ! kDataBrowserPropertyProgressBarPart = kDataBrowserProgressBarType ! kDataBrowserPropertyRelevanceRankPart = kDataBrowserRelevanceRankType ! kDataBrowserUniversalPropertyFlagsMask = 0xFF ! kDataBrowserPropertyIsMutable = 1 << 0 ! kDataBrowserDefaultPropertyFlags = 0 << 0 ! kDataBrowserUniversalPropertyFlags = kDataBrowserUniversalPropertyFlagsMask ! kDataBrowserPropertyIsEditable = kDataBrowserPropertyIsMutable ! kDataBrowserPropertyFlagsOffset = 8 ! kDataBrowserPropertyFlagsMask = 0xFF << kDataBrowserPropertyFlagsOffset ! kDataBrowserCheckboxTriState = 1 << kDataBrowserPropertyFlagsOffset ! kDataBrowserDateTimeRelative = 1 << (kDataBrowserPropertyFlagsOffset) ! kDataBrowserDateTimeDateOnly = 1 << (kDataBrowserPropertyFlagsOffset + 1) ! kDataBrowserDateTimeTimeOnly = 1 << (kDataBrowserPropertyFlagsOffset + 2) ! kDataBrowserDateTimeSecondsToo = 1 << (kDataBrowserPropertyFlagsOffset + 3) ! kDataBrowserSliderPlainThumb = kThemeThumbPlain << kDataBrowserPropertyFlagsOffset ! kDataBrowserSliderUpwardThumb = kThemeThumbUpward << kDataBrowserPropertyFlagsOffset ! kDataBrowserSliderDownwardThumb = kThemeThumbDownward << kDataBrowserPropertyFlagsOffset ! kDataBrowserDoNotTruncateText = 3 << kDataBrowserPropertyFlagsOffset ! kDataBrowserTruncateTextAtEnd = 2 << kDataBrowserPropertyFlagsOffset ! kDataBrowserTruncateTextMiddle = 0 << kDataBrowserPropertyFlagsOffset ! kDataBrowserTruncateTextAtStart = 1 << kDataBrowserPropertyFlagsOffset ! kDataBrowserPropertyModificationFlags = kDataBrowserPropertyFlagsMask ! kDataBrowserRelativeDateTime = kDataBrowserDateTimeRelative ! kDataBrowserViewSpecificFlagsOffset = 16 ! kDataBrowserViewSpecificFlagsMask = 0xFF << kDataBrowserViewSpecificFlagsOffset ! kDataBrowserViewSpecificPropertyFlags = kDataBrowserViewSpecificFlagsMask ! kDataBrowserClientPropertyFlagsOffset = 24 ! # kDataBrowserClientPropertyFlagsMask = (unsigned long)(0xFF << kDataBrowserClientPropertyFlagsOffset) ! kDataBrowserLatestCallbacks = 0 ! kDataBrowserContentHit = 1 ! kDataBrowserNothingHit = 0 ! kDataBrowserStopTracking = -1 ! kDataBrowserLatestCustomCallbacks = 0 ! kDataBrowserTableViewMinimalHilite = 0 ! kDataBrowserTableViewFillHilite = 1 ! kDataBrowserTableViewSelectionColumn = 1 << kDataBrowserViewSpecificFlagsOffset ! kDataBrowserTableViewLastColumn = -1 ! kDataBrowserListViewMovableColumn = 1 << (kDataBrowserViewSpecificFlagsOffset + 1) ! kDataBrowserListViewSortableColumn = 1 << (kDataBrowserViewSpecificFlagsOffset + 2) ! kDataBrowserListViewSelectionColumn = kDataBrowserTableViewSelectionColumn ! kDataBrowserListViewDefaultColumnFlags = kDataBrowserListViewMovableColumn + kDataBrowserListViewSortableColumn ! kDataBrowserListViewLatestHeaderDesc = 0 ! kDataBrowserListViewAppendColumn = kDataBrowserTableViewLastColumn ! kControlEditUnicodeTextPostUpdateProcTag = FOUR_CHAR_CODE('upup') ! kControlEditUnicodeTextProc = 912 ! kControlEditUnicodeTextPasswordProc = 914 kControlCheckboxUncheckedValue = kControlCheckBoxUncheckedValue kControlCheckboxCheckedValue = kControlCheckBoxCheckedValue From jvr@users.sourceforge.net Wed Dec 12 22:42:39 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Wed, 12 Dec 2001 14:42:39 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/scripts genpluginprojects.py,1.24,1.25 fullbuild.py,1.77,1.78 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/scripts In directory usw-pr-cvs1:/tmp/cvs-serv21731 Modified Files: genpluginprojects.py fullbuild.py Log Message: added CarbonEvents Index: genpluginprojects.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/scripts/genpluginprojects.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** genpluginprojects.py 2001/12/05 22:46:23 1.24 --- genpluginprojects.py 2001/12/12 22:42:37 1.25 *************** *** 164,167 **** --- 164,168 ---- # Carbon Only? genpluginproject("carbon", "_CF", outputdir="::Lib:Carbon") + genpluginproject("carbon", "_CarbonEvt", outputdir="::Lib:Carbon") genpluginproject("carbon", "hfsplus") Index: fullbuild.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/scripts/fullbuild.py,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** fullbuild.py 2001/11/30 14:16:35 1.77 --- fullbuild.py 2001/12/12 22:42:37 1.78 *************** *** 299,302 **** --- 299,303 ---- (":Mac:Build:_App.carbon.mcp", "_App.carbon"), (":Mac:Build:_CF.carbon.mcp", "_CF.carbon"), + (":Mac:Build:_CarbonEvt.carbon.mcp", "_CarbonEvt.carbon"), (":Mac:Build:_Cm.carbon.mcp", "_Cm.carbon"), (":Mac:Build:_Ctl.carbon.mcp", "_Ctl.carbon"), From jackjansen@users.sourceforge.net Wed Dec 12 22:45:01 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 12 Dec 2001 14:45:01 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/OSXResources/app/Resources/English.lproj InfoPlist.strings,1.1,1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/OSXResources/app/Resources/English.lproj In directory usw-pr-cvs1:/tmp/cvs-serv22451/OSXResources/app/Resources/English.lproj Modified Files: InfoPlist.strings Log Message: Updated for 2.2 release. Index: InfoPlist.strings =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/OSXResources/app/Resources/English.lproj/InfoPlist.strings,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsnykS4I and /tmp/cvsS1GR0h differ From jackjansen@users.sourceforge.net Wed Dec 12 22:51:42 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 12 Dec 2001 14:51:42 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/ctl _Ctlmodule.c,1.6,1.7 ctlsupport.py,1.44,1.45 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/ctl In directory usw-pr-cvs1:/tmp/cvs-serv24369/Mac/Modules/Ctl Modified Files: _Ctlmodule.c ctlsupport.py Log Message: Shut up gcc warning. Index: _Ctlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/_Ctlmodule.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** _Ctlmodule.c 2001/12/12 22:38:27 1.6 --- _Ctlmodule.c 2001/12/12 22:51:37 1.7 *************** *** 5204,5213 **** if ( self->ob_callbackdict == NULL || (func = PyDict_GetItemString(self->ob_callbackdict, keybuf)) == NULL ) { ! PySys_WriteStderr("Control callback %x without callback object\n", which); return NULL; } rv = PyEval_CallObject(func, arglist); if ( rv == NULL ) ! PySys_WriteStderr("Exception in control callback %x handler\n", which); return rv; } --- 5204,5213 ---- if ( self->ob_callbackdict == NULL || (func = PyDict_GetItemString(self->ob_callbackdict, keybuf)) == NULL ) { ! PySys_WriteStderr("Control callback %x without callback object\n", (unsigned)which); return NULL; } rv = PyEval_CallObject(func, arglist); if ( rv == NULL ) ! PySys_WriteStderr("Exception in control callback %x handler\n", (unsigned)which); return rv; } Index: ctlsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctlsupport.py,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** ctlsupport.py 2001/12/12 22:38:27 1.44 --- ctlsupport.py 2001/12/12 22:51:39 1.45 *************** *** 267,276 **** if ( self->ob_callbackdict == NULL || (func = PyDict_GetItemString(self->ob_callbackdict, keybuf)) == NULL ) { ! PySys_WriteStderr("Control callback %x without callback object\\n", which); return NULL; } rv = PyEval_CallObject(func, arglist); if ( rv == NULL ) ! PySys_WriteStderr("Exception in control callback %x handler\\n", which); return rv; } --- 267,276 ---- if ( self->ob_callbackdict == NULL || (func = PyDict_GetItemString(self->ob_callbackdict, keybuf)) == NULL ) { ! PySys_WriteStderr("Control callback %x without callback object\\n", (unsigned)which); return NULL; } rv = PyEval_CallObject(func, arglist); if ( rv == NULL ) ! PySys_WriteStderr("Exception in control callback %x handler\\n", (unsigned)which); return rv; } From jackjansen@users.sourceforge.net Wed Dec 12 23:03:19 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 12 Dec 2001 15:03:19 -0800 Subject: [Python-checkins] CVS: python/dist/src setup.py,1.70,1.71 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv27955 Modified Files: setup.py Log Message: Build _CarbonEvt module on Mac OS X. Still gives a couple of warnings but compiles OK. Index: setup.py =================================================================== RCS file: /cvsroot/python/python/dist/src/setup.py,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** setup.py 2001/12/09 23:08:54 1.70 --- setup.py 2001/12/12 23:03:17 1.71 *************** *** 605,608 **** --- 605,610 ---- exts.append( Extension('_App', ['app/_Appmodule.c'], extra_link_args=['-framework', 'Carbon']) ) + exts.append( Extension('_CarbonEvt', ['carbonevt/_CarbonEvtmodule.c'], + extra_link_args=['-framework', 'Carbon']) ) exts.append( Extension('_Cm', ['cm/_Cmmodule.c'], extra_link_args=['-framework', 'Carbon']) ) From fdrake@users.sourceforge.net Thu Dec 13 04:25:39 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Wed, 12 Dec 2001 20:25:39 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib tkinter.tex,1.9,1.10 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv30969 Modified Files: tkinter.tex Log Message: Minor adjustments. Index: tkinter.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/tkinter.tex,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tkinter.tex 2001/12/03 21:18:30 1.9 --- tkinter.tex 2001/12/13 04:25:37 1.10 *************** *** 910,914 **** \seetitle[http://tix.sourceforge.net/] {Tix Homepage} ! {See the home page for \module{Tix}.} \seetitle[http://tix.sourceforge.net/dist/current/man/] {Tix Man Pages} --- 910,915 ---- \seetitle[http://tix.sourceforge.net/] {Tix Homepage} ! {The home page for \module{Tix}. This includes links to ! additional documentation and downloads.} \seetitle[http://tix.sourceforge.net/dist/current/man/] {Tix Man Pages} *************** *** 1315,1321 **** create color images from XPM files. ! % Python Demo of: \ulink{XPM Image In Button}{http://tix.sourceforge.net/dist/current/demos/samples/Xpm.tcl} ! % Python Demo of: \ulink{XPM Image In Menu}{http://tix.sourceforge.net/dist/current/demos/samples/Xpm1.tcl} \item --- 1316,1324 ---- create color images from XPM files. ! % Python Demo of: ! % \ulink{XPM Image In Button}{http://tix.sourceforge.net/dist/current/demos/samples/Xpm.tcl} ! % Python Demo of: ! % \ulink{XPM Image In Menu}{http://tix.sourceforge.net/dist/current/demos/samples/Xpm1.tcl} \item *************** *** 1491,1498 **** The text widget and scrollbar are packed together in a \class{Frame}, ! and the methods of the \class{Pack} geometry manager are acquired from ! the \class{Frame} object. This allows the \class{ScrolledText} widget ! to be used directly to achieve most normal geometry management ! behavior. Should more specific control be necessary, the following attributes --- 1494,1501 ---- The text widget and scrollbar are packed together in a \class{Frame}, ! and the methods of the \class{Grid} and \class{Pack} geometry managers ! are acquired from the \class{Frame} object. This allows the ! \class{ScrolledText} widget to be used directly to achieve most normal ! geometry management behavior. Should more specific control be necessary, the following attributes From fdrake@users.sourceforge.net Thu Dec 13 04:53:10 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Wed, 12 Dec 2001 20:53:10 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/lib-tk Tix.py,1.6,1.7 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/lib-tk In directory usw-pr-cvs1:/tmp/cvs-serv3637/Lib/lib-tk Modified Files: Tix.py Log Message: Make tix_configure() work the same way configure() works for the basic Tkinter classes. Adjust a lot of docstrings. Convert a few type checks to use isinstance() instead of type(). This is part of SF patch #485959. Index: Tix.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Tix.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Tix.py 2001/11/25 14:50:55 1.6 --- Tix.py 2001/12/13 04:53:07 1.7 *************** *** 50,53 **** --- 50,61 ---- ACROSSTOP = 'acrosstop' + # Some constants used by Tkinter dooneevent() + TCL_DONT_WAIT = 1 << 1 + TCL_WINDOW_EVENTS = 1 << 2 + TCL_FILE_EVENTS = 1 << 3 + TCL_TIMER_EVENTS = 1 << 4 + TCL_IDLE_EVENTS = 1 << 5 + TCL_ALL_EVENTS = 0 + # BEWARE - this is implemented by copying some code from the Widget class # in Tkinter (to override Widget initialization) and is therefore *************** *** 57,77 **** # Could probably add this to Tkinter.Misc class tixCommand: ! """The tix command provides access to miscellaneous elements of Tix's internal state and the Tix application context. ! Most of the information manipulated by this command per ! tains to the application as a whole, or to a screen or ! display, rather than to a particular window. The command ! can take any of a number of different forms depending on ! the option argument. This is a mixin class, assumed to be mixed to Tkinter.Tk that supports the self.tk.call method. """ def tix_addbitmapdir(self, directory): ! """Tix maintains a list of directory under which which the tix_getimage and tix_getbitmap commands will ! search for image files. The standard bitmap direc ! tory is $TIX_LIBRARY/bitmaps. The addbitmapdir com ! mand adds directory into this list. By using this command, the image files of an applications can also be located using the tix_getimage or tix_getbitmap --- 65,84 ---- # Could probably add this to Tkinter.Misc class tixCommand: ! """The tix commands provide access to miscellaneous elements of Tix's internal state and the Tix application context. ! Most of the information manipulated by these commands pertains ! to the application as a whole, or to a screen or ! display, rather than to a particular window. This is a mixin class, assumed to be mixed to Tkinter.Tk that supports the self.tk.call method. """ + def tix_addbitmapdir(self, directory): ! """Tix maintains a list of directories under which the tix_getimage and tix_getbitmap commands will ! search for image files. The standard bitmap directory ! is $TIX_LIBRARY/bitmaps. The addbitmapdir command ! adds directory into this list. By using this command, the image files of an applications can also be located using the tix_getimage or tix_getbitmap *************** *** 88,119 **** def tix_configure(self, cnf=None, **kw): ! """Query or modify the configuration options of the ! Tix application context. If no option is specified, ! returns a list describing all of the available ! options (see Tk_ConfigureInfo for information on ! the format of this list). If option is specified ! with no value, then the command returns a list ! describing the one named option (this list will be ! identical to the corresponding sublist of the value ! returned if no option is specified). If one or ! more option-value pairs are specified, then the ! command modifies the given option(s) to have the ! given value(s); in this case the command returns an ! empty string. Option may be any of the options ! described in the CONFIGURATION OPTIONS section. """ ! return apply(self.tk.call, ('tix', configure) + ! self._options(cnf,kw) ) def tix_filedialog(self, dlgclass=None): ! """Returns the file selection dialog that may be ! shared among different modules of this application. ! This command will create a file selection dialog ! widget when it is called the first time. This dialog ! will be returned by all subsequent calls to tix ! filedialog. An optional dlgclass parameter can be ! passed to specified what type of file selection ! dialog widget is desired. Possible options are 'tix' ! 'FileSelectDialog' or 'tixExFileSelectDialog'. """ if dlgclass is not None: --- 95,131 ---- def tix_configure(self, cnf=None, **kw): ! """Query or modify the configuration options of the Tix application ! context. If no option is specified, returns a dictionary all of the ! available options. If option is specified with no value, then the ! command returns a list describing the one named option (this list ! will be identical to the corresponding sublist of the value ! returned if no option is specified). If one or more option-value ! pairs are specified, then the command modifies the given option(s) ! to have the given value(s); in this case the command returns an ! empty string. Option may be any of the configuration options. """ ! # Copied from Tkinter.py ! if kw: ! cnf = _cnfmerge((cnf, kw)) ! elif cnf: ! cnf = _cnfmerge(cnf) ! if cnf is None: ! cnf = {} ! for x in self.tk.split(self.tk.call('tix', 'configure')): ! cnf[x[0][1:]] = (x[0][1:],) + x[1:] ! return cnf ! if isinstance(cnf, StringType): ! x = self.tk.split(self.tk.call('tix', 'configure', '-'+cnf)) ! return (x[0][1:],) + x[1:] ! return self.tk.call(('tix', 'configure') + self._options(cnf)) def tix_filedialog(self, dlgclass=None): ! """Returns the file selection dialog that may be shared among ! different calls from this application. This command will create a ! file selection dialog widget when it is called the first time. This ! dialog will be returned by all subsequent calls to tix_filedialog. ! An optional dlgclass parameter can be passed to specified what type ! of file selection dialog widget is desired. Possible options are ! tix FileSelectDialog or tixExFileSelectDialog. """ if dlgclass is not None: *************** *** 123,152 **** def tix_getbitmap(self, name): ! """Locates a bitmap file of the name name.xpm or name ! in one of the bitmap directories (self, see the ! tix_addbitmapdir command above). By using tix_getbitmap, ! you can advoid hard coding the pathnames of ! the bitmap files in your application. When successful, ! it returns the complete pathname of the bitmap ! file, prefixed with the character '@'. The returned ! value can be used to configure the -bitmap option ! of the TK and Tix widgets. """ return self.tk.call('tix', 'getbitmap', name) def tix_getimage(self, name): ! """Locates an image file of the name name.xpm, ! name.xbm or name.ppm in one of the bitmap directo ! ries (see the addbitmapdir command above). If more ! than one file with the same name (but different ! extensions) exist, then the image type is chosen ! according to the depth of the X display: xbm images ! are chosen on monochrome displays and color images ! are chosen on color displays. By using tix getim ! age, you can advoid hard coding the pathnames of ! the image files in your application. When success ! ful, this command returns the name of the newly ! created image, which can be used to configure the ! -image option of the TK and Tix widgets. """ return self.tk.call('tix', 'getimage', name) --- 135,159 ---- def tix_getbitmap(self, name): ! """Locates a bitmap file of the name name.xpm or name in one of the ! bitmap directories (see the tix_addbitmapdir command above). By ! using tix_getbitmap, you can avoid hard coding the pathnames of the ! bitmap files in your application. When successful, it returns the ! complete pathname of the bitmap file, prefixed with the character ! '@'. The returned value can be used to configure the -bitmap ! option of the TK and Tix widgets. """ return self.tk.call('tix', 'getbitmap', name) def tix_getimage(self, name): ! """Locates an image file of the name name.xpm, name.xbm or name.ppm ! in one of the bitmap directories (see the addbitmapdir command ! above). If more than one file with the same name (but different ! extensions) exist, then the image type is chosen according to the ! depth of the X display: xbm images are chosen on monochrome ! displays and color images are chosen on color displays. By using ! tix_ getimage, you can advoid hard coding the pathnames of the ! image files in your application. When successful, this command ! returns the name of the newly created image, which can be used to ! configure the -image option of the Tk and Tix widgets. """ return self.tk.call('tix', 'getimage', name) *************** *** 154,158 **** def tix_option_get(self, name): """Gets the options manitained by the Tix ! scheme mechanism. Available options are: active_bg active_fg bg --- 161,165 ---- def tix_option_get(self, name): """Gets the options manitained by the Tix ! scheme mechanism. Available options include: active_bg active_fg bg *************** *** 170,188 **** def tix_resetoptions(self, newScheme, newFontSet, newScmPrio=None): ! """Resets the scheme and fontset of the Tix application ! to newScheme and newFontSet, respectively. ! This affects only those widgets created after this ! call. Therefore, it is best to call the resetop ! tions command before the creation of any widgets in ! a Tix application. ! The optional parameter newScmPrio can be given to ! reset the priority level of the TK options set by ! the Tix schemes. ! Because of the way TK handles the X option database, after ! tixwish has started up, it is not possible to reset the ! color schemes and font sets using the tix config command. ! Instead, the tix resetoptions command must be used. """ if newScmPrio is not None: --- 177,193 ---- def tix_resetoptions(self, newScheme, newFontSet, newScmPrio=None): ! """Resets the scheme and fontset of the Tix application to ! newScheme and newFontSet, respectively. This affects only those ! widgets created after this call. Therefore, it is best to call the ! resetoptions command before the creation of any widgets in a Tix ! application. ! The optional parameter newScmPrio can be given to reset the ! priority level of the Tk options set by the Tix schemes. ! Because of the way Tk handles the X option database, after Tix has ! been has imported and inited, it is not possible to reset the color ! schemes and font sets using the tix config command. Instead, the ! tix_resetoptions command must be used. """ if newScmPrio is not None: *************** *** 204,208 **** # If it's static, lib/tix8.1/pkgIndex.tcl should have # 'load {} Tix' ! # If it's dynamic, lib/tix8.1/pkgIndex.tcl should have # 'load libtix8.1.8.3.so Tix' self.tk.eval('package require Tix') --- 209,213 ---- # If it's static, lib/tix8.1/pkgIndex.tcl should have # 'load {} Tix' ! # If it's dynamic under Unix, lib/tix8.1/pkgIndex.tcl should have # 'load libtix8.1.8.3.so Tix' self.tk.eval('package require Tix') *************** *** 363,369 **** if option == '': return ! elif type(option) != type(''): option = `option` ! if type(value) != type(''): value = `value` names = self._subwidget_names() --- 368,374 ---- if option == '': return ! elif not isinstance(option, StringType): option = `option` ! if not isinstance(value, StringType): value = `value` names = self._subwidget_names() *************** *** 486,500 **** Subwidget Class --------- ----- ! label Label ! message Message""" def __init__(self, master=None, cnf={}, **kw): # static seem to be -installcolormap -initwait -statusbar -cursor ! static = ['options', 'installcolormap', 'initwait', 'statusbar', 'cursor'] TixWidget.__init__(self, master, 'tixBalloon', static, cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label', ! destroy_physically=0) self.subwidget_list['message'] = _dummyLabel(self, 'message', ! destroy_physically=0) def bind_widget(self, widget, cnf={}, **kw): --- 491,506 ---- Subwidget Class --------- ----- ! label Label ! message Message""" def __init__(self, master=None, cnf={}, **kw): # static seem to be -installcolormap -initwait -statusbar -cursor ! static = ['options', 'installcolormap', 'initwait', 'statusbar', ! 'cursor'] TixWidget.__init__(self, master, 'tixBalloon', static, cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label', ! destroy_physically=0) self.subwidget_list['message'] = _dummyLabel(self, 'message', ! destroy_physically=0) def bind_widget(self, widget, cnf={}, **kw): *************** *** 513,517 **** def __init__(self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixButtonBox', ! ['orientation', 'options'], cnf, kw) def add(self, name, cnf={}, **kw): --- 519,523 ---- def __init__(self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixButtonBox', ! ['orientation', 'options'], cnf, kw) def add(self, name, cnf={}, **kw): *************** *** 519,523 **** btn = apply(self.tk.call, ! (self._w, 'add', name) + self._options(cnf, kw)) self.subwidget_list[name] = _dummyButton(self, name) return btn --- 525,529 ---- btn = apply(self.tk.call, ! (self._w, 'add', name) + self._options(cnf, kw)) self.subwidget_list[name] = _dummyButton(self, name) return btn *************** *** 542,552 **** def __init__ (self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixComboBox', ! ['editable', 'dropdown', 'fancy', 'options'], ! cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label') self.subwidget_list['entry'] = _dummyEntry(self, 'entry') self.subwidget_list['arrow'] = _dummyButton(self, 'arrow') self.subwidget_list['slistbox'] = _dummyScrolledListBox(self, ! 'slistbox') try: self.subwidget_list['tick'] = _dummyButton(self, 'tick') --- 548,558 ---- def __init__ (self, master=None, cnf={}, **kw): TixWidget.__init__(self, master, 'tixComboBox', ! ['editable', 'dropdown', 'fancy', 'options'], ! cnf, kw) self.subwidget_list['label'] = _dummyLabel(self, 'label') self.subwidget_list['entry'] = _dummyEntry(self, 'entry') self.subwidget_list['arrow'] = _dummyButton(self, 'arrow') self.subwidget_list['slistbox'] = _dummyScrolledListBox(self, ! 'slistbox') try: self.subwidget_list['tick'] = _dummyButton(self, 'tick') From jvr@users.sourceforge.net Thu Dec 13 12:54:39 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Thu, 13 Dec 2001 04:54:39 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Tools/IDE Widgets.rsrc,1.3,1.4 PythonIDE.rsrc,1.9,1.10 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE In directory usw-pr-cvs1:/tmp/cvs-serv30841 Modified Files: Widgets.rsrc PythonIDE.rsrc Log Message: re-checkin as AppleSingle Index: Widgets.rsrc =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/Widgets.rsrc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvsgdm9cf and /tmp/cvsWonT9j differ Index: PythonIDE.rsrc =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PythonIDE.rsrc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 Binary files /tmp/cvs0zTCtg and /tmp/cvsEtnSGm differ From jvr@users.sourceforge.net Thu Dec 13 12:57:13 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Thu, 13 Dec 2001 04:57:13 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Lib FrameWork.py,1.46,1.47 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Lib In directory usw-pr-cvs1:/tmp/cvs-serv31359 Modified Files: FrameWork.py Log Message: Don't barf when an AppleEvent was not handled. It's ok to ignore. Index: FrameWork.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Lib/FrameWork.py,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** FrameWork.py 2001/12/10 16:08:14 1.46 --- FrameWork.py 2001/12/13 12:57:11 1.47 *************** *** 393,398 **** AEProcessAppleEvent(event) except: ! print "AEProcessAppleEvent error:" ! traceback.print_exc() def do_unknownevent(self, event): --- 393,399 ---- AEProcessAppleEvent(event) except: ! pass ! #print "AEProcessAppleEvent error:" ! #traceback.print_exc() def do_unknownevent(self, event): From jvr@users.sourceforge.net Thu Dec 13 12:58:11 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Thu, 13 Dec 2001 04:58:11 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac ReadMe,1.37,1.38 Message-ID: Update of /cvsroot/python/python/dist/src/Mac In directory usw-pr-cvs1:/tmp/cvs-serv31549 Modified Files: ReadMe Log Message: fixed typo in my email address Index: ReadMe =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/ReadMe,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** ReadMe 2001/11/30 14:16:27 1.37 --- ReadMe 2001/12/13 12:58:09 1.38 *************** *** 235,239 **** http://www.mindvision.com ! Just van Rossum created the initial version of the installer (with Installer Vise Lite), and Jack worked from there. --- 235,239 ---- http://www.mindvision.com ! Just van Rossum created the initial version of the installer (with Installer Vise Lite), and Jack worked from there. From jvr@users.sourceforge.net Thu Dec 13 13:15:30 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Thu, 13 Dec 2001 05:15:30 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Lib/Carbon CoreGraphics.py,NONE,1.1 CG.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Lib/Carbon In directory usw-pr-cvs1:/tmp/cvs-serv3104 Added Files: CoreGraphics.py CG.py Log Message: first checkin for CoreGraphics --- NEW FILE: CoreGraphics.py --- # Generated from 'CGContext.h' def FOUR_CHAR_CODE(x): return x kCGLineJoinMiter = 0 kCGLineJoinRound = 1 kCGLineJoinBevel = 2 kCGLineCapButt = 0 kCGLineCapRound = 1 kCGLineCapSquare = 2 kCGPathFill = 0 kCGPathEOFill = 1 kCGPathStroke = 2 kCGPathFillStroke = 3 kCGPathEOFillStroke = 4 kCGTextFill = 0 kCGTextStroke = 1 kCGTextFillStroke = 2 kCGTextInvisible = 3 kCGTextFillClip = 4 kCGTextStrokeClip = 5 kCGTextFillStrokeClip = 6 kCGTextClip = 7 kCGEncodingFontSpecific = 0 kCGEncodingMacRoman = 1 --- NEW FILE: CG.py --- from _CG import * From jvr@users.sourceforge.net Thu Dec 13 13:16:00 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Thu, 13 Dec 2001 05:16:00 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/cg - New directory Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/cg In directory usw-pr-cvs1:/tmp/cvs-serv3231/cg Log Message: Directory /cvsroot/python/python/dist/src/Mac/Modules/cg added to the repository From jvr@users.sourceforge.net Thu Dec 13 13:17:22 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Thu, 13 Dec 2001 05:17:22 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/cg CFMLateImport.c,NONE,1.1 CFMLateImport.h,NONE,1.1 CGStubLib,NONE,1.1 CGStubLib.exp,NONE,1.1 CGStubLib.readme,NONE,1.1 _CGmodule.c,NONE,1.1 cgscan.py,NONE,1.1 cgsupport.py,NONE,1.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/cg In directory usw-pr-cvs1:/tmp/cvs-serv3616 Added Files: CFMLateImport.c CFMLateImport.h CGStubLib CGStubLib.exp CGStubLib.readme _CGmodule.c cgscan.py cgsupport.py Log Message: second CoreGraphics batch --- NEW FILE: CFMLateImport.c --- /* File: CFMLateImport.c Contains: Implementation of CFM late import library. Written by: Quinn Copyright: Copyright © 1999 by Apple Computer, Inc., all rights reserved. You may incorporate this Apple sample source code into your program(s) without restriction. This Apple sample source code has been provided "AS IS" and the responsibility for its operation is yours. You are not permitted to redistribute this Apple sample source code as "Apple sample source code" after having made changes. If you're going to re-distribute the source, we require that you make it clear in the source that the code was descended from Apple sample source code, but that you've made changes. Change History (most recent first): [...1321 lines suppressed...] err = cfragNoSymbolErr; } } if (symNameStr != nil) { CFRelease(symNameStr); } return err; } extern pascal OSStatus CFMLateImportBundle(const CFragSystem7DiskFlatLocator *fragToFixLocator, CFragConnectionID fragToFixConnID, CFragInitFunction fragToFixInitRoutine, ConstStr255Param weakLinkedLibraryName, CFBundleRef bundleToImport) // See comments in interface part. { MoreAssertQ(bundleToImport != nil); return CFMLateImportCore(fragToFixLocator, fragToFixConnID, fragToFixInitRoutine, weakLinkedLibraryName, BundleLookup, bundleToImport); } --- NEW FILE: CFMLateImport.h --- /* File: CFMLateImport.h Contains: Interface to CFM late import library. Written by: Quinn Copyright: Copyright © 1999 by Apple Computer, Inc., all rights reserved. You may incorporate this Apple sample source code into your program(s) without restriction. This Apple sample source code has been provided "AS IS" and the responsibility for its operation is yours. You are not permitted to redistribute this Apple sample source code as "Apple sample source code" after having made changes. If you're going to re-distribute the source, we require that you make it clear in the source that the code was descended from Apple sample source code, but that you've made changes. Change History (most recent first): <6> 21/9/01 Quinn Changes for CWPro7 Mach-O build. <5> 19/9/01 Quinn Change comments to reflect the fact that an unpacked data section is no longer required. <4> 19/9/01 Quinn Simplified API and implementation after a suggestion by Eric Grant. You no longer have to CFM export a dummy function; you can just pass in the address of your fragment's init routine. <3> 16/11/00 Quinn Allow symbol finding via a callback and use that to implement CFBundle support. <2> 18/10/99 Quinn Renamed CFMLateImport to CFMLateImportLibrary to allow for possible future API expansion. <1> 15/6/99 Quinn First checked in. */ #pragma once ///////////////////////////////////////////////////////////////// // MoreIsBetter Setup //#include "MoreSetup.h" // Mac OS Interfaces #if ! MORE_FRAMEWORK_INCLUDES #include #include #include #include #endif ///////////////////////////////////////////////////////////////// #ifdef __cplusplus extern "C" { #endif /* FAQ --- Q: What does this library do? A: It allows you to resolve a weak linked library at runtime, by supply a CFM connection to the library that should substitute for the weak linked one. Q: Does the substituted library have to have the same name as the weak linked library. A: No. Q: What's this useful for? A: The most obvious example of where this is useful is when you rely on shared libraries that the user might delete or move. To can find the shared library (possibly even using CatSearch), call GetDiskFragment to open a connection to it, late import it using this library, and then the rest of your code can continue to use the shared library as if nothing had happened. No more defining thousands of stub routines which call through routine pointers. There are, however, numerous less obvious uses. You can use this code to make a 'self repairing' application. If the user removes your shared library from the Extensions folder, the startup code for your application can offer tor re-install it. If the user agrees, you can then re-install your shared library, late import it, and then continue running your application if nothing happened. You can even use this code to free yourself from the Extensions folder entirely. Say you have a suite of applications that currently installs a dozen shared libraries in the Extensions folder. You can move those libraries to another folder entirely and each application's startup code can track down the library (using an alias in the Preferences file) and late import it. An even cooler use is to provide easy abstraction layers. Say you have a network code for both the MacTCP API and the Open Transport API. Typically, you would be force to do this by having an abstraction layer where every routine contains a switch between MacTCP and OT. Your OpenSocket routine might look like: static int OpenSocket(void) { if (gOTAvailable) { return OpenSocketOT(); } else { return OpenSocketMacTCP(); } } With this code, you can avoid that entirely. Simply weak link to a shared library that you know is never going to be implemented ("crea;MySocketsDummy") and then, at runtime, decide whether the system has MacTCP or OT and late import the relevant real implementation ("crea;MySocketsMacTCP" or "crea;MySocketsOT"). One benefit of this approach is that only the MacTCP or the OT code is resident in memory on any given system. */ typedef pascal OSStatus (*CFMLateImportLookupProc)(ConstStr255Param symName, CFragSymbolClass symClass, void **symAddr, void *refCon); // CFMLateImportLookupProc defines a callback for CFMLateImportCore. // The routine is expected to look up the address of the symbol named // symName and return it in *symAddr. The symbol should be of class // symClass, although the callback decides whether a class mismatch is // an error. refCon is an application defined value that was originally // passed in to CFMLateImportCore. // // If this routine returns an error, a symbol address of 0 is assumed. // If the symbol is marked as a weak import, the CFMLateImportCore will // continue, otherwise the CFMLateImportCore routine will fail with the // error. extern pascal OSStatus CFMLateImportCore(const CFragSystem7DiskFlatLocator *fragToFixLocator, CFragConnectionID fragToFixConnID, CFragInitFunction fragToFixInitRoutine, ConstStr255Param weakLinkedLibraryName, CFMLateImportLookupProc lookup, void *refCon); // This routine will link you, at runtime, to some library // that you were weak linked to and wasn't present when your // fragment was prepared. As well as the obvious functionality // of being able to resolve weak links after prepare time, // this functionality can be put to a number of less obvious uses, // some of which are discussed at the top of this header file. // // To call this routine, you need a number of pieces of information: // // 1. fragToFixLocator, fragToFixConnID: The location of your own // code fragment on disk and the CFM connection ID to your own // code fragment. Typically you get this information from your // fragment's CFM init routine. You must ensure that // fragToFixLocator->fileSpec points to an FSSpec of the // file which holds your code fragment. // // IMPORTANT: // The fact that you pass in a CFragSystem7DiskFlatLocator as the // fragToFixLocator implies that the fragment to be fixed up must // be in the data fork of a file. The code could be modified // to remove this requirement, but on disk code fragments are the most // common case. // // IMPORTANT: // The fragment to fix may have a packed data section. Packing the // data section will reduce the size of your fragment on disk, but it // will significantly increase the memory needed by this routine // (it increases memory usage by the sum of the sizes of the packed // and unpacked data section). See below for instructions on how to // create an unpacked data section. // // 2. fragToFixInitRoutine: A pointer to your own code fragment's // fragment initialiser routine. You necessarily have one of these // because you need it to get values for the fragToFixLocator and // fragToFixConnID parameters. Just pass its address in as a parameter // as well. // // 3. weakLinkedLibraryName: The name of the weak linked library which // failed to link. You must have weak linked to this library. // It is oxymoric for you to pass a strong linked library here, // because your code would not have prepared if a strong linked // library failed to prepare, and so you couldn't supply a valid /// fragToFix. // // 4. lookup, refCon: A pointer to a callback function that the // routine calls to look up the address of a symbol, and a refCon // for that callback routine. // // Note: // The fragToFixLocator and fragToFixInitRoutine parameters // are artifacts of the way in which this functionality is implemented. // In an ideal world, where CFM exported decent introspection APIs // to third party developers, these parameters would not be necessary. // If you're using this code inside Apple, you probably should investigate // using the CFM private APIs for getting at the information these // parameters are needed for. See the comments inside the implementation // for more details. // // Note: // The extra memory taken when you use a packed data section is also an // artifact of my workaround for the lack of CFM introspection APIs. In // my opinion it's better to use an unpacked data section and consume more // space on disk while saving memory. In CodeWarrior you can switch to an // unpacked data section by checking the "Expand Uninitialized Data" // checkbox in the "PPC PEF" settings panel. In MPW, specified the // "-packdata off" option to PPCLink. // // When the routine returns, any symbols that you imported from the // library named weakLinkedLibraryName will be resolved to the address // of the symbol provided by the "lookup" callback routine. // // It is possible for an unresolved import to remain unresolved after // this routine returns. If the symbol import is marked as weak (as // opposed to the library, which *must* be marked as weak) and the symbol // is not found by the "lookup" callback, the routine will simple skip // that symbol. If the symbol isn't marked as weak, the routine will fail // in that case. // // Most of the possible error results are co-opted CFM errors. These // include: // // cfragFragmentFormatErr -- The fragment to fix is is an unknown format. // cfragNoSectionErr -- Could not find the loader section in the fragment to fix. // cfragNoLibraryErr -- The fragment to fix is not weak linked to weakLinkedLibraryName. // cfragFragmentUsageErr -- The fragment to fix doesn't have a data section. // -- The fragment to fix is strong linked to weakLinkedLibraryName. // -- The fragment doesn't have an init routine. // cfragFragmentCorruptErr -- Encountered an undefined relocation opcode. // unimpErr -- Encountered an unimplement relocation opcode. The // relocation engine only implements a subset of the CFM // relocation opcodes, the subset most commonly used by // MPW and CodeWarrior PEF containers. If you encounter // this error, you'll probably have to add the weird // relocation opcode to the engine, which shouldn't be // be too hard. // memFullErr -- It's likely that this error is triggered by the memory // needed to unpack your data section. Either make your // data section smaller, or unpack it (see above). // errors returned by FindSymbol // errors returned by Memory Manager // // The routine needs enough memory to hold the loader section of the fragment // to fix in memory. It allocates that memory using NewPtr and dispsoses of // it before it returns. You may want to change the memory allocator, which // is very simple. extern pascal OSStatus CFMLateImportLibrary(const CFragSystem7DiskFlatLocator *fragToFixLocator, CFragConnectionID fragToFixConnID, CFragInitFunction fragToFixInitRoutine, ConstStr255Param weakLinkedLibraryName, CFragConnectionID connIDToImport); // A wrapper around CFMLateImportCore that looks up symbols by calling // FindSymbol on a connection to a CFM library (connIDToImport). // You can get this connection ID through any standard CFM API, for example // GetSharedLibrary, GetDiskFragment, or GetMemFragment. // // IMPORTANT: // The fragment name for connIDToImport *does not* have to match // weakLinkedLibraryName. This is part of the power of this library. extern pascal OSStatus CFMLateImportBundle(const CFragSystem7DiskFlatLocator *fragToFixLocator, CFragConnectionID fragToFixConnID, CFragInitFunction fragToFixInitRoutine, ConstStr255Param weakLinkedLibraryName, CFBundleRef bundleToImport); // A wrapper around CFMLateImportCore that looks up symbols by calling // CFBundleGetFunctionPointerForName on a reference to a Core Foundation // bundle (bundleToImport). You can get this reference through any // Core Foundation bundle API, for example CFBundleCreate. #ifdef __cplusplus } #endif --- NEW FILE: CGStubLib --- (This file must be converted with BinHex 4.0) :!!"cG(9L69"6)!#3"!L3!!!!!BUjr%T[H5&`C@CQF(G`B`!!!!'i-rHh!*!0!3# 3"[q3"!#3$JJm!!!!8!3"!*!1rj!%!*!%rj!%!*!%rj!%!*!A1!!!"2!!!!!$!!! !1N0(3fpZG'9iG&0SEhG8CAKd3A43EfPZG%0(3fpZG'9iG&0SEhG8CAKd3dG$Efj dCAKd8f9XC@0d4QpZG%0(3fpZG'9iG&0PG&4PH(4%FQ&hD@jR6@pNC80(3fpZG'9 iG%4bBAG3BA4S3dG$EfjdCAKd8f9d6'PZC8T[D@j$4d0[ER4PH(46CA4-D@jP3f& `3dG$EfjdCAKd4f9d9'9iG&"[FfPdD@pZ3dG$EfjdCAKd4f9d8'&dD%0eFR*PER4 3EfPZG%0(3fpZG'9iG&0PG&0SEh9XC%&ZG'PKE'PKFd0(3fpZG'9iG&0jEQ0SFQp ZDATP3dG$EfjdCAKd4QaeFfK$4d0[ER4PH(4&EQ43B@GP3dG$EfjdCAKd8f9d4Qp ZG&0THQ9$4d0[ER4PH(4(CA48CAKd6@&dFQPi3dG$EfjdCAKd8f9d9'9iG%eKG(* TH%0(3fpZG'9iG&0PG&4PH(43Eh0TG'P[EN0(3fpZG'9iG&0PG%0SBA*KBh4PFP0 `B@0TEQG$4d0[ER4PH(46CA4$69P,8h4bEfYP3fpXEh*$4d0[ER4PH(46CA4$69P ,4QPXE%0[E'pb3dG$EfjdCAKd8f9d8NG#8h4bEfYP3fpXEh*$4d0[ER4PH(46CA4 54d*'D@aX3fpXEh*$4d0[ER4PH(46CA4(FQ&j8h4bEfYP3fpXEh*$4d0[ER4PH(4 6CA4(FQ&j4QPXE%0[E'pb3dG$EfjdCAKd3faTF&4[8Q9MG%0(3fpZG'9iG%923fa TF%0(3fpZG'9iG%0XDA"$4d0[ER4PH(4$E'9KFP*PBh4$4d0[ER4PH(46G(*[Df9 5C@0d9fPdD>C(4S3dG$EfjdCAKd8h4bEfYP8Q9MG%0(3fpZG'9iG%CTE'a5C@0 d3dG$EfjdCAKd8h4bEfYP8'&dD%0(3fpZG'9iG%924QPXE&"KG'K$4d0[ER4PH(4 'D@aX8'&dD%0(3fpZG'9iG%GPG&"KG'K#Eh9ZC'PZCd*[H%0(3fpZG'9iG%Pc8'& dD%9YF(4j3dG$EfjdCAKd3@4N3A*M9'p3EfPZG%0(3fpZG'9iG%&NC%&bBd0(3fp ZG'9iG%&NC&*PBh4$4d0[ER4PH(4$E'pcC9"KG'K$4d0[ER4PH(4"C'44G@&N3h9 bGQ98Ee"[D@jd3dG$EfjdCAKd3@4N3h9bGQ98Ee"[D@jd3dG$EfjdCAKd3@4N6'P ZC94[8'pTER4$4d0[ER4PH(40EhCP9'p3EfPZG%0(3fpZG'9iG%*PCfPZ8'&dD%0 (3fpZG'9iG&0PG%&XF'KK3dG$EfjdCAKd8f9d4QaKG'jPFh0$4d0[ER4PH(46CA4 0DA4PFNaTE@Pd3dG$EfjdCAKd8f9d6'PZC9GTC(4S3dG$EfjdCAKd4f9d3e403dG $EfjdCAKd3fpZBf&d3e403dG$EfjdCAKd8QpdBA4P3e403dG$EfjdCAKd9(*KER0 XBA4P3e403dG$EfjdCAKd8f0KE'9$9%e$4d0[ER4PH(45CA0dEh*P4e0dBA4P3dG $EfjdCAKd8f&fC8G6G'&dC80(3fpZG'9iG&*PE'9KFf9$FQ9KG'9$4d0[ER4PH(4 'Eh*3Eh*d!*!%)!!!!#J!#!!X!")!&!!G!"`!)J!F!#N!(!!`!!`!0`!BrD3!()G E!"$KGJ!2F0)!%S6f!"X(8J!@+$m!%Er*!"3)b!!B18%!%TFP!"4133!6*YS!&QJ q!"`5j3!6+b8!%FZX!!ijfJ!E40N!%FBC!!pc5`!83A3!%1#[!"BVd!!4bhd!%ab 3!!!83a!!&Nmd!"S9CJ!B@h8!'pSB!"4$r!!6,PJ!&IIe!"QcA`!6,A)!%S40!"@ 4"!!C[em!(!eJ!"+&B!!B'J8!$h&S!"XE+!!4[r-!%r"c!"BZe`!6,@J!'&Y`!"+ (m!!0R!B!('d8!"Gd9!!E00d!%142!"3ae3!4bj`!&UJa!J#3"rrq!J!"D!#3"2r q!J!$+J#3"2rq!J!$'`#3"2rq!J!#63#3"2rq!J!#eJ#3"2rq!J!"1J#3"2rq!J! #a3#3"2rq!J!#m3#3"2rq!J!"dJ#3"2rq!J!%,J#3"2rq!J!!D!#3"2rq!J!!I!# 3"2rq!J!"*!#3"2rq!J!!T`#3"2rq!J!%I!#3"2rq!J!%93#3"2rq!J!!mJ#3"2r q!J!"kJ#3"2rq!J!!9`#3"2rq!J!#-3#3"2rq!J!!hJ#3"2rq!J!"!*!&rri#!!- &!*!%rri#!!!B!*!%rri#!!!T!*!%rri#!!21!*!%rri#!!4Q!*!%rri#!!'i!*! %rri#!!#2!*!%rri#!!!m!*!%rri#!!%3!*!%rri#!!+b!*!%rri#!!4!!*!%rri #!!'I!*!%rri#!!*l!*!%rri#!!3F!*!%rri#!!2i!*!%rri#!!)&!*!%rri#!!* I!*!%rri#!!-k!*!%rri#!!0S!*!%rri#!!30!*!%rri#!!$$!*!%rri#!!+1!*! %rri#!!)H!*!%rri#!!2L!*!%rri#!!+I!*!%rri#!!&3!*!%rri#!!1V!*!%rri #!!*!!*!%rri#!!0-!*!%rri#!!1!!*!%rri#!!'%!*!%rri#!!52!*!%rri#!!1 A!*!%rri#!!1p!*!%rri#!!5I!*!%rri!N!3E2!!!!3!!!!&B!!!!@!!!!$)!N20 8!*!,!3#3%`&`Gh"M!*!5!`%!N"%d#80(8h4eBNaTBJ!!!3!!!!&B!!!!@!!!!$* 66e*8"*B!J!!F!$)!!'0QFQF!!!!+!!$rr`#3#2Ib: --- NEW FILE: CGStubLib.exp --- CGContextShowTextAtPoint CGContextShowText CGContextSelectFont CGContextSetTextDrawingMode CGContextDrawPath CGContextSetLineJoin CGContextSetLineCap CGContextGetTextPosition CGContextGetPathCurrentPoint CGContextSetShouldAntialias CGContextSynchronize CGContextFlush CGContextEndPage CGContextSetFontSize CGContextGetTextMatrix CGContextSetTextMatrix CGContextSetTextPosition CGContextSetCharacterSpacing CGContextSetCMYKStrokeColor CGContextSetCMYKFillColor CGContextSetRGBStrokeColor CGContextSetRGBFillColor CGContextSetGrayStrokeColor CGContextSetGrayFillColor CGContextClipToRect CGContextEOClip CGContextClip CGContextClearRect CGContextStrokeRectWithWidth CGContextStrokeRect CGContextFillRect CGContextStrokePath CGContextEOFillPath CGContextFillPath CGContextGetPathBoundingBox CGContextIsPathEmpty CGContextAddArcToPoint CGContextAddArc CGContextAddRect CGContextClosePath CGContextAddQuadCurveToPoint CGContextAddCurveToPoint CGContextAddLineToPoint CGContextMoveToPoint CGContextBeginPath CGContextSetAlpha CGContextSetFlatness CGContextSetMiterLimit CGContextSetLineWidth CGContextGetCTM CGContextConcatCTM CGContextRotateCTM CGContextTranslateCTM CGContextScaleCTM CGContextRestoreGState CGContextSaveGState CGContextRelease CreateCGContextForPort --- NEW FILE: CGStubLib.readme --- # CGStubLib was created by issuing this command in MPW: MakeStub CGStubLib.exp -o CGStubLib --- NEW FILE: _CGmodule.c --- /* =========================== Module _CG =========================== */ #include "Python.h" #include "macglue.h" #include "pymactoolbox.h" /* Macro to test whether a weak-loaded CFM function exists */ #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ PyErr_SetString(PyExc_NotImplementedError, \ "Not available in this shared library/OS version"); \ return NULL; \ }} while(0) #ifdef WITHOUT_FRAMEWORKS [...1293 lines suppressed...] PyErr_SetString(PyExc_ImportError, "CoreCraphics not supported"); return; }; #endif /* !TARGET_API_MAC_OSX */ m = Py_InitModule("_CG", CG_methods); d = PyModule_GetDict(m); CG_Error = PyMac_GetOSErrException(); if (CG_Error == NULL || PyDict_SetItemString(d, "Error", CG_Error) != 0) return; CGContextRef_Type.ob_type = &PyType_Type; Py_INCREF(&CGContextRef_Type); if (PyDict_SetItemString(d, "CGContextRefType", (PyObject *)&CGContextRef_Type) != 0) Py_FatalError("can't initialize CGContextRefType"); } /* ========================= End module _CG ========================= */ --- NEW FILE: cgscan.py --- # Scan an Apple header file, generating a Python file of generator calls. import sys import os BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') sys.path.append(BGENDIR) from scantools import Scanner_OSX from bgenlocations import TOOLBOXDIR LONG = "CoreGraphics" SHORT = "cg" OBJECTS = ("CGContextRef", ) # ADD object typenames here def main(): input = [ "CGContext.h", ] output = SHORT + "gen.py" defsoutput = TOOLBOXDIR + LONG + ".py" scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.gentypetest(SHORT+"typetest.py") scanner.close() print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" class MyScanner(Scanner_OSX): def destination(self, type, name, arglist): classname = "Function" listname = "functions" if arglist: t, n, m = arglist[0] if t in OBJECTS and m == "InMode": classname = "Method" listname = t + "_methods" # Special case for the silly first AllocatorRef argument if t == 'CFAllocatorRef' and m == 'InMode' and len(arglist) > 1: t, n, m = arglist[1] if t in OBJECTS and m == "InMode": classname = "MethodSkipArg1" listname = t + "_methods" return classname, listname def writeinitialdefs(self): self.defsfile.write("def FOUR_CHAR_CODE(x): return x\n") def makeblacklistnames(self): return [ "CGContextRetain", "CGContextRelease", ] def makegreylist(self): return [] def makeblacklisttypes(self): return [ "float_ptr", "CGRect_ptr", "CGPoint_ptr", "CGColorSpaceRef", "CGColorRenderingIntent", "CGFontRef", # "char_ptr", "CGGlyph_ptr", "CGImageRef", "CGPDFDocumentRef", ] def makerepairinstructions(self): return [ ([("char_ptr", "cstring", "InMode"), ("size_t", "length", "InMode")], [("InBuffer", "*", "*")]), # ([("char_ptr", "name", "InMode"),], # [("CCCCC", "*", "*")]), ] if __name__ == "__main__": main() --- NEW FILE: cgsupport.py --- # This script generates a Python interface for an Apple Macintosh Manager. # It uses the "bgen" package to generate C code. # The function specifications are generated by scanning the mamager's header file, # using the "scantools" package (customized for this particular manager). #error missing SetActionFilter import string # Declarations that change for each manager MODNAME = '_CG' # The name of the module # The following is *usually* unchanged but may still require tuning MODPREFIX = 'CG' # The prefix for module-wide routines INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner OUTPUTFILE = MODNAME + "module.c" # The file generated by this program from macsupport import * # Create the type objects includestuff = includestuff + """ #ifdef WITHOUT_FRAMEWORKS #include #include #else #include #endif #if !TARGET_API_MAC_OSX /* This code is adapted from the CallMachOFramework demo at: http://developer.apple.com/samplecode/Sample_Code/Runtime_Architecture/CallMachOFramework.htm It allows us to call Mach-O functions from CFM apps. */ #include #include "CFMLateImport.h" static OSStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr) // This routine finds a the named framework and creates a CFBundle // object for it. It looks for the framework in the frameworks folder, // as defined by the Folder Manager. Currently this is // "/System/Library/Frameworks", but we recommend that you avoid hard coded // paths to ensure future compatibility. // // You might think that you could use CFBundleGetBundleWithIdentifier but // that only finds bundles that are already loaded into your context. // That would work in the case of the System framework but it wouldn't // work if you're using some other, less-obvious, framework. { OSStatus err; FSRef frameworksFolderRef; CFURLRef baseURL; CFURLRef bundleURL; *bundlePtr = nil; baseURL = nil; bundleURL = nil; // Find the frameworks folder and create a URL for it. err = FSFindFolder(kOnAppropriateDisk, kFrameworksFolderType, true, &frameworksFolderRef); if (err == noErr) { baseURL = CFURLCreateFromFSRef(kCFAllocatorSystemDefault, &frameworksFolderRef); if (baseURL == nil) { err = coreFoundationUnknownErr; } } // Append the name of the framework to the URL. if (err == noErr) { bundleURL = CFURLCreateCopyAppendingPathComponent(kCFAllocatorSystemDefault, baseURL, framework, false); if (bundleURL == nil) { err = coreFoundationUnknownErr; } } // Create a bundle based on that URL and load the bundle into memory. // We never unload the bundle, which is reasonable in this case because // the sample assumes that you'll be calling functions from this // framework throughout the life of your application. if (err == noErr) { *bundlePtr = CFBundleCreate(kCFAllocatorSystemDefault, bundleURL); if (*bundlePtr == nil) { err = coreFoundationUnknownErr; } } if (err == noErr) { if ( ! CFBundleLoadExecutable( *bundlePtr ) ) { err = coreFoundationUnknownErr; } } // Clean up. if (err != noErr && *bundlePtr != nil) { CFRelease(*bundlePtr); *bundlePtr = nil; } if (bundleURL != nil) { CFRelease(bundleURL); } if (baseURL != nil) { CFRelease(baseURL); } return err; } // The CFMLateImport approach requires that you define a fragment // initialisation routine that latches the fragment's connection // ID and locator. If your code already has a fragment initialiser // you will have to integrate the following into it. static CFragConnectionID gFragToFixConnID; static FSSpec gFragToFixFile; static CFragSystem7DiskFlatLocator gFragToFixLocator; extern OSErr FragmentInit(const CFragInitBlock *initBlock); extern OSErr FragmentInit(const CFragInitBlock *initBlock) { __initialize(initBlock); /* call the "original" initializer */ gFragToFixConnID = (CFragConnectionID) initBlock->closureID; gFragToFixFile = *(initBlock->fragLocator.u.onDisk.fileSpec); gFragToFixLocator = initBlock->fragLocator.u.onDisk; gFragToFixLocator.fileSpec = &gFragToFixFile; return noErr; } #endif extern int GrafObj_Convert(PyObject *, GrafPtr *); /* ** Manual converters */ PyObject *CGPoint_New(CGPoint *itself) { return Py_BuildValue("(ff)", itself->x, itself->y); } int CGPoint_Convert(PyObject *v, CGPoint *p_itself) { if( !PyArg_Parse(v, "(ff)", &p_itself->x, &p_itself->y) ) return 0; return 1; } PyObject *CGRect_New(CGRect *itself) { return Py_BuildValue("(ffff)", itself->origin.x, itself->origin.y, itself->size.width, itself->size.height); } int CGRect_Convert(PyObject *v, CGRect *p_itself) { if( !PyArg_Parse(v, "(ffff)", &p_itself->origin.x, &p_itself->origin.y, &p_itself->size.width, &p_itself->size.height) ) return 0; return 1; } PyObject *CGAffineTransform_New(CGAffineTransform *itself) { return Py_BuildValue("(ffffff)", itself->a, itself->b, itself->c, itself->d, itself->tx, itself->ty); } int CGAffineTransform_Convert(PyObject *v, CGAffineTransform *p_itself) { if( !PyArg_Parse(v, "(ffffff)", &p_itself->a, &p_itself->b, &p_itself->c, &p_itself->d, &p_itself->tx, &p_itself->ty) ) return 0; return 1; } """ initstuff = initstuff + """ #if !TARGET_API_MAC_OSX CFBundleRef sysBundle; OSStatus err; if (&LoadFrameworkBundle == NULL) { PyErr_SetString(PyExc_ImportError, "CoreCraphics not supported"); return; } err = LoadFrameworkBundle(CFSTR("ApplicationServices.framework"), &sysBundle); if (err == noErr) err = CFMLateImportBundle(&gFragToFixLocator, gFragToFixConnID, FragmentInit, "\pCGStubLib", sysBundle); if (err != noErr) { PyErr_SetString(PyExc_ImportError, "CoreCraphics not supported"); return; }; #endif /* !TARGET_API_MAC_OSX */ """ class MyOpaqueByValueType(OpaqueByValueType): """Sort of a mix between OpaqueByValueType and OpaqueType.""" def mkvalueArgs(self, name): return "%s, &%s" % (self.new, name) CGPoint = MyOpaqueByValueType('CGPoint', 'CGPoint') CGRect = MyOpaqueByValueType('CGRect', 'CGRect') CGAffineTransform = MyOpaqueByValueType('CGAffineTransform', 'CGAffineTransform') char_ptr = Type("char *", "s") CGTextEncoding = int CGLineCap = int CGLineJoin = int CGTextDrawingMode = int CGPathDrawingMode = int # The real objects CGContextRef = OpaqueByValueType("CGContextRef", "CGContextRefObj") class MyObjectDefinition(GlobalObjectDefinition): def outputStructMembers(self): ObjectDefinition.outputStructMembers(self) def outputCleanupStructMembers(self): Output("CGContextRelease(self->ob_itself);") # Create the generator groups and link them module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff) CGContextRef_object = MyObjectDefinition('CGContextRef', 'CGContextRefObj', 'CGContextRef') # ADD object here module.addobject(CGContextRef_object) Function = FunctionGenerator Method = MethodGenerator CGContextRef_methods = [] # ADD _methods initializer here execfile(INPUTFILE) CreateCGContextForPort_body = """\ GrafPtr port; CGContextRef ctx; OSStatus _err; if (!PyArg_ParseTuple(_args, "O&", GrafObj_Convert, &port)) return NULL; _err = CreateCGContextForPort(port, &ctx); if (_err != noErr) if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", CGContextRefObj_New, ctx); return _res; """ f = ManualGenerator("CreateCGContextForPort", CreateCGContextForPort_body); f.docstring = lambda: "(CGrafPtr) -> CGContextRef" module.add(f) # ADD add forloop here for f in CGContextRef_methods: CGContextRef_object.add(f) # generate output (open the output file as late as possible) SetOutputFileName(OUTPUTFILE) module.generate() From jvr@users.sourceforge.net Thu Dec 13 13:20:02 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Thu, 13 Dec 2001 05:20:02 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Build _CG.carbon.mcp,NONE,1.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Build In directory usw-pr-cvs1:/tmp/cvs-serv4272 Added Files: _CG.carbon.mcp Log Message: project file for CoreGraphics --- NEW FILE: _CG.carbon.mcp --- cool RSRC ¸>\ºÿÿÒÉ pref pref From jvr@users.sourceforge.net Thu Dec 13 13:21:40 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Thu, 13 Dec 2001 05:21:40 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/scripts genpluginprojects.py,1.25,1.26 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/scripts In directory usw-pr-cvs1:/tmp/cvs-serv4902 Modified Files: genpluginprojects.py Log Message: added non-support for CoreGraphics... Index: genpluginprojects.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/scripts/genpluginprojects.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** genpluginprojects.py 2001/12/12 22:42:37 1.25 --- genpluginprojects.py 2001/12/13 13:21:38 1.26 *************** *** 129,132 **** --- 129,137 ---- genpluginproject("ppc", "_Cm", libraries=["QuickTimeLib"], outputdir="::Lib:Carbon") genpluginproject("carbon", "_Cm", outputdir="::Lib:Carbon") + # XXX can't work properly because we need to set a custom fragment initializer + #genpluginproject("carbon", "_CG", + # sources=["_CGModule.c", "CFMLateImport.c"], + # libraries=["CGStubLib"], + # outputdir="::Lib:Carbon") genpluginproject("carbon", "_Ctl", outputdir="::Lib:Carbon") genpluginproject("ppc", "_Ctl", libraries=["CarbonAccessors.o", "ControlsLib", "AppearanceLib"], From jvr@users.sourceforge.net Thu Dec 13 13:22:48 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Thu, 13 Dec 2001 05:22:48 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/scripts fullbuild.py,1.78,1.79 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/scripts In directory usw-pr-cvs1:/tmp/cvs-serv5211 Modified Files: fullbuild.py Log Message: added CoreGraphics to build list Index: fullbuild.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/scripts/fullbuild.py,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** fullbuild.py 2001/12/12 22:42:37 1.78 --- fullbuild.py 2001/12/13 13:22:46 1.79 *************** *** 299,302 **** --- 299,303 ---- (":Mac:Build:_App.carbon.mcp", "_App.carbon"), (":Mac:Build:_CF.carbon.mcp", "_CF.carbon"), + (":Mac:Build:_CG.carbon.mcp", "_CG.carbon"), (":Mac:Build:_CarbonEvt.carbon.mcp", "_CarbonEvt.carbon"), (":Mac:Build:_Cm.carbon.mcp", "_Cm.carbon"), From jvr@users.sourceforge.net Thu Dec 13 13:40:07 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Thu, 13 Dec 2001 05:40:07 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/cg cgsupport.py,1.1,1.2 _CGmodule.c,1.1,1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/cg In directory usw-pr-cvs1:/tmp/cvs-serv10114 Modified Files: cgsupport.py _CGmodule.c Log Message: include the proper header for Mach-O Index: cgsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cg/cgsupport.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cgsupport.py 2001/12/13 13:17:20 1.1 --- cgsupport.py 2001/12/13 13:40:04 1.2 *************** *** 26,30 **** #include #else ! #include #endif --- 26,30 ---- #include #else ! #include #endif Index: _CGmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cg/_CGmodule.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** _CGmodule.c 2001/12/13 13:17:20 1.1 --- _CGmodule.c 2001/12/13 13:40:04 1.2 *************** *** 21,25 **** #include #else ! #include #endif --- 21,25 ---- #include #else ! #include #endif From jvr@users.sourceforge.net Thu Dec 13 13:41:39 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Thu, 13 Dec 2001 05:41:39 -0800 Subject: [Python-checkins] CVS: python/dist/src setup.py,1.71,1.72 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv10643 Modified Files: setup.py Log Message: build CoreGraphics under darwin Index: setup.py =================================================================== RCS file: /cvsroot/python/python/dist/src/setup.py,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** setup.py 2001/12/12 23:03:17 1.71 --- setup.py 2001/12/13 13:41:36 1.72 *************** *** 607,610 **** --- 607,613 ---- exts.append( Extension('_CarbonEvt', ['carbonevt/_CarbonEvtmodule.c'], extra_link_args=['-framework', 'Carbon']) ) + exts.append( Extension('_CG', ['cg/_CGmodule.c'], + extra_link_args=['-framework', 'ApplicationServices', + '-framework', 'Carbon']) ) exts.append( Extension('_Cm', ['cm/_Cmmodule.c'], extra_link_args=['-framework', 'Carbon']) ) From jvr@users.sourceforge.net Thu Dec 13 17:11:23 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Thu, 13 Dec 2001 09:11:23 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Tools/macfreeze macgen_bin.py,1.9,1.10 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Tools/macfreeze In directory usw-pr-cvs1:/tmp/cvs-serv17222 Modified Files: macgen_bin.py Log Message: OSX workaround: don't crash if the extentions folder can't be found. Not sure how to properly solve this. Index: macgen_bin.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Tools/macfreeze/macgen_bin.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** macgen_bin.py 2001/08/25 12:06:41 1.9 --- macgen_bin.py 2001/12/13 17:11:21 1.10 *************** *** 191,196 **** """find the PythonCore shared library, possibly asking the user if we can't find it""" ! vRefNum, dirID = macfs.FindFolder(kOnSystemDisk, kSharedLibrariesFolderType, 0) ! extpath = macfs.FSSpec((vRefNum, dirID, "")).as_pathname() version = string.split(sys.version)[0] if MacOS.runtimemodel == 'carbon': --- 191,200 ---- """find the PythonCore shared library, possibly asking the user if we can't find it""" ! try: ! vRefNum, dirID = macfs.FindFolder(kOnSystemDisk, kSharedLibrariesFolderType, 0) ! except macfs.error: ! extpath = ":" ! else: ! extpath = macfs.FSSpec((vRefNum, dirID, "")).as_pathname() version = string.split(sys.version)[0] if MacOS.runtimemodel == 'carbon': From fdrake@users.sourceforge.net Thu Dec 13 17:20:34 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 13 Dec 2001 09:20:34 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/ext windows.tex,1.2,1.3 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ext In directory usw-pr-cvs1:/tmp/cvs-serv20568/ext Modified Files: windows.tex Log Message: Replace the "Cookbook approach" with the approach documented in PC/example_nt/readme.txt; this one does not rely on any external scripts. This "fixes" SF bug #221671 and most of SF bug #225003. Index: windows.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ext/windows.tex,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** windows.tex 2001/11/28 07:26:15 1.2 --- windows.tex 2001/12/13 17:20:32 1.3 *************** *** 13,37 **** \section{A Cookbook Approach \label{win-cookbook}} ! \sectionauthor{Neil Schemenauer}{neil_schemenauer@transcanada.com} ! This section provides a recipe for building a Python extension on ! Windows. ! Grab the binary installer from \url{http://www.python.org/} and ! install Python. The binary installer has all of the required header ! files except for \file{pyconfig.h}. ! Get the source distribution and extract it into a convenient location. ! Copy the \file{pyconfig.h} from the \file{PC/} directory into the ! \file{include/} directory created by the installer. ! Create a \file{Setup} file for your extension module, as described in ! chapter \ref{building-on-unix}. ! Get David Ascher's \file{compile.py} script from ! \url{http://starship.python.net/crew/da/compile/}. Run the script to ! create Microsoft Visual \Cpp{} project files. ! Open the DSW file in Visual \Cpp{} and select \strong{Build}. If your module creates a new type, you may have trouble with this line: --- 13,188 ---- \section{A Cookbook Approach \label{win-cookbook}} ! There are two approaches to building extension modules on Windows, ! just as there are on \UNIX: use the \refmodule{distutils} package to ! control the build process, or do things manually. The distutils ! approach works well for most extensions; documentation on using ! \refmodule{distutils} to build and package extension modules is ! available in \citetitle[../dist/dist.html]{Distributing Python ! Modules}. This section describes the manual approach to building ! Python extensions written in C or \Cpp. ! To build extensions using these instructions, you need to have a copy ! of the Python sources of the same version as your installed Python. ! You will need Microsoft Visual \Cpp{} ``Developer Studio''; project ! files are supplied for V\Cpp{} version 6, but you can use older ! versions of V\Cpp. The example files described here are distributed ! with the Python sources in the \file{PC\textbackslash ! example_nt\textbackslash} directory. ! \begin{enumerate} ! \item ! \strong{Copy the example files}\\ ! The \file{example_nt} directory is a subdirectory of the \file{PC} ! directory, in order to keep all the PC-specific files under the ! same directory in the source distribution. However, the ! \file{example_nt} directory can't actually be used from this ! location. You first need to copy or move it up one level, so that ! \file{example_nt} is a sibling of the \file{PC} and \file{Include} ! directories. Do all your work from within this new location. ! \item ! \strong{Open the project}\\ ! From V\Cpp, use the \menuselection{File \sub Open Workspace} ! dialog (not \menuselection{File \sub Open}!). Navigate to and ! select the file \file{example.dsw}, in the \emph{copy} of the ! \file{example_nt} directory you made above. Click Open. ! \item ! \strong{Build the example DLL}\\ ! In order to check that everything is set up right, try building: ! \begin{enumerate} ! \item ! Select a configuration. This step is optional. Choose ! \menuselection{Build \sub Select Active Configuration} and ! select either ``example - Win32 Release'' or ``example - Win32 ! Debug.'' If you skip this step, V\Cpp{} will use the Debug ! configuration by default. ! \item ! Build the DLL. Choose \menuselection{Build \sub Build ! example_d.dll} in Debug mode, or \menuselection{Build \sub ! Build example.dll} in Release mode. This creates all ! intermediate and result files in a subdirectory called either ! \file{Debug} or \file{Release}, depending on which ! configuration you selected in the preceding step. ! \end{enumerate} ! ! \item ! \strong{Testing the debug-mode DLL}\\ ! Once the Debug build has succeeded, bring up a DOS box, and change ! to the \file{example_nt\textbackslash Debug} directory. You ! should now be able to repeat the following session (\code{C>} is ! the DOS prompt, \code{>\code{>}>} is the Python prompt; note that ! build information and various debug output from Python may not ! match this screen dump exactly): ! ! \begin{verbatim} ! C>..\..\PCbuild\python_d ! Adding parser accelerators ... ! Done. ! Python 2.2 (#28, Dec 19 2001, 23:26:37) [MSC 32 bit (Intel)] on win32 ! Type "copyright", "credits" or "license" for more information. ! >>> import example ! [4897 refs] ! >>> example.foo() ! Hello, world ! [4903 refs] ! >>> ! \end{verbatim} ! ! Congratulations! You've successfully built your first Python ! extension module. ! ! \item ! \strong{Cretating your own project}\\ ! Choose a name and create a directory for it. Copy your C sources ! into it. Note that the module source file name does not ! necessarily have to match the module name, but the name of the ! initialization function should match the module name --- you can ! only import a module \module{spam} if its initialization function ! is called \cfunction{initspam()}, and it should call ! \cfunction{Py_InitModule()} with the string \code{"spam"} as its ! first argument (use the minimal \file{example.c} in this directory ! as a guide). By convention, it lives in a file called ! \file{spam.c} or \file{spammodule.c}. The output file should be ! called \file{spam.dll} or \file{spam.pyd} (the latter is supported ! to avoid confusion with a system library \file{spam.dll} to which ! your module could be a Python interface) in Release mode, or ! \file{spam_d.dll} or \file{spam_d.pyd} in Debug mode. ! ! Now your options are: ! ! \begin{enumerate} ! \item Copy \file{example.dsw} and \file{example.dsp}, rename ! them to \file{spam.*}, and edit them by hand, or ! \item Create a brand new project; instructions are below. ! \end{enumerate} ! ! In either case, copy \file{example_nt\textbackslash example.def} ! to \file{spam\textbackslash spam.def}, and edit the new ! \file{spam.def} so its second line contains the string ! `\code{initspam}'. If you created a new project yourself, add the ! file \file{spam.def} to the project now. (This is an annoying ! little file with only two lines. An alternative approach is to ! forget about the \file{.def} file, and add the option ! \programopt{/export:initspam} somewhere to the Link settings, by ! manually editing the setting in Project Options dialog). ! ! \item ! \strong{Creating a brand new project}\\ ! Use the \menuselection{File \sub New \sub Projects} dialog to ! create a new Project Workspace. Select ``Win32 Dynamic-Link ! Library,'' enter the name (\samp{spam}), and make sure the ! Location is set to the \file{spam} directory you have created ! (which should be a direct subdirectory of the Python build tree, a ! sibling of \file{Include} and \file{PC}). Select Win32 as the ! platform (in my version, this is the only choice). Make sure the ! Create new workspace radio button is selected. Click OK. ! ! Now open the \menuselection{Project \sub Settings} dialog. You ! only need to change a few settings. Make sure All Configurations ! is selected from the Settings for: dropdown list. Select the ! C/\Cpp{} tab. Choose the Preprocessor category in the popup menu ! at the top. Type the following text in the entry box labeled ! Addditional include directories: ! ! \begin{verbatim} ! ..\Include,..\PC ! \end{verbatim} ! ! Then, choose the Input category in the Link tab, and enter ! ! \begin{verbatim} ! ..\PCbuild ! \end{verbatim} ! ! in the text box labelled ``Additional library path.'' ! ! Now you need to add some mode-specific settings: ! ! Select ``Win32 Release'' in the ``Settings for'' dropdown list. ! Click the Link tab, choose the Input Category, and append ! \code{python22.lib} to the list in the ``Object/library modules'' ! box. ! ! Select ``Win32 Debug'' in the ``Settings for'' dropdown list, and ! append \code{python22_d.lib} to the list in the ``Object/library ! modules'' box. Then click the C/\Cpp{} tab, select ``Code ! Generation'' from the Category dropdown list, and select ``Debug ! Multithreaded DLL'' from the ``Use run-time library'' dropdown ! list. ! ! Select ``Win32 Release'' again from the ``Settings for'' dropdown ! list. Select ``Multithreaded DLL'' from the ``Use run-time ! library:'' dropdown list. ! ! You should now create the file spam.def as instructed in the ! previous section. Then chose the \menuselection{Insert \sub Files ! into Project} dialog. Set the pattern to \code{*.*} and select ! both \file{spam.c} and \file{spam.def} and click OK. (Inserting ! them one by one is fine too.) ! \end{enumerate} ! If your module creates a new type, you may have trouble with this line: From tim_one@users.sourceforge.net Thu Dec 13 19:34:02 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Thu, 13 Dec 2001 11:34:02 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.333,1.334 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv29234/python/Misc Modified Files: NEWS Log Message: Update Windows buildno for 2.2c1. Update 2.2c1 release data in NEWS. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.333 retrieving revision 1.334 diff -C2 -d -r1.333 -r1.334 *** NEWS 2001/12/11 21:43:14 1.333 --- NEWS 2001/12/13 19:34:00 1.334 *************** *** 1,4 **** ! What's New in Python 2.2c1 ! XXX Release date: ??-Dec-2001 XXX =========================== --- 1,4 ---- ! What's New in Python 2.2c1? ! Release date: 14-Dec-2001 =========================== From tim_one@users.sourceforge.net Thu Dec 13 19:34:03 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Thu, 13 Dec 2001 11:34:03 -0800 Subject: [Python-checkins] CVS: python/dist/src/PCbuild BUILDno.txt,1.24,1.25 pythoncore.dsp,1.28,1.29 Message-ID: Update of /cvsroot/python/python/dist/src/PCbuild In directory usw-pr-cvs1:/tmp/cvs-serv29234/python/PCbuild Modified Files: BUILDno.txt pythoncore.dsp Log Message: Update Windows buildno for 2.2c1. Update 2.2c1 release data in NEWS. Index: BUILDno.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/BUILDno.txt,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** BUILDno.txt 2001/11/15 19:50:51 1.24 --- BUILDno.txt 2001/12/13 19:34:00 1.25 *************** *** 34,37 **** --- 34,39 ---- Windows Python BUILD numbers ---------------------------- + 27 2.2c1 + 14-Dec-2001 26 2.2b2 16-Nov-2001 Index: pythoncore.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/pythoncore.dsp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** pythoncore.dsp 2001/11/15 19:50:51 1.28 --- pythoncore.dsp 2001/12/13 19:34:00 1.29 *************** *** 740,748 **** !IF "$(CFG)" == "pythoncore - Win32 Release" ! # ADD CPP /D BUILD=26 !ELSEIF "$(CFG)" == "pythoncore - Win32 Debug" ! # ADD CPP /D BUILD=26 !ELSEIF "$(CFG)" == "pythoncore - Win32 Alpha Debug" --- 740,748 ---- !IF "$(CFG)" == "pythoncore - Win32 Release" ! # ADD CPP /D BUILD=27 !ELSEIF "$(CFG)" == "pythoncore - Win32 Debug" ! # ADD CPP /D BUILD=27 !ELSEIF "$(CFG)" == "pythoncore - Win32 Alpha Debug" From jhylton@users.sourceforge.net Thu Dec 13 19:45:06 2001 From: jhylton@users.sourceforge.net (Jeremy Hylton) Date: Thu, 13 Dec 2001 11:45:06 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_scope.py,1.21,1.22 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv32164 Modified Files: test_scope.py Log Message: Add test for SF bug [ #492403 ] exec() segfaults on closure's func_code Index: test_scope.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_scope.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** test_scope.py 2001/10/18 16:23:11 1.21 --- test_scope.py 2001/12/13 19:45:04 1.22 *************** *** 462,466 **** if kind == 1: # AV happens when stepping from this line to next if des == "": ! des = "_%s__%s" % (klass.__name__, name) return lambda obj: getattr(obj, des) --- 462,467 ---- if kind == 1: # AV happens when stepping from this line to next if des == "": ! ## des = "_%s__%s" % (klass.__name__, name) ! des = "1" return lambda obj: getattr(obj, des) *************** *** 472,476 **** sys.settrace(None) ! print "20. eval with free variables" def f(x): --- 473,477 ---- sys.settrace(None) ! print "20. eval and exec with free variables" def f(x): *************** *** 484,487 **** --- 485,495 ---- else: print "eval() should have failed, because code contained free vars" + + try: + exec g.func_code + except TypeError: + pass + else: + print "exec should have failed, because code contained free vars" warnings.resetwarnings() From jhylton@users.sourceforge.net Thu Dec 13 19:47:05 2001 From: jhylton@users.sourceforge.net (Jeremy Hylton) Date: Thu, 13 Dec 2001 11:47:05 -0800 Subject: [Python-checkins] CVS: python/dist/src/Include compile.h,2.35,2.36 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory usw-pr-cvs1:/tmp/cvs-serv32651/Include Modified Files: compile.h Log Message: Add helper macro to get the number of free variables for a PyCodeObject. Index: compile.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/compile.h,v retrieving revision 2.35 retrieving revision 2.36 diff -C2 -d -r2.35 -r2.36 *** compile.h 2001/08/10 21:38:04 2.35 --- compile.h 2001/12/13 19:47:02 2.36 *************** *** 47,50 **** --- 47,51 ---- #define PyCode_Check(op) ((op)->ob_type == &PyCode_Type) + #define PyCode_GetNumFree(op) (PyTuple_GET_SIZE((op)->co_freevars)) #define CO_MAXBLOCKS 20 /* Max static block nesting within a function */ From jhylton@users.sourceforge.net Thu Dec 13 19:47:54 2001 From: jhylton@users.sourceforge.net (Jeremy Hylton) Date: Thu, 13 Dec 2001 11:47:54 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test/output test_scope,1.10,1.11 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test/output In directory usw-pr-cvs1:/tmp/cvs-serv316/Lib/test/output Modified Files: test_scope Log Message: Update output generated by test_scope Index: test_scope =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/output/test_scope,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** test_scope 2001/10/18 16:23:11 1.10 --- test_scope 2001/12/13 19:47:51 1.11 *************** *** 20,23 **** 19. var is bound and free in class 20. interaction with trace function ! 20. eval with free variables 21. list comprehension with local variables --- 20,23 ---- 19. var is bound and free in class 20. interaction with trace function ! 20. eval and exec with free variables 21. list comprehension with local variables From jhylton@users.sourceforge.net Thu Dec 13 19:51:58 2001 From: jhylton@users.sourceforge.net (Jeremy Hylton) Date: Thu, 13 Dec 2001 11:51:58 -0800 Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.245,2.246 ceval.c,2.296,2.297 compile.c,2.233,2.234 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory usw-pr-cvs1:/tmp/cvs-serv1354/Python Modified Files: bltinmodule.c ceval.c compile.c Log Message: Fix for SF bug [ #492403 ] exec() segfaults on closure's func_code Based on the patch from Danny Yoo. The fix is in exec_statement() in ceval.c. There are also changes to introduce use of PyCode_GetNumFree() in several places. Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.245 retrieving revision 2.246 diff -C2 -d -r2.245 -r2.246 *** bltinmodule.c 2001/11/28 20:36:42 2.245 --- bltinmodule.c 2001/12/13 19:51:51 2.246 *************** *** 498,502 **** if (PyCode_Check(cmd)) { ! if (PyTuple_GET_SIZE(((PyCodeObject *)cmd)->co_freevars) > 0) { PyErr_SetString(PyExc_TypeError, "code object passed to eval() may not contain free variables"); --- 498,502 ---- if (PyCode_Check(cmd)) { ! if (PyCode_GetNumFree((PyCodeObject *)cmd) > 0) { PyErr_SetString(PyExc_TypeError, "code object passed to eval() may not contain free variables"); Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.296 retrieving revision 2.297 diff -C2 -d -r2.296 -r2.297 *** ceval.c 2001/12/06 21:28:18 2.296 --- ceval.c 2001/12/13 19:51:53 2.297 *************** *** 2095,2099 **** v = POP(); /* code object */ x = PyFunction_New(v, f->f_globals); ! nfree = PyTuple_GET_SIZE(((PyCodeObject *)v)->co_freevars); Py_DECREF(v); /* XXX Maybe this should be a separate opcode? */ --- 2095,2099 ---- v = POP(); /* code object */ x = PyFunction_New(v, f->f_globals); ! nfree = PyCode_GetNumFree((PyCodeObject *)v); Py_DECREF(v); /* XXX Maybe this should be a separate opcode? */ *************** *** 3632,3635 **** --- 3632,3640 ---- PyDict_SetItemString(globals, "__builtins__", f->f_builtins); if (PyCode_Check(prog)) { + if (PyCode_GetNumFree((PyCodeObject *)prog) > 0) { + PyErr_SetString(PyExc_TypeError, + "code object passed to exec may not contain free variables"); + return -1; + } v = PyEval_EvalCode((PyCodeObject *) prog, globals, locals); } Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.233 retrieving revision 2.234 diff -C2 -d -r2.233 -r2.234 *** compile.c 2001/12/04 02:41:46 2.233 --- compile.c 2001/12/13 19:51:56 2.234 *************** *** 2274,2278 **** com_make_closure(struct compiling *c, PyCodeObject *co) { ! int i, free = PyTuple_GET_SIZE(co->co_freevars); if (free == 0) return 0; --- 2274,2278 ---- com_make_closure(struct compiling *c, PyCodeObject *co) { ! int i, free = PyCode_GetNumFree(co); if (free == 0) return 0; *************** *** 2334,2338 **** if (closure) { com_addoparg(c, MAKE_CLOSURE, ndefs); ! com_pop(c, PyTuple_GET_SIZE(co->co_freevars)); } else com_addoparg(c, MAKE_FUNCTION, ndefs); --- 2334,2338 ---- if (closure) { com_addoparg(c, MAKE_CLOSURE, ndefs); ! com_pop(c, PyCode_GetNumFree(co)); } else com_addoparg(c, MAKE_FUNCTION, ndefs); *************** *** 3591,3595 **** if (closure) { com_addoparg(c, MAKE_CLOSURE, 0); ! com_pop(c, PyTuple_GET_SIZE(co->co_freevars)); } else com_addoparg(c, MAKE_FUNCTION, 0); --- 3591,3595 ---- if (closure) { com_addoparg(c, MAKE_CLOSURE, 0); ! com_pop(c, PyCode_GetNumFree(co)); } else com_addoparg(c, MAKE_FUNCTION, 0); From fdrake@users.sourceforge.net Thu Dec 13 19:52:06 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 13 Dec 2001 11:52:06 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_b1.py,1.41,1.42 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv1454/Lib/test Modified Files: test_b1.py Log Message: Ensure that complex() only accepts a string argument as the first arg, and only if there is no second arg. This closes SF patch #479551. Index: test_b1.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_b1.py,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** test_b1.py 2001/12/11 04:37:34 1.41 --- test_b1.py 2001/12/13 19:52:03 1.42 *************** *** 123,126 **** --- 123,134 ---- if complex(0j, 3.14) != 3.14j: raise TestFailed, 'complex(0j, 3.14)' if complex(0.0, 3.14) != 3.14j: raise TestFailed, 'complex(0.0, 3.14)' + if complex("1") != 1+0j: raise TestFailed, 'complex("1")' + if complex("1j") != 1j: raise TestFailed, 'complex("1j")' + try: complex("1", "1") + except TypeError: pass + else: raise TestFailed, 'complex("1", "1")' + try: complex(1, "1") + except TypeError: pass + else: raise TestFailed, 'complex(1, "1")' if complex(" 3.14+J ") != 3.14+1j: raise TestFailed, 'complex(" 3.14+J )"' if have_unicode: From fdrake@users.sourceforge.net Thu Dec 13 19:52:05 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 13 Dec 2001 11:52:05 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libfuncs.tex,1.98,1.99 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv1454/Doc/lib Modified Files: libfuncs.tex Log Message: Ensure that complex() only accepts a string argument as the first arg, and only if there is no second arg. This closes SF patch #479551. Index: libfuncs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** libfuncs.tex 2001/12/03 18:35:05 1.98 --- libfuncs.tex 2001/12/13 19:52:03 1.99 *************** *** 160,169 **** \begin{funcdesc}{complex}{real\optional{, imag}} Create a complex number with the value \var{real} + \var{imag}*j or ! convert a string or number to a complex number. Each argument may be any numeric type (including complex). If \var{imag} is omitted, it defaults to zero and the function serves as a numeric conversion function like \function{int()}, ! \function{long()} and \function{float()}; in this case it also ! accepts a string argument which should be a valid complex number. \end{funcdesc} --- 160,171 ---- \begin{funcdesc}{complex}{real\optional{, imag}} Create a complex number with the value \var{real} + \var{imag}*j or ! convert a string or number to a complex number. If the first ! parameter is a string, it will be interpreted as a complex number ! and the function must be called without a second parameter. The ! second parameter can never be a string. Each argument may be any numeric type (including complex). If \var{imag} is omitted, it defaults to zero and the function serves as a numeric conversion function like \function{int()}, ! \function{long()} and \function{float()}. \end{funcdesc} From fdrake@users.sourceforge.net Thu Dec 13 19:52:24 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 13 Dec 2001 11:52:24 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects complexobject.c,2.52,2.53 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv1560/Objects Modified Files: complexobject.c Log Message: Ensure that complex() only accepts a string argument as the first arg, and only if there is no second arg. This closes SF patch #479551. Index: complexobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v retrieving revision 2.52 retrieving revision 2.53 diff -C2 -d -r2.52 -r2.53 *** complexobject.c 2001/11/28 20:50:56 2.52 --- complexobject.c 2001/12/13 19:52:22 2.53 *************** *** 807,812 **** &r, &i)) return NULL; ! if (PyString_Check(r) || PyUnicode_Check(r)) return complex_subtype_from_string(type, r); nbr = r->ob_type->tp_as_number; --- 807,824 ---- &r, &i)) return NULL; ! if (PyString_Check(r) || PyUnicode_Check(r)) { ! if (i != NULL) { ! PyErr_SetString(PyExc_TypeError, ! "complex() can't take second arg" ! " if first is a string"); ! return NULL; ! } return complex_subtype_from_string(type, r); + } + if (i != NULL && (PyString_Check(i) || PyUnicode_Check(i))) { + PyErr_SetString(PyExc_TypeError, + "complex() second arg can't be a string"); + return NULL; + } nbr = r->ob_type->tp_as_number; From jhylton@users.sourceforge.net Thu Dec 13 19:53:28 2001 From: jhylton@users.sourceforge.net (Jeremy Hylton) Date: Thu, 13 Dec 2001 11:53:28 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc ACKS,1.144,1.145 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv1911 Modified Files: ACKS Log Message: For the exec-free var bug. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.144 retrieving revision 1.145 diff -C2 -d -r1.144 -r1.145 *** ACKS 2001/12/10 15:46:20 1.144 --- ACKS 2001/12/13 19:53:26 1.145 *************** *** 478,481 **** --- 478,482 ---- Bob Yodlowski Masazumi Yoshikawa + Danny Yoo Moshe Zadka Milan Zamazal From fdrake@users.sourceforge.net Thu Dec 13 19:57:55 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 13 Dec 2001 11:57:55 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_complex.py,1.4,1.5 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv3044/Lib/test Modified Files: test_complex.py Log Message: Add a comment explaining what these tests are for, and where to look for tests of complex(). Index: test_complex.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_complex.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** test_complex.py 2001/09/06 23:00:21 1.4 --- test_complex.py 2001/12/13 19:57:53 1.5 *************** *** 2,5 **** --- 2,8 ---- from random import random + # These tests ensure that complex math does the right thing; tests of + # the complex() function/constructor are in test_b1.py. + # XXX need many, many more tests here. From bwarsaw@users.sourceforge.net Thu Dec 13 20:00:08 2001 From: bwarsaw@users.sourceforge.net (Barry Warsaw) Date: Thu, 13 Dec 2001 12:00:08 -0800 Subject: [Python-checkins] CVS: python/dist/src/Include patchlevel.h,2.59,2.59.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory usw-pr-cvs1:/tmp/cvs-serv3720 Modified Files: Tag: r22rc1-branch patchlevel.h Log Message: Bump the version to 2.2rc1 Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.59 retrieving revision 2.59.2.1 diff -C2 -d -r2.59 -r2.59.2.1 *** patchlevel.h 2001/11/16 21:12:25 2.59 --- patchlevel.h 2001/12/13 20:00:06 2.59.2.1 *************** *** 23,31 **** #define PY_MINOR_VERSION 2 #define PY_MICRO_VERSION 0 ! #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_BETA ! #define PY_RELEASE_SERIAL 2 /* Version as a string */ ! #define PY_VERSION "2.2b2+" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. --- 23,31 ---- #define PY_MINOR_VERSION 2 #define PY_MICRO_VERSION 0 ! #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA ! #define PY_RELEASE_SERIAL 1 /* Version as a string */ ! #define PY_VERSION "2.2rc1" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. From jhylton@users.sourceforge.net Thu Dec 13 20:00:28 2001 From: jhylton@users.sourceforge.net (Jeremy Hylton) Date: Thu, 13 Dec 2001 12:00:28 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_scope.py,1.22,1.23 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv3849 Modified Files: test_scope.py Log Message: Undo inadvertent change to test_scope in previous checkin Index: test_scope.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_scope.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** test_scope.py 2001/12/13 19:45:04 1.22 --- test_scope.py 2001/12/13 20:00:26 1.23 *************** *** 462,467 **** if kind == 1: # AV happens when stepping from this line to next if des == "": ! ## des = "_%s__%s" % (klass.__name__, name) ! des = "1" return lambda obj: getattr(obj, des) --- 462,466 ---- if kind == 1: # AV happens when stepping from this line to next if des == "": ! des = "_%s__%s" % (klass.__name__, name) return lambda obj: getattr(obj, des) From fdrake@users.sourceforge.net Thu Dec 13 20:09:15 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 13 Dec 2001 12:09:15 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile,1.234,1.234.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc In directory usw-pr-cvs1:/tmp/cvs-serv6032 Modified Files: Tag: r22rc1-branch Makefile Log Message: Set the release number on the branch. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.234 retrieving revision 1.234.2.1 diff -C2 -d -r1.234 -r1.234.2.1 *** Makefile 2001/12/12 06:22:43 1.234 --- Makefile 2001/12/13 20:09:12 1.234.2.1 *************** *** 67,71 **** # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.2b2+ PYTHON= python --- 67,71 ---- # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.2c1 PYTHON= python From fdrake@users.sourceforge.net Thu Dec 13 20:09:15 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 13 Dec 2001 12:09:15 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs boilerplate.tex,1.69,1.69.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory usw-pr-cvs1:/tmp/cvs-serv6032/texinputs Modified Files: Tag: r22rc1-branch boilerplate.tex Log Message: Set the release number on the branch. Index: boilerplate.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/boilerplate.tex,v retrieving revision 1.69 retrieving revision 1.69.2.1 diff -C2 -d -r1.69 -r1.69.2.1 *** boilerplate.tex 2001/11/16 17:34:38 1.69 --- boilerplate.tex 2001/12/13 20:09:13 1.69.2.1 *************** *** 6,11 **** } ! \date{\today} % XXX update before release! \release{2.2} % software release, not documentation ! \setreleaseinfo{b2+} % empty for final release \setshortversion{2.2} % major.minor only for software --- 6,11 ---- } ! \date{December 14, 2001} % XXX update before release! \release{2.2} % software release, not documentation ! \setreleaseinfo{c1} % empty for final release \setshortversion{2.2} % major.minor only for software From tim@zope.com Thu Dec 13 20:17:48 2001 From: tim@zope.com (Tim Peters) Date: Thu, 13 Dec 2001 15:17:48 -0500 Subject: [Python-checkins] CVS: python/dist/src/Include patchlevel.h,2.59,2.59.2.1 In-Reply-To: Message-ID: > Update of /cvsroot/python/python/dist/src/Include > In directory usw-pr-cvs1:/tmp/cvs-serv3720 > > Modified Files: > Tag: r22rc1-branch > patchlevel.h > Log Message: > Bump the version to 2.2rc1 > ... > ! #define PY_VERSION "2.2rc1" Barry, all your FC coworkers agree this should be #define PY_VERSION "2.2c1" instead. Poke Guido and get a Pronouncement. From fdrake@users.sourceforge.net Thu Dec 13 20:51:26 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 13 Dec 2001 12:51:26 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_b1.py,1.41,1.41.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv18197/Lib/test Modified Files: Tag: r22rc1-branch test_b1.py Log Message: Integrate (the rest of) the complex() patches into the release candidate; the documentation patch was included in the original tagging. Index: test_b1.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_b1.py,v retrieving revision 1.41 retrieving revision 1.41.2.1 diff -C2 -d -r1.41 -r1.41.2.1 *** test_b1.py 2001/12/11 04:37:34 1.41 --- test_b1.py 2001/12/13 20:51:24 1.41.2.1 *************** *** 123,126 **** --- 123,134 ---- if complex(0j, 3.14) != 3.14j: raise TestFailed, 'complex(0j, 3.14)' if complex(0.0, 3.14) != 3.14j: raise TestFailed, 'complex(0.0, 3.14)' + if complex("1") != 1+0j: raise TestFailed, 'complex("1")' + if complex("1j") != 1j: raise TestFailed, 'complex("1j")' + try: complex("1", "1") + except TypeError: pass + else: raise TestFailed, 'complex("1", "1")' + try: complex(1, "1") + except TypeError: pass + else: raise TestFailed, 'complex(1, "1")' if complex(" 3.14+J ") != 3.14+1j: raise TestFailed, 'complex(" 3.14+J )"' if have_unicode: From fdrake@users.sourceforge.net Thu Dec 13 20:51:26 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 13 Dec 2001 12:51:26 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects complexobject.c,2.52,2.52.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv18197/Objects Modified Files: Tag: r22rc1-branch complexobject.c Log Message: Integrate (the rest of) the complex() patches into the release candidate; the documentation patch was included in the original tagging. Index: complexobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v retrieving revision 2.52 retrieving revision 2.52.2.1 diff -C2 -d -r2.52 -r2.52.2.1 *** complexobject.c 2001/11/28 20:50:56 2.52 --- complexobject.c 2001/12/13 20:51:24 2.52.2.1 *************** *** 807,812 **** &r, &i)) return NULL; ! if (PyString_Check(r) || PyUnicode_Check(r)) return complex_subtype_from_string(type, r); nbr = r->ob_type->tp_as_number; --- 807,824 ---- &r, &i)) return NULL; ! if (PyString_Check(r) || PyUnicode_Check(r)) { ! if (i != NULL) { ! PyErr_SetString(PyExc_TypeError, ! "complex() can't take second arg" ! " if first is a string"); ! return NULL; ! } return complex_subtype_from_string(type, r); + } + if (i != NULL && (PyString_Check(i) || PyUnicode_Check(i))) { + PyErr_SetString(PyExc_TypeError, + "complex() second arg can't be a string"); + return NULL; + } nbr = r->ob_type->tp_as_number; From fdrake@users.sourceforge.net Thu Dec 13 20:55:40 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 13 Dec 2001 12:55:40 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libfuncs.tex,1.98,1.98.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv19513/lib Modified Files: Tag: r22rc1-branch libfuncs.tex Log Message: Oops; no, the docs had not been included either. Let's add them. Index: libfuncs.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v retrieving revision 1.98 retrieving revision 1.98.2.1 diff -C2 -d -r1.98 -r1.98.2.1 *** libfuncs.tex 2001/12/03 18:35:05 1.98 --- libfuncs.tex 2001/12/13 20:55:38 1.98.2.1 *************** *** 160,169 **** \begin{funcdesc}{complex}{real\optional{, imag}} Create a complex number with the value \var{real} + \var{imag}*j or ! convert a string or number to a complex number. Each argument may be any numeric type (including complex). If \var{imag} is omitted, it defaults to zero and the function serves as a numeric conversion function like \function{int()}, ! \function{long()} and \function{float()}; in this case it also ! accepts a string argument which should be a valid complex number. \end{funcdesc} --- 160,171 ---- \begin{funcdesc}{complex}{real\optional{, imag}} Create a complex number with the value \var{real} + \var{imag}*j or ! convert a string or number to a complex number. If the first ! parameter is a string, it will be interpreted as a complex number ! and the function must be called without a second parameter. The ! second parameter can never be a string. Each argument may be any numeric type (including complex). If \var{imag} is omitted, it defaults to zero and the function serves as a numeric conversion function like \function{int()}, ! \function{long()} and \function{float()}. \end{funcdesc} From jvr@users.sourceforge.net Thu Dec 13 21:24:40 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Thu, 13 Dec 2001 13:24:40 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/ctl ctledit.py,1.6,1.7 ctlscan.py,1.21,1.22 _Ctlmodule.c,1.7,1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/ctl In directory usw-pr-cvs1:/tmp/cvs-serv30822 Modified Files: ctledit.py ctlscan.py _Ctlmodule.c Log Message: - "manage" controls created by CreateXxxXxxControl() functions. - FindControlUnderMouse() returns an existing control, not a new one. Index: ctledit.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctledit.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ctledit.py 2000/03/21 16:25:23 1.6 --- ctledit.py 2001/12/13 21:24:37 1.7 *************** *** 1,2 **** --- 1,11 ---- + # FindControlUnderMouse() returns an existing control, not a new one, + # so create this one by hand. + f = Function(ExistingControlHandle, 'FindControlUnderMouse', + (Point, 'inWhere', InMode), + (WindowRef, 'inWindow', InMode), + (SInt16, 'outPart', OutMode), + ) + functions.append(f) + f = Function(ControlHandle, 'as_Control', (Handle, 'h', InMode)) *************** *** 26,27 **** --- 35,45 ---- methods.append(f) + + # All CreateXxxXxxControl() functions return a new object in an output + # parameter; these should however be managed by us (we're creating them + # after all), so set the type to ControlRef. + for f in functions: + if f.name.startswith("Create"): + v = f.argumentList[-1] + if v.type == ExistingControlHandle: + v.type = ControlRef Index: ctlscan.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctlscan.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** ctlscan.py 2001/12/12 22:38:27 1.21 --- ctlscan.py 2001/12/13 21:24:37 1.22 *************** *** 46,49 **** --- 46,50 ---- def makeblacklistnames(self): return [ + 'FindControlUnderMouse', # Generated manually, returns an existing control, not a new one. 'DisposeControl', # Generated manually 'KillControls', # Implied by close of dialog Index: _Ctlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/_Ctlmodule.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** _Ctlmodule.c 2001/12/12 22:51:37 1.7 --- _Ctlmodule.c 2001/12/13 21:24:37 1.8 *************** *** 4036,4062 **** } - static PyObject *Ctl_FindControlUnderMouse(PyObject *_self, PyObject *_args) - { - PyObject *_res = NULL; - ControlHandle _rv; - Point inWhere; - WindowPtr inWindow; - SInt16 outPart; - #ifndef FindControlUnderMouse - PyMac_PRECHECK(FindControlUnderMouse); - #endif - if (!PyArg_ParseTuple(_args, "O&O&", - PyMac_GetPoint, &inWhere, - WinObj_Convert, &inWindow)) - return NULL; - _rv = FindControlUnderMouse(inWhere, - inWindow, - &outPart); - _res = Py_BuildValue("O&h", - CtlObj_New, _rv, - outPart); - return _res; - } - static PyObject *Ctl_IdleControls(PyObject *_self, PyObject *_args) { --- 4036,4039 ---- *************** *** 4138,4142 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4115,4119 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4341,4345 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4318,4322 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4376,4380 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4353,4357 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4411,4415 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4388,4392 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4434,4438 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4411,4415 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4457,4461 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4434,4438 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4486,4490 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4463,4467 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4521,4525 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4498,4502 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4565,4569 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4542,4546 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4594,4598 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4571,4575 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4617,4621 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4594,4598 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4646,4650 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4623,4627 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4672,4676 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4649,4653 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4707,4711 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4684,4688 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4736,4740 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4713,4717 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4762,4766 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4739,4743 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4788,4792 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4765,4769 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4820,4824 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4797,4801 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4852,4856 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4829,4833 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4893,4897 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4870,4874 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4916,4920 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4893,4897 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4954,4958 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4931,4935 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); return _res; } *************** *** 4980,4984 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_WhichControl, outControl); return _res; } --- 4957,4984 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! CtlObj_New, outControl); ! return _res; ! } ! ! static PyObject *Ctl_FindControlUnderMouse(PyObject *_self, PyObject *_args) ! { ! PyObject *_res = NULL; ! ControlHandle _rv; ! Point inWhere; ! WindowPtr inWindow; ! SInt16 outPart; ! #ifndef FindControlUnderMouse ! PyMac_PRECHECK(FindControlUnderMouse); ! #endif ! if (!PyArg_ParseTuple(_args, "O&O&", ! PyMac_GetPoint, &inWhere, ! WinObj_Convert, &inWindow)) ! return NULL; ! _rv = FindControlUnderMouse(inWhere, ! inWindow, ! &outPart); ! _res = Py_BuildValue("O&h", ! CtlObj_WhichControl, _rv, ! outPart); return _res; } *************** *** 5012,5017 **** {"FindControl", (PyCFunction)Ctl_FindControl, 1, "(Point testPoint, WindowPtr theWindow) -> (ControlPartCode _rv, ControlHandle theControl)"}, - {"FindControlUnderMouse", (PyCFunction)Ctl_FindControlUnderMouse, 1, - "(Point inWhere, WindowPtr inWindow) -> (ControlHandle _rv, SInt16 outPart)"}, {"IdleControls", (PyCFunction)Ctl_IdleControls, 1, "(WindowPtr inWindow) -> None"}, --- 5012,5015 ---- *************** *** 5091,5094 **** --- 5089,5094 ---- {"CreateDataBrowserControl", (PyCFunction)Ctl_CreateDataBrowserControl, 1, "(WindowPtr window, Rect boundsRect, OSType style) -> (ControlHandle outControl)"}, + {"FindControlUnderMouse", (PyCFunction)Ctl_FindControlUnderMouse, 1, + "(Point inWhere, WindowPtr inWindow) -> (ControlHandle _rv, SInt16 outPart)"}, {"as_Control", (PyCFunction)Ctl_as_Control, 1, "(Handle h) -> (ControlHandle _rv)"}, From tim_one@users.sourceforge.net Thu Dec 13 21:28:18 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Thu, 13 Dec 2001 13:28:18 -0800 Subject: [Python-checkins] CVS: python/dist/src/Include patchlevel.h,2.59.2.1,2.59.2.2 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory usw-pr-cvs1:/tmp/cvs-serv32049/Include Modified Files: Tag: r22rc1-branch patchlevel.h Log Message: Changed PY_VERSION from "2.2rc1" to "2.2c1". Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.59.2.1 retrieving revision 2.59.2.2 diff -C2 -d -r2.59.2.1 -r2.59.2.2 *** patchlevel.h 2001/12/13 20:00:06 2.59.2.1 --- patchlevel.h 2001/12/13 21:28:15 2.59.2.2 *************** *** 27,31 **** /* Version as a string */ ! #define PY_VERSION "2.2rc1" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. --- 27,31 ---- /* Version as a string */ ! #define PY_VERSION "2.2c1" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. From jhylton@users.sourceforge.net Thu Dec 13 22:09:08 2001 From: jhylton@users.sourceforge.net (Jeremy Hylton) Date: Thu, 13 Dec 2001 14:09:08 -0800 Subject: [Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.245,2.245.2.1 ceval.c,2.296,2.296.2.1 compile.c,2.233,2.233.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory usw-pr-cvs1:/tmp/cvs-serv12539/Python Modified Files: Tag: r22rc1-branch bltinmodule.c ceval.c compile.c Log Message: Merge in rest of bug fix from trunk. Barry's stealth tagging missed these Index: bltinmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/bltinmodule.c,v retrieving revision 2.245 retrieving revision 2.245.2.1 diff -C2 -d -r2.245 -r2.245.2.1 *** bltinmodule.c 2001/11/28 20:36:42 2.245 --- bltinmodule.c 2001/12/13 22:09:05 2.245.2.1 *************** *** 498,502 **** if (PyCode_Check(cmd)) { ! if (PyTuple_GET_SIZE(((PyCodeObject *)cmd)->co_freevars) > 0) { PyErr_SetString(PyExc_TypeError, "code object passed to eval() may not contain free variables"); --- 498,502 ---- if (PyCode_Check(cmd)) { ! if (PyCode_GetNumFree((PyCodeObject *)cmd) > 0) { PyErr_SetString(PyExc_TypeError, "code object passed to eval() may not contain free variables"); Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.296 retrieving revision 2.296.2.1 diff -C2 -d -r2.296 -r2.296.2.1 *** ceval.c 2001/12/06 21:28:18 2.296 --- ceval.c 2001/12/13 22:09:05 2.296.2.1 *************** *** 2095,2099 **** v = POP(); /* code object */ x = PyFunction_New(v, f->f_globals); ! nfree = PyTuple_GET_SIZE(((PyCodeObject *)v)->co_freevars); Py_DECREF(v); /* XXX Maybe this should be a separate opcode? */ --- 2095,2099 ---- v = POP(); /* code object */ x = PyFunction_New(v, f->f_globals); ! nfree = PyCode_GetNumFree((PyCodeObject *)v); Py_DECREF(v); /* XXX Maybe this should be a separate opcode? */ *************** *** 3632,3635 **** --- 3632,3640 ---- PyDict_SetItemString(globals, "__builtins__", f->f_builtins); if (PyCode_Check(prog)) { + if (PyCode_GetNumFree((PyCodeObject *)prog) > 0) { + PyErr_SetString(PyExc_TypeError, + "code object passed to exec may not contain free variables"); + return -1; + } v = PyEval_EvalCode((PyCodeObject *) prog, globals, locals); } Index: compile.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v retrieving revision 2.233 retrieving revision 2.233.2.1 diff -C2 -d -r2.233 -r2.233.2.1 *** compile.c 2001/12/04 02:41:46 2.233 --- compile.c 2001/12/13 22:09:06 2.233.2.1 *************** *** 2274,2278 **** com_make_closure(struct compiling *c, PyCodeObject *co) { ! int i, free = PyTuple_GET_SIZE(co->co_freevars); if (free == 0) return 0; --- 2274,2278 ---- com_make_closure(struct compiling *c, PyCodeObject *co) { ! int i, free = PyCode_GetNumFree(co); if (free == 0) return 0; *************** *** 2334,2338 **** if (closure) { com_addoparg(c, MAKE_CLOSURE, ndefs); ! com_pop(c, PyTuple_GET_SIZE(co->co_freevars)); } else com_addoparg(c, MAKE_FUNCTION, ndefs); --- 2334,2338 ---- if (closure) { com_addoparg(c, MAKE_CLOSURE, ndefs); ! com_pop(c, PyCode_GetNumFree(co)); } else com_addoparg(c, MAKE_FUNCTION, ndefs); *************** *** 3591,3595 **** if (closure) { com_addoparg(c, MAKE_CLOSURE, 0); ! com_pop(c, PyTuple_GET_SIZE(co->co_freevars)); } else com_addoparg(c, MAKE_FUNCTION, 0); --- 3591,3595 ---- if (closure) { com_addoparg(c, MAKE_CLOSURE, 0); ! com_pop(c, PyCode_GetNumFree(co)); } else com_addoparg(c, MAKE_FUNCTION, 0); From guido@python.org Thu Dec 13 22:39:05 2001 From: guido@python.org (Guido van Rossum) Date: Thu, 13 Dec 2001 17:39:05 -0500 Subject: [Python-checkins] CVS: python/dist/src/Include patchlevel.h,2.59,2.59.2.1 In-Reply-To: Your message of "Thu, 13 Dec 2001 15:17:48 EST." References: Message-ID: <200112132239.RAA07459@cj20424-a.reston1.va.home.com> > > Modified Files: > > Tag: r22rc1-branch > > patchlevel.h > > Log Message: > > Bump the version to 2.2rc1 > > ... > > ! #define PY_VERSION "2.2rc1" > > Barry, all your FC coworkers agree this should be > > #define PY_VERSION "2.2c1" > > instead. Poke Guido and get a Pronouncement. Tim's right. It should be "2.2c1". --Guido van Rossum (home page: http://www.python.org/~guido/) From tim@zope.com Thu Dec 13 22:47:29 2001 From: tim@zope.com (Tim Peters) Date: Thu, 13 Dec 2001 17:47:29 -0500 Subject: [Python-checkins] CVS: python/dist/src/Include patchlevel.h,2.59,2.59.2.1 In-Reply-To: <200112132239.RAA07459@cj20424-a.reston1.va.home.com> Message-ID: > Tim's right. It should be "2.2c1". Thanks -- note that I already made this change on the branch. Turned out Barry applied the tag at the same time Fred and Jeremy were both checking in multifile bugfixes, only part of which got tagged, so we did quite a bit of branch checkins from FC. The end result looks correct, so that's just FYI. From bwarsaw@users.sourceforge.net Fri Dec 14 03:45:49 2001 From: bwarsaw@users.sourceforge.net (Barry Warsaw) Date: Thu, 13 Dec 2001 19:45:49 -0800 Subject: [Python-checkins] CVS: python/nondist/peps pep-0101.txt,1.16,1.17 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv23046 Modified Files: pep-0101.txt Log Message: Use "c" for release candidate. Index: pep-0101.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0101.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** pep-0101.txt 2001/12/10 03:15:13 1.16 --- pep-0101.txt 2001/12/14 03:45:47 1.17 *************** *** 39,43 **** We use the following conventions in the examples below. Where a release number is given, it is of the form X.YaZ, e.g. 2.1a3 for ! Python 2.1 alpha 3, where "a" == alpha, "b" == beta, "rc" == release candidate, and "f" == final. If a micro release number is used, then we'll say X.Y.MaZ. --- 39,43 ---- We use the following conventions in the examples below. Where a release number is given, it is of the form X.YaZ, e.g. 2.1a3 for ! Python 2.1 alpha 3, where "a" == alpha, "b" == beta, "c" == release candidate, and "f" == final. If a micro release number is used, then we'll say X.Y.MaZ. From barry@zope.com Fri Dec 14 03:46:09 2001 From: barry@zope.com (Barry A. Warsaw) Date: Thu, 13 Dec 2001 22:46:09 -0500 Subject: [Python-checkins] CVS: python/dist/src/Include patchlevel.h,2.59,2.59.2.1 References: <200112132239.RAA07459@cj20424-a.reston1.va.home.com> Message-ID: <15385.30209.261563.632580@anthem.wooz.org> >>>>> "GvR" == Guido van Rossum writes: GvR> Tim's right. It should be "2.2c1". I'll update the PEP <101 wink>. -Barry From gvanrossum@users.sourceforge.net Fri Dec 14 04:13:27 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Thu, 13 Dec 2001 20:13:27 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects typeobject.c,2.124,2.124.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv27623 Modified Files: Tag: r22rc1-branch typeobject.c Log Message: Fix for SF bug #492345. (I could've sworn I checked this in, but apparently I didn't!) This code: class Classic: pass class New(Classic): __metaclass__ = type attempts to create a new-style class with only classic bases -- but it doesn't work right. Attempts to fix it so it works caused problems elsewhere, so I'm now raising a TypeError in this case. Index: typeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v retrieving revision 2.124 retrieving revision 2.124.2.1 diff -C2 -d -r2.124 -r2.124.2.1 *** typeobject.c 2001/12/06 02:35:58 2.124 --- typeobject.c 2001/12/14 04:13:25 2.124.2.1 *************** *** 758,762 **** } } ! assert(base != NULL); return base; } --- 758,764 ---- } } ! if (base == NULL) ! PyErr_SetString(PyExc_TypeError, ! "a new-style class can't have only classic bases"); return base; } From gvanrossum@users.sourceforge.net Fri Dec 14 04:17:48 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Thu, 13 Dec 2001 20:17:48 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_descr.py,1.112,1.112.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv28461 Modified Files: Tag: r22rc1-branch test_descr.py Log Message: Fix for SF bug #492345. (I could've sworn I checked this in, but apparently I didn't!) This code: class Classic: pass class New(Classic): __metaclass__ = type attempts to create a new-style class with only classic bases -- but it doesn't work right. Attempts to fix it so it works caused problems elsewhere, so I'm now raising a TypeError in this case. Index: test_descr.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v retrieving revision 1.112 retrieving revision 1.112.2.1 diff -C2 -d -r1.112 -r1.112.2.1 *** test_descr.py 2001/12/11 04:37:34 1.112 --- test_descr.py 2001/12/14 04:17:45 1.112.2.1 *************** *** 923,926 **** --- 923,936 ---- vereq(m.all_method(), "M3 b") + class Classic: + pass + try: + class New(Classic): + __metaclass__ = type + except TypeError: + pass + else: + raise TestFailed, "new class with only classic bases - shouldn't be" + def diamond(): if verbose: print "Testing multiple inheritance special cases..." From gvanrossum@users.sourceforge.net Fri Dec 14 04:19:24 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Thu, 13 Dec 2001 20:19:24 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects typeobject.c,2.124,2.125 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv28799 Modified Files: typeobject.c Log Message: (Merge into trunk.) Fix for SF bug #492345. (I could've sworn I checked this in, but apparently I didn't!) This code: class Classic: pass class New(Classic): __metaclass__ = type attempts to create a new-style class with only classic bases -- but it doesn't work right. Attempts to fix it so it works caused problems elsewhere, so I'm now raising a TypeError in this case. Index: typeobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v retrieving revision 2.124 retrieving revision 2.125 diff -C2 -d -r2.124 -r2.125 *** typeobject.c 2001/12/06 02:35:58 2.124 --- typeobject.c 2001/12/14 04:19:22 2.125 *************** *** 758,762 **** } } ! assert(base != NULL); return base; } --- 758,764 ---- } } ! if (base == NULL) ! PyErr_SetString(PyExc_TypeError, ! "a new-style class can't have only classic bases"); return base; } From gvanrossum@users.sourceforge.net Fri Dec 14 04:19:58 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Thu, 13 Dec 2001 20:19:58 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_descr.py,1.112,1.113 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv28932 Modified Files: test_descr.py Log Message: (Merge into trunk.) Fix for SF bug #492345. (I could've sworn I checked this in, but apparently I didn't!) This code: class Classic: pass class New(Classic): __metaclass__ = type attempts to create a new-style class with only classic bases -- but it doesn't work right. Attempts to fix it so it works caused problems elsewhere, so I'm now raising a TypeError in this case. Index: test_descr.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** test_descr.py 2001/12/11 04:37:34 1.112 --- test_descr.py 2001/12/14 04:19:56 1.113 *************** *** 923,926 **** --- 923,936 ---- vereq(m.all_method(), "M3 b") + class Classic: + pass + try: + class New(Classic): + __metaclass__ = type + except TypeError: + pass + else: + raise TestFailed, "new class with only classic bases - shouldn't be" + def diamond(): if verbose: print "Testing multiple inheritance special cases..." From jackjansen@users.sourceforge.net Fri Dec 14 14:31:11 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 06:31:11 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Lib/mkcwproject __init__.py,1.11,1.12 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Lib/mkcwproject In directory usw-pr-cvs1:/tmp/cvs-serv14463/python/Mac/Lib/mkcwproject Modified Files: __init__.py Log Message: Add default values for options in the class init routine, not in the convenience wrapper function: distutils uses the class directly. Fixes bug #492665. Index: __init__.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Lib/mkcwproject/__init__.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** __init__.py 2001/11/30 14:16:30 1.11 --- __init__.py 2001/12/14 14:31:09 1.12 *************** *** 13,37 **** dictcopy[k] = v # ! # Fill in mac-specific values # dictcopy['mac_projectxmlname'] = outputfile + '.xml' dictcopy['mac_exportname'] = os.path.split(outputfile)[1] + '.exp' - if not dictcopy.has_key('mac_outputdir'): - dictcopy['mac_outputdir'] = ':lib:' - if not dictcopy.has_key('stdlibraryflags'): - dictcopy['stdlibraryflags'] = 'Debug' - if not dictcopy.has_key('libraryflags'): - dictcopy['libraryflags'] = 'Debug' if not dictcopy.has_key('mac_dllname'): dictcopy['mac_dllname'] = modulename + '.ppc.slb' if not dictcopy.has_key('mac_targetname'): dictcopy['mac_targetname'] = modulename + '.ppc' ! if os.path.isabs(dictcopy['sysprefix']): ! dictcopy['mac_sysprefixtype'] = 'Absolute' ! else: ! dictcopy['mac_sysprefixtype'] = 'Project' # XXX not sure this is right... ! # ! # Generate the XML for the project ! # xmlbuilder = cwxmlgen.ProjectBuilder(dictcopy, templatename=templatename) xmlbuilder.generate() --- 13,25 ---- dictcopy[k] = v # ! # Generate the XML for the project # dictcopy['mac_projectxmlname'] = outputfile + '.xml' dictcopy['mac_exportname'] = os.path.split(outputfile)[1] + '.exp' if not dictcopy.has_key('mac_dllname'): dictcopy['mac_dllname'] = modulename + '.ppc.slb' if not dictcopy.has_key('mac_targetname'): dictcopy['mac_targetname'] = modulename + '.ppc' ! xmlbuilder = cwxmlgen.ProjectBuilder(dictcopy, templatename=templatename) xmlbuilder.generate() From jackjansen@users.sourceforge.net Fri Dec 14 14:31:17 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 06:31:17 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Lib/mkcwproject cwxmlgen.py,1.6,1.7 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Lib/mkcwproject In directory usw-pr-cvs1:/tmp/cvs-serv14492/python/Mac/Lib/mkcwproject Modified Files: cwxmlgen.py Log Message: Add default values for options in the class init routine, not in the convenience wrapper function: distutils uses the class directly. Fixes bug #492665. Index: cwxmlgen.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Lib/mkcwproject/cwxmlgen.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** cwxmlgen.py 2001/08/11 10:07:23 1.6 --- cwxmlgen.py 2001/12/14 14:31:15 1.7 *************** *** 21,24 **** --- 21,25 ---- class ProjectBuilder: def __init__(self, dict, templatelist=TEMPLATELIST, templatename=None): + self._adddefaults(dict) if templatename == None: if hasattr(MacOS, 'runtimemodel'): *************** *** 44,47 **** --- 45,62 ---- self.templatelist = templatelist self.templatedir = templatedir + + def _adddefaults(self, dict): + # Set all suitable defaults set for values which were omitted. + if not dict.has_key('mac_outputdir'): + dict['mac_outputdir'] = ':lib:' + if not dict.has_key('stdlibraryflags'): + dict['stdlibraryflags'] = 'Debug' + if not dict.has_key('libraryflags'): + dict['libraryflags'] = 'Debug' + if not dict.has_key('mac_sysprefixtype'): + if os.path.isabs(dict['sysprefix']): + dict['mac_sysprefixtype'] = 'Absolute' + else: + dict['mac_sysprefixtype'] = 'Project' # XXX not sure this is right... def generate(self): From jhylton@users.sourceforge.net Fri Dec 14 16:15:13 2001 From: jhylton@users.sourceforge.net (Jeremy Hylton) Date: Fri, 14 Dec 2001 08:15:13 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib asyncore.py,1.27,1.28 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv12555 Modified Files: asyncore.py Log Message: Partial fix for problem in SF buf #487458 Rev 1.20 introduced a call to getpeername() in the dispatcher constructor. This only works for a connected socket. Apparently earlier versions of the code worked with un-connected sockets, e.g. a listening socket. It's not clear that the code is supposed to accept these sockets, because it sets self.connected = 1 when passed a socket. But it's also not clear that it should be a fatal error to pass a listening socket. The solution, for now, is to put a try/except around the getpeername() call and continue if it fails. The self.addr attribute is used primarily (only?) to produce a nice repr for the object, so it hardly matters. If there is a real error on a connected socket, it's likely that subsequent calls will fail too. Index: asyncore.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/asyncore.py,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** asyncore.py 2001/10/30 14:16:17 1.27 --- asyncore.py 2001/12/14 16:15:11 1.28 *************** *** 213,217 **** self.socket.setblocking (0) self.connected = 1 ! self.addr = sock.getpeername() else: self.socket = None --- 213,223 ---- self.socket.setblocking (0) self.connected = 1 ! # XXX Does the constructor require that the socket passed ! # be connected? ! try: ! self.addr = sock.getpeername() ! except socket.error: ! # The addr isn't crucial ! pass else: self.socket = None From gvanrossum@users.sourceforge.net Fri Dec 14 16:25:55 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Fri, 14 Dec 2001 08:25:55 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib asyncore.py,1.27,1.27.4.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv15391 Modified Files: Tag: r22rc1-branch asyncore.py Log Message: Merge two of Jeremy's last-minute changes on the trunk into the release branch. Index: asyncore.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/asyncore.py,v retrieving revision 1.27 retrieving revision 1.27.4.1 diff -C2 -d -r1.27 -r1.27.4.1 *** asyncore.py 2001/10/30 14:16:17 1.27 --- asyncore.py 2001/12/14 16:25:53 1.27.4.1 *************** *** 213,217 **** self.socket.setblocking (0) self.connected = 1 ! self.addr = sock.getpeername() else: self.socket = None --- 213,223 ---- self.socket.setblocking (0) self.connected = 1 ! # XXX Does the constructor require that the socket passed ! # be connected? ! try: ! self.addr = sock.getpeername() ! except socket.error: ! # The addr isn't crucial ! pass else: self.socket = None From gvanrossum@users.sourceforge.net Fri Dec 14 16:25:55 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Fri, 14 Dec 2001 08:25:55 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_scope.py,1.22,1.22.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv15391/test Modified Files: Tag: r22rc1-branch test_scope.py Log Message: Merge two of Jeremy's last-minute changes on the trunk into the release branch. Index: test_scope.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_scope.py,v retrieving revision 1.22 retrieving revision 1.22.2.1 diff -C2 -d -r1.22 -r1.22.2.1 *** test_scope.py 2001/12/13 19:45:04 1.22 --- test_scope.py 2001/12/14 16:25:53 1.22.2.1 *************** *** 462,467 **** if kind == 1: # AV happens when stepping from this line to next if des == "": ! ## des = "_%s__%s" % (klass.__name__, name) ! des = "1" return lambda obj: getattr(obj, des) --- 462,466 ---- if kind == 1: # AV happens when stepping from this line to next if des == "": ! des = "_%s__%s" % (klass.__name__, name) return lambda obj: getattr(obj, des) From fdrake@users.sourceforge.net Fri Dec 14 16:42:58 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Fri, 14 Dec 2001 08:42:58 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs license.tex,1.3,1.4 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory usw-pr-cvs1:/tmp/cvs-serv20367/texinputs Modified Files: license.tex Log Message: Reflect change of Digital Creations to Zope Corporation. Index: license.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/license.tex,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** license.tex 2001/10/20 04:19:50 1.3 --- license.tex 2001/12/14 16:42:56 1.4 *************** *** 13,22 **** In May 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. In October of the same ! year, the PythonLabs team moved to Digital Creations (see ! \url{http://www.digicool.com/}). In 2001, the Python Software ! Foundation (PSF, see \url{http://www.python.org/psf/}) was formed, a ! non-profit organization created specifically to own Python-related ! Intellectual Property. Digital Creations is a sponsoring member of ! the PSF. All Python releases are Open Source (see --- 13,22 ---- In May 2000, Guido and the Python core development team moved to BeOpen.com to form the BeOpen PythonLabs team. In October of the same ! year, the PythonLabs team moved to Zope Corporation (then Digital ! Creations; see \url{http://www.zope.com/}). In 2001, the Python ! Software Foundation (PSF, see \url{http://www.python.org/psf/}) was ! formed, a non-profit organization created specifically to own ! Python-related Intellectual Property. Digital Creations is a ! sponsoring member of the PSF. All Python releases are Open Source (see From fdrake@users.sourceforge.net Fri Dec 14 16:45:06 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Fri, 14 Dec 2001 08:45:06 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile,1.234,1.235 Message-ID: Update of /cvsroot/python/python/dist/src/Doc In directory usw-pr-cvs1:/tmp/cvs-serv20975 Modified Files: Makefile Log Message: Bump version numbers for the trunk. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.234 retrieving revision 1.235 diff -C2 -d -r1.234 -r1.235 *** Makefile 2001/12/12 06:22:43 1.234 --- Makefile 2001/12/14 16:45:04 1.235 *************** *** 67,71 **** # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.2b2+ PYTHON= python --- 67,71 ---- # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.2c1+ PYTHON= python From fdrake@users.sourceforge.net Fri Dec 14 16:45:06 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Fri, 14 Dec 2001 08:45:06 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs boilerplate.tex,1.69,1.70 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory usw-pr-cvs1:/tmp/cvs-serv20975/texinputs Modified Files: boilerplate.tex Log Message: Bump version numbers for the trunk. Index: boilerplate.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/boilerplate.tex,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** boilerplate.tex 2001/11/16 17:34:38 1.69 --- boilerplate.tex 2001/12/14 16:45:04 1.70 *************** *** 8,11 **** \date{\today} % XXX update before release! \release{2.2} % software release, not documentation ! \setreleaseinfo{b2+} % empty for final release \setshortversion{2.2} % major.minor only for software --- 8,11 ---- \date{\today} % XXX update before release! \release{2.2} % software release, not documentation ! \setreleaseinfo{c1+} % empty for final release \setshortversion{2.2} % major.minor only for software From bwarsaw@users.sourceforge.net Fri Dec 14 16:51:03 2001 From: bwarsaw@users.sourceforge.net (Barry Warsaw) Date: Fri, 14 Dec 2001 08:51:03 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib smtplib.py,1.45,1.45.6.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv22896 Modified Files: Tag: r22rc1-branch smtplib.py Log Message: send(), ehlo(): Integrate patch #487310 by Fazal Majid. Consistently call self.close() just before raising SMTPServerDisconnected. This allows you to, e.g. reconnect after a server timeout. Merge this patch into the trunk. Index: smtplib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/smtplib.py,v retrieving revision 1.45 retrieving revision 1.45.6.1 diff -C2 -d -r1.45 -r1.45.6.1 *** smtplib.py 2001/10/13 18:35:32 1.45 --- smtplib.py 2001/12/14 16:51:01 1.45.6.1 *************** *** 295,298 **** --- 295,299 ---- sendptr = sendptr + self.sock.send(str[sendptr:]) except socket.error: + self.close() raise SMTPServerDisconnected('Server not connected') else: *************** *** 381,384 **** --- 382,386 ---- # that happens -ddm if code == -1 and len(msg) == 0: + self.close() raise SMTPServerDisconnected("Server not connected") self.ehlo_resp=msg From fdrake@users.sourceforge.net Fri Dec 14 16:54:55 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Fri, 14 Dec 2001 08:54:55 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/perl python.perl,1.114,1.115 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory usw-pr-cvs1:/tmp/cvs-serv24152/perl Modified Files: python.perl Log Message: The valign attribute to control the vertical alignment of a table cell should be on the element, not the element. Partially fixes SF bug #493243. Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.114 retrieving revision 1.115 diff -C2 -d -r1.114 -r1.115 *** python.perl 2001/12/11 20:49:23 1.114 --- python.perl 2001/12/14 16:54:53 1.115 *************** *** 743,747 **** return ("
\n" . "
\n" ! . "
\n" . translate_commands(translate_environments($_)) . "
\n" --- 743,747 ---- return ("
\n" . "
\n" ! . "\n" . translate_commands(translate_environments($_)) . "
\n" *************** *** 762,766 **** local($CURRENT_TOKEN) = $token; if ($lang eq '*') { ! return ("\n" . " $token\n" . "  ::= \n" --- 762,766 ---- local($CURRENT_TOKEN) = $token; if ($lang eq '*') { ! return ("\n" . " $token\n" . "  ::= \n" *************** *** 778,782 **** } $TokenToTargetMapping{"$CURRENT_GRAMMAR:$token"} = $target; ! return ("\n" . " $token\n" . "  ::= \n" --- 778,782 ---- } $TokenToTargetMapping{"$CURRENT_GRAMMAR:$token"} = $target; ! return ("\n" . " $token\n" . "  ::= \n" From fdrake@users.sourceforge.net Fri Dec 14 16:57:34 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Fri, 14 Dec 2001 08:57:34 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref5.tex,1.52,1.53 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory usw-pr-cvs1:/tmp/cvs-serv24925/ref Modified Files: ref5.tex Log Message: Work around the problem of spaces after a "}" being dropped by LaTeX2HTML if they were represented by newlines in the document source. Partially fixes SF bug #493243. Index: ref5.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref5.tex,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** ref5.tex 2001/12/12 11:56:33 1.52 --- ref5.tex 2001/12/14 16:57:31 1.53 *************** *** 511,516 **** A consequence of this is that although the \samp{*expression} syntax appears \emph{after} any keyword arguments, it is processed ! \emph{before} the keyword arguments (and the \samp{**expression} ! argument, if any -- see below). So: \begin{verbatim} --- 511,516 ---- A consequence of this is that although the \samp{*expression} syntax appears \emph{after} any keyword arguments, it is processed ! \emph{before} the keyword arguments (and the ! \samp{**expression} argument, if any -- see below). So: \begin{verbatim} *************** *** 528,534 **** \end{verbatim} ! It is unusual for both keyword arguments and the \samp{*expression} ! syntax to be used in the same call, so in practice this confusion does ! not arise. If the syntax \samp{**expression} appears in the function call, --- 528,534 ---- \end{verbatim} ! It is unusual for both keyword arguments and the ! \samp{*expression} syntax to be used in the same call, so in practice ! this confusion does not arise. If the syntax \samp{**expression} appears in the function call, From fdrake@users.sourceforge.net Fri Dec 14 17:08:14 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Fri, 14 Dec 2001 09:08:14 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.334,1.335 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv28225/Misc Modified Files: NEWS Log Message: Note the tighter complex() parameter checking. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.334 retrieving revision 1.335 diff -C2 -d -r1.334 -r1.335 *** NEWS 2001/12/13 19:34:00 1.334 --- NEWS 2001/12/14 17:08:12 1.335 *************** *** 51,54 **** --- 51,58 ---- testing the current rules). + - complex() now only allows the first argument to be a string + argument, and raises TypeError if either the second arg is a string + or if the second arg is specified when the first is a string. + Extension modules From fdrake@users.sourceforge.net Fri Dec 14 17:08:46 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Fri, 14 Dec 2001 09:08:46 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.334,1.334.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv28366/Misc Modified Files: Tag: r22rc1-branch NEWS Log Message: Note the tighter complex() parameter checking. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.334 retrieving revision 1.334.2.1 diff -C2 -d -r1.334 -r1.334.2.1 *** NEWS 2001/12/13 19:34:00 1.334 --- NEWS 2001/12/14 17:08:44 1.334.2.1 *************** *** 51,54 **** --- 51,58 ---- testing the current rules). + - complex() now only allows the first argument to be a string + argument, and raises TypeError if either the second arg is a string + or if the second arg is specified when the first is a string. + Extension modules From tim_one@users.sourceforge.net Fri Dec 14 17:46:36 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Fri, 14 Dec 2001 09:46:36 -0800 Subject: [Python-checkins] CVS: python/dist/src README,1.132,1.132.2.1 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv5926/c1 Modified Files: Tag: r22rc1-branch README Log Message: Add info about the descr tutorial and the need for new ports to define NDEBUG in release builds. I'm not sure the descr info really fits here, though! Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.132 retrieving revision 1.132.2.1 diff -C2 -d -r1.132 -r1.132.2.1 *** README 2001/12/12 11:46:52 1.132 --- README 2001/12/14 17:46:33 1.132.2.1 *************** *** 86,90 **** --- 86,95 ---- authors, translators, and people with special formatting requirements. + The best documentation for the new (in Python 2.2) type/class unification + features is Guido's tutorial introduction, at + + http://www.python.org/2.2/descrintro.html + Web sites --------- *************** *** 395,408 **** with a SEGV due to the small stack size used by default, if you do "limit stacksize 2048" before "make test" it should work. ! On naked Darwin you may want to add the configure option "--disable-toolbox-glue" to disable the glue code for the Carbon interface modules. The modules themselves are currently only built if you add the --enable-framework option, see below. ! On a clean OSX /usr/local does not exist. Do a "sudo mkdir -m 775 /usr/local" before you do a make install. Alternatively, do "sudo make install" which installs everything as superuser. ! You may want to try the configure option "--enable-framework" which installs Python as a framework. The location can be set as argument --- 400,413 ---- with a SEGV due to the small stack size used by default, if you do "limit stacksize 2048" before "make test" it should work. ! On naked Darwin you may want to add the configure option "--disable-toolbox-glue" to disable the glue code for the Carbon interface modules. The modules themselves are currently only built if you add the --enable-framework option, see below. ! On a clean OSX /usr/local does not exist. Do a "sudo mkdir -m 775 /usr/local" before you do a make install. Alternatively, do "sudo make install" which installs everything as superuser. ! You may want to try the configure option "--enable-framework" which installs Python as a framework. The location can be set as argument *************** *** 827,830 **** --- 832,840 ---- of int if they need to be defined at all. + For all platforms, it's important that the build arrange to define the + preprocessor symbol NDEBUG on the compiler command line in a release + build of Python (else assert() calls remain in the code, hurting + release-build performance). The Unix, Windows and Mac builds already + do this. From tim_one@users.sourceforge.net Fri Dec 14 17:49:01 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Fri, 14 Dec 2001 09:49:01 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.334.2.1,1.334.2.2 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv6851/c1/Misc Modified Files: Tag: r22rc1-branch NEWS Log Message: Add descr tutorial NEWS (NDEBUG still on the way). Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.334.2.1 retrieving revision 1.334.2.2 diff -C2 -d -r1.334.2.1 -r1.334.2.2 *** NEWS 2001/12/14 17:08:44 1.334.2.1 --- NEWS 2001/12/14 17:48:58 1.334.2.2 *************** *** 5,8 **** --- 5,15 ---- Type/class unification and new-style classes + - Guido's tutorial introduction to the new type/class features has + been extensively updated. See + + http://www.python.org/2.2/descrintro.html + + That remains the primary documentation in this area. + - Fixed a leak: instance variables declared with __slots__ were never deleted! From tim_one@users.sourceforge.net Fri Dec 14 17:55:54 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Fri, 14 Dec 2001 09:55:54 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.334.2.2,1.334.2.3 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv8631/c1/Misc Modified Files: Tag: r22rc1-branch NEWS Log Message: NDEBUG news. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.334.2.2 retrieving revision 1.334.2.3 diff -C2 -d -r1.334.2.2 -r1.334.2.3 *** NEWS 2001/12/14 17:48:58 1.334.2.2 --- NEWS 2001/12/14 17:55:51 1.334.2.3 *************** *** 85,88 **** --- 85,96 ---- Build + - Note that release builds of Python should arrange to define the + preprocessor symbol NDEBUG on the command line (or equivalent). + In the 2.2 pre-release series we tried to define this by magic in + Python.h instead, but it proved to caused problems for extension + authors. The Unix, Windows and Mac builds now all define NDEBUG in + release builds via cmdline (or equivalent) instead. Ports to + other platforms should do likewise. + - It is no longer necessary to use --with-suffix when building on a case-insensitive file system (such as Mac OS X HFS+). In the build *************** *** 112,115 **** --- 120,124 ---- - In unix-Python on Mac OS X (and darwin) sys.platform is now "darwin", without any trailing digits. + What's New in Python 2.2b2? From bwarsaw@users.sourceforge.net Fri Dec 14 17:58:54 2001 From: bwarsaw@users.sourceforge.net (Barry Warsaw) Date: Fri, 14 Dec 2001 09:58:54 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.334.2.3,1.334.2.4 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv9273 Modified Files: Tag: r22rc1-branch NEWS Log Message: A few more last minute updates discovered by a stroll through the cvs log messages. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.334.2.3 retrieving revision 1.334.2.4 diff -C2 -d -r1.334.2.3 -r1.334.2.4 *** NEWS 2001/12/14 17:55:51 1.334.2.3 --- NEWS 2001/12/14 17:58:52 1.334.2.4 *************** *** 81,86 **** --- 81,95 ---- - The charset alias windows_1252 has been added. + - types.StringTypes is a tuple containing the defined string types; + usually this will be (str, unicode), but if Python was compiled + without Unicode support it will be just (str,). + + - The pulldom and minidom modules were synchronized to PyXML. + Tools/Demos + - A new script called Tools/scripts/google.py was added, which fires + off a search on Google. + Build *************** *** 120,123 **** --- 129,137 ---- - In unix-Python on Mac OS X (and darwin) sys.platform is now "darwin", without any trailing digits. + + - Changed logic for finding python home in Mac OS X framework Pythons. + Now sys.executable points to the executable again, in stead of to + the shared library. The latter is used only for locating the python + home. From tim_one@users.sourceforge.net Fri Dec 14 18:06:13 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Fri, 14 Dec 2001 10:06:13 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.334.2.4,1.334.2.5 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv10819/c1/Misc Modified Files: Tag: r22rc1-branch NEWS Log Message: Typo repair. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.334.2.4 retrieving revision 1.334.2.5 diff -C2 -d -r1.334.2.4 -r1.334.2.5 *** NEWS 2001/12/14 17:58:52 1.334.2.4 --- NEWS 2001/12/14 18:06:11 1.334.2.5 *************** *** 97,101 **** preprocessor symbol NDEBUG on the command line (or equivalent). In the 2.2 pre-release series we tried to define this by magic in ! Python.h instead, but it proved to caused problems for extension authors. The Unix, Windows and Mac builds now all define NDEBUG in release builds via cmdline (or equivalent) instead. Ports to --- 97,101 ---- preprocessor symbol NDEBUG on the command line (or equivalent). In the 2.2 pre-release series we tried to define this by magic in ! Python.h instead, but it proved to cause problems for extension authors. The Unix, Windows and Mac builds now all define NDEBUG in release builds via cmdline (or equivalent) instead. Ports to From bwarsaw@users.sourceforge.net Fri Dec 14 20:30:25 2001 From: bwarsaw@users.sourceforge.net (Barry Warsaw) Date: Fri, 14 Dec 2001 12:30:25 -0800 Subject: [Python-checkins] CVS: python/dist/src/Include patchlevel.h,2.59,2.60 Message-ID: Update of /cvsroot/python/python/dist/src/Include In directory usw-pr-cvs1:/tmp/cvs-serv13283 Modified Files: patchlevel.h Log Message: As usual, bump the version number. Index: patchlevel.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v retrieving revision 2.59 retrieving revision 2.60 diff -C2 -d -r2.59 -r2.60 *** patchlevel.h 2001/11/16 21:12:25 2.59 --- patchlevel.h 2001/12/14 20:30:23 2.60 *************** *** 23,31 **** #define PY_MINOR_VERSION 2 #define PY_MICRO_VERSION 0 ! #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_BETA ! #define PY_RELEASE_SERIAL 2 /* Version as a string */ ! #define PY_VERSION "2.2b2+" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. --- 23,31 ---- #define PY_MINOR_VERSION 2 #define PY_MICRO_VERSION 0 ! #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_GAMMA ! #define PY_RELEASE_SERIAL 1 /* Version as a string */ ! #define PY_VERSION "2.2c1+" /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. From bwarsaw@users.sourceforge.net Fri Dec 14 20:34:22 2001 From: bwarsaw@users.sourceforge.net (Barry Warsaw) Date: Fri, 14 Dec 2001 12:34:22 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib smtplib.py,1.45,1.46 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv14486 Modified Files: smtplib.py Log Message: send(), ehlo(): Integrate patch #487310 by Fazal Majid. Consistently call self.close() just before raising SMTPServerDisconnected. This allows you to, e.g. reconnect after a server timeout. Merged from the 2.2c1 branch. Index: smtplib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/smtplib.py,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** smtplib.py 2001/10/13 18:35:32 1.45 --- smtplib.py 2001/12/14 20:34:20 1.46 *************** *** 295,298 **** --- 295,299 ---- sendptr = sendptr + self.sock.send(str[sendptr:]) except socket.error: + self.close() raise SMTPServerDisconnected('Server not connected') else: *************** *** 381,384 **** --- 382,386 ---- # that happens -ddm if code == -1 and len(msg) == 0: + self.close() raise SMTPServerDisconnected("Server not connected") self.ehlo_resp=msg From bwarsaw@users.sourceforge.net Fri Dec 14 20:44:34 2001 From: bwarsaw@users.sourceforge.net (Barry Warsaw) Date: Fri, 14 Dec 2001 12:44:34 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.335,1.336 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv17008 Modified Files: NEWS Log Message: Merge last minute 2.2c1 changes from branch to trunk. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.335 retrieving revision 1.336 diff -C2 -d -r1.335 -r1.336 *** NEWS 2001/12/14 17:08:12 1.335 --- NEWS 2001/12/14 20:44:32 1.336 *************** *** 5,8 **** --- 5,15 ---- Type/class unification and new-style classes + - Guido's tutorial introduction to the new type/class features has + been extensively updated. See + + http://www.python.org/2.2/descrintro.html + + That remains the primary documentation in this area. + - Fixed a leak: instance variables declared with __slots__ were never deleted! *************** *** 74,81 **** --- 81,105 ---- - The charset alias windows_1252 has been added. + - types.StringTypes is a tuple containing the defined string types; + usually this will be (str, unicode), but if Python was compiled + without Unicode support it will be just (str,). + + - The pulldom and minidom modules were synchronized to PyXML. + Tools/Demos + - A new script called Tools/scripts/google.py was added, which fires + off a search on Google. + Build + - Note that release builds of Python should arrange to define the + preprocessor symbol NDEBUG on the command line (or equivalent). + In the 2.2 pre-release series we tried to define this by magic in + Python.h instead, but it proved to cause problems for extension + authors. The Unix, Windows and Mac builds now all define NDEBUG in + release builds via cmdline (or equivalent) instead. Ports to + other platforms should do likewise. + - It is no longer necessary to use --with-suffix when building on a case-insensitive file system (such as Mac OS X HFS+). In the build *************** *** 105,108 **** --- 129,138 ---- - In unix-Python on Mac OS X (and darwin) sys.platform is now "darwin", without any trailing digits. + + - Changed logic for finding python home in Mac OS X framework Pythons. + Now sys.executable points to the executable again, in stead of to + the shared library. The latter is used only for locating the python + home. + What's New in Python 2.2b2? From bwarsaw@users.sourceforge.net Fri Dec 14 20:47:15 2001 From: bwarsaw@users.sourceforge.net (Barry Warsaw) Date: Fri, 14 Dec 2001 12:47:15 -0800 Subject: [Python-checkins] CVS: python/dist/src README,1.132,1.133 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv17745 Modified Files: README Log Message: Merge last minute 2.2c1 changes from branch to trunk. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -d -r1.132 -r1.133 *** README 2001/12/12 11:46:52 1.132 --- README 2001/12/14 20:47:12 1.133 *************** *** 86,90 **** --- 86,95 ---- authors, translators, and people with special formatting requirements. + The best documentation for the new (in Python 2.2) type/class unification + features is Guido's tutorial introduction, at + + http://www.python.org/2.2/descrintro.html + Web sites --------- *************** *** 395,414 **** with a SEGV due to the small stack size used by default, if you do "limit stacksize 2048" before "make test" it should work. ! On naked Darwin you may want to add the configure option "--disable-toolbox-glue" to disable the glue code for the Carbon interface modules. The modules themselves are currently only built if you add the --enable-framework option, see below. ! ! On a clean OSX /usr/local does not exist. Do a "sudo mkdir -m 775 /usr/local" before you do a make install. Alternatively, do "sudo make install" which installs everything as superuser. ! ! You may want to try the configure option "--enable-framework" which ! installs Python as a framework. The location can be set as argument ! to the --enable-framework option (default /Library/Frameworks). You may ! also want to check out ./Mac/OSX for building a Python.app. You may also ! want to manually install a symlink in /usr/local/bin/python to the ! executable deep down in the framework. Cygwin: With recent (relative to the time of writing, 2001-12-11) --- 400,421 ---- with a SEGV due to the small stack size used by default, if you do "limit stacksize 2048" before "make test" it should work. ! On naked Darwin you may want to add the configure option "--disable-toolbox-glue" to disable the glue code for the Carbon interface modules. The modules themselves are currently only built if you add the --enable-framework option, see below. ! ! On a clean OSX /usr/local does not exist. Do a ! "sudo mkdir -m 775 /usr/local" before you do a make install. Alternatively, do "sudo make install" which installs everything as superuser. ! ! You may want to try the configure option "--enable-framework" ! which installs Python as a framework. The location can be set ! as argument to the --enable-framework option (default ! /Library/Frameworks). You may also want to check out ./Mac/OSX ! for building a Python.app. You may also want to manually ! install a symlink in /usr/local/bin/python to the executable ! deep down in the framework. Cygwin: With recent (relative to the time of writing, 2001-12-11) *************** *** 827,830 **** --- 834,842 ---- of int if they need to be defined at all. + For all platforms, it's important that the build arrange to define the + preprocessor symbol NDEBUG on the compiler command line in a release + build of Python (else assert() calls remain in the code, hurting + release-build performance). The Unix, Windows and Mac builds already + do this. From fdrake@users.sourceforge.net Fri Dec 14 21:19:11 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Fri, 14 Dec 2001 13:19:11 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libgc.tex,1.8,1.9 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv27157/lib Modified Files: libgc.tex Log Message: Add a missing "cycle". Index: libgc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libgc.tex,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** libgc.tex 2001/11/24 09:24:51 1.8 --- libgc.tex 2001/12/14 21:19:08 1.9 *************** *** 110,114 **** to avoid the issue by not creating cycles containing objects with \method{__del__()} methods, and \var{garbage} can be examined in that ! case to verify that no such are being created. If \constant{DEBUG_SAVEALL} is set, then all unreachable objects will --- 110,114 ---- to avoid the issue by not creating cycles containing objects with \method{__del__()} methods, and \var{garbage} can be examined in that ! case to verify that no such cycles are being created. If \constant{DEBUG_SAVEALL} is set, then all unreachable objects will From jackjansen@users.sourceforge.net Fri Dec 14 21:28:55 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 13:28:55 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test regrtest.py,1.69,1.70 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv29215 Modified Files: regrtest.py Log Message: Added test_socketserver and test_unicode_file to tests expected to be skipped on Mac OS X. Not sure yet about test_locale.py: this may be due to my copy of Mac OS X (although it talks english fine enough). Index: regrtest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/regrtest.py,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** regrtest.py 2001/12/05 23:27:32 1.69 --- regrtest.py 2001/12/14 21:28:53 1.70 *************** *** 637,641 **** --- 637,643 ---- test_poll test_socket_ssl + test_socketserver test_sunaudiodev + test_unicode_file test_winreg test_winsound From jackjansen@users.sourceforge.net Fri Dec 14 22:47:16 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 14:47:16 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/ctl _Ctlmodule.c,1.8,1.9 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/ctl In directory usw-pr-cvs1:/tmp/cvs-serv15874/Python/Mac/Modules/ctl Modified Files: _Ctlmodule.c Log Message: Many of the new calls are Carbon-only. Flagged them as such. Index: _Ctlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/_Ctlmodule.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** _Ctlmodule.c 2001/12/13 21:24:37 1.8 --- _Ctlmodule.c 2001/12/14 22:47:13 1.9 *************** *** 597,600 **** --- 597,602 ---- } + #if TARGET_API_MAC_CARBON + static PyObject *CtlObj_SetControlTitleWithCFString(ControlObject *_self, PyObject *_args) { *************** *** 615,618 **** --- 617,623 ---- [...1467 lines suppressed...] {"CreatePopupButtonControl", (PyCFunction)Ctl_CreatePopupButtonControl, 1, "(WindowPtr window, Rect boundsRect, CFStringRef title, SInt16 menuID, Boolean variableWidth, SInt16 titleWidth, SInt16 titleJustification, Style titleStyle) -> (ControlHandle outControl)"}, + #endif + + #if TARGET_API_MAC_CARBON {"CreateRadioGroupControl", (PyCFunction)Ctl_CreateRadioGroupControl, 1, "(WindowPtr window, Rect boundsRect) -> (ControlHandle outControl)"}, + #endif + + #if TARGET_API_MAC_CARBON {"CreateScrollingTextBoxControl", (PyCFunction)Ctl_CreateScrollingTextBoxControl, 1, "(WindowPtr window, Rect boundsRect, SInt16 contentResID, Boolean autoScroll, UInt32 delayBeforeAutoScroll, UInt32 delayBetweenAutoScroll, UInt16 autoScrollAmount) -> (ControlHandle outControl)"}, + #endif + + #if TARGET_API_MAC_CARBON {"CreateDataBrowserControl", (PyCFunction)Ctl_CreateDataBrowserControl, 1, "(WindowPtr window, Rect boundsRect, OSType style) -> (ControlHandle outControl)"}, + #endif {"FindControlUnderMouse", (PyCFunction)Ctl_FindControlUnderMouse, 1, "(Point inWhere, WindowPtr inWindow) -> (ControlHandle _rv, SInt16 outPart)"}, From jackjansen@users.sourceforge.net Fri Dec 14 22:47:21 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 14:47:21 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/ctl ctlscan.py,1.22,1.23 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/ctl In directory usw-pr-cvs1:/tmp/cvs-serv15936/Python/Mac/Modules/ctl Modified Files: ctlscan.py Log Message: Many of the new calls are Carbon-only. Flagged them as such. Index: ctlscan.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctlscan.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ctlscan.py 2001/12/13 21:24:37 1.22 --- ctlscan.py 2001/12/14 22:47:19 1.23 *************** *** 128,131 **** --- 128,225 ---- 'GetControlClickActivation', 'HandleControlContextualMenuClick', + "CreateDataBrowserControl", + "CreateScrollingTextBoxControl", + "CreateRadioGroupControl", + "CreatePopupButtonControl", + "CreateCheckBoxControl", + "CreateRadioButtonControl", + "CreatePushButtonControl", + "CreateWindowHeaderControl", + "CreateStaticTextControl", + "CreateEditTextControl", + "CreateUserPaneControl", + "CreateClockControl", + "CreatePlacardControl", + "CreatePopupArrowControl", + "CreatePopupGroupBoxControl", + "CreateCheckGroupBoxControl", + "CreateGroupBoxControl", + "CreateSeparatorControl", + "CreateChasingArrowsControl", + "CreateLittleArrowsControl", + "CreateProgressBarControl", + "CreateDisclosureTriangleControl", + "GetDataBrowserColumnViewDisplayType", + "SetDataBrowserColumnViewDisplayType", + "GetDataBrowserColumnViewPathLength", + "GetDataBrowserColumnViewPath", + "GetDataBrowserListViewDisclosureColumn", + "SetDataBrowserListViewDisclosureColumn", + "GetDataBrowserListViewUsePlainBackground", + "SetDataBrowserListViewUsePlainBackground", + "GetDataBrowserListViewHeaderBtnHeight", + "SetDataBrowserListViewHeaderBtnHeight", + "AutoSizeDataBrowserListViewColumns", + "GetDataBrowserTableViewColumnProperty", + "GetDataBrowserTableViewColumnPosition", + "SetDataBrowserTableViewColumnPosition", + "GetDataBrowserTableViewItemRow", + "SetDataBrowserTableViewItemRow", + "GetDataBrowserTableViewItemID", + "GetDataBrowserTableViewGeometry", + "SetDataBrowserTableViewGeometry", + "GetDataBrowserTableViewNamedColumnWidth", + "SetDataBrowserTableViewNamedColumnWidth", + "GetDataBrowserTableViewItemRowHeight", + "SetDataBrowserTableViewItemRowHeight", + "GetDataBrowserTableViewColumnWidth", + "SetDataBrowserTableViewColumnWidth", + "GetDataBrowserTableViewRowHeight", + "SetDataBrowserTableViewRowHeight", + "GetDataBrowserTableViewHiliteStyle", + "SetDataBrowserTableViewHiliteStyle", + "GetDataBrowserTableViewColumnCount", + "RemoveDataBrowserTableViewColumn", + "GetDataBrowserItemPartBounds", + "GetDataBrowserEditItem", + "SetDataBrowserEditItem", + "GetDataBrowserEditText", + "SetDataBrowserEditText", + "GetDataBrowserPropertyFlags", + "SetDataBrowserPropertyFlags", + "GetDataBrowserSelectionFlags", + "SetDataBrowserSelectionFlags", + "GetDataBrowserSortProperty", + "SetDataBrowserSortProperty", + "GetDataBrowserHasScrollBars", + "SetDataBrowserHasScrollBars", + "GetDataBrowserScrollPosition", + "SetDataBrowserScrollPosition", + "GetDataBrowserSortOrder", + "SetDataBrowserSortOrder", + "GetDataBrowserTarget", + "SetDataBrowserTarget", + "GetDataBrowserScrollBarInset", + "SetDataBrowserScrollBarInset", + "GetDataBrowserActiveItems", + "SetDataBrowserActiveItems", + "RevealDataBrowserItem", + "GetDataBrowserItemState", + "IsDataBrowserItemSelected", + "GetDataBrowserItemCount", + "GetDataBrowserItems", + "SortDataBrowserContainer", + "CloseDataBrowserContainer", + "OpenDataBrowserContainer", + "MoveDataBrowserSelectionAnchor", + "GetDataBrowserSelectionAnchor", + "ExecuteDataBrowserEditCommand", + "EnableDataBrowserEditCommand", + "SetDataBrowserViewStyle", + "GetDataBrowserViewStyle", + "GetControlCommandID", + "SetControlCommandID", + "CopyControlTitleAsCFString", + "SetControlTitleWithCFString", ]), ('#if ACCESSOR_CALLS_ARE_FUNCTIONS', [ From jackjansen@users.sourceforge.net Fri Dec 14 22:47:58 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 14:47:58 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Build _CG.carbon.mcp,1.1,1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Build In directory usw-pr-cvs1:/tmp/cvs-serv16002/Python/Mac/Build Modified Files: _CG.carbon.mcp Log Message: Updated to CodeWarrior Pro 7. Index: _CG.carbon.mcp =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Build/_CG.carbon.mcp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvshbIOCc and /tmp/cvsA6335g differ From jackjansen@users.sourceforge.net Fri Dec 14 22:48:25 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 14:48:25 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Build _dummy_tkinter.mcp,1.5,1.6 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Build In directory usw-pr-cvs1:/tmp/cvs-serv16094/Python/Mac/Build Modified Files: _dummy_tkinter.mcp Log Message: Updated to CodeWarrior Pro 7. Index: _dummy_tkinter.mcp =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Build/_dummy_tkinter.mcp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 Binary files /tmp/cvsz3OR5q and /tmp/cvsOPgBLH differ From jackjansen@users.sourceforge.net Fri Dec 14 22:48:59 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 14:48:59 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Build PythonInterpreter.mcp,1.17,1.18 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Build In directory usw-pr-cvs1:/tmp/cvs-serv16163/Python/Mac/Build Modified Files: PythonInterpreter.mcp Log Message: Updated to CodeWarrior Pro 7. Index: PythonInterpreter.mcp =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Build/PythonInterpreter.mcp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 Binary files /tmp/cvs20nfyT and /tmp/cvsQBsF9D differ From jackjansen@users.sourceforge.net Fri Dec 14 22:49:37 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 14:49:37 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Build PythonCore.mcp,1.30,1.31 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Build In directory usw-pr-cvs1:/tmp/cvs-serv16278/Python/Mac/Build Modified Files: PythonCore.mcp Log Message: Updated to CodeWarrior Pro 7. Index: PythonCore.mcp =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Build/PythonCore.mcp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 Binary files /tmp/cvsjyh4kc and /tmp/cvs0XgGQf differ From fdrake@users.sourceforge.net Fri Dec 14 22:50:07 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Fri, 14 Dec 2001 14:50:07 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/doc doc.tex,1.57,1.58 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/doc In directory usw-pr-cvs1:/tmp/cvs-serv16410/doc Modified Files: doc.tex Log Message: Add a new environment for whole-paragraph (or longer) notes & warnings. Index: doc.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/doc/doc.tex,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** doc.tex 2001/11/30 18:09:48 1.57 --- doc.tex 2001/12/14 22:50:05 1.58 *************** *** 1011,1014 **** --- 1011,1033 ---- + \subsection{Miscellaneous Text Markup \label{misc-text-markup}} + + In addition to the inline markup, some additional ``block'' markup + is defined to make it easier to bring attention to various bits of + text. The markup described here serves this purpose, and is + intended to be used when marking one or more paragraphs or other + block constructs (such as \env{verbatim} environments). + + \begin{envdesc}{notice}{\op{type}} + Label some paragraphs as being worthy of additional attention from + the reader. What sort of attention is warrented can be indicated + by specifying the \var{type} of the notice. The only values + defined for \var{type} are \code{note} and \code{warning}; these + are equivalent in intent to the inline markup of the same name. + If \var{type} is omitted, \code{note} is used. Additional values + may be defined in the future. + \end{envdesc} + + \subsection{Module-specific Markup \label{module-markup}} From fdrake@users.sourceforge.net Fri Dec 14 22:50:08 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Fri, 14 Dec 2001 14:50:08 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs python.sty,1.87,1.88 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory usw-pr-cvs1:/tmp/cvs-serv16410/texinputs Modified Files: python.sty Log Message: Add a new environment for whole-paragraph (or longer) notes & warnings. Index: python.sty =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/python.sty,v retrieving revision 1.87 retrieving revision 1.88 diff -C2 -d -r1.87 -r1.88 *** python.sty 2001/12/11 18:47:36 1.87 --- python.sty 2001/12/14 22:50:06 1.88 *************** *** 920,925 **** } ! \newcommand{\note}[1]{\strong{Note:} #1} ! \newcommand{\warning}[1]{\strong{Warning:} #1} % Deprecation stuff. --- 920,930 ---- } ! \newcommand{\py@noticelabel@note}{Note:} ! \newcommand{\py@noticelabel@warning}{Warning:} ! \newenvironment{notice}[1][note]{ ! \par\strong{\csname py@noticelabel@#1\endcsname} ! }{} ! \newcommand{\note}[1]{\strong{\py@noticelabel@note} #1} ! \newcommand{\warning}[1]{\strong{\py@noticelabel@warning} #1} % Deprecation stuff. From jackjansen@users.sourceforge.net Fri Dec 14 22:50:28 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 14:50:28 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Build PythonStandSmall.mcp,1.32,1.33 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Build In directory usw-pr-cvs1:/tmp/cvs-serv16380/Python/Mac/Build Modified Files: PythonStandSmall.mcp Log Message: Updated to CodeWarrior Pro 7. Index: PythonStandSmall.mcp =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Build/PythonStandSmall.mcp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 Binary files /tmp/cvsWUiVjO and /tmp/cvswHN3Mu differ From fdrake@users.sourceforge.net Fri Dec 14 22:50:08 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Fri, 14 Dec 2001 14:50:08 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/perl python.perl,1.115,1.116 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/perl In directory usw-pr-cvs1:/tmp/cvs-serv16410/perl Modified Files: python.perl Log Message: Add a new environment for whole-paragraph (or longer) notes & warnings. Index: python.perl =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/perl/python.perl,v retrieving revision 1.115 retrieving revision 1.116 diff -C2 -d -r1.115 -r1.116 *** python.perl 2001/12/14 16:54:53 1.115 --- python.perl 2001/12/14 22:50:05 1.116 *************** *** 237,250 **** sub do_cmd_textit{ return use_wrappers(@_[0], '', ''); } sub do_cmd_note{ return use_wrappers( @_[0], ! "Note:\n", ''); } sub do_cmd_warning{ return use_wrappers( @_[0], ! "Warning:\n", ''); } sub do_cmd_moreargs{ --- 237,269 ---- sub do_cmd_textit{ return use_wrappers(@_[0], '', ''); } + # This can be changed/overridden for translations: + %NoticeNames = ('note' => 'Note:', + 'warning' => 'Warning:', + ); + sub do_cmd_note{ + my $label = $NoticeNames{'note'}; return use_wrappers( @_[0], ! "$label\n", ''); } sub do_cmd_warning{ + my $label = $NoticeNames{'warning'}; return use_wrappers( @_[0], ! "$label\n", ''); } + + sub do_env_notice{ + local($_) = @_; + my $notice = next_optional_argument(); + if (!$notice) { + $notice = 'note'; + } + my $label = $NoticeNames{$notice}; + return ("
$label\n" + . $_ + . '
'); + } sub do_cmd_moreargs{ From fdrake@users.sourceforge.net Fri Dec 14 22:52:43 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Fri, 14 Dec 2001 14:52:43 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref3.tex,1.81,1.82 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory usw-pr-cvs1:/tmp/cvs-serv16936/ref Modified Files: ref3.tex Log Message: Update information about __del__() & reference cycles for CPython. This partially fixes SF bug #492619. Fix a typo & use the new notice environment instead of (ab)using the \note and \warning macros. Index: ref3.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref3.tex,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** ref3.tex 2001/12/11 21:10:08 1.81 --- ref3.tex 2001/12/14 22:52:41 1.82 *************** *** 926,930 **** \stindex{del} ! \strong{Programmer's note:} \samp{del x} doesn't directly call \code{x.__del__()} --- the former decrements the reference count for \code{x} by one, and the latter is only called when its reference --- 926,931 ---- \stindex{del} ! \begin{notice} ! \samp{del x} doesn't directly call \code{x.__del__()} --- the former decrements the reference count for \code{x} by one, and the latter is only called when its reference *************** *** 939,949 **** \code{sys.last_traceback} keeps the stack frame alive). The first situation can only be remedied by explicitly breaking the cycles; the ! latter two situations can be resolved by storing None in ! \code{sys.exc_traceback} or \code{sys.last_traceback}. ! \warning{Due to the precarious circumstances under which \method{__del__()} methods are invoked, exceptions that occur during their execution are ignored, and a warning is printed to \code{sys.stderr} ! instead. Also, when \method{__del__()} is invoked is response to a module being deleted (e.g., when execution of the program is done), other globals referenced by the \method{__del__()} method may already have been --- 940,959 ---- \code{sys.last_traceback} keeps the stack frame alive). The first situation can only be remedied by explicitly breaking the cycles; the ! latter two situations can be resolved by storing \code{None} in ! \code{sys.exc_traceback} or \code{sys.last_traceback}. Circular ! references which are garbage are detected when the option cycle ! detector is enabled (it's on by default), but can only be cleaned up ! if there are no Python-level \method{__del__()} methods involved. ! Refer to the documentation for the \ulink{\module{gc} ! module}{../lib/module-gc.html} for more information about how ! \method{__del__()} methods are handled by the cycle detector, ! particularly the description of the \code{garbage} value. ! \end{notice} ! \begin{notice}[warning] ! Due to the precarious circumstances under which \method{__del__()} methods are invoked, exceptions that occur during their execution are ignored, and a warning is printed to \code{sys.stderr} ! instead. Also, when \method{__del__()} is invoked in response to a module being deleted (e.g., when execution of the program is done), other globals referenced by the \method{__del__()} method may already have been *************** *** 954,958 **** other references to such globals exist, this may help in assuring that imported modules are still available at the time when the ! \method{__del__()} method is called.} \end{methoddesc} --- 964,969 ---- other references to such globals exist, this may help in assuring that imported modules are still available at the time when the ! \method{__del__()} method is called. ! \end{notice} \end{methoddesc} From jackjansen@users.sourceforge.net Fri Dec 14 22:52:52 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 14:52:52 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Lib/mkcwproject/template-carbon template.prj.xml,1.4,1.5 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Lib/mkcwproject/template-carbon In directory usw-pr-cvs1:/tmp/cvs-serv16974/Python/Mac/Lib/mkcwproject/template-carbon Modified Files: template.prj.xml Log Message: Updated for CW7 Index: template.prj.xml =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Lib/mkcwproject/template-carbon/template.prj.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** template.prj.xml 2001/11/30 14:16:31 1.4 --- template.prj.xml 2001/12/14 22:52:50 1.5 *************** *** 1,9 **** ! ! --- 1,9 ---- ! ! *************** *** 38,41 **** --- 38,45 ---- + + + + *************** *** 60,63 **** --- 64,68 ---- AlwaysSearchUserPathstrue InterpretDOSAndUnixPathstrue + RequireFrameworkStyleIncludesfalse UserSearchPaths *************** *** 394,398 **** CacheSubprojectstrue UseThirdPartyDebuggerfalse ! DebuggerCommandLine --- 399,413 ---- CacheSubprojectstrue UseThirdPartyDebuggerfalse ! DebuggerAppPath ! Path ! PathFormatGeneric ! PathRootAbsolute ! ! DebuggerCmdLineArgs ! DebuggerWorkingDir ! Path ! PathFormatGeneric ! PathRootAbsolute ! *************** *** 411,533 **** CacheSymbolicstrue TempBPFunctionNamemain ! TempBPTypefalse ! Remote Debug ! 00030000002E680044726167055AF500055C7EA0000000000000030005D8AFC0 ! 726F6365737365732E680051055AF50073637265656E2E680049636F6E732E68 ! 00436F6465467261676D656E74732E680054657874456469742E6800436F6E74 ! 726F6C732E680070796D6163746F6F6C626F782E68004D656D6F72792E68004C ! 697374732E68004D6F766965732E6800496D616765436F6D7072657373696F6E ! 2E68004572726F72732E6800447261674C6962004D6F65733A53576465763A4A ! 61636B3A47555349323A696E636C7564653A7379733A004D6F65733A53576465 ! 763A4A61636B3A47555349323A696E636C7564653A6D616368696E653A003A73 ! 79733A730061742E6800737461742E6800000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 055BEB10AB00000400000790002F9B440000000000000001000000000000000F ! 00000002000000000000001C0000000300000000000000290000000400000000 ! 0000003700000005000000000000003E00000006000000000000004500000007 ! 0000000000000056000000080000000000000065000000090000000000000070 ! 0000000A00000000000000710000000B00000000000000860000000C00000000 ! 000000AA0000000D00000000000000B50000000E00000000000000C00000000F ! 00000000000000C80000001000000000000000EB0000001100000000000000F8 ! 00000012000000000000010F0000001300000000000001170000001400000000 ! 0000012900000015000000000000014200000016000000000000014C00000017 ! 000000000000016600000018000000000000016F00000019000000000000017C ! 0000001A00000000000001850000001B000000000000018E0000001C00000000 ! 000001970000001D000000000000019F0000001E00000000000001AC0000001F ! 00000000000001B90000002000000000000001C10000002100000000000001C8 ! 000000220000 ! ! Auto-target ! 00010000 ! ! ! ! CustomColor1 ! Red0 ! Green39321 ! Blue0 ! ! CustomColor2 ! Red0 ! Green32767 ! Blue0 ! ! CustomColor3 ! Red0 ! Green32767 ! Blue0 ! ! CustomColor4 ! Red0 ! Green32767 ! Blue0 ! ! ! ! MWCodeGen_68K_codesizeSmart ! MWCodeGen_68K_structalignmentMC68K ! MWCodeGen_68K_fp_modeSANE ! MWCodeGen_68K_code680200 ! MWCodeGen_68K_profiler0 ! MWCodeGen_68K_mpwc0 ! MWCodeGen_68K_fourbyteints0 ! MWCodeGen_68K_IEEEdoubles0 ! MWCodeGen_68K_fardata0 ! MWCodeGen_68K_farvtables0 ! MWCodeGen_68K_farstrings0 ! MWCodeGen_68K_pcrelstrings0 ! MWCodeGen_68K_macsbugNew ! MWCodeGen_68K_a6frames1 ! ! ! MWDisassembler_68K_showcode1 ! MWDisassembler_68K_mix0 ! MWDisassembler_68K_nohex0 ! MWDisassembler_68K_showdata1 ! MWDisassembler_68K_showexceptions1 ! MWDisassembler_68K_showsym0 ! MWDisassembler_68K_shownames1 ! ! GlobalOptimizer_68K_optimizationlevelLevel0 ! GlobalOptimizer_68K_optforSpeed ! ! MWLinker_68K_linksym1 ! MWLinker_68K_symfullpath1 ! MWLinker_68K_linksingle0 ! MWLinker_68K_fastlink1 ! MWLinker_68K_generateMap0 ! MWLinker_68K_nolinkwarnings0 ! MWLinker_68K_glueintosegone1 ! MWLinker_68K_dontdeadstripinitcode0 - - MWProject_68K_typeApplication - MWProject_68K_outfile - MWProject_68K_symfilename - MWProject_68K_filecreator1061109567 - MWProject_68K_filetype1095782476 - MWProject_68K_size384 - MWProject_68K_flags22656 - MWProject_68K_rsrcheaderStandard - MWProject_68K_rsrcname - MWProject_68K_rsrctype1061109567 - MWProject_68K_rsrcid0 - MWProject_68K_rsrcmulti0 - MWProject_68K_rsrcstore0 - MWProject_68K_rsrcmerge0 - MWProject_68K_rsrcflags0 - MWProject_68K_a40 - MWProject_68K_minsize384 - MWProject_68K_rsrcsegtype0 - MWProject_68K_cfm68kcodegen0 - MWProject_68K_stacksize0 - MWProject_68K_thedebugger0 - MWProject_68K_rsrc_custom0 - MWProject_68K_is_rseg_app0 - MWProject_68K_is_pilot_lib0 - MWProject_68K_pilot_main_entry --- 426,441 ---- CacheSymbolicstrue TempBPFunctionNamemain ! TempBPType0 ! ! Enabledfalse ! ConnectionName ! DownloadPath ! LaunchRemoteAppfalse ! RemoteAppPath ! ! OtherExecutables *************** *** 574,699 **** MWWarning_C_warn_structclass0 - - MWCFM68K_exportsNone - MWCFM68K_olddefversion0 - MWCFM68K_oldimpversion0 - MWCFM68K_currentversion0 - MWCFM68K_farthreshold256 - PCFM68K_sharedata0 - MWCFM68K_fragmentname - MWCFM68K_initname - MWCFM68K_mainname__start - MWCFM68K_termname - MWCFM68K_libfolder0 - MWCFM68K_alignmentAlign_2 - - - MWFTP_Post_hostName - MWFTP_Post_username - MWFTP_Post_password0C¤à - MWFTP_Post_remoteDir - MWFTP_Post_ftp_PathVersion0 - MWFTP_Post_ftp_PathType0 - MWFTP_Post_ftp_PathFormat0 - MWFTP_Post_ftp_tree - MWFTP_Post_uploadDir - MWFTP_Post_ftp_port21 - MWFTP_Post_SendBin1 - MWFTP_Post_ShouldLog1 - - - MWCommandLine_Java_clsName - MWCommandLine_Java_args - - - MWJava_Language_optimizefalse - MWJava_Language_warnDeprecatedfalse - MWJava_Language_emitMapfalse - MWJava_Language_strictFileNamesfalse - MWJava_Language_strictFileHierarchyfalse - MWJava_Language_1_1_Compatiblefalse - MWJava_Language_emitHeaders0 - MWJava_Language_headerTypeJNINativeHeaders - MWJava_Language_packageFilter - MWJava_Language_genCommentstrue - MWJava_Language_genHeadersfalse - - - MWJava_MRJAppBuilder_outFileMRJApplication - MWJava_MRJAppBuilder_mergefalse - MWJava_MRJAppBuilder_quitMenutrue - MWJava_MRJAppBuilder_growfalse - MWJava_MRJAppBuilder_stdoutTypeConsole - MWJava_MRJAppBuilder_stderrTypeConsole - MWJava_MRJAppBuilder_stdinTypeConsole - MWJava_MRJAppBuilder_appIconPVersion0 - MWJava_MRJAppBuilder_appIconPType0 - MWJava_MRJAppBuilder_appIconPFormat0 - MWJava_MRJAppBuilder_appIconPTree - MWJava_MRJAppBuilder_appIconFile - MWJava_MRJAppBuilder_splashScreenPVersion0 - MWJava_MRJAppBuilder_splashScreenPType0 - MWJava_MRJAppBuilder_splashScreenPFormat0 - MWJava_MRJAppBuilder_splashScreenPTree - MWJava_MRJAppBuilder_splashScreenPICTFile - MWJava_MRJAppBuilder_aboutName - MWJava_MRJAppBuilder_stdoutPVersion0 - MWJava_MRJAppBuilder_stdoutPType0 - MWJava_MRJAppBuilder_stdoutPFormat0 - MWJava_MRJAppBuilder_stdoutPTree - MWJava_MRJAppBuilder_stdoutFile - MWJava_MRJAppBuilder_stdoutAppendfalse - MWJava_MRJAppBuilder_stderrPType0 - MWJava_MRJAppBuilder_stderrPFormat0 - MWJava_MRJAppBuilder_stderrPTree - MWJava_MRJAppBuilder_stderrFile - MWJava_MRJAppBuilder_stderrAppendfalse - MWJava_MRJAppBuilder_stdinPType0 - MWJava_MRJAppBuilder_stdinPFormat0 - MWJava_MRJAppBuilder_stdinPTree - MWJava_MRJAppBuilder_stdinFile - - - MWJava_Output_outputtypeJarFile - MWJava_Output_outfileJavaClasses.jar - MWJava_Output_ftype1514754080 - MWJava_Output_fcreator1297570384 - MWJava_Output_compress0 - MWJava_Output_genManifest0 - MWJava_Output_trunctypeFront - MWJava_Output_deleteClasses0 - MWJava_Output_consoleApp1 - - - MWJava_Proj_projtypeApplet - MWJava_Proj_mainClassName - MWJava_Proj_HTMLAppCreator1463898714 - MWJava_Proj_HTMLAppName - MWJava_Proj_PathVersion0 - MWJava_Proj_PathType0 - MWJava_Proj_PathFormat0 - MWJava_Proj_tree - MWJava_Proj_HTMLAppWin32Name - MWJava_Proj_compress0 - MWJava_Proj_useVM1 - MWJava_Proj_vmarguments - MWJava_Proj_vmName - - - MWJavaDoc_Proj_Version1 - MWJavaDoc_Proj_Depricated1 - MWJavaDoc_Proj_Author1 - MWJavaDoc_Proj_Index1 - MWJavaDoc_Proj_Tree1 - MWJavaDoc_Proj_SunResolveToSame0 - MWJavaDoc_Proj_Shortnames1 - MWJavaDoc_Proj_Folder0 - MWJavaDoc_Proj_GenerateAPILinks0 - MWJavaDoc_Proj_scopePublic - MWJavaDoc_Proj_fcreator1297303877 - MWJavaDoc_Proj_encodingName - MWJavaDoc_Proj_decodingName - MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ - MWMerge_MacOS_projectTypeApplication --- 482,485 ---- *************** *** 704,707 **** --- 490,500 ---- MWMerge_MacOS_copyFragments1 MWMerge_MacOS_copyResources1 + MWMerge_MacOS_flattenResource0 + MWMerge_MacOS_flatFileNamea.rsrc + MWMerge_MacOS_flatFileOutputPath + Path: + PathFormatMacOS + PathRootProject + MWMerge_MacOS_skipResources *************** *** 711,778 **** ! ! FileLockedfalse ! ResourcesMapIsReadOnlyfalse ! PrinterDriverIsMultiFinderCompatiblefalse ! Invisiblefalse ! HasBundlefalse ! NameLockedfalse ! Stationeryfalse ! HasCustomIconfalse ! Sharedfalse ! HasBeenInitedfalse ! Label0 ! Comments ! Packager Panel ! 000100003F3F3F3F4150504C055C0001005CB8F0000000000000061005D8AFC0 ! 01000079000000000000008F055CAFD054455854435749450100020000000000 ! B5ACBD0600000000000000000000000000000000000000000000000000000000 ! 000001680000000C000000031000000000000000000000000000000000000000 ! 000000000100007A00000000000000900000000E544558544357494501000200 ! 00000000B5ACBD06000000000000000000000000000000000000000000000000 ! 00000000000001680000000C0000000310000000000000000000000000000000 ! 00000000000000000100007B00000000000000910000000E5445585443574945 ! 0100020000000000B5ACBD080000000000000000000000000000000000000000 ! 0000000000000000000001680000000C00000003100000000000000000000000 ! 0000000000000000000000000100007C00000000000000920000000E54455854 ! 435749450100020000000000B5ACBD0600000000000000000000000000000000 ! 000000000000000000000000000001680000000C000000031000000000000000 ! 000000000000000000000000000000000100007D000000000000009300000009 ! 54455854435749450000020000000000B65AFA69000000000000000000000000 ! 00000000000000000000000000000000000001680000000C0000000310000000 ! 00000000000000000000000000000000000000000100007E0000000000000094 ! 0000000E54455854435749450100020000000000B5ACBD070000000000000000 ! 0000000000000000000000000000000000000000000001680000000C00000003 ! 1000000000000000000000000000000000000000000000000100007F00000000 ! 000000950000000E54455854435749450100020000000000B5ACBD0700000000 ! 000000000000000000000000000000000000000000000000000001680000000C ! 0000000310000000000000000000000000000000000000000000000001000080 ! 00000000000000960000000E54455854435749450100020000000000B5ACBD07 ! 0000000000000000000000000000000000000001000000000000000000000168 ! 0000000C00000003100000000000000000000000000000000000000000000000 ! 0100008100000000000000970000000E54455854435749450100020000000000 ! B5ACBD0700000000000000000000000000000000000000000000000000000000 ! 000001680000000C000000031000000000000000000000000000000000000000 ! 000000000100008200000000000000980000000E544558544357494501000200 ! 00000000B5ACBD06000000000000000000000000000000000000000000000000 ! 00000000000001680000000C0000000310000000000000000000000000000000 ! 000000000000000001000083010000040000009900000004737475624D505320 ! 0100020000000000B5ACBC68B5ACBC6800000000000000000000000000000000 ! 0000000000000000000001000000040C00000008000000000000000000000000 ! 0000000000000000B650822901000084000000000000009D0000000B54455854 ! 435749450100020000000000B4AA816A00000000000000000000000000000000 ! 000000000000000000000000000001080000000C000000031000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000 ! --- 504,524 ---- ! ! MWMacOSPackager_UsePackager0 ! MWMacOSPackager_FolderToPackage ! Path: ! PathFormatMacOS ! PathRootProject ! ! MWMacOSPackager_CreateClassicAlias0 ! MWMacOSPackager_ClassicAliasMethodUseTargetOutput ! MWMacOSPackager_ClassicAliasPath ! Path: ! PathFormatMacOS ! PathRootProject ! ! MWMacOSPackager_CreatePkgInfo0 ! MWMacOSPackager_PkgCreatorType???? ! MWMacOSPackager_PkgFileTypeAPPL *************** *** 865,954 **** MWRez_Language_prefixname MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' - - - MWWinRC_prefixname - - - MWCodeGen_X86_processorGeneric - MWCodeGen_X86_alignmentbytes8 - MWCodeGen_X86_exceptionsZeroOverhead - MWCodeGen_X86_extinst_mmx0 - MWCodeGen_X86_extinst_3dnow0 - MWCodeGen_X86_use_mmx_3dnow_convention0 - MWCodeGen_X86_machinecodelisting0 - MWCodeGen_X86_intrinsics0 - MWCodeGen_X86_syminfo0 - MWCodeGen_X86_codeviewinfo1 - MWCodeGen_X86_extinst_cmov_fcomi0 - MWCodeGen_X86_extinst_sse0 - - - PDisasmX86_showHeaderstrue - PDisasmX86_showSymTabtrue - PDisasmX86_showCodetrue - PDisasmX86_showSourcefalse - PDisasmX86_showHextrue - PDisasmX86_showRelocationtrue - PDisasmX86_showCommentsfalse - PDisasmX86_showDebugfalse - PDisasmX86_showExceptionsfalse - PDisasmX86_showDatatrue - PDisasmX86_showRawfalse - PDisasmX86_verbosefalse - - - MWDebugger_X86_Exceptions - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - GlobalOptimizer_X86_optimizationlevelLevel0 - GlobalOptimizer_X86_optforSpeed - - - MWLinker_X86_entrypointusageDefault - MWLinker_X86_entrypoint - MWLinker_X86_subsystemWinGUI - MWLinker_X86_subsysmajorid4 - MWLinker_X86_subsysminorid0 - MWLinker_X86_usrmajorid0 - MWLinker_X86_usrminorid0 - MWLinker_X86_commandfile - MWLinker_X86_generatemap0 - MWLinker_X86_linksym0 - MWLinker_X86_linkCV1 - - - MWProject_X86_typeApplication - MWProject_X86_outfilenoname.exe - MWProject_X86_baseaddress4194304 - MWProject_X86_maxstacksize1024 - MWProject_X86_minstacksize4 - MWProject_X86_size1024 - MWProject_X86_minsize4 - MWProject_X86_importlib --- 611,614 ---- *************** *** 956,960 **** Name ! MSL ShLibRuntime.Lib MacOS Library --- 616,620 ---- Name ! MSL_ShLibRuntime_PPC.Lib MacOS Library *************** *** 988,992 **** Name ! MSL ShLibRuntime.Lib MacOS --- 648,652 ---- Name ! MSL_ShLibRuntime_PPC.Lib MacOS *************** *** 1029,1033 **** %(mac_targetname)s Name ! MSL ShLibRuntime.Lib MacOS --- 689,693 ---- %(mac_targetname)s Name ! MSL_ShLibRuntime_PPC.Lib MacOS From jackjansen@users.sourceforge.net Fri Dec 14 22:53:18 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 14:53:18 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Lib/mkcwproject/template-ppc template.prj.xml,1.3,1.4 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Lib/mkcwproject/template-ppc In directory usw-pr-cvs1:/tmp/cvs-serv17064/Python/Mac/Lib/mkcwproject/template-ppc Modified Files: template.prj.xml Log Message: Updated for CW7 Index: template.prj.xml =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Lib/mkcwproject/template-ppc/template.prj.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** template.prj.xml 2001/11/30 14:16:31 1.3 --- template.prj.xml 2001/12/14 22:53:16 1.4 *************** *** 1,9 **** ! ! ! --- 1,10 ---- ! ! ! ! *************** *** 33,41 **** ! ! --- 34,46 ---- ! ! ! ! ! ! *************** *** 47,50 **** --- 52,56 ---- ]> + *************** *** 56,84 **** UserSourceTrees - - CustomColor1 - Red0 - Green39321 - Blue0 - - CustomColor2 - Red0 - Green32767 - Blue0 - - CustomColor3 - Red0 - Green32767 - Blue0 - - CustomColor4 - Red0 - Green32767 - Blue0 - - AlwaysSearchUserPathstrue InterpretDOSAndUnixPathstrue UserSearchPaths --- 62,69 ---- UserSourceTrees AlwaysSearchUserPathstrue InterpretDOSAndUnixPathstrue + RequireFrameworkStyleIncludesfalse UserSearchPaths *************** *** 405,444 **** CacheSubprojectstrue UseThirdPartyDebuggerfalse ! DebuggerCommandLine ! Debugger Runtime ! 0002000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 00000000000000000000000000000000 ! --- 390,404 ---- CacheSubprojectstrue UseThirdPartyDebuggerfalse ! DebuggerAppPath ! Path ! PathFormatGeneric ! PathRootAbsolute ! ! DebuggerCmdLineArgs ! DebuggerWorkingDir ! Path ! PathFormatGeneric ! PathRootAbsolute ! *************** *** 457,527 **** CacheSymbolicstrue TempBPFunctionNamemain ! TempBPTypefalse ! ! ! MWCodeGen_68K_codesizeSmart ! MWCodeGen_68K_structalignmentMC68K ! MWCodeGen_68K_fp_modeSANE ! MWCodeGen_68K_code680200 ! MWCodeGen_68K_profiler0 ! MWCodeGen_68K_mpwc0 ! MWCodeGen_68K_fourbyteints0 ! MWCodeGen_68K_IEEEdoubles0 ! MWCodeGen_68K_fardata0 ! MWCodeGen_68K_farvtables0 ! MWCodeGen_68K_farstrings0 ! MWCodeGen_68K_pcrelstrings0 ! MWCodeGen_68K_macsbugNew ! MWCodeGen_68K_a6frames1 ! ! ! MWDisassembler_68K_showcode1 ! MWDisassembler_68K_mix0 ! MWDisassembler_68K_nohex0 ! MWDisassembler_68K_showdata1 ! MWDisassembler_68K_showexceptions1 ! MWDisassembler_68K_showsym0 ! MWDisassembler_68K_shownames1 ! ! GlobalOptimizer_68K_optimizationlevelLevel0 ! GlobalOptimizer_68K_optforSpeed ! ! MWLinker_68K_linksym1 ! MWLinker_68K_symfullpath1 ! MWLinker_68K_linksingle0 ! MWLinker_68K_fastlink1 ! MWLinker_68K_generateMap0 ! MWLinker_68K_nolinkwarnings0 ! MWLinker_68K_glueintosegone1 ! MWLinker_68K_dontdeadstripinitcode0 - - MWProject_68K_typeApplication - MWProject_68K_outfile - MWProject_68K_symfilename - MWProject_68K_filecreator1061109567 - MWProject_68K_filetype1095782476 - MWProject_68K_size384 - MWProject_68K_flags22656 - MWProject_68K_rsrcheaderStandard - MWProject_68K_rsrcname - MWProject_68K_rsrctype1061109567 - MWProject_68K_rsrcid0 - MWProject_68K_rsrcmulti0 - MWProject_68K_rsrcstore0 - MWProject_68K_rsrcmerge0 - MWProject_68K_rsrcflags0 - MWProject_68K_a40 - MWProject_68K_minsize384 - MWProject_68K_rsrcsegtype0 - MWProject_68K_cfm68kcodegen0 - MWProject_68K_stacksize0 - MWProject_68K_thedebugger0 - MWProject_68K_rsrc_custom0 - MWProject_68K_is_rseg_app0 - MWProject_68K_is_pilot_lib0 - MWProject_68K_pilot_main_entry --- 417,432 ---- CacheSymbolicstrue TempBPFunctionNamemain ! TempBPType0 ! ! Enabledfalse ! ConnectionName ! DownloadPath ! LaunchRemoteAppfalse ! RemoteAppPath ! ! OtherExecutables *************** *** 568,585 **** MWWarning_C_warn_structclass0 - - MWCFM68K_exportsNone - MWCFM68K_olddefversion0 - MWCFM68K_oldimpversion0 - MWCFM68K_currentversion0 - MWCFM68K_farthreshold256 - PCFM68K_sharedata0 - MWCFM68K_fragmentname - MWCFM68K_initname - MWCFM68K_mainname__start - MWCFM68K_termname - MWCFM68K_libfolder0 - MWCFM68K_alignmentAlign_2 - MWMerge_MacOS_projectTypeApplication --- 473,476 ---- *************** *** 590,593 **** --- 481,491 ---- MWMerge_MacOS_copyFragments1 MWMerge_MacOS_copyResources1 + MWMerge_MacOS_flattenResource0 + MWMerge_MacOS_flatFileNamea.rsrc + MWMerge_MacOS_flatFileOutputPath + Path: + PathFormatMacOS + PathRootProject + MWMerge_MacOS_skipResources *************** *** 597,600 **** --- 495,516 ---- + + MWMacOSPackager_UsePackager0 + MWMacOSPackager_FolderToPackage + Path: + PathFormatMacOS + PathRootProject + + MWMacOSPackager_CreateClassicAlias0 + MWMacOSPackager_ClassicAliasMethodUseTargetOutput + MWMacOSPackager_ClassicAliasPath + Path: + PathFormatMacOS + PathRootProject + + MWMacOSPackager_CreatePkgInfo0 + MWMacOSPackager_PkgCreatorType???? + MWMacOSPackager_PkgFileTypeAPPL + MWCodeGen_PPC_structalignmentPPC *************** *** 691,695 **** Name ! MSL ShLibRuntime.Lib MacOS Library --- 607,611 ---- Name ! MSL_ShLibRuntime_PPC.Lib MacOS Library *************** *** 730,734 **** Name ! MSL ShLibRuntime.Lib MacOS --- 646,650 ---- Name ! MSL_ShLibRuntime_PPC.Lib MacOS *************** *** 776,780 **** %(mac_targetname)s Name ! MSL ShLibRuntime.Lib MacOS --- 692,696 ---- %(mac_targetname)s Name ! MSL_ShLibRuntime_PPC.Lib MacOS From fdrake@users.sourceforge.net Fri Dec 14 22:55:16 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Fri, 14 Dec 2001 14:55:16 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref6.tex,1.46,1.47 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory usw-pr-cvs1:/tmp/cvs-serv17476/ref Modified Files: ref6.tex Log Message: Update to use the notice environment so a multi-paragraph note can be appropriately marked. Index: ref6.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref6.tex,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** ref6.tex 2001/12/12 06:06:43 1.46 --- ref6.tex 2001/12/14 22:55:14 1.47 *************** *** 483,494 **** get executed. ! \note{In Python 2.2, the \keyword{yield} statement is only allowed when the \code{generators} feature has been enabled. It will always be enabled in Python 2.3. This \code{__future__} import statment can ! be used to enable the feature:} \begin{verbatim} from __future__ import generators \end{verbatim} --- 483,496 ---- get executed. ! \begin{notice} ! In Python 2.2, the \keyword{yield} statement is only allowed when the \code{generators} feature has been enabled. It will always be enabled in Python 2.3. This \code{__future__} import statment can ! be used to enable the feature: \begin{verbatim} from __future__ import generators \end{verbatim} + \end{notice} From jackjansen@users.sourceforge.net Fri Dec 14 22:57:36 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 14:57:36 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Python macgetpath.c,1.24,1.25 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Python In directory usw-pr-cvs1:/tmp/cvs-serv18261/Python/Mac/Python Modified Files: macgetpath.c Log Message: Use getcwd(), not silly old getwd(). Index: macgetpath.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Python/macgetpath.c,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** macgetpath.c 2001/09/10 22:00:39 1.24 --- macgetpath.c 2001/12/14 22:57:34 1.25 *************** *** 297,301 **** printf("Python home dir exists but I cannot find the pathname!!\n"); name[0] = 0; ! (void)getwd(name); } diditbefore = 1; --- 297,301 ---- printf("Python home dir exists but I cannot find the pathname!!\n"); name[0] = 0; ! (void)getcwd(name, sizeof(name)); } diditbefore = 1; From jackjansen@users.sourceforge.net Fri Dec 14 22:58:08 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 14:58:08 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Include macglue.h,1.59,1.60 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Include In directory usw-pr-cvs1:/tmp/cvs-serv18448/Python/Mac/Include Modified Files: macglue.h Log Message: We have strdup(), but not its prototype:-( Index: macglue.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Include/macglue.h,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** macglue.h 2001/10/08 13:16:39 1.59 --- macglue.h 2001/12/14 22:58:06 1.60 *************** *** 120,126 **** /* from macgetargv: */ OSErr PyMac_init_process_location(void); - #ifndef HAVE_STRDUP char * strdup(const char *str); - #endif #ifdef USE_GUSI2 --- 120,124 ---- From jackjansen@users.sourceforge.net Fri Dec 14 22:58:13 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 14:58:13 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Include pyconfig.h,1.4,1.5 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Include In directory usw-pr-cvs1:/tmp/cvs-serv18481/Python/Mac/Include Modified Files: pyconfig.h Log Message: We have strdup(), but not its prototype:-( Index: pyconfig.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Include/pyconfig.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pyconfig.h 2001/11/06 12:11:05 1.4 --- pyconfig.h 2001/12/14 22:58:11 1.5 *************** *** 577,581 **** /* Define if you have the strdup function. */ ! #undef HAVE_STRDUP /* Define if you have the strerror function. */ --- 577,581 ---- /* Define if you have the strdup function. */ ! #define HAVE_STRDUP /* Define if you have the strerror function. */ From jackjansen@users.sourceforge.net Fri Dec 14 23:01:37 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 15:01:37 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/scripts bgenall.py,1.1,1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/scripts In directory usw-pr-cvs1:/tmp/cvs-serv19614/Python/Mac/scripts Modified Files: bgenall.py Log Message: The import of the scanner can also fail, cater for that. Index: bgenall.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/scripts/bgenall.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bgenall.py 2001/05/22 22:18:21 1.1 --- bgenall.py 2001/12/14 23:01:34 1.2 *************** *** 7,11 **** def bgenone(dirname, shortname): os.chdir(dirname) ! m = __import__(shortname+'scan') try: m.main() --- 7,14 ---- def bgenone(dirname, shortname): os.chdir(dirname) ! try: ! m = __import__(shortname+'scan') ! except: ! return 0 try: m.main() From jackjansen@users.sourceforge.net Fri Dec 14 23:03:01 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 15:03:01 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/mlte _Mltemodule.c,1.6,1.7 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/mlte In directory usw-pr-cvs1:/tmp/cvs-serv19955/Python/Mac/Modules/mlte Modified Files: _Mltemodule.c Log Message: Quick patch to allow building with Universal Headers 3.4. Index: _Mltemodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/mlte/_Mltemodule.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** _Mltemodule.c 2001/12/08 18:02:53 1.6 --- _Mltemodule.c 2001/12/14 23:02:59 1.7 *************** *** 242,246 **** } ! #if !TARGET_API_MAC_OSX static PyObject *TXNObj_TXNTSMCheck(TXNObjectObject *_self, PyObject *_args) --- 242,246 ---- } ! #if 0 static PyObject *TXNObj_TXNTSMCheck(TXNObjectObject *_self, PyObject *_args) *************** *** 1044,1048 **** "(EventRecord iEvent) -> None"}, ! #if !TARGET_API_MAC_OSX {"TXNTSMCheck", (PyCFunction)TXNObj_TXNTSMCheck, 1, "(EventRecord iEvent) -> (Boolean _rv)"}, --- 1044,1048 ---- "(EventRecord iEvent) -> None"}, ! #if 0 {"TXNTSMCheck", (PyCFunction)TXNObj_TXNTSMCheck, 1, "(EventRecord iEvent) -> (Boolean _rv)"}, From jackjansen@users.sourceforge.net Fri Dec 14 23:03:09 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 15:03:09 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/dlg _Dlgmodule.c,1.6,1.7 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/dlg In directory usw-pr-cvs1:/tmp/cvs-serv20019/Python/Mac/Modules/dlg Modified Files: _Dlgmodule.c Log Message: Quick patch to allow building with Universal Headers 3.4. Index: _Dlgmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/dlg/_Dlgmodule.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** _Dlgmodule.c 2001/12/08 18:02:52 1.6 --- _Dlgmodule.c 2001/12/14 23:03:07 1.7 *************** *** 877,897 **** } - #if !TARGET_API_MAC_CARBON - - static PyObject *DlgObj_SetGrafPortOfDialog(DialogObject *_self, PyObject *_args) - { - PyObject *_res = NULL; - #ifndef SetGrafPortOfDialog - PyMac_PRECHECK(SetGrafPortOfDialog); - #endif - if (!PyArg_ParseTuple(_args, "")) - return NULL; - SetGrafPortOfDialog(_self->ob_itself); - Py_INCREF(Py_None); - _res = Py_None; - return _res; - } - #endif - static PyMethodDef DlgObj_methods[] = { {"DrawDialog", (PyCFunction)DlgObj_DrawDialog, 1, --- 877,880 ---- *************** *** 976,983 **** "() -> (CGrafPtr _rv)"}, - #if !TARGET_API_MAC_CARBON - {"SetGrafPortOfDialog", (PyCFunction)DlgObj_SetGrafPortOfDialog, 1, - "() -> None"}, - #endif {NULL, NULL, 0} }; --- 959,962 ---- From jvr@users.sourceforge.net Fri Dec 14 23:16:06 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Fri, 14 Dec 2001 15:16:06 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/carbonevt CarbonEvtscan.py,1.3,1.4 CarbonEvtsupport.py,1.6,1.7 _CarbonEvtmodule.c,1.3,1.4 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/carbonevt In directory usw-pr-cvs1:/tmp/cvs-serv23350 Modified Files: CarbonEvtscan.py CarbonEvtsupport.py _CarbonEvtmodule.c Log Message: Made event callbacks more rubust: keep an actual reference to the python callback, and do RemoveEventHandler() upon deallocation. Index: CarbonEvtscan.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/carbonevt/CarbonEvtscan.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CarbonEvtscan.py 2001/12/12 20:48:53 1.3 --- CarbonEvtscan.py 2001/12/14 23:16:04 1.4 *************** *** 42,52 **** if arglist: t, n, m = arglist[0] - print "*********", t, if t in RefObjectTypes and m == "InMode": ! print "method" ! classname = "CarbonEventsMethod" listname = t + "methods" ! else: ! print "not method" return classname, listname --- 42,53 ---- if arglist: t, n, m = arglist[0] if t in RefObjectTypes and m == "InMode": ! if t == "EventHandlerRef": ! classname = "EventHandlerRefMethod" ! else: ! classname = "CarbonEventsMethod" listname = t + "methods" ! #else: ! # print "not method" return classname, listname *************** *** 83,86 **** --- 84,88 ---- # Wrote by hand "InstallEventHandler", + "RemoveEventHandler", "RunApplicationEventLoop", Index: CarbonEvtsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/carbonevt/CarbonEvtsupport.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CarbonEvtsupport.py 2001/12/12 21:48:00 1.6 --- CarbonEvtsupport.py 2001/12/14 23:16:04 1.7 *************** *** 12,15 **** --- 12,16 ---- exec execstr + if 0: # these types will have no methods and will merely be opaque blobs *************** *** 54,57 **** --- 55,66 ---- CarbonEventsMethod = OSErrMethodGenerator + class EventHandlerRefMethod(OSErrMethodGenerator): + def precheck(self): + OutLbrace('if (_self->ob_itself == NULL)') + Output('PyErr_SetString(CarbonEvents_Error, "Handler has been removed");') + Output('return NULL;') + OutRbrace() + + includestuff = r""" #ifdef WITHOUT_FRAMEWORKS *************** *** 189,201 **** module = MacModule('_CarbonEvt', 'CarbonEvents', includestuff, finalstuff, initstuff) - #class CFReleaserObj(GlobalObjectDefinition): - # def outputFreeIt(self, name): - # Output("CFRelease(%s);" % name) for typ in RefObjectTypes: ! execstr = typ + 'object = GlobalObjectDefinition(typ)' ! exec execstr module.addobject(eval(typ + 'object')) functions = [] for typ in RefObjectTypes: ## go thru all ObjectTypes as defined in CarbonEventsscan.py --- 198,226 ---- module = MacModule('_CarbonEvt', 'CarbonEvents', includestuff, finalstuff, initstuff) + + + class EventHandlerRefObjectDefinition(GlobalObjectDefinition): + def outputStructMembers(self): + Output("%s ob_itself;", self.itselftype) + Output("PyObject *ob_callback;") + def outputInitStructMembers(self): + Output("it->ob_itself = %sitself;", self.argref) + Output("it->ob_callback = NULL;") + def outputFreeIt(self, name): + OutLbrace("if (self->ob_itself != NULL)") + Output("RemoveEventHandler(self->ob_itself);") + Output("Py_DECREF(self->ob_callback);") + OutRbrace() + for typ in RefObjectTypes: ! if typ == 'EventHandlerRef': ! EventHandlerRefobject = EventHandlerRefObjectDefinition('EventHandlerRef') ! else: ! execstr = typ + 'object = GlobalObjectDefinition(typ)' ! exec execstr module.addobject(eval(typ + 'object')) + functions = [] for typ in RefObjectTypes: ## go thru all ObjectTypes as defined in CarbonEventsscan.py *************** *** 206,209 **** --- 231,236 ---- execfile('CarbonEventsgen.py') + + for f in functions: module.add(f) # add all the functions carboneventsgen put in the list *************** *** 213,216 **** --- 240,266 ---- for m in methods: obj.add(m) ## add each method in the list to the object + + removeeventhandler = """ + OSStatus _err; + if (_self->ob_itself == NULL) { + PyErr_SetString(CarbonEvents_Error, "Handler has been removed"); + return NULL; + } + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _err = RemoveEventHandler(_self->ob_itself); + if (_err != noErr) return PyMac_Error(_err); + _self->ob_itself = NULL; + Py_DECREF(_self->ob_callback); + _self->ob_callback = NULL; + Py_INCREF(Py_None); + _res = Py_None; + return _res;""" + + f = ManualGenerator("RemoveEventHandler", removeeventhandler); + f.docstring = lambda: "() -> None" + EventHandlerRefobject.add(f) + + installeventhandler = """ EventTypeSpec inSpec; *************** *** 225,232 **** if (_err != noErr) return PyMac_Error(_err); ! return Py_BuildValue("O&", EventHandlerRef_New, outRef);""" f = ManualGenerator("InstallEventHandler", installeventhandler); ! f.docstring = lambda: "(EventTargetRef inTarget, EventTypeSpec inSpec, Method callback) -> (EventHandlerRef outRef)" EventTargetRefobject.add(f) --- 275,287 ---- if (_err != noErr) return PyMac_Error(_err); ! _res = EventHandlerRef_New(outRef); ! if (_res != NULL) { ! ((EventHandlerRefObject*)_res)->ob_callback = callback; ! Py_INCREF(callback); ! } ! return _res;""" f = ManualGenerator("InstallEventHandler", installeventhandler); ! f.docstring = lambda: "(EventTypeSpec inSpec, Method callback) -> (EventHandlerRef outRef)" EventTargetRefobject.add(f) Index: _CarbonEvtmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/carbonevt/_CarbonEvtmodule.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** _CarbonEvtmodule.c 2001/12/12 21:48:00 1.3 --- _CarbonEvtmodule.c 2001/12/14 23:16:04 1.4 *************** *** 800,803 **** --- 800,804 ---- PyObject_HEAD EventHandlerRef ob_itself; + PyObject *ob_callback; } EventHandlerRefObject; *************** *** 808,811 **** --- 809,813 ---- if (it == NULL) return NULL; it->ob_itself = itself; + it->ob_callback = NULL; return (PyObject *)it; } *************** *** 823,843 **** static void EventHandlerRef_dealloc(EventHandlerRefObject *self) { ! /* Cleanup of self->ob_itself goes here */ PyMem_DEL(self); } - static PyObject *EventHandlerRef_RemoveEventHandler(EventHandlerRefObject *_self, PyObject *_args) - { - PyObject *_res = NULL; - OSStatus _err; - if (!PyArg_ParseTuple(_args, "")) - return NULL; - _err = RemoveEventHandler(_self->ob_itself); - if (_err != noErr) return PyMac_Error(_err); - Py_INCREF(Py_None); - _res = Py_None; - return _res; - } - static PyObject *EventHandlerRef_AddEventTypesToHandler(EventHandlerRefObject *_self, PyObject *_args) { --- 825,835 ---- static void EventHandlerRef_dealloc(EventHandlerRefObject *self) { ! if (self->ob_itself != NULL) { ! RemoveEventHandler(self->ob_itself); ! Py_DECREF(self->ob_callback); ! } PyMem_DEL(self); } static PyObject *EventHandlerRef_AddEventTypesToHandler(EventHandlerRefObject *_self, PyObject *_args) { *************** *** 846,849 **** --- 838,845 ---- UInt32 inNumTypes; EventTypeSpec inList; + if (_self->ob_itself == NULL) { + PyErr_SetString(CarbonEvents_Error, "Handler has been removed"); + return NULL; + } if (!PyArg_ParseTuple(_args, "lO&", &inNumTypes, *************** *** 865,868 **** --- 861,868 ---- UInt32 inNumTypes; EventTypeSpec inList; + if (_self->ob_itself == NULL) { + PyErr_SetString(CarbonEvents_Error, "Handler has been removed"); + return NULL; + } if (!PyArg_ParseTuple(_args, "lO&", &inNumTypes, *************** *** 878,888 **** } static PyMethodDef EventHandlerRef_methods[] = { - {"RemoveEventHandler", (PyCFunction)EventHandlerRef_RemoveEventHandler, 1, - "() -> None"}, {"AddEventTypesToHandler", (PyCFunction)EventHandlerRef_AddEventTypesToHandler, 1, "(UInt32 inNumTypes, EventTypeSpec inList) -> None"}, {"RemoveEventTypesFromHandler", (PyCFunction)EventHandlerRef_RemoveEventTypesFromHandler, 1, "(UInt32 inNumTypes, EventTypeSpec inList) -> None"}, {NULL, NULL, 0} }; --- 878,909 ---- } + static PyObject *EventHandlerRef_RemoveEventHandler(EventHandlerRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + + OSStatus _err; + if (_self->ob_itself == NULL) { + PyErr_SetString(CarbonEvents_Error, "Handler has been removed"); + return NULL; + } + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _err = RemoveEventHandler(_self->ob_itself); + if (_err != noErr) return PyMac_Error(_err); + _self->ob_itself = NULL; + Py_DECREF(_self->ob_callback); + _self->ob_callback = NULL; + Py_INCREF(Py_None); + _res = Py_None; + return _res; + } + static PyMethodDef EventHandlerRef_methods[] = { {"AddEventTypesToHandler", (PyCFunction)EventHandlerRef_AddEventTypesToHandler, 1, "(UInt32 inNumTypes, EventTypeSpec inList) -> None"}, {"RemoveEventTypesFromHandler", (PyCFunction)EventHandlerRef_RemoveEventTypesFromHandler, 1, "(UInt32 inNumTypes, EventTypeSpec inList) -> None"}, + {"RemoveEventHandler", (PyCFunction)EventHandlerRef_RemoveEventHandler, 1, + "() -> None"}, {NULL, NULL, 0} }; *************** *** 1084,1088 **** if (_err != noErr) return PyMac_Error(_err); ! return Py_BuildValue("O&", EventHandlerRef_New, outRef); } --- 1105,1114 ---- if (_err != noErr) return PyMac_Error(_err); ! _res = EventHandlerRef_New(outRef); ! if (_res != NULL) { ! ((EventHandlerRefObject*)_res)->ob_callback = callback; ! Py_INCREF(callback); ! } ! return _res; } *************** *** 1091,1095 **** "() -> None"}, {"InstallEventHandler", (PyCFunction)EventTargetRef_InstallEventHandler, 1, ! "(EventTargetRef inTarget, EventTypeSpec inSpec, Method callback) -> (EventHandlerRef outRef)"}, {NULL, NULL, 0} }; --- 1117,1121 ---- "() -> None"}, {"InstallEventHandler", (PyCFunction)EventTargetRef_InstallEventHandler, 1, ! "(EventTypeSpec inSpec, Method callback) -> (EventHandlerRef outRef)"}, {NULL, NULL, 0} }; From tim_one@users.sourceforge.net Fri Dec 14 23:16:20 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Fri, 14 Dec 2001 15:16:20 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.336,1.337 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv23258/python/Misc Modified Files: NEWS Log Message: Post-release fiddling -- prep for 2.2 final. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.336 retrieving revision 1.337 diff -C2 -d -r1.336 -r1.337 *** NEWS 2001/12/14 20:44:32 1.336 --- NEWS 2001/12/14 23:16:18 1.337 *************** *** 1,2 **** --- 1,29 ---- + What's New in Python 2.2 final? + Release date: 21-Dec-2001 + =============================== + + Type/class unification and new-style classes + + Core and builtins + + Extension modules + + Library + + Tools/Demos + + Build + + C API + + New platforms + + Tests + + Windows + + Mac + + What's New in Python 2.2c1? Release date: 14-Dec-2001 From tim_one@users.sourceforge.net Fri Dec 14 23:16:20 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Fri, 14 Dec 2001 15:16:20 -0800 Subject: [Python-checkins] CVS: python/dist/src/PCbuild BUILDno.txt,1.25,1.26 python20.wse,1.97,1.98 pythoncore.dsp,1.29,1.30 Message-ID: Update of /cvsroot/python/python/dist/src/PCbuild In directory usw-pr-cvs1:/tmp/cvs-serv23258/python/PCbuild Modified Files: BUILDno.txt python20.wse pythoncore.dsp Log Message: Post-release fiddling -- prep for 2.2 final. Index: BUILDno.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/BUILDno.txt,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** BUILDno.txt 2001/12/13 19:34:00 1.25 --- BUILDno.txt 2001/12/14 23:16:18 1.26 *************** *** 34,37 **** --- 34,39 ---- Windows Python BUILD numbers ---------------------------- + 28 2.2 final + 21-Dec-2001 TENTATIVE 27 2.2c1 14-Dec-2001 Index: python20.wse =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.wse,v retrieving revision 1.97 retrieving revision 1.98 diff -C2 -d -r1.97 -r1.98 *** python20.wse 2001/11/17 00:24:45 1.97 --- python20.wse 2001/12/14 23:16:18 1.98 *************** *** 2,6 **** item: Global Version=8.14 ! Title=Python 2.2 release candidate 1 Flags=00010100 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 --- 2,6 ---- item: Global Version=8.14 ! Title=Python 2.2 Flags=00010100 Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 *************** *** 19,25 **** Patch Threshold=85 Patch Memory=4000 ! EXE Filename=Python-2.2c1.exe Dialogs Version=8 ! Version File=2.2c1 Version Description=Python Programming Language Version Copyright=©2001 Python Software Foundation --- 19,25 ---- Patch Threshold=85 Patch Memory=4000 ! EXE Filename=Python-2.2.exe Dialogs Version=8 ! Version File=2.2 Version Description=Python Programming Language Version Copyright=©2001 Python Software Foundation *************** *** 65,69 **** item: Set Variable Variable=PYVER_STRING ! Value=2.2c1 end item: Remark --- 65,69 ---- item: Set Variable Variable=PYVER_STRING ! Value=2.2 end item: Remark Index: pythoncore.dsp =================================================================== RCS file: /cvsroot/python/python/dist/src/PCbuild/pythoncore.dsp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** pythoncore.dsp 2001/12/13 19:34:00 1.29 --- pythoncore.dsp 2001/12/14 23:16:18 1.30 *************** *** 740,748 **** !IF "$(CFG)" == "pythoncore - Win32 Release" ! # ADD CPP /D BUILD=27 !ELSEIF "$(CFG)" == "pythoncore - Win32 Debug" ! # ADD CPP /D BUILD=27 !ELSEIF "$(CFG)" == "pythoncore - Win32 Alpha Debug" --- 740,748 ---- !IF "$(CFG)" == "pythoncore - Win32 Release" ! # ADD CPP /D BUILD=28 !ELSEIF "$(CFG)" == "pythoncore - Win32 Debug" ! # ADD CPP /D BUILD=28 !ELSEIF "$(CFG)" == "pythoncore - Win32 Alpha Debug" From jackjansen@users.sourceforge.net Sat Dec 15 00:23:18 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 16:23:18 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Build PythonCore.axp,NONE,1.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Build In directory usw-pr-cvs1:/tmp/cvs-serv4641/Python/Mac/Build Added Files: PythonCore.axp Log Message: Finally CW7 allows me to replace the continually-in-need-of-updating exports files with one 6-line anti-export-file. Yeah! (Thanks Alex, for reminding me:-) --- NEW FILE: PythonCore.axp --- __terminate __initialize __start __ptmf_null __vec_longjmp longjmp exit From jackjansen@users.sourceforge.net Sat Dec 15 00:23:29 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 16:23:29 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Build PythonCore.exp,1.22,NONE Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Build In directory usw-pr-cvs1:/tmp/cvs-serv4663/Python/Mac/Build Removed Files: PythonCore.exp Log Message: Finally CW7 allows me to replace the continually-in-need-of-updating exports files with one 6-line anti-export-file. Yeah! (Thanks Alex, for reminding me:-) --- PythonCore.exp DELETED --- From jackjansen@users.sourceforge.net Sat Dec 15 00:23:37 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Fri, 14 Dec 2001 16:23:37 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Build PythonCoreCarbon.exp,1.22,NONE Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Build In directory usw-pr-cvs1:/tmp/cvs-serv4703/Python/Mac/Build Removed Files: PythonCoreCarbon.exp Log Message: Finally CW7 allows me to replace the continually-in-need-of-updating exports files with one 6-line anti-export-file. Yeah! (Thanks Alex, for reminding me:-) --- PythonCoreCarbon.exp DELETED --- From fdrake@users.sourceforge.net Sat Dec 15 03:45:46 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Fri, 14 Dec 2001 19:45:46 -0800 Subject: [Python-checkins] CVS: python/nondist/peps pep-0251.txt,1.8,1.9 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv26622 Modified Files: pep-0251.txt Log Message: Record that the release candidate is out, and update the final release date to allow a full week for testing of the candidate. Index: pep-0251.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0251.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pep-0251.txt 2001/11/17 00:19:37 1.8 --- pep-0251.txt 2001/12/15 03:45:42 1.9 *************** *** 27,32 **** compared to the schedule posted around the release of 2.2a1. ! 19-Dec-2001: 2.2 (final release) ! 12-Dec-2001: 2.2c1 (release candidate) 14-Nov-2001: 2.2b2 [Released] 19-Oct-2001: 2.2b1 [Released] --- 27,32 ---- compared to the schedule posted around the release of 2.2a1. ! 21-Dec-2001: 2.2 (final release) ! 14-Dec-2001: 2.2c1 [Released] (release candidate) 14-Nov-2001: 2.2b2 [Released] 19-Oct-2001: 2.2b1 [Released] From bwarsaw@users.sourceforge.net Sat Dec 15 04:00:32 2001 From: bwarsaw@users.sourceforge.net (Barry Warsaw) Date: Fri, 14 Dec 2001 20:00:32 -0800 Subject: [Python-checkins] CVS: python/nondist/peps pep-0101.txt,1.17,1.18 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv30983 Modified Files: pep-0101.txt Log Message: A few minor additions based on the last go-round. Index: pep-0101.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0101.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** pep-0101.txt 2001/12/14 03:45:47 1.17 --- pep-0101.txt 2001/12/15 04:00:17 1.18 *************** *** 150,157 **** This command should help you: ! % cvs log -rr22a2: | python Tools/scripts/logmerge.py > /tmp/news.txt ! You can then troll through the news.txt file looking for ! interesting things to add to NEWS. ___ Check your NEWS changes into the branch and into the trunk. --- 150,158 ---- This command should help you: ! % cvs log -rr22a1: | python Tools/scripts/logmerge.py > /tmp/news.txt ! IOW, you're printing out all the cvs log entries from the ! previous release until now. You can then troll through the ! news.txt file looking for interesting things to add to NEWS. ___ Check your NEWS changes into the branch and into the trunk. *************** *** 293,299 **** ___ In the python.org web site CVS tree, cd to the X.Y ! subdirectory, and copy index.ht to new-index.ht ! % cd .../pydotorg/2.2 % cp index.ht new-index.ht --- 294,303 ---- ___ In the python.org web site CVS tree, cd to the X.Y ! subdirectory, and copy index.ht to new-index.ht. Be sure to ! do a "cvs update" first! ! % cd .../pydotorg ! % cvs -q up -P -d ! % cd 2.2 % cp index.ht new-index.ht *************** *** 416,419 **** --- 420,425 ---- writable, and group-owned by webmaster. + ___ md5sum the files and make sure they got uploaded intact. + ___ Update the X.Y/bugs.ht file if necessary. It is best to get BDFL input for this step. *************** *** 476,482 **** ___ Edit diffcmd.sh to get rid of files that you know don't have important changes. You're looking for files that have updates ! in the branch that haven't made it to the trunk. If you've ! been diligent about merging changes from the trunk into the ! branch, there shouldn't be many of these files. ___ Edit /tmp/diffcmd.sh, changing all the -r's into -u's. Run --- 482,494 ---- ___ Edit diffcmd.sh to get rid of files that you know don't have important changes. You're looking for files that have updates ! in the branch that haven't made it to the trunk. ! ! Generally you can ignore any changes to the Doc or Mac ! subdirectories, or any changes to Windows related files. The ! sub-RMs for those parts will take care of any necessary merges ! from the branch to the trunk. ! ! If you've been diligent about merging changes from the trunk ! into the branch, there shouldn't be many of these files. ___ Edit /tmp/diffcmd.sh, changing all the -r's into -u's. Run From gvanrossum@users.sourceforge.net Sat Dec 15 05:00:33 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Fri, 14 Dec 2001 21:00:33 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects descrobject.c,2.21,2.22 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv7728 Modified Files: descrobject.c Log Message: SF bug #493561: incorrect format string descrobject.c (Neal Norwitz) %300s should be %.300s, twice. Index: descrobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/descrobject.c,v retrieving revision 2.21 retrieving revision 2.22 diff -C2 -d -r2.21 -r2.22 *** descrobject.c 2001/12/10 18:06:21 2.21 --- descrobject.c 2001/12/15 05:00:30 2.22 *************** *** 109,113 **** return descr->d_getset->get(obj, descr->d_getset->closure); PyErr_Format(PyExc_TypeError, ! "attribute '%300s' of '%.100s' objects is not readable", descr_name((PyDescrObject *)descr), descr->d_type->tp_name); --- 109,113 ---- return descr->d_getset->get(obj, descr->d_getset->closure); PyErr_Format(PyExc_TypeError, ! "attribute '%.300s' of '%.100s' objects is not readable", descr_name((PyDescrObject *)descr), descr->d_type->tp_name); *************** *** 164,168 **** descr->d_getset->closure); PyErr_Format(PyExc_TypeError, ! "attribute '%300s' of '%.100s' objects is not writable", descr_name((PyDescrObject *)descr), descr->d_type->tp_name); --- 164,168 ---- descr->d_getset->closure); PyErr_Format(PyExc_TypeError, ! "attribute '%.300s' of '%.100s' objects is not writable", descr_name((PyDescrObject *)descr), descr->d_type->tp_name); From gvanrossum@users.sourceforge.net Sat Dec 15 18:04:13 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Sat, 15 Dec 2001 10:04:13 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_scope.py,1.23,1.24 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv21646 Modified Files: test_scope.py Log Message: Don't call resetwarnings(). Be more restrictive in what we filter out instead. Index: test_scope.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_scope.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** test_scope.py 2001/12/13 20:00:26 1.23 --- test_scope.py 2001/12/15 18:04:10 1.24 *************** *** 2,6 **** import warnings ! warnings.filterwarnings("ignore", "import *") print "1. simple nesting" --- 2,6 ---- import warnings ! warnings.filterwarnings("ignore", r"import \*", SyntaxWarning, "") print "1. simple nesting" *************** *** 491,496 **** else: print "exec should have failed, because code contained free vars" - - warnings.resetwarnings() print "21. list comprehension with local variables" --- 491,494 ---- From fdrake@users.sourceforge.net Sat Dec 15 18:37:26 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Sat, 15 Dec 2001 10:37:26 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libmpz.tex,1.15,1.16 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv29059/lib Modified Files: libmpz.tex Log Message: Add link to the gmpy project. Index: libmpz.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmpz.tex,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** libmpz.tex 1999/04/22 20:55:59 1.15 --- libmpz.tex 2001/12/15 18:37:24 1.16 *************** *** 97,98 **** --- 97,106 ---- otherwise \exception{ValueError} will be raised. \end{methoddesc} + + + \begin{seealso} + \seetitle[http://gmpy.sourceforge.net/]{General Multiprecision Python}{ + This project is building new numeric types to allow + arbitrary-precision arithmetic in Python. Their first + efforts are also based on the GNU MP library.} + \end{seealso} From tim.one@home.com Sat Dec 15 19:23:03 2001 From: tim.one@home.com (Tim Peters) Date: Sat, 15 Dec 2001 14:23:03 -0500 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libmpz.tex,1.15,1.16 In-Reply-To: Message-ID: > Modified Files: > libmpz.tex > Log Message: > Add link to the gmpy project. Should also add a link then to Marc-Andre's mxNumber package (also a GMP wrapper for Python): http://www.lemburg.com/files/python/mxNumber.html From fdrake@users.sourceforge.net Sat Dec 15 20:37:45 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Sat, 15 Dec 2001 12:37:45 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libmpz.tex,1.16,1.17 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv18680/lib Modified Files: libmpz.tex Log Message: Add a link to the mxNumber package. Index: libmpz.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmpz.tex,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** libmpz.tex 2001/12/15 18:37:24 1.16 --- libmpz.tex 2001/12/15 20:37:40 1.17 *************** *** 104,106 **** --- 104,111 ---- arbitrary-precision arithmetic in Python. Their first efforts are also based on the GNU MP library.} + + \seetitle[http://www.egenix.com/files/python/mxNumber.html]{mxNumber + --- Extended Numeric Types for Python}{Another wrapper + around the GNU MP library, including a port of that + library to Windows.} \end{seealso} From fdrake@users.sourceforge.net Sat Dec 15 20:39:03 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Sat, 15 Dec 2001 12:39:03 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libmpz.tex,1.15,1.15.12.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv18918/lib Modified Files: Tag: release21-maint libmpz.tex Log Message: Add a links to the gmpy and mxNumber packages. Index: libmpz.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libmpz.tex,v retrieving revision 1.15 retrieving revision 1.15.12.1 diff -C2 -d -r1.15 -r1.15.12.1 *** libmpz.tex 1999/04/22 20:55:59 1.15 --- libmpz.tex 2001/12/15 20:39:01 1.15.12.1 *************** *** 97,98 **** --- 97,111 ---- otherwise \exception{ValueError} will be raised. \end{methoddesc} + + + \begin{seealso} + \seetitle[http://gmpy.sourceforge.net/]{General Multiprecision Python}{ + This project is building new numeric types to allow + arbitrary-precision arithmetic in Python. Their first + efforts are also based on the GNU MP library.} + + \seetitle[http://www.egenix.com/files/python/mxNumber.html]{mxNumber + --- Extended Numeric Types for Python}{Another wrapper + around the GNU MP library, including a port of that + library to Windows.} + \end{seealso} From fdrake@users.sourceforge.net Sat Dec 15 20:42:54 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Sat, 15 Dec 2001 12:42:54 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcgihttp.tex,1.5.4.1,1.5.4.2 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv19672/lib Modified Files: Tag: release21-maint libcgihttp.tex Log Message: Remove extraneous "}"; possibly an incorrectly backported patch? Index: libcgihttp.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcgihttp.tex,v retrieving revision 1.5.4.1 retrieving revision 1.5.4.2 diff -C2 -d -r1.5.4.1 -r1.5.4.2 *** libcgihttp.tex 2001/11/19 05:22:44 1.5.4.1 --- libcgihttp.tex 2001/12/15 20:42:52 1.5.4.2 *************** *** 17,21 **** \strong{Note:} This module can run CGI scripts on \UNIX{} and Windows systems; on Mac OS it will only be able to run Python scripts within ! the same process as itself.} The \module{CGIHTTPServer} module defines the following class: --- 17,21 ---- \strong{Note:} This module can run CGI scripts on \UNIX{} and Windows systems; on Mac OS it will only be able to run Python scripts within ! the same process as itself. The \module{CGIHTTPServer} module defines the following class: From tim_one@users.sourceforge.net Sat Dec 15 22:12:49 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Sat, 15 Dec 2001 14:12:49 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-riscos riscospath.py,1.7,1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/plat-riscos In directory usw-pr-cvs1:/tmp/cvs-serv3621/python/Lib/plat-riscos Modified Files: riscospath.py Log Message: SF patch 493739 2 Bugfixes for 2.2c1 (RISC OS specific), from Dietmar Schwertberger. Bugfix candidate. """ RISCOS/Modules/getpath_riscos.c: Include trailing '\0' when using strncpy [copy strlen(...)+1 characters]. Lib/plat-riscos/riscospath.py: Use riscosmodule.expand for os.path.abspath. [fixes problems with site.py where abspath("") returned join(os.getcwd(), "") as e.g. "SCSI::SCSI4.$." because "" wasn't recognised as an absolute path.] """ Index: riscospath.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/plat-riscos/riscospath.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** riscospath.py 2001/10/24 20:33:34 1.7 --- riscospath.py 2001/12/15 22:12:47 1.8 *************** *** 312,319 **** ! # Return an absolute path. ! ! def abspath(p): ! return normpath(join(os.getcwd(), p)) --- 312,317 ---- ! # Return an absolute path. RISC OS' osfscontrol_canonicalise_path does this among others ! abspath = os.expand From tim_one@users.sourceforge.net Sat Dec 15 22:12:49 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Sat, 15 Dec 2001 14:12:49 -0800 Subject: [Python-checkins] CVS: python/dist/src/RISCOS/Modules getpath_riscos.c,1.4,1.5 Message-ID: Update of /cvsroot/python/python/dist/src/RISCOS/Modules In directory usw-pr-cvs1:/tmp/cvs-serv3621/python/RISCOS/Modules Modified Files: getpath_riscos.c Log Message: SF patch 493739 2 Bugfixes for 2.2c1 (RISC OS specific), from Dietmar Schwertberger. Bugfix candidate. """ RISCOS/Modules/getpath_riscos.c: Include trailing '\0' when using strncpy [copy strlen(...)+1 characters]. Lib/plat-riscos/riscospath.py: Use riscosmodule.expand for os.path.abspath. [fixes problems with site.py where abspath("") returned join(os.getcwd(), "") as e.g. "SCSI::SCSI4.$." because "" wasn't recognised as an absolute path.] """ Index: getpath_riscos.c =================================================================== RCS file: /cvsroot/python/python/dist/src/RISCOS/Modules/getpath_riscos.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** getpath_riscos.c 2001/11/28 21:30:04 1.4 --- getpath_riscos.c 2001/12/15 22:12:47 1.5 *************** *** 12,16 **** module_search_path = malloc(pathlen + 1); if (module_search_path) ! strncpy(module_search_path, pypath, pathlen); else { fprintf(stderr, --- 12,16 ---- module_search_path = malloc(pathlen + 1); if (module_search_path) ! strncpy(module_search_path, pypath, pathlen + 1); else { fprintf(stderr, From fdrake@users.sourceforge.net Sat Dec 15 22:24:08 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Sat, 15 Dec 2001 14:24:08 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools/sgmlconv conversion.xml,1.24,1.25 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/tools/sgmlconv In directory usw-pr-cvs1:/tmp/cvs-serv6096/tools/sgmlconv Modified Files: conversion.xml Log Message: Update to reflect recently added markup. Index: conversion.xml =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/sgmlconv/conversion.xml,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** conversion.xml 2001/11/30 19:06:18 1.24 --- conversion.xml 2001/12/15 22:24:06 1.25 *************** *** 62,65 **** --- 62,74 ---- + + + + + + + + + --- 399,413 ---- CacheSubprojectstrue UseThirdPartyDebuggerfalse ! DebuggerAppPath ! Path ! PathFormatGeneric ! PathRootAbsolute ! ! DebuggerCmdLineArgs ! DebuggerWorkingDir ! Path ! PathFormatGeneric ! PathRootAbsolute ! *************** *** 411,533 **** CacheSymbolicstrue TempBPFunctionNamemain ! TempBPTypefalse ! Remote Debug ! 00030000002E680044726167055AF500055C7EA0000000000000030005D8AFC0 ! 726F6365737365732E680051055AF50073637265656E2E680049636F6E732E68 ! 00436F6465467261676D656E74732E680054657874456469742E6800436F6E74 ! 726F6C732E680070796D6163746F6F6C626F782E68004D656D6F72792E68004C ! 697374732E68004D6F766965732E6800496D616765436F6D7072657373696F6E ! 2E68004572726F72732E6800447261674C6962004D6F65733A53576465763A4A ! 61636B3A47555349323A696E636C7564653A7379733A004D6F65733A53576465 ! 763A4A61636B3A47555349323A696E636C7564653A6D616368696E653A003A73 ! 79733A730061742E6800737461742E6800000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 055BEB10AB00000400000790002F9B440000000000000001000000000000000F ! 00000002000000000000001C0000000300000000000000290000000400000000 ! 0000003700000005000000000000003E00000006000000000000004500000007 ! 0000000000000056000000080000000000000065000000090000000000000070 ! 0000000A00000000000000710000000B00000000000000860000000C00000000 ! 000000AA0000000D00000000000000B50000000E00000000000000C00000000F ! 00000000000000C80000001000000000000000EB0000001100000000000000F8 ! 00000012000000000000010F0000001300000000000001170000001400000000 ! 0000012900000015000000000000014200000016000000000000014C00000017 ! 000000000000016600000018000000000000016F00000019000000000000017C ! 0000001A00000000000001850000001B000000000000018E0000001C00000000 ! 000001970000001D000000000000019F0000001E00000000000001AC0000001F ! 00000000000001B90000002000000000000001C10000002100000000000001C8 ! 000000220000 ! ! Auto-target ! 00010000 ! ! ! ! CustomColor1 ! Red0 ! Green39321 ! Blue0 ! ! CustomColor2 ! Red0 ! Green32767 ! Blue0 ! ! CustomColor3 ! Red0 ! Green32767 ! Blue0 ! ! CustomColor4 ! Red0 ! Green32767 ! Blue0 ! ! ! ! MWCodeGen_68K_codesizeSmart ! MWCodeGen_68K_structalignmentMC68K ! MWCodeGen_68K_fp_modeSANE ! MWCodeGen_68K_code680200 ! MWCodeGen_68K_profiler0 ! MWCodeGen_68K_mpwc0 ! MWCodeGen_68K_fourbyteints0 ! MWCodeGen_68K_IEEEdoubles0 ! MWCodeGen_68K_fardata0 ! MWCodeGen_68K_farvtables0 ! MWCodeGen_68K_farstrings0 ! MWCodeGen_68K_pcrelstrings0 ! MWCodeGen_68K_macsbugNew ! MWCodeGen_68K_a6frames1 ! ! ! MWDisassembler_68K_showcode1 ! MWDisassembler_68K_mix0 ! MWDisassembler_68K_nohex0 ! MWDisassembler_68K_showdata1 ! MWDisassembler_68K_showexceptions1 ! MWDisassembler_68K_showsym0 ! MWDisassembler_68K_shownames1 ! ! GlobalOptimizer_68K_optimizationlevelLevel0 ! GlobalOptimizer_68K_optforSpeed ! ! MWLinker_68K_linksym1 ! MWLinker_68K_symfullpath1 ! MWLinker_68K_linksingle0 ! MWLinker_68K_fastlink1 ! MWLinker_68K_generateMap0 ! MWLinker_68K_nolinkwarnings0 ! MWLinker_68K_glueintosegone1 ! MWLinker_68K_dontdeadstripinitcode0 - - MWProject_68K_typeApplication - MWProject_68K_outfile - MWProject_68K_symfilename - MWProject_68K_filecreator1061109567 - MWProject_68K_filetype1095782476 - MWProject_68K_size384 - MWProject_68K_flags22656 - MWProject_68K_rsrcheaderStandard - MWProject_68K_rsrcname - MWProject_68K_rsrctype1061109567 - MWProject_68K_rsrcid0 - MWProject_68K_rsrcmulti0 - MWProject_68K_rsrcstore0 - MWProject_68K_rsrcmerge0 - MWProject_68K_rsrcflags0 - MWProject_68K_a40 - MWProject_68K_minsize384 - MWProject_68K_rsrcsegtype0 - MWProject_68K_cfm68kcodegen0 - MWProject_68K_stacksize0 - MWProject_68K_thedebugger0 - MWProject_68K_rsrc_custom0 - MWProject_68K_is_rseg_app0 - MWProject_68K_is_pilot_lib0 - MWProject_68K_pilot_main_entry --- 426,441 ---- CacheSymbolicstrue TempBPFunctionNamemain ! TempBPType0 ! ! Enabledfalse ! ConnectionName ! DownloadPath ! LaunchRemoteAppfalse ! RemoteAppPath ! ! OtherExecutables *************** *** 574,699 **** MWWarning_C_warn_structclass0 - - MWCFM68K_exportsNone - MWCFM68K_olddefversion0 - MWCFM68K_oldimpversion0 - MWCFM68K_currentversion0 - MWCFM68K_farthreshold256 - PCFM68K_sharedata0 - MWCFM68K_fragmentname - MWCFM68K_initname - MWCFM68K_mainname__start - MWCFM68K_termname - MWCFM68K_libfolder0 - MWCFM68K_alignmentAlign_2 - - - MWFTP_Post_hostName - MWFTP_Post_username - MWFTP_Post_password0C¤à - MWFTP_Post_remoteDir - MWFTP_Post_ftp_PathVersion0 - MWFTP_Post_ftp_PathType0 - MWFTP_Post_ftp_PathFormat0 - MWFTP_Post_ftp_tree - MWFTP_Post_uploadDir - MWFTP_Post_ftp_port21 - MWFTP_Post_SendBin1 - MWFTP_Post_ShouldLog1 - - - MWCommandLine_Java_clsName - MWCommandLine_Java_args - - - MWJava_Language_optimizefalse - MWJava_Language_warnDeprecatedfalse - MWJava_Language_emitMapfalse - MWJava_Language_strictFileNamesfalse - MWJava_Language_strictFileHierarchyfalse - MWJava_Language_1_1_Compatiblefalse - MWJava_Language_emitHeaders0 - MWJava_Language_headerTypeJNINativeHeaders - MWJava_Language_packageFilter - MWJava_Language_genCommentstrue - MWJava_Language_genHeadersfalse - - - MWJava_MRJAppBuilder_outFileMRJApplication - MWJava_MRJAppBuilder_mergefalse - MWJava_MRJAppBuilder_quitMenutrue - MWJava_MRJAppBuilder_growfalse - MWJava_MRJAppBuilder_stdoutTypeConsole - MWJava_MRJAppBuilder_stderrTypeConsole - MWJava_MRJAppBuilder_stdinTypeConsole - MWJava_MRJAppBuilder_appIconPVersion0 - MWJava_MRJAppBuilder_appIconPType0 - MWJava_MRJAppBuilder_appIconPFormat0 - MWJava_MRJAppBuilder_appIconPTree - MWJava_MRJAppBuilder_appIconFile - MWJava_MRJAppBuilder_splashScreenPVersion0 - MWJava_MRJAppBuilder_splashScreenPType0 - MWJava_MRJAppBuilder_splashScreenPFormat0 - MWJava_MRJAppBuilder_splashScreenPTree - MWJava_MRJAppBuilder_splashScreenPICTFile - MWJava_MRJAppBuilder_aboutName - MWJava_MRJAppBuilder_stdoutPVersion0 - MWJava_MRJAppBuilder_stdoutPType0 - MWJava_MRJAppBuilder_stdoutPFormat0 - MWJava_MRJAppBuilder_stdoutPTree - MWJava_MRJAppBuilder_stdoutFile - MWJava_MRJAppBuilder_stdoutAppendfalse - MWJava_MRJAppBuilder_stderrPType0 - MWJava_MRJAppBuilder_stderrPFormat0 - MWJava_MRJAppBuilder_stderrPTree - MWJava_MRJAppBuilder_stderrFile - MWJava_MRJAppBuilder_stderrAppendfalse - MWJava_MRJAppBuilder_stdinPType0 - MWJava_MRJAppBuilder_stdinPFormat0 - MWJava_MRJAppBuilder_stdinPTree - MWJava_MRJAppBuilder_stdinFile - - - MWJava_Output_outputtypeJarFile - MWJava_Output_outfileJavaClasses.jar - MWJava_Output_ftype1514754080 - MWJava_Output_fcreator1297570384 - MWJava_Output_compress0 - MWJava_Output_genManifest0 - MWJava_Output_trunctypeFront - MWJava_Output_deleteClasses0 - MWJava_Output_consoleApp1 - - - MWJava_Proj_projtypeApplet - MWJava_Proj_mainClassName - MWJava_Proj_HTMLAppCreator1463898714 - MWJava_Proj_HTMLAppName - MWJava_Proj_PathVersion0 - MWJava_Proj_PathType0 - MWJava_Proj_PathFormat0 - MWJava_Proj_tree - MWJava_Proj_HTMLAppWin32Name - MWJava_Proj_compress0 - MWJava_Proj_useVM1 - MWJava_Proj_vmarguments - MWJava_Proj_vmName - - - MWJavaDoc_Proj_Version1 - MWJavaDoc_Proj_Depricated1 - MWJavaDoc_Proj_Author1 - MWJavaDoc_Proj_Index1 - MWJavaDoc_Proj_Tree1 - MWJavaDoc_Proj_SunResolveToSame0 - MWJavaDoc_Proj_Shortnames1 - MWJavaDoc_Proj_Folder0 - MWJavaDoc_Proj_GenerateAPILinks0 - MWJavaDoc_Proj_scopePublic - MWJavaDoc_Proj_fcreator1297303877 - MWJavaDoc_Proj_encodingName - MWJavaDoc_Proj_decodingName - MWJavaDoc_Proj_javaPackagePathhttp://java.sun.com/products/jdk/1.1/docs/api/ - MWMerge_MacOS_projectTypeApplication --- 482,485 ---- *************** *** 704,707 **** --- 490,500 ---- MWMerge_MacOS_copyFragments1 MWMerge_MacOS_copyResources1 + MWMerge_MacOS_flattenResource0 + MWMerge_MacOS_flatFileNamea.rsrc + MWMerge_MacOS_flatFileOutputPath + Path: + PathFormatMacOS + PathRootProject + MWMerge_MacOS_skipResources *************** *** 711,778 **** ! ! FileLockedfalse ! ResourcesMapIsReadOnlyfalse ! PrinterDriverIsMultiFinderCompatiblefalse ! Invisiblefalse ! HasBundlefalse ! NameLockedfalse ! Stationeryfalse ! HasCustomIconfalse ! Sharedfalse ! HasBeenInitedfalse ! Label0 ! Comments ! Packager Panel ! 000100003F3F3F3F4150504C055C0001005CB8F0000000000000061005D8AFC0 ! 01000079000000000000008F055CAFD054455854435749450100020000000000 ! B5ACBD0600000000000000000000000000000000000000000000000000000000 ! 000001680000000C000000031000000000000000000000000000000000000000 ! 000000000100007A00000000000000900000000E544558544357494501000200 ! 00000000B5ACBD06000000000000000000000000000000000000000000000000 ! 00000000000001680000000C0000000310000000000000000000000000000000 ! 00000000000000000100007B00000000000000910000000E5445585443574945 ! 0100020000000000B5ACBD080000000000000000000000000000000000000000 ! 0000000000000000000001680000000C00000003100000000000000000000000 ! 0000000000000000000000000100007C00000000000000920000000E54455854 ! 435749450100020000000000B5ACBD0600000000000000000000000000000000 ! 000000000000000000000000000001680000000C000000031000000000000000 ! 000000000000000000000000000000000100007D000000000000009300000009 ! 54455854435749450000020000000000B65AFA69000000000000000000000000 ! 00000000000000000000000000000000000001680000000C0000000310000000 ! 00000000000000000000000000000000000000000100007E0000000000000094 ! 0000000E54455854435749450100020000000000B5ACBD070000000000000000 ! 0000000000000000000000000000000000000000000001680000000C00000003 ! 1000000000000000000000000000000000000000000000000100007F00000000 ! 000000950000000E54455854435749450100020000000000B5ACBD0700000000 ! 000000000000000000000000000000000000000000000000000001680000000C ! 0000000310000000000000000000000000000000000000000000000001000080 ! 00000000000000960000000E54455854435749450100020000000000B5ACBD07 ! 0000000000000000000000000000000000000001000000000000000000000168 ! 0000000C00000003100000000000000000000000000000000000000000000000 ! 0100008100000000000000970000000E54455854435749450100020000000000 ! B5ACBD0700000000000000000000000000000000000000000000000000000000 ! 000001680000000C000000031000000000000000000000000000000000000000 ! 000000000100008200000000000000980000000E544558544357494501000200 ! 00000000B5ACBD06000000000000000000000000000000000000000000000000 ! 00000000000001680000000C0000000310000000000000000000000000000000 ! 000000000000000001000083010000040000009900000004737475624D505320 ! 0100020000000000B5ACBC68B5ACBC6800000000000000000000000000000000 ! 0000000000000000000001000000040C00000008000000000000000000000000 ! 0000000000000000B650822901000084000000000000009D0000000B54455854 ! 435749450100020000000000B4AA816A00000000000000000000000000000000 ! 000000000000000000000000000001080000000C000000031000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000 ! --- 504,524 ---- ! ! MWMacOSPackager_UsePackager0 ! MWMacOSPackager_FolderToPackage ! Path: ! PathFormatMacOS ! PathRootProject ! ! MWMacOSPackager_CreateClassicAlias0 ! MWMacOSPackager_ClassicAliasMethodUseTargetOutput ! MWMacOSPackager_ClassicAliasPath ! Path: ! PathFormatMacOS ! PathRootProject ! ! MWMacOSPackager_CreatePkgInfo0 ! MWMacOSPackager_PkgCreatorType???? ! MWMacOSPackager_PkgFileTypeAPPL *************** *** 865,954 **** MWRez_Language_prefixname MWRez_Language_filteredtypes'CODE' 'DATA' 'PICT' - - - MWWinRC_prefixname - - - MWCodeGen_X86_processorGeneric - MWCodeGen_X86_alignmentbytes8 - MWCodeGen_X86_exceptionsZeroOverhead - MWCodeGen_X86_extinst_mmx0 - MWCodeGen_X86_extinst_3dnow0 - MWCodeGen_X86_use_mmx_3dnow_convention0 - MWCodeGen_X86_machinecodelisting0 - MWCodeGen_X86_intrinsics0 - MWCodeGen_X86_syminfo0 - MWCodeGen_X86_codeviewinfo1 - MWCodeGen_X86_extinst_cmov_fcomi0 - MWCodeGen_X86_extinst_sse0 - - - PDisasmX86_showHeaderstrue - PDisasmX86_showSymTabtrue - PDisasmX86_showCodetrue - PDisasmX86_showSourcefalse - PDisasmX86_showHextrue - PDisasmX86_showRelocationtrue - PDisasmX86_showCommentsfalse - PDisasmX86_showDebugfalse - PDisasmX86_showExceptionsfalse - PDisasmX86_showDatatrue - PDisasmX86_showRawfalse - PDisasmX86_verbosefalse - - - MWDebugger_X86_Exceptions - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - - GlobalOptimizer_X86_optimizationlevelLevel0 - GlobalOptimizer_X86_optforSpeed - - - MWLinker_X86_entrypointusageDefault - MWLinker_X86_entrypoint - MWLinker_X86_subsystemWinGUI - MWLinker_X86_subsysmajorid4 - MWLinker_X86_subsysminorid0 - MWLinker_X86_usrmajorid0 - MWLinker_X86_usrminorid0 - MWLinker_X86_commandfile - MWLinker_X86_generatemap0 - MWLinker_X86_linksym0 - MWLinker_X86_linkCV1 - - - MWProject_X86_typeApplication - MWProject_X86_outfilenoname.exe - MWProject_X86_baseaddress4194304 - MWProject_X86_maxstacksize1024 - MWProject_X86_minstacksize4 - MWProject_X86_size1024 - MWProject_X86_minsize4 - MWProject_X86_importlib --- 611,614 ---- *************** *** 956,960 **** Name ! MSL ShLibRuntime.Lib MacOS Library --- 616,620 ---- Name ! MSL_ShLibRuntime_PPC.Lib MacOS Library *************** *** 988,992 **** Name ! MSL ShLibRuntime.Lib MacOS --- 648,652 ---- Name ! MSL_ShLibRuntime_PPC.Lib MacOS *************** *** 1029,1033 **** %(mac_targetname)s Name ! MSL ShLibRuntime.Lib MacOS --- 689,693 ---- %(mac_targetname)s Name ! MSL_ShLibRuntime_PPC.Lib MacOS From jackjansen@users.sourceforge.net Wed Dec 19 15:10:45 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 07:10:45 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Lib/mkcwproject/template-ppc template.prj.xml,1.3,1.3.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Lib/mkcwproject/template-ppc In directory usw-pr-cvs1:/tmp/cvs-serv12554/Lib/mkcwproject/template-ppc Modified Files: Tag: r22rc1-branch template.prj.xml Log Message: Merged Mac subtree into the 22c1 branch. Index: template.prj.xml =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Lib/mkcwproject/template-ppc/template.prj.xml,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** template.prj.xml 2001/11/30 14:16:31 1.3 --- template.prj.xml 2001/12/19 15:10:13 1.3.2.1 *************** *** 1,9 **** ! ! ! --- 1,10 ---- ! ! ! ! *************** *** 33,41 **** ! ! --- 34,46 ---- ! ! ! ! ! ! *************** *** 47,50 **** --- 52,56 ---- ]> + *************** *** 56,84 **** UserSourceTrees - - CustomColor1 - Red0 - Green39321 - Blue0 - - CustomColor2 - Red0 - Green32767 - Blue0 - - CustomColor3 - Red0 - Green32767 - Blue0 - - CustomColor4 - Red0 - Green32767 - Blue0 - - AlwaysSearchUserPathstrue InterpretDOSAndUnixPathstrue UserSearchPaths --- 62,69 ---- UserSourceTrees AlwaysSearchUserPathstrue InterpretDOSAndUnixPathstrue + RequireFrameworkStyleIncludesfalse UserSearchPaths *************** *** 405,444 **** CacheSubprojectstrue UseThirdPartyDebuggerfalse ! DebuggerCommandLine ! Debugger Runtime ! 0002000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 0000000000000000000000000000000000000000000000000000000000000000 ! 00000000000000000000000000000000 ! --- 390,404 ---- CacheSubprojectstrue UseThirdPartyDebuggerfalse ! DebuggerAppPath ! Path ! PathFormatGeneric ! PathRootAbsolute ! ! DebuggerCmdLineArgs ! DebuggerWorkingDir ! Path ! PathFormatGeneric ! PathRootAbsolute ! *************** *** 457,527 **** CacheSymbolicstrue TempBPFunctionNamemain ! TempBPTypefalse ! ! ! MWCodeGen_68K_codesizeSmart ! MWCodeGen_68K_structalignmentMC68K ! MWCodeGen_68K_fp_modeSANE ! MWCodeGen_68K_code680200 ! MWCodeGen_68K_profiler0 ! MWCodeGen_68K_mpwc0 ! MWCodeGen_68K_fourbyteints0 ! MWCodeGen_68K_IEEEdoubles0 ! MWCodeGen_68K_fardata0 ! MWCodeGen_68K_farvtables0 ! MWCodeGen_68K_farstrings0 ! MWCodeGen_68K_pcrelstrings0 ! MWCodeGen_68K_macsbugNew ! MWCodeGen_68K_a6frames1 ! ! ! MWDisassembler_68K_showcode1 ! MWDisassembler_68K_mix0 ! MWDisassembler_68K_nohex0 ! MWDisassembler_68K_showdata1 ! MWDisassembler_68K_showexceptions1 ! MWDisassembler_68K_showsym0 ! MWDisassembler_68K_shownames1 ! ! GlobalOptimizer_68K_optimizationlevelLevel0 ! GlobalOptimizer_68K_optforSpeed ! ! MWLinker_68K_linksym1 ! MWLinker_68K_symfullpath1 ! MWLinker_68K_linksingle0 ! MWLinker_68K_fastlink1 ! MWLinker_68K_generateMap0 ! MWLinker_68K_nolinkwarnings0 ! MWLinker_68K_glueintosegone1 ! MWLinker_68K_dontdeadstripinitcode0 - - MWProject_68K_typeApplication - MWProject_68K_outfile - MWProject_68K_symfilename - MWProject_68K_filecreator1061109567 - MWProject_68K_filetype1095782476 - MWProject_68K_size384 - MWProject_68K_flags22656 - MWProject_68K_rsrcheaderStandard - MWProject_68K_rsrcname - MWProject_68K_rsrctype1061109567 - MWProject_68K_rsrcid0 - MWProject_68K_rsrcmulti0 - MWProject_68K_rsrcstore0 - MWProject_68K_rsrcmerge0 - MWProject_68K_rsrcflags0 - MWProject_68K_a40 - MWProject_68K_minsize384 - MWProject_68K_rsrcsegtype0 - MWProject_68K_cfm68kcodegen0 - MWProject_68K_stacksize0 - MWProject_68K_thedebugger0 - MWProject_68K_rsrc_custom0 - MWProject_68K_is_rseg_app0 - MWProject_68K_is_pilot_lib0 - MWProject_68K_pilot_main_entry --- 417,432 ---- CacheSymbolicstrue TempBPFunctionNamemain ! TempBPType0 ! ! Enabledfalse ! ConnectionName ! DownloadPath ! LaunchRemoteAppfalse ! RemoteAppPath ! ! OtherExecutables *************** *** 568,585 **** MWWarning_C_warn_structclass0 - - MWCFM68K_exportsNone - MWCFM68K_olddefversion0 - MWCFM68K_oldimpversion0 - MWCFM68K_currentversion0 - MWCFM68K_farthreshold256 - PCFM68K_sharedata0 - MWCFM68K_fragmentname - MWCFM68K_initname - MWCFM68K_mainname__start - MWCFM68K_termname - MWCFM68K_libfolder0 - MWCFM68K_alignmentAlign_2 - MWMerge_MacOS_projectTypeApplication --- 473,476 ---- *************** *** 590,593 **** --- 481,491 ---- MWMerge_MacOS_copyFragments1 MWMerge_MacOS_copyResources1 + MWMerge_MacOS_flattenResource0 + MWMerge_MacOS_flatFileNamea.rsrc + MWMerge_MacOS_flatFileOutputPath + Path: + PathFormatMacOS + PathRootProject + MWMerge_MacOS_skipResources *************** *** 597,600 **** --- 495,516 ---- + + MWMacOSPackager_UsePackager0 + MWMacOSPackager_FolderToPackage + Path: + PathFormatMacOS + PathRootProject + + MWMacOSPackager_CreateClassicAlias0 + MWMacOSPackager_ClassicAliasMethodUseTargetOutput + MWMacOSPackager_ClassicAliasPath + Path: + PathFormatMacOS + PathRootProject + + MWMacOSPackager_CreatePkgInfo0 + MWMacOSPackager_PkgCreatorType???? + MWMacOSPackager_PkgFileTypeAPPL + MWCodeGen_PPC_structalignmentPPC *************** *** 691,695 **** Name ! MSL ShLibRuntime.Lib MacOS Library --- 607,611 ---- Name ! MSL_ShLibRuntime_PPC.Lib MacOS Library *************** *** 730,734 **** Name ! MSL ShLibRuntime.Lib MacOS --- 646,650 ---- Name ! MSL_ShLibRuntime_PPC.Lib MacOS *************** *** 776,780 **** %(mac_targetname)s Name ! MSL ShLibRuntime.Lib MacOS --- 692,696 ---- %(mac_targetname)s Name ! MSL_ShLibRuntime_PPC.Lib MacOS From jackjansen@users.sourceforge.net Wed Dec 19 15:10:46 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 07:10:46 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/cg _CGmodule.c,1.2,1.2.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/cg In directory usw-pr-cvs1:/tmp/cvs-serv12554/Modules/cg Modified Files: Tag: r22rc1-branch _CGmodule.c Log Message: Merged Mac subtree into the 22c1 branch. Index: _CGmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cg/_CGmodule.c,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** _CGmodule.c 2001/12/13 13:40:04 1.2 --- _CGmodule.c 2001/12/19 15:10:14 1.2.2.1 *************** *** 6,11 **** --- 6,15 ---- + #ifdef _WIN32 + #include "pywintoolbox.h" + #else #include "macglue.h" #include "pymactoolbox.h" + #endif /* Macro to test whether a weak-loaded CFM function exists */ From jackjansen@users.sourceforge.net Wed Dec 19 15:10:46 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 07:10:46 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/cm _Cmmodule.c,1.5,1.5.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/cm In directory usw-pr-cvs1:/tmp/cvs-serv12554/Modules/cm Modified Files: Tag: r22rc1-branch _Cmmodule.c Log Message: Merged Mac subtree into the 22c1 branch. Index: _Cmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cm/_Cmmodule.c,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** _Cmmodule.c 2001/12/08 18:02:52 1.5 --- _Cmmodule.c 2001/12/19 15:10:14 1.5.2.1 *************** *** 6,11 **** --- 6,15 ---- + #ifdef _WIN32 + #include "pywintoolbox.h" + #else #include "macglue.h" #include "pymactoolbox.h" + #endif /* Macro to test whether a weak-loaded CFM function exists */ *************** *** 403,406 **** --- 407,444 ---- } + static PyObject *CmpObj_ResolveComponentAlias(ComponentObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + Component _rv; + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = ResolveComponentAlias(_self->ob_itself); + _res = Py_BuildValue("O&", + CmpObj_New, _rv); + return _res; + } + + static PyObject *CmpObj_GetComponentPublicIndString(ComponentObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + OSErr _err; + Str255 theString; + short strListID; + short index; + if (!PyArg_ParseTuple(_args, "O&hh", + PyMac_GetStr255, theString, + &strListID, + &index)) + return NULL; + _err = GetComponentPublicIndString(_self->ob_itself, + theString, + strListID, + index); + if (_err != noErr) return PyMac_Error(_err); + Py_INCREF(Py_None); + _res = Py_None; + return _res; + } + static PyObject *CmpObj_GetComponentRefcon(ComponentObject *_self, PyObject *_args) { *************** *** 484,499 **** } - static PyObject *CmpObj_ResolveComponentAlias(ComponentObject *_self, PyObject *_args) - { - PyObject *_res = NULL; - Component _rv; - if (!PyArg_ParseTuple(_args, "")) - return NULL; - _rv = ResolveComponentAlias(_self->ob_itself); - _res = Py_BuildValue("O&", - CmpObj_New, _rv); - return _res; - } - static PyObject *CmpObj_CountComponentInstances(ComponentObject *_self, PyObject *_args) { --- 522,525 ---- *************** *** 574,577 **** --- 600,607 ---- {"OpenComponent", (PyCFunction)CmpObj_OpenComponent, 1, "() -> (ComponentInstance _rv)"}, + {"ResolveComponentAlias", (PyCFunction)CmpObj_ResolveComponentAlias, 1, + "() -> (Component _rv)"}, + {"GetComponentPublicIndString", (PyCFunction)CmpObj_GetComponentPublicIndString, 1, + "(Str255 theString, short strListID, short index) -> None"}, {"GetComponentRefcon", (PyCFunction)CmpObj_GetComponentRefcon, 1, "() -> (long _rv)"}, *************** *** 584,589 **** {"GetComponentIndString", (PyCFunction)CmpObj_GetComponentIndString, 1, "(Str255 theString, short strListID, short index) -> None"}, - {"ResolveComponentAlias", (PyCFunction)CmpObj_ResolveComponentAlias, 1, - "() -> (Component _rv)"}, {"CountComponentInstances", (PyCFunction)CmpObj_CountComponentInstances, 1, "() -> (long _rv)"}, --- 614,617 ---- From jackjansen@users.sourceforge.net Wed Dec 19 15:10:46 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 07:10:46 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/carbonevt CarbonEvtscan.py,1.3,1.3.2.1 CarbonEvtsupport.py,1.6,1.6.2.1 _CarbonEvtmodule.c,1.3,1.3.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/carbonevt In directory usw-pr-cvs1:/tmp/cvs-serv12554/Modules/carbonevt Modified Files: Tag: r22rc1-branch CarbonEvtscan.py CarbonEvtsupport.py _CarbonEvtmodule.c Log Message: Merged Mac subtree into the 22c1 branch. Index: CarbonEvtscan.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/carbonevt/CarbonEvtscan.py,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** CarbonEvtscan.py 2001/12/12 20:48:53 1.3 --- CarbonEvtscan.py 2001/12/19 15:10:13 1.3.2.1 *************** *** 42,52 **** if arglist: t, n, m = arglist[0] - print "*********", t, if t in RefObjectTypes and m == "InMode": ! print "method" ! classname = "CarbonEventsMethod" listname = t + "methods" ! else: ! print "not method" return classname, listname --- 42,53 ---- if arglist: t, n, m = arglist[0] if t in RefObjectTypes and m == "InMode": ! if t == "EventHandlerRef": ! classname = "EventHandlerRefMethod" ! else: ! classname = "CarbonEventsMethod" listname = t + "methods" ! #else: ! # print "not method" return classname, listname *************** *** 83,86 **** --- 84,88 ---- # Wrote by hand "InstallEventHandler", + "RemoveEventHandler", "RunApplicationEventLoop", Index: CarbonEvtsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/carbonevt/CarbonEvtsupport.py,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** CarbonEvtsupport.py 2001/12/12 21:48:00 1.6 --- CarbonEvtsupport.py 2001/12/19 15:10:13 1.6.2.1 *************** *** 12,15 **** --- 12,16 ---- exec execstr + if 0: # these types will have no methods and will merely be opaque blobs *************** *** 54,57 **** --- 55,66 ---- CarbonEventsMethod = OSErrMethodGenerator + class EventHandlerRefMethod(OSErrMethodGenerator): + def precheck(self): + OutLbrace('if (_self->ob_itself == NULL)') + Output('PyErr_SetString(CarbonEvents_Error, "Handler has been removed");') + Output('return NULL;') + OutRbrace() + + includestuff = r""" #ifdef WITHOUT_FRAMEWORKS *************** *** 97,101 **** EventTypeSpec_Convert(PyObject *v, EventTypeSpec *out) { ! if (PyArg_Parse(v, "(O&l)", PyMac_GetOSType, &(out->eventClass), &(out->eventKind))) return 1; return NULL; --- 106,112 ---- EventTypeSpec_Convert(PyObject *v, EventTypeSpec *out) { ! if (PyArg_Parse(v, "(O&l)", ! PyMac_GetOSType, &(out->eventClass), ! &(out->eventKind))) return 1; return NULL; *************** *** 156,160 **** #endif /* USE_MAC_MP_MULTITHREADING */ ! retValue = PyObject_CallFunction((PyObject *)outPyObject, "O&O&", EventHandlerCallRef_New, handlerRef, EventRef_New, event); if (retValue == NULL) { PySys_WriteStderr("Error in event handler callback:\n"); --- 167,173 ---- #endif /* USE_MAC_MP_MULTITHREADING */ ! retValue = PyObject_CallFunction((PyObject *)outPyObject, "O&O&", ! EventHandlerCallRef_New, handlerRef, ! EventRef_New, event); if (retValue == NULL) { PySys_WriteStderr("Error in event handler callback:\n"); *************** *** 189,201 **** module = MacModule('_CarbonEvt', 'CarbonEvents', includestuff, finalstuff, initstuff) - #class CFReleaserObj(GlobalObjectDefinition): - # def outputFreeIt(self, name): - # Output("CFRelease(%s);" % name) for typ in RefObjectTypes: ! execstr = typ + 'object = GlobalObjectDefinition(typ)' ! exec execstr module.addobject(eval(typ + 'object')) functions = [] for typ in RefObjectTypes: ## go thru all ObjectTypes as defined in CarbonEventsscan.py --- 202,230 ---- module = MacModule('_CarbonEvt', 'CarbonEvents', includestuff, finalstuff, initstuff) + + + class EventHandlerRefObjectDefinition(GlobalObjectDefinition): + def outputStructMembers(self): + Output("%s ob_itself;", self.itselftype) + Output("PyObject *ob_callback;") + def outputInitStructMembers(self): + Output("it->ob_itself = %sitself;", self.argref) + Output("it->ob_callback = NULL;") + def outputFreeIt(self, name): + OutLbrace("if (self->ob_itself != NULL)") + Output("RemoveEventHandler(self->ob_itself);") + Output("Py_DECREF(self->ob_callback);") + OutRbrace() + for typ in RefObjectTypes: ! if typ == 'EventHandlerRef': ! EventHandlerRefobject = EventHandlerRefObjectDefinition('EventHandlerRef') ! else: ! execstr = typ + 'object = GlobalObjectDefinition(typ)' ! exec execstr module.addobject(eval(typ + 'object')) + functions = [] for typ in RefObjectTypes: ## go thru all ObjectTypes as defined in CarbonEventsscan.py *************** *** 206,209 **** --- 235,240 ---- execfile('CarbonEventsgen.py') + + for f in functions: module.add(f) # add all the functions carboneventsgen put in the list *************** *** 213,216 **** --- 244,270 ---- for m in methods: obj.add(m) ## add each method in the list to the object + + removeeventhandler = """ + OSStatus _err; + if (_self->ob_itself == NULL) { + PyErr_SetString(CarbonEvents_Error, "Handler has been removed"); + return NULL; + } + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _err = RemoveEventHandler(_self->ob_itself); + if (_err != noErr) return PyMac_Error(_err); + _self->ob_itself = NULL; + Py_DECREF(_self->ob_callback); + _self->ob_callback = NULL; + Py_INCREF(Py_None); + _res = Py_None; + return _res;""" + + f = ManualGenerator("RemoveEventHandler", removeeventhandler); + f.docstring = lambda: "() -> None" + EventHandlerRefobject.add(f) + + installeventhandler = """ EventTypeSpec inSpec; *************** *** 225,233 **** if (_err != noErr) return PyMac_Error(_err); ! return Py_BuildValue("O&", EventHandlerRef_New, outRef);""" f = ManualGenerator("InstallEventHandler", installeventhandler); ! f.docstring = lambda: "(EventTargetRef inTarget, EventTypeSpec inSpec, Method callback) -> (EventHandlerRef outRef)" EventTargetRefobject.add(f) runappeventloop = """ --- 279,328 ---- if (_err != noErr) return PyMac_Error(_err); ! _res = EventHandlerRef_New(outRef); ! if (_res != NULL) { ! ((EventHandlerRefObject*)_res)->ob_callback = callback; ! Py_INCREF(callback); ! } ! return _res;""" f = ManualGenerator("InstallEventHandler", installeventhandler); ! f.docstring = lambda: "(EventTypeSpec inSpec, Method callback) -> (EventHandlerRef outRef)" EventTargetRefobject.add(f) + + # This may not be the best, but at least it lets you get the raw data back into python as a string. You'll have to cut it up yourself and parse the result. + + geteventparameter = """ + UInt32 bufferSize; + EventParamName inName; + EventParamType inType; + OSErr _err; + void * buffer; + + if (!PyArg_ParseTuple(_args, "O&O&", PyMac_GetOSType, &inName, PyMac_GetOSType, &inType)) + return NULL; + + /* Figure out the size by passing a null buffer to GetEventParameter */ + _err = GetEventParameter(_self->ob_itself, inName, inType, NULL, 0, &bufferSize, NULL); + + if (_err != noErr) + return PyMac_Error(_err); + buffer = PyMem_NEW(char, bufferSize); + if (buffer == NULL) + return PyErr_NoMemory(); + + _err = GetEventParameter(_self->ob_itself, inName, inType, NULL, bufferSize, NULL, buffer); + + if (_err != noErr) { + PyMem_DEL(buffer); + return PyMac_Error(_err); + } + _res = Py_BuildValue("s#", buffer, bufferSize); + PyMem_DEL(buffer); + return _res; + """ + + f = ManualGenerator("GetEventParameter", geteventparameter); + f.docstring = lambda: "(EventParamName eventName, EventParamType eventType) -> (String eventParamData)" + EventRefobject.add(f) runappeventloop = """ Index: _CarbonEvtmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/carbonevt/_CarbonEvtmodule.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** _CarbonEvtmodule.c 2001/12/12 21:48:00 1.3 --- _CarbonEvtmodule.c 2001/12/19 15:10:13 1.3.2.1 *************** *** 48,52 **** EventTypeSpec_Convert(PyObject *v, EventTypeSpec *out) { ! if (PyArg_Parse(v, "(O&l)", PyMac_GetOSType, &(out->eventClass), &(out->eventKind))) return 1; return NULL; --- 48,54 ---- EventTypeSpec_Convert(PyObject *v, EventTypeSpec *out) { ! if (PyArg_Parse(v, "(O&l)", ! PyMac_GetOSType, &(out->eventClass), ! &(out->eventKind))) return 1; return NULL; *************** *** 107,111 **** #endif /* USE_MAC_MP_MULTITHREADING */ ! retValue = PyObject_CallFunction((PyObject *)outPyObject, "O&O&", EventHandlerCallRef_New, handlerRef, EventRef_New, event); if (retValue == NULL) { PySys_WriteStderr("Error in event handler callback:\n"); --- 109,115 ---- #endif /* USE_MAC_MP_MULTITHREADING */ ! retValue = PyObject_CallFunction((PyObject *)outPyObject, "O&O&", ! EventHandlerCallRef_New, handlerRef, ! EventRef_New, event); if (retValue == NULL) { PySys_WriteStderr("Error in event handler callback:\n"); *************** *** 341,344 **** --- 345,382 ---- } + static PyObject *EventRef_GetEventParameter(EventRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + + UInt32 bufferSize; + EventParamName inName; + EventParamType inType; + OSErr _err; + void * buffer; + + if (!PyArg_ParseTuple(_args, "O&O&", PyMac_GetOSType, &inName, PyMac_GetOSType, &inType)) + return NULL; + + /* Figure out the size by passing a null buffer to GetEventParameter */ + _err = GetEventParameter(_self->ob_itself, inName, inType, NULL, 0, &bufferSize, NULL); + + if (_err != noErr) + return PyMac_Error(_err); + buffer = PyMem_NEW(char, bufferSize); + if (buffer == NULL) + return PyErr_NoMemory(); + + _err = GetEventParameter(_self->ob_itself, inName, inType, NULL, bufferSize, NULL, buffer); + + if (_err != noErr) { + PyMem_DEL(buffer); + return PyMac_Error(_err); + } + _res = Py_BuildValue("s#", buffer, bufferSize); + PyMem_DEL(buffer); + return _res; + + } + static PyMethodDef EventRef_methods[] = { {"RetainEvent", (PyCFunction)EventRef_RetainEvent, 1, *************** *** 366,369 **** --- 404,409 ---- {"SendEventToEventTarget", (PyCFunction)EventRef_SendEventToEventTarget, 1, "(EventTargetRef inTarget) -> None"}, + {"GetEventParameter", (PyCFunction)EventRef_GetEventParameter, 1, + "(EventParamName eventName, EventParamType eventType) -> (String eventParamData)"}, {NULL, NULL, 0} }; *************** *** 800,803 **** --- 840,844 ---- PyObject_HEAD EventHandlerRef ob_itself; + PyObject *ob_callback; } EventHandlerRefObject; *************** *** 808,811 **** --- 849,853 ---- if (it == NULL) return NULL; it->ob_itself = itself; + it->ob_callback = NULL; return (PyObject *)it; } *************** *** 823,843 **** static void EventHandlerRef_dealloc(EventHandlerRefObject *self) { ! /* Cleanup of self->ob_itself goes here */ PyMem_DEL(self); } - static PyObject *EventHandlerRef_RemoveEventHandler(EventHandlerRefObject *_self, PyObject *_args) - { - PyObject *_res = NULL; - OSStatus _err; - if (!PyArg_ParseTuple(_args, "")) - return NULL; - _err = RemoveEventHandler(_self->ob_itself); - if (_err != noErr) return PyMac_Error(_err); - Py_INCREF(Py_None); - _res = Py_None; - return _res; - } - static PyObject *EventHandlerRef_AddEventTypesToHandler(EventHandlerRefObject *_self, PyObject *_args) { --- 865,875 ---- static void EventHandlerRef_dealloc(EventHandlerRefObject *self) { ! if (self->ob_itself != NULL) { ! RemoveEventHandler(self->ob_itself); ! Py_DECREF(self->ob_callback); ! } PyMem_DEL(self); } static PyObject *EventHandlerRef_AddEventTypesToHandler(EventHandlerRefObject *_self, PyObject *_args) { *************** *** 846,849 **** --- 878,885 ---- UInt32 inNumTypes; EventTypeSpec inList; + if (_self->ob_itself == NULL) { + PyErr_SetString(CarbonEvents_Error, "Handler has been removed"); + return NULL; + } if (!PyArg_ParseTuple(_args, "lO&", &inNumTypes, *************** *** 865,868 **** --- 901,908 ---- UInt32 inNumTypes; EventTypeSpec inList; + if (_self->ob_itself == NULL) { + PyErr_SetString(CarbonEvents_Error, "Handler has been removed"); + return NULL; + } if (!PyArg_ParseTuple(_args, "lO&", &inNumTypes, *************** *** 878,888 **** } static PyMethodDef EventHandlerRef_methods[] = { - {"RemoveEventHandler", (PyCFunction)EventHandlerRef_RemoveEventHandler, 1, - "() -> None"}, {"AddEventTypesToHandler", (PyCFunction)EventHandlerRef_AddEventTypesToHandler, 1, "(UInt32 inNumTypes, EventTypeSpec inList) -> None"}, {"RemoveEventTypesFromHandler", (PyCFunction)EventHandlerRef_RemoveEventTypesFromHandler, 1, "(UInt32 inNumTypes, EventTypeSpec inList) -> None"}, {NULL, NULL, 0} }; --- 918,949 ---- } + static PyObject *EventHandlerRef_RemoveEventHandler(EventHandlerRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + + OSStatus _err; + if (_self->ob_itself == NULL) { + PyErr_SetString(CarbonEvents_Error, "Handler has been removed"); + return NULL; + } + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _err = RemoveEventHandler(_self->ob_itself); + if (_err != noErr) return PyMac_Error(_err); + _self->ob_itself = NULL; + Py_DECREF(_self->ob_callback); + _self->ob_callback = NULL; + Py_INCREF(Py_None); + _res = Py_None; + return _res; + } + static PyMethodDef EventHandlerRef_methods[] = { {"AddEventTypesToHandler", (PyCFunction)EventHandlerRef_AddEventTypesToHandler, 1, "(UInt32 inNumTypes, EventTypeSpec inList) -> None"}, {"RemoveEventTypesFromHandler", (PyCFunction)EventHandlerRef_RemoveEventTypesFromHandler, 1, "(UInt32 inNumTypes, EventTypeSpec inList) -> None"}, + {"RemoveEventHandler", (PyCFunction)EventHandlerRef_RemoveEventHandler, 1, + "() -> None"}, {NULL, NULL, 0} }; *************** *** 1084,1088 **** if (_err != noErr) return PyMac_Error(_err); ! return Py_BuildValue("O&", EventHandlerRef_New, outRef); } --- 1145,1154 ---- if (_err != noErr) return PyMac_Error(_err); ! _res = EventHandlerRef_New(outRef); ! if (_res != NULL) { ! ((EventHandlerRefObject*)_res)->ob_callback = callback; ! Py_INCREF(callback); ! } ! return _res; } *************** *** 1091,1095 **** "() -> None"}, {"InstallEventHandler", (PyCFunction)EventTargetRef_InstallEventHandler, 1, ! "(EventTargetRef inTarget, EventTypeSpec inSpec, Method callback) -> (EventHandlerRef outRef)"}, {NULL, NULL, 0} }; --- 1157,1161 ---- "() -> None"}, {"InstallEventHandler", (PyCFunction)EventTargetRef_InstallEventHandler, 1, ! "(EventTypeSpec inSpec, Method callback) -> (EventHandlerRef outRef)"}, {NULL, NULL, 0} }; From jackjansen@users.sourceforge.net Wed Dec 19 15:10:46 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 07:10:46 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/app _Appmodule.c,1.3,1.3.2.1 appscan.py,1.4,1.4.16.1 appsupport.py,1.8,1.8.10.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/app In directory usw-pr-cvs1:/tmp/cvs-serv12554/Modules/app Modified Files: Tag: r22rc1-branch _Appmodule.c appscan.py appsupport.py Log Message: Merged Mac subtree into the 22c1 branch. Index: _Appmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/app/_Appmodule.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** _Appmodule.c 2001/11/30 14:16:31 1.3 --- _Appmodule.c 2001/12/19 15:10:13 1.3.2.1 *************** *** 6,11 **** --- 6,15 ---- + #ifdef _WIN32 + #include "pywintoolbox.h" + #else #include "macglue.h" #include "pymactoolbox.h" + #endif /* Macro to test whether a weak-loaded CFM function exists */ *************** *** 655,658 **** --- 659,749 ---- } + #if TARGET_API_MAC_CARBON + + static PyObject *App_TruncateThemeText(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + OSStatus _err; + CFMutableStringRef inString; + ThemeFontID inFontID; + ThemeDrawState inState; + SInt16 inPixelWidthLimit; + TruncCode inTruncWhere; + Boolean outTruncated; + if (!PyArg_ParseTuple(_args, "O&Hlhh", + CFMutableStringRefObj_Convert, &inString, + &inFontID, + &inState, + &inPixelWidthLimit, + &inTruncWhere)) + return NULL; + _err = TruncateThemeText(inString, + inFontID, + inState, + inPixelWidthLimit, + inTruncWhere, + &outTruncated); + if (_err != noErr) return PyMac_Error(_err); + _res = Py_BuildValue("b", + outTruncated); + return _res; + } + #endif + + #if TARGET_API_MAC_CARBON + + static PyObject *App_GetThemeTextDimensions(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + OSStatus _err; + CFStringRef inString; + ThemeFontID inFontID; + ThemeDrawState inState; + Boolean inWrapToWidth; + Point ioBounds; + SInt16 outBaseline; + if (!PyArg_ParseTuple(_args, "O&Hlb", + CFStringRefObj_Convert, &inString, + &inFontID, + &inState, + &inWrapToWidth)) + return NULL; + _err = GetThemeTextDimensions(inString, + inFontID, + inState, + inWrapToWidth, + &ioBounds, + &outBaseline); + if (_err != noErr) return PyMac_Error(_err); + _res = Py_BuildValue("O&h", + PyMac_BuildPoint, ioBounds, + outBaseline); + return _res; + } + #endif + + #if TARGET_API_MAC_CARBON + + static PyObject *App_GetThemeTextShadowOutset(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + OSStatus _err; + ThemeFontID inFontID; + ThemeDrawState inState; + Rect outOutset; + if (!PyArg_ParseTuple(_args, "Hl", + &inFontID, + &inState)) + return NULL; + _err = GetThemeTextShadowOutset(inFontID, + inState, + &outOutset); + if (_err != noErr) return PyMac_Error(_err); + _res = Py_BuildValue("O&", + PyMac_BuildRect, &outOutset); + return _res; + } + #endif + static PyObject *App_DrawThemeScrollBarArrows(PyObject *_self, PyObject *_args) { *************** *** 1112,1115 **** --- 1203,1221 ---- {"UseThemeFont", (PyCFunction)App_UseThemeFont, 1, "(ThemeFontID inFontID, ScriptCode inScript) -> None"}, + + #if TARGET_API_MAC_CARBON + {"TruncateThemeText", (PyCFunction)App_TruncateThemeText, 1, + "(CFMutableStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, SInt16 inPixelWidthLimit, TruncCode inTruncWhere) -> (Boolean outTruncated)"}, + #endif + + #if TARGET_API_MAC_CARBON + {"GetThemeTextDimensions", (PyCFunction)App_GetThemeTextDimensions, 1, + "(CFStringRef inString, ThemeFontID inFontID, ThemeDrawState inState, Boolean inWrapToWidth) -> (Point ioBounds, SInt16 outBaseline)"}, + #endif + + #if TARGET_API_MAC_CARBON + {"GetThemeTextShadowOutset", (PyCFunction)App_GetThemeTextShadowOutset, 1, + "(ThemeFontID inFontID, ThemeDrawState inState) -> (Rect outOutset)"}, + #endif {"DrawThemeScrollBarArrows", (PyCFunction)App_DrawThemeScrollBarArrows, 1, "(Rect bounds, ThemeTrackEnableState enableState, ThemeTrackPressState pressState, Boolean isHoriz) -> (Rect trackBounds)"}, Index: appscan.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/app/appscan.py,v retrieving revision 1.4 retrieving revision 1.4.16.1 diff -C2 -d -r1.4 -r1.4.16.1 *** appscan.py 2000/12/19 21:33:51 1.4 --- appscan.py 2001/12/19 15:10:13 1.4.16.1 *************** *** 49,52 **** --- 49,53 ---- "appearanceThemeHasNoAccents", "appearanceBadCursorIndexErr", + "DrawThemeTextBox", # Funny void* out param ] *************** *** 55,58 **** --- 56,62 ---- ('#if TARGET_API_MAC_CARBON', [ 'GetThemeMetric', + 'GetThemeTextShadowOutset', + 'GetThemeTextDimensions', + 'TruncateThemeText', ])] *************** *** 72,75 **** --- 76,80 ---- "ThemeDrawingState", # This is an opaque pointer, so it should be simple. Later. "Collection", # No interface to collection mgr yet. + "BytePtr", # Not yet. ] Index: appsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/app/appsupport.py,v retrieving revision 1.8 retrieving revision 1.8.10.1 diff -C2 -d -r1.8 -r1.8.10.1 *** appsupport.py 2001/08/23 13:47:50 1.8 --- appsupport.py 2001/12/19 15:10:13 1.8.10.1 *************** *** 68,71 **** --- 68,74 ---- ThemeMetric = Type("ThemeMetric", "l") RGBColor = OpaqueType("RGBColor", "QdRGB") + CFStringRef = OpaqueByValueType("CFStringRef", "CFStringRefObj") + CFMutableStringRef = OpaqueByValueType("CFMutableStringRef", "CFMutableStringRefObj") + TruncCode = Type("TruncCode", "h") includestuff = includestuff + """ From jackjansen@users.sourceforge.net Wed Dec 19 15:10:47 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 07:10:47 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/dlg _Dlgmodule.c,1.6,1.6.2.1 dlgscan.py,1.14,1.14.4.1 dlgsupport.py,1.27,1.27.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/dlg In directory usw-pr-cvs1:/tmp/cvs-serv12554/Modules/dlg Modified Files: Tag: r22rc1-branch _Dlgmodule.c dlgscan.py dlgsupport.py Log Message: Merged Mac subtree into the 22c1 branch. Index: _Dlgmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/dlg/_Dlgmodule.c,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** _Dlgmodule.c 2001/12/08 18:02:52 1.6 --- _Dlgmodule.c 2001/12/19 15:10:15 1.6.2.1 *************** *** 6,11 **** --- 6,15 ---- + #ifdef _WIN32 + #include "pywintoolbox.h" + #else #include "macglue.h" #include "pymactoolbox.h" + #endif /* Macro to test whether a weak-loaded CFM function exists */ *************** *** 877,897 **** } - #if !TARGET_API_MAC_CARBON - - static PyObject *DlgObj_SetGrafPortOfDialog(DialogObject *_self, PyObject *_args) - { - PyObject *_res = NULL; - #ifndef SetGrafPortOfDialog - PyMac_PRECHECK(SetGrafPortOfDialog); - #endif - if (!PyArg_ParseTuple(_args, "")) - return NULL; - SetGrafPortOfDialog(_self->ob_itself); - Py_INCREF(Py_None); - _res = Py_None; - return _res; - } - #endif - static PyMethodDef DlgObj_methods[] = { {"DrawDialog", (PyCFunction)DlgObj_DrawDialog, 1, --- 881,884 ---- *************** *** 975,983 **** {"GetDialogPort", (PyCFunction)DlgObj_GetDialogPort, 1, "() -> (CGrafPtr _rv)"}, - - #if !TARGET_API_MAC_CARBON - {"SetGrafPortOfDialog", (PyCFunction)DlgObj_SetGrafPortOfDialog, 1, - "() -> None"}, - #endif {NULL, NULL, 0} }; --- 962,965 ---- Index: dlgscan.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/dlg/dlgscan.py,v retrieving revision 1.14 retrieving revision 1.14.4.1 diff -C2 -d -r1.14 -r1.14.4.1 *** dlgscan.py 2001/11/05 16:16:27 1.14 --- dlgscan.py 2001/12/19 15:10:15 1.14.4.1 *************** *** 55,69 **** 'GetDialogControlNotificationProc', 'SetGrafPortOfDialog', # Funny, and probably not useful ] def makegreylist(self): return [ - ('#if !TARGET_API_MAC_CARBON', [ - 'SetGrafPortOfDialog', - ]), ('#if TARGET_API_MAC_CARBON', [ 'InsertDialogItem', 'RemoveDialogItems', 'GetParamText', ])] --- 55,71 ---- 'GetDialogControlNotificationProc', 'SetGrafPortOfDialog', # Funny, and probably not useful + # Can't find these: + 'CloseStandardSheet', + 'RunStandardAlert', ] def makegreylist(self): return [ ('#if TARGET_API_MAC_CARBON', [ 'InsertDialogItem', 'RemoveDialogItems', 'GetParamText', + 'CloseStandardSheet', + 'RunStandardAlert', ])] *************** *** 73,76 **** --- 75,81 ---- "AlertStdAlertParamRec", # ditto "AlertStdAlertParamRec_ptr", # ditto + "AlertStdCFStringAlertParamPtr", # ditto + "AlertStdCFStringAlertParamRec", + "AlertStdCFStringAlertParamRec_ptr", "QTModelessCallbackProcPtr", ] Index: dlgsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/dlg/dlgsupport.py,v retrieving revision 1.27 retrieving revision 1.27.2.1 diff -C2 -d -r1.27 -r1.27.2.1 *** dlgsupport.py 2001/11/30 14:16:32 1.27 --- dlgsupport.py 2001/12/19 15:10:15 1.27.2.1 *************** *** 258,276 **** for f in methods: object.add(f) - # Some methods that are currently macro's in C, but will be real routines - # in MacOS 8. - - ##f = Method(ExistingWindowPtr, 'GetDialogWindow', (DialogRef, 'dialog', InMode)) - ##object.add(f) - ##f = Method(SInt16, 'GetDialogDefaultItem', (DialogRef, 'dialog', InMode)) - ##object.add(f) - ##f = Method(SInt16, 'GetDialogCancelItem', (DialogRef, 'dialog', InMode)) - ##object.add(f) - ##f = Method(SInt16, 'GetDialogKeyboardFocusItem', (DialogRef, 'dialog', InMode)) - ##object.add(f) - f = Method(void, 'SetGrafPortOfDialog', (DialogRef, 'dialog', InMode), - condition='#if !TARGET_API_MAC_CARBON') - object.add(f) - setuseritembody = """ PyObject *new = NULL; --- 258,261 ---- From jackjansen@users.sourceforge.net Wed Dec 19 15:10:46 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 07:10:46 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/cf _CFmodule.c,1.7,1.7.2.1 cfsupport.py,1.12,1.12.4.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/cf In directory usw-pr-cvs1:/tmp/cvs-serv12554/Modules/cf Modified Files: Tag: r22rc1-branch _CFmodule.c cfsupport.py Log Message: Merged Mac subtree into the 22c1 branch. Index: _CFmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cf/_CFmodule.c,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** _CFmodule.c 2001/12/08 18:02:52 1.7 --- _CFmodule.c 2001/12/19 15:10:14 1.7.2.1 *************** *** 6,11 **** --- 6,15 ---- + #ifdef _WIN32 + #include "pywintoolbox.h" + #else #include "macglue.h" #include "pymactoolbox.h" + #endif /* Macro to test whether a weak-loaded CFM function exists */ *************** *** 605,608 **** --- 609,632 ---- } + static PyObject *CFMutableArrayRefObj_CFArrayAppendArray(CFMutableArrayRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFArrayRef otherArray; + CFRange otherRange; + #ifndef CFArrayAppendArray + PyMac_PRECHECK(CFArrayAppendArray); + #endif + if (!PyArg_ParseTuple(_args, "O&O&", + CFArrayRefObj_Convert, &otherArray, + CFRange_Convert, &otherRange)) + return NULL; + CFArrayAppendArray(_self->ob_itself, + otherArray, + otherRange); + Py_INCREF(Py_None); + _res = Py_None; + return _res; + } + static PyMethodDef CFMutableArrayRefObj_methods[] = { {"CFArrayRemoveValueAtIndex", (PyCFunction)CFMutableArrayRefObj_CFArrayRemoveValueAtIndex, 1, *************** *** 612,615 **** --- 636,641 ---- {"CFArrayExchangeValuesAtIndices", (PyCFunction)CFMutableArrayRefObj_CFArrayExchangeValuesAtIndices, 1, "(CFIndex idx1, CFIndex idx2) -> None"}, + {"CFArrayAppendArray", (PyCFunction)CFMutableArrayRefObj_CFArrayAppendArray, 1, + "(CFArrayRef otherArray, CFRange otherRange) -> None"}, {NULL, NULL, 0} }; *************** *** 1469,1473 **** PyObject *_res = NULL; CFComparisonResult _rv; ! CFStringRef string2; CFRange rangeToCompare; CFOptionFlags compareOptions; --- 1495,1499 ---- PyObject *_res = NULL; CFComparisonResult _rv; ! CFStringRef theString2; CFRange rangeToCompare; CFOptionFlags compareOptions; *************** *** 1476,1485 **** #endif if (!PyArg_ParseTuple(_args, "O&O&l", ! CFStringRefObj_Convert, &string2, CFRange_Convert, &rangeToCompare, &compareOptions)) return NULL; _rv = CFStringCompareWithOptions(_self->ob_itself, ! string2, rangeToCompare, compareOptions); --- 1502,1511 ---- #endif if (!PyArg_ParseTuple(_args, "O&O&l", ! CFStringRefObj_Convert, &theString2, CFRange_Convert, &rangeToCompare, &compareOptions)) return NULL; _rv = CFStringCompareWithOptions(_self->ob_itself, ! theString2, rangeToCompare, compareOptions); *************** *** 1493,1497 **** PyObject *_res = NULL; CFComparisonResult _rv; ! CFStringRef string2; CFOptionFlags compareOptions; #ifndef CFStringCompare --- 1519,1523 ---- PyObject *_res = NULL; CFComparisonResult _rv; ! CFStringRef theString2; CFOptionFlags compareOptions; #ifndef CFStringCompare *************** *** 1499,1507 **** #endif if (!PyArg_ParseTuple(_args, "O&l", ! CFStringRefObj_Convert, &string2, &compareOptions)) return NULL; _rv = CFStringCompare(_self->ob_itself, ! string2, compareOptions); _res = Py_BuildValue("l", --- 1525,1533 ---- #endif if (!PyArg_ParseTuple(_args, "O&l", ! CFStringRefObj_Convert, &theString2, &compareOptions)) return NULL; _rv = CFStringCompare(_self->ob_itself, ! theString2, compareOptions); _res = Py_BuildValue("l", *************** *** 1751,1754 **** --- 1777,1802 ---- } + static PyObject *CFStringRefObj_CFURLCreateWithFileSystemPathRelativeToBase(CFStringRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFURLRef _rv; + CFURLPathStyle pathStyle; + Boolean isDirectory; + CFURLRef baseURL; + if (!PyArg_ParseTuple(_args, "llO&", + &pathStyle, + &isDirectory, + OptionalCFURLRefObj_Convert, &baseURL)) + return NULL; + _rv = CFURLCreateWithFileSystemPathRelativeToBase((CFAllocatorRef)NULL, + _self->ob_itself, + pathStyle, + isDirectory, + baseURL); + _res = Py_BuildValue("O&", + CFURLRefObj_New, _rv); + return _res; + } + static PyObject *CFStringRefObj_CFURLCreateStringByReplacingPercentEscapes(CFStringRefObject *_self, PyObject *_args) { *************** *** 1767,1770 **** --- 1815,1840 ---- } + static PyObject *CFStringRefObj_CFURLCreateStringByAddingPercentEscapes(CFStringRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFStringRef _rv; + CFStringRef charactersToLeaveUnescaped; + CFStringRef legalURLCharactersToBeEscaped; + CFStringEncoding encoding; + if (!PyArg_ParseTuple(_args, "O&O&l", + CFStringRefObj_Convert, &charactersToLeaveUnescaped, + CFStringRefObj_Convert, &legalURLCharactersToBeEscaped, + &encoding)) + return NULL; + _rv = CFURLCreateStringByAddingPercentEscapes((CFAllocatorRef)NULL, + _self->ob_itself, + charactersToLeaveUnescaped, + legalURLCharactersToBeEscaped, + encoding); + _res = Py_BuildValue("O&", + CFStringRefObj_New, _rv); + return _res; + } + static PyObject *CFStringRefObj_CFStringGetString(CFStringRefObject *_self, PyObject *_args) { *************** *** 1820,1826 **** "() -> (CFStringEncoding _rv)"}, {"CFStringCompareWithOptions", (PyCFunction)CFStringRefObj_CFStringCompareWithOptions, 1, ! "(CFStringRef string2, CFRange rangeToCompare, CFOptionFlags compareOptions) -> (CFComparisonResult _rv)"}, {"CFStringCompare", (PyCFunction)CFStringRefObj_CFStringCompare, 1, ! "(CFStringRef string2, CFOptionFlags compareOptions) -> (CFComparisonResult _rv)"}, {"CFStringFindWithOptions", (PyCFunction)CFStringRefObj_CFStringFindWithOptions, 1, "(CFStringRef stringToFind, CFRange rangeToSearch, CFOptionFlags searchOptions) -> (Boolean _rv, CFRange result)"}, --- 1890,1896 ---- "() -> (CFStringEncoding _rv)"}, {"CFStringCompareWithOptions", (PyCFunction)CFStringRefObj_CFStringCompareWithOptions, 1, ! "(CFStringRef theString2, CFRange rangeToCompare, CFOptionFlags compareOptions) -> (CFComparisonResult _rv)"}, {"CFStringCompare", (PyCFunction)CFStringRefObj_CFStringCompare, 1, ! "(CFStringRef theString2, CFOptionFlags compareOptions) -> (CFComparisonResult _rv)"}, {"CFStringFindWithOptions", (PyCFunction)CFStringRefObj_CFStringFindWithOptions, 1, "(CFStringRef stringToFind, CFRange rangeToSearch, CFOptionFlags searchOptions) -> (Boolean _rv, CFRange result)"}, *************** *** 1849,1854 **** --- 1919,1928 ---- {"CFURLCreateWithFileSystemPath", (PyCFunction)CFStringRefObj_CFURLCreateWithFileSystemPath, 1, "(CFURLPathStyle pathStyle, Boolean isDirectory) -> (CFURLRef _rv)"}, + {"CFURLCreateWithFileSystemPathRelativeToBase", (PyCFunction)CFStringRefObj_CFURLCreateWithFileSystemPathRelativeToBase, 1, + "(CFURLPathStyle pathStyle, Boolean isDirectory, CFURLRef baseURL) -> (CFURLRef _rv)"}, {"CFURLCreateStringByReplacingPercentEscapes", (PyCFunction)CFStringRefObj_CFURLCreateStringByReplacingPercentEscapes, 1, "(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)"}, + {"CFURLCreateStringByAddingPercentEscapes", (PyCFunction)CFStringRefObj_CFURLCreateStringByAddingPercentEscapes, 1, + "(CFStringRef charactersToLeaveUnescaped, CFStringRef legalURLCharactersToBeEscaped, CFStringEncoding encoding) -> (CFStringRef _rv)"}, {"CFStringGetString", (PyCFunction)CFStringRefObj_CFStringGetString, 1, "() -> (string _rv)"}, *************** *** 1976,1980 **** { PyObject *_res = NULL; ! StringPtr pStr; CFStringEncoding encoding; #ifndef CFStringAppendPascalString --- 2050,2054 ---- { PyObject *_res = NULL; ! Str255 pStr; CFStringEncoding encoding; #ifndef CFStringAppendPascalString *************** *** 1982,1986 **** #endif if (!PyArg_ParseTuple(_args, "O&l", ! PyMac_GetStr255, &pStr, &encoding)) return NULL; --- 2056,2060 ---- #endif if (!PyArg_ParseTuple(_args, "O&l", ! PyMac_GetStr255, pStr, &encoding)) return NULL; *************** *** 2145,2149 **** "(CFStringRef appendedString) -> None"}, {"CFStringAppendPascalString", (PyCFunction)CFMutableStringRefObj_CFStringAppendPascalString, 1, ! "(StringPtr pStr, CFStringEncoding encoding) -> None"}, {"CFStringAppendCString", (PyCFunction)CFMutableStringRefObj_CFStringAppendCString, 1, "(char* cStr, CFStringEncoding encoding) -> None"}, --- 2219,2223 ---- "(CFStringRef appendedString) -> None"}, {"CFStringAppendPascalString", (PyCFunction)CFMutableStringRefObj_CFStringAppendPascalString, 1, ! "(Str255 pStr, CFStringEncoding encoding) -> None"}, {"CFStringAppendCString", (PyCFunction)CFMutableStringRefObj_CFStringAppendCString, 1, "(char* cStr, CFStringEncoding encoding) -> None"}, *************** *** 2282,2285 **** --- 2356,2383 ---- } + static PyObject *CFURLRefObj_CFURLGetFileSystemRepresentation(CFURLRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + Boolean _rv; + Boolean resolveAgainstBase; + UInt8 buffer; + CFIndex maxBufLen; + #ifndef CFURLGetFileSystemRepresentation + PyMac_PRECHECK(CFURLGetFileSystemRepresentation); + #endif + if (!PyArg_ParseTuple(_args, "ll", + &resolveAgainstBase, + &maxBufLen)) + return NULL; + _rv = CFURLGetFileSystemRepresentation(_self->ob_itself, + resolveAgainstBase, + &buffer, + maxBufLen); + _res = Py_BuildValue("lb", + _rv, + buffer); + return _res; + } + static PyObject *CFURLRefObj_CFURLCopyAbsoluteURL(CFURLRefObject *_self, PyObject *_args) { *************** *** 2387,2390 **** --- 2485,2524 ---- } + static PyObject *CFURLRefObj_CFURLCopyStrictPath(CFURLRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFStringRef _rv; + Boolean isAbsolute; + #ifndef CFURLCopyStrictPath + PyMac_PRECHECK(CFURLCopyStrictPath); + #endif + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = CFURLCopyStrictPath(_self->ob_itself, + &isAbsolute); + _res = Py_BuildValue("O&l", + CFStringRefObj_New, _rv, + isAbsolute); + return _res; + } + + static PyObject *CFURLRefObj_CFURLCopyFileSystemPath(CFURLRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFStringRef _rv; + CFURLPathStyle pathStyle; + #ifndef CFURLCopyFileSystemPath + PyMac_PRECHECK(CFURLCopyFileSystemPath); + #endif + if (!PyArg_ParseTuple(_args, "l", + &pathStyle)) + return NULL; + _rv = CFURLCopyFileSystemPath(_self->ob_itself, + pathStyle); + _res = Py_BuildValue("O&", + CFStringRefObj_New, _rv); + return _res; + } + static PyObject *CFURLRefObj_CFURLHasDirectoryPath(CFURLRefObject *_self, PyObject *_args) { *************** *** 2531,2537 **** --- 2665,2782 ---- } + static PyObject *CFURLRefObj_CFURLCopyLastPathComponent(CFURLRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFStringRef _rv; + #ifndef CFURLCopyLastPathComponent + PyMac_PRECHECK(CFURLCopyLastPathComponent); + #endif + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = CFURLCopyLastPathComponent(_self->ob_itself); + _res = Py_BuildValue("O&", + CFStringRefObj_New, _rv); + return _res; + } + + static PyObject *CFURLRefObj_CFURLCopyPathExtension(CFURLRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFStringRef _rv; + #ifndef CFURLCopyPathExtension + PyMac_PRECHECK(CFURLCopyPathExtension); + #endif + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = CFURLCopyPathExtension(_self->ob_itself); + _res = Py_BuildValue("O&", + CFStringRefObj_New, _rv); + return _res; + } + + static PyObject *CFURLRefObj_CFURLCreateCopyAppendingPathComponent(CFURLRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFURLRef _rv; + CFStringRef pathComponent; + Boolean isDirectory; + if (!PyArg_ParseTuple(_args, "O&l", + CFStringRefObj_Convert, &pathComponent, + &isDirectory)) + return NULL; + _rv = CFURLCreateCopyAppendingPathComponent((CFAllocatorRef)NULL, + _self->ob_itself, + pathComponent, + isDirectory); + _res = Py_BuildValue("O&", + CFURLRefObj_New, _rv); + return _res; + } + + static PyObject *CFURLRefObj_CFURLCreateCopyDeletingLastPathComponent(CFURLRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFURLRef _rv; + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = CFURLCreateCopyDeletingLastPathComponent((CFAllocatorRef)NULL, + _self->ob_itself); + _res = Py_BuildValue("O&", + CFURLRefObj_New, _rv); + return _res; + } + + static PyObject *CFURLRefObj_CFURLCreateCopyAppendingPathExtension(CFURLRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFURLRef _rv; + CFStringRef extension; + if (!PyArg_ParseTuple(_args, "O&", + CFStringRefObj_Convert, &extension)) + return NULL; + _rv = CFURLCreateCopyAppendingPathExtension((CFAllocatorRef)NULL, + _self->ob_itself, + extension); + _res = Py_BuildValue("O&", + CFURLRefObj_New, _rv); + return _res; + } + + static PyObject *CFURLRefObj_CFURLCreateCopyDeletingPathExtension(CFURLRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFURLRef _rv; + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = CFURLCreateCopyDeletingPathExtension((CFAllocatorRef)NULL, + _self->ob_itself); + _res = Py_BuildValue("O&", + CFURLRefObj_New, _rv); + return _res; + } + + static PyObject *CFURLRefObj_CFURLGetFSRef(CFURLRefObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + Boolean _rv; + FSRef fsRef; + #ifndef CFURLGetFSRef + PyMac_PRECHECK(CFURLGetFSRef); + #endif + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = CFURLGetFSRef(_self->ob_itself, + &fsRef); + _res = Py_BuildValue("lO&", + _rv, + PyMac_BuildFSRef, fsRef); + return _res; + } + static PyMethodDef CFURLRefObj_methods[] = { {"CFURLCreateData", (PyCFunction)CFURLRefObj_CFURLCreateData, 1, "(CFStringEncoding encoding, Boolean escapeWhitespace) -> (CFDataRef _rv)"}, + {"CFURLGetFileSystemRepresentation", (PyCFunction)CFURLRefObj_CFURLGetFileSystemRepresentation, 1, + "(Boolean resolveAgainstBase, CFIndex maxBufLen) -> (Boolean _rv, UInt8 buffer)"}, {"CFURLCopyAbsoluteURL", (PyCFunction)CFURLRefObj_CFURLCopyAbsoluteURL, 1, "() -> (CFURLRef _rv)"}, *************** *** 2548,2551 **** --- 2793,2800 ---- {"CFURLCopyPath", (PyCFunction)CFURLRefObj_CFURLCopyPath, 1, "() -> (CFStringRef _rv)"}, + {"CFURLCopyStrictPath", (PyCFunction)CFURLRefObj_CFURLCopyStrictPath, 1, + "() -> (CFStringRef _rv, Boolean isAbsolute)"}, + {"CFURLCopyFileSystemPath", (PyCFunction)CFURLRefObj_CFURLCopyFileSystemPath, 1, + "(CFURLPathStyle pathStyle) -> (CFStringRef _rv)"}, {"CFURLHasDirectoryPath", (PyCFunction)CFURLRefObj_CFURLHasDirectoryPath, 1, "() -> (Boolean _rv)"}, *************** *** 2566,2569 **** --- 2815,2832 ---- {"CFURLCopyFragment", (PyCFunction)CFURLRefObj_CFURLCopyFragment, 1, "(CFStringRef charactersToLeaveEscaped) -> (CFStringRef _rv)"}, + {"CFURLCopyLastPathComponent", (PyCFunction)CFURLRefObj_CFURLCopyLastPathComponent, 1, + "() -> (CFStringRef _rv)"}, + {"CFURLCopyPathExtension", (PyCFunction)CFURLRefObj_CFURLCopyPathExtension, 1, + "() -> (CFStringRef _rv)"}, + {"CFURLCreateCopyAppendingPathComponent", (PyCFunction)CFURLRefObj_CFURLCreateCopyAppendingPathComponent, 1, + "(CFStringRef pathComponent, Boolean isDirectory) -> (CFURLRef _rv)"}, + {"CFURLCreateCopyDeletingLastPathComponent", (PyCFunction)CFURLRefObj_CFURLCreateCopyDeletingLastPathComponent, 1, + "() -> (CFURLRef _rv)"}, + {"CFURLCreateCopyAppendingPathExtension", (PyCFunction)CFURLRefObj_CFURLCreateCopyAppendingPathExtension, 1, + "(CFStringRef extension) -> (CFURLRef _rv)"}, + {"CFURLCreateCopyDeletingPathExtension", (PyCFunction)CFURLRefObj_CFURLCreateCopyDeletingPathExtension, 1, + "() -> (CFURLRef _rv)"}, + {"CFURLGetFSRef", (PyCFunction)CFURLRefObj_CFURLGetFSRef, 1, + "() -> (Boolean _rv, FSRef fsRef)"}, {NULL, NULL, 0} }; *************** *** 2621,2624 **** --- 2884,2907 ---- + static PyObject *CF___CFRangeMake(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFRange _rv; + CFIndex loc; + CFIndex len; + #ifndef __CFRangeMake + PyMac_PRECHECK(__CFRangeMake); + #endif + if (!PyArg_ParseTuple(_args, "ll", + &loc, + &len)) + return NULL; + _rv = __CFRangeMake(loc, + len); + _res = Py_BuildValue("O&", + CFRange_New, _rv); + return _res; + } + static PyObject *CF_CFAllocatorGetTypeID(PyObject *_self, PyObject *_args) { *************** *** 2661,2672 **** PyObject *_res = NULL; CFStringRef _rv; ! CFTypeID theType; #ifndef CFCopyTypeIDDescription PyMac_PRECHECK(CFCopyTypeIDDescription); #endif if (!PyArg_ParseTuple(_args, "l", ! &theType)) return NULL; ! _rv = CFCopyTypeIDDescription(theType); _res = Py_BuildValue("O&", CFStringRefObj_New, _rv); --- 2944,2955 ---- PyObject *_res = NULL; CFStringRef _rv; ! CFTypeID type_id; #ifndef CFCopyTypeIDDescription PyMac_PRECHECK(CFCopyTypeIDDescription); #endif if (!PyArg_ParseTuple(_args, "l", ! &type_id)) return NULL; ! _rv = CFCopyTypeIDDescription(type_id); _res = Py_BuildValue("O&", CFStringRefObj_New, _rv); *************** *** 2713,2717 **** CFMutableArrayRef _rv; CFIndex capacity; ! CFArrayRef srcArray; #ifndef CFArrayCreateMutableCopy PyMac_PRECHECK(CFArrayCreateMutableCopy); --- 2996,3000 ---- CFMutableArrayRef _rv; CFIndex capacity; ! CFArrayRef theArray; #ifndef CFArrayCreateMutableCopy PyMac_PRECHECK(CFArrayCreateMutableCopy); *************** *** 2719,2727 **** if (!PyArg_ParseTuple(_args, "lO&", &capacity, ! CFArrayRefObj_Convert, &srcArray)) return NULL; _rv = CFArrayCreateMutableCopy((CFAllocatorRef)NULL, capacity, ! srcArray); _res = Py_BuildValue("O&", CFMutableArrayRefObj_New, _rv); --- 3002,3010 ---- if (!PyArg_ParseTuple(_args, "lO&", &capacity, ! CFArrayRefObj_Convert, &theArray)) return NULL; _rv = CFArrayCreateMutableCopy((CFAllocatorRef)NULL, capacity, ! theArray); _res = Py_BuildValue("O&", CFMutableArrayRefObj_New, _rv); *************** *** 2810,2814 **** CFMutableDataRef _rv; CFIndex capacity; ! CFDataRef data; #ifndef CFDataCreateMutableCopy PyMac_PRECHECK(CFDataCreateMutableCopy); --- 3093,3097 ---- CFMutableDataRef _rv; CFIndex capacity; ! CFDataRef theData; #ifndef CFDataCreateMutableCopy PyMac_PRECHECK(CFDataCreateMutableCopy); *************** *** 2816,2824 **** if (!PyArg_ParseTuple(_args, "lO&", &capacity, ! CFDataRefObj_Convert, &data)) return NULL; _rv = CFDataCreateMutableCopy((CFAllocatorRef)NULL, capacity, ! data); _res = Py_BuildValue("O&", CFMutableDataRefObj_New, _rv); --- 3099,3107 ---- if (!PyArg_ParseTuple(_args, "lO&", &capacity, ! CFDataRefObj_Convert, &theData)) return NULL; _rv = CFDataCreateMutableCopy((CFAllocatorRef)NULL, capacity, ! theData); _res = Py_BuildValue("O&", CFMutableDataRefObj_New, _rv); *************** *** 2866,2870 **** CFMutableDictionaryRef _rv; CFIndex capacity; ! CFDictionaryRef dict; #ifndef CFDictionaryCreateMutableCopy PyMac_PRECHECK(CFDictionaryCreateMutableCopy); --- 3149,3153 ---- CFMutableDictionaryRef _rv; CFIndex capacity; ! CFDictionaryRef theDict; #ifndef CFDictionaryCreateMutableCopy PyMac_PRECHECK(CFDictionaryCreateMutableCopy); *************** *** 2872,2880 **** if (!PyArg_ParseTuple(_args, "lO&", &capacity, ! CFDictionaryRefObj_Convert, &dict)) return NULL; _rv = CFDictionaryCreateMutableCopy((CFAllocatorRef)NULL, capacity, ! dict); _res = Py_BuildValue("O&", CFMutableDictionaryRefObj_New, _rv); --- 3155,3163 ---- if (!PyArg_ParseTuple(_args, "lO&", &capacity, ! CFDictionaryRefObj_Convert, &theDict)) return NULL; _rv = CFDictionaryCreateMutableCopy((CFAllocatorRef)NULL, capacity, ! theDict); _res = Py_BuildValue("O&", CFMutableDictionaryRefObj_New, _rv); *************** *** 2901,2905 **** PyObject *_res = NULL; CFStringRef _rv; ! StringPtr pStr; CFStringEncoding encoding; #ifndef CFStringCreateWithPascalString --- 3184,3188 ---- PyObject *_res = NULL; CFStringRef _rv; ! Str255 pStr; CFStringEncoding encoding; #ifndef CFStringCreateWithPascalString *************** *** 2907,2911 **** #endif if (!PyArg_ParseTuple(_args, "O&l", ! PyMac_GetStr255, &pStr, &encoding)) return NULL; --- 3190,3194 ---- #endif if (!PyArg_ParseTuple(_args, "O&l", ! PyMac_GetStr255, pStr, &encoding)) return NULL; *************** *** 2943,2947 **** PyObject *_res = NULL; CFStringRef _rv; ! StringPtr pStr; CFStringEncoding encoding; #ifndef CFStringCreateWithPascalStringNoCopy --- 3226,3230 ---- PyObject *_res = NULL; CFStringRef _rv; ! Str255 pStr; CFStringEncoding encoding; #ifndef CFStringCreateWithPascalStringNoCopy *************** *** 2949,2953 **** #endif if (!PyArg_ParseTuple(_args, "O&l", ! PyMac_GetStr255, &pStr, &encoding)) return NULL; --- 3232,3236 ---- #endif if (!PyArg_ParseTuple(_args, "O&l", ! PyMac_GetStr255, pStr, &encoding)) return NULL; *************** *** 3203,3206 **** --- 3486,3506 ---- } + static PyObject *CF_CFStringGetMostCompatibleMacStringEncoding(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFStringEncoding _rv; + CFStringEncoding encoding; + #ifndef CFStringGetMostCompatibleMacStringEncoding + PyMac_PRECHECK(CFStringGetMostCompatibleMacStringEncoding); + #endif + if (!PyArg_ParseTuple(_args, "l", + &encoding)) + return NULL; + _rv = CFStringGetMostCompatibleMacStringEncoding(encoding); + _res = Py_BuildValue("l", + _rv); + return _res; + } + static PyObject *CF___CFStringMakeConstantString(PyObject *_self, PyObject *_args) { *************** *** 3262,3266 **** --- 3562,3637 ---- } + static PyObject *CF_CFURLCreateFromFileSystemRepresentation(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFURLRef _rv; + unsigned char *buffer__in__; + long buffer__len__; + int buffer__in_len__; + Boolean isDirectory; + #ifndef CFURLCreateFromFileSystemRepresentation + PyMac_PRECHECK(CFURLCreateFromFileSystemRepresentation); + #endif + if (!PyArg_ParseTuple(_args, "s#l", + &buffer__in__, &buffer__in_len__, + &isDirectory)) + return NULL; + buffer__len__ = buffer__in_len__; + _rv = CFURLCreateFromFileSystemRepresentation((CFAllocatorRef)NULL, + buffer__in__, buffer__len__, + isDirectory); + _res = Py_BuildValue("O&", + CFURLRefObj_New, _rv); + return _res; + } + + static PyObject *CF_CFURLCreateFromFileSystemRepresentationRelativeToBase(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFURLRef _rv; + unsigned char *buffer__in__; + long buffer__len__; + int buffer__in_len__; + Boolean isDirectory; + CFURLRef baseURL; + #ifndef CFURLCreateFromFileSystemRepresentationRelativeToBase + PyMac_PRECHECK(CFURLCreateFromFileSystemRepresentationRelativeToBase); + #endif + if (!PyArg_ParseTuple(_args, "s#lO&", + &buffer__in__, &buffer__in_len__, + &isDirectory, + OptionalCFURLRefObj_Convert, &baseURL)) + return NULL; + buffer__len__ = buffer__in_len__; + _rv = CFURLCreateFromFileSystemRepresentationRelativeToBase((CFAllocatorRef)NULL, + buffer__in__, buffer__len__, + isDirectory, + baseURL); + _res = Py_BuildValue("O&", + CFURLRefObj_New, _rv); + return _res; + } + + static PyObject *CF_CFURLCreateFromFSRef(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + CFURLRef _rv; + FSRef fsRef; + #ifndef CFURLCreateFromFSRef + PyMac_PRECHECK(CFURLCreateFromFSRef); + #endif + if (!PyArg_ParseTuple(_args, "O&", + PyMac_GetFSRef, &fsRef)) + return NULL; + _rv = CFURLCreateFromFSRef((CFAllocatorRef)NULL, + &fsRef); + _res = Py_BuildValue("O&", + CFURLRefObj_New, _rv); + return _res; + } + static PyMethodDef CF_methods[] = { + {"__CFRangeMake", (PyCFunction)CF___CFRangeMake, 1, + "(CFIndex loc, CFIndex len) -> (CFRange _rv)"}, {"CFAllocatorGetTypeID", (PyCFunction)CF_CFAllocatorGetTypeID, 1, "() -> (CFTypeID _rv)"}, *************** *** 3268,3272 **** "(CFIndex size, CFOptionFlags hint) -> (CFIndex _rv)"}, {"CFCopyTypeIDDescription", (PyCFunction)CF_CFCopyTypeIDDescription, 1, ! "(CFTypeID theType) -> (CFStringRef _rv)"}, {"CFArrayGetTypeID", (PyCFunction)CF_CFArrayGetTypeID, 1, "() -> (CFTypeID _rv)"}, --- 3639,3643 ---- "(CFIndex size, CFOptionFlags hint) -> (CFIndex _rv)"}, {"CFCopyTypeIDDescription", (PyCFunction)CF_CFCopyTypeIDDescription, 1, ! "(CFTypeID type_id) -> (CFStringRef _rv)"}, {"CFArrayGetTypeID", (PyCFunction)CF_CFArrayGetTypeID, 1, "() -> (CFTypeID _rv)"}, *************** *** 3274,3278 **** "(CFIndex capacity) -> (CFMutableArrayRef _rv)"}, {"CFArrayCreateMutableCopy", (PyCFunction)CF_CFArrayCreateMutableCopy, 1, ! "(CFIndex capacity, CFArrayRef srcArray) -> (CFMutableArrayRef _rv)"}, {"CFDataGetTypeID", (PyCFunction)CF_CFDataGetTypeID, 1, "() -> (CFTypeID _rv)"}, --- 3645,3649 ---- "(CFIndex capacity) -> (CFMutableArrayRef _rv)"}, {"CFArrayCreateMutableCopy", (PyCFunction)CF_CFArrayCreateMutableCopy, 1, ! "(CFIndex capacity, CFArrayRef theArray) -> (CFMutableArrayRef _rv)"}, {"CFDataGetTypeID", (PyCFunction)CF_CFDataGetTypeID, 1, "() -> (CFTypeID _rv)"}, *************** *** 3284,3288 **** "(CFIndex capacity) -> (CFMutableDataRef _rv)"}, {"CFDataCreateMutableCopy", (PyCFunction)CF_CFDataCreateMutableCopy, 1, ! "(CFIndex capacity, CFDataRef data) -> (CFMutableDataRef _rv)"}, {"CFDictionaryGetTypeID", (PyCFunction)CF_CFDictionaryGetTypeID, 1, "() -> (CFTypeID _rv)"}, --- 3655,3659 ---- "(CFIndex capacity) -> (CFMutableDataRef _rv)"}, {"CFDataCreateMutableCopy", (PyCFunction)CF_CFDataCreateMutableCopy, 1, ! "(CFIndex capacity, CFDataRef theData) -> (CFMutableDataRef _rv)"}, {"CFDictionaryGetTypeID", (PyCFunction)CF_CFDictionaryGetTypeID, 1, "() -> (CFTypeID _rv)"}, *************** *** 3290,3302 **** "(CFIndex capacity) -> (CFMutableDictionaryRef _rv)"}, {"CFDictionaryCreateMutableCopy", (PyCFunction)CF_CFDictionaryCreateMutableCopy, 1, ! "(CFIndex capacity, CFDictionaryRef dict) -> (CFMutableDictionaryRef _rv)"}, {"CFStringGetTypeID", (PyCFunction)CF_CFStringGetTypeID, 1, "() -> (CFTypeID _rv)"}, {"CFStringCreateWithPascalString", (PyCFunction)CF_CFStringCreateWithPascalString, 1, ! "(StringPtr pStr, CFStringEncoding encoding) -> (CFStringRef _rv)"}, {"CFStringCreateWithCString", (PyCFunction)CF_CFStringCreateWithCString, 1, "(char* cStr, CFStringEncoding encoding) -> (CFStringRef _rv)"}, {"CFStringCreateWithPascalStringNoCopy", (PyCFunction)CF_CFStringCreateWithPascalStringNoCopy, 1, ! "(StringPtr pStr, CFStringEncoding encoding) -> (CFStringRef _rv)"}, {"CFStringCreateWithCStringNoCopy", (PyCFunction)CF_CFStringCreateWithCStringNoCopy, 1, "(char* cStr, CFStringEncoding encoding) -> (CFStringRef _rv)"}, --- 3661,3673 ---- "(CFIndex capacity) -> (CFMutableDictionaryRef _rv)"}, {"CFDictionaryCreateMutableCopy", (PyCFunction)CF_CFDictionaryCreateMutableCopy, 1, ! "(CFIndex capacity, CFDictionaryRef theDict) -> (CFMutableDictionaryRef _rv)"}, {"CFStringGetTypeID", (PyCFunction)CF_CFStringGetTypeID, 1, "() -> (CFTypeID _rv)"}, {"CFStringCreateWithPascalString", (PyCFunction)CF_CFStringCreateWithPascalString, 1, ! "(Str255 pStr, CFStringEncoding encoding) -> (CFStringRef _rv)"}, {"CFStringCreateWithCString", (PyCFunction)CF_CFStringCreateWithCString, 1, "(char* cStr, CFStringEncoding encoding) -> (CFStringRef _rv)"}, {"CFStringCreateWithPascalStringNoCopy", (PyCFunction)CF_CFStringCreateWithPascalStringNoCopy, 1, ! "(Str255 pStr, CFStringEncoding encoding) -> (CFStringRef _rv)"}, {"CFStringCreateWithCStringNoCopy", (PyCFunction)CF_CFStringCreateWithCStringNoCopy, 1, "(char* cStr, CFStringEncoding encoding) -> (CFStringRef _rv)"}, *************** *** 3325,3328 **** --- 3696,3701 ---- {"CFStringConvertEncodingToIANACharSetName", (PyCFunction)CF_CFStringConvertEncodingToIANACharSetName, 1, "(CFStringEncoding encoding) -> (CFStringRef _rv)"}, + {"CFStringGetMostCompatibleMacStringEncoding", (PyCFunction)CF_CFStringGetMostCompatibleMacStringEncoding, 1, + "(CFStringEncoding encoding) -> (CFStringEncoding _rv)"}, {"__CFStringMakeConstantString", (PyCFunction)CF___CFStringMakeConstantString, 1, "(char* cStr) -> (CFStringRef _rv)"}, *************** *** 3331,3334 **** --- 3704,3713 ---- {"CFURLCreateWithBytes", (PyCFunction)CF_CFURLCreateWithBytes, 1, "(Buffer URLBytes, CFStringEncoding encoding, CFURLRef baseURL) -> (CFURLRef _rv)"}, + {"CFURLCreateFromFileSystemRepresentation", (PyCFunction)CF_CFURLCreateFromFileSystemRepresentation, 1, + "(Buffer buffer, Boolean isDirectory) -> (CFURLRef _rv)"}, + {"CFURLCreateFromFileSystemRepresentationRelativeToBase", (PyCFunction)CF_CFURLCreateFromFileSystemRepresentationRelativeToBase, 1, + "(Buffer buffer, Boolean isDirectory, CFURLRef baseURL) -> (CFURLRef _rv)"}, + {"CFURLCreateFromFSRef", (PyCFunction)CF_CFURLCreateFromFSRef, 1, + "(FSRef fsRef) -> (CFURLRef _rv)"}, {NULL, NULL, 0} }; Index: cfsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/cf/cfsupport.py,v retrieving revision 1.12 retrieving revision 1.12.4.1 diff -C2 -d -r1.12 -r1.12.4.1 *** cfsupport.py 2001/11/05 14:39:11 1.12 --- cfsupport.py 2001/12/19 15:10:14 1.12.4.1 *************** *** 172,175 **** --- 172,177 ---- CFComparisonResult = Type("CFComparisonResult", "l") # a bit dangerous, it's an enum CFURLPathStyle = Type("CFURLPathStyle", "l") # a bit dangerous, it's an enum + FSRef_ptr = OpaqueType("FSRef", "PyMac_BuildFSRef", "PyMac_GetFSRef") + FSRef = OpaqueByValueType("FSRef", "PyMac_BuildFSRef", "PyMac_GetFSRef") char_ptr = stringptr From jackjansen@users.sourceforge.net Wed Dec 19 15:10:47 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 07:10:47 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/fm _Fmmodule.c,1.3,1.3.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/fm In directory usw-pr-cvs1:/tmp/cvs-serv12554/Modules/fm Modified Files: Tag: r22rc1-branch _Fmmodule.c Log Message: Merged Mac subtree into the 22c1 branch. Index: _Fmmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/fm/_Fmmodule.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** _Fmmodule.c 2001/11/30 14:16:32 1.3 --- _Fmmodule.c 2001/12/19 15:10:15 1.3.2.1 *************** *** 6,11 **** --- 6,15 ---- + #ifdef _WIN32 + #include "pywintoolbox.h" + #else #include "macglue.h" #include "pymactoolbox.h" + #endif /* Macro to test whether a weak-loaded CFM function exists */ From jackjansen@users.sourceforge.net Wed Dec 19 15:10:47 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 07:10:47 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/help _Helpmodule.c,1.3,1.3.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/help In directory usw-pr-cvs1:/tmp/cvs-serv12554/Modules/help Modified Files: Tag: r22rc1-branch _Helpmodule.c Log Message: Merged Mac subtree into the 22c1 branch. Index: _Helpmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/help/_Helpmodule.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** _Helpmodule.c 2001/11/30 14:16:33 1.3 --- _Helpmodule.c 2001/12/19 15:10:15 1.3.2.1 *************** *** 6,11 **** --- 6,15 ---- + #ifdef _WIN32 + #include "pywintoolbox.h" + #else #include "macglue.h" #include "pymactoolbox.h" + #endif /* Macro to test whether a weak-loaded CFM function exists */ *************** *** 25,29 **** PyObject *_res = NULL; OSErr _err; ! MenuHandle mh; if (!PyArg_ParseTuple(_args, "")) return NULL; --- 29,33 ---- PyObject *_res = NULL; OSErr _err; ! MenuRef mh; if (!PyArg_ParseTuple(_args, "")) return NULL; *************** *** 240,244 **** if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! WinObj_WhichWindow, window); return _res; } --- 244,248 ---- if (_err != noErr) return PyMac_Error(_err); _res = Py_BuildValue("O&", ! WinObj_New, window); return _res; } *************** *** 246,250 **** static PyMethodDef Help_methods[] = { {"HMGetHelpMenuHandle", (PyCFunction)Help_HMGetHelpMenuHandle, 1, ! "() -> (MenuHandle mh)"}, {"HMRemoveBalloon", (PyCFunction)Help_HMRemoveBalloon, 1, "() -> None"}, --- 250,254 ---- static PyMethodDef Help_methods[] = { {"HMGetHelpMenuHandle", (PyCFunction)Help_HMGetHelpMenuHandle, 1, ! "() -> (MenuRef mh)"}, {"HMRemoveBalloon", (PyCFunction)Help_HMRemoveBalloon, 1, "() -> None"}, From jackjansen@users.sourceforge.net Wed Dec 19 15:10:47 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 07:10:47 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/drag _Dragmodule.c,1.5,1.5.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/drag In directory usw-pr-cvs1:/tmp/cvs-serv12554/Modules/drag Modified Files: Tag: r22rc1-branch _Dragmodule.c Log Message: Merged Mac subtree into the 22c1 branch. Index: _Dragmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/drag/_Dragmodule.c,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** _Dragmodule.c 2001/12/08 18:02:52 1.5 --- _Dragmodule.c 2001/12/19 15:10:15 1.5.2.1 *************** *** 6,11 **** --- 6,15 ---- + #ifdef _WIN32 + #include "pywintoolbox.h" + #else #include "macglue.h" #include "pymactoolbox.h" + #endif /* Macro to test whether a weak-loaded CFM function exists */ From jackjansen@users.sourceforge.net Wed Dec 19 15:10:47 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 07:10:47 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/evt _Evtmodule.c,1.3,1.3.2.1 evtedit.py,1.1,1.1.18.1 evtsupport.py,1.13,1.13.10.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/evt In directory usw-pr-cvs1:/tmp/cvs-serv12554/Modules/evt Modified Files: Tag: r22rc1-branch _Evtmodule.c evtedit.py evtsupport.py Log Message: Merged Mac subtree into the 22c1 branch. Index: _Evtmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/evt/_Evtmodule.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** _Evtmodule.c 2001/11/30 14:16:32 1.3 --- _Evtmodule.c 2001/12/19 15:10:15 1.3.2.1 *************** *** 6,11 **** --- 6,15 ---- + #ifdef _WIN32 + #include "pywintoolbox.h" + #else #include "macglue.h" #include "pymactoolbox.h" + #endif /* Macro to test whether a weak-loaded CFM function exists */ *************** *** 74,89 **** } - static PyObject *Evt_TickCount(PyObject *_self, PyObject *_args) - { - PyObject *_res = NULL; - UInt32 _rv; - if (!PyArg_ParseTuple(_args, "")) - return NULL; - _rv = TickCount(); - _res = Py_BuildValue("l", - _rv); - return _res; - } - static PyObject *Evt_GetCaretTime(PyObject *_self, PyObject *_args) { --- 78,81 ---- *************** *** 338,341 **** --- 330,475 ---- #endif + static PyObject *Evt_KeyScript(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + short code; + if (!PyArg_ParseTuple(_args, "h", + &code)) + return NULL; + KeyScript(code); + Py_INCREF(Py_None); + _res = Py_None; + return _res; + } + + static PyObject *Evt_IsCmdChar(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + Boolean _rv; + EventRecord event; + short test; + if (!PyArg_ParseTuple(_args, "O&h", + PyMac_GetEventRecord, &event, + &test)) + return NULL; + _rv = IsCmdChar(&event, + test); + _res = Py_BuildValue("b", + _rv); + return _res; + } + + static PyObject *Evt_LMGetKeyThresh(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + SInt16 _rv; + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = LMGetKeyThresh(); + _res = Py_BuildValue("h", + _rv); + return _res; + } + + static PyObject *Evt_LMSetKeyThresh(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + SInt16 value; + if (!PyArg_ParseTuple(_args, "h", + &value)) + return NULL; + LMSetKeyThresh(value); + Py_INCREF(Py_None); + _res = Py_None; + return _res; + } + + static PyObject *Evt_LMGetKeyRepThresh(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + SInt16 _rv; + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = LMGetKeyRepThresh(); + _res = Py_BuildValue("h", + _rv); + return _res; + } + + static PyObject *Evt_LMSetKeyRepThresh(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + SInt16 value; + if (!PyArg_ParseTuple(_args, "h", + &value)) + return NULL; + LMSetKeyRepThresh(value); + Py_INCREF(Py_None); + _res = Py_None; + return _res; + } + + static PyObject *Evt_LMGetKbdLast(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + UInt8 _rv; + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = LMGetKbdLast(); + _res = Py_BuildValue("b", + _rv); + return _res; + } + + static PyObject *Evt_LMSetKbdLast(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + UInt8 value; + if (!PyArg_ParseTuple(_args, "b", + &value)) + return NULL; + LMSetKbdLast(value); + Py_INCREF(Py_None); + _res = Py_None; + return _res; + } + + static PyObject *Evt_LMGetKbdType(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + UInt8 _rv; + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = LMGetKbdType(); + _res = Py_BuildValue("b", + _rv); + return _res; + } + + static PyObject *Evt_LMSetKbdType(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + UInt8 value; + if (!PyArg_ParseTuple(_args, "b", + &value)) + return NULL; + LMSetKbdType(value); + Py_INCREF(Py_None); + _res = Py_None; + return _res; + } + + static PyObject *Evt_TickCount(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + UInt32 _rv; + if (!PyArg_ParseTuple(_args, "")) + return NULL; + _rv = TickCount(); + _res = Py_BuildValue("l", + _rv); + return _res; + } + static PyObject *Evt_WaitNextEvent(PyObject *_self, PyObject *_args) { *************** *** 373,378 **** {"WaitMouseUp", (PyCFunction)Evt_WaitMouseUp, 1, "() -> (Boolean _rv)"}, - {"TickCount", (PyCFunction)Evt_TickCount, 1, - "() -> (UInt32 _rv)"}, {"GetCaretTime", (PyCFunction)Evt_GetCaretTime, 1, "() -> (UInt32 _rv)"}, --- 507,510 ---- *************** *** 431,434 **** --- 563,588 ---- "() -> (Boolean _rv)"}, #endif + {"KeyScript", (PyCFunction)Evt_KeyScript, 1, + "(short code) -> None"}, + {"IsCmdChar", (PyCFunction)Evt_IsCmdChar, 1, + "(EventRecord event, short test) -> (Boolean _rv)"}, + {"LMGetKeyThresh", (PyCFunction)Evt_LMGetKeyThresh, 1, + "() -> (SInt16 _rv)"}, + {"LMSetKeyThresh", (PyCFunction)Evt_LMSetKeyThresh, 1, + "(SInt16 value) -> None"}, + {"LMGetKeyRepThresh", (PyCFunction)Evt_LMGetKeyRepThresh, 1, + "() -> (SInt16 _rv)"}, + {"LMSetKeyRepThresh", (PyCFunction)Evt_LMSetKeyRepThresh, 1, + "(SInt16 value) -> None"}, + {"LMGetKbdLast", (PyCFunction)Evt_LMGetKbdLast, 1, + "() -> (UInt8 _rv)"}, + {"LMSetKbdLast", (PyCFunction)Evt_LMSetKbdLast, 1, + "(UInt8 value) -> None"}, + {"LMGetKbdType", (PyCFunction)Evt_LMGetKbdType, 1, + "() -> (UInt8 _rv)"}, + {"LMSetKbdType", (PyCFunction)Evt_LMSetKbdType, 1, + "(UInt8 value) -> None"}, + {"TickCount", (PyCFunction)Evt_TickCount, 1, + "() -> (UInt32 _rv)"}, {"WaitNextEvent", (PyCFunction)Evt_WaitNextEvent, 1, "(EventMask eventMask, UInt32 sleep [,RegionHandle]) -> (Boolean _rv, EventRecord theEvent)"}, Index: evtedit.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/evt/evtedit.py,v retrieving revision 1.1 retrieving revision 1.1.18.1 diff -C2 -d -r1.1 -r1.1.18.1 *** evtedit.py 1995/03/10 14:46:39 1.1 --- evtedit.py 2001/12/19 15:10:15 1.1.18.1 *************** *** 5,6 **** --- 5,10 ---- functions.append(f) + f = Function(UInt32, 'TickCount', + ) + functions.append(f) + Index: evtsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/evt/evtsupport.py,v retrieving revision 1.13 retrieving revision 1.13.10.1 diff -C2 -d -r1.13 -r1.13.10.1 *** evtsupport.py 2001/08/23 13:48:34 1.13 --- evtsupport.py 2001/12/19 15:10:15 1.13.10.1 *************** *** 73,76 **** --- 73,81 ---- execfile(INPUTFILE) + # Move TickCount here, for convenience + f = Function(UInt32, 'TickCount', + ) + functions.append(f) + # add the populated lists to the generator groups # (in a different wordl the scan program would generate this) *************** *** 102,105 **** --- 107,111 ---- f.docstring = lambda: "(EventMask eventMask, UInt32 sleep [,RegionHandle]) -> (Boolean _rv, EventRecord theEvent)" module.add(f) + # generate output (open the output file as late as possible) From jackjansen@users.sourceforge.net Wed Dec 19 15:10:47 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 07:10:47 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/ctl _Ctlmodule.c,1.7,1.7.2.1 ctledit.py,1.6,1.6.18.1 ctlscan.py,1.21,1.21.2.1 ctlsupport.py,1.45,1.45.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/ctl In directory usw-pr-cvs1:/tmp/cvs-serv12554/Modules/ctl Modified Files: Tag: r22rc1-branch _Ctlmodule.c ctledit.py ctlscan.py ctlsupport.py Log Message: Merged Mac subtree into the 22c1 branch. Index: _Ctlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/_Ctlmodule.c,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** _Ctlmodule.c 2001/12/12 22:51:37 1.7 --- _Ctlmodule.c 2001/12/19 15:10:14 1.7.2.1 *************** *** 6,11 **** --- 6,15 ---- + #ifdef _WIN32 + #include "pywintoolbox.h" + #else #include "macglue.h" #include "pymactoolbox.h" + #endif [...2516 lines suppressed...] + #if TARGET_API_MAC_CARBON {"CreateDataBrowserControl", (PyCFunction)Ctl_CreateDataBrowserControl, 1, "(WindowPtr window, Rect boundsRect, OSType style) -> (ControlHandle outControl)"}, + #endif + + #if TARGET_API_MAC_OSX + {"CreateEditUnicodeTextControl", (PyCFunction)Ctl_CreateEditUnicodeTextControl, 1, + "(WindowPtr window, Rect boundsRect, CFStringRef text, Boolean isPassword, ControlFontStyleRec style) -> (ControlHandle outControl)"}, + #endif + {"FindControlUnderMouse", (PyCFunction)Ctl_FindControlUnderMouse, 1, + "(Point inWhere, WindowPtr inWindow) -> (ControlHandle _rv, SInt16 outPart)"}, {"as_Control", (PyCFunction)Ctl_as_Control, 1, "(Handle h) -> (ControlHandle _rv)"}, + + #if TARGET_API_MAC_CARBON + {"CreateTabsControl", (PyCFunction)Ctl_CreateTabsControl, 1, + "(WindowPtr window, Rect boundsRect, UInt16 size, UInt16 direction, ControlTabEntry tabArray) -> (ControlHandle outControl)"}, + #endif {NULL, NULL, 0} }; Index: ctledit.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctledit.py,v retrieving revision 1.6 retrieving revision 1.6.18.1 diff -C2 -d -r1.6 -r1.6.18.1 *** ctledit.py 2000/03/21 16:25:23 1.6 --- ctledit.py 2001/12/19 15:10:14 1.6.18.1 *************** *** 1,2 **** --- 1,11 ---- + # FindControlUnderMouse() returns an existing control, not a new one, + # so create this one by hand. + f = Function(ExistingControlHandle, 'FindControlUnderMouse', + (Point, 'inWhere', InMode), + (WindowRef, 'inWindow', InMode), + (SInt16, 'outPart', OutMode), + ) + functions.append(f) + f = Function(ControlHandle, 'as_Control', (Handle, 'h', InMode)) *************** *** 26,27 **** --- 35,45 ---- methods.append(f) + + # All CreateXxxXxxControl() functions return a new object in an output + # parameter; these should however be managed by us (we're creating them + # after all), so set the type to ControlRef. + for f in functions: + if f.name.startswith("Create"): + v = f.argumentList[-1] + if v.type == ExistingControlHandle: + v.type = ControlRef Index: ctlscan.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctlscan.py,v retrieving revision 1.21 retrieving revision 1.21.2.1 diff -C2 -d -r1.21 -r1.21.2.1 *** ctlscan.py 2001/12/12 22:38:27 1.21 --- ctlscan.py 2001/12/19 15:10:14 1.21.2.1 *************** *** 46,49 **** --- 46,50 ---- def makeblacklistnames(self): return [ + 'FindControlUnderMouse', # Generated manually, returns an existing control, not a new one. 'DisposeControl', # Generated manually 'KillControls', # Implied by close of dialog *************** *** 87,98 **** 'GetControlPropertySize', 'SendControlMessage', # Parameter changed from long to void* from UH3.3 to UH3.4 ! # unavailable in Just's CW6 + UH 3.4 libs ! 'CreateDisclosureButtonControl', ! 'CreateRelevanceBarControl', ! 'DisableControl', ! 'EnableControl', ! 'IsControlEnabled', ! 'CreateEditUnicodeTextControl', ! 'CopyDataBrowserEditText', ] --- 88,96 ---- 'GetControlPropertySize', 'SendControlMessage', # Parameter changed from long to void* from UH3.3 to UH3.4 ! 'CreateTabsControl', # wrote manually ! ! # too lazy for now ! 'GetImageWellContentInfo', ! 'GetBevelButtonContentInfo', ] *************** *** 127,130 **** --- 125,232 ---- 'GetControlClickActivation', 'HandleControlContextualMenuClick', + + "CreateBevelButtonControl", + "CreateImageWellControl", + "CreatePictureControl", + "CreateIconControl", + "CreatePushButtonWithIconControl", + "SetBevelButtonContentInfo", + "SetImageWellContentInfo", + "AddDataBrowserListViewColumn", + + "CreateDataBrowserControl", + "CreateScrollingTextBoxControl", + "CreateRadioGroupControl", + "CreatePopupButtonControl", + "CreateCheckBoxControl", + "CreateRadioButtonControl", + "CreatePushButtonControl", + "CreateWindowHeaderControl", + "CreateStaticTextControl", + "CreateEditTextControl", + "CreateUserPaneControl", + "CreateClockControl", + "CreatePlacardControl", + "CreatePopupArrowControl", + "CreatePopupGroupBoxControl", + "CreateCheckGroupBoxControl", + "CreateGroupBoxControl", + "CreateSeparatorControl", + "CreateChasingArrowsControl", + "CreateLittleArrowsControl", + "CreateProgressBarControl", + "CreateDisclosureTriangleControl", + "GetDataBrowserColumnViewDisplayType", + "SetDataBrowserColumnViewDisplayType", + "GetDataBrowserColumnViewPathLength", + "GetDataBrowserColumnViewPath", + "GetDataBrowserListViewDisclosureColumn", + "SetDataBrowserListViewDisclosureColumn", + "GetDataBrowserListViewUsePlainBackground", + "SetDataBrowserListViewUsePlainBackground", + "GetDataBrowserListViewHeaderBtnHeight", + "SetDataBrowserListViewHeaderBtnHeight", + "AutoSizeDataBrowserListViewColumns", + "GetDataBrowserTableViewColumnProperty", + "GetDataBrowserTableViewColumnPosition", + "SetDataBrowserTableViewColumnPosition", + "GetDataBrowserTableViewItemRow", + "SetDataBrowserTableViewItemRow", + "GetDataBrowserTableViewItemID", + "GetDataBrowserTableViewGeometry", + "SetDataBrowserTableViewGeometry", + "GetDataBrowserTableViewNamedColumnWidth", + "SetDataBrowserTableViewNamedColumnWidth", + "GetDataBrowserTableViewItemRowHeight", + "SetDataBrowserTableViewItemRowHeight", + "GetDataBrowserTableViewColumnWidth", + "SetDataBrowserTableViewColumnWidth", + "GetDataBrowserTableViewRowHeight", + "SetDataBrowserTableViewRowHeight", + "GetDataBrowserTableViewHiliteStyle", + "SetDataBrowserTableViewHiliteStyle", + "GetDataBrowserTableViewColumnCount", + "RemoveDataBrowserTableViewColumn", + "GetDataBrowserItemPartBounds", + "GetDataBrowserEditItem", + "SetDataBrowserEditItem", + "GetDataBrowserEditText", + "SetDataBrowserEditText", + "GetDataBrowserPropertyFlags", + "SetDataBrowserPropertyFlags", + "GetDataBrowserSelectionFlags", + "SetDataBrowserSelectionFlags", + "GetDataBrowserSortProperty", + "SetDataBrowserSortProperty", + "GetDataBrowserHasScrollBars", + "SetDataBrowserHasScrollBars", + "GetDataBrowserScrollPosition", + "SetDataBrowserScrollPosition", + "GetDataBrowserSortOrder", + "SetDataBrowserSortOrder", + "GetDataBrowserTarget", + "SetDataBrowserTarget", + "GetDataBrowserScrollBarInset", + "SetDataBrowserScrollBarInset", + "GetDataBrowserActiveItems", + "SetDataBrowserActiveItems", + "RevealDataBrowserItem", + "GetDataBrowserItemState", + "IsDataBrowserItemSelected", + "GetDataBrowserItemCount", + "GetDataBrowserItems", + "SortDataBrowserContainer", + "CloseDataBrowserContainer", + "OpenDataBrowserContainer", + "MoveDataBrowserSelectionAnchor", + "GetDataBrowserSelectionAnchor", + "ExecuteDataBrowserEditCommand", + "EnableDataBrowserEditCommand", + "SetDataBrowserViewStyle", + "GetDataBrowserViewStyle", + "GetControlCommandID", + "SetControlCommandID", + "CopyControlTitleAsCFString", + "SetControlTitleWithCFString", ]), ('#if ACCESSOR_CALLS_ARE_FUNCTIONS', [ *************** *** 142,146 **** 'SetControlPopupMenuHandle', 'SetControlPopupMenuID', ! ])] def makeblacklisttypes(self): --- 244,259 ---- 'SetControlPopupMenuHandle', 'SetControlPopupMenuID', ! ]), ! ('#if TARGET_API_MAC_OSX', [ ! 'CreateRoundButtonControl', ! 'CreateDisclosureButtonControl', ! 'CreateRelevanceBarControl', ! 'DisableControl', ! 'EnableControl', ! 'IsControlEnabled', ! 'CreateEditUnicodeTextControl', ! 'CopyDataBrowserEditText', ! ]), ! ] def makeblacklisttypes(self): *************** *** 148,152 **** 'ProcPtr', 'ControlActionUPP', - 'ControlButtonContentInfoPtr', 'Ptr', 'ControlDefSpec', # Don't know how to do this yet --- 261,264 ---- *************** *** 156,162 **** 'ControlColorUPP', 'ControlKind', # XXX easy: 2-tuple containing 2 OSType's ! 'ControlTabEntry_ptr', # XXX needed for tabs ! 'ControlButtonContentInfo', # XXX ugh: a union ! 'ControlButtonContentInfo_ptr', # XXX ugh: a union 'ListDefSpec_ptr', # XXX see _Listmodule.c, tricky but possible 'DataBrowserItemID_ptr', # XXX array of UInt32, for BrowserView --- 268,275 ---- 'ControlColorUPP', 'ControlKind', # XXX easy: 2-tuple containing 2 OSType's ! # 'ControlTabEntry_ptr', # XXX needed for tabs ! # 'ControlButtonContentInfoPtr', ! # 'ControlButtonContentInfo', # XXX ugh: a union ! # 'ControlButtonContentInfo_ptr', # XXX ugh: a union 'ListDefSpec_ptr', # XXX see _Listmodule.c, tricky but possible 'DataBrowserItemID_ptr', # XXX array of UInt32, for BrowserView *************** *** 167,172 **** 'DataBrowserCustomCallbacks', 'DataBrowserCustomCallbacks_ptr', ! 'DataBrowserTableViewColumnDesc', ! 'DataBrowserListViewColumnDesc', 'CFDataRef', ] --- 280,285 ---- 'DataBrowserCustomCallbacks', 'DataBrowserCustomCallbacks_ptr', ! ## 'DataBrowserTableViewColumnDesc', ! ## 'DataBrowserListViewColumnDesc', 'CFDataRef', ] *************** *** 198,201 **** --- 311,323 ---- ([("Rect_ptr", "*", "ReturnMode")], # GetControlBounds [("void", "*", "ReturnMode")]), + + ([("DataBrowserListViewColumnDesc", "*", "OutMode")], + [("DataBrowserListViewColumnDesc", "*", "InMode")]), + + ([("ControlButtonContentInfoPtr", 'outContent', "InMode")], + [("ControlButtonContentInfoPtr", '*', "OutMode")]), + + ([("ControlButtonContentInfo", '*', "OutMode")], + [("ControlButtonContentInfo", '*', "InMode")]), ] Index: ctlsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctlsupport.py,v retrieving revision 1.45 retrieving revision 1.45.2.1 diff -C2 -d -r1.45 -r1.45.2.1 *** ctlsupport.py 2001/12/12 22:51:39 1.45 --- ctlsupport.py 2001/12/19 15:10:14 1.45.2.1 *************** *** 79,84 **** --- 79,98 ---- ControlDisclosureTriangleOrientation = UInt16 + DataBrowserTableViewColumnDesc = OpaqueType("DataBrowserTableViewColumnDesc", + "DataBrowserTableViewColumnDesc") + DataBrowserListViewColumnDesc = OpaqueType("DataBrowserListViewColumnDesc", + "DataBrowserListViewColumnDesc") + ControlButtonContentInfo = OpaqueType("ControlButtonContentInfo", + "ControlButtonContentInfo") + ControlButtonContentInfoPtr = ControlButtonContentInfo_ptr = ControlButtonContentInfo + ControlTabEntry_ptr = OpaqueType("ControlTabEntry", "ControlTabEntry") + ControlBevelThickness = UInt16 + ControlBevelButtonBehavior = UInt16 + ControlBevelButtonMenuBehavior = UInt16 + ControlBevelButtonMenuPlacement = UInt16 + ControlPushButtonIconAlignment = UInt16 + includestuff = includestuff + """ #ifdef WITHOUT_FRAMEWORKS *************** *** 107,110 **** --- 121,125 ---- #endif + #define MAXTABS 32 /* maximum number of tabs that we support in a tabs control */ /* ** Parse/generate ControlFontStyleRec records *************** *** 124,128 **** ControlFontStyle_Convert(PyObject *v, ControlFontStyleRec *itself) { ! return PyArg_ParseTuple(v, "hhhhhhO&O&", &itself->flags, &itself->font, &itself->size, &itself->style, &itself->mode, &itself->just, QdRGB_Convert, &itself->foreColor, --- 139,143 ---- ControlFontStyle_Convert(PyObject *v, ControlFontStyleRec *itself) { ! return PyArg_Parse(v, "(hhhhhhO&O&)", &itself->flags, &itself->font, &itself->size, &itself->style, &itself->mode, &itself->just, QdRGB_Convert, &itself->foreColor, *************** *** 143,149 **** PyControlID_Convert(PyObject *v, ControlID *itself) { ! return PyArg_ParseTuple(v, "O&l", PyMac_GetOSType, &itself->signature, &itself->id); } /* TrackControl and HandleControlClick callback support */ --- 158,205 ---- PyControlID_Convert(PyObject *v, ControlID *itself) { ! return PyArg_Parse(v, "(O&l)", PyMac_GetOSType, &itself->signature, &itself->id); ! } ! ! /* ! ** generate DataBrowserListViewColumnDesc records ! */ ! static int ! DataBrowserTableViewColumnDesc_Convert(PyObject *v, DataBrowserTableViewColumnDesc *itself) ! { ! return PyArg_Parse(v, "(lO&l)", ! &itself->propertyID, ! PyMac_GetOSType, &itself->propertyType, ! &itself->propertyFlags); ! } ! ! static int ! ControlButtonContentInfo_Convert(PyObject *v, ControlButtonContentInfo *itself) ! { ! return PyArg_Parse(v, "(hO&)", ! &itself->contentType, ! OptResObj_Convert, &itself->u.iconSuite); ! } ! ! static int ! DataBrowserListViewHeaderDesc_Convert(PyObject *v, DataBrowserListViewHeaderDesc *itself) ! { ! itself->version = kDataBrowserListViewLatestHeaderDesc; ! return PyArg_Parse(v, "(HHhO&HO&O&)", ! &itself->minimumWidth, ! &itself->maximumWidth, ! &itself->titleOffset, ! CFStringRefObj_Convert, &itself->titleString, ! &itself->initialOrder, ! ControlFontStyle_Convert, &itself->btnFontStyle, ! ControlButtonContentInfo_Convert, &itself->btnContentInfo); } + static int + DataBrowserListViewColumnDesc_Convert(PyObject *v, DataBrowserListViewColumnDesc *itself) + { + return PyArg_Parse(v, "(O&O&)", + DataBrowserTableViewColumnDesc_Convert, &itself->propertyDesc, + DataBrowserListViewHeaderDesc_Convert, &itself->headerBtnDesc); + } /* TrackControl and HandleControlClick callback support */ *************** *** 665,668 **** --- 721,783 ---- object.add(f) + + createtabscontrol_body = """\ + OSStatus _err; + WindowPtr window; + Rect boundsRect; + UInt16 size; + UInt16 direction; + int i; + UInt16 numTabs; + ControlTabEntry tabArray[MAXTABS]; + ControlHandle outControl; + PyObject *tabArrayObj, *tabEntry; + + #ifndef CreateTabsControl + PyMac_PRECHECK(CreateTabsControl); + #endif + if (!PyArg_ParseTuple(_args, "O&O&HHO", + WinObj_Convert, &window, + PyMac_GetRect, &boundsRect, + &size, + &direction, + &tabArrayObj)) + return NULL; + + i = PySequence_Length(tabArrayObj); + if (i == -1) + return NULL; + if (i > MAXTABS) { + PyErr_SetString(Ctl_Error, "Too many tabs"); + return NULL; + } + numTabs = i; + for (i=0; i (ControlHandle outControl)" + module.add(f) # generate output (open the output file as late as possible) From jackjansen@users.sourceforge.net Wed Dec 19 15:10:48 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 07:10:48 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/list _Listmodule.c,1.7,1.7.2.1 listscan.py,1.8,1.8.4.1 listsupport.py,1.13,1.13.4.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/list In directory usw-pr-cvs1:/tmp/cvs-serv12554/Modules/list Modified Files: Tag: r22rc1-branch _Listmodule.c listscan.py listsupport.py Log Message: Merged Mac subtree into the 22c1 branch. Index: _Listmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/list/_Listmodule.c,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** _Listmodule.c 2001/12/08 18:02:52 1.7 --- _Listmodule.c 2001/12/19 15:10:15 1.7.2.1 *************** *** 6,11 **** --- 6,15 ---- + #ifdef _WIN32 + #include "pywintoolbox.h" + #else #include "macglue.h" #include "pymactoolbox.h" + #endif /* Macro to test whether a weak-loaded CFM function exists */ *************** *** 379,384 **** Boolean _rv; Point pt; ! short modifiers; ! if (!PyArg_ParseTuple(_args, "O&h", PyMac_GetPoint, &pt, &modifiers)) --- 383,388 ---- Boolean _rv; Point pt; ! EventModifiers modifiers; ! if (!PyArg_ParseTuple(_args, "O&H", PyMac_GetPoint, &pt, &modifiers)) *************** *** 581,585 **** "(Point cSize) -> None"}, {"LClick", (PyCFunction)ListObj_LClick, 1, ! "(Point pt, short modifiers) -> (Boolean _rv)"}, {"LAddToCell", (PyCFunction)ListObj_LAddToCell, 1, "(Buffer dataPtr, Point theCell) -> None"}, --- 585,589 ---- "(Point cSize) -> None"}, {"LClick", (PyCFunction)ListObj_LClick, 1, ! "(Point pt, EventModifiers modifiers) -> (Boolean _rv)"}, {"LAddToCell", (PyCFunction)ListObj_LAddToCell, 1, "(Buffer dataPtr, Point theCell) -> None"}, Index: listscan.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/list/listscan.py,v retrieving revision 1.8 retrieving revision 1.8.4.1 diff -C2 -d -r1.8 -r1.8.4.1 *** listscan.py 2001/11/05 08:27:57 1.8 --- listscan.py 2001/12/19 15:10:15 1.8.4.1 *************** *** 57,60 **** --- 57,61 ---- return [ "ListClickLoopUPP", # Too difficult for now + "ListDefSpecPtr", # later ] Index: listsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/list/listsupport.py,v retrieving revision 1.13 retrieving revision 1.13.4.1 diff -C2 -d -r1.13 -r1.13.4.1 *** listsupport.py 2001/11/05 11:12:12 1.13 --- listsupport.py 2001/12/19 15:10:15 1.13.4.1 *************** *** 37,40 **** --- 37,41 ---- Handle = OpaqueByValueType("Handle", "ResObj") CGrafPtr = OpaqueByValueType("CGrafPtr", "GrafObj") + EventModifiers = Type("EventModifiers", "H") includestuff = includestuff + """ From jackjansen@users.sourceforge.net Wed Dec 19 15:10:47 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 07:10:47 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/icn _Icnmodule.c,1.3,1.3.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/icn In directory usw-pr-cvs1:/tmp/cvs-serv12554/Modules/icn Modified Files: Tag: r22rc1-branch _Icnmodule.c Log Message: Merged Mac subtree into the 22c1 branch. Index: _Icnmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/icn/_Icnmodule.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** _Icnmodule.c 2001/11/30 14:16:33 1.3 --- _Icnmodule.c 2001/12/19 15:10:15 1.3.2.1 *************** *** 6,11 **** --- 6,15 ---- + #ifdef _WIN32 + #include "pywintoolbox.h" + #else #include "macglue.h" #include "pymactoolbox.h" + #endif /* Macro to test whether a weak-loaded CFM function exists */ From gvanrossum@users.sourceforge.net Wed Dec 19 16:38:31 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Wed, 19 Dec 2001 08:38:31 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test pickletester.py,1.10,1.11 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv6847 Modified Files: pickletester.py Log Message: The test using class initarg failed, because it was lacking a __safe_for_unpickling__ attribute. Index: pickletester.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/pickletester.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** pickletester.py 2001/10/18 21:57:37 1.10 --- pickletester.py 2001/12/19 16:38:29 1.11 *************** *** 15,18 **** --- 15,21 ---- class initarg(C): + + __safe_for_unpickling__ = 1 + def __init__(self, a, b): self.a = a From fdrake@users.sourceforge.net Wed Dec 19 16:42:17 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Wed, 19 Dec 2001 08:42:17 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_pickle.py,1.8,1.9 test_cpickle.py,1.9,1.10 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv7926 Modified Files: test_pickle.py test_cpickle.py Log Message: Fix the test control support for the pickle & cPickle tests so the tests run under regrtest. Index: test_pickle.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_pickle.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** test_pickle.py 2001/10/18 21:57:37 1.8 --- test_pickle.py 2001/12/19 16:42:15 1.9 *************** *** 1,6 **** import pickle from cStringIO import StringIO from pickletester import AbstractPickleTests, AbstractPickleModuleTests - from test_support import run_unittest class PickleTests(AbstractPickleTests, AbstractPickleModuleTests): --- 1,7 ---- import pickle + import test_support + import unittest from cStringIO import StringIO from pickletester import AbstractPickleTests, AbstractPickleModuleTests class PickleTests(AbstractPickleTests, AbstractPickleModuleTests): *************** *** 29,33 **** return u.load() if __name__ == "__main__": ! run_unittest(PickleTests) ! run_unittest(PicklerTests) --- 30,40 ---- return u.load() + def test_main(): + loader = unittest.TestLoader() + suite = unittest.TestSuite() + suite.addTest(loader.loadTestsFromTestCase(PickleTests)) + suite.addTest(loader.loadTestsFromTestCase(PicklerTests)) + test_support.run_suite(suite) + if __name__ == "__main__": ! test_main() Index: test_cpickle.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_cpickle.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** test_cpickle.py 2001/10/18 21:57:37 1.9 --- test_cpickle.py 2001/12/19 16:42:15 1.10 *************** *** 1,6 **** import cPickle from cStringIO import StringIO from pickletester import AbstractPickleTests, AbstractPickleModuleTests - from test_support import run_unittest class cPickleTests(AbstractPickleTests, AbstractPickleModuleTests): --- 1,7 ---- import cPickle + import test_support + import unittest from cStringIO import StringIO from pickletester import AbstractPickleTests, AbstractPickleModuleTests class cPickleTests(AbstractPickleTests, AbstractPickleModuleTests): *************** *** 80,86 **** self) if __name__ == "__main__": ! run_unittest(cPickleTests) ! run_unittest(cPicklePicklerTests) ! run_unittest(cPickleListPicklerTests) ! run_unittest(cPickleFastPicklerTests) --- 81,93 ---- self) + def test_main(): + loader = unittest.TestLoader() + suite = unittest.TestSuite() + suite.addTest(loader.loadTestsFromTestCase(cPickleTests)) + suite.addTest(loader.loadTestsFromTestCase(cPicklePicklerTests)) + suite.addTest(loader.loadTestsFromTestCase(cPickleListPicklerTests)) + suite.addTest(loader.loadTestsFromTestCase(cPickleFastPicklerTests)) + test_support.run_suite(suite) + if __name__ == "__main__": ! test_main() From fdrake@users.sourceforge.net Wed Dec 19 16:44:32 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Wed, 19 Dec 2001 08:44:32 -0800 Subject: [Python-checkins] CVS: python/dist/src/Objects weakrefobject.c,1.7,1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Objects In directory usw-pr-cvs1:/tmp/cvs-serv8472/Objects Modified Files: weakrefobject.c Log Message: proxy_compare(): Make sure that we unwrap both objects being compared if both are proxy objects. Index: weakrefobject.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Objects/weakrefobject.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** weakrefobject.c 2001/12/10 23:44:54 1.7 --- weakrefobject.c 2001/12/19 16:44:30 1.8 *************** *** 221,224 **** --- 221,231 ---- } + #define UNWRAP_I(o) \ + if (PyWeakref_CheckProxy(o)) { \ + if (!proxy_checkref((PyWeakReference *)o)) \ + return -1; \ + o = PyWeakref_GET_OBJECT(o); \ + } + #define WRAP_UNARY(method, generic) \ static PyObject * \ *************** *** 285,293 **** static int ! proxy_compare(PyWeakReference *proxy, PyObject *v) { ! if (!proxy_checkref(proxy)) ! return -1; ! return PyObject_Compare(PyWeakref_GET_OBJECT(proxy), v); } --- 292,300 ---- static int ! proxy_compare(PyObject *proxy, PyObject *v) { ! UNWRAP_I(proxy); ! UNWRAP_I(v); ! return PyObject_Compare(proxy, v); } *************** *** 452,456 **** 0, /*tp_getattr*/ 0, /*tp_setattr*/ ! (cmpfunc)proxy_compare, /*tp_compare*/ (unaryfunc)proxy_repr, /*tp_repr*/ &proxy_as_number, /*tp_as_number*/ --- 459,463 ---- 0, /*tp_getattr*/ 0, /*tp_setattr*/ ! proxy_compare, /*tp_compare*/ (unaryfunc)proxy_repr, /*tp_repr*/ &proxy_as_number, /*tp_as_number*/ *************** *** 483,487 **** 0, /*tp_getattr*/ 0, /*tp_setattr*/ ! (cmpfunc)proxy_compare, /*tp_compare*/ (unaryfunc)proxy_repr, /*tp_repr*/ &proxy_as_number, /*tp_as_number*/ --- 490,494 ---- 0, /*tp_getattr*/ 0, /*tp_setattr*/ ! proxy_compare, /*tp_compare*/ (unaryfunc)proxy_repr, /*tp_repr*/ &proxy_as_number, /*tp_as_number*/ From fdrake@users.sourceforge.net Wed Dec 19 16:54:25 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Wed, 19 Dec 2001 08:54:25 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_weakref.py,1.16,1.17 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv11361/Lib/test Modified Files: test_weakref.py Log Message: Add some additional tests that check more proxy behaviors. Index: test_weakref.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_weakref.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** test_weakref.py 2001/12/10 23:46:02 1.16 --- test_weakref.py 2001/12/19 16:54:23 1.17 *************** *** 1,4 **** --- 1,5 ---- import sys import unittest + import UserList import weakref *************** *** 149,152 **** --- 150,170 ---- o = C() self.check_proxy(o, weakref.proxy(o)) + + L = UserList.UserList() + p = weakref.proxy(L) + self.failIf(p, "proxy for empty UserList should be false") + p.append(12) + self.assertEqual(len(L), 1) + self.failUnless(p, "proxy for non-empty UserList should be true") + p[:] = [2, 3] + self.assertEqual(len(L), 2) + self.assertEqual(len(p), 2) + self.failUnless(3 in p, "proxy didn't support __contains__() properly") + p[1] = 5 + self.assertEqual(L[1], 5) + self.assertEqual(p[1], 5) + L2 = UserList.UserList(L) + p2 = weakref.proxy(L2) + self.assertEqual(p, p2) def test_callable_proxy(self): From gvanrossum@users.sourceforge.net Wed Dec 19 16:55:07 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Wed, 19 Dec 2001 08:55:07 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib pickle.py,1.55,1.56 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv11580 Modified Files: pickle.py Log Message: Pickler.save(): Fix for SF bug #494904: Cannot pickle a class with a metaclass, reported by Dan Parisien. Objects that are instances of custom metaclasses, i.e. whose class is a subclass of 'type', should be pickled the same as new-style classes (objects whose class is 'type'). This can't be done through a dispatch table entry, and the __reduce__ trick doesn't work for these, since it finds the unbound __reduce__ for instances of the class (inherited from 'object'). So check explicitly using issubclass(). Index: pickle.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/pickle.py,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** pickle.py 2001/11/15 23:42:58 1.55 --- pickle.py 2001/12/19 16:55:02 1.56 *************** *** 164,167 **** --- 164,171 ---- f = self.dispatch[t] except KeyError: + if issubclass(t, TypeType): + self.save_global(object) + return + pid = self.inst_persistent_id(object) if pid is not None: From gvanrossum@users.sourceforge.net Wed Dec 19 16:57:02 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Wed, 19 Dec 2001 08:57:02 -0800 Subject: [Python-checkins] CVS: python/dist/src/Modules cPickle.c,2.72,2.73 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv12245 Modified Files: cPickle.c Log Message: save(): Fix for SF bug #494904: Cannot pickle a class with a metaclass, reported by Dan Parisien. Objects that are instances of custom metaclasses, i.e. whose ob_type is a subclass of PyType_Type, should be pickled the same as new-style classes (objects whose ob_type is PyType_Type). This can't be done through the existing dispatch switches, and the __reduce__ trick doesn't work for these, since it finds the unbound __reduce__ for instances of the class (inherited from PyBaseObject_Type). So check explicitly using PyType_IsSubtype(). Index: cPickle.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v retrieving revision 2.72 retrieving revision 2.73 diff -C2 -d -r2.72 -r2.73 *** cPickle.c 2001/12/08 18:02:55 2.72 --- cPickle.c 2001/12/19 16:56:54 2.73 *************** *** 1991,1994 **** --- 1991,1999 ---- } + if (PyType_IsSubtype(type, &PyType_Type)) { + res = save_global(self, args, NULL); + goto finally; + } + if (!pers_save && self->inst_pers_func) { if ((tmp = save_pers(self, args, self->inst_pers_func)) != 0) { From gvanrossum@users.sourceforge.net Wed Dec 19 16:57:38 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Wed, 19 Dec 2001 08:57:38 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc ACKS,1.146,1.147 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv12595 Modified Files: ACKS Log Message: Fix for SF bug #494904: Cannot pickle a class with a metaclass, reported by Dan Parisien. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.146 retrieving revision 1.147 diff -C2 -d -r1.146 -r1.147 *** ACKS 2001/12/19 04:41:35 1.146 --- ACKS 2001/12/19 16:57:36 1.147 *************** *** 324,327 **** --- 324,328 ---- Douglas Orr Todd R. Palmer + Dan Parisien Harri Pasanen Randy Pausch From gvanrossum@users.sourceforge.net Wed Dec 19 16:58:56 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Wed, 19 Dec 2001 08:58:56 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test pickletester.py,1.11,1.12 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv13004 Modified Files: pickletester.py Log Message: Add test for pickling new-style class with custom metaclass. Index: pickletester.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/pickletester.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** pickletester.py 2001/12/19 16:38:29 1.11 --- pickletester.py 2001/12/19 16:58:54 1.12 *************** *** 25,28 **** --- 25,34 ---- return self.a, self.b + class metaclass(type): + pass + + class use_metaclass(object): + __metaclass__ = metaclass + # break into multiple strings to avoid confusing font-lock-mode DATA = """(lp1 *************** *** 236,239 **** --- 242,251 ---- def test_getinitargs(self): pass + + def test_metaclass(self): + a = use_metaclass() + s = self.dumps(a) + b = self.loads(s) + self.assertEqual(a.__class__, b.__class__) class AbstractPickleModuleTests(unittest.TestCase): From tim_one@users.sourceforge.net Wed Dec 19 19:05:04 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Wed, 19 Dec 2001 11:05:04 -0800 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.215,2.216 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv13624/python/Modules Modified Files: posixmodule.c Log Message: SF bug #495021: Crash calling os.stat with a trailing backslash Patch from Mark Hammond, plus code rearrangement and comments from me. posix_do_stat(): Windows-specific code could try to free() stack memory in some cases when a path ending with a forward or backward slash was passed to os.stat(). Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.215 retrieving revision 2.216 diff -C2 -d -r2.215 -r2.216 *** posixmodule.c 2001/12/08 18:02:57 2.215 --- posixmodule.c 2001/12/19 19:05:01 2.216 *************** *** 680,689 **** { STRUCT_STAT st; ! char *path = NULL; int res; #ifdef MS_WIN32 ! int pathlen; ! char pathcopy[MAX_PATH]; #endif /* MS_WIN32 */ --- 680,690 ---- { STRUCT_STAT st; ! char *path = NULL; /* pass this to stat; do not free() it */ ! char *pathfree = NULL; /* this memory must be free'd */ int res; #ifdef MS_WIN32 ! int pathlen; ! char pathcopy[MAX_PATH]; #endif /* MS_WIN32 */ *************** *** 691,694 **** --- 692,696 ---- Py_FileSystemDefaultEncoding, &path)) return NULL; + pathfree = path; #ifdef MS_WIN32 *************** *** 696,713 **** /* the library call can blow up if the file name is too long! */ if (pathlen > MAX_PATH) { ! PyMem_Free(path); errno = ENAMETOOLONG; return posix_error(); } ! if ((pathlen > 0) && (path[pathlen-1] == '\\' || path[pathlen-1] == '/')) { ! /* exception for specific or current drive root */ ! if (!((pathlen == 1) || ! ((pathlen == 3) && ! (path[1] == ':') && ! (path[2] == '\\' || path[2] == '/')))) ! { strncpy(pathcopy, path, pathlen); ! pathcopy[pathlen-1] = '\0'; /* nuke the trailing backslash */ path = pathcopy; } --- 698,719 ---- /* the library call can blow up if the file name is too long! */ if (pathlen > MAX_PATH) { ! PyMem_Free(pathfree); errno = ENAMETOOLONG; return posix_error(); } ! /* Remove trailing slash or backslash, unless it's the current ! drive root (/ or \) or a specific drive's root (like c:\ or c:/). ! */ ! if (pathlen > 0 && ! (path[pathlen-1]== '\\' || path[pathlen-1] == '/')) { ! /* It does end with a slash -- exempt the root drive cases. */ ! /* XXX UNC root drives should also be exempted? */ ! if (pathlen == 1 || (pathlen == 3 && path[1] == ':')) ! /* leave it alone */; ! else { ! /* nuke the trailing backslash */ strncpy(pathcopy, path, pathlen); ! pathcopy[pathlen-1] = '\0'; path = pathcopy; } *************** *** 719,725 **** Py_END_ALLOW_THREADS if (res != 0) ! return posix_error_with_allocated_filename(path); ! PyMem_Free(path); return _pystat_fromstructstat(st); } --- 725,731 ---- Py_END_ALLOW_THREADS if (res != 0) ! return posix_error_with_allocated_filename(pathfree); ! PyMem_Free(pathfree); return _pystat_fromstructstat(st); } From jhylton@users.sourceforge.net Wed Dec 19 19:42:54 2001 From: jhylton@users.sourceforge.net (Jeremy Hylton) Date: Wed, 19 Dec 2001 11:42:54 -0800 Subject: [Python-checkins] CVS: python/dist/src/Tools/compiler regrtest.py,1.1,1.1.6.1 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/compiler In directory usw-pr-cvs1:/tmp/cvs-serv25934 Modified Files: Tag: release21-maint regrtest.py Log Message: Backport changes from the 2.2 trunk Index: regrtest.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/regrtest.py,v retrieving revision 1.1 retrieving revision 1.1.6.1 diff -C2 -d -r1.1 -r1.1.6.1 *** regrtest.py 2000/10/13 22:00:13 1.1 --- regrtest.py 2001/12/19 19:42:52 1.1.6.1 *************** *** 22,31 **** return dest def compile_files(dir): ! print "Compiling", line_len = 10 for file in os.listdir(dir): base, ext = os.path.splitext(file) ! if ext == '.py' and base[:4] == 'test': source = os.path.join(dir, file) line_len = line_len + len(file) + 1 --- 22,40 ---- return dest + def copy_library(): + dest = tempfile.mktemp() + os.mkdir(dest) + libdir = os.path.split(test.__path__[0])[0] + print "Found standard library in", libdir + print "Creating copy of standard library in", dest + os.system("cp -r %s/* %s" % (libdir, dest)) + return dest + def compile_files(dir): ! print "Compiling", dir, "\n\t", line_len = 10 for file in os.listdir(dir): base, ext = os.path.splitext(file) ! if ext == '.py': source = os.path.join(dir, file) line_len = line_len + len(file) + 1 *************** *** 34,45 **** line_len = len(source) + 9 print file, ! compile(source) # make sure the .pyc file is not over-written os.chmod(source + "c", 444) print ! def run_regrtest(test_dir): os.chdir(test_dir) ! os.system("%s -v regrtest.py" % sys.executable) def cleanup(dir): --- 43,67 ---- line_len = len(source) + 9 print file, ! try: ! compile(source) ! except SyntaxError, err: ! print err ! continue # make sure the .pyc file is not over-written os.chmod(source + "c", 444) + else: + path = os.path.join(dir, file) + if os.path.isdir(path): + print + print + compile_files(path) + print "\t", + line_len = 10 print ! def run_regrtest(lib_dir): ! test_dir = os.path.join(lib_dir, "test") os.chdir(test_dir) ! os.system("PYTHONPATH=%s %s -v regrtest.py" % (lib_dir, sys.executable)) def cleanup(dir): *************** *** 47,54 **** def main(): ! test_dir = copy_test_suite() ! compile_files(test_dir) ! run_regrtest(test_dir) ! cleanup(test_dir) if __name__ == "__main__": --- 69,77 ---- def main(): ! lib_dir = copy_library() ! compile_files(lib_dir) ! run_regrtest(lib_dir) ! raw_input("Cleanup?") ! cleanup(lib_dir) if __name__ == "__main__": From mwh@users.sourceforge.net Wed Dec 19 19:50:01 2001 From: mwh@users.sourceforge.net (Michael Hudson) Date: Wed, 19 Dec 2001 11:50:01 -0800 Subject: [Python-checkins] CVS: python/dist/src README,1.133,1.134 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv28099 Modified Files: README Log Message: More cygwin news. This section is getting a bit long. Oh well. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.133 retrieving revision 1.134 diff -C2 -d -r1.133 -r1.134 *** README 2001/12/14 20:47:12 1.133 --- README 2001/12/19 19:49:58 1.134 *************** *** 419,437 **** deep down in the framework. ! Cygwin: With recent (relative to the time of writing, 2001-12-11) ! Cygwin installations, Python builds and passes all tests on ! NT/2000 if the _socket module is linked statically. If the ! _socket module is linked dynamically (the default), then ! failures can occur under certain conditions related to fork(). ! This is a known Cygwin problem that may be resolved by rebasing ! the necessary DLLs to prevent base address conflicts. ! Threads support should still be disable due to a known bug in ! Cygwin pthreads that causes test_threadedtempfile to hang. ! To workaround the above, run "./configure --with-threads=no" and ! include any other options you need (--prefix, etc.). Then in ! Modules/Setup uncomment the lines: #SSL=/usr/local/ssl #_socket socketmodule.c \ --- 419,441 ---- deep down in the framework. ! Cygwin: With recent (relative to the time of writing, 2001-12-19) ! Cygwin installations, there are problems with the interaction ! of dynamic linking and fork(). This manifests itself in build ! failures during the execution of setup.py. ! There are two workarounds that both enable Python (albeit ! without threading support) to build and pass all tests on ! NT/2000 (and most likely XP as well, though reports of testing ! on XP would be appreciated). ! The workarounds: + (a) the band-aid fix is to link the _socket module statically + rather than dynamically (which is the default). + + To do this, run "./configure --with-threads=no" including any + other options you need (--prefix, etc.). Then in Modules/Setup + uncomment the lines: + #SSL=/usr/local/ssl #_socket socketmodule.c \ *************** *** 439,456 **** # -L$(SSL)/lib -lssl -lcrypto ! and remove "local/" from the SSL variable. And finally, just ! run "make"! ! The _curses module does not build. This is an known Cygwin ! ncurses problem that should be resolved the next time that this ! package is released. On older versions of Cygwin, test_poll may hang and test_strftime may fail. ! The situation on 9X/Me/XP is not accurately known at present. ! However, it is expected that XP should be the same (or at least ! very similar to) NT/2000. Some time ago, there were reports that ! the following regression tests failed on 9X/Me: test_pwd --- 443,474 ---- # -L$(SSL)/lib -lssl -lcrypto ! and remove "local/" from the SSL variable. Finally, just run ! "make"! ! (b) The "proper" fix is to rebase the cygwin DLLs to prevent ! base address conflicts. Details on how to do this can be ! found in the following mail: ! ! http://sources.redhat.com/ml/cygwin/2001-12/msg00894.html ! ! It is hoped that a version of this solution will be ! incorporated into the cygwin distribution fairly soon. ! ! Two additional problems: ! ! (1) Threading support should still be disabled due to a known ! bug in Cygwin pthreads that causes test_threadedtempfile to ! hang. ! ! (2) The _curses module does not build. This is an known ! Cygwin ncurses problem that should be resolved the next time ! that this package is released. On older versions of Cygwin, test_poll may hang and test_strftime may fail. ! The situation on 9X/Me is not accurately known at present. ! Some time ago, there were reports that the following ! regression tests failed: test_pwd *************** *** 458,468 **** test_socket ! Due to the test_select hang on 9X/Me, one should run the regression ! test using the following: make TESTOPTS='-l -x test_select' test ! News regarding these platforms with more recent Cygwin verions would ! be appreciated! Configuring threads --- 476,486 ---- test_socket ! Due to the test_select hang on 9X/Me, one should run the ! regression test using the following: make TESTOPTS='-l -x test_select' test ! News regarding these platforms with more recent Cygwin ! versions would be appreciated! Configuring threads From jhylton@users.sourceforge.net Wed Dec 19 20:40:57 2001 From: jhylton@users.sourceforge.net (Jeremy Hylton) Date: Wed, 19 Dec 2001 12:40:57 -0800 Subject: [Python-checkins] CVS: python/dist/src/Tools/compiler/compiler pyassem.py,1.19.2.2,1.19.2.3 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/compiler/compiler In directory usw-pr-cvs1:/tmp/cvs-serv10987 Modified Files: Tag: release21-maint pyassem.py Log Message: Add stack depth info for FOR_LOOP opcode Index: pyassem.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/compiler/compiler/Attic/pyassem.py,v retrieving revision 1.19.2.2 retrieving revision 1.19.2.3 diff -C2 -d -r1.19.2.2 -r1.19.2.3 *** pyassem.py 2001/12/17 23:53:10 1.19.2.2 --- pyassem.py 2001/12/19 20:40:54 1.19.2.3 *************** *** 787,790 **** --- 787,791 ---- 'IMPORT_FROM': 1, 'LOAD_ATTR': 0, # unlike other loads + 'FOR_LOOP': 1, # close enough... 'SETUP_EXCEPT': 3, From nnorwitz@users.sourceforge.net Wed Dec 19 20:44:16 2001 From: nnorwitz@users.sourceforge.net (Neal Norwitz) Date: Wed, 19 Dec 2001 12:44:16 -0800 Subject: [Python-checkins] CVS: python/dist/src README,1.134,1.135 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv12187 Modified Files: README Log Message: Fix a typo Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.134 retrieving revision 1.135 diff -C2 -d -r1.134 -r1.135 *** README 2001/12/19 19:49:58 1.134 --- README 2001/12/19 20:44:13 1.135 *************** *** 461,465 **** hang. ! (2) The _curses module does not build. This is an known Cygwin ncurses problem that should be resolved the next time that this package is released. --- 461,465 ---- hang. ! (2) The _curses module does not build. This is a known Cygwin ncurses problem that should be resolved the next time that this package is released. From effbot@users.sourceforge.net Wed Dec 19 21:40:06 2001 From: effbot@users.sourceforge.net (Fredrik Lundh) Date: Wed, 19 Dec 2001 13:40:06 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib xmlrpclib.py,1.14,1.15 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv28625/lib Modified Files: xmlrpclib.py Log Message: partial merge with current pythonware codebase: - use repr instead of implied str for doubles - updated version number to 1.0.0 (for 2.2 final) Index: xmlrpclib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/xmlrpclib.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** xmlrpclib.py 2001/10/17 22:53:33 1.14 --- xmlrpclib.py 2001/12/19 21:40:04 1.15 *************** *** 36,39 **** --- 36,40 ---- # 2001-10-10 sm Allow long ints to be passed as ints if they don't overflow # 2001-10-17 sm test for int and long overflow (allows use on 64-bit systems) + # 2001-11-12 fl Use repr() to marshal doubles (from Paul Felix) # # Copyright (c) 1999-2001 by Secret Labs AB. *************** *** 73,77 **** # ! # things to look into before 1.0 final: # TODO: support basic authentication (see robin's patch) --- 74,78 ---- # ! # things to look into: # TODO: support basic authentication (see robin's patch) *************** *** 160,164 **** return string ! __version__ = "1.0b4" # -------------------------------------------------------------------- --- 161,165 ---- return string ! __version__ = "1.0.0" # -------------------------------------------------------------------- *************** *** 481,485 **** def dump_double(self, value): ! self.write("%s\n" % value) dispatch[FloatType] = dump_double --- 482,486 ---- def dump_double(self, value): ! self.write("%s\n" % repr(value)) dispatch[FloatType] = dump_double From mwh@users.sourceforge.net Wed Dec 19 22:09:12 2001 From: mwh@users.sourceforge.net (Michael Hudson) Date: Wed, 19 Dec 2001 14:09:12 -0800 Subject: [Python-checkins] CVS: python/dist/src README,1.135,1.136 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv4361 Modified Files: README Log Message: Apparently it's Cygwin with a capital C. Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/README,v retrieving revision 1.135 retrieving revision 1.136 diff -C2 -d -r1.135 -r1.136 *** README 2001/12/19 20:44:13 1.135 --- README 2001/12/19 22:09:09 1.136 *************** *** 446,450 **** "make"! ! (b) The "proper" fix is to rebase the cygwin DLLs to prevent base address conflicts. Details on how to do this can be found in the following mail: --- 446,450 ---- "make"! ! (b) The "proper" fix is to rebase the Cygwin DLLs to prevent base address conflicts. Details on how to do this can be found in the following mail: *************** *** 453,457 **** It is hoped that a version of this solution will be ! incorporated into the cygwin distribution fairly soon. Two additional problems: --- 453,457 ---- It is hoped that a version of this solution will be ! incorporated into the Cygwin distribution fairly soon. Two additional problems: From jackjansen@users.sourceforge.net Wed Dec 19 23:02:32 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 15:02:32 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Distributions/(vise) Python 2.2.vct,1.6,1.6.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Distributions/(vise) In directory usw-pr-cvs1:/tmp/cvs-serv18224/Python/Mac/Distributions/(vise) Modified Files: Tag: r22rc1-branch Python 2.2.vct Log Message: Files used for MacPython 2.2c1 distribution. Index: Python 2.2.vct =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/(vise)/Python 2.2.vct,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 Binary files /tmp/cvsbvCkXE and /tmp/cvs2cJYMc differ From jackjansen@users.sourceforge.net Wed Dec 19 23:03:00 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 15:03:00 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Distributions dev.include,1.23,1.23.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Distributions In directory usw-pr-cvs1:/tmp/cvs-serv19011/Python/Mac/Distributions Modified Files: Tag: r22rc1-branch dev.include Log Message: Files used for MacPython 2.2c1 distribution. Index: dev.include =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/dev.include,v retrieving revision 1.23 retrieving revision 1.23.2.1 diff -C2 -d -r1.23 -r1.23.2.1 *** dev.include 2001/11/30 14:16:29 1.23 --- dev.include 2001/12/19 23:02:57 1.23.2.1 *************** *** 264,267 **** --- 264,270 ---- (':Mac:Build:gdbm.mcp.exp', None) (':Mac:Build:gdbm.mcp.xml', None) + (':Mac:Build:hfsplus.carbon.mcp', None) + (':Mac:Build:hfsplus.carbon.mcp.exp', None) + (':Mac:Build:hfsplus.carbon.mcp.xml', None) (':Mac:Build:icglue.carbon.mcp', None) (':Mac:Build:icglue.carbon.mcp.exp', None) *************** *** 407,410 **** --- 410,414 ---- (':Mac:mwerks:mwerks_shared_config.h', ':Mac:mwerks:') (':Mac:mwerks:mwerks_shcarbon_config.h', '') + (':Mac:mwerks:mwerks_shlib_config.h', '') (':Mac:mwerks:mwerks_small_config.h', ':Mac:mwerks:') (':Mac:mwerks:mwerks_thrcarbonsm_config.h', None) *************** *** 597,602 **** (':setup.py', None) (':site-packages', None) ! (':Mac:Build:hfsplus.carbon.mcp.xml', None) ! (':Mac:Build:hfsplus.carbon.mcp.exp', None) ! (':Mac:Build:hfsplus.carbon.mcp', None) ! (':Mac:mwerks:mwerks_shlib_config.h', '') --- 601,615 ---- (':setup.py', None) (':site-packages', None) ! (':Mac:Build:_CG.carbon.old.mcp', None) ! (':Mac:Build:_CG.carbon.mcp.exp', None) ! (':Mac:Build:_CG.carbon.mcp', None) ! (':Mac:Build:_CarbonEvt.carbon.mcp.xml', None) ! (':Mac:Build:_CarbonEvt.carbon.mcp.exp', None) ! (':Mac:Build:_CarbonEvt.carbon.mcp', None) ! (':Mac:ReadMe~0', None) ! (':Modules:timemodule.c~1', None) ! (':Modules:timemodule.c~0', None) ! (':Mac:Build:PythonStandSmall.old.mcp', None) ! (':Mac:Build:PythonInterpreter.old.mcp', None) ! (':Mac:Build:PythonCore.axp', None) ! (':Mac:Build:_dummy_tkinter.old.mcp', None) From jackjansen@users.sourceforge.net Wed Dec 19 23:03:27 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 15:03:27 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Distributions binary.exclude,1.10,1.10.4.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Distributions In directory usw-pr-cvs1:/tmp/cvs-serv19161/Python/Mac/Distributions Modified Files: Tag: r22rc1-branch binary.exclude Log Message: Files used for MacPython 2.2c1 distribution. Index: binary.exclude =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/binary.exclude,v retrieving revision 1.10 retrieving revision 1.10.4.1 diff -C2 -d -r1.10 -r1.10.4.1 *** binary.exclude 2001/10/23 22:20:03 1.10 --- binary.exclude 2001/12/19 23:03:25 1.10.4.1 *************** *** 20,23 **** --- 20,25 ---- *.prj *.prj.exp + *.pyc + *.pyo *.xSYM *.µ *************** *** 33,36 **** Setup.in [(]*[)] - *.pyc - *.pyo --- 35,36 ---- From jackjansen@users.sourceforge.net Wed Dec 19 23:03:38 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 15:03:38 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Distributions binary.include,1.19,1.19.4.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Distributions In directory usw-pr-cvs1:/tmp/cvs-serv19213/Python/Mac/Distributions Modified Files: Tag: r22rc1-branch binary.include Log Message: Files used for MacPython 2.2c1 distribution. Index: binary.include =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/binary.include,v retrieving revision 1.19 retrieving revision 1.19.4.1 diff -C2 -d -r1.19 -r1.19.4.1 *** binary.include 2001/10/23 22:20:17 1.19 --- binary.include 2001/12/19 23:03:36 1.19.4.1 *************** *** 220,221 **** --- 220,223 ---- (':setup.py', None) (':site-packages', None) + (':Mac:ReadMe~0', None) + (':Mac:Contrib:mpwsystem', '') From jackjansen@users.sourceforge.net Wed Dec 19 23:03:17 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 15:03:17 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac Relnotes,1.28,1.28.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac In directory usw-pr-cvs1:/tmp/cvs-serv19102/Python/Mac Modified Files: Tag: r22rc1-branch Relnotes Log Message: Files used for MacPython 2.2c1 distribution. Index: Relnotes =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Relnotes,v retrieving revision 1.28 retrieving revision 1.28.2.1 diff -C2 -d -r1.28 -r1.28.2.1 *** Relnotes 2001/11/30 14:16:27 1.28 --- Relnotes 2001/12/19 23:03:14 1.28.2.1 *************** *** 1,7 **** ! Changes in 2.2b2 since 2.1.1 ---------------------------- These release notes refer to Mac-specific changes only. See NEWS (in the Misc folder) ! for machine-independent changes. Changes that are new in 2.2b2 are flagged as such. --- 1,7 ---- ! Changes in 2.2c1 since 2.1.1 ---------------------------- These release notes refer to Mac-specific changes only. See NEWS (in the Misc folder) ! for machine-independent changes. Changes that are new in 2.2c1 are flagged as such. *************** *** 12,29 **** to contribute. Aside from reducing clutter this change will also benefit the port to Mach-O/OSX Python later. - On input MacPython now accepts either \n (unix style) or \r (mac style) newlines for text files. This behaviour can be turned off with a preference. This is an experimental feature; again: feedback is requested. - Command-dot handling has been improved a lot: scripts are now much easier to interrupt, ! and they only scan for cmd-. while in the foreground. [2.2b2] ! - "Copy" from the MacPython console window was always disabled. Fixed. [2.2b2] ! - This release should run on MacOS 8.1 again. [2.2b2 build 116] ! - A new, rather different GUSI I/O library is used. Please report any strange behaviour ! with I/O to the pythonmac-sig mailing list! [2.2b2] - There is a new module macresource which makes it easier to open a resource file accompanying your script when the script is not (yet) converted to an applet. This module will later also do the right thing in Mach-O/OSX Python. - A new, experimental module hfsplus is included, which gives access to some of the ! functionality of the HFS+ API. [2.2b2] - Threads had a stack that was too small for many serious Python applications (20K). They now get 64K. There is still no overflow check, though. --- 12,36 ---- to contribute. Aside from reducing clutter this change will also benefit the port to Mach-O/OSX Python later. + - All toolbox modules have been updated to Universal Headers 3.4. [2.2c1] + - Toolbox modules are weaklinked against InterfaceLib (for PPC builds) and raise + an exception when you call an unimplemented one on an old MacOS. [2.2c1] - On input MacPython now accepts either \n (unix style) or \r (mac style) newlines for text files. This behaviour can be turned off with a preference. This is an experimental feature; again: feedback is requested. + - The IDE looks better on OS X, but still not as good as on OS9. [2.2c1] - Command-dot handling has been improved a lot: scripts are now much easier to interrupt, ! and they only scan for cmd-. while in the foreground. ! - "Copy" from the MacPython console window was always disabled. Fixed. ! - This release should run on MacOS 8.1 again. ! - A new, rather different GUSI I/O library is used. ! - time.time() returns positive values again. [2.2c1] - There is a new module macresource which makes it easier to open a resource file accompanying your script when the script is not (yet) converted to an applet. This module will later also do the right thing in Mach-O/OSX Python. + - (Carbon only) experimental modules Carbon.CG (CoreGraphics) and CarbonEvt have + been added. [2.2c1] - A new, experimental module hfsplus is included, which gives access to some of the ! functionality of the HFS+ API. ! - A new, experimental module gives access to Carbon Events. [2.2c1] - Threads had a stack that was too small for many serious Python applications (20K). They now get 64K. There is still no overflow check, though. *************** *** 49,55 **** -------------------------------- ! - Stackless Python/microthreads hasn't been ported to 2.2 yet. If/when it becomes available ! Just will undoubtedly announce it on pythonmac-sig and the MacPython homepage. ! - The toolbox modules have not been updated to Universal Header 3.4 or CarbonLib 1.4 yet. Known problems --- 56,60 ---- -------------------------------- ! - The toolbox modules have not all been updated to Universal Header 3.4 or CarbonLib 1.4 yet. Known problems *************** *** 59,63 **** http://www.cwi.nl/~jack/macpython.html. ! - MacPython 2.2b2 (and MacPython 2.1) will not run correctly on a multiprocessor MacOS X machine, it will quickly deadlock during I/O operations. The GUSI I/O library is suspected, hints/clues/workarounds are solicited. --- 64,68 ---- http://www.cwi.nl/~jack/macpython.html. ! - MacPython 2.2 (and MacPython 2.1) will not run correctly on a multiprocessor MacOS X machine, it will quickly deadlock during I/O operations. The GUSI I/O library is suspected, hints/clues/workarounds are solicited. *************** *** 66,69 **** --- 71,75 ---- - Tkinter file events do not work, unless you have opened the file through Tcl (but then you cannot access it from Python). + - The IDE object and class browser look funny on OSX, but they work fine. - Aliases may not work in sys.path entries. - PythonInterpreter used interactively will eat a lot of processor cycles. You should use From jackjansen@users.sourceforge.net Wed Dec 19 23:03:53 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 15:03:53 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Contrib/osam OSAm.prj,1.2,1.2.12.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Contrib/osam In directory usw-pr-cvs1:/tmp/cvs-serv19276/Python/Mac/Contrib/osam Modified Files: Tag: r22rc1-branch OSAm.prj Log Message: Files used for MacPython 2.2c1 distribution. Index: OSAm.prj =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Contrib/osam/OSAm.prj,v retrieving revision 1.2 retrieving revision 1.2.12.1 diff -C2 -d -r1.2 -r1.2.12.1 Binary files /tmp/cvs9JuoAN and /tmp/cvs41cbMq differ From jackjansen@users.sourceforge.net Wed Dec 19 23:04:12 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 15:04:12 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac ReadMe,1.38,1.38.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac In directory usw-pr-cvs1:/tmp/cvs-serv19414/Python/Mac Modified Files: Tag: r22rc1-branch ReadMe Log Message: Files used for MacPython 2.2c1 distribution. Index: ReadMe =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/ReadMe,v retrieving revision 1.38 retrieving revision 1.38.2.1 diff -C2 -d -r1.38 -r1.38.2.1 *** ReadMe 2001/12/13 12:58:09 1.38 --- ReadMe 2001/12/19 23:04:10 1.38.2.1 *************** *** 1,8 **** ! How to install Python 2.2b2 on your Macintosh --------------------------------------------- This is a MacPython that can run on classic MacOS (from 8.1 onwards) and natively on MacOSX. The installer tries to work out whether you can ! use the Carbon version or not. You should definitely read the Relnotes file too, and the section below about --- 1,13 ---- ! How to install Python 2.2c1 on your Macintosh --------------------------------------------- + This is a release candidate for MacPython 2.2, please report any problems as + soon as possible, by email to pythonmac-sig@python.org. + This is a MacPython that can run on classic MacOS (from 8.1 onwards) and natively on MacOSX. The installer tries to work out whether you can ! use the Carbon version or not. For Mac OS X users: this version of Python ! does not run from the command line, it is a pure "Mac only" app. Use the standard ! unix Python from the commandline, the two Pythons will be merged in the future. You should definitely read the Relnotes file too, and the section below about *************** *** 63,66 **** --- 68,76 ---- modules you may think of as toolbox modules (such as Waste) really are not, and they are not in the Carbon package. + + Also, all toolbox modules have been updated to Universal Headers 3.4, and + are (for classic PPC) weak-linked against InterfaceLib so that they should + work on all systems back to MacOS 8.1. Calling an unimplemented function will + raise an exception, not crash your interpreter. Another change related to the OSX growth path is that there is a new module *************** *** 162,166 **** Two items are installed in the system folder: the interpreter shared libraries PythonCore and PythonCoreCarbon lives in the Extensions ! folder and the "Python 2.2b2 Preferences" file in the Python subfolder in the Preferences folder. All the rest of Python lives in the folder you installed in. --- 172,176 ---- Two items are installed in the system folder: the interpreter shared libraries PythonCore and PythonCoreCarbon lives in the Extensions ! folder and the "Python 2.2c1 Preferences" file in the Python subfolder in the Preferences folder. All the rest of Python lives in the folder you installed in. *************** *** 212,218 **** are lost and you have to set them again. ! After you are satisfied that 2.2b2 works as expected you can trash anything in the system folder that has "python" in the name and not ! "2.2b2". The ConfigurePython... applets will try to detect incompatible --- 222,228 ---- are lost and you have to set them again. ! After you are satisfied that 2.2c1 works as expected you can trash anything in the system folder that has "python" in the name and not ! "2.2c1". The ConfigurePython... applets will try to detect incompatible *************** *** 247,251 **** Goodger, Chris Barker, Luc Lefebvre, Tattoo Mabonzo K., Russell Finn, Tom Bridgman, Russel Owen, Pascal Oberndoerfer, Dean Draayer, ! Alexandre Parenteau, Donovan Preston and all the other people who provided feedback, code or both! --- 257,262 ---- Goodger, Chris Barker, Luc Lefebvre, Tattoo Mabonzo K., Russell Finn, Tom Bridgman, Russel Owen, Pascal Oberndoerfer, Dean Draayer, ! Alexandre Parenteau, Donovan Preston, Daniel Brotsky, Jason Harper, ! Nitin Ganatra, and all the other people who provided feedback, code or both! From jackjansen@users.sourceforge.net Wed Dec 19 23:04:24 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 19 Dec 2001 15:04:24 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Include macbuildno.h,1.22,1.22.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Include In directory usw-pr-cvs1:/tmp/cvs-serv19499/Python/Mac/Include Modified Files: Tag: r22rc1-branch macbuildno.h Log Message: Files used for MacPython 2.2c1 distribution. Index: macbuildno.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Include/macbuildno.h,v retrieving revision 1.22 retrieving revision 1.22.2.1 diff -C2 -d -r1.22 -r1.22.2.1 *** macbuildno.h 2001/11/30 14:16:30 1.22 --- macbuildno.h 2001/12/19 23:04:22 1.22.2.1 *************** *** 1 **** ! #define BUILD 116 --- 1 ---- ! #define BUILD 121 From jhylton@users.sourceforge.net Thu Dec 20 02:07:38 2001 From: jhylton@users.sourceforge.net (Jeremy Hylton) Date: Wed, 19 Dec 2001 18:07:38 -0800 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.238.2.4,2.238.2.5 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory usw-pr-cvs1:/tmp/cvs-serv4024 Modified Files: Tag: release21-maint ceval.c Log Message: Backport rev 2.301 to the 2.1 maintenance branch. Add checks for stack underflow and overflow. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.238.2.4 retrieving revision 2.238.2.5 diff -C2 -d -r2.238.2.4 -r2.238.2.5 *** ceval.c 2001/11/21 04:49:19 2.238.2.4 --- ceval.c 2001/12/20 02:07:36 2.238.2.5 *************** *** 403,407 **** #ifdef LLTRACE ! #define PUSH(v) (BASIC_PUSH(v), lltrace && prtrace(TOP(), "push")) #define POP() (lltrace && prtrace(TOP(), "pop"), BASIC_POP()) #else --- 403,409 ---- #ifdef LLTRACE ! #define PUSH(v) { (void)(BASIC_PUSH(v), \ ! lltrace && prtrace(TOP(), "push")); \ ! assert(STACK_LEVEL() <= f->f_stacksize); } #define POP() (lltrace && prtrace(TOP(), "pop"), BASIC_POP()) #else *************** *** 682,685 **** --- 684,689 ---- for (;;) { + assert(stack_pointer >= f->f_valuestack); /* else underflow */ + assert(STACK_LEVEL() <= f->f_stacksize); /* else overflow */ /* Do periodic things. Doing this every time through the loop would add too much overhead, so we do it From tim_one@users.sourceforge.net Thu Dec 20 06:18:17 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Wed, 19 Dec 2001 22:18:17 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_types.py,1.24,1.25 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv32740/python/Lib/test Modified Files: test_types.py Log Message: Whitespace normalization. Index: test_types.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_types.py,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** test_types.py 2001/12/11 04:37:34 1.24 --- test_types.py 2001/12/20 06:18:15 1.25 *************** *** 398,400 **** except TypeError: pass else: raise TestFailed, 'type(), w/4 args expected TypeError' - --- 398,399 ---- From gvanrossum@users.sourceforge.net Thu Dec 20 13:19:38 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Thu, 20 Dec 2001 05:19:38 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc ACKS,1.147,1.148 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv19783 Modified Files: ACKS Log Message: Another contributor. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.147 retrieving revision 1.148 diff -C2 -d -r1.147 -r1.148 *** ACKS 2001/12/19 16:57:36 1.147 --- ACKS 2001/12/20 13:19:36 1.148 *************** *** 415,418 **** --- 415,419 ---- Dan Stromberg Nathan Sullivan + Mark Summerfield Kalle Svensson Hajime Saitou From gvanrossum@users.sourceforge.net Thu Dec 20 15:54:50 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Thu, 20 Dec 2001 07:54:50 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib rfc822.py,1.65,1.66 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv31562 Modified Files: rfc822.py Log Message: SF patch #495358 (Artur Zaprzala): rfc822.AddressList and "<>" address rfc822.AddressList incorrectly handles empty address. "<>" is converted to None and should be "". AddressList.__str__() fails on None. I got an email with such an address and my program failed processing it. Example: >>> import rfc822 >>> rfc822.AddressList("<>").addresslist [('', None)] >>> str(rfc822.AddressList("<>")) Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.1/rfc822.py", line 753, in __str__ return ", ".join(map(dump_address_pair, self.addresslist)) TypeError: sequence item 0: expected string, None found [His solution: in the internal routine AddrlistClass.getrouteaddr(), initialize adlist to "".] Index: rfc822.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/rfc822.py,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** rfc822.py 2001/11/13 21:30:37 1.65 --- rfc822.py 2001/12/20 15:54:48 1.66 *************** *** 625,629 **** self.pos = self.pos + 1 self.gotonext() ! adlist = None while self.pos < len(self.field): if expectroute: --- 625,629 ---- self.pos = self.pos + 1 self.gotonext() ! adlist = "" while self.pos < len(self.field): if expectroute: From gvanrossum@users.sourceforge.net Thu Dec 20 15:56:25 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Thu, 20 Dec 2001 07:56:25 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc ACKS,1.148,1.149 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv32122 Modified Files: ACKS Log Message: ZZZ. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.148 retrieving revision 1.149 diff -C2 -d -r1.148 -r1.149 *** ACKS 2001/12/20 13:19:36 1.148 --- ACKS 2001/12/20 15:56:23 1.149 *************** *** 484,487 **** --- 484,488 ---- Moshe Zadka Milan Zamazal + Artur Zaprzala Mike Zarnstorff Siebren van der Zee From bwarsaw@users.sourceforge.net Thu Dec 20 16:37:29 2001 From: bwarsaw@users.sourceforge.net (Barry Warsaw) Date: Thu, 20 Dec 2001 08:37:29 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_email.py,1.23,1.24 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv11891 Modified Files: test_email.py Log Message: test_parseaddr_empty(): New test for assuring that Utils.parseaddr('<>') -- i.e. on an empty address, returns the empty string. Built on rfc822, this used to return None. Index: test_email.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_email.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** test_email.py 2001/12/07 21:07:08 1.23 --- test_email.py 2001/12/20 16:37:27 1.24 *************** *** 953,956 **** --- 953,960 ---- self.assertEqual(Utils.parsedate(''), None) + def test_parseaddr_empty(self): + self.assertEqual(Utils.parseaddr('<>'), ('', '')) + self.assertEqual(Utils.dump_address_pair(Utils.parseaddr('<>')), '') + From fdrake@users.sourceforge.net Thu Dec 20 17:13:11 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 20 Dec 2001 09:13:11 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcgi.tex,1.34,1.35 libcgitb.tex,1.2,1.3 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv23304/lib Modified Files: libcgi.tex libcgitb.tex Log Message: Re-commit Ping's patch to the cgi and cgitb documentation, using the right version this time. Thanks, Ping! (This was from SF patch #494582, "\index -> \indexii" version.) Index: libcgi.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcgi.tex,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** libcgi.tex 2001/11/28 07:26:15 1.34 --- libcgi.tex 2001/12/20 17:13:09 1.35 *************** *** 67,71 **** backward compatibility that you don't want in your namespace. ! It's best to use the \class{FieldStorage} class. The other classes defined in this module are provided mostly for backward compatibility. Instantiate it exactly once, without arguments. This reads the form --- 67,93 ---- backward compatibility that you don't want in your namespace. ! When you write a new script, consider adding the line: ! ! \begin{verbatim} ! import cgitb; cgitb.enable() ! \end{verbatim} ! ! This activates a special exception handler that will display detailed ! reports in the Web browser if any errors occur. If you'd rather not ! show the guts of your program to users of your script, you can have ! the reports saved to files instead, with a line like this: ! ! \begin{verbatim} ! import cgitb; cgitb.enable(display=0, logdir="/tmp") ! \end{verbatim} ! ! It's very helpful to use this feature during script development. ! The reports produced by \refmodule{cgitb} provide information that ! can save you a lot of time in tracking down bugs. You can always ! remove the \code{cgitb} line later when you have tested your script ! and are confident that it works correctly. ! ! To get at submitted form data, ! it's best to use the \class{FieldStorage} class. The other classes defined in this module are provided mostly for backward compatibility. Instantiate it exactly once, without arguments. This reads the form *************** *** 390,394 **** ! \subsection{Caring about security} There's one important rule: if you invoke an external program (via the --- 412,418 ---- ! \subsection{Caring about security \label{cgi-security}} ! ! \indexii{CGI}{security} There's one important rule: if you invoke an external program (via the *************** *** 467,471 **** ! \subsection{Debugging CGI scripts} First of all, check for trivial installation errors --- reading the --- 491,495 ---- ! \subsection{Debugging CGI scripts} \indexii{CGI}{debugging} First of all, check for trivial installation errors --- reading the *************** *** 509,557 **** exits. While the Python interpreter will still do this when your CGI script raises an exception, most likely the traceback will end up in ! one of the HTTP server's log file, or be discarded altogether. Fortunately, once you have managed to get your script to execute ! \emph{some} code, it is easy to catch exceptions and cause a traceback ! to be printed. The \function{test()} function below in this module is ! an example. Here are the rules: ! ! \begin{enumerate} ! \item Import the traceback module before entering the \keyword{try} ! ... \keyword{except} statement ! ! \item Assign \code{sys.stderr} to be \code{sys.stdout} ! ! \item Make sure you finish printing the headers and the blank line ! early ! ! \item Wrap all remaining code in a \keyword{try} ... \keyword{except} ! statement ! ! \item In the except clause, call \function{traceback.print_exc()} ! \end{enumerate} ! ! For example: \begin{verbatim} ! import sys ! import traceback ! print "Content-Type: text/html" ! print ! sys.stderr = sys.stdout ! try: ! ...your code here... ! except: ! print "\n\n
"
!     traceback.print_exc()
  \end{verbatim}
  
! Notes: The assignment to \code{sys.stderr} is needed because the
! traceback prints to \code{sys.stderr}.
! The \code{print "{\e}n{\e}n
"} statement is necessary to
! disable the word wrapping in HTML.
  
! If you suspect that there may be a problem in importing the traceback
! module, you can use an even more robust approach (which only uses
! built-in modules):
  
  \begin{verbatim}
--- 533,554 ----
  exits.  While the Python interpreter will still do this when your CGI
  script raises an exception, most likely the traceback will end up in
! one of the HTTP server's log files, or be discarded altogether.
  
  Fortunately, once you have managed to get your script to execute
! \emph{some} code, you can easily send tracebacks to the Web browser
! using the \refmodule{cgitb} module.  If you haven't done so already,
! just add the line:
  
  \begin{verbatim}
! import cgitb; cgitb.enable()
  \end{verbatim}
  
! to the top of your script.  Then try running it again; when a
! problem occurs, you should see a detailed report that will
! likely make apparent the cause of the crash.
  
! If you suspect that there may be a problem in importing the
! \refmodule{cgitb} module, you can use an even more robust approach
! (which only uses built-in modules):
  
  \begin{verbatim}
***************
*** 568,572 ****
  by your client.  If it raises an exception, most likely after the
  first two lines have been printed, a traceback will be displayed.
! Because no HTML interpretation is going on, the traceback will
  readable.
  
--- 565,569 ----
  by your client.  If it raises an exception, most likely after the
  first two lines have been printed, a traceback will be displayed.
! Because no HTML interpretation is going on, the traceback will be
  readable.
  
***************
*** 587,592 ****
  like \samp{python script.py}.
  
! \item When using any of the debugging techniques, don't forget to add
! \samp{import sys} to the top of the script.
  
  \item When invoking external programs, make sure they can be found.
--- 584,589 ----
  like \samp{python script.py}.
  
! \item If your script does not have any syntax errors, try adding
! \samp{import cgitb; cgitb.enable()} to the top of the script.
  
  \item When invoking external programs, make sure they can be found.

Index: libcgitb.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcgitb.tex,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** libcgitb.tex	2001/12/18 15:51:55	1.2
--- libcgitb.tex	2001/12/20 17:13:09	1.3
***************
*** 10,22 ****
  \index{CGI!exceptions}
  \index{CGI!tracebacks}
! \index{exception!in CGI scripts}
! \index{traceback!in CGI scripts}
  
  The \module{cgitb} module provides a special exception handler for CGI
! scripts.  After this module is activated using the \function{enable()}
! function, if an uncaught exception occurs, a detailed, formatted
! report will be sent to the Web browser.  The report includes a
! traceback showing excerpts of the source code for each level, as well
! as the values of the arguments and local variables to currently
  running functions, to help you debug the problem.  Optionally, you can
  save this information to a file instead of sending it to the browser.
--- 10,21 ----
  \index{CGI!exceptions}
  \index{CGI!tracebacks}
! \index{exceptions!in CGI scripts}
! \index{tracebacks!in CGI scripts}
  
  The \module{cgitb} module provides a special exception handler for CGI
! scripts.  After this module is activated, if an uncaught exception occurs,
! a detailed, formatted report will be sent to the Web browser.  The report
! includes a traceback showing excerpts of the source code for each level,
! as well as the values of the arguments and local variables to currently
  running functions, to help you debug the problem.  Optionally, you can
  save this information to a file instead of sending it to the browser.



From fdrake@users.sourceforge.net  Thu Dec 20 17:24:13 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Thu, 20 Dec 2001 09:24:13 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libos.tex,1.73,1.74
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv27319/lib

Modified Files:
	libos.tex 
Log Message:
Fix the availability statement for the spawn*() functions to reflect the
actual availability on Windows.
This fixes SF bug #495191.


Index: libos.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v
retrieving revision 1.73
retrieving revision 1.74
diff -C2 -d -r1.73 -r1.74
*** libos.tex	2001/12/06 23:37:17	1.73
--- libos.tex	2001/12/20 17:24:11	1.74
***************
*** 1061,1066 ****
  \end{verbatim}
  
! Availability: \UNIX, Windows.  \function{spawnvp()} and
! \function{spawnvpe()} are not available on Windows.
  \versionadded{1.6}
  \end{funcdesc}
--- 1061,1067 ----
  \end{verbatim}
  
! Availability: \UNIX, Windows.  \function{spawnlp()},
! \function{spawnlpe()}, \function{spawnvp()} and \function{spawnvpe()}
! are not available on Windows.
  \versionadded{1.6}
  \end{funcdesc}



From bwarsaw@users.sourceforge.net  Thu Dec 20 19:25:41 2001
From: bwarsaw@users.sourceforge.net (Barry Warsaw)
Date: Thu, 20 Dec 2001 11:25:41 -0800
Subject: [Python-checkins] CVS: python/dist/src/Include patchlevel.h,2.60,2.60.2.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv28784

Modified Files:
      Tag: release22-branch
	patchlevel.h 
Log Message:
Typical branch version number bump.


Index: patchlevel.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v
retrieving revision 2.60
retrieving revision 2.60.2.1
diff -C2 -d -r2.60 -r2.60.2.1
*** patchlevel.h	2001/12/14 20:30:23	2.60
--- patchlevel.h	2001/12/20 19:25:38	2.60.2.1
***************
*** 23,31 ****
  #define PY_MINOR_VERSION	2
  #define PY_MICRO_VERSION	0
! #define PY_RELEASE_LEVEL	PY_RELEASE_LEVEL_GAMMA
! #define PY_RELEASE_SERIAL	1
  
  /* Version as a string */
! #define PY_VERSION		"2.2c1+"
  
  /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
--- 23,31 ----
  #define PY_MINOR_VERSION	2
  #define PY_MICRO_VERSION	0
! #define PY_RELEASE_LEVEL	PY_RELEASE_LEVEL_FINAL
! #define PY_RELEASE_SERIAL	0
  
  /* Version as a string */
! #define PY_VERSION		"2.2"
  
  /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.



From jackjansen@users.sourceforge.net  Thu Dec 20 20:41:47 2001
From: jackjansen@users.sourceforge.net (Jack Jansen)
Date: Thu, 20 Dec 2001 12:41:47 -0800
Subject: [Python-checkins] CVS: python/dist/src/Mac/Contrib/osam OSAm.prj,1.2,1.3
Message-ID: 

Update of /cvsroot/python/python/dist/src/Mac/Contrib/osam
In directory usw-pr-cvs1:/tmp/cvs-serv20216/Contrib/osam

Modified Files:
	OSAm.prj 
Log Message:
Applying r22c1 branch mods back to the trunk.


Index: OSAm.prj
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Contrib/osam/OSAm.prj,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
Binary files /tmp/cvsxDKslh and /tmp/cvsOVqynq differ



From jackjansen@users.sourceforge.net  Thu Dec 20 20:41:46 2001
From: jackjansen@users.sourceforge.net (Jack Jansen)
Date: Thu, 20 Dec 2001 12:41:46 -0800
Subject: [Python-checkins] CVS: python/dist/src/Mac ReadMe,1.38,1.39 Relnotes,1.28,1.29
Message-ID: 

Update of /cvsroot/python/python/dist/src/Mac
In directory usw-pr-cvs1:/tmp/cvs-serv20216

Modified Files:
	ReadMe Relnotes 
Log Message:
Applying r22c1 branch mods back to the trunk.


Index: ReadMe
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/ReadMe,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** ReadMe	2001/12/13 12:58:09	1.38
--- ReadMe	2001/12/20 20:41:44	1.39
***************
*** 1,8 ****
! How to install Python 2.2b2 on your Macintosh
  ---------------------------------------------
  
  This is a MacPython that can run on classic MacOS (from 8.1
  onwards) and natively on MacOSX. The installer tries to work out whether you can
! use the Carbon version or not.
  
  You should definitely read the Relnotes file too, and the section below about
--- 1,13 ----
! How to install Python 2.2c1 on your Macintosh
  ---------------------------------------------
  
+ This is a release candidate for MacPython 2.2, please report any problems as
+ soon as possible, by email to pythonmac-sig@python.org.
+ 
  This is a MacPython that can run on classic MacOS (from 8.1
  onwards) and natively on MacOSX. The installer tries to work out whether you can
! use the Carbon version or not. For Mac OS X users: this version of Python
! does not run from the command line, it is a pure "Mac only" app. Use the standard
! unix Python from the commandline, the two Pythons will be merged in the future.
  
  You should definitely read the Relnotes file too, and the section below about
***************
*** 63,66 ****
--- 68,76 ----
  modules you may think of as toolbox modules (such as Waste) really are not,
  and they are not in the Carbon package.
+ 
+ Also, all toolbox modules have been updated to Universal Headers 3.4, and
+ are (for classic PPC) weak-linked against InterfaceLib so that they should
+ work on all systems back to MacOS 8.1. Calling an unimplemented function will
+ raise an exception, not crash your interpreter.
    
  Another change related to the OSX growth path is that there is a new module
***************
*** 162,166 ****
  Two items are installed in the system folder: the interpreter shared
  libraries PythonCore and PythonCoreCarbon lives in the Extensions
! folder and the "Python 2.2b2 Preferences" file in the Python subfolder
  in the Preferences folder. All the rest of Python lives in the folder
  you installed in.
--- 172,176 ----
  Two items are installed in the system folder: the interpreter shared
  libraries PythonCore and PythonCoreCarbon lives in the Extensions
! folder and the "Python 2.2c1 Preferences" file in the Python subfolder
  in the Preferences folder. All the rest of Python lives in the folder
  you installed in.
***************
*** 212,218 ****
  are lost and you have to set them again.
  
! After you are satisfied that 2.2b2 works as expected you can trash
  anything in the system folder that has "python" in the name and not
! "2.2b2".
  
  The ConfigurePython... applets will try to detect incompatible
--- 222,228 ----
  are lost and you have to set them again.
  
! After you are satisfied that 2.2c1 works as expected you can trash
  anything in the system folder that has "python" in the name and not
! "2.2c1".
  
  The ConfigurePython... applets will try to detect incompatible
***************
*** 247,251 ****
  Goodger, Chris Barker, Luc Lefebvre, Tattoo Mabonzo K., Russell Finn,
  Tom Bridgman, Russel Owen, Pascal Oberndoerfer, Dean Draayer,
! Alexandre Parenteau, Donovan Preston
  and all the other people who provided feedback, code or both!
  
--- 257,262 ----
  Goodger, Chris Barker, Luc Lefebvre, Tattoo Mabonzo K., Russell Finn,
  Tom Bridgman, Russel Owen, Pascal Oberndoerfer, Dean Draayer,
! Alexandre Parenteau, Donovan Preston, Daniel Brotsky, Jason Harper,
! Nitin Ganatra, 
  and all the other people who provided feedback, code or both!
  

Index: Relnotes
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Relnotes,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** Relnotes	2001/11/30 14:16:27	1.28
--- Relnotes	2001/12/20 20:41:44	1.29
***************
*** 1,7 ****
! Changes in 2.2b2 since 2.1.1
  ----------------------------
  
  These release notes refer to Mac-specific changes only. See NEWS (in the Misc folder)
! for machine-independent changes. Changes that are new in 2.2b2 are flagged as such.
  
  
--- 1,7 ----
! Changes in 2.2c1 since 2.1.1
  ----------------------------
  
  These release notes refer to Mac-specific changes only. See NEWS (in the Misc folder)
! for machine-independent changes. Changes that are new in 2.2c1 are flagged as such.
  
  
***************
*** 12,29 ****
    to contribute. Aside from reducing clutter this change will also benefit the
    port to Mach-O/OSX Python later.
  - On input MacPython now accepts either \n (unix style) or \r (mac style) newlines
    for text files. This behaviour can be turned off with a preference.
    This is an experimental feature; again: feedback is requested.
  - Command-dot handling has been improved a lot: scripts are now much easier to interrupt,
!   and they only scan for cmd-. while in the foreground. [2.2b2]
! - "Copy" from the MacPython console window was always disabled. Fixed. [2.2b2]
! - This release should run on MacOS 8.1 again. [2.2b2 build 116]
! - A new, rather different GUSI I/O library is used. Please report any strange behaviour
!   with I/O to the pythonmac-sig mailing list! [2.2b2]
  - There is a new module macresource which makes it easier to open a resource file
    accompanying your script when the script is not (yet) converted to an applet.
    This module will later also do the right thing in Mach-O/OSX Python.
  - A new, experimental module hfsplus is included, which gives access to some of the
!   functionality of the HFS+ API. [2.2b2]
  - Threads had a stack that was too small for many serious Python applications (20K).
    They now get 64K. There is still no overflow check, though.
--- 12,36 ----
    to contribute. Aside from reducing clutter this change will also benefit the
    port to Mach-O/OSX Python later.
+ - All toolbox modules have been updated to Universal Headers 3.4. [2.2c1]
+ - Toolbox modules are weaklinked against InterfaceLib (for PPC builds) and raise
+   an exception when you call an unimplemented one on an old MacOS. [2.2c1]
  - On input MacPython now accepts either \n (unix style) or \r (mac style) newlines
    for text files. This behaviour can be turned off with a preference.
    This is an experimental feature; again: feedback is requested.
+ - The IDE looks better on OS X, but still not as good as on OS9. [2.2c1]
  - Command-dot handling has been improved a lot: scripts are now much easier to interrupt,
!   and they only scan for cmd-. while in the foreground.
! - "Copy" from the MacPython console window was always disabled. Fixed.
! - This release should run on MacOS 8.1 again.
! - A new, rather different GUSI I/O library is used.
! - time.time() returns positive values again. [2.2c1]
  - There is a new module macresource which makes it easier to open a resource file
    accompanying your script when the script is not (yet) converted to an applet.
    This module will later also do the right thing in Mach-O/OSX Python.
+ - (Carbon only) experimental modules Carbon.CG (CoreGraphics) and CarbonEvt have
+   been added. [2.2c1]
  - A new, experimental module hfsplus is included, which gives access to some of the
!   functionality of the HFS+ API.
! - A new, experimental module gives access to Carbon Events. [2.2c1]
  - Threads had a stack that was too small for many serious Python applications (20K).
    They now get 64K. There is still no overflow check, though.
***************
*** 49,55 ****
  --------------------------------
  
! - Stackless Python/microthreads hasn't been ported to 2.2 yet. If/when it becomes available
!   Just will undoubtedly announce it on pythonmac-sig and the MacPython homepage.
! - The toolbox modules have not been updated to Universal Header 3.4 or CarbonLib 1.4 yet.
  
  Known problems
--- 56,60 ----
  --------------------------------
  
! - The toolbox modules have not all been updated to Universal Header 3.4 or CarbonLib 1.4 yet.
  
  Known problems
***************
*** 59,63 ****
  http://www.cwi.nl/~jack/macpython.html.
  
! - MacPython 2.2b2 (and MacPython 2.1) will not run correctly on a multiprocessor MacOS X
    machine, it will quickly deadlock during I/O operations. The GUSI I/O library is suspected,
    hints/clues/workarounds are solicited.
--- 64,68 ----
  http://www.cwi.nl/~jack/macpython.html.
  
! - MacPython 2.2 (and MacPython 2.1) will not run correctly on a multiprocessor MacOS X
    machine, it will quickly deadlock during I/O operations. The GUSI I/O library is suspected,
    hints/clues/workarounds are solicited.
***************
*** 66,69 ****
--- 71,75 ----
  - Tkinter file events do not work, unless you have opened the file through Tcl (but then
    you cannot access it from Python).
+ - The IDE object and class browser look funny on OSX, but they work fine.
  - Aliases may not work in sys.path entries.
  - PythonInterpreter used interactively will eat a lot of processor cycles. You should use



From jackjansen@users.sourceforge.net  Thu Dec 20 20:41:47 2001
From: jackjansen@users.sourceforge.net (Jack Jansen)
Date: Thu, 20 Dec 2001 12:41:47 -0800
Subject: [Python-checkins] CVS: python/dist/src/Mac/Distributions binary.exclude,1.10,1.11 binary.include,1.19,1.20 dev.include,1.23,1.24
Message-ID: 

Update of /cvsroot/python/python/dist/src/Mac/Distributions
In directory usw-pr-cvs1:/tmp/cvs-serv20216/Distributions

Modified Files:
	binary.exclude binary.include dev.include 
Log Message:
Applying r22c1 branch mods back to the trunk.


Index: binary.exclude
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/binary.exclude,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** binary.exclude	2001/10/23 22:20:03	1.10
--- binary.exclude	2001/12/20 20:41:44	1.11
***************
*** 20,23 ****
--- 20,25 ----
  *.prj
  *.prj.exp
+ *.pyc
+ *.pyo
  *.xSYM
  *.µ
***************
*** 33,36 ****
  Setup.in
  [(]*[)]
- *.pyc
- *.pyo
--- 35,36 ----

Index: binary.include
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/binary.include,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** binary.include	2001/10/23 22:20:17	1.19
--- binary.include	2001/12/20 20:41:45	1.20
***************
*** 220,221 ****
--- 220,223 ----
  (':setup.py', None)
  (':site-packages', None)
+ (':Mac:ReadMe~0', None)
+ (':Mac:Contrib:mpwsystem', '')

Index: dev.include
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/dev.include,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** dev.include	2001/11/30 14:16:29	1.23
--- dev.include	2001/12/20 20:41:45	1.24
***************
*** 264,267 ****
--- 264,270 ----
  (':Mac:Build:gdbm.mcp.exp', None)
  (':Mac:Build:gdbm.mcp.xml', None)
+ (':Mac:Build:hfsplus.carbon.mcp', None)
+ (':Mac:Build:hfsplus.carbon.mcp.exp', None)
+ (':Mac:Build:hfsplus.carbon.mcp.xml', None)
  (':Mac:Build:icglue.carbon.mcp', None)
  (':Mac:Build:icglue.carbon.mcp.exp', None)
***************
*** 407,410 ****
--- 410,414 ----
  (':Mac:mwerks:mwerks_shared_config.h', ':Mac:mwerks:')
  (':Mac:mwerks:mwerks_shcarbon_config.h', '')
+ (':Mac:mwerks:mwerks_shlib_config.h', '')
  (':Mac:mwerks:mwerks_small_config.h', ':Mac:mwerks:')
  (':Mac:mwerks:mwerks_thrcarbonsm_config.h', None)
***************
*** 597,602 ****
  (':setup.py', None)
  (':site-packages', None)
! (':Mac:Build:hfsplus.carbon.mcp.xml', None)
! (':Mac:Build:hfsplus.carbon.mcp.exp', None)
! (':Mac:Build:hfsplus.carbon.mcp', None)
! (':Mac:mwerks:mwerks_shlib_config.h', '')
--- 601,615 ----
  (':setup.py', None)
  (':site-packages', None)
! (':Mac:Build:_CG.carbon.old.mcp', None)
! (':Mac:Build:_CG.carbon.mcp.exp', None)
! (':Mac:Build:_CG.carbon.mcp', None)
! (':Mac:Build:_CarbonEvt.carbon.mcp.xml', None)
! (':Mac:Build:_CarbonEvt.carbon.mcp.exp', None)
! (':Mac:Build:_CarbonEvt.carbon.mcp', None)
! (':Mac:ReadMe~0', None)
! (':Modules:timemodule.c~1', None)
! (':Modules:timemodule.c~0', None)
! (':Mac:Build:PythonStandSmall.old.mcp', None)
! (':Mac:Build:PythonInterpreter.old.mcp', None)
! (':Mac:Build:PythonCore.axp', None)
! (':Mac:Build:_dummy_tkinter.old.mcp', None)



From jackjansen@users.sourceforge.net  Thu Dec 20 20:41:47 2001
From: jackjansen@users.sourceforge.net (Jack Jansen)
Date: Thu, 20 Dec 2001 12:41:47 -0800
Subject: [Python-checkins] CVS: python/dist/src/Mac/Include macbuildno.h,1.22,1.23
Message-ID: 

Update of /cvsroot/python/python/dist/src/Mac/Include
In directory usw-pr-cvs1:/tmp/cvs-serv20216/Include

Modified Files:
	macbuildno.h 
Log Message:
Applying r22c1 branch mods back to the trunk.


Index: macbuildno.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Include/macbuildno.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** macbuildno.h	2001/11/30 14:16:30	1.22
--- macbuildno.h	2001/12/20 20:41:45	1.23
***************
*** 1 ****
! #define BUILD 116
--- 1 ----
! #define BUILD 121



From jackjansen@users.sourceforge.net  Thu Dec 20 20:41:47 2001
From: jackjansen@users.sourceforge.net (Jack Jansen)
Date: Thu, 20 Dec 2001 12:41:47 -0800
Subject: [Python-checkins] CVS: python/dist/src/Mac/Distributions/(vise) Python 2.2.vct,1.6,1.7
Message-ID: 

Update of /cvsroot/python/python/dist/src/Mac/Distributions/(vise)
In directory usw-pr-cvs1:/tmp/cvs-serv20216/Distributions/(vise)

Modified Files:
	Python 2.2.vct 
Log Message:
Applying r22c1 branch mods back to the trunk.


Index: Python 2.2.vct
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/(vise)/Python 2.2.vct,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
Binary files /tmp/cvsPVkZtO and /tmp/cvsgwd0nA differ



From fdrake@users.sourceforge.net  Thu Dec 20 23:54:58 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Thu, 20 Dec 2001 15:54:58 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/tut tut.tex,1.156,1.157
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/tut
In directory usw-pr-cvs1:/tmp/cvs-serv12164/tut

Modified Files:
	tut.tex 
Log Message:
Fix up some examples in the tutorial so we don't contradict our own
advice on docstrings.
This fixes SF bug #495601.


Index: tut.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v
retrieving revision 1.156
retrieving revision 1.157
diff -C2 -d -r1.156 -r1.157
*** tut.tex	2001/12/04 19:47:46	1.156
--- tut.tex	2001/12/20 23:54:56	1.157
***************
*** 1229,1233 ****
  \begin{verbatim}
  >>> def fib(n):    # write Fibonacci series up to n
! ...     "Print a Fibonacci series up to n"
  ...     a, b = 0, 1
  ...     while b < n:
--- 1229,1233 ----
  \begin{verbatim}
  >>> def fib(n):    # write Fibonacci series up to n
! ...     """Print a Fibonacci series up to n."""
  ...     a, b = 0, 1
  ...     while b < n:
***************
*** 1307,1311 ****
  \begin{verbatim}
  >>> def fib2(n): # return Fibonacci series up to n
! ...     "Return a list containing the Fibonacci series up to n"
  ...     result = []
  ...     a, b = 0, 1
--- 1307,1311 ----
  \begin{verbatim}
  >>> def fib2(n): # return Fibonacci series up to n
! ...     """Return a list containing the Fibonacci series up to n."""
  ...     result = []
  ...     a, b = 0, 1



From anthonybaxter@users.sourceforge.net  Fri Dec 21 03:29:14 2001
From: anthonybaxter@users.sourceforge.net (Anthony Baxter)
Date: Thu, 20 Dec 2001 19:29:14 -0800
Subject: [Python-checkins] CVS: python/dist/src/Python pythonrun.c,2.133,2.133.2.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv24854

Modified Files:
      Tag: release21-maint
	pythonrun.c 
Log Message:
backport 2.144:
Py_Initialize(): Apply patch by Jürgen Hermann to call
    _PyImport_FixupExtension() on the exceptions module.  Now
    reload(exceptions) acts just like reload(sys) instead of raising
    an ImportError.

    This closes SF bug #422004.


Index: pythonrun.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v
retrieving revision 2.133
retrieving revision 2.133.2.1
diff -C2 -d -r2.133 -r2.133.2.1
*** pythonrun.c	2001/03/26 19:53:38	2.133
--- pythonrun.c	2001/12/21 03:29:12	2.133.2.1
***************
*** 145,148 ****
--- 145,149 ----
  	/* initialize builtin exceptions */
  	init_exceptions();
+ 	_PyImport_FixupExtension("exceptions", "exceptions");
  
  	/* phase 2 of builtins */



From anthonybaxter@users.sourceforge.net  Fri Dec 21 03:45:17 2001
From: anthonybaxter@users.sourceforge.net (Anthony Baxter)
Date: Thu, 20 Dec 2001 19:45:17 -0800
Subject: [Python-checkins] CVS: python/dist/src/Python symtable.c,2.4,2.4.4.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv27532

Modified Files:
      Tag: release21-maint
	symtable.c 
Log Message:
backport 2.9:
 PySymtableEntry_New():  I'm not sure what this
 routine is doing, but it was obviously leaking an int object when
 whatever the heck it's looking for was found.  Repaired that.  This
 accounts for why entering function and class definitions at an
 interactive prompt leaked a reference to the integer 1 each time. 


Index: symtable.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/symtable.c,v
retrieving revision 2.4
retrieving revision 2.4.4.1
diff -C2 -d -r2.4 -r2.4.4.1
*** symtable.c	2001/02/27 19:07:02	2.4
--- symtable.c	2001/12/21 03:45:15	2.4.4.1
***************
*** 16,19 ****
--- 16,20 ----
  	v = PyDict_GetItem(st->st_symbols, k);
  	if (v) /* XXX could check that name, type, lineno match */ {
+ 		Py_DECREF(k);
  		Py_INCREF(v);
  		return v;



From anthonybaxter@users.sourceforge.net  Fri Dec 21 03:46:14 2001
From: anthonybaxter@users.sourceforge.net (Anthony Baxter)
Date: Thu, 20 Dec 2001 19:46:14 -0800
Subject: [Python-checkins] CVS: python/dist/src/Python pythonrun.c,2.133.2.1,2.133.2.2
Message-ID: 

Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv27773

Modified Files:
      Tag: release21-maint
	pythonrun.c 
Log Message:
backport 2.153:
Missing DECREFs when exception is raised in sys.excepthook.


Index: pythonrun.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/pythonrun.c,v
retrieving revision 2.133.2.1
retrieving revision 2.133.2.2
diff -C2 -d -r2.133.2.1 -r2.133.2.2
*** pythonrun.c	2001/12/21 03:29:12	2.133.2.1
--- pythonrun.c	2001/12/21 03:46:12	2.133.2.2
***************
*** 867,870 ****
--- 867,873 ----
  			PySys_WriteStderr("\nOriginal exception was:\n");
  			PyErr_Display(exception, v, tb);
+ 			Py_XDECREF(exception2);
+ 			Py_XDECREF(v2);
+ 			Py_XDECREF(tb2);
  		}
  		Py_XDECREF(result);



From fdrake@users.sourceforge.net  Fri Dec 21 03:48:35 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Thu, 20 Dec 2001 19:48:35 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/tut tut.tex,1.156,1.156.4.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/tut
In directory usw-pr-cvs1:/tmp/cvs-serv28286

Modified Files:
      Tag: release22-branch
	tut.tex 
Log Message:
Fix up some examples in the tutorial so we don't contradict our own
advice on docstrings.
This fixes SF bug #495601.


Index: tut.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v
retrieving revision 1.156
retrieving revision 1.156.4.1
diff -C2 -d -r1.156 -r1.156.4.1
*** tut.tex	2001/12/04 19:47:46	1.156
--- tut.tex	2001/12/21 03:48:33	1.156.4.1
***************
*** 1229,1233 ****
  \begin{verbatim}
  >>> def fib(n):    # write Fibonacci series up to n
! ...     "Print a Fibonacci series up to n"
  ...     a, b = 0, 1
  ...     while b < n:
--- 1229,1233 ----
  \begin{verbatim}
  >>> def fib(n):    # write Fibonacci series up to n
! ...     """Print a Fibonacci series up to n."""
  ...     a, b = 0, 1
  ...     while b < n:
***************
*** 1307,1311 ****
  \begin{verbatim}
  >>> def fib2(n): # return Fibonacci series up to n
! ...     "Return a list containing the Fibonacci series up to n"
  ...     result = []
  ...     a, b = 0, 1
--- 1307,1311 ----
  \begin{verbatim}
  >>> def fib2(n): # return Fibonacci series up to n
! ...     """Return a list containing the Fibonacci series up to n."""
  ...     result = []
  ...     a, b = 0, 1



From anthonybaxter@users.sourceforge.net  Fri Dec 21 03:49:34 2001
From: anthonybaxter@users.sourceforge.net (Anthony Baxter)
Date: Thu, 20 Dec 2001 19:49:34 -0800
Subject: [Python-checkins] CVS: python/dist/src/Python traceback.c,2.32,2.32.6.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv28493

Modified Files:
      Tag: release21-maint
	traceback.c 
Log Message:
backport 2.35:
 SF bug 485175:  buffer overflow in
 traceback.c.  Bugfix candidate.  tb_displayline():  the sprintf
 format was choking off the file name, but used plain %s for the
 function name (which can be arbitrarily long).  Limit both to 500
 chars max.



Index: traceback.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/traceback.c,v
retrieving revision 2.32
retrieving revision 2.32.6.1
diff -C2 -d -r2.32 -r2.32.6.1
*** traceback.c	2000/09/01 23:29:29	2.32
--- traceback.c	2001/12/21 03:49:31	2.32.6.1
***************
*** 104,108 ****
  	int err = 0;
  	FILE *xfp;
! 	char linebuf[1000];
  	int i;
  	if (filename == NULL || name == NULL)
--- 104,108 ----
  	int err = 0;
  	FILE *xfp;
! 	char linebuf[2000];
  	int i;
  	if (filename == NULL || name == NULL)
***************
*** 110,117 ****
  #ifdef MPW
  	/* This is needed by MPW's File and Line commands */
! #define FMT "  File \"%.900s\"; line %d # in %s\n"
  #else
  	/* This is needed by Emacs' compile command */
! #define FMT "  File \"%.900s\", line %d, in %s\n"
  #endif
  	xfp = fopen(filename, "r");
--- 110,117 ----
  #ifdef MPW
  	/* This is needed by MPW's File and Line commands */
! #define FMT "  File \"%.500s\"; line %d # in %.500s\n"
  #else
  	/* This is needed by Emacs' compile command */
! #define FMT "  File \"%.500s\", line %d, in %.500s\n"
  #endif
  	xfp = fopen(filename, "r");



From fdrake@users.sourceforge.net  Fri Dec 21 03:51:55 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Thu, 20 Dec 2001 19:51:55 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libhttplib.tex,1.28,1.28.4.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv29008/lib

Modified Files:
      Tag: release22-branch
	libhttplib.tex 
Log Message:
Fix typo in httplib example.
This fixes SF bug #495221.


Index: libhttplib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libhttplib.tex,v
retrieving revision 1.28
retrieving revision 1.28.4.1
diff -C2 -d -r1.28 -r1.28.4.1
*** libhttplib.tex	2001/11/30 06:06:40	1.28
--- libhttplib.tex	2001/12/21 03:51:53	1.28.4.1
***************
*** 215,219 ****
  >>> conn = httplib.HTTPConnection("musi-cal.mojam.com:80")
  >>> conn.request("POST", "/cgi-bin/query", params, headers)
! >>> response = h.getresponse()
  >>> print response.status, response.reason
  200 OK
--- 215,219 ----
  >>> conn = httplib.HTTPConnection("musi-cal.mojam.com:80")
  >>> conn.request("POST", "/cgi-bin/query", params, headers)
! >>> response = conn.getresponse()
  >>> print response.status, response.reason
  200 OK



From fdrake@users.sourceforge.net  Fri Dec 21 03:52:06 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Thu, 20 Dec 2001 19:52:06 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libhttplib.tex,1.28,1.29
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv29075/lib

Modified Files:
	libhttplib.tex 
Log Message:
Fix typo in httplib example.
This fixes SF bug #495221.


Index: libhttplib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libhttplib.tex,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** libhttplib.tex	2001/11/30 06:06:40	1.28
--- libhttplib.tex	2001/12/21 03:52:04	1.29
***************
*** 215,219 ****
  >>> conn = httplib.HTTPConnection("musi-cal.mojam.com:80")
  >>> conn.request("POST", "/cgi-bin/query", params, headers)
! >>> response = h.getresponse()
  >>> print response.status, response.reason
  200 OK
--- 215,219 ----
  >>> conn = httplib.HTTPConnection("musi-cal.mojam.com:80")
  >>> conn.request("POST", "/cgi-bin/query", params, headers)
! >>> response = conn.getresponse()
  >>> print response.status, response.reason
  200 OK



From fdrake@users.sourceforge.net  Fri Dec 21 03:58:29 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Thu, 20 Dec 2001 19:58:29 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libos.tex,1.74,1.74.2.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv29917/lib

Modified Files:
      Tag: release22-branch
	libos.tex 
Log Message:
Add a reference to the signal module to the os.kill() description.
This closes SF bug #495609.


Index: libos.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v
retrieving revision 1.74
retrieving revision 1.74.2.1
diff -C2 -d -r1.74 -r1.74.2.1
*** libos.tex	2001/12/20 17:24:11	1.74
--- libos.tex	2001/12/21 03:58:27	1.74.2.1
***************
*** 981,985 ****
  \index{process!killing}
  \index{process!signalling}
! Kill the process \var{pid} with signal \var{sig}.
  Availability: \UNIX.
  \end{funcdesc}
--- 981,987 ----
  \index{process!killing}
  \index{process!signalling}
! Kill the process \var{pid} with signal \var{sig}.  Constants for the
! specific signals available on the host platform are defined in the
! \refmodule{signal} module.
  Availability: \UNIX.
  \end{funcdesc}



From fdrake@users.sourceforge.net  Fri Dec 21 03:58:50 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Thu, 20 Dec 2001 19:58:50 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libos.tex,1.74,1.75
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv29958/lib

Modified Files:
	libos.tex 
Log Message:
Add a reference to the signal module to the os.kill() description.
This closes SF bug #495609.


Index: libos.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** libos.tex	2001/12/20 17:24:11	1.74
--- libos.tex	2001/12/21 03:58:47	1.75
***************
*** 981,985 ****
  \index{process!killing}
  \index{process!signalling}
! Kill the process \var{pid} with signal \var{sig}.
  Availability: \UNIX.
  \end{funcdesc}
--- 981,987 ----
  \index{process!killing}
  \index{process!signalling}
! Kill the process \var{pid} with signal \var{sig}.  Constants for the
! specific signals available on the host platform are defined in the
! \refmodule{signal} module.
  Availability: \UNIX.
  \end{funcdesc}



From fdrake@users.sourceforge.net  Fri Dec 21 04:13:29 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Thu, 20 Dec 2001 20:13:29 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile,1.235,1.235.2.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc
In directory usw-pr-cvs1:/tmp/cvs-serv32412

Modified Files:
      Tag: release22-branch
	Makefile 
Log Message:
Set version number and release date.

Index: Makefile
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v
retrieving revision 1.235
retrieving revision 1.235.2.1
diff -C2 -d -r1.235 -r1.235.2.1
*** Makefile	2001/12/14 16:45:04	1.235
--- Makefile	2001/12/21 04:13:27	1.235.2.1
***************
*** 67,71 ****
  # This is the *documentation* release, and is used to construct the file
  # names of the downloadable tarballs.
! RELEASE=2.2c1+
  
  PYTHON=	   python
--- 67,71 ----
  # This is the *documentation* release, and is used to construct the file
  # names of the downloadable tarballs.
! RELEASE=2.2
  
  PYTHON=	   python



From fdrake@users.sourceforge.net  Fri Dec 21 04:13:30 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Thu, 20 Dec 2001 20:13:30 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs boilerplate.tex,1.70,1.70.2.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/texinputs
In directory usw-pr-cvs1:/tmp/cvs-serv32412/texinputs

Modified Files:
      Tag: release22-branch
	boilerplate.tex 
Log Message:
Set version number and release date.

Index: boilerplate.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/boilerplate.tex,v
retrieving revision 1.70
retrieving revision 1.70.2.1
diff -C2 -d -r1.70 -r1.70.2.1
*** boilerplate.tex	2001/12/14 16:45:04	1.70
--- boilerplate.tex	2001/12/21 04:13:27	1.70.2.1
***************
*** 6,11 ****
  }
  
! \date{\today}			% XXX update before release!
  \release{2.2}			% software release, not documentation
! \setreleaseinfo{c1+}		% empty for final release
  \setshortversion{2.2}		% major.minor only for software
--- 6,11 ----
  }
  
! \date{December 21, 2001}	% XXX update before release!
  \release{2.2}			% software release, not documentation
! \setreleaseinfo{}		% empty for final release
  \setshortversion{2.2}		% major.minor only for software



From anthonybaxter@users.sourceforge.net  Fri Dec 21 04:46:21 2001
From: anthonybaxter@users.sourceforge.net (Anthony Baxter)
Date: Thu, 20 Dec 2001 20:46:21 -0800
Subject: [Python-checkins] CVS: python/dist/src/Lib dumbdbm.py,1.10,1.10.4.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv4673

Modified Files:
      Tag: release21-maint
	dumbdbm.py 
Log Message:
d'oh! could have _sworn_ I checked this in last weekend.

Make dumbdbm merely "dumb", rather than "terminally broken". Without this
patch, it's almost impossible to use dumbdbm _without_ causing horrible
datalossage. With this patch, dumbdbm passes my own horrible torture test,
as well as the roundup test suite.

dumbdbm really could do with a smidgin of a rewrite or two, but that's not
suitable for the release21-maint branch.

This patch should go into the trunk as well. 


Index: dumbdbm.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/dumbdbm.py,v
retrieving revision 1.10
retrieving revision 1.10.4.1
diff -C2 -d -r1.10 -r1.10.4.1
*** dumbdbm.py	2001/03/02 06:43:49	1.10
--- dumbdbm.py	2001/12/21 04:46:19	1.10.4.1
***************
*** 140,145 ****
--- 140,150 ----
  
      def close(self):
+         self._commit()
          self._index = None
          self._datfile = self._dirfile = self._bakfile = None
+ 
+     def __del__(self):
+         if self._index is not None:
+             self._commit()
  
  



From anthonybaxter@users.sourceforge.net  Fri Dec 21 05:13:39 2001
From: anthonybaxter@users.sourceforge.net (Anthony Baxter)
Date: Thu, 20 Dec 2001 21:13:39 -0800
Subject: [Python-checkins] CVS: python/dist/src/Lib dumbdbm.py,1.15,1.16
Message-ID: 

Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv8709

Modified Files:
	dumbdbm.py 
Log Message:
forward-patch from release21-maint branch:
  Make dumbdbm merely "dumb", rather than "terminally broken". Without this
  patch, it's almost impossible to use dumbdbm _without_ causing horrible
  datalossage. With this patch, dumbdbm passes my own horrible torture test,
  as well as the roundup test suite.

  dumbdbm really could do with a smidgin of a rewrite or two, but that's not
  suitable for the release21-maint branch.


Index: dumbdbm.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/dumbdbm.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** dumbdbm.py	2001/12/07 21:54:46	1.15
--- dumbdbm.py	2001/12/21 05:13:37	1.16
***************
*** 144,149 ****
--- 144,155 ----
  
      def close(self):
+         self._commit()
          self._index = None
          self._datfile = self._dirfile = self._bakfile = None
+ 
+     def __del__(self):
+         if self._index is not None:
+             self._commit()
+   
  
  



From gvanrossum@users.sourceforge.net  Fri Dec 21 05:29:47 2001
From: gvanrossum@users.sourceforge.net (Guido van Rossum)
Date: Thu, 20 Dec 2001 21:29:47 -0800
Subject: [Python-checkins] CVS: python/dist/src/Lib dumbdbm.py,1.15,1.15.4.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv10996

Modified Files:
      Tag: release22-branch
	dumbdbm.py 
Log Message:
Merge Anthony's last-minute checkin to the trunk into the release
branch.  This really is worth it!


Index: dumbdbm.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/dumbdbm.py,v
retrieving revision 1.15
retrieving revision 1.15.4.1
diff -C2 -d -r1.15 -r1.15.4.1
*** dumbdbm.py	2001/12/07 21:54:46	1.15
--- dumbdbm.py	2001/12/21 05:29:45	1.15.4.1
***************
*** 144,149 ****
--- 144,155 ----
  
      def close(self):
+         self._commit()
          self._index = None
          self._datfile = self._dirfile = self._bakfile = None
+ 
+     def __del__(self):
+         if self._index is not None:
+             self._commit()
+   
  
  



From gvanrossum@users.sourceforge.net  Fri Dec 21 05:45:47 2001
From: gvanrossum@users.sourceforge.net (Guido van Rossum)
Date: Thu, 20 Dec 2001 21:45:47 -0800
Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.337,1.337.2.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv13370

Modified Files:
      Tag: release22-branch
	NEWS 
Log Message:
Note visible changes in 2.2 since 2.2c1.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.337
retrieving revision 1.337.2.1
diff -C2 -d -r1.337 -r1.337.2.1
*** NEWS	2001/12/14 23:16:18	1.337
--- NEWS	2001/12/21 05:45:45	1.337.2.1
***************
*** 5,14 ****
--- 5,34 ----
  Type/class unification and new-style classes
  
+ - pickle.py, cPickle: allow pickling instances of new-style classes
+   with a custom metaclass.
+ 
  Core and builtins
  
+ - weakref proxy object: when comparing, unwrap both arguments if both
+   are proxies.
+ 
  Extension modules
  
+ - binascii.b2a_base64(): fix a potential buffer overrun when encoding
+   very short strings.
+ 
  Library
  
+ - dumbdbm.py: fixed a dumb old bug (the file didn't get synched at
+   close or delete time).
+ 
+ - rfc822.py: fixed a bug where the address '<>' was converted to None
+   instead of an empty string.
+ 
+ - xmlrpclib.py: version 1.0.0; uses precision for doubles.
+ 
+ - test suite: the pickle and cPickle tests were not executing any code
+   when run from the standard regresssion test.
+ 
  Tools/Demos
  
***************
*** 22,25 ****
--- 42,56 ----
  
  Windows
+ 
+ - distutils package: fixed broken Windows installers (bdist_wininst).
+ 
+ - tempfile.py: prevent mysterious warnings when TemporaryFileWrapper
+   instances are deleted at process exit time.
+ 
+ - socket.py: prevent mysterious warnings when socket instances are
+   deleted at process exit time.
+ 
+ - posixmodule.c: fix a Windows crash with stat() of a filename ending
+   in backslash.
  
  Mac



From bwarsaw@users.sourceforge.net  Fri Dec 21 05:49:28 2001
From: bwarsaw@users.sourceforge.net (Barry Warsaw)
Date: Thu, 20 Dec 2001 21:49:28 -0800
Subject: [Python-checkins] CVS: python/nondist/peps pep-0008.txt,1.5,1.6
Message-ID: 

Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv13999

Modified Files:
	pep-0008.txt 
Log Message:
Roger  points out that "mixed case" is
inconsistently used both to describe mixedCase and MixedCase.
MixedCase should really be CapWords, reserving mixedCase for the
situation where the first letter is lowercased.

Also, add a comment that MixedCase is sometimes called CamelCase.
Note that the existing most common case usage is that CamelCase has an
initial capitalized letter.

http://www.wikipedia.com/wiki/CamelCase


Index: pep-0008.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0008.txt,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** pep-0008.txt	2001/11/01 13:03:30	1.5
--- pep-0008.txt	2001/12/21 05:49:26	1.6
***************
*** 275,279 ****
      - UPPER_CASE_WITH_UNDERSCORES
  
!     - CapitalizedWords (or CapWords)
  
      - mixedCase (differs from CapitalizedWords by initial lowercase
--- 275,280 ----
      - UPPER_CASE_WITH_UNDERSCORES
  
!     - CapitalizedWords (or CapWords, or CamelCase -- so named because
!       of the bumpy look of its letters[4])
  
      - mixedCase (differs from CapitalizedWords by initial lowercase
***************
*** 324,331 ****
      Module Names
  
!       Module names can be either MixedCase or lowercase.  There is no
        unambiguous convention to decide which to use.  Modules that
        export a single class (or a number of closely related classes,
!       plus some additional support) are often named in MixedCase, with
        the module name being the same as the class name (e.g. the
        standard StringIO module).  Modules that export a bunch of
--- 325,332 ----
      Module Names
  
!       Module names can be either CapWords or lowercase.  There is no
        unambiguous convention to decide which to use.  Modules that
        export a single class (or a number of closely related classes,
!       plus some additional support) are often named in CapWords, with
        the module name being the same as the class name (e.g. the
        standard StringIO module).  Modules that export a bunch of
***************
*** 400,403 ****
--- 401,406 ----
  
      [3] PEP 257, Docstring Conventions, Goodger, van Rossum
+ 
+     [4] http://www.wikipedia.com/wiki/CamelCase
  
  



From bwarsaw@users.sourceforge.net  Fri Dec 21 07:02:53 2001
From: bwarsaw@users.sourceforge.net (Barry Warsaw)
Date: Thu, 20 Dec 2001 23:02:53 -0800
Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.337.2.1,1.337.2.2
Message-ID: 

Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv25606

Modified Files:
      Tag: release22-branch
	NEWS 
Log Message:
Minor note that the rfc822.py fix also fixes the email.Utils module.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.337.2.1
retrieving revision 1.337.2.2
diff -C2 -d -r1.337.2.1 -r1.337.2.2
*** NEWS	2001/12/21 05:45:45	1.337.2.1
--- NEWS	2001/12/21 07:02:51	1.337.2.2
***************
*** 24,28 ****
  
  - rfc822.py: fixed a bug where the address '<>' was converted to None
!   instead of an empty string.
  
  - xmlrpclib.py: version 1.0.0; uses precision for doubles.
--- 24,28 ----
  
  - rfc822.py: fixed a bug where the address '<>' was converted to None
!   instead of an empty string (also fixes the email.Utils module).
  
  - xmlrpclib.py: version 1.0.0; uses precision for doubles.



From jhylton@users.sourceforge.net  Fri Dec 21 14:41:04 2001
From: jhylton@users.sourceforge.net (Jeremy Hylton)
Date: Fri, 21 Dec 2001 06:41:04 -0800
Subject: [Python-checkins] CVS: python/dist/src/Lib/compiler ast.py,1.19,1.19.8.1 pycodegen.py,1.58,1.58.4.1 symbols.py,1.10,1.10.8.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Lib/compiler
In directory usw-pr-cvs1:/tmp/cvs-serv23307

Modified Files:
      Tag: release22-branch
	ast.py pycodegen.py symbols.py 
Log Message:
Fix 'eval' mode of compiler.compile().

Based on suggestion by Shane Hathaway.

Add an artifical Expression() node to the AST.  This node serves only
to make the ExpressionCodeGenerator simpler and more like the Module
version.  An Expression() wraps the actual expression node compiled in
'eval' mode.  

Add visitExpression() to CodeGenerator and SymbolVisitor.



Index: ast.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/compiler/ast.py,v
retrieving revision 1.19
retrieving revision 1.19.8.1
diff -C2 -d -r1.19 -r1.19.8.1
*** ast.py	2001/10/18 21:57:37	1.19
--- ast.py	2001/12/21 14:41:02	1.19.8.1
***************
*** 283,286 ****
--- 283,301 ----
          return "Module(%s, %s)" % (repr(self.doc), repr(self.node))
  
+ class Expression(Node):
+     # Expression is an artifical node class to support "eval"
+     nodes["expression"] = "Expression"
+     def __init__(self, expr):
+         self.expr = expr
+ 
+     def getChildren(self):
+         return self.expr,
+ 
+     def getChildNodes(self):
+         return self.expr,
+ 
+     def __repr__(self):
+         return "Expression(%s)" % (repr(self.expr))
+ 
  class UnaryAdd(Node):
      nodes["unaryadd"] = "UnaryAdd"

Index: pycodegen.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/compiler/pycodegen.py,v
retrieving revision 1.58
retrieving revision 1.58.4.1
diff -C2 -d -r1.58 -r1.58.4.1
*** pycodegen.py	2001/11/27 23:35:10	1.58
--- pycodegen.py	2001/12/21 14:41:02	1.58.4.1
***************
*** 35,38 ****
--- 35,39 ----
  END_FINALLY = 4
  
+ # XXX this doesn't seem to be used
  class BlockStack(misc.Stack):
      __super_init = misc.Stack.__init__
***************
*** 352,355 ****
--- 353,363 ----
          self.emit('RETURN_VALUE')
  
+     def visitExpression(self, node):
+         self.set_lineno(node)
+         self.scopes = self.parseSymbols(node)
+         self.scope = self.scopes[node]
+         self.visit(node.expr)
+         self.emit('RETURN_VALUE')
+ 
      def visitFunction(self, node):
          self._visitFuncOrLambda(node, isLambda=0)
***************
*** 1159,1165 ****
          self.graph = pyassem.PyFlowGraph("", tree.filename)
          self.__super_init()
!         self.set_lineno(tree)
!         walk(tree, self)
!         self.emit('RETURN_VALUE')
  
      def get_module(self):
--- 1167,1171 ----
          self.graph = pyassem.PyFlowGraph("", tree.filename)
          self.__super_init()
!         walk(ast.Expression(tree), self)
  
      def get_module(self):
***************
*** 1182,1185 ****
--- 1188,1192 ----
      def get_module(self):
          return self
+     
      def visitDiscard(self, node):
          # XXX Discard means it's an expression.  Perhaps this is a bad
***************
*** 1300,1304 ****
          self.graph.setFreeVars(self.scope.get_free_vars())
          self.graph.setCellVars(self.scope.get_cell_vars())
- ##        self.graph.setFlag(CO_NESTED)
  
  def generateArgList(arglist):
--- 1307,1310 ----

Index: symbols.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/compiler/symbols.py,v
retrieving revision 1.10
retrieving revision 1.10.8.1
diff -C2 -d -r1.10 -r1.10.8.1
*** symbols.py	2001/10/18 21:57:37	1.10
--- symbols.py	2001/12/21 14:41:02	1.10.8.1
***************
*** 207,210 ****
--- 207,212 ----
          self.visit(node.node, scope)
  
+     visitExpression = visitModule
+ 
      def visitFunction(self, node, parent):
          parent.add_def(node.name)



From gvanrossum@users.sourceforge.net  Fri Dec 21 15:26:08 2001
From: gvanrossum@users.sourceforge.net (Guido van Rossum)
Date: Fri, 21 Dec 2001 07:26:08 -0800
Subject: [Python-checkins] CVS: python/dist/src/Modules cPickle.c,2.73,2.73.2.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv1502

Modified Files:
      Tag: release22-branch
	cPickle.c 
Log Message:
We go down 2000 recursion levels before we start getting suspicious
about recursive data structures in 'fast' mode.  Jack is reporting
mysterious crashes in test_cpickle that could easily be stack
overflows (and test_cpickle exercises the limit).

Let's make the limit 50, but configurable by defining
PY_CPICKLE_FAST_LIMIT when cPickle is compiled.

Note that even the most hairy nested data structures don't nest this
deep, *except* when you use Python object references to implement
linked lists.  So this shouldn't slow down the performance of fast
pickling, I think.


Index: cPickle.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v
retrieving revision 2.73
retrieving revision 2.73.2.1
diff -C2 -d -r2.73 -r2.73.2.1
*** cPickle.c	2001/12/19 16:56:54	2.73
--- cPickle.c	2001/12/21 15:26:05	2.73.2.1
***************
*** 322,326 ****
  } Picklerobject;
  
! #define FAST_LIMIT 2000
  
  staticforward PyTypeObject Picklertype;
--- 322,328 ----
  } Picklerobject;
  
! #ifndef PY_CPICKLE_FAST_LIMIT
! #define PY_CPICKLE_FAST_LIMIT 50
! #endif
  
  staticforward PyTypeObject Picklertype;
***************
*** 892,896 ****
  {
      /* if fast_container < 0, we're doing an error exit. */
!     if (++self->fast_container >= FAST_LIMIT) {
  	PyObject *key = NULL;
  	if (self->fast_memo == NULL) {
--- 894,898 ----
  {
      /* if fast_container < 0, we're doing an error exit. */
!     if (++self->fast_container >= PY_CPICKLE_FAST_LIMIT) {
  	PyObject *key = NULL;
  	if (self->fast_memo == NULL) {
***************
*** 922,926 ****
  fast_save_leave(Picklerobject *self, PyObject *obj)
  {
!     if (self->fast_container-- >= FAST_LIMIT) {
  	PyObject *key = PyLong_FromVoidPtr(obj);
  	if (key == NULL)
--- 924,928 ----
  fast_save_leave(Picklerobject *self, PyObject *obj)
  {
!     if (self->fast_container-- >= PY_CPICKLE_FAST_LIMIT) {
  	PyObject *key = PyLong_FromVoidPtr(obj);
  	if (key == NULL)



From gvanrossum@users.sourceforge.net  Fri Dec 21 15:28:47 2001
From: gvanrossum@users.sourceforge.net (Guido van Rossum)
Date: Fri, 21 Dec 2001 07:28:47 -0800
Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_cpickle.py,1.10,1.10.2.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv2108

Modified Files:
      Tag: release22-branch
	test_cpickle.py 
Log Message:
Add test that a long chain of references can be correctly pickled in
fast mode.


Index: test_cpickle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_cpickle.py,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -C2 -d -r1.10 -r1.10.2.1
*** test_cpickle.py	2001/12/19 16:42:15	1.10
--- test_cpickle.py	2001/12/21 15:28:45	1.10.2.1
***************
*** 81,84 ****
--- 81,91 ----
                            self)
  
+     def test_nonrecursive_deep(self):
+         a = []
+         for i in range(100):
+             a = [a]
+         b = self.loads(self.dumps(a))
+         self.assertEqual(a, b)
+ 
  def test_main():
      loader = unittest.TestLoader()



From gvanrossum@users.sourceforge.net  Fri Dec 21 15:33:59 2001
From: gvanrossum@users.sourceforge.net (Guido van Rossum)
Date: Fri, 21 Dec 2001 07:33:59 -0800
Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.337.2.2,1.337.2.3
Message-ID: 

Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv3253

Modified Files:
      Tag: release22-branch
	NEWS 
Log Message:
Add news about cPickle checkin.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.337.2.2
retrieving revision 1.337.2.3
diff -C2 -d -r1.337.2.2 -r1.337.2.3
*** NEWS	2001/12/21 07:02:51	1.337.2.2
--- NEWS	2001/12/21 15:33:57	1.337.2.3
***************
*** 18,21 ****
--- 18,27 ----
    very short strings.
  
+ - cPickle: the obscure "fast" mode was suspected of causing stack
+   overflows on the Mac.  Hopefully fixed this by setting the recursion
+   limit much smaller.  If the limit is too low (it only affects
+   performance), you can change it by defining PY_CPICKLE_FAST_LIMIT
+   when compiling cPickle.c (or in pyconfig.h).
+ 
  Library
  



From akuchling@users.sourceforge.net  Fri Dec 21 15:34:19 2001
From: akuchling@users.sourceforge.net (A.M. Kuchling)
Date: Fri, 21 Dec 2001 07:34:19 -0800
Subject: [Python-checkins] CVS: python/dist/src/Lib/distutils extension.py,1.9,1.10
Message-ID: 

Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory usw-pr-cvs1:/tmp/cvs-serv2918

Modified Files:
	extension.py 
Log Message:
Suggested by Pete Shinners: treat .m and .mm files as source code.
    
Question for Jack Jansen: is this reasonable?  

Candidate for 2.2 release branch (if Jack thinks it's OK).


Index: extension.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/extension.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** extension.py	2001/12/06 20:51:35	1.9
--- extension.py	2001/12/21 15:34:17	1.10
***************
*** 161,165 ****
              switch = word[0:2] ; value = word[2:]
  
!             if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++"):
                  # hmm, should we do something about C vs. C++ sources?
                  # or leave it up to the CCompiler implementation to
--- 161,165 ----
              switch = word[0:2] ; value = word[2:]
  
!             if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++", ".m", ".mm"):
                  # hmm, should we do something about C vs. C++ sources?
                  # or leave it up to the CCompiler implementation to



From jhylton@users.sourceforge.net  Fri Dec 21 16:11:35 2001
From: jhylton@users.sourceforge.net (Jeremy Hylton)
Date: Fri, 21 Dec 2001 08:11:35 -0800
Subject: [Python-checkins] CVS: python/dist/src/Lib/compiler ast.py,1.19.8.1,1.19.8.2 pycodegen.py,1.58.4.1,1.58.4.2 transformer.py,1.30,1.30.8.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Lib/compiler
In directory usw-pr-cvs1:/tmp/cvs-serv12110

Modified Files:
      Tag: release22-branch
	ast.py pycodegen.py transformer.py 
Log Message:
Make the child of Expression 'node' rather than 'expr'.

Move creation of Expression() node into Transformer.eval_input().


Index: ast.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/compiler/ast.py,v
retrieving revision 1.19.8.1
retrieving revision 1.19.8.2
diff -C2 -d -r1.19.8.1 -r1.19.8.2
*** ast.py	2001/12/21 14:41:02	1.19.8.1
--- ast.py	2001/12/21 16:11:33	1.19.8.2
***************
*** 286,300 ****
      # Expression is an artifical node class to support "eval"
      nodes["expression"] = "Expression"
!     def __init__(self, expr):
!         self.expr = expr
  
      def getChildren(self):
!         return self.expr,
  
      def getChildNodes(self):
!         return self.expr,
  
      def __repr__(self):
!         return "Expression(%s)" % (repr(self.expr))
  
  class UnaryAdd(Node):
--- 286,300 ----
      # Expression is an artifical node class to support "eval"
      nodes["expression"] = "Expression"
!     def __init__(self, node):
!         self.node = node
  
      def getChildren(self):
!         return self.node,
  
      def getChildNodes(self):
!         return self.node,
  
      def __repr__(self):
!         return "Expression(%s)" % (repr(self.node))
  
  class UnaryAdd(Node):

Index: pycodegen.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/compiler/pycodegen.py,v
retrieving revision 1.58.4.1
retrieving revision 1.58.4.2
diff -C2 -d -r1.58.4.1 -r1.58.4.2
*** pycodegen.py	2001/12/21 14:41:02	1.58.4.1
--- pycodegen.py	2001/12/21 16:11:33	1.58.4.2
***************
*** 357,361 ****
          self.scopes = self.parseSymbols(node)
          self.scope = self.scopes[node]
!         self.visit(node.expr)
          self.emit('RETURN_VALUE')
  
--- 357,361 ----
          self.scopes = self.parseSymbols(node)
          self.scope = self.scopes[node]
!         self.visit(node.node)
          self.emit('RETURN_VALUE')
  
***************
*** 1167,1171 ****
          self.graph = pyassem.PyFlowGraph("", tree.filename)
          self.__super_init()
!         walk(ast.Expression(tree), self)
  
      def get_module(self):
--- 1167,1171 ----
          self.graph = pyassem.PyFlowGraph("", tree.filename)
          self.__super_init()
!         walk(tree, self)
  
      def get_module(self):

Index: transformer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/compiler/transformer.py,v
retrieving revision 1.30
retrieving revision 1.30.8.1
diff -C2 -d -r1.30 -r1.30.8.1
*** transformer.py	2001/10/18 21:57:37	1.30
--- transformer.py	2001/12/21 16:11:33	1.30.8.1
***************
*** 173,177 ****
          # from the built-in function input()
          ### is this sufficient?
!         return self.com_node(nodelist[0])
  
      def funcdef(self, nodelist):
--- 173,177 ----
          # from the built-in function input()
          ### is this sufficient?
!         return Expression(self.com_node(nodelist[0]))
  
      def funcdef(self, nodelist):



From bwarsaw@users.sourceforge.net  Fri Dec 21 16:30:38 2001
From: bwarsaw@users.sourceforge.net (Barry Warsaw)
Date: Fri, 21 Dec 2001 08:30:38 -0800
Subject: [Python-checkins] CVS: python/dist/src/Python mysnprintf.c,2.4,2.4.4.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv16683

Modified Files:
      Tag: release22-branch
	mysnprintf.c 
Log Message:
PyOS_vsnprintf(): Change PyMem_Malloc() call to PyMem_MALLOC() macro,
(ditto for PyMem_Free() -> PyMem_FREE()) to fix and close SF bug
#495875 on systems that HAVE_SNPRINTF=0.

Check in on both release-22 branch and trunk.



Index: mysnprintf.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/mysnprintf.c,v
retrieving revision 2.4
retrieving revision 2.4.4.1
diff -C2 -d -r2.4 -r2.4.4.1
*** mysnprintf.c	2001/12/03 00:43:33	2.4
--- mysnprintf.c	2001/12/21 16:30:35	2.4.4.1
***************
*** 66,70 ****
  #else
  	/* Emulate it. */
! 	buffer = PyMem_Malloc(size + 512);
  	if (buffer == NULL) {
  		len = -666;
--- 66,70 ----
  #else
  	/* Emulate it. */
! 	buffer = PyMem_MALLOC(size + 512);
  	if (buffer == NULL) {
  		len = -666;
***************
*** 86,90 ****
  		str[to_copy] = '\0';
  	}
! 	PyMem_Free(buffer);
  Done:
  #endif
--- 86,90 ----
  		str[to_copy] = '\0';
  	}
! 	PyMem_FREE(buffer);
  Done:
  #endif



From bwarsaw@users.sourceforge.net  Fri Dec 21 16:32:17 2001
From: bwarsaw@users.sourceforge.net (Barry Warsaw)
Date: Fri, 21 Dec 2001 08:32:17 -0800
Subject: [Python-checkins] CVS: python/dist/src/Python mysnprintf.c,2.4,2.5
Message-ID: 

Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv17104

Modified Files:
	mysnprintf.c 
Log Message:
PyOS_vsnprintf(): Change PyMem_Malloc() call to PyMem_MALLOC() macro,
(ditto for PyMem_Free() -> PyMem_FREE()) to fix and close SF bug
#495875 on systems that HAVE_SNPRINTF=0.

Check in on both release-22 branch and trunk.



Index: mysnprintf.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/mysnprintf.c,v
retrieving revision 2.4
retrieving revision 2.5
diff -C2 -d -r2.4 -r2.5
*** mysnprintf.c	2001/12/03 00:43:33	2.4
--- mysnprintf.c	2001/12/21 16:32:15	2.5
***************
*** 66,70 ****
  #else
  	/* Emulate it. */
! 	buffer = PyMem_Malloc(size + 512);
  	if (buffer == NULL) {
  		len = -666;
--- 66,70 ----
  #else
  	/* Emulate it. */
! 	buffer = PyMem_MALLOC(size + 512);
  	if (buffer == NULL) {
  		len = -666;
***************
*** 86,90 ****
  		str[to_copy] = '\0';
  	}
! 	PyMem_Free(buffer);
  Done:
  #endif
--- 86,90 ----
  		str[to_copy] = '\0';
  	}
! 	PyMem_FREE(buffer);
  Done:
  #endif



From bwarsaw@users.sourceforge.net  Fri Dec 21 16:40:21 2001
From: bwarsaw@users.sourceforge.net (Barry Warsaw)
Date: Fri, 21 Dec 2001 08:40:21 -0800
Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.337.2.3,1.337.2.4
Message-ID: 

Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv19061

Modified Files:
      Tag: release22-branch
	NEWS 
Log Message:
Added an entry from Jack about Mac news in the 2.2 final release.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.337.2.3
retrieving revision 1.337.2.4
diff -C2 -d -r1.337.2.3 -r1.337.2.4
*** NEWS	2001/12/21 15:33:57	1.337.2.3
--- NEWS	2001/12/21 16:40:19	1.337.2.4
***************
*** 62,65 ****
--- 62,69 ----
  Mac
  
+ - The Carbon toolbox modules have been upgraded to Universal Headers
+   3.4, and experimental CoreGraphics and CarbonEvents modules have
+   been added.  All only for framework-enabled MacOSX.
+ 
  
  What's New in Python 2.2c1?



From fdrake@users.sourceforge.net  Fri Dec 21 16:46:30 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Fri, 21 Dec 2001 08:46:30 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile,1.235,1.236
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc
In directory usw-pr-cvs1:/tmp/cvs-serv20560

Modified Files:
	Makefile 
Log Message:
Doc changes on the trunk will not be in Python 2.2, so let's call it 2.2+.

Index: Makefile
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v
retrieving revision 1.235
retrieving revision 1.236
diff -C2 -d -r1.235 -r1.236
*** Makefile	2001/12/14 16:45:04	1.235
--- Makefile	2001/12/21 16:46:26	1.236
***************
*** 67,71 ****
  # This is the *documentation* release, and is used to construct the file
  # names of the downloadable tarballs.
! RELEASE=2.2c1+
  
  PYTHON=	   python
--- 67,71 ----
  # This is the *documentation* release, and is used to construct the file
  # names of the downloadable tarballs.
! RELEASE=2.2+
  
  PYTHON=	   python



From fdrake@users.sourceforge.net  Fri Dec 21 16:46:30 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Fri, 21 Dec 2001 08:46:30 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs boilerplate.tex,1.70,1.71
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/texinputs
In directory usw-pr-cvs1:/tmp/cvs-serv20560/texinputs

Modified Files:
	boilerplate.tex 
Log Message:
Doc changes on the trunk will not be in Python 2.2, so let's call it 2.2+.

Index: boilerplate.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/boilerplate.tex,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** boilerplate.tex	2001/12/14 16:45:04	1.70
--- boilerplate.tex	2001/12/21 16:46:28	1.71
***************
*** 8,11 ****
  \date{\today}			% XXX update before release!
  \release{2.2}			% software release, not documentation
! \setreleaseinfo{c1+}		% empty for final release
  \setshortversion{2.2}		% major.minor only for software
--- 8,11 ----
  \date{\today}			% XXX update before release!
  \release{2.2}			% software release, not documentation
! \setreleaseinfo{+}		% empty for final release
  \setshortversion{2.2}		% major.minor only for software



From fdrake@users.sourceforge.net  Fri Dec 21 17:44:46 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Fri, 21 Dec 2001 09:44:46 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsocket.tex,1.51,1.51.4.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv10163/lib

Modified Files:
      Tag: release21-maint
	libsocket.tex 
Log Message:
Add notes that fromfd() and s.makefile() are Unix-specific.
This fixes SF bug #495896.

Fix up various markup consistency & style guide conformance nits.


Index: libsocket.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsocket.tex,v
retrieving revision 1.51
retrieving revision 1.51.4.1
diff -C2 -d -r1.51 -r1.51.4.1
*** libsocket.tex	2001/01/10 19:34:52	1.51
--- libsocket.tex	2001/12/21 17:44:43	1.51.4.1
***************
*** 115,119 ****
  \begin{funcdesc}{gethostbyname}{hostname}
  Translate a host name to IP address format.  The IP address is
! returned as a string, e.g.,  \code{'100.50.200.5'}.  If the host name
  is an IP address itself it is returned unchanged.  See
  \function{gethostbyname_ex()} for a more complete interface.
--- 115,119 ----
  \begin{funcdesc}{gethostbyname}{hostname}
  Translate a host name to IP address format.  The IP address is
! returned as a string, such as \code{'100.50.200.5'}.  If the host name
  is an IP address itself it is returned unchanged.  See
  \function{gethostbyname_ex()} for a more complete interface.
***************
*** 151,155 ****
  
  \begin{funcdesc}{getprotobyname}{protocolname}
! Translate an Internet protocol name (e.g.\ \code{'icmp'}) to a constant
  suitable for passing as the (optional) third argument to the
  \function{socket()} function.  This is usually only needed for sockets
--- 151,155 ----
  
  \begin{funcdesc}{getprotobyname}{protocolname}
! Translate an Internet protocol name (for example, \code{'icmp'}) to a constant
  suitable for passing as the (optional) third argument to the
  \function{socket()} function.  This is usually only needed for sockets
***************
*** 181,186 ****
  descriptor is invalid.  This function is rarely needed, but can be
  used to get or set socket options on a socket passed to a program as
! standard input or output (e.g.\ a server started by the \UNIX{} inet
  daemon).
  \end{funcdesc}
  
--- 181,187 ----
  descriptor is invalid.  This function is rarely needed, but can be
  used to get or set socket options on a socket passed to a program as
! standard input or output (such as a server started by the \UNIX{} inet
  daemon).
+ Availability: \UNIX.
  \end{funcdesc}
  
***************
*** 210,215 ****
  
  \begin{funcdesc}{inet_aton}{ip_string}
! Convert an IP address from dotted-quad string format
! (e.g.\ '123.45.67.89') to 32-bit packed binary format, as a string four
  characters in length.
  
--- 211,216 ----
  
  \begin{funcdesc}{inet_aton}{ip_string}
! Convert an IP address from dotted-quad string format (for example,
! '123.45.67.89') to 32-bit packed binary format, as a string four
  characters in length.
  
***************
*** 227,231 ****
  Convert a 32-bit packed IP address (a string four characters in
  length) to its standard dotted-quad string representation
! (e.g. '123.45.67.89').
  
  Useful when conversing with a program that uses the standard C library
--- 228,232 ----
  Convert a 32-bit packed IP address (a string four characters in
  length) to its standard dotted-quad string representation
! (for example, '123.45.67.89').
  
  Useful when conversing with a program that uses the standard C library
***************
*** 293,297 ****
  can still raise exceptions).  The error indicator is \code{0} if the
  operation succeeded, otherwise the value of the \cdata{errno}
! variable.  This is useful, e.g., for asynchronous connects.
  \strong{Note:}  This method has historically accepted a pair of
  parameters for \constant{AF_INET} addresses instead of only a tuple.
--- 294,298 ----
  can still raise exceptions).  The error indicator is \code{0} if the
  operation succeeded, otherwise the value of the \cdata{errno}
! variable.  This is useful to support, for example, asynchronous connects.
  \strong{Note:}  This method has historically accepted a pair of
  parameters for \constant{AF_INET} addresses instead of only a tuple.
***************
*** 345,349 ****
  \index{I/O control!buffering}The optional \var{mode}
  and \var{bufsize} arguments are interpreted the same way as by the
! built-in \function{open()} function.
  \end{methoddesc}
  
--- 346,352 ----
  \index{I/O control!buffering}The optional \var{mode}
  and \var{bufsize} arguments are interpreted the same way as by the
! built-in \function{open()} function; see ``Built-in Functions''
! (section \ref{built-in-funcs}) for more information.
! Availability: \UNIX.
  \end{methoddesc}
  



From fdrake@users.sourceforge.net  Fri Dec 21 17:45:05 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Fri, 21 Dec 2001 09:45:05 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsocket.tex,1.58,1.59
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv10282/lib

Modified Files:
	libsocket.tex 
Log Message:
Add notes that fromfd() and s.makefile() are Unix-specific.
This fixes SF bug #495896.

Fix up various markup consistency & style guide conformance nits.


Index: libsocket.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsocket.tex,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** libsocket.tex	2001/12/05 05:25:59	1.58
--- libsocket.tex	2001/12/21 17:45:03	1.59
***************
*** 91,110 ****
  \begin{excdesc}{herror}
  This exception is raised for address-related errors, i.e. for
! functions that use \var{h_errno} in C API, including
! \function{gethostbyname_ex} and \function{gethostbyaddr}.
  
  The accompanying value is a pair \code{(\var{h_errno}, \var{string})}
  representing an error returned by a library call. \var{string}
  represents the description of \var{h_errno}, as returned by
! \cfunction{hstrerror} C API. 
  \end{excdesc}
  
  \begin{excdesc}{gaierror}
  This exception is raised for address-related errors, for
! \function{getaddrinfo} and \function{getnameinfo}.
  The accompanying value is a pair \code{(\var{error}, \var{string})}
  representing an error returned by a library call.
  \var{string} represents the description of \var{error}, as returned
! by \cfunction{gai_strerror} C API.
  \end{excdesc}
  
--- 91,110 ----
  \begin{excdesc}{herror}
  This exception is raised for address-related errors, i.e. for
! functions that use \var{h_errno} in the C API, including
! \function{gethostbyname_ex()} and \function{gethostbyaddr()}.
  
  The accompanying value is a pair \code{(\var{h_errno}, \var{string})}
  representing an error returned by a library call. \var{string}
  represents the description of \var{h_errno}, as returned by
! the \cfunction{hstrerror()} C function.
  \end{excdesc}
  
  \begin{excdesc}{gaierror}
  This exception is raised for address-related errors, for
! \function{getaddrinfo()} and \function{getnameinfo()}.
  The accompanying value is a pair \code{(\var{error}, \var{string})}
  representing an error returned by a library call.
  \var{string} represents the description of \var{error}, as returned
! by the \cfunction{gai_strerror()} C function.
  \end{excdesc}
  
***************
*** 190,194 ****
  \begin{funcdesc}{gethostbyname}{hostname}
  Translate a host name to IPv4 address format.  The IPv4 address is
! returned as a string, e.g.,  \code{'100.50.200.5'}.  If the host name
  is an IPv4 address itself it is returned unchanged.  See
  \function{gethostbyname_ex()} for a more complete interface.
--- 190,194 ----
  \begin{funcdesc}{gethostbyname}{hostname}
  Translate a host name to IPv4 address format.  The IPv4 address is
! returned as a string, such as  \code{'100.50.200.5'}.  If the host name
  is an IPv4 address itself it is returned unchanged.  See
  \function{gethostbyname_ex()} for a more complete interface.
***************
*** 244,248 ****
  
  \begin{funcdesc}{getprotobyname}{protocolname}
! Translate an Internet protocol name (e.g.\ \code{'icmp'}) to a constant
  suitable for passing as the (optional) third argument to the
  \function{socket()} function.  This is usually only needed for sockets
--- 244,248 ----
  
  \begin{funcdesc}{getprotobyname}{protocolname}
! Translate an Internet protocol name (for example, \code{'icmp'}) to a constant
  suitable for passing as the (optional) third argument to the
  \function{socket()} function.  This is usually only needed for sockets
***************
*** 283,288 ****
  descriptor is invalid.  This function is rarely needed, but can be
  used to get or set socket options on a socket passed to a program as
! standard input or output (e.g.\ a server started by the \UNIX{} inet
  daemon).
  \end{funcdesc}
  
--- 283,289 ----
  descriptor is invalid.  This function is rarely needed, but can be
  used to get or set socket options on a socket passed to a program as
! standard input or output (such as a server started by the \UNIX{} inet
  daemon).
+ Availability: \UNIX.
  \end{funcdesc}
  
***************
*** 312,317 ****
  
  \begin{funcdesc}{inet_aton}{ip_string}
! Convert an IPv4 address from dotted-quad string format
! (e.g.\ '123.45.67.89') to 32-bit packed binary format, as a string four
  characters in length.
  
--- 313,318 ----
  
  \begin{funcdesc}{inet_aton}{ip_string}
! Convert an IPv4 address from dotted-quad string format (for example,
! '123.45.67.89') to 32-bit packed binary format, as a string four
  characters in length.
  
***************
*** 332,336 ****
  Convert a 32-bit packed IPv4 address (a string four characters in
  length) to its standard dotted-quad string representation
! (e.g. '123.45.67.89').
  
  Useful when conversing with a program that uses the standard C library
--- 333,337 ----
  Convert a 32-bit packed IPv4 address (a string four characters in
  length) to its standard dotted-quad string representation
! (for example, '123.45.67.89').
  
  Useful when conversing with a program that uses the standard C library
***************
*** 401,405 ****
  can still raise exceptions).  The error indicator is \code{0} if the
  operation succeeded, otherwise the value of the \cdata{errno}
! variable.  This is useful, e.g., for asynchronous connects.
  \note{This method has historically accepted a pair of
  parameters for \constant{AF_INET} addresses instead of only a tuple.
--- 402,406 ----
  can still raise exceptions).  The error indicator is \code{0} if the
  operation succeeded, otherwise the value of the \cdata{errno}
! variable.  This is useful to support, for example, asynchronous connects.
  \note{This method has historically accepted a pair of
  parameters for \constant{AF_INET} addresses instead of only a tuple.
***************
*** 455,458 ****
--- 456,460 ----
  built-in \function{file()} function; see ``Built-in Functions''
  (section \ref{built-in-funcs}) for more information.
+ Availability: \UNIX.
  \end{methoddesc}
  



From bwarsaw@users.sourceforge.net  Fri Dec 21 20:03:38 2001
From: bwarsaw@users.sourceforge.net (Barry Warsaw)
Date: Fri, 21 Dec 2001 12:03:38 -0800
Subject: [Python-checkins] CVS: python/dist/src/Lib/compiler ast.py,1.19,1.20 pycodegen.py,1.58,1.59 symbols.py,1.10,1.11 transformer.py,1.30,1.31
Message-ID: 

Update of /cvsroot/python/python/dist/src/Lib/compiler
In directory usw-pr-cvs1:/tmp/cvs-serv14609/Lib/compiler

Modified Files:
	ast.py pycodegen.py symbols.py transformer.py 
Log Message:
Merge of the release22 branch changes back into the trunk.


Index: ast.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/compiler/ast.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** ast.py	2001/10/18 21:57:37	1.19
--- ast.py	2001/12/21 20:03:35	1.20
***************
*** 283,286 ****
--- 283,301 ----
          return "Module(%s, %s)" % (repr(self.doc), repr(self.node))
  
+ class Expression(Node):
+     # Expression is an artifical node class to support "eval"
+     nodes["expression"] = "Expression"
+     def __init__(self, node):
+         self.node = node
+ 
+     def getChildren(self):
+         return self.node,
+ 
+     def getChildNodes(self):
+         return self.node,
+ 
+     def __repr__(self):
+         return "Expression(%s)" % (repr(self.node))
+ 
  class UnaryAdd(Node):
      nodes["unaryadd"] = "UnaryAdd"

Index: pycodegen.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/compiler/pycodegen.py,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** pycodegen.py	2001/11/27 23:35:10	1.58
--- pycodegen.py	2001/12/21 20:03:35	1.59
***************
*** 35,38 ****
--- 35,39 ----
  END_FINALLY = 4
  
+ # XXX this doesn't seem to be used
  class BlockStack(misc.Stack):
      __super_init = misc.Stack.__init__
***************
*** 352,355 ****
--- 353,363 ----
          self.emit('RETURN_VALUE')
  
+     def visitExpression(self, node):
+         self.set_lineno(node)
+         self.scopes = self.parseSymbols(node)
+         self.scope = self.scopes[node]
+         self.visit(node.node)
+         self.emit('RETURN_VALUE')
+ 
      def visitFunction(self, node):
          self._visitFuncOrLambda(node, isLambda=0)
***************
*** 1159,1165 ****
          self.graph = pyassem.PyFlowGraph("", tree.filename)
          self.__super_init()
-         self.set_lineno(tree)
          walk(tree, self)
-         self.emit('RETURN_VALUE')
  
      def get_module(self):
--- 1167,1171 ----
***************
*** 1182,1185 ****
--- 1188,1192 ----
      def get_module(self):
          return self
+     
      def visitDiscard(self, node):
          # XXX Discard means it's an expression.  Perhaps this is a bad
***************
*** 1300,1304 ****
          self.graph.setFreeVars(self.scope.get_free_vars())
          self.graph.setCellVars(self.scope.get_cell_vars())
- ##        self.graph.setFlag(CO_NESTED)
  
  def generateArgList(arglist):
--- 1307,1310 ----

Index: symbols.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/compiler/symbols.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** symbols.py	2001/10/18 21:57:37	1.10
--- symbols.py	2001/12/21 20:03:35	1.11
***************
*** 207,210 ****
--- 207,212 ----
          self.visit(node.node, scope)
  
+     visitExpression = visitModule
+ 
      def visitFunction(self, node, parent):
          parent.add_def(node.name)

Index: transformer.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/compiler/transformer.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** transformer.py	2001/10/18 21:57:37	1.30
--- transformer.py	2001/12/21 20:03:35	1.31
***************
*** 173,177 ****
          # from the built-in function input()
          ### is this sufficient?
!         return self.com_node(nodelist[0])
  
      def funcdef(self, nodelist):
--- 173,177 ----
          # from the built-in function input()
          ### is this sufficient?
!         return Expression(self.com_node(nodelist[0]))
  
      def funcdef(self, nodelist):



From bwarsaw@users.sourceforge.net  Fri Dec 21 20:04:24 2001
From: bwarsaw@users.sourceforge.net (Barry Warsaw)
Date: Fri, 21 Dec 2001 12:04:24 -0800
Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_cpickle.py,1.10,1.11
Message-ID: 

Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv14802/Lib/test

Modified Files:
	test_cpickle.py 
Log Message:
Merge of the release22 branch changes back into the trunk.


Index: test_cpickle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_cpickle.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** test_cpickle.py	2001/12/19 16:42:15	1.10
--- test_cpickle.py	2001/12/21 20:04:22	1.11
***************
*** 81,84 ****
--- 81,91 ----
                            self)
  
+     def test_nonrecursive_deep(self):
+         a = []
+         for i in range(100):
+             a = [a]
+         b = self.loads(self.dumps(a))
+         self.assertEqual(a, b)
+ 
  def test_main():
      loader = unittest.TestLoader()



From bwarsaw@users.sourceforge.net  Fri Dec 21 20:04:24 2001
From: bwarsaw@users.sourceforge.net (Barry Warsaw)
Date: Fri, 21 Dec 2001 12:04:24 -0800
Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.337,1.338
Message-ID: 

Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv14802/Misc

Modified Files:
	NEWS 
Log Message:
Merge of the release22 branch changes back into the trunk.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.337
retrieving revision 1.338
diff -C2 -d -r1.337 -r1.338
*** NEWS	2001/12/14 23:16:18	1.337
--- NEWS	2001/12/21 20:04:22	1.338
***************
*** 5,14 ****
--- 5,40 ----
  Type/class unification and new-style classes
  
+ - pickle.py, cPickle: allow pickling instances of new-style classes
+   with a custom metaclass.
+ 
  Core and builtins
  
+ - weakref proxy object: when comparing, unwrap both arguments if both
+   are proxies.
+ 
  Extension modules
  
+ - binascii.b2a_base64(): fix a potential buffer overrun when encoding
+   very short strings.
+ 
+ - cPickle: the obscure "fast" mode was suspected of causing stack
+   overflows on the Mac.  Hopefully fixed this by setting the recursion
+   limit much smaller.  If the limit is too low (it only affects
+   performance), you can change it by defining PY_CPICKLE_FAST_LIMIT
+   when compiling cPickle.c (or in pyconfig.h).
+ 
  Library
  
+ - dumbdbm.py: fixed a dumb old bug (the file didn't get synched at
+   close or delete time).
+ 
+ - rfc822.py: fixed a bug where the address '<>' was converted to None
+   instead of an empty string (also fixes the email.Utils module).
+ 
+ - xmlrpclib.py: version 1.0.0; uses precision for doubles.
+ 
+ - test suite: the pickle and cPickle tests were not executing any code
+   when run from the standard regresssion test.
+ 
  Tools/Demos
  
***************
*** 23,27 ****
--- 49,68 ----
  Windows
  
+ - distutils package: fixed broken Windows installers (bdist_wininst).
+ 
+ - tempfile.py: prevent mysterious warnings when TemporaryFileWrapper
+   instances are deleted at process exit time.
+ 
+ - socket.py: prevent mysterious warnings when socket instances are
+   deleted at process exit time.
+ 
+ - posixmodule.c: fix a Windows crash with stat() of a filename ending
+   in backslash.
+ 
  Mac
+ 
+ - The Carbon toolbox modules have been upgraded to Universal Headers
+   3.4, and experimental CoreGraphics and CarbonEvents modules have
+   been added.  All only for framework-enabled MacOSX.
  
  



From bwarsaw@users.sourceforge.net  Fri Dec 21 20:04:25 2001
From: bwarsaw@users.sourceforge.net (Barry Warsaw)
Date: Fri, 21 Dec 2001 12:04:25 -0800
Subject: [Python-checkins] CVS: python/dist/src/Modules cPickle.c,2.73,2.74
Message-ID: 

Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv14802/Modules

Modified Files:
	cPickle.c 
Log Message:
Merge of the release22 branch changes back into the trunk.


Index: cPickle.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v
retrieving revision 2.73
retrieving revision 2.74
diff -C2 -d -r2.73 -r2.74
*** cPickle.c	2001/12/19 16:56:54	2.73
--- cPickle.c	2001/12/21 20:04:22	2.74
***************
*** 322,326 ****
  } Picklerobject;
  
! #define FAST_LIMIT 2000
  
  staticforward PyTypeObject Picklertype;
--- 322,328 ----
  } Picklerobject;
  
! #ifndef PY_CPICKLE_FAST_LIMIT
! #define PY_CPICKLE_FAST_LIMIT 50
! #endif
  
  staticforward PyTypeObject Picklertype;
***************
*** 892,896 ****
  {
      /* if fast_container < 0, we're doing an error exit. */
!     if (++self->fast_container >= FAST_LIMIT) {
  	PyObject *key = NULL;
  	if (self->fast_memo == NULL) {
--- 894,898 ----
  {
      /* if fast_container < 0, we're doing an error exit. */
!     if (++self->fast_container >= PY_CPICKLE_FAST_LIMIT) {
  	PyObject *key = NULL;
  	if (self->fast_memo == NULL) {
***************
*** 922,926 ****
  fast_save_leave(Picklerobject *self, PyObject *obj)
  {
!     if (self->fast_container-- >= FAST_LIMIT) {
  	PyObject *key = PyLong_FromVoidPtr(obj);
  	if (key == NULL)
--- 924,928 ----
  fast_save_leave(Picklerobject *self, PyObject *obj)
  {
!     if (self->fast_container-- >= PY_CPICKLE_FAST_LIMIT) {
  	PyObject *key = PyLong_FromVoidPtr(obj);
  	if (key == NULL)



From bwarsaw@users.sourceforge.net  Fri Dec 21 20:05:35 2001
From: bwarsaw@users.sourceforge.net (Barry Warsaw)
Date: Fri, 21 Dec 2001 12:05:35 -0800
Subject: [Python-checkins] CVS: python/dist/src/Include patchlevel.h,2.60,2.61
Message-ID: 

Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv15164

Modified Files:
	patchlevel.h 
Log Message:
And we start all over again!


Index: patchlevel.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/patchlevel.h,v
retrieving revision 2.60
retrieving revision 2.61
diff -C2 -d -r2.60 -r2.61
*** patchlevel.h	2001/12/14 20:30:23	2.60
--- patchlevel.h	2001/12/21 20:05:33	2.61
***************
*** 21,31 ****
  /* Version parsed out into numeric values */
  #define PY_MAJOR_VERSION	2
! #define PY_MINOR_VERSION	2
  #define PY_MICRO_VERSION	0
! #define PY_RELEASE_LEVEL	PY_RELEASE_LEVEL_GAMMA
  #define PY_RELEASE_SERIAL	1
  
  /* Version as a string */
! #define PY_VERSION		"2.2c1+"
  
  /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
--- 21,31 ----
  /* Version parsed out into numeric values */
  #define PY_MAJOR_VERSION	2
! #define PY_MINOR_VERSION	3
  #define PY_MICRO_VERSION	0
! #define PY_RELEASE_LEVEL	PY_RELEASE_LEVEL_ALPHA
  #define PY_RELEASE_SERIAL	1
  
  /* Version as a string */
! #define PY_VERSION		"2.2+"
  
  /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.



From bwarsaw@users.sourceforge.net  Fri Dec 21 20:47:14 2001
From: bwarsaw@users.sourceforge.net (Barry Warsaw)
Date: Fri, 21 Dec 2001 12:47:14 -0800
Subject: [Python-checkins] CVS: python/nondist/peps pep-0101.txt,1.18,1.19
Message-ID: 

Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv25725

Modified Files:
	pep-0101.txt 
Log Message:
A few last modifications based on the 2.2 final release.


Index: pep-0101.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0101.txt,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** pep-0101.txt	2001/12/15 04:00:17	1.18
--- pep-0101.txt	2001/12/21 20:47:12	1.19
***************
*** 39,45 ****
      We use the following conventions in the examples below.  Where a
      release number is given, it is of the form X.YaZ, e.g. 2.1a3 for
!     Python 2.1 alpha 3, where "a" == alpha, "b" == beta, "c" ==
!     release candidate, and "f" == final.  If a micro release number is
!     used, then we'll say X.Y.MaZ.
  
    ___ At noon the day before the release, create a branch for X.YaZ.
--- 39,47 ----
      We use the following conventions in the examples below.  Where a
      release number is given, it is of the form X.YaZ, e.g. 2.1a3 for
!     Python 2.1 alpha 3, where "a" == alpha, "b" == beta, "rc" ==
!     release candidate.  Final releases are named "releaseXY" so the
!     branch tag is "releaseXY-branch" and the fork tag on the trunk is
!     "releaseXY-fork".  If a micro release number is used, then we'll
!     say X.Y.MaZ.
  
    ___ At noon the day before the release, create a branch for X.YaZ.
***************
*** 422,425 ****
--- 424,428 ----
      ___ md5sum the files and make sure they got uploaded intact.
  
+ 
    ___ Update the X.Y/bugs.ht file if necessary.  It is best to get
        BDFL input for this step.
***************
*** 456,459 ****
--- 459,464 ----
        www.python.org and the fact that you're happy with the release)
        and click the SUBMIT button.
+ 
+       Feel free to remove any old news items.
  
      Now it's time to do some cleanup.  These steps are very important!



From fdrake@users.sourceforge.net  Fri Dec 21 21:07:59 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Fri, 21 Dec 2001 13:07:59 -0800
Subject: [Python-checkins] CVS: python/nondist/peps pep-0101.txt,1.19,1.20
Message-ID: 

Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv30373/peps

Modified Files:
	pep-0101.txt 
Log Message:
Add a missing comma.

Index: pep-0101.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0101.txt,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** pep-0101.txt	2001/12/21 20:47:12	1.19
--- pep-0101.txt	2001/12/21 21:07:57	1.20
***************
*** 172,176 ****
        the trunk to the branch AND for merging any branch changes from
        the branch to the trunk during the cleaning up phase.
!       Basically, if it's in Doc/ Fred will take care of it.
  
    ___ Tim Peters grabs the HTML and uses this to build the Windows
--- 172,176 ----
        the trunk to the branch AND for merging any branch changes from
        the branch to the trunk during the cleaning up phase.
!       Basically, if it's in Doc/, Fred will take care of it.
  
    ___ Tim Peters grabs the HTML and uses this to build the Windows



From tim_one@users.sourceforge.net  Fri Dec 21 21:36:52 2001
From: tim_one@users.sourceforge.net (Tim Peters)
Date: Fri, 21 Dec 2001 13:36:52 -0800
Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.338,1.339
Message-ID: 

Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv4486/python/misc

Modified Files:
	NEWS 
Log Message:
Added 2.3a1 section.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.338
retrieving revision 1.339
diff -C2 -d -r1.338 -r1.339
*** NEWS	2001/12/21 20:04:22	1.338
--- NEWS	2001/12/21 21:36:50	1.339
***************
*** 1,2 ****
--- 1,32 ----
+ What's New in Python 2.3 alpha 1?
+ XXX Release date: DD-MMM-2002 XXX
+ =================================
+ 
+ Type/class unification and new-style classes
+ 
+ Core and builtins
+ 
+ Extension modules
+ 
+ Library
+ 
+ Tools/Demos
+ 
+ Build
+ 
+ C API
+ 
+ - Because Python's magic number scheme broke on January 1st, we decided
+   to stop Python development.  Thanks for all the fish!
+ 
+ New platforms
+ 
+ Tests
+ 
+ Windows
+ 
+ Mac
+ 
+ 
  What's New in Python 2.2 final?
  Release date: 21-Dec-2001



From tim_one@users.sourceforge.net  Fri Dec 21 22:06:14 2001
From: tim_one@users.sourceforge.net (Tim Peters)
Date: Fri, 21 Dec 2001 14:06:14 -0800
Subject: [Python-checkins] CVS: python/dist/src/PC pyconfig.h,1.5,1.6 python_nt.rc,1.15,1.16
Message-ID: 

Update of /cvsroot/python/python/dist/src/PC
In directory usw-pr-cvs1:/tmp/cvs-serv11897/python/PC

Modified Files:
	pyconfig.h python_nt.rc 
Log Message:
Windows build:  close out 2.2, prep for 2.3.


Index: pyconfig.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/PC/pyconfig.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** pyconfig.h	2001/10/30 21:09:55	1.5
--- pyconfig.h	2001/12/21 22:06:12	1.6
***************
*** 334,340 ****
     of by the Distutils, so it's not a problem). */
  #ifdef _DEBUG
! #pragma comment(lib,"python22_d.lib")
  #else
! #pragma comment(lib,"python22.lib")
  #endif
  #endif /* USE_DL_EXPORT */
--- 334,340 ----
     of by the Distutils, so it's not a problem). */
  #ifdef _DEBUG
! #pragma comment(lib,"python23_d.lib")
  #else
! #pragma comment(lib,"python23.lib")
  #endif
  #endif /* USE_DL_EXPORT */

Index: python_nt.rc
===================================================================
RCS file: /cvsroot/python/python/dist/src/PC/python_nt.rc,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** python_nt.rc	2001/08/19 00:56:28	1.15
--- python_nt.rc	2001/12/21 22:06:12	1.16
***************
*** 14,18 ****
   * MS_DLL_ID must match PY_VERSION in the Windows install script.
   */
! #define MS_DLL_ID "2.2"
  
  #ifndef PYTHON_DLL_NAME
--- 14,18 ----
   * MS_DLL_ID must match PY_VERSION in the Windows install script.
   */
! #define MS_DLL_ID "2.3"
  
  #ifndef PYTHON_DLL_NAME
***************
*** 74,78 ****
              VALUE "FileVersion", PYTHON_VERSION
              VALUE "InternalName", "Python DLL\0"
!             VALUE "LegalCopyright", "Copyright © 2001 Python Software Foundation. Copyright © 2000 BeOpen.com. Copyright © 1995-2001 CNRI. Copyright © 1991-1995 SMC.\0"
              VALUE "OriginalFilename", PYTHON_DLL_NAME "\0"
              VALUE "ProductName", "Python\0"
--- 74,78 ----
              VALUE "FileVersion", PYTHON_VERSION
              VALUE "InternalName", "Python DLL\0"
!             VALUE "LegalCopyright", "Copyright © 2001-2002 Python Software Foundation. Copyright © 2000 BeOpen.com. Copyright © 1995-2001 CNRI. Copyright © 1991-1995 SMC.\0"
              VALUE "OriginalFilename", PYTHON_DLL_NAME "\0"
              VALUE "ProductName", "Python\0"



From tim_one@users.sourceforge.net  Fri Dec 21 22:06:14 2001
From: tim_one@users.sourceforge.net (Tim Peters)
Date: Fri, 21 Dec 2001 14:06:14 -0800
Subject: [Python-checkins] CVS: python/dist/src/PCbuild BUILDno.txt,1.26,1.27 python20.wse,1.98,1.99 pythoncore.dsp,1.30,1.31
Message-ID: 

Update of /cvsroot/python/python/dist/src/PCbuild
In directory usw-pr-cvs1:/tmp/cvs-serv11897/python/PCbuild

Modified Files:
	BUILDno.txt python20.wse pythoncore.dsp 
Log Message:
Windows build:  close out 2.2, prep for 2.3.


Index: BUILDno.txt
===================================================================
RCS file: /cvsroot/python/python/dist/src/PCbuild/BUILDno.txt,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** BUILDno.txt	2001/12/14 23:16:18	1.26
--- BUILDno.txt	2001/12/21 22:06:12	1.27
***************
*** 34,39 ****
  Windows Python BUILD numbers
  ----------------------------
    28    2.2 final
!         21-Dec-2001  TENTATIVE
    27    2.2c1
          14-Dec-2001
--- 34,41 ----
  Windows Python BUILD numbers
  ----------------------------
+   29    CVS development
+         21-Dec-2001
    28    2.2 final
!         21-Dec-2001
    27    2.2c1
          14-Dec-2001

Index: python20.wse
===================================================================
RCS file: /cvsroot/python/python/dist/src/PCbuild/python20.wse,v
retrieving revision 1.98
retrieving revision 1.99
diff -C2 -d -r1.98 -r1.99
*** python20.wse	2001/12/14 23:16:18	1.98
--- python20.wse	2001/12/21 22:06:12	1.99
***************
*** 2,6 ****
  item: Global
    Version=8.14
!   Title=Python 2.2
    Flags=00010100
    Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
--- 2,6 ----
  item: Global
    Version=8.14
!   Title=Python 2.3 alpha 1
    Flags=00010100
    Languages=65 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
***************
*** 19,30 ****
    Patch Threshold=85
    Patch Memory=4000
!   EXE Filename=Python-2.2.exe
    Dialogs Version=8
!   Version File=2.2
    Version Description=Python Programming Language
    Version Copyright=©2001 Python Software Foundation
    Version Company=PythonLabs at Zope Corporation
    Crystal Format=10111100101100000010001001001001
!   Step View=&All
    Variable Name1=_WISE_
    Variable Description1=WISE root directory
--- 19,30 ----
    Patch Threshold=85
    Patch Memory=4000
!   EXE Filename=Python-2.3a1.exe
    Dialogs Version=8
!   Version File=2.3a1
    Version Description=Python Programming Language
    Version Copyright=©2001 Python Software Foundation
    Version Company=PythonLabs at Zope Corporation
    Crystal Format=10111100101100000010001001001001
!   Step View=&Properties
    Variable Name1=_WISE_
    Variable Description1=WISE root directory
***************
*** 51,55 ****
    Variable Name6=_PYMINOR_
    Variable Description6=Python minor version number; the 3 in 2.3
!   Variable Default6=2
    Variable Flags6=00001000
    Variable Name7=_DOADMIN_
--- 51,55 ----
    Variable Name6=_PYMINOR_
    Variable Description6=Python minor version number; the 3 in 2.3
!   Variable Default6=3
    Variable Flags6=00001000
    Variable Name7=_DOADMIN_
***************
*** 65,69 ****
  item: Set Variable
    Variable=PYVER_STRING
!   Value=2.2
  end
  item: Remark
--- 65,69 ----
  item: Set Variable
    Variable=PYVER_STRING
!   Value=2.3a1
  end
  item: Remark

Index: pythoncore.dsp
===================================================================
RCS file: /cvsroot/python/python/dist/src/PCbuild/pythoncore.dsp,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** pythoncore.dsp	2001/12/14 23:16:18	1.30
--- pythoncore.dsp	2001/12/21 22:06:12	1.31
***************
*** 58,62 ****
  LINK32=link.exe
  # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
! # ADD LINK32 largeint.lib kernel32.lib user32.lib advapi32.lib shell32.lib /nologo /base:"0x1e000000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc" /out:"./python22.dll"
  # SUBTRACT LINK32 /pdb:none
  
--- 58,62 ----
  LINK32=link.exe
  # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
! # ADD LINK32 largeint.lib kernel32.lib user32.lib advapi32.lib shell32.lib /nologo /base:"0x1e000000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc" /out:"./python23.dll"
  # SUBTRACT LINK32 /pdb:none
  
***************
*** 89,93 ****
  LINK32=link.exe
  # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
! # ADD LINK32 largeint.lib kernel32.lib user32.lib advapi32.lib shell32.lib /nologo /base:"0x1e000000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc" /out:"./python22_d.dll" /pdbtype:sept
  # SUBTRACT LINK32 /pdb:none
  
--- 89,93 ----
  LINK32=link.exe
  # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
! # ADD LINK32 largeint.lib kernel32.lib user32.lib advapi32.lib shell32.lib /nologo /base:"0x1e000000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"libc" /out:"./python23_d.dll" /pdbtype:sept
  # SUBTRACT LINK32 /pdb:none
  
***************
*** 119,125 ****
  # ADD BSC32 /nologo
  LINK32=link.exe
! # ADD BASE LINK32 wsock32.lib largeint.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e100000" /subsystem:windows /dll /debug /machine:ALPHA /nodefaultlib:"libc" /out:"./python22_d.dll" /pdbtype:sept
  # SUBTRACT BASE LINK32 /pdb:none
! # ADD LINK32 largeint.lib kernel32.lib user32.lib advapi32.lib /nologo /base:"0x1e100000" /subsystem:windows /dll /debug /machine:ALPHA /nodefaultlib:"libc" /out:"./python22_d.dll" /pdbtype:sept
  # SUBTRACT LINK32 /pdb:none
  
--- 119,125 ----
  # ADD BSC32 /nologo
  LINK32=link.exe
! # ADD BASE LINK32 wsock32.lib largeint.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /base:"0x1e100000" /subsystem:windows /dll /debug /machine:ALPHA /nodefaultlib:"libc" /out:"./python23_d.dll" /pdbtype:sept
  # SUBTRACT BASE LINK32 /pdb:none
! # ADD LINK32 largeint.lib kernel32.lib user32.lib advapi32.lib /nologo /base:"0x1e100000" /subsystem:windows /dll /debug /machine:ALPHA /nodefaultlib:"libc" /out:"./python23_d.dll" /pdbtype:sept
  # SUBTRACT LINK32 /pdb:none
  
***************
*** 740,748 ****
  !IF  "$(CFG)" == "pythoncore - Win32 Release"
  
! # ADD CPP /D BUILD=28
  
  !ELSEIF  "$(CFG)" == "pythoncore - Win32 Debug"
  
! # ADD CPP /D BUILD=28
  
  !ELSEIF  "$(CFG)" == "pythoncore - Win32 Alpha Debug"
--- 740,748 ----
  !IF  "$(CFG)" == "pythoncore - Win32 Release"
  
! # ADD CPP /D BUILD=29
  
  !ELSEIF  "$(CFG)" == "pythoncore - Win32 Debug"
  
! # ADD CPP /D BUILD=29
  
  !ELSEIF  "$(CFG)" == "pythoncore - Win32 Alpha Debug"



From jackjansen@users.sourceforge.net  Fri Dec 21 22:31:59 2001
From: jackjansen@users.sourceforge.net (Jack Jansen)
Date: Fri, 21 Dec 2001 14:31:59 -0800
Subject: [Python-checkins] CVS: python/dist/src/Mac/Contrib/osam OSAm.prj,1.2,1.2.14.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Mac/Contrib/osam
In directory usw-pr-cvs1:/tmp/cvs-serv17967/Contrib/osam

Modified Files:
      Tag: release22-branch
	OSAm.prj 
Log Message:
Merging 22c1 changes into release22-branch.


Index: OSAm.prj
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Contrib/osam/OSAm.prj,v
retrieving revision 1.2
retrieving revision 1.2.14.1
diff -C2 -d -r1.2 -r1.2.14.1
Binary files /tmp/cvsThdnyg and /tmp/cvswWEDGo differ



From jackjansen@users.sourceforge.net  Fri Dec 21 22:32:00 2001
From: jackjansen@users.sourceforge.net (Jack Jansen)
Date: Fri, 21 Dec 2001 14:32:00 -0800
Subject: [Python-checkins] CVS: python/dist/src/Mac/Distributions binary.exclude,1.10,1.10.6.1 binary.include,1.19,1.19.6.1 dev.include,1.23,1.23.4.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Mac/Distributions
In directory usw-pr-cvs1:/tmp/cvs-serv17967/Distributions

Modified Files:
      Tag: release22-branch
	binary.exclude binary.include dev.include 
Log Message:
Merging 22c1 changes into release22-branch.


Index: binary.exclude
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/binary.exclude,v
retrieving revision 1.10
retrieving revision 1.10.6.1
diff -C2 -d -r1.10 -r1.10.6.1
*** binary.exclude	2001/10/23 22:20:03	1.10
--- binary.exclude	2001/12/21 22:31:57	1.10.6.1
***************
*** 20,23 ****
--- 20,25 ----
  *.prj
  *.prj.exp
+ *.pyc
+ *.pyo
  *.xSYM
  *.µ
***************
*** 33,36 ****
  Setup.in
  [(]*[)]
- *.pyc
- *.pyo
--- 35,36 ----

Index: binary.include
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/binary.include,v
retrieving revision 1.19
retrieving revision 1.19.6.1
diff -C2 -d -r1.19 -r1.19.6.1
*** binary.include	2001/10/23 22:20:17	1.19
--- binary.include	2001/12/21 22:31:57	1.19.6.1
***************
*** 220,221 ****
--- 220,223 ----
  (':setup.py', None)
  (':site-packages', None)
+ (':Mac:ReadMe~0', None)
+ (':Mac:Contrib:mpwsystem', '')

Index: dev.include
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/dev.include,v
retrieving revision 1.23
retrieving revision 1.23.4.1
diff -C2 -d -r1.23 -r1.23.4.1
*** dev.include	2001/11/30 14:16:29	1.23
--- dev.include	2001/12/21 22:31:57	1.23.4.1
***************
*** 264,267 ****
--- 264,270 ----
  (':Mac:Build:gdbm.mcp.exp', None)
  (':Mac:Build:gdbm.mcp.xml', None)
+ (':Mac:Build:hfsplus.carbon.mcp', None)
+ (':Mac:Build:hfsplus.carbon.mcp.exp', None)
+ (':Mac:Build:hfsplus.carbon.mcp.xml', None)
  (':Mac:Build:icglue.carbon.mcp', None)
  (':Mac:Build:icglue.carbon.mcp.exp', None)
***************
*** 407,410 ****
--- 410,414 ----
  (':Mac:mwerks:mwerks_shared_config.h', ':Mac:mwerks:')
  (':Mac:mwerks:mwerks_shcarbon_config.h', '')
+ (':Mac:mwerks:mwerks_shlib_config.h', '')
  (':Mac:mwerks:mwerks_small_config.h', ':Mac:mwerks:')
  (':Mac:mwerks:mwerks_thrcarbonsm_config.h', None)
***************
*** 597,602 ****
  (':setup.py', None)
  (':site-packages', None)
! (':Mac:Build:hfsplus.carbon.mcp.xml', None)
! (':Mac:Build:hfsplus.carbon.mcp.exp', None)
! (':Mac:Build:hfsplus.carbon.mcp', None)
! (':Mac:mwerks:mwerks_shlib_config.h', '')
--- 601,615 ----
  (':setup.py', None)
  (':site-packages', None)
! (':Mac:Build:_CG.carbon.old.mcp', None)
! (':Mac:Build:_CG.carbon.mcp.exp', None)
! (':Mac:Build:_CG.carbon.mcp', None)
! (':Mac:Build:_CarbonEvt.carbon.mcp.xml', None)
! (':Mac:Build:_CarbonEvt.carbon.mcp.exp', None)
! (':Mac:Build:_CarbonEvt.carbon.mcp', None)
! (':Mac:ReadMe~0', None)
! (':Modules:timemodule.c~1', None)
! (':Modules:timemodule.c~0', None)
! (':Mac:Build:PythonStandSmall.old.mcp', None)
! (':Mac:Build:PythonInterpreter.old.mcp', None)
! (':Mac:Build:PythonCore.axp', None)
! (':Mac:Build:_dummy_tkinter.old.mcp', None)



From jackjansen@users.sourceforge.net  Fri Dec 21 22:31:59 2001
From: jackjansen@users.sourceforge.net (Jack Jansen)
Date: Fri, 21 Dec 2001 14:31:59 -0800
Subject: [Python-checkins] CVS: python/dist/src/Mac ReadMe,1.38,1.38.4.1 Relnotes,1.28,1.28.4.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Mac
In directory usw-pr-cvs1:/tmp/cvs-serv17967

Modified Files:
      Tag: release22-branch
	ReadMe Relnotes 
Log Message:
Merging 22c1 changes into release22-branch.


Index: ReadMe
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/ReadMe,v
retrieving revision 1.38
retrieving revision 1.38.4.1
diff -C2 -d -r1.38 -r1.38.4.1
*** ReadMe	2001/12/13 12:58:09	1.38
--- ReadMe	2001/12/21 22:31:57	1.38.4.1
***************
*** 1,8 ****
! How to install Python 2.2b2 on your Macintosh
  ---------------------------------------------
  
  This is a MacPython that can run on classic MacOS (from 8.1
  onwards) and natively on MacOSX. The installer tries to work out whether you can
! use the Carbon version or not.
  
  You should definitely read the Relnotes file too, and the section below about
--- 1,13 ----
! How to install Python 2.2c1 on your Macintosh
  ---------------------------------------------
  
+ This is a release candidate for MacPython 2.2, please report any problems as
+ soon as possible, by email to pythonmac-sig@python.org.
+ 
  This is a MacPython that can run on classic MacOS (from 8.1
  onwards) and natively on MacOSX. The installer tries to work out whether you can
! use the Carbon version or not. For Mac OS X users: this version of Python
! does not run from the command line, it is a pure "Mac only" app. Use the standard
! unix Python from the commandline, the two Pythons will be merged in the future.
  
  You should definitely read the Relnotes file too, and the section below about
***************
*** 63,66 ****
--- 68,76 ----
  modules you may think of as toolbox modules (such as Waste) really are not,
  and they are not in the Carbon package.
+ 
+ Also, all toolbox modules have been updated to Universal Headers 3.4, and
+ are (for classic PPC) weak-linked against InterfaceLib so that they should
+ work on all systems back to MacOS 8.1. Calling an unimplemented function will
+ raise an exception, not crash your interpreter.
    
  Another change related to the OSX growth path is that there is a new module
***************
*** 162,166 ****
  Two items are installed in the system folder: the interpreter shared
  libraries PythonCore and PythonCoreCarbon lives in the Extensions
! folder and the "Python 2.2b2 Preferences" file in the Python subfolder
  in the Preferences folder. All the rest of Python lives in the folder
  you installed in.
--- 172,176 ----
  Two items are installed in the system folder: the interpreter shared
  libraries PythonCore and PythonCoreCarbon lives in the Extensions
! folder and the "Python 2.2c1 Preferences" file in the Python subfolder
  in the Preferences folder. All the rest of Python lives in the folder
  you installed in.
***************
*** 212,218 ****
  are lost and you have to set them again.
  
! After you are satisfied that 2.2b2 works as expected you can trash
  anything in the system folder that has "python" in the name and not
! "2.2b2".
  
  The ConfigurePython... applets will try to detect incompatible
--- 222,228 ----
  are lost and you have to set them again.
  
! After you are satisfied that 2.2c1 works as expected you can trash
  anything in the system folder that has "python" in the name and not
! "2.2c1".
  
  The ConfigurePython... applets will try to detect incompatible
***************
*** 247,251 ****
  Goodger, Chris Barker, Luc Lefebvre, Tattoo Mabonzo K., Russell Finn,
  Tom Bridgman, Russel Owen, Pascal Oberndoerfer, Dean Draayer,
! Alexandre Parenteau, Donovan Preston
  and all the other people who provided feedback, code or both!
  
--- 257,262 ----
  Goodger, Chris Barker, Luc Lefebvre, Tattoo Mabonzo K., Russell Finn,
  Tom Bridgman, Russel Owen, Pascal Oberndoerfer, Dean Draayer,
! Alexandre Parenteau, Donovan Preston, Daniel Brotsky, Jason Harper,
! Nitin Ganatra, 
  and all the other people who provided feedback, code or both!
  

Index: Relnotes
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Relnotes,v
retrieving revision 1.28
retrieving revision 1.28.4.1
diff -C2 -d -r1.28 -r1.28.4.1
*** Relnotes	2001/11/30 14:16:27	1.28
--- Relnotes	2001/12/21 22:31:57	1.28.4.1
***************
*** 1,7 ****
! Changes in 2.2b2 since 2.1.1
  ----------------------------
  
  These release notes refer to Mac-specific changes only. See NEWS (in the Misc folder)
! for machine-independent changes. Changes that are new in 2.2b2 are flagged as such.
  
  
--- 1,7 ----
! Changes in 2.2c1 since 2.1.1
  ----------------------------
  
  These release notes refer to Mac-specific changes only. See NEWS (in the Misc folder)
! for machine-independent changes. Changes that are new in 2.2c1 are flagged as such.
  
  
***************
*** 12,29 ****
    to contribute. Aside from reducing clutter this change will also benefit the
    port to Mach-O/OSX Python later.
  - On input MacPython now accepts either \n (unix style) or \r (mac style) newlines
    for text files. This behaviour can be turned off with a preference.
    This is an experimental feature; again: feedback is requested.
  - Command-dot handling has been improved a lot: scripts are now much easier to interrupt,
!   and they only scan for cmd-. while in the foreground. [2.2b2]
! - "Copy" from the MacPython console window was always disabled. Fixed. [2.2b2]
! - This release should run on MacOS 8.1 again. [2.2b2 build 116]
! - A new, rather different GUSI I/O library is used. Please report any strange behaviour
!   with I/O to the pythonmac-sig mailing list! [2.2b2]
  - There is a new module macresource which makes it easier to open a resource file
    accompanying your script when the script is not (yet) converted to an applet.
    This module will later also do the right thing in Mach-O/OSX Python.
  - A new, experimental module hfsplus is included, which gives access to some of the
!   functionality of the HFS+ API. [2.2b2]
  - Threads had a stack that was too small for many serious Python applications (20K).
    They now get 64K. There is still no overflow check, though.
--- 12,36 ----
    to contribute. Aside from reducing clutter this change will also benefit the
    port to Mach-O/OSX Python later.
+ - All toolbox modules have been updated to Universal Headers 3.4. [2.2c1]
+ - Toolbox modules are weaklinked against InterfaceLib (for PPC builds) and raise
+   an exception when you call an unimplemented one on an old MacOS. [2.2c1]
  - On input MacPython now accepts either \n (unix style) or \r (mac style) newlines
    for text files. This behaviour can be turned off with a preference.
    This is an experimental feature; again: feedback is requested.
+ - The IDE looks better on OS X, but still not as good as on OS9. [2.2c1]
  - Command-dot handling has been improved a lot: scripts are now much easier to interrupt,
!   and they only scan for cmd-. while in the foreground.
! - "Copy" from the MacPython console window was always disabled. Fixed.
! - This release should run on MacOS 8.1 again.
! - A new, rather different GUSI I/O library is used.
! - time.time() returns positive values again. [2.2c1]
  - There is a new module macresource which makes it easier to open a resource file
    accompanying your script when the script is not (yet) converted to an applet.
    This module will later also do the right thing in Mach-O/OSX Python.
+ - (Carbon only) experimental modules Carbon.CG (CoreGraphics) and CarbonEvt have
+   been added. [2.2c1]
  - A new, experimental module hfsplus is included, which gives access to some of the
!   functionality of the HFS+ API.
! - A new, experimental module gives access to Carbon Events. [2.2c1]
  - Threads had a stack that was too small for many serious Python applications (20K).
    They now get 64K. There is still no overflow check, though.
***************
*** 49,55 ****
  --------------------------------
  
! - Stackless Python/microthreads hasn't been ported to 2.2 yet. If/when it becomes available
!   Just will undoubtedly announce it on pythonmac-sig and the MacPython homepage.
! - The toolbox modules have not been updated to Universal Header 3.4 or CarbonLib 1.4 yet.
  
  Known problems
--- 56,60 ----
  --------------------------------
  
! - The toolbox modules have not all been updated to Universal Header 3.4 or CarbonLib 1.4 yet.
  
  Known problems
***************
*** 59,63 ****
  http://www.cwi.nl/~jack/macpython.html.
  
! - MacPython 2.2b2 (and MacPython 2.1) will not run correctly on a multiprocessor MacOS X
    machine, it will quickly deadlock during I/O operations. The GUSI I/O library is suspected,
    hints/clues/workarounds are solicited.
--- 64,68 ----
  http://www.cwi.nl/~jack/macpython.html.
  
! - MacPython 2.2 (and MacPython 2.1) will not run correctly on a multiprocessor MacOS X
    machine, it will quickly deadlock during I/O operations. The GUSI I/O library is suspected,
    hints/clues/workarounds are solicited.
***************
*** 66,69 ****
--- 71,75 ----
  - Tkinter file events do not work, unless you have opened the file through Tcl (but then
    you cannot access it from Python).
+ - The IDE object and class browser look funny on OSX, but they work fine.
  - Aliases may not work in sys.path entries.
  - PythonInterpreter used interactively will eat a lot of processor cycles. You should use



From jackjansen@users.sourceforge.net  Fri Dec 21 22:32:00 2001
From: jackjansen@users.sourceforge.net (Jack Jansen)
Date: Fri, 21 Dec 2001 14:32:00 -0800
Subject: [Python-checkins] CVS: python/dist/src/Mac/Include macbuildno.h,1.22,1.22.4.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Mac/Include
In directory usw-pr-cvs1:/tmp/cvs-serv17967/Include

Modified Files:
      Tag: release22-branch
	macbuildno.h 
Log Message:
Merging 22c1 changes into release22-branch.


Index: macbuildno.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Include/macbuildno.h,v
retrieving revision 1.22
retrieving revision 1.22.4.1
diff -C2 -d -r1.22 -r1.22.4.1
*** macbuildno.h	2001/11/30 14:16:30	1.22
--- macbuildno.h	2001/12/21 22:31:58	1.22.4.1
***************
*** 1 ****
! #define BUILD 116
--- 1 ----
! #define BUILD 121



From jackjansen@users.sourceforge.net  Fri Dec 21 22:32:00 2001
From: jackjansen@users.sourceforge.net (Jack Jansen)
Date: Fri, 21 Dec 2001 14:32:00 -0800
Subject: [Python-checkins] CVS: python/dist/src/Mac/Distributions/(vise) Python 2.2.vct,1.6,1.6.4.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Mac/Distributions/(vise)
In directory usw-pr-cvs1:/tmp/cvs-serv17967/Distributions/(vise)

Modified Files:
      Tag: release22-branch
	Python 2.2.vct 
Log Message:
Merging 22c1 changes into release22-branch.


Index: Python 2.2.vct
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/(vise)/Python 2.2.vct,v
retrieving revision 1.6
retrieving revision 1.6.4.1
diff -C2 -d -r1.6 -r1.6.4.1
Binary files /tmp/cvs1BglLQ and /tmp/cvsEwHF0B differ



From loewis@users.sourceforge.net  Sat Dec 22 15:05:34 2001
From: loewis@users.sourceforge.net (Martin v. L?wis)
Date: Sat, 22 Dec 2001 07:05:34 -0800
Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.200,1.201
Message-ID: 

Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv8764

Modified Files:
	socketmodule.c 
Log Message:
Add TCP socket options from glibc 2.2.4. Fixes #495680.
2.2.1 bugfix candidate.


Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.200
retrieving revision 1.201
diff -C2 -d -r1.200 -r1.201
*** socketmodule.c	2001/12/02 10:15:37	1.200
--- socketmodule.c	2001/12/22 15:05:32	1.201
***************
*** 3622,3625 ****
--- 3622,3656 ----
  	insint(d, "TCP_MAXSEG", TCP_MAXSEG);
  #endif
+ #ifdef	TCP_CORK
+ 	insint(d, "TCP_CORK", TCP_CORK);
+ #endif
+ #ifdef	TCP_KEEPIDLE
+ 	insint(d, "TCP_KEEPIDLE", TCP_KEEPIDLE);
+ #endif
+ #ifdef	TCP_KEEPINTVL
+ 	insint(d, "TCP_KEEPINTVL", TCP_KEEPINTVL);
+ #endif
+ #ifdef	TCP_KEEPCNT
+ 	insint(d, "TCP_KEEPCNT", TCP_KEEPCNT);
+ #endif
+ #ifdef	TCP_SYNCNT
+ 	insint(d, "TCP_SYNCNT", TCP_SYNCNT);
+ #endif
+ #ifdef	TCP_LINGER2
+ 	insint(d, "TCP_LINGER2", TCP_LINGER2);
+ #endif
+ #ifdef	TCP_DEFER_ACCEPT
+ 	insint(d, "TCP_DEFER_ACCEPT", TCP_DEFER_ACCEPT);
+ #endif
+ #ifdef	TCP_WINDOW_CLAMP
+ 	insint(d, "TCP_WINDOW_CLAMP", TCP_WINDOW_CLAMP);
+ #endif
+ #ifdef	TCP_INFO
+ 	insint(d, "TCP_INFO", TCP_INFO);
+ #endif
+ #ifdef	TCP_QUICKACK
+ 	insint(d, "TCP_QUICKACK", TCP_QUICKACK);
+ #endif
+ 
  
  	/* IPX options */



From loewis@users.sourceforge.net  Sat Dec 22 15:23:52 2001
From: loewis@users.sourceforge.net (Martin v. L?wis)
Date: Sat, 22 Dec 2001 07:23:52 -0800
Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-linux2 CDROM.py,1.1,1.2
Message-ID: 

Update of /cvsroot/python/python/dist/src/Lib/plat-linux2
In directory usw-pr-cvs1:/tmp/cvs-serv12901

Modified Files:
	CDROM.py 
Log Message:
Regenerated for Linux 2.2.4.


Index: CDROM.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/plat-linux2/CDROM.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CDROM.py	1999/04/12 14:34:49	1.1
--- CDROM.py	2001/12/22 15:23:50	1.2
***************
*** 1,39 ****
  # Generated by h2py from /usr/include/linux/cdrom.h
! CD_MINS = 74
! CD_SECS = 60
! CD_FRAMES = 75
! CD_SYNC_SIZE = 12
! CD_HEAD_SIZE = 4
! CD_SUBHEAD_SIZE = 8
! CD_XA_HEAD = (CD_HEAD_SIZE+CD_SUBHEAD_SIZE)
! CD_XA_SYNC_HEAD = (CD_SYNC_SIZE+CD_XA_HEAD)
! CD_FRAMESIZE = 2048
! CD_FRAMESIZE_RAW = 2352
! CD_FRAMESIZE_RAW1 = (CD_FRAMESIZE_RAW-CD_SYNC_SIZE)
! CD_FRAMESIZE_RAW0 = (CD_FRAMESIZE_RAW-CD_SYNC_SIZE-CD_HEAD_SIZE)
! CD_FRAMESIZE_RAWER = 2646
! CD_EDC_SIZE = 4
! CD_ZERO_SIZE = 8
! CD_ECC_SIZE = 276
! CD_XA_TAIL = (CD_EDC_SIZE+CD_ECC_SIZE)
! CD_FRAMESIZE_SUB = 96
! CD_MSF_OFFSET = 150
! CD_CHUNK_SIZE = 24
! CD_NUM_OF_CHUNKS = 98
! CD_FRAMESIZE_XA = CD_FRAMESIZE_RAW1
! CD_BLOCK_OFFSET = CD_MSF_OFFSET
! CDROM_LBA = 0x01
! CDROM_MSF = 0x02
! CDROM_DATA_TRACK = 0x04
! CDROM_LEADOUT = 0xAA
! CDROM_AUDIO_INVALID = 0x00
! CDROM_AUDIO_PLAY = 0x11
! CDROM_AUDIO_PAUSED = 0x12
! CDROM_AUDIO_COMPLETED = 0x13
! CDROM_AUDIO_ERROR = 0x14
! CDROM_AUDIO_NO_STATUS = 0x15
! CDROM_MODE1_SIZE = 512
! CDROM_MODE1_SIZE = 2048
! CDROM_MODE2_SIZE = 2336
  CDROMPAUSE = 0x5301
  CDROMRESUME = 0x5302
--- 1,4 ----
  # Generated by h2py from /usr/include/linux/cdrom.h
! 
  CDROMPAUSE = 0x5301
  CDROMRESUME = 0x5302
***************
*** 52,56 ****
  CDROMEJECT_SW = 0x530f
  CDROMMULTISESSION = 0x5310
! CDROM_GET_UPC = 0x5311
  CDROMRESET = 0x5312
  CDROMVOLREAD = 0x5313
--- 17,22 ----
  CDROMEJECT_SW = 0x530f
  CDROMMULTISESSION = 0x5310
! CDROM_GET_MCN = 0x5311
! CDROM_GET_UPC = CDROM_GET_MCN
  CDROMRESET = 0x5312
  CDROMVOLREAD = 0x5313
***************
*** 60,80 ****
  CDROMPLAYBLK = 0x5317
  CDROMREADALL = 0x5318
  CDROMCLOSETRAY = 0x5319
! CDROMLOADFROMSLOT = 0x531a
! SCMD_READ_TOC = 0x43
! SCMD_PLAYAUDIO_MSF = 0x47
! SCMD_PLAYAUDIO_TI = 0x48
! SCMD_PAUSE_RESUME = 0x4B
! SCMD_READ_SUBCHANNEL = 0x42
! SCMD_PLAYAUDIO10 = 0x45
! SCMD_READ_HEADER = 0x44
! SCMD_PLAYAUDIO12 = 0xA5
! SCMD_PLAYTRACK_REL12 = 0xA9
! SCMD_CD_PLAYBACK_CONTROL = 0xC9
! SCMD_CD_PLAYBACK_STATUS = 0xC4
! ERR_RECOVERY_PARMS = 0x01
! DISCO_RECO_PARMS = 0x02
! FORMAT_PARMS = 0x03
! GEOMETRY_PARMS = 0x04
! CERTIFICATION_PARMS = 0x06
! CACHE_PARMS = 0x38
--- 26,207 ----
  CDROMPLAYBLK = 0x5317
  CDROMREADALL = 0x5318
+ CDROMGETSPINDOWN = 0x531d
+ CDROMSETSPINDOWN = 0x531e
  CDROMCLOSETRAY = 0x5319
! CDROM_SET_OPTIONS = 0x5320
! CDROM_CLEAR_OPTIONS = 0x5321
! CDROM_SELECT_SPEED = 0x5322
! CDROM_SELECT_DISC = 0x5323
! CDROM_MEDIA_CHANGED = 0x5325
! CDROM_DRIVE_STATUS = 0x5326
! CDROM_DISC_STATUS = 0x5327
! CDROM_CHANGER_NSLOTS = 0x5328
! CDROM_LOCKDOOR = 0x5329
! CDROM_DEBUG = 0x5330
! CDROM_GET_CAPABILITY = 0x5331
! CDROMAUDIOBUFSIZ = 0x5382
! DVD_READ_STRUCT = 0x5390
! DVD_WRITE_STRUCT = 0x5391
! DVD_AUTH = 0x5392
! CDROM_SEND_PACKET = 0x5393
! CDROM_NEXT_WRITABLE = 0x5394
! CDROM_LAST_WRITTEN = 0x5395
! CDROM_PACKET_SIZE = 12
! CGC_DATA_UNKNOWN = 0
! CGC_DATA_WRITE = 1
! CGC_DATA_READ = 2
! CGC_DATA_NONE = 3
! CD_MINS = 74
! CD_SECS = 60
! CD_FRAMES = 75
! CD_SYNC_SIZE = 12
! CD_MSF_OFFSET = 150
! CD_CHUNK_SIZE = 24
! CD_NUM_OF_CHUNKS = 98
! CD_FRAMESIZE_SUB = 96
! CD_HEAD_SIZE = 4
! CD_SUBHEAD_SIZE = 8
! CD_EDC_SIZE = 4
! CD_ZERO_SIZE = 8
! CD_ECC_SIZE = 276
! CD_FRAMESIZE = 2048
! CD_FRAMESIZE_RAW = 2352
! CD_FRAMESIZE_RAWER = 2646
! CD_FRAMESIZE_RAW1 = (CD_FRAMESIZE_RAW-CD_SYNC_SIZE)
! CD_FRAMESIZE_RAW0 = (CD_FRAMESIZE_RAW-CD_SYNC_SIZE-CD_HEAD_SIZE)
! CD_XA_HEAD = (CD_HEAD_SIZE+CD_SUBHEAD_SIZE)
! CD_XA_TAIL = (CD_EDC_SIZE+CD_ECC_SIZE)
! CD_XA_SYNC_HEAD = (CD_SYNC_SIZE+CD_XA_HEAD)
! CDROM_LBA = 0x01
! CDROM_MSF = 0x02
! CDROM_DATA_TRACK = 0x04
! CDROM_LEADOUT = 0xAA
! CDROM_AUDIO_INVALID = 0x00
! CDROM_AUDIO_PLAY = 0x11
! CDROM_AUDIO_PAUSED = 0x12
! CDROM_AUDIO_COMPLETED = 0x13
! CDROM_AUDIO_ERROR = 0x14
! CDROM_AUDIO_NO_STATUS = 0x15
! CDC_CLOSE_TRAY = 0x1
! CDC_OPEN_TRAY = 0x2
! CDC_LOCK = 0x4
! CDC_SELECT_SPEED = 0x8
! CDC_SELECT_DISC = 0x10
! CDC_MULTI_SESSION = 0x20
! CDC_MCN = 0x40
! CDC_MEDIA_CHANGED = 0x80
! CDC_PLAY_AUDIO = 0x100
! CDC_RESET = 0x200
! CDC_IOCTLS = 0x400
! CDC_DRIVE_STATUS = 0x800
! CDC_GENERIC_PACKET = 0x1000
! CDC_CD_R = 0x2000
! CDC_CD_RW = 0x4000
! CDC_DVD = 0x8000
! CDC_DVD_R = 0x10000
! CDC_DVD_RAM = 0x20000
! CDS_NO_INFO = 0
! CDS_NO_DISC = 1
! CDS_TRAY_OPEN = 2
! CDS_DRIVE_NOT_READY = 3
! CDS_DISC_OK = 4
! CDS_AUDIO = 100
! CDS_DATA_1 = 101
! CDS_DATA_2 = 102
! CDS_XA_2_1 = 103
! CDS_XA_2_2 = 104
! CDS_MIXED = 105
! CDO_AUTO_CLOSE = 0x1
! CDO_AUTO_EJECT = 0x2
! CDO_USE_FFLAGS = 0x4
! CDO_LOCK = 0x8
! CDO_CHECK_TYPE = 0x10
! CD_PART_MAX = 64
! CD_PART_MASK = (CD_PART_MAX - 1)
! GPCMD_BLANK = 0xa1
! GPCMD_CLOSE_TRACK = 0x5b
! GPCMD_FLUSH_CACHE = 0x35
! GPCMD_FORMAT_UNIT = 0x04
! GPCMD_GET_CONFIGURATION = 0x46
! GPCMD_GET_EVENT_STATUS_NOTIFICATION = 0x4a
! GPCMD_GET_PERFORMANCE = 0xac
! GPCMD_INQUIRY = 0x12
! GPCMD_LOAD_UNLOAD = 0xa6
! GPCMD_MECHANISM_STATUS = 0xbd
! GPCMD_MODE_SELECT_10 = 0x55
! GPCMD_MODE_SENSE_10 = 0x5a
! GPCMD_PAUSE_RESUME = 0x4b
! GPCMD_PLAY_AUDIO_10 = 0x45
! GPCMD_PLAY_AUDIO_MSF = 0x47
! GPCMD_PLAY_AUDIO_TI = 0x48
! GPCMD_PLAY_CD = 0xbc
! GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1e
! GPCMD_READ_10 = 0x28
! GPCMD_READ_12 = 0xa8
! GPCMD_READ_CDVD_CAPACITY = 0x25
! GPCMD_READ_CD = 0xbe
! GPCMD_READ_CD_MSF = 0xb9
! GPCMD_READ_DISC_INFO = 0x51
! GPCMD_READ_DVD_STRUCTURE = 0xad
! GPCMD_READ_FORMAT_CAPACITIES = 0x23
! GPCMD_READ_HEADER = 0x44
! GPCMD_READ_TRACK_RZONE_INFO = 0x52
! GPCMD_READ_SUBCHANNEL = 0x42
! GPCMD_READ_TOC_PMA_ATIP = 0x43
! GPCMD_REPAIR_RZONE_TRACK = 0x58
! GPCMD_REPORT_KEY = 0xa4
! GPCMD_REQUEST_SENSE = 0x03
! GPCMD_RESERVE_RZONE_TRACK = 0x53
! GPCMD_SCAN = 0xba
! GPCMD_SEEK = 0x2b
! GPCMD_SEND_DVD_STRUCTURE = 0xad
! GPCMD_SEND_EVENT = 0xa2
! GPCMD_SEND_KEY = 0xa3
! GPCMD_SEND_OPC = 0x54
! GPCMD_SET_READ_AHEAD = 0xa7
! GPCMD_SET_STREAMING = 0xb6
! GPCMD_START_STOP_UNIT = 0x1b
! GPCMD_STOP_PLAY_SCAN = 0x4e
! GPCMD_TEST_UNIT_READY = 0x00
! GPCMD_VERIFY_10 = 0x2f
! GPCMD_WRITE_10 = 0x2a
! GPCMD_WRITE_AND_VERIFY_10 = 0x2e
! GPCMD_SET_SPEED = 0xbb
! GPCMD_PLAYAUDIO_TI = 0x48
! GPCMD_GET_MEDIA_STATUS = 0xda
! GPMODE_R_W_ERROR_PAGE = 0x01
! GPMODE_WRITE_PARMS_PAGE = 0x05
! GPMODE_AUDIO_CTL_PAGE = 0x0e
! GPMODE_POWER_PAGE = 0x1a
! GPMODE_FAULT_FAIL_PAGE = 0x1c
! GPMODE_TO_PROTECT_PAGE = 0x1d
! GPMODE_CAPABILITIES_PAGE = 0x2a
! GPMODE_ALL_PAGES = 0x3f
! GPMODE_CDROM_PAGE = 0x0d
! DVD_STRUCT_PHYSICAL = 0x00
! DVD_STRUCT_COPYRIGHT = 0x01
! DVD_STRUCT_DISCKEY = 0x02
! DVD_STRUCT_BCA = 0x03
! DVD_STRUCT_MANUFACT = 0x04
! DVD_LAYERS = 4
! DVD_LU_SEND_AGID = 0
! DVD_HOST_SEND_CHALLENGE = 1
! DVD_LU_SEND_KEY1 = 2
! DVD_LU_SEND_CHALLENGE = 3
! DVD_HOST_SEND_KEY2 = 4
! DVD_AUTH_ESTABLISHED = 5
! DVD_AUTH_FAILURE = 6
! DVD_LU_SEND_TITLE_KEY = 7
! DVD_LU_SEND_ASF = 8
! DVD_INVALIDATE_AGID = 9
! DVD_LU_SEND_RPC_STATE = 10
! DVD_HOST_SEND_RPC_STATE = 11
! DVD_CPM_NO_COPYRIGHT = 0
! DVD_CPM_COPYRIGHTED = 1
! DVD_CP_SEC_NONE = 0
! DVD_CP_SEC_EXIST = 1
! DVD_CGMS_UNRESTRICTED = 0
! DVD_CGMS_SINGLE = 2
! DVD_CGMS_RESTRICTED = 3
! 
! CDROM_MAX_SLOTS = 256



From fdrake@users.sourceforge.net  Sat Dec 22 19:08:01 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Sat, 22 Dec 2001 11:08:01 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsocket.tex,1.59,1.60
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv23432/lib

Modified Files:
	libsocket.tex 
Log Message:
Fix the erroneous availability annotation for s.makefile() from the last
checkin (my fault!).
Wrap some long lines and fix some markup inconsistencies.


Index: libsocket.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsocket.tex,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** libsocket.tex	2001/12/21 17:45:03	1.59
--- libsocket.tex	2001/12/22 19:07:58	1.60
***************
*** 141,144 ****
--- 141,145 ----
  \dataline{AI_*}
  \dataline{NI_*}
+ \dataline{TCP_*}
  Many constants of these forms, documented in the \UNIX{} documentation on
  sockets and/or the IP protocol, are also defined in the socket module.
***************
*** 326,331 ****
  \cfunction{inet_aton()}.
  
! \function{inet_aton} does not support IPv6, and
! \function{getnameinfo()} should be used instead for IPv4/v6 dual stack support.
  \end{funcdesc}
  
--- 327,333 ----
  \cfunction{inet_aton()}.
  
! \function{inet_aton()} does not support IPv6, and
! \function{getnameinfo()} should be used instead for IPv4/v6 dual stack
! support.
  \end{funcdesc}
  
***************
*** 342,347 ****
  length, \exception{socket.error} will be raised.
  
! \function{inet_ntoa} does not support IPv6, and
! \function{getnameinfo()} should be used instead for IPv4/v6 dual stack support.
  \end{funcdesc}
  
--- 344,350 ----
  length, \exception{socket.error} will be raised.
  
! \function{inet_ntoa()} does not support IPv6, and
! \function{getnameinfo()} should be used instead for IPv4/v6 dual stack
! support.
  \end{funcdesc}
  
***************
*** 456,460 ****
  built-in \function{file()} function; see ``Built-in Functions''
  (section \ref{built-in-funcs}) for more information.
- Availability: \UNIX.
  \end{methoddesc}
  
--- 459,462 ----



From fdrake@users.sourceforge.net  Sat Dec 22 19:09:44 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Sat, 22 Dec 2001 11:09:44 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsocket.tex,1.51.4.1,1.51.4.2
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv23769/lib

Modified Files:
      Tag: release21-maint
	libsocket.tex 
Log Message:
Fix the erroneous availability annotation for s.makefile() from the last
checkin (my fault!).


Index: libsocket.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsocket.tex,v
retrieving revision 1.51.4.1
retrieving revision 1.51.4.2
diff -C2 -d -r1.51.4.1 -r1.51.4.2
*** libsocket.tex	2001/12/21 17:44:43	1.51.4.1
--- libsocket.tex	2001/12/22 19:09:42	1.51.4.2
***************
*** 348,352 ****
  built-in \function{open()} function; see ``Built-in Functions''
  (section \ref{built-in-funcs}) for more information.
- Availability: \UNIX.
  \end{methoddesc}
  
--- 348,351 ----



From anthonybaxter@users.sourceforge.net  Sun Dec 23 01:26:51 2001
From: anthonybaxter@users.sourceforge.net (Anthony Baxter)
Date: Sat, 22 Dec 2001 17:26:51 -0800
Subject: [Python-checkins] CVS: python/dist/src/Lib asyncore.py,1.10,1.10.4.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv6869

Modified Files:
      Tag: release21-maint
	asyncore.py 
Log Message:
partial backport of 1.25: 
select not defensive. check for EINTR and make sure it's handled painlessly.


Index: asyncore.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/asyncore.py,v
retrieving revision 1.10
retrieving revision 1.10.4.1
diff -C2 -d -r1.10 -r1.10.4.1
*** asyncore.py	2001/02/09 05:03:15	1.10
--- asyncore.py	2001/12/23 01:26:49	1.10.4.1
***************
*** 53,65 ****
  
  import os
! if os.name == 'nt':
!     EWOULDBLOCK = 10035
!     EINPROGRESS = 10036
!     EALREADY    = 10037
!     ECONNRESET  = 10054
!     ENOTCONN    = 10057
!     ESHUTDOWN   = 10058
! else:
!     from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, ENOTCONN, ESHUTDOWN
  
  try:
--- 53,58 ----
  
  import os
! from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, \
!      ENOTCONN, ESHUTDOWN, EINTR
  
  try:
***************
*** 84,89 ****
              if obj.writable():
                  w.append (fd)
!         r,w,e = select.select (r,w,e, timeout)
  
          if DEBUG:
              print r,w,e
--- 77,87 ----
              if obj.writable():
                  w.append (fd)
!         try:
!             r,w,e = select.select (r,w,e, timeout)
!         except select.error, err:
!             if err[0] != EINTR:
!                 raise
  
+ 
          if DEBUG:
              print r,w,e
***************
*** 162,166 ****
              if flags:
                  pollster.register(fd, flags)
!         r = pollster.poll (timeout)
          for fd, flags in r:
              try:
--- 160,169 ----
              if flags:
                  pollster.register(fd, flags)
!         try:
!             r = pollster.poll (timeout)
!         except select.error, err:
!             if err[0] != EINTR:
!                 raise
!             r = []
          for fd, flags in r:
              try:
***************
*** 261,265 ****
              self.socket.setsockopt (
                  socket.SOL_SOCKET, socket.SO_REUSEADDR,
!                 self.socket.getsockopt (socket.SOL_SOCKET, socket.SO_REUSEADDR) | 1
                  )
          except:
--- 264,269 ----
              self.socket.setsockopt (
                  socket.SOL_SOCKET, socket.SO_REUSEADDR,
!                 self.socket.getsockopt (socket.SOL_SOCKET,
!                                         socket.SO_REUSEADDR) | 1
                  )
          except:
***************
*** 394,398 ****
  
      def handle_error (self):
!         (file,fun,line), t, v, tbinfo = compact_traceback()
  
          # sometimes a user repr method will crash.
--- 398,402 ----
  
      def handle_error (self):
!         nil, t, v, tbinfo = compact_traceback()
  
          # sometimes a user repr method will crash.



From anthonybaxter@users.sourceforge.net  Sun Dec 23 01:37:35 2001
From: anthonybaxter@users.sourceforge.net (Anthony Baxter)
Date: Sat, 22 Dec 2001 17:37:35 -0800
Subject: [Python-checkins] CVS: python/dist/src/Lib asyncore.py,1.10.4.1,1.10.4.2
Message-ID: 

Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv10636

Modified Files:
      Tag: release21-maint
	asyncore.py 
Log Message:
darn excess whitespace.


Index: asyncore.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/asyncore.py,v
retrieving revision 1.10.4.1
retrieving revision 1.10.4.2
diff -C2 -d -r1.10.4.1 -r1.10.4.2
*** asyncore.py	2001/12/23 01:26:49	1.10.4.1
--- asyncore.py	2001/12/23 01:37:33	1.10.4.2
***************
*** 83,87 ****
                  raise
  
- 
          if DEBUG:
              print r,w,e
--- 83,86 ----



From anthonybaxter@users.sourceforge.net  Sun Dec 23 01:44:51 2001
From: anthonybaxter@users.sourceforge.net (Anthony Baxter)
Date: Sat, 22 Dec 2001 17:44:51 -0800
Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.141.2.7,1.141.2.8
Message-ID: 

Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv12993

Modified Files:
      Tag: release21-maint
	socketmodule.c 
Log Message:
backport of 1.196: socket.recv(-1) fixup.


Index: socketmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.141.2.7
retrieving revision 1.141.2.8
diff -C2 -d -r1.141.2.7 -r1.141.2.8
*** socketmodule.c	2001/11/01 14:25:38	1.141.2.7
--- socketmodule.c	2001/12/23 01:44:49	1.141.2.8
***************
*** 1325,1328 ****
--- 1325,1333 ----
  	if (!PyArg_ParseTuple(args, "i|i:recv", &len, &flags))
  		return NULL;
+         if (len < 0) {
+ 		PyErr_SetString(PyExc_ValueError,
+ 				"negative buffersize in connect");
+ 		return NULL;
+ 	}
  	buf = PyString_FromStringAndSize((char *) 0, len);
  	if (buf == NULL)



From anthonybaxter@users.sourceforge.net  Sun Dec 23 01:47:13 2001
From: anthonybaxter@users.sourceforge.net (Anthony Baxter)
Date: Sat, 22 Dec 2001 17:47:13 -0800
Subject: [Python-checkins] CVS: python/dist/src/Lib ftplib.py,1.53.2.1,1.53.2.2 gopherlib.py,1.9,1.9.4.1 httplib.py,1.34.2.1,1.34.2.2 imaplib.py,1.27.4.1,1.27.4.2 nntplib.py,1.26,1.26.4.1 poplib.py,1.14,1.14.4.1 smtplib.py,1.36,1.36.4.1 socket.py,1.11.2.1,1.11.2.2 telnetlib.py,1.11,1.11.4.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv13195

Modified Files:
      Tag: release21-maint
	ftplib.py gopherlib.py httplib.py imaplib.py nntplib.py 
	poplib.py smtplib.py socket.py telnetlib.py 
Log Message:
The Grande 'sendall()' patch. I believe that I've picked up everything
in the std lib that should be using sendall(), rather than send() - I've
tried to check each of the patches. 

Replaces calls to socket.send() (which isn't guaranteed to send all data) 
with the new socket.sendall() method.


Index: ftplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ftplib.py,v
retrieving revision 1.53.2.1
retrieving revision 1.53.2.2
diff -C2 -d -r1.53.2.1 -r1.53.2.2
*** ftplib.py	2001/12/18 14:17:02	1.53.2.1
--- ftplib.py	2001/12/23 01:47:10	1.53.2.2
***************
*** 156,160 ****
          line = line + CRLF
          if self.debugging > 1: print '*put*', self.sanitize(line)
!         self.sock.send(line)
  
      # Internal: send one command to the server (through putline())
--- 156,160 ----
          line = line + CRLF
          if self.debugging > 1: print '*put*', self.sanitize(line)
!         self.sock.sendall(line)
  
      # Internal: send one command to the server (through putline())
***************
*** 219,223 ****
          line = 'ABOR' + CRLF
          if self.debugging > 1: print '*put urgent*', self.sanitize(line)
!         self.sock.send(line, MSG_OOB)
          resp = self.getmultiline()
          if resp[:3] not in ('426', '226'):
--- 219,223 ----
          line = 'ABOR' + CRLF
          if self.debugging > 1: print '*put urgent*', self.sanitize(line)
!         self.sock.sendall(line, MSG_OOB)
          resp = self.getmultiline()
          if resp[:3] not in ('426', '226'):
***************
*** 373,377 ****
              buf = fp.read(blocksize)
              if not buf: break
!             conn.send(buf)
          conn.close()
          return self.voidresp()
--- 373,377 ----
              buf = fp.read(blocksize)
              if not buf: break
!             conn.sendall(buf)
          conn.close()
          return self.voidresp()
***************
*** 387,391 ****
                  if buf[-1] in CRLF: buf = buf[:-1]
                  buf = buf + CRLF
!             conn.send(buf)
          conn.close()
          return self.voidresp()
--- 387,391 ----
                  if buf[-1] in CRLF: buf = buf[:-1]
                  buf = buf + CRLF
!             conn.sendall(buf)
          conn.close()
          return self.voidresp()

Index: gopherlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/gopherlib.py,v
retrieving revision 1.9
retrieving revision 1.9.4.1
diff -C2 -d -r1.9 -r1.9.4.1
*** gopherlib.py	2001/02/09 10:10:02	1.9
--- gopherlib.py	2001/12/23 01:47:10	1.9.4.1
***************
*** 67,71 ****
      s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      s.connect((host, port))
!     s.send(selector + CRLF)
      s.shutdown(1)
      return s.makefile('rb')
--- 67,71 ----
      s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      s.connect((host, port))
!     s.sendall(selector + CRLF)
      s.shutdown(1)
      return s.makefile('rb')

Index: httplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/httplib.py,v
retrieving revision 1.34.2.1
retrieving revision 1.34.2.2
diff -C2 -d -r1.34.2.1 -r1.34.2.2
*** httplib.py	2001/05/31 18:03:22	1.34.2.1
--- httplib.py	2001/12/23 01:47:10	1.34.2.2
***************
*** 389,393 ****
              print "send:", repr(str)
          try:
!             self.sock.send(str)
          except socket.error, v:
              if v[0] == 32:      # Broken pipe
--- 389,393 ----
              print "send:", repr(str)
          try:
!             self.sock.sendall(str)
          except socket.error, v:
              if v[0] == 32:      # Broken pipe

Index: imaplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/imaplib.py,v
retrieving revision 1.27.4.1
retrieving revision 1.27.4.2
diff -C2 -d -r1.27.4.1 -r1.27.4.2
*** imaplib.py	2001/07/20 10:54:21	1.27.4.1
--- imaplib.py	2001/12/23 01:47:10	1.27.4.2
***************
*** 634,638 ****
  
          try:
!             self.sock.send('%s%s' % (data, CRLF))
          except socket.error, val:
              raise self.abort('socket error: %s' % val)
--- 634,638 ----
  
          try:
!             self.sock.sendall('%s%s' % (data, CRLF))
          except socket.error, val:
              raise self.abort('socket error: %s' % val)
***************
*** 658,663 ****
  
              try:
!                 self.sock.send(literal)
!                 self.sock.send(CRLF)
              except socket.error, val:
                  raise self.abort('socket error: %s' % val)
--- 658,663 ----
  
              try:
!                 self.sock.sendall(literal)
!                 self.sock.sendall(CRLF)
              except socket.error, val:
                  raise self.abort('socket error: %s' % val)

Index: nntplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/nntplib.py,v
retrieving revision 1.26
retrieving revision 1.26.4.1
diff -C2 -d -r1.26 -r1.26.4.1
*** nntplib.py	2001/02/09 07:02:17	1.26
--- nntplib.py	2001/12/23 01:47:10	1.26.4.1
***************
*** 179,183 ****
          line = line + CRLF
          if self.debugging > 1: print '*put*', `line`
!         self.sock.send(line)
  
      def putcmd(self, line):
--- 179,183 ----
          line = line + CRLF
          if self.debugging > 1: print '*put*', `line`
!         self.sock.sendall(line)
  
      def putcmd(self, line):

Index: poplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/poplib.py,v
retrieving revision 1.14
retrieving revision 1.14.4.1
diff -C2 -d -r1.14 -r1.14.4.1
*** poplib.py	2001/02/12 02:00:42	1.14
--- poplib.py	2001/12/23 01:47:10	1.14.4.1
***************
*** 85,89 ****
      def _putline(self, line):
          #if self._debugging > 1: print '*put*', `line`
!         self.sock.send('%s%s' % (line, CRLF))
  
  
--- 85,89 ----
      def _putline(self, line):
          #if self._debugging > 1: print '*put*', `line`
!         self.sock.sendall('%s%s' % (line, CRLF))
  
  

Index: smtplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/smtplib.py,v
retrieving revision 1.36
retrieving revision 1.36.4.1
diff -C2 -d -r1.36 -r1.36.4.1
*** smtplib.py	2001/02/15 22:15:13	1.36
--- smtplib.py	2001/12/23 01:47:10	1.36.4.1
***************
*** 233,239 ****
          if self.sock:
              try:
!                 sendptr = 0
!                 while sendptr < len(str):
!                     sendptr = sendptr + self.sock.send(str[sendptr:])
              except socket.error:
                  raise SMTPServerDisconnected('Server not connected')
--- 233,237 ----
          if self.sock:
              try:
!                 self.sock.sendall(str)
              except socket.error:
                  raise SMTPServerDisconnected('Server not connected')

Index: socket.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/socket.py,v
retrieving revision 1.11.2.1
retrieving revision 1.11.2.2
diff -C2 -d -r1.11.2.1 -r1.11.2.2
*** socket.py	2001/12/05 06:16:10	1.11.2.1
--- socket.py	2001/12/23 01:47:10	1.11.2.2
***************
*** 177,181 ****
      def flush(self):
          if self._wbuf:
!             self._sock.send(self._wbuf)
              self._wbuf = ""
  
--- 177,181 ----
      def flush(self):
          if self._wbuf:
!             self._sock.sendall(self._wbuf)
              self._wbuf = ""
  
***************
*** 193,197 ****
  
      def writelines(self, list):
!         filter(self._sock.send, list)
          self.flush()
  
--- 193,197 ----
  
      def writelines(self, list):
!         filter(self._sock.sendall, list)
          self.flush()
  

Index: telnetlib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/telnetlib.py,v
retrieving revision 1.11
retrieving revision 1.11.4.1
diff -C2 -d -r1.11 -r1.11.4.1
*** telnetlib.py	2001/03/01 04:27:19	1.11
--- telnetlib.py	2001/12/23 01:47:10	1.11.4.1
***************
*** 191,195 ****
              buffer = buffer.replace(IAC, IAC+IAC)
          self.msg("send %s", `buffer`)
!         self.sock.send(buffer)
  
      def read_until(self, match, timeout=None):
--- 191,195 ----
              buffer = buffer.replace(IAC, IAC+IAC)
          self.msg("send %s", `buffer`)
!         self.sock.sendall(buffer)
  
      def read_until(self, match, timeout=None):
***************
*** 326,335 ****
                      opt = self.rawq_getchar()
                      self.msg('IAC %s %d', c == DO and 'DO' or 'DONT', ord(c))
!                     self.sock.send(IAC + WONT + opt)
                  elif c in (WILL, WONT):
                      opt = self.rawq_getchar()
                      self.msg('IAC %s %d',
                               c == WILL and 'WILL' or 'WONT', ord(c))
!                     self.sock.send(IAC + DONT + opt)
                  else:
                      self.msg('IAC %s not recognized' % `c`)
--- 326,335 ----
                      opt = self.rawq_getchar()
                      self.msg('IAC %s %d', c == DO and 'DO' or 'DONT', ord(c))
!                     self.sock.sendall(IAC + WONT + opt)
                  elif c in (WILL, WONT):
                      opt = self.rawq_getchar()
                      self.msg('IAC %s %d',
                               c == WILL and 'WILL' or 'WONT', ord(c))
!                     self.sock.sendall(IAC + DONT + opt)
                  else:
                      self.msg('IAC %s not recognized' % `c`)



From anthonybaxter@users.sourceforge.net  Sun Dec 23 04:07:27 2001
From: anthonybaxter@users.sourceforge.net (Anthony Baxter)
Date: Sat, 22 Dec 2001 20:07:27 -0800
Subject: [Python-checkins] CVS: python/dist/src/Python thread_pthread.h,2.30,2.30.6.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv16386/Python

Modified Files:
      Tag: release21-maint
	thread_pthread.h 
Log Message:
backport of solaris thread patch, adding PTHREAD_SCOPE_SYSTEM support:

  Improve threading on Solaris, according to SF patch #460269, submitted
  by bbrox@bbrox.org / lionel.ulmer@free.fr.
 
  This adds a configure check and if all goes well turns on the
  PTHREAD_SCOPE_SYSTEM thread attribute for new threads.
 
  This should remove the need to add tiny sleeps at the start of threads
  to allow other threads to be scheduled.

This is a semi-feature, but makes such a huge difference to the
performance of Zope on Solaris that it's worthwhile (well, imho).



Index: thread_pthread.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/thread_pthread.h,v
retrieving revision 2.30
retrieving revision 2.30.6.1
diff -C2 -d -r2.30 -r2.30.6.1
*** thread_pthread.h	2000/09/01 23:29:28	2.30
--- thread_pthread.h	2001/12/23 04:07:25	2.30.6.1
***************
*** 130,135 ****
--- 130,142 ----
  	int success;
  	dprintf(("PyThread_start_new_thread called\n"));
+ #ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED
+ 	pthread_attr_t attrs;
+ #endif
  	if (!initialized)
  		PyThread_init_thread();
+ #ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED
+ 	pthread_attr_init(&attrs);
+ 	pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
+ #endif
  
  	success = pthread_create(&th, 
***************
*** 147,151 ****
--- 154,162 ----
  				 arg
  #elif defined(PY_PTHREAD_STD)
+ #ifdef PTHREAD_SYSTEM_SCHED_SUPPORTED
+ 				 &attrs,
+ #else
  				 (pthread_attr_t*)NULL,
+ #endif
  				 (void* (*)(void *))func,
  				 (void *)arg



From anthonybaxter@users.sourceforge.net  Sun Dec 23 04:07:30 2001
From: anthonybaxter@users.sourceforge.net (Anthony Baxter)
Date: Sat, 22 Dec 2001 20:07:30 -0800
Subject: [Python-checkins] CVS: python/dist/src acconfig.h,1.46.2.2,1.46.2.3 config.h.in,2.91.2.5,2.91.2.6 configure,1.207.2.5,1.207.2.6 configure.in,1.215.2.5,1.215.2.6
Message-ID: 

Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv16386

Modified Files:
      Tag: release21-maint
	acconfig.h config.h.in configure configure.in 
Log Message:
backport of solaris thread patch, adding PTHREAD_SCOPE_SYSTEM support:

  Improve threading on Solaris, according to SF patch #460269, submitted
  by bbrox@bbrox.org / lionel.ulmer@free.fr.
 
  This adds a configure check and if all goes well turns on the
  PTHREAD_SCOPE_SYSTEM thread attribute for new threads.
 
  This should remove the need to add tiny sleeps at the start of threads
  to allow other threads to be scheduled.

This is a semi-feature, but makes such a huge difference to the
performance of Zope on Solaris that it's worthwhile (well, imho).



Index: acconfig.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/acconfig.h,v
retrieving revision 1.46.2.2
retrieving revision 1.46.2.3
diff -C2 -d -r1.46.2.2 -r1.46.2.3
*** acconfig.h	2001/07/11 22:27:39	1.46.2.2
--- acconfig.h	2001/12/23 04:07:22	1.46.2.3
***************
*** 131,134 ****
--- 131,137 ----
  #undef SIZEOF_PTHREAD_T
  
+ /* Defined if PTHREAD_SCOPE_SYSTEM supported. */
+ #undef PTHREAD_SYSTEM_SCHED_SUPPORTED
+ 
  /* sizeof(void *) */
  #undef SIZEOF_VOID_P

Index: config.h.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/Attic/config.h.in,v
retrieving revision 2.91.2.5
retrieving revision 2.91.2.6
diff -C2 -d -r2.91.2.5 -r2.91.2.6
*** config.h.in	2001/07/16 16:07:26	2.91.2.5
--- config.h.in	2001/12/23 04:07:22	2.91.2.6
***************
*** 1,3 ****
! /* config.h.in.  Generated automatically from configure.in by autoheader 2.13.  */
  
  /* Define if on AIX 3.
--- 1,3 ----
! /* config.h.in.  Generated automatically from configure.in by autoheader.  */
  
  /* Define if on AIX 3.
***************
*** 189,192 ****
--- 189,195 ----
  /* The number of bytes in a pthread_t. */
  #undef SIZEOF_PTHREAD_T
+ 
+ /* Defined if PTHREAD_SCOPE_SYSTEM supported. */
+ #undef PTHREAD_SYSTEM_SCHED_SUPPORTED
  
  /* Define to `int' if  doesn't define.  */

Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.207.2.5
retrieving revision 1.207.2.6
diff -C2 -d -r1.207.2.5 -r1.207.2.6
*** configure	2001/07/16 16:07:26	1.207.2.5
--- configure	2001/12/23 04:07:22	1.207.2.6
***************
*** 1,5 ****
  #! /bin/sh
  
! # From configure.in Revision: 1.215.2.4 
  
  # Guess values for system-dependent variables and create Makefiles.
--- 1,5 ----
  #! /bin/sh
  
! # From configure.in Revision: 1.215.2.5 
  
[...3328 lines suppressed...]
  if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <
***************
*** 6323,6327 ****
  SRCDIRS="Parser Grammar Objects Python Modules"
  echo $ac_n "checking for build directories""... $ac_c" 1>&6
! echo "configure:6326: checking for build directories" >&5
  for dir in $SRCDIRS; do
      if test ! -d $dir; then
--- 6369,6373 ----
  SRCDIRS="Parser Grammar Objects Python Modules"
  echo $ac_n "checking for build directories""... $ac_c" 1>&6
! echo "configure:6372: checking for build directories" >&5
  for dir in $SRCDIRS; do
      if test ! -d $dir; then

Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.215.2.5
retrieving revision 1.215.2.6
diff -C2 -d -r1.215.2.5 -r1.215.2.6
*** configure.in	2001/07/16 16:07:26	1.215.2.5
--- configure.in	2001/12/23 04:07:25	1.215.2.6
***************
*** 820,823 ****
--- 820,824 ----
  	AC_DEFINE(WITH_THREAD)
  	AC_DEFINE(_POSIX_THREADS)
+ 	posix_threads=yes
  	USE_THREAD_MODULE=""
      else
***************
*** 843,846 ****
--- 844,848 ----
  	AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD)
  	AC_DEFINE(_POSIX_THREADS)
+ 	posix_threads=yes
  	LIBS="-lpthread $LIBS"
  	LIBOBJS="$LIBOBJS thread.o"],[
***************
*** 848,852 ****
  	case $ac_sys_system in
  	  Darwin*) ;;
! 	  *) AC_DEFINE(_POSIX_THREADS);;
  	esac
  	LIBOBJS="$LIBOBJS thread.o"],[
--- 850,856 ----
  	case $ac_sys_system in
  	  Darwin*) ;;
! 	  *) AC_DEFINE(_POSIX_THREADS)
! 	     posix_threads=yes
!              ;;
  	esac
  	LIBOBJS="$LIBOBJS thread.o"],[
***************
*** 856,879 ****
--- 860,908 ----
  	AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD)
  	AC_DEFINE(_POSIX_THREADS)
+ 	posix_threads=yes
  	LIBS="$LIBS -lpthreads"
  	LIBOBJS="$LIBOBJS thread.o"], [
  	AC_CHECK_LIB(c_r, pthread_create, [AC_DEFINE(WITH_THREAD)
  	AC_DEFINE(_POSIX_THREADS)
+ 	posix_threads=yes
  	LIBS="$LIBS -lc_r"
  	LIBOBJS="$LIBOBJS thread.o"], [
  	AC_CHECK_LIB(thread, __d6_pthread_create, [AC_DEFINE(WITH_THREAD)
  	AC_DEFINE(_POSIX_THREADS)
+ 	posix_threads=yes
  	LIBS="$LIBS -lthread"
  	LIBOBJS="$LIBOBJS thread.o"], [
  	AC_CHECK_LIB(pthread, __pthread_create_system, [AC_DEFINE(WITH_THREAD)
  	AC_DEFINE(_POSIX_THREADS)
+ 	posix_threads=yes
  	LIBS="$LIBS -lpthread"
  	LIBOBJS="$LIBOBJS thread.o"], [
  	AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD)
  	AC_DEFINE(_POSIX_THREADS)
+ 	posix_threads=yes
  	LIBS="$LIBS -lcma"
  	LIBOBJS="$LIBOBJS thread.o"],[
  	USE_THREAD_MODULE="#"])
  	])])])])])])])])])
+         if test "$posix_threads" = "yes"; then         
+ 	  AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported)
+ 	  AC_CACHE_VAL(ac_cv_pthread_system_supported,
+ 	  [AC_TRY_RUN([#include 
+ 	  void *foo(void *parm) {
+ 	    return NULL;
+ 	  }
+ 	  main() {
+ 	    pthread_attr_t attr;
+ 	    if (pthread_attr_init(&attr)) exit(-1);
+ 	    if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
+ 	    if (pthread_create(NULL, &attr, foo, NULL)) exit(-1);
+ 	    exit(0);
+ 	  }], ac_cv_pthread_system_supported=yes, ac_cv_pthread_system_supported=no)
+ 	  ])
+ 	  AC_MSG_RESULT($ac_cv_pthread_system_supported)
+ 	  if test "$ac_cv_pthread_system_supported" = "yes"; then
+ 	    AC_DEFINE(PTHREAD_SYSTEM_SCHED_SUPPORTED)
+ 	  fi
+ 	fi
  
  	AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD)



From anthonybaxter@users.sourceforge.net  Sun Dec 23 07:02:03 2001
From: anthonybaxter@users.sourceforge.net (Anthony Baxter)
Date: Sat, 22 Dec 2001 23:02:03 -0800
Subject: [Python-checkins] CVS: python/dist/src/Lib rfc822.py,1.54,1.54.4.1
Message-ID: 

Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv21483

Modified Files:
      Tag: release21-maint
	rfc822.py 
Log Message:
oops. nearly forgot this one:
backport patch #495358  rfc822.AddressList and "<>" address


Index: rfc822.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/rfc822.py,v
retrieving revision 1.54
retrieving revision 1.54.4.1
diff -C2 -d -r1.54 -r1.54.4.1
*** rfc822.py	2001/02/15 22:15:13	1.54
--- rfc822.py	2001/12/23 07:02:01	1.54.4.1
***************
*** 592,596 ****
          self.pos = self.pos + 1
          self.gotonext()
!         adlist = None
          while self.pos < len(self.field):
              if expectroute:
--- 592,596 ----
          self.pos = self.pos + 1
          self.gotonext()
!         adlist = ""
          while self.pos < len(self.field):
              if expectroute:



From gvanrossum@users.sourceforge.net  Sun Dec 23 13:54:22 2001
From: gvanrossum@users.sourceforge.net (Guido van Rossum)
Date: Sun, 23 Dec 2001 05:54:22 -0800
Subject: [Python-checkins] CVS: python/dist/src/Lib ftplib.py,1.60,1.61
Message-ID: 

Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv18742

Modified Files:
	ftplib.py 
Log Message:
Don't set passiveserver to 0 in connect().  See SF bug #495693.

This should definitely be backported to 2.2.1.  I'll leave it to Jack
to decide whether he wants to fix this in MacPython 2.2.


Index: ftplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/ftplib.py,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** ftplib.py	2001/10/17 17:21:47	1.60
--- ftplib.py	2001/12/23 13:54:19	1.61
***************
*** 115,119 ****
          if host: self.host = host
          if port: self.port = port
-         self.passiveserver = 0
          msg = "getaddrinfo returns an empty list"
          for res in socket.getaddrinfo(self.host, self.port, 0, socket.SOCK_STREAM):
--- 115,118 ----



From bwarsaw@users.sourceforge.net  Mon Dec 24 20:58:39 2001
From: bwarsaw@users.sourceforge.net (Barry Warsaw)
Date: Mon, 24 Dec 2001 12:58:39 -0800
Subject: [Python-checkins] CVS: python/nondist/peps pep-0251.txt,1.9,1.10
Message-ID: 

Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv22299

Modified Files:
	pep-0251.txt 
Log Message:
Update as in the past tense, mark as final.


Index: pep-0251.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0251.txt,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** pep-0251.txt	2001/12/15 03:45:42	1.9
--- pep-0251.txt	2001/12/24 20:58:36	1.10
***************
*** 2,7 ****
  Title: Python 2.2 Release Schedule
  Version: $Revision$
! Author: guido@python.org (Guido van Rossum), barry@zope.com (Barry A. Warsaw)
! Status: Incomplete
  Type: Informational
  Created: 17-Apr-2001
--- 2,7 ----
  Title: Python 2.2 Release Schedule
  Version: $Revision$
! Author: barry@zope.com (Barry A. Warsaw), guido@python.org (Guido van Rossum)
! Status: Final
  Type: Informational
  Created: 17-Apr-2001
***************
*** 11,23 ****
  Abstract
  
!     This document describes the post-Python 2.1 development and
!     release schedule.  The schedule primarily concerns itself with
!     PEP-sized items.  Small bug fixes and changes will occur up until
!     the first beta release.
  
!     NOTE: the schedule below and the list of features under
!     consideration are all subject to change!  If the energy in the
!     community changes or the feedback on a PEP is particularly
!     positive or negative, this may affect decisions.
  
  
--- 11,22 ----
  Abstract
  
!     This document describes the Python 2.2 development and release
!     schedule.  The schedule primarily concerns itself with PEP-sized
!     items.  Small bug fixes and changes will occur up until the first
!     beta release.
  
!     The schedule below represents the actual release dates of Python
!     2.2.  Note that any subsequent maintenance releases of Python 2.2
!     should be covered by separate PEPs.
  
  
***************
*** 27,32 ****
      compared to the schedule posted around the release of 2.2a1.
  
!     21-Dec-2001: 2.2   (final release)
!     14-Dec-2001: 2.2c1 [Released] (release candidate)
      14-Nov-2001: 2.2b2 [Released]
      19-Oct-2001: 2.2b1 [Released]
--- 26,31 ----
      compared to the schedule posted around the release of 2.2a1.
  
!     21-Dec-2001: 2.2   [Released] (final release)
!     14-Dec-2001: 2.2c1 [Released]
      14-Nov-2001: 2.2b2 [Released]
      19-Oct-2001: 2.2b1 [Released]
***************
*** 39,76 ****
  Release Manager
  
!     Barry Warsaw will take over as the release manager.  Guido and
!     Barry will release 2.2a2 together, after that Barry will be
!     responsible for releases.
  
  
  Release Mechanics
  
!     We'd like to experiment with a new mechanism for releases: a week
!     before every alpha, beta or other release, we'll fork off a branch
!     which will become the release; changes to the branch will have to
!     be approved before they can be checked in.  This is how some other
!     large projects (e.g. Mozilla) work, and we hope it will help
!     reduce the number of bugs introduced in releases at the last
!     minute.
  
  
! Planned features for 2.2
  
!     The following features are already checked in on the head revision
!     (for a more detailed account, see Misc/NEWS):
  
      - iterators (PEP 234)
      - generators (PEP 255)
      - division (PEP 238)
      - unification of types and classes (PEP 252, PEP 253)
  
-     Work on the class/type unification is still ongoing.
  
!     The following features are under consideration:
  
!     - unifying long ints and plain ints (PEP 237)
  
!     There needs to be more discussion of each of these before we can
!     decide.
  
  
--- 38,78 ----
  Release Manager
  
!     Barry Warsaw was the Python 2.2 release manager.
  
  
  Release Mechanics
  
!     We experimented with a new mechanism for releases: a week before
!     every alpha, beta or other release, we forked off a branch which
!     became the release.  Changes to the branch are limited to the
!     release manager and his designated 'bots.  This experiment was
!     deemed a success and should be observed for future releases.  See
!     PEP 101 for the actual release mechanics[1].
  
  
! New features for Python 2.2
  
!     The following new features are introduced in Python 2.2.  For a
!     more detailed account, see Misc/NEWS[2] in the Python
!     distribution, or Andrew Kuchling's "What's New in Python 2.2"
!     document[3].
  
      - iterators (PEP 234)
      - generators (PEP 255)
+     - unifying long ints and plain ints (PEP 237)
      - division (PEP 238)
      - unification of types and classes (PEP 252, PEP 253)
  
  
! References
  
!     [1] PEP 101, Doing Python Releases 101
!         http://www.python.org/peps/pep-0101.html
  
!     [2] Misc/NEWS file from CVS
!         http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/python/python/dist/src/Misc/NEWS?rev=1.337.2.4&content-type=text/vnd.viewcvs-markup
! 
!     [3] Andrew Kuchling, What's New in Python 2.2
!         http://www.amk.ca/python/2.2/
  
  



From bwarsaw@users.sourceforge.net  Mon Dec 24 20:59:07 2001
From: bwarsaw@users.sourceforge.net (Barry Warsaw)
Date: Mon, 24 Dec 2001 12:59:07 -0800
Subject: [Python-checkins] CVS: python/nondist/peps pep-0000.txt,1.148,1.149
Message-ID: 

Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv22358

Modified Files:
	pep-0000.txt 
Log Message:
PEP 251 is Final. (Note any future maintenance release of Python 2.2
should have its own PEP.)


Index: pep-0000.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0000.txt,v
retrieving revision 1.148
retrieving revision 1.149
diff -C2 -d -r1.148 -r1.149
*** pep-0000.txt	2001/12/11 23:39:45	1.148
--- pep-0000.txt	2001/12/24 20:59:05	1.149
***************
*** 45,49 ****
   Accepted PEPs (accepted for Python 2.2; may not be implemented yet)
  
-  I   251  Python 2.2 Release Schedule                  van Rossum, Warsaw
   S   252  Making Types Look More Like Classes          van Rossum
   S   253  Subtyping Built-in Types                     van Rossum
--- 45,48 ----
***************
*** 114,117 ****
--- 113,117 ----
   SF  238  Changing the Division Operator               Zadka, van Rossum
   SF  250  Using site-packages on Windows               Moore
+  IF  251  Python 2.2 Release Schedule                  Warsaw, van Rossum
   SF  255  Simple Generators                            Schemenauer, et al
   SF  260  Simplify xrange()                            van Rossum
***************
*** 208,212 ****
   I   249  Python Database API Specification v2.0       Lemburg
   SF  250  Using site-packages on Windows               Moore
!  I   251  Python 2.2 Release Schedule                  van Rossum, Warsaw
   S   252  Making Types Look More Like Classes          van Rossum
   S   253  Subtyping Built-in Types                     van Rossum
--- 208,212 ----
   I   249  Python Database API Specification v2.0       Lemburg
   SF  250  Using site-packages on Windows               Moore
!  IF  251  Python 2.2 Release Schedule                  Warsaw, van Rossum
   S   252  Making Types Look More Like Classes          van Rossum
   S   253  Subtyping Built-in Types                     van Rossum



From tim_one@users.sourceforge.net  Tue Dec 25 18:49:13 2001
From: tim_one@users.sourceforge.net (Tim Peters)
Date: Tue, 25 Dec 2001 10:49:13 -0800
Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.301,2.302
Message-ID: 

Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv9061/python/Python

Modified Files:
	ceval.c 
Log Message:
SF bug #496549 -Qnew and in-place division "/=".

eval_frame():  Under -Qnew, INPLACE_DIVIDE wasn't getting handed off to
INPLACE_TRUE_DIVIDE (like BINARY_DIVIDE was getting handed off to
BINARY_TRUE_DIVIDE).

Bugfix candidate.


Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.301
retrieving revision 2.302
diff -C2 -d -r2.301 -r2.302
*** ceval.c	2001/12/19 04:11:07	2.301
--- ceval.c	2001/12/25 18:49:11	2.302
***************
*** 1092,1098 ****
  
  		case INPLACE_DIVIDE:
  			w = POP();
  			v = POP();
! 			x = PyNumber_InPlaceDivide(v, w);
  			Py_DECREF(v);
  			Py_DECREF(w);
--- 1092,1111 ----
  
  		case INPLACE_DIVIDE:
+ 			if (!_Py_QnewFlag) {
+ 				w = POP();
+ 				v = POP();
+ 				x = PyNumber_InPlaceDivide(v, w);
+ 				Py_DECREF(v);
+ 				Py_DECREF(w);
+ 				PUSH(x);
+ 				if (x != NULL) continue;
+ 				break;
+ 			}
+ 			/* -Qnew is in effect:  fall through to
+ 			   INPLACE_TRUE_DIVIDE */
+ 		case INPLACE_TRUE_DIVIDE:
  			w = POP();
  			v = POP();
! 			x = PyNumber_InPlaceTrueDivide(v, w);
  			Py_DECREF(v);
  			Py_DECREF(w);
***************
*** 1105,1118 ****
  			v = POP();
  			x = PyNumber_InPlaceFloorDivide(v, w);
- 			Py_DECREF(v);
- 			Py_DECREF(w);
- 			PUSH(x);
- 			if (x != NULL) continue;
- 			break;
- 
- 		case INPLACE_TRUE_DIVIDE:
- 			w = POP();
- 			v = POP();
- 			x = PyNumber_InPlaceTrueDivide(v, w);
  			Py_DECREF(v);
  			Py_DECREF(w);
--- 1118,1121 ----



From tim_one@users.sourceforge.net  Tue Dec 25 19:07:40 2001
From: tim_one@users.sourceforge.net (Tim Peters)
Date: Tue, 25 Dec 2001 11:07:40 -0800
Subject: [Python-checkins] CVS: python/dist/src/Include pyport.h,2.40,2.41
Message-ID: 

Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv11271/python/Include

Modified Files:
	pyport.h 
Log Message:
SF bug #495548:  troublesome #define in pyport.h
Removed the ancient "#define ANY void".

Bugfix candidate?  Hard call.  The bug report claims the existence of
this #define creates conflicts with other packages, which is easy to
believe.  OTOH, some extension authors may still be relying on its
presence.  I'm afraid you can't win on this one.


Index: pyport.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pyport.h,v
retrieving revision 2.40
retrieving revision 2.41
diff -C2 -d -r2.40 -r2.41
*** pyport.h	2001/10/27 21:16:16	2.40
--- pyport.h	2001/12/25 19:07:38	2.41
***************
*** 34,38 ****
  
  /* For backward compatibility only. Obsolete, do not use. */
- #define ANY void
  #ifdef HAVE_PROTOTYPES
  #define Py_PROTO(x) x
--- 34,37 ----



From tim_one@users.sourceforge.net  Tue Dec 25 19:07:40 2001
From: tim_one@users.sourceforge.net (Tim Peters)
Date: Tue, 25 Dec 2001 11:07:40 -0800
Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.339,1.340
Message-ID: 

Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv11271/python/Misc

Modified Files:
	NEWS 
Log Message:
SF bug #495548:  troublesome #define in pyport.h
Removed the ancient "#define ANY void".

Bugfix candidate?  Hard call.  The bug report claims the existence of
this #define creates conflicts with other packages, which is easy to
believe.  OTOH, some extension authors may still be relying on its
presence.  I'm afraid you can't win on this one.


Index: NEWS
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v
retrieving revision 1.339
retrieving revision 1.340
diff -C2 -d -r1.339 -r1.340
*** NEWS	2001/12/21 21:36:50	1.339
--- NEWS	2001/12/25 19:07:38	1.340
***************
*** 17,20 ****
--- 17,25 ----
  C API
  
+ - An old #define of ANY as void has been removed from pyport.h.  This
+   hasn't been used since Python's pre-ANSI days, and the #define has
+   been marked as obsolete since then.  SF bug 495548 says it created
+   conflicts with other packages, so keeping it around wasn't harmless.
+ 
  - Because Python's magic number scheme broke on January 1st, we decided
    to stop Python development.  Thanks for all the fish!



From fdrake@users.sourceforge.net  Wed Dec 26 16:53:50 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Wed, 26 Dec 2001 08:53:50 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/api abstract.tex,1.8,1.9
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/api
In directory usw-pr-cvs1:/tmp/cvs-serv31136/api

Modified Files:
	abstract.tex 
Log Message:
Close an improperly-closed verbatim environment.
This closes SF patch #496215.

Add a little more detail to the example that had not been closed.

Bugfix: this should be made part of 2.2.1.


Index: abstract.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/api/abstract.tex,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** abstract.tex	2001/11/28 07:26:14	1.8
--- abstract.tex	2001/12/26 16:53:48	1.9
***************
*** 861,864 ****
--- 861,867 ----
  while (item = PyIter_Next(iter)) {
      /* do something with item */
+     ...
+     /* release reference when done */
+     Py_DECREF(item);
  }
  if (PyErr_Occurred()) {
***************
*** 868,871 ****
--- 871,876 ----
      /* continue doing useful work */
  }
+ \end{verbatim}
+ 
  
  \section{Buffer Protocol \label{abstract-buffer}}
***************
*** 898,902 ****
    buffer interface.  Otherwise returns \code{0}.
    \versionadded{2.2}
! \enc{cfuncdesc}
  
  \begin{cfuncdesc}{int}{PyObject_AsWriteBuffer}{PyObject *obj,
--- 903,907 ----
    buffer interface.  Otherwise returns \code{0}.
    \versionadded{2.2}
! \end{cfuncdesc}
  
  \begin{cfuncdesc}{int}{PyObject_AsWriteBuffer}{PyObject *obj,
***************
*** 910,913 ****
    \versionadded{1.6}
  \end{cfuncdesc}
- 
- \end{verbatim}
--- 915,916 ----



From fdrake@users.sourceforge.net  Wed Dec 26 19:48:45 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Wed, 26 Dec 2001 11:48:45 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libftplib.tex,1.33,1.34 libhttplib.tex,1.29,1.30
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv4303/lib

Modified Files:
	libftplib.tex libhttplib.tex 
Log Message:
More index entries.

Index: libftplib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libftplib.tex,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** libftplib.tex	2001/08/04 22:22:45	1.33
--- libftplib.tex	2001/12/26 19:48:43	1.34
***************
*** 5,12 ****
  \modulesynopsis{FTP protocol client (requires sockets).}
  
  
  This module defines the class \class{FTP} and a few related items.
  The \class{FTP} class implements the client side of the FTP
! protocol.\indexii{FTP}{protocol}  You can use this to write Python
  programs that perform a variety of automated FTP jobs, such as
  mirroring other ftp servers.  It is also used by the module
--- 5,14 ----
  \modulesynopsis{FTP protocol client (requires sockets).}
  
+ \indexii{FTP}{protocol}
+ \index{FTP!\module{ftplib} (standard module)}
  
  This module defines the class \class{FTP} and a few related items.
  The \class{FTP} class implements the client side of the FTP
! protocol.  You can use this to write Python
  programs that perform a variety of automated FTP jobs, such as
  mirroring other ftp servers.  It is also used by the module

Index: libhttplib.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libhttplib.tex,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** libhttplib.tex	2001/12/21 03:52:04	1.29
--- libhttplib.tex	2001/12/26 19:48:43	1.30
***************
*** 6,9 ****
--- 6,10 ----
  
  \indexii{HTTP}{protocol}
+ \index{HTTP!\module{httplib} (standard module)}
  
  This module defines classes which implement the client side of the



From fdrake@users.sourceforge.net  Wed Dec 26 19:55:16 2001
From: fdrake@users.sourceforge.net (Fred L. Drake)
Date: Wed, 26 Dec 2001 11:55:16 -0800
Subject: [Python-checkins] CVS: python/dist/src/Doc/tools buildindex.py,1.11,1.12
Message-ID: 

Update of /cvsroot/python/python/dist/src/Doc/tools
In directory usw-pr-cvs1:/tmp/cvs-serv5350/tools

Modified Files:
	buildindex.py 
Log Message:

Make this do the right thing with entries which start with the percent sign,
in response to Skip's comments in SF bug #487165.

Make use of string methods instead of string module functions in most places.
Add (and make the default) a way to collapse symbol entries into a single
"Symbols" section in the generated index.  This is similar to what makeindex
does, but does not include entries beginning with an underscore.


Index: buildindex.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/buildindex.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** buildindex.py	2000/04/03 04:19:14	1.11
--- buildindex.py	2001/12/26 19:55:14	1.12
***************
*** 9,12 ****
--- 9,16 ----
  
  
+ bang_join = "!".join
+ null_join = "".join
+ 
+ 
  class Node:
      __rmjunk = re.compile("<#\d+#>")
***************
*** 39,51 ****
  
      def __repr__(self):
!         return "" % (string.join(self.text, '!'), self.seqno)
  
      def __str__(self):
!         return string.join(self.key, '!')
  
      def dump(self):
          return "%s\1%s###%s\n" \
                 % (string.join(self.links, "\1"),
!                   string.join(self.text, '!'),
                    self.seqno)
  
--- 43,55 ----
  
      def __repr__(self):
!         return "" % (bang_join(self.text), self.seqno)
  
      def __str__(self):
!         return bang_join(self.key)
  
      def dump(self):
          return "%s\1%s###%s\n" \
                 % (string.join(self.links, "\1"),
!                   bang_join(self.text),
                    self.seqno)
  
***************
*** 55,60 ****
      if result == 0:
          return 0
!     l1 = string.lower(s1)
!     l2 = string.lower(s2)
      minlen = min(len(s1), len(s2))
      if len(s1) < len(s2) and l1 == l2[:len(s1)]:
--- 59,64 ----
      if result == 0:
          return 0
!     l1 = s1.lower()
!     l2 = s2.lower()
      minlen = min(len(s1), len(s2))
      if len(s1) < len(s2) and l1 == l2[:len(s1)]:
***************
*** 69,74 ****
  def split_entry(str, which):
      stuff = []
!     parts = string.split(str, '!')
!     parts = map(string.split, parts, ['@'] * len(parts))
      for entry in parts:
          if len(entry) != 1:
--- 73,78 ----
  def split_entry(str, which):
      stuff = []
!     parts = str.split('!')
!     parts = [part.split('@') for part in parts]
      for entry in parts:
          if len(entry) != 1:
***************
*** 89,95 ****
          m = _rmtt.match(parts[i])
          if m:
!             parts[i] = string.join(m.group(1, 2, 3), '')
          else:
!             parts[i] = string.lower(parts[i])
          # remove '()' from the key:
          parts[i] = _rmparens.sub('', parts[i])
--- 93,99 ----
          m = _rmtt.match(parts[i])
          if m:
!             parts[i] = null_join(m.group(1, 2, 3))
          else:
!             parts[i] = parts[i].lower()
          # remove '()' from the key:
          parts[i] = _rmparens.sub('', parts[i])
***************
*** 101,105 ****
          m = _rmtt.match(str)
          if m:
!             str = string.join(m.group(1, 2, 3), '')
      return split_entry(str, 1)
  
--- 105,109 ----
          m = _rmtt.match(str)
          if m:
!             str = null_join(m.group(1, 2, 3))
      return split_entry(str, 1)
  
***************
*** 122,133 ****
      # ignore $ to keep environment variables with the
      # leading letter from the name
!     s = string.lower(s)
!     if s[0] == "$":
!         return s[1:]
      else:
!         return s
  
  def get_first_letter(s):
!     return string.lower(trim_ignored_letters(s)[0])
  
  
--- 126,139 ----
      # ignore $ to keep environment variables with the
      # leading letter from the name
!     if s.startswith("$"):
!         return s[1:].lower()
      else:
!         return s.lower()
  
  def get_first_letter(s):
!     if s.startswith(""):
!         return "%"
!     else:
!         return trim_ignored_letters(s)[0]
  
  
***************
*** 150,153 ****
--- 156,169 ----
  
  
+ def group_symbols(groups):
+     entries = []
+     ident_letters = string.ascii_letters + "_"
+     while groups[0][0] not in ident_letters:
+         entries += groups[0][1]
+         del groups[0]
+     if entries:
+         groups.insert(0, ("Symbols", entries))
+ 
+ 
  # need a function to separate the nodes into columns...
  def split_columns(nodes, columns=1):
***************
*** 156,161 ****
      # This is a rough height; we may have to increase to avoid breaks before
      # a subitem.
!     colheight = len(nodes) / columns
!     numlong = len(nodes) % columns
      if numlong:
          colheight = colheight + 1
--- 172,177 ----
      # This is a rough height; we may have to increase to avoid breaks before
      # a subitem.
!     colheight = int(len(nodes) / columns)
!     numlong = int(len(nodes) % columns)
      if numlong:
          colheight = colheight + 1
***************
*** 170,174 ****
      colheight = colheight - 1
      try:
!         numshort = len(nodes) / colheight
      except ZeroDivisionError:
          cols = cols + (columns - len(cols)) * [[]]
--- 186,190 ----
      colheight = colheight - 1
      try:
!         numshort = int(len(nodes) / colheight)
      except ZeroDivisionError:
          cols = cols + (columns - len(cols)) * [[]]
***************
*** 236,240 ****
      append("\n")
      append("
" * (level + 1)) ! return string.join(strings, '') --- 252,256 ---- append("\n") append("" * (level + 1)) ! return null_join(strings) *************** *** 244,251 **** if columns > 1: colnos = range(columns) ! colheight = len(nodes) / columns if len(nodes) % columns: colheight = colheight + 1 ! colwidth = 100 / columns append('') for col in split_columns(nodes, columns): --- 260,267 ---- if columns > 1: colnos = range(columns) ! colheight = int(len(nodes) / columns) if len(nodes) % columns: colheight = colheight + 1 ! colwidth = int(100 / columns) append('
') for col in split_columns(nodes, columns): *************** *** 257,261 **** append(format_column(nodes)) append("\n

\n") ! return string.join(strings, '') --- 273,277 ---- append(format_column(nodes)) append("\n

\n") ! return null_join(strings) *************** *** 266,276 **** lettername = "_ (underscore)" else: ! lettername = string.upper(letter) return "\n


\n

%s

\n\n" \ % (letter, lettername) ! def format_html_letters(nodes, columns=1): letter_groups = split_letters(nodes) items = [] for letter, nodes in letter_groups: --- 282,294 ---- lettername = "_ (underscore)" else: ! lettername = letter.capitalize() return "\n
\n

%s

\n\n" \ % (letter, lettername) ! def format_html_letters(nodes, columns, group_symbol_nodes): letter_groups = split_letters(nodes) + if group_symbol_nodes: + group_symbols(letter_groups) items = [] for letter, nodes in letter_groups: *************** *** 281,285 **** s.append(format_letter(letter)) s.append(format_nodes(nodes, columns)) ! return string.join(s, '') def format_html(nodes, columns): --- 299,303 ---- s.append(format_letter(letter)) s.append(format_nodes(nodes, columns)) ! return null_join(s) def format_html(nodes, columns): *************** *** 309,317 **** ! def process_nodes(nodes, columns, letters): nodes.sort() collapse(nodes) if letters: ! return format_html_letters(nodes, columns) else: return format_html(nodes, columns) --- 327,335 ---- ! def process_nodes(nodes, columns, letters=0, group_symbol_nodes=0): nodes.sort() collapse(nodes) if letters: ! return format_html_letters(nodes, columns, group_symbol_nodes) else: return format_html(nodes, columns) *************** *** 324,336 **** columns = 1 letters = 0 opts, args = getopt.getopt(sys.argv[1:], "c:lo:", ! ["columns=", "letters", "output="]) for opt, val in opts: if opt in ("-o", "--output"): ofn = val elif opt in ("-c", "--columns"): ! columns = string.atoi(val) elif opt in ("-l", "--letters"): letters = 1 if not args: args = [ifn] --- 342,360 ---- columns = 1 letters = 0 + group_symbol_nodes = 1 opts, args = getopt.getopt(sys.argv[1:], "c:lo:", ! ["columns=", "dont-group-symbols", ! "group-symbols", "letters", "output="]) for opt, val in opts: if opt in ("-o", "--output"): ofn = val elif opt in ("-c", "--columns"): ! columns = int(val, 10) elif opt in ("-l", "--letters"): letters = 1 + elif opt == "--group-symbols": + group_symbol_nodes = 1 + elif opt == "--dont-group-symbols": + group_symbol_nodes = 0 if not args: args = [ifn] *************** *** 339,343 **** nodes = nodes + load(open(fn)) num_nodes = len(nodes) ! html = process_nodes(nodes, columns, letters) program = os.path.basename(sys.argv[0]) if ofn == "-": --- 363,367 ---- nodes = nodes + load(open(fn)) num_nodes = len(nodes) ! html = process_nodes(nodes, columns, letters, group_symbol_nodes) program = os.path.basename(sys.argv[0]) if ofn == "-": From fdrake@users.sourceforge.net Wed Dec 26 20:06:47 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Wed, 26 Dec 2001 12:06:47 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libstdtypes.tex,1.80,1.81 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv7530/lib Modified Files: libstdtypes.tex Log Message: Added index entries similar to some recommended by Skip, and used the word "interpolation" in the text, to make the string formatting material easier to find. This closes SF bug #487165. Bugfix: this should be applied for Python 2.2.1. Index: libstdtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** libstdtypes.tex 2001/12/10 16:43:08 1.80 --- libstdtypes.tex 2001/12/26 20:06:40 1.81 *************** *** 682,699 **** \index{formatting, string (\%{})} \index{string!formatting} \index{printf-style formatting} \index{sprintf-style formatting} \index{\protect\%{} formatting} String and Unicode objects have one unique built-in operation: the ! \code{\%} operator (modulo). Given \code{\var{format} \% ! \var{values}} (where \var{format} is a string or Unicode object), ! \code{\%} conversion specifications in \var{format} are replaced with ! zero or more elements of \var{values}. The effect is similar to the ! using \cfunction{sprintf()} in the C language. If \var{format} is a ! Unicode object, or if any of the objects being converted using the ! \code{\%s} conversion are Unicode objects, the result will be a ! Unicode object as well. If \var{format} requires a single argument, \var{values} may be a --- 682,703 ---- \index{formatting, string (\%{})} + \index{interpolation, string (\%{})} \index{string!formatting} + \index{string!interpolation} \index{printf-style formatting} \index{sprintf-style formatting} \index{\protect\%{} formatting} + \index{\protect\%{} interpolation} String and Unicode objects have one unique built-in operation: the ! \code{\%} operator (modulo). This is also known as the string ! \emph{formatting} or \emph{interpolation} operator. Given ! \code{\var{format} \% \var{values}} (where \var{format} is a string or ! Unicode object), \code{\%} conversion specifications in \var{format} ! are replaced with zero or more elements of \var{values}. The effect ! is similar to the using \cfunction{sprintf()} in the C language. If ! \var{format} is a Unicode object, or if any of the objects being ! converted using the \code{\%s} conversion are Unicode objects, the ! result will be a Unicode object as well. If \var{format} requires a single argument, \var{values} may be a From fdrake@users.sourceforge.net Wed Dec 26 22:03:16 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Wed, 26 Dec 2001 14:03:16 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcurses.tex,1.31.2.1,1.31.2.2 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv30779/lib Modified Files: Tag: release21-maint libcurses.tex Log Message: Fix wrongly-named formal parameters in three places: begin_y was used twice instead of begin_y and begin_x for derwin(), subpad(), and subwin(). Reported for derwin() by Eric Huss. Added class annotations for the window methods so they would be properly described in the index. Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.31.2.1 retrieving revision 1.31.2.2 diff -C2 -d -r1.31.2.1 -r1.31.2.2 *** libcurses.tex 2001/04/21 05:56:39 1.31.2.1 --- libcurses.tex 2001/12/26 22:03:14 1.31.2.2 *************** *** 542,546 **** following methods: ! \begin{methoddesc}{addch}{\optional{y, x,} ch\optional{, attr}} \strong{Note:} A \emph{character} means a C character (i.e., an \ASCII{} code), rather then a Python character (a string of length 1). --- 542,546 ---- following methods: ! \begin{methoddesc}[window]{addch}{\optional{y, x,} ch\optional{, attr}} \strong{Note:} A \emph{character} means a C character (i.e., an \ASCII{} code), rather then a Python character (a string of length 1). *************** *** 554,558 **** \end{methoddesc} ! \begin{methoddesc}{addnstr}{\optional{y, x,} str, n\optional{, attr}} Paint at most \var{n} characters of the string \var{str} at \code{(\var{y}, \var{x})} with attributes --- 554,558 ---- \end{methoddesc} ! \begin{methoddesc}[window]{addnstr}{\optional{y, x,} str, n\optional{, attr}} Paint at most \var{n} characters of the string \var{str} at \code{(\var{y}, \var{x})} with attributes *************** *** 560,584 **** \end{methoddesc} ! \begin{methoddesc}{addstr}{\optional{y, x,} str\optional{, attr}} Paint the string \var{str} at \code{(\var{y}, \var{x})} with attributes \var{attr}, overwriting anything previously on the display. \end{methoddesc} ! \begin{methoddesc}{attroff}{attr} Remove attribute \var{attr} from the ``background'' set applied to all writes to the current window. \end{methoddesc} ! \begin{methoddesc}{attron}{attr} Add attribute \var{attr} from the ``background'' set applied to all writes to the current window. \end{methoddesc} ! \begin{methoddesc}{attrset}{attr} Set the ``background'' set of attributes to \var{attr}. This set is initially 0 (no attributes). \end{methoddesc} ! \begin{methoddesc}{bkgd}{ch\optional{, attr}} Sets the background property of the window to the character \var{ch}, with attributes \var{attr}. The change is then applied to every --- 560,584 ---- \end{methoddesc} ! \begin{methoddesc}[window]{addstr}{\optional{y, x,} str\optional{, attr}} Paint the string \var{str} at \code{(\var{y}, \var{x})} with attributes \var{attr}, overwriting anything previously on the display. \end{methoddesc} ! \begin{methoddesc}[window]{attroff}{attr} Remove attribute \var{attr} from the ``background'' set applied to all writes to the current window. \end{methoddesc} ! \begin{methoddesc}[window]{attron}{attr} Add attribute \var{attr} from the ``background'' set applied to all writes to the current window. \end{methoddesc} ! \begin{methoddesc}[window]{attrset}{attr} Set the ``background'' set of attributes to \var{attr}. This set is initially 0 (no attributes). \end{methoddesc} ! \begin{methoddesc}[window]{bkgd}{ch\optional{, attr}} Sets the background property of the window to the character \var{ch}, with attributes \var{attr}. The change is then applied to every *************** *** 595,599 **** \end{methoddesc} ! \begin{methoddesc}{bkgdset}{ch\optional{, attr}} Sets the window's background. A window's background consists of a character and any combination of attributes. The attribute part of --- 595,599 ---- \end{methoddesc} ! \begin{methoddesc}[window]{bkgdset}{ch\optional{, attr}} Sets the window's background. A window's background consists of a character and any combination of attributes. The attribute part of *************** *** 606,612 **** \end{methoddesc} ! \begin{methoddesc}{border}{\optional{ls\optional{, rs\optional{, ts\optional{, ! bs\optional{, tl\optional{, tr\optional{, ! bl\optional{, br}}}}}}}}} Draw a border around the edges of the window. Each parameter specifies the character to use for a specific part of the border; see the table --- 606,612 ---- \end{methoddesc} ! \begin{methoddesc}[window]{border}{\optional{ls\optional{, rs\optional{, ! ts\optional{, bs\optional{, tl\optional{, ! tr\optional{, bl\optional{, br}}}}}}}}} Draw a border around the edges of the window. Each parameter specifies the character to use for a specific part of the border; see the table *************** *** 631,635 **** \end{methoddesc} ! \begin{methoddesc}{box}{\optional{vertch, horch}} Similar to \method{border()}, but both \var{ls} and \var{rs} are \var{vertch} and both \var{ts} and {bs} are \var{horch}. The default --- 631,635 ---- \end{methoddesc} ! \begin{methoddesc}[window]{box}{\optional{vertch, horch}} Similar to \method{border()}, but both \var{ls} and \var{rs} are \var{vertch} and both \var{ts} and {bs} are \var{horch}. The default *************** *** 637,674 **** \end{methoddesc} ! \begin{methoddesc}{clear}{} Like \method{erase()}, but also causes the whole window to be repainted upon next call to \method{refresh()}. \end{methoddesc} ! \begin{methoddesc}{clearok}{yes} If \var{yes} is 1, the next call to \method{refresh()} will clear the window completely. \end{methoddesc} ! \begin{methoddesc}{clrtobot}{} Erase from cursor to the end of the window: all lines below the cursor are deleted, and then the equivalent of \method{clrtoeol()} is performed. \end{methoddesc} ! \begin{methoddesc}{clrtoeol}{} Erase from cursor to the end of the line. \end{methoddesc} ! \begin{methoddesc}{cursyncup}{} Updates the current cursor position of all the ancestors of the window to reflect the current cursor position of the window. \end{methoddesc} ! \begin{methoddesc}{delch}{\optional{x, y}} Delete any character at \code{(\var{y}, \var{x})}. \end{methoddesc} ! \begin{methoddesc}{deleteln}{} Delete the line under the cursor. All following lines are moved up by 1 line. \end{methoddesc} ! \begin{methoddesc}{derwin}{\optional{nlines, ncols,} begin_y, begin_y} An abbreviation for ``derive window'', \method{derwin()} is the same as calling \method{subwin()}, except that \var{begin_y} and --- 637,674 ---- \end{methoddesc} ! \begin{methoddesc}[window]{clear}{} Like \method{erase()}, but also causes the whole window to be repainted upon next call to \method{refresh()}. \end{methoddesc} ! \begin{methoddesc}[window]{clearok}{yes} If \var{yes} is 1, the next call to \method{refresh()} will clear the window completely. \end{methoddesc} ! \begin{methoddesc}[window]{clrtobot}{} Erase from cursor to the end of the window: all lines below the cursor are deleted, and then the equivalent of \method{clrtoeol()} is performed. \end{methoddesc} ! \begin{methoddesc}[window]{clrtoeol}{} Erase from cursor to the end of the line. \end{methoddesc} ! \begin{methoddesc}[window]{cursyncup}{} Updates the current cursor position of all the ancestors of the window to reflect the current cursor position of the window. \end{methoddesc} ! \begin{methoddesc}[window]{delch}{\optional{x, y}} Delete any character at \code{(\var{y}, \var{x})}. \end{methoddesc} ! \begin{methoddesc}[window]{deleteln}{} Delete the line under the cursor. All following lines are moved up by 1 line. \end{methoddesc} ! \begin{methoddesc}[window]{derwin}{\optional{nlines, ncols,} begin_y, begin_x} An abbreviation for ``derive window'', \method{derwin()} is the same as calling \method{subwin()}, except that \var{begin_y} and *************** *** 678,687 **** \end{methoddesc} ! \begin{methoddesc}{echochar}{ch\optional{, attr}} Add character \var{ch} with attribute \var{attr}, and immediately call \method{refresh()} on the window. \end{methoddesc} ! \begin{methoddesc}{enclose}{y, x} Tests whether the given pair of screen-relative character-cell coordinates are enclosed by the given window, returning true or --- 678,687 ---- \end{methoddesc} ! \begin{methoddesc}[window]{echochar}{ch\optional{, attr}} Add character \var{ch} with attribute \var{attr}, and immediately call \method{refresh()} on the window. \end{methoddesc} ! \begin{methoddesc}[window]{enclose}{y, x} Tests whether the given pair of screen-relative character-cell coordinates are enclosed by the given window, returning true or *************** *** 690,703 **** \end{methoddesc} ! \begin{methoddesc}{erase}{} Clear the window. \end{methoddesc} ! \begin{methoddesc}{getbegyx}{} Return a tuple \code{(\var{y}, \var{x})} of co-ordinates of upper-left corner. \end{methoddesc} ! \begin{methoddesc}{getch}{\optional{x, y}} Get a character. Note that the integer returned does \emph{not} have to be in \ASCII{} range: function keys, keypad keys and so on return numbers --- 690,703 ---- \end{methoddesc} ! \begin{methoddesc}[window]{erase}{} Clear the window. \end{methoddesc} ! \begin{methoddesc}[window]{getbegyx}{} Return a tuple \code{(\var{y}, \var{x})} of co-ordinates of upper-left corner. \end{methoddesc} ! \begin{methoddesc}[window]{getch}{\optional{x, y}} Get a character. Note that the integer returned does \emph{not} have to be in \ASCII{} range: function keys, keypad keys and so on return numbers *************** *** 706,710 **** \end{methoddesc} ! \begin{methoddesc}{getkey}{\optional{x, y}} Get a character, returning a string instead of an integer, as \method{getch()} does. Function keys, keypad keys and so on return a --- 706,710 ---- \end{methoddesc} ! \begin{methoddesc}[window]{getkey}{\optional{x, y}} Get a character, returning a string instead of an integer, as \method{getch()} does. Function keys, keypad keys and so on return a *************** *** 713,722 **** \end{methoddesc} ! \begin{methoddesc}{getmaxyx}{} Return a tuple \code{(\var{y}, \var{x})} of the height and width of the window. \end{methoddesc} ! \begin{methoddesc}{getparyx}{} Returns the beginning coordinates of this window relative to its parent window into two integer variables y and x. Returns --- 713,722 ---- \end{methoddesc} ! \begin{methoddesc}[window]{getmaxyx}{} Return a tuple \code{(\var{y}, \var{x})} of the height and width of the window. \end{methoddesc} ! \begin{methoddesc}[window]{getparyx}{} Returns the beginning coordinates of this window relative to its parent window into two integer variables y and x. Returns *************** *** 724,742 **** \end{methoddesc} ! \begin{methoddesc}{getstr}{\optional{x, y}} Read a string from the user, with primitive line editing capacity. \end{methoddesc} ! \begin{methoddesc}{getyx}{} Return a tuple \code{(\var{y}, \var{x})} of current cursor position relative to the window's upper-left corner. \end{methoddesc} ! \begin{methoddesc}{hline}{\optional{y, x,} ch, n} Display a horizontal line starting at \code{(\var{y}, \var{x})} with length \var{n} consisting of the character \var{ch}. \end{methoddesc} ! \begin{methoddesc}{idcok}{flag} If \var{flag} is false, curses no longer considers using the hardware insert/delete character feature of the terminal; if \var{flag} is --- 724,742 ---- \end{methoddesc} ! \begin{methoddesc}[window]{getstr}{\optional{x, y}} Read a string from the user, with primitive line editing capacity. \end{methoddesc} ! \begin{methoddesc}[window]{getyx}{} Return a tuple \code{(\var{y}, \var{x})} of current cursor position relative to the window's upper-left corner. \end{methoddesc} ! \begin{methoddesc}[window]{hline}{\optional{y, x,} ch, n} Display a horizontal line starting at \code{(\var{y}, \var{x})} with length \var{n} consisting of the character \var{ch}. \end{methoddesc} ! \begin{methoddesc}[window]{idcok}{flag} If \var{flag} is false, curses no longer considers using the hardware insert/delete character feature of the terminal; if \var{flag} is *************** *** 746,750 **** \end{methoddesc} ! \begin{methoddesc}{idlok}{yes} If called with \var{yes} equal to 1, \module{curses} will try and use hardware line editing facilities. Otherwise, line insertion/deletion --- 746,750 ---- \end{methoddesc} ! \begin{methoddesc}[window]{idlok}{yes} If called with \var{yes} equal to 1, \module{curses} will try and use hardware line editing facilities. Otherwise, line insertion/deletion *************** *** 752,756 **** \end{methoddesc} ! \begin{methoddesc}{immedok}{flag} If \var{flag} is true, any change in the window image automatically causes the window to be refreshed; you no longer --- 752,756 ---- \end{methoddesc} ! \begin{methoddesc}[window]{immedok}{flag} If \var{flag} is true, any change in the window image automatically causes the window to be refreshed; you no longer *************** *** 760,769 **** \end{methoddesc} ! \begin{methoddesc}{inch}{\optional{x, y}} Return the character at the given position in the window. The bottom 8 bits are the character proper, and upper bits are the attributes. \end{methoddesc} ! \begin{methoddesc}{insch}{\optional{y, x,} ch\optional{, attr}} Paint character \var{ch} at \code{(\var{y}, \var{x})} with attributes \var{attr}, moving the line from position \var{x} right by one --- 760,769 ---- \end{methoddesc} ! \begin{methoddesc}[window]{inch}{\optional{x, y}} Return the character at the given position in the window. The bottom 8 bits are the character proper, and upper bits are the attributes. \end{methoddesc} ! \begin{methoddesc}[window]{insch}{\optional{y, x,} ch\optional{, attr}} Paint character \var{ch} at \code{(\var{y}, \var{x})} with attributes \var{attr}, moving the line from position \var{x} right by one *************** *** 771,775 **** \end{methoddesc} ! \begin{methoddesc}{insdelln}{nlines} Inserts \var{nlines} lines into the specified window above the current line. The \var{nlines} bottom lines are lost. For negative --- 771,775 ---- \end{methoddesc} ! \begin{methoddesc}[window]{insdelln}{nlines} Inserts \var{nlines} lines into the specified window above the current line. The \var{nlines} bottom lines are lost. For negative *************** *** 779,788 **** \end{methoddesc} ! \begin{methoddesc}{insertln}{} Insert a blank line under the cursor. All following lines are moved down by 1 line. \end{methoddesc} ! \begin{methoddesc}{insnstr}{\optional{y, x, } str, n \optional{, attr}} Insert a character string (as many characters as will fit on the line) before the character under the cursor, up to \var{n} characters. --- 779,788 ---- \end{methoddesc} ! \begin{methoddesc}[window]{insertln}{} Insert a blank line under the cursor. All following lines are moved down by 1 line. \end{methoddesc} ! \begin{methoddesc}[window]{insnstr}{\optional{y, x,} str, n \optional{, attr}} Insert a character string (as many characters as will fit on the line) before the character under the cursor, up to \var{n} characters. *************** *** 795,799 **** \end{methoddesc} ! \begin{methoddesc}{insstr}{\optional{y, x, } str \optional{, attr}} Insert a character string (as many characters as will fit on the line) before the character under the cursor. All characters to the right of --- 795,799 ---- \end{methoddesc} ! \begin{methoddesc}[window]{insstr}{\optional{y, x, } str \optional{, attr}} Insert a character string (as many characters as will fit on the line) before the character under the cursor. All characters to the right of *************** *** 803,807 **** \end{methoddesc} ! \begin{methoddesc}{instr}{\optional{y, x} \optional{, n}} Returns a string of characters, extracted from the window starting at the current cursor position, or at \var{y}, \var{x} if specified. --- 803,807 ---- \end{methoddesc} ! \begin{methoddesc}[window]{instr}{\optional{y, x} \optional{, n}} Returns a string of characters, extracted from the window starting at the current cursor position, or at \var{y}, \var{x} if specified. *************** *** 811,815 **** \end{methoddesc} ! \begin{methoddesc}{is_linetouched}{\var{line}} Returns true if the specified line was modified since the last call to \method{refresh()}; otherwise returns false. Raises a --- 811,815 ---- \end{methoddesc} ! \begin{methoddesc}[window]{is_linetouched}{\var{line}} Returns true if the specified line was modified since the last call to \method{refresh()}; otherwise returns false. Raises a *************** *** 818,827 **** \end{methoddesc} ! \begin{methoddesc}{is_wintouched}{} Returns true if the specified window was modified since the last call to \method{refresh()}; otherwise returns false. \end{methoddesc} ! \begin{methoddesc}{keypad}{yes} If \var{yes} is 1, escape sequences generated by some keys (keypad, function keys) will be interpreted by \module{curses}. --- 818,827 ---- \end{methoddesc} ! \begin{methoddesc}[window]{is_wintouched}{} Returns true if the specified window was modified since the last call to \method{refresh()}; otherwise returns false. \end{methoddesc} ! \begin{methoddesc}[window]{keypad}{yes} If \var{yes} is 1, escape sequences generated by some keys (keypad, function keys) will be interpreted by \module{curses}. *************** *** 830,834 **** \end{methoddesc} ! \begin{methoddesc}{leaveok}{yes} If \var{yes} is 1, cursor is left where it is on update, instead of being at ``cursor position.'' This reduces cursor movement where --- 830,834 ---- \end{methoddesc} ! \begin{methoddesc}[window]{leaveok}{yes} If \var{yes} is 1, cursor is left where it is on update, instead of being at ``cursor position.'' This reduces cursor movement where *************** *** 839,847 **** \end{methoddesc} ! \begin{methoddesc}{move}{new_y, new_x} Move cursor to \code{(\var{new_y}, \var{new_x})}. \end{methoddesc} ! \begin{methoddesc}{mvderwin}{y, x} Moves the window inside its parent window. The screen-relative parameters of the window are not changed. This routine is used to --- 839,847 ---- \end{methoddesc} ! \begin{methoddesc}[window]{move}{new_y, new_x} Move cursor to \code{(\var{new_y}, \var{new_x})}. \end{methoddesc} ! \begin{methoddesc}[window]{mvderwin}{y, x} Moves the window inside its parent window. The screen-relative parameters of the window are not changed. This routine is used to *************** *** 850,863 **** \end{methoddesc} ! \begin{methoddesc}{mvwin}{new_y, new_x} Move the window so its upper-left corner is at \code{(\var{new_y}, \var{new_x})}. \end{methoddesc} ! \begin{methoddesc}{nodelay}{yes} If \var{yes} is \code{1}, \method{getch()} will be non-blocking. \end{methoddesc} ! \begin{methoddesc}{notimeout}{yes} If \var{yes} is \code{1}, escape sequences will not be timed out. --- 850,863 ---- \end{methoddesc} ! \begin{methoddesc}[window]{mvwin}{new_y, new_x} Move the window so its upper-left corner is at \code{(\var{new_y}, \var{new_x})}. \end{methoddesc} ! \begin{methoddesc}[window]{nodelay}{yes} If \var{yes} is \code{1}, \method{getch()} will be non-blocking. \end{methoddesc} ! \begin{methoddesc}[window]{notimeout}{yes} If \var{yes} is \code{1}, escape sequences will not be timed out. *************** *** 866,870 **** \end{methoddesc} ! \begin{methoddesc}{noutrefresh}{} Mark for refresh but wait. This function updates the data structure representing the desired state of the window, but does not force --- 866,870 ---- \end{methoddesc} ! \begin{methoddesc}[window]{noutrefresh}{} Mark for refresh but wait. This function updates the data structure representing the desired state of the window, but does not force *************** *** 873,878 **** \end{methoddesc} ! \begin{methoddesc}{overlay}{destwin\optional{, sminrow, smincol, ! dminrow, dmincol, dmaxrow, dmaxcol}} Overlay the window on top of \var{destwin}. The windows need not be the same size, only the overlapping region is copied. This copy is --- 873,878 ---- \end{methoddesc} ! \begin{methoddesc}[window]{overlay}{destwin\optional{, sminrow, smincol, ! dminrow, dmincol, dmaxrow, dmaxcol}} Overlay the window on top of \var{destwin}. The windows need not be the same size, only the overlapping region is copied. This copy is *************** *** 886,891 **** \end{methoddesc} ! \begin{methoddesc}{overwrite}{destwin\optional{, sminrow, smincol, ! dminrow, dmincol, dmaxrow, dmaxcol}} Overwrite the window on top of \var{destwin}. The windows need not be the same size, in which case only the overlapping region is --- 886,891 ---- \end{methoddesc} ! \begin{methoddesc}[window]{overwrite}{destwin\optional{, sminrow, smincol, ! dminrow, dmincol, dmaxrow, dmaxcol}} Overwrite the window on top of \var{destwin}. The windows need not be the same size, in which case only the overlapping region is *************** *** 899,910 **** \end{methoddesc} ! \begin{methoddesc}{putwin}{file} Writes all data associated with the window into the provided file object. This information can be later retrieved using the \function{getwin()} function. - \end{methoddesc} ! \begin{methoddesc}{redrawln}{beg, num} Indicates that the \var{num} screen lines, starting at line \var{beg}, are corrupted and should be completely redrawn on the next --- 899,909 ---- \end{methoddesc} ! \begin{methoddesc}[window]{putwin}{file} Writes all data associated with the window into the provided file object. This information can be later retrieved using the \function{getwin()} function. \end{methoddesc} ! \begin{methoddesc}[window]{redrawln}{beg, num} Indicates that the \var{num} screen lines, starting at line \var{beg}, are corrupted and should be completely redrawn on the next *************** *** 912,922 **** \end{methoddesc} ! \begin{methoddesc}{redrawwin}{} Touches the entire window, causing it to be completely redrawn on the next \method{refresh()} call. \end{methoddesc} ! \begin{methoddesc}{refresh}{\optional{pminrow, pmincol, sminrow, ! smincol, smaxrow, smaxcol}} Update the display immediately (sync actual screen with previous drawing/deleting methods). --- 911,921 ---- \end{methoddesc} ! \begin{methoddesc}[window]{redrawwin}{} Touches the entire window, causing it to be completely redrawn on the next \method{refresh()} call. \end{methoddesc} ! \begin{methoddesc}[window]{refresh}{\optional{pminrow, pmincol, sminrow, ! smincol, smaxrow, smaxcol}} Update the display immediately (sync actual screen with previous drawing/deleting methods). *************** *** 936,944 **** \end{methoddesc} ! \begin{methoddesc}{scroll}{\optional{lines\code{ = 1}}} Scroll the screen or scrolling region upward by \var{lines} lines. \end{methoddesc} ! \begin{methoddesc}{scrollok}{flag} Controls what happens when the cursor of a window is moved off the edge of the window or scrolling region, either as a result of a --- 935,943 ---- \end{methoddesc} ! \begin{methoddesc}[window]{scroll}{\optional{lines\code{ = 1}}} Scroll the screen or scrolling region upward by \var{lines} lines. \end{methoddesc} ! \begin{methoddesc}[window]{scrollok}{flag} Controls what happens when the cursor of a window is moved off the edge of the window or scrolling region, either as a result of a *************** *** 951,969 **** \end{methoddesc} ! \begin{methoddesc}{setscrreg}{top, bottom} Set the scrolling region from line \var{top} to line \var{bottom}. All scrolling actions will take place in this region. \end{methoddesc} ! \begin{methoddesc}{standend}{} Turn off the standout attribute. On some terminals this has the side effect of turning off all attributes. \end{methoddesc} ! \begin{methoddesc}{standout}{} Turn on attribute \var{A_STANDOUT}. \end{methoddesc} ! \begin{methoddesc}{subpad}{\optional{nlines, ncols,} begin_y, begin_y} Return a sub-window, whose upper-left corner is at \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is --- 950,968 ---- \end{methoddesc} ! \begin{methoddesc}[window]{setscrreg}{top, bottom} Set the scrolling region from line \var{top} to line \var{bottom}. All scrolling actions will take place in this region. \end{methoddesc} ! \begin{methoddesc}[window]{standend}{} Turn off the standout attribute. On some terminals this has the side effect of turning off all attributes. \end{methoddesc} ! \begin{methoddesc}[window]{standout}{} Turn on attribute \var{A_STANDOUT}. \end{methoddesc} ! \begin{methoddesc}[window]{subpad}{\optional{nlines, ncols,} begin_y, begin_x} Return a sub-window, whose upper-left corner is at \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is *************** *** 971,975 **** \end{methoddesc} ! \begin{methoddesc}{subwin}{\optional{nlines, ncols,} begin_y, begin_y} Return a sub-window, whose upper-left corner is at \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is --- 970,974 ---- \end{methoddesc} ! \begin{methoddesc}[window]{subwin}{\optional{nlines, ncols,} begin_y, begin_x} Return a sub-window, whose upper-left corner is at \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is *************** *** 980,984 **** \end{methoddesc} ! \begin{methoddesc}{syncdown}{} Touches each location in the window that has been touched in any of its ancestor windows. This routine is called by \method{refresh()}, --- 979,983 ---- \end{methoddesc} ! \begin{methoddesc}[window]{syncdown}{} Touches each location in the window that has been touched in any of its ancestor windows. This routine is called by \method{refresh()}, *************** *** 986,1000 **** \end{methoddesc} ! \begin{methoddesc}{syncok}{flag} If called with \var{flag} set to true, then \method{syncup()} is called automatically whenever there is a change in the window. \end{methoddesc} ! \begin{methoddesc}{syncup}{} Touches all locations in ancestors of the window that have been changed in the window. \end{methoddesc} ! \begin{methoddesc}{timeout}{delay} Sets blocking or non-blocking read behavior for the window. If \var{delay} is negative, blocking read is used, which will wait --- 985,999 ---- \end{methoddesc} ! \begin{methoddesc}[window]{syncok}{flag} If called with \var{flag} set to true, then \method{syncup()} is called automatically whenever there is a change in the window. \end{methoddesc} ! \begin{methoddesc}[window]{syncup}{} Touches all locations in ancestors of the window that have been changed in the window. \end{methoddesc} ! \begin{methoddesc}[window]{timeout}{delay} Sets blocking or non-blocking read behavior for the window. If \var{delay} is negative, blocking read is used, which will wait *************** *** 1006,1025 **** \end{methoddesc} ! \begin{methoddesc}{touchline}{start, count} Pretend \var{count} lines have been changed, starting with line \var{start}. \end{methoddesc} ! \begin{methoddesc}{touchwin}{} Pretend the whole window has been changed, for purposes of drawing optimizations. \end{methoddesc} ! \begin{methoddesc}{untouchwin}{} Marks all lines in the window as unchanged since the last call to \method{refresh()}. \end{methoddesc} ! \begin{methoddesc}{vline}{\optional{y, x,} ch, n} Display a vertical line starting at \code{(\var{y}, \var{x})} with length \var{n} consisting of the character \var{ch}. --- 1005,1024 ---- \end{methoddesc} ! \begin{methoddesc}[window]{touchline}{start, count} Pretend \var{count} lines have been changed, starting with line \var{start}. \end{methoddesc} ! \begin{methoddesc}[window]{touchwin}{} Pretend the whole window has been changed, for purposes of drawing optimizations. \end{methoddesc} ! \begin{methoddesc}[window]{untouchwin}{} Marks all lines in the window as unchanged since the last call to \method{refresh()}. \end{methoddesc} ! \begin{methoddesc}[window]{vline}{\optional{y, x,} ch, n} Display a vertical line starting at \code{(\var{y}, \var{x})} with length \var{n} consisting of the character \var{ch}. From fdrake@users.sourceforge.net Wed Dec 26 22:03:43 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Wed, 26 Dec 2001 14:03:43 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc ACKS,1.16.4.5,1.16.4.6 Message-ID: Update of /cvsroot/python/python/dist/src/Doc In directory usw-pr-cvs1:/tmp/cvs-serv30875 Modified Files: Tag: release21-maint ACKS Log Message: Added another name. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.16.4.5 retrieving revision 1.16.4.6 diff -C2 -d -r1.16.4.5 -r1.16.4.6 *** ACKS 2001/07/12 14:59:49 1.16.4.5 --- ACKS 2001/12/26 22:03:41 1.16.4.6 *************** *** 74,77 **** --- 74,78 ---- Randall Hopper Michael Hudson + Eric Huss Jeremy Hylton Roger Irwin From fdrake@users.sourceforge.net Wed Dec 26 22:08:37 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Wed, 26 Dec 2001 14:08:37 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc ACKS,1.33,1.34 Message-ID: Update of /cvsroot/python/python/dist/src/Doc In directory usw-pr-cvs1:/tmp/cvs-serv31675 Modified Files: ACKS Log Message: Added another name. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** ACKS 2001/12/07 18:27:38 1.33 --- ACKS 2001/12/26 22:08:35 1.34 *************** *** 86,89 **** --- 86,90 ---- Randall Hopper Michael Hudson + Eric Huss Jeremy Hylton Roger Irwin From fdrake@users.sourceforge.net Wed Dec 26 22:08:46 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Wed, 26 Dec 2001 14:08:46 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcurses.tex,1.37,1.38 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv31701/lib Modified Files: libcurses.tex Log Message: Fix wrongly-named formal parameters in three places: begin_y was used twice instead of begin_y and begin_x for derwin(), subpad(), and subwin(). Reported for derwin() by Eric Huss. Added class annotations for the window methods so they would be properly described in the index. Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** libcurses.tex 2001/11/28 07:26:15 1.37 --- libcurses.tex 2001/12/26 22:08:44 1.38 *************** *** 542,546 **** following methods: ! \begin{methoddesc}{addch}{\optional{y, x,} ch\optional{, attr}} \note{A \emph{character} means a C character (an \ASCII{} code), rather then a Python character (a string of length 1). --- 542,546 ---- following methods: ! \begin{methoddesc}[window]{addch}{\optional{y, x,} ch\optional{, attr}} \note{A \emph{character} means a C character (an \ASCII{} code), rather then a Python character (a string of length 1). *************** *** 554,558 **** \end{methoddesc} ! \begin{methoddesc}{addnstr}{\optional{y, x,} str, n\optional{, attr}} Paint at most \var{n} characters of the string \var{str} at \code{(\var{y}, \var{x})} with attributes --- 554,558 ---- \end{methoddesc} ! \begin{methoddesc}[window]{addnstr}{\optional{y, x,} str, n\optional{, attr}} Paint at most \var{n} characters of the string \var{str} at \code{(\var{y}, \var{x})} with attributes *************** *** 560,584 **** \end{methoddesc} ! \begin{methoddesc}{addstr}{\optional{y, x,} str\optional{, attr}} Paint the string \var{str} at \code{(\var{y}, \var{x})} with attributes \var{attr}, overwriting anything previously on the display. \end{methoddesc} ! \begin{methoddesc}{attroff}{attr} Remove attribute \var{attr} from the ``background'' set applied to all writes to the current window. \end{methoddesc} ! \begin{methoddesc}{attron}{attr} Add attribute \var{attr} from the ``background'' set applied to all writes to the current window. \end{methoddesc} ! \begin{methoddesc}{attrset}{attr} Set the ``background'' set of attributes to \var{attr}. This set is initially 0 (no attributes). \end{methoddesc} ! \begin{methoddesc}{bkgd}{ch\optional{, attr}} Sets the background property of the window to the character \var{ch}, with attributes \var{attr}. The change is then applied to every --- 560,584 ---- \end{methoddesc} ! \begin{methoddesc}[window]{addstr}{\optional{y, x,} str\optional{, attr}} Paint the string \var{str} at \code{(\var{y}, \var{x})} with attributes \var{attr}, overwriting anything previously on the display. \end{methoddesc} ! \begin{methoddesc}[window]{attroff}{attr} Remove attribute \var{attr} from the ``background'' set applied to all writes to the current window. \end{methoddesc} ! \begin{methoddesc}[window]{attron}{attr} Add attribute \var{attr} from the ``background'' set applied to all writes to the current window. \end{methoddesc} ! \begin{methoddesc}[window]{attrset}{attr} Set the ``background'' set of attributes to \var{attr}. This set is initially 0 (no attributes). \end{methoddesc} ! \begin{methoddesc}[window]{bkgd}{ch\optional{, attr}} Sets the background property of the window to the character \var{ch}, with attributes \var{attr}. The change is then applied to every *************** *** 595,599 **** \end{methoddesc} ! \begin{methoddesc}{bkgdset}{ch\optional{, attr}} Sets the window's background. A window's background consists of a character and any combination of attributes. The attribute part of --- 595,599 ---- \end{methoddesc} ! \begin{methoddesc}[window]{bkgdset}{ch\optional{, attr}} Sets the window's background. A window's background consists of a character and any combination of attributes. The attribute part of *************** *** 606,612 **** \end{methoddesc} ! \begin{methoddesc}{border}{\optional{ls\optional{, rs\optional{, ts\optional{, ! bs\optional{, tl\optional{, tr\optional{, ! bl\optional{, br}}}}}}}}} Draw a border around the edges of the window. Each parameter specifies the character to use for a specific part of the border; see the table --- 606,612 ---- \end{methoddesc} ! \begin{methoddesc}[window]{border}{\optional{ls\optional{, rs\optional{, ! ts\optional{, bs\optional{, tl\optional{, ! tr\optional{, bl\optional{, br}}}}}}}}} Draw a border around the edges of the window. Each parameter specifies the character to use for a specific part of the border; see the table *************** *** 630,634 **** \end{methoddesc} ! \begin{methoddesc}{box}{\optional{vertch, horch}} Similar to \method{border()}, but both \var{ls} and \var{rs} are \var{vertch} and both \var{ts} and {bs} are \var{horch}. The default --- 630,634 ---- \end{methoddesc} ! \begin{methoddesc}[window]{box}{\optional{vertch, horch}} Similar to \method{border()}, but both \var{ls} and \var{rs} are \var{vertch} and both \var{ts} and {bs} are \var{horch}. The default *************** *** 636,673 **** \end{methoddesc} ! \begin{methoddesc}{clear}{} Like \method{erase()}, but also causes the whole window to be repainted upon next call to \method{refresh()}. \end{methoddesc} ! \begin{methoddesc}{clearok}{yes} If \var{yes} is 1, the next call to \method{refresh()} will clear the window completely. \end{methoddesc} ! \begin{methoddesc}{clrtobot}{} Erase from cursor to the end of the window: all lines below the cursor are deleted, and then the equivalent of \method{clrtoeol()} is performed. \end{methoddesc} ! \begin{methoddesc}{clrtoeol}{} Erase from cursor to the end of the line. \end{methoddesc} ! \begin{methoddesc}{cursyncup}{} Updates the current cursor position of all the ancestors of the window to reflect the current cursor position of the window. \end{methoddesc} ! \begin{methoddesc}{delch}{\optional{x, y}} Delete any character at \code{(\var{y}, \var{x})}. \end{methoddesc} ! \begin{methoddesc}{deleteln}{} Delete the line under the cursor. All following lines are moved up by 1 line. \end{methoddesc} ! \begin{methoddesc}{derwin}{\optional{nlines, ncols,} begin_y, begin_y} An abbreviation for ``derive window'', \method{derwin()} is the same as calling \method{subwin()}, except that \var{begin_y} and --- 636,673 ---- \end{methoddesc} ! \begin{methoddesc}[window]{clear}{} Like \method{erase()}, but also causes the whole window to be repainted upon next call to \method{refresh()}. \end{methoddesc} ! \begin{methoddesc}[window]{clearok}{yes} If \var{yes} is 1, the next call to \method{refresh()} will clear the window completely. \end{methoddesc} ! \begin{methoddesc}[window]{clrtobot}{} Erase from cursor to the end of the window: all lines below the cursor are deleted, and then the equivalent of \method{clrtoeol()} is performed. \end{methoddesc} ! \begin{methoddesc}[window]{clrtoeol}{} Erase from cursor to the end of the line. \end{methoddesc} ! \begin{methoddesc}[window]{cursyncup}{} Updates the current cursor position of all the ancestors of the window to reflect the current cursor position of the window. \end{methoddesc} ! \begin{methoddesc}[window]{delch}{\optional{x, y}} Delete any character at \code{(\var{y}, \var{x})}. \end{methoddesc} ! \begin{methoddesc}[window]{deleteln}{} Delete the line under the cursor. All following lines are moved up by 1 line. \end{methoddesc} ! \begin{methoddesc}[window]{derwin}{\optional{nlines, ncols,} begin_y, begin_x} An abbreviation for ``derive window'', \method{derwin()} is the same as calling \method{subwin()}, except that \var{begin_y} and *************** *** 677,686 **** \end{methoddesc} ! \begin{methoddesc}{echochar}{ch\optional{, attr}} Add character \var{ch} with attribute \var{attr}, and immediately call \method{refresh()} on the window. \end{methoddesc} ! \begin{methoddesc}{enclose}{y, x} Tests whether the given pair of screen-relative character-cell coordinates are enclosed by the given window, returning true or --- 677,686 ---- \end{methoddesc} ! \begin{methoddesc}[window]{echochar}{ch\optional{, attr}} Add character \var{ch} with attribute \var{attr}, and immediately call \method{refresh()} on the window. \end{methoddesc} ! \begin{methoddesc}[window]{enclose}{y, x} Tests whether the given pair of screen-relative character-cell coordinates are enclosed by the given window, returning true or *************** *** 689,702 **** \end{methoddesc} ! \begin{methoddesc}{erase}{} Clear the window. \end{methoddesc} ! \begin{methoddesc}{getbegyx}{} Return a tuple \code{(\var{y}, \var{x})} of co-ordinates of upper-left corner. \end{methoddesc} ! \begin{methoddesc}{getch}{\optional{x, y}} Get a character. Note that the integer returned does \emph{not} have to be in \ASCII{} range: function keys, keypad keys and so on return numbers --- 689,702 ---- \end{methoddesc} ! \begin{methoddesc}[window]{erase}{} Clear the window. \end{methoddesc} ! \begin{methoddesc}[window]{getbegyx}{} Return a tuple \code{(\var{y}, \var{x})} of co-ordinates of upper-left corner. \end{methoddesc} ! \begin{methoddesc}[window]{getch}{\optional{x, y}} Get a character. Note that the integer returned does \emph{not} have to be in \ASCII{} range: function keys, keypad keys and so on return numbers *************** *** 705,709 **** \end{methoddesc} ! \begin{methoddesc}{getkey}{\optional{x, y}} Get a character, returning a string instead of an integer, as \method{getch()} does. Function keys, keypad keys and so on return a --- 705,709 ---- \end{methoddesc} ! \begin{methoddesc}[window]{getkey}{\optional{x, y}} Get a character, returning a string instead of an integer, as \method{getch()} does. Function keys, keypad keys and so on return a *************** *** 712,721 **** \end{methoddesc} ! \begin{methoddesc}{getmaxyx}{} Return a tuple \code{(\var{y}, \var{x})} of the height and width of the window. \end{methoddesc} ! \begin{methoddesc}{getparyx}{} Returns the beginning coordinates of this window relative to its parent window into two integer variables y and x. Returns --- 712,721 ---- \end{methoddesc} ! \begin{methoddesc}[window]{getmaxyx}{} Return a tuple \code{(\var{y}, \var{x})} of the height and width of the window. \end{methoddesc} ! \begin{methoddesc}[window]{getparyx}{} Returns the beginning coordinates of this window relative to its parent window into two integer variables y and x. Returns *************** *** 723,741 **** \end{methoddesc} ! \begin{methoddesc}{getstr}{\optional{x, y}} Read a string from the user, with primitive line editing capacity. \end{methoddesc} ! \begin{methoddesc}{getyx}{} Return a tuple \code{(\var{y}, \var{x})} of current cursor position relative to the window's upper-left corner. \end{methoddesc} ! \begin{methoddesc}{hline}{\optional{y, x,} ch, n} Display a horizontal line starting at \code{(\var{y}, \var{x})} with length \var{n} consisting of the character \var{ch}. \end{methoddesc} ! \begin{methoddesc}{idcok}{flag} If \var{flag} is false, curses no longer considers using the hardware insert/delete character feature of the terminal; if \var{flag} is --- 723,741 ---- \end{methoddesc} ! \begin{methoddesc}[window]{getstr}{\optional{x, y}} Read a string from the user, with primitive line editing capacity. \end{methoddesc} ! \begin{methoddesc}[window]{getyx}{} Return a tuple \code{(\var{y}, \var{x})} of current cursor position relative to the window's upper-left corner. \end{methoddesc} ! \begin{methoddesc}[window]{hline}{\optional{y, x,} ch, n} Display a horizontal line starting at \code{(\var{y}, \var{x})} with length \var{n} consisting of the character \var{ch}. \end{methoddesc} ! \begin{methoddesc}[window]{idcok}{flag} If \var{flag} is false, curses no longer considers using the hardware insert/delete character feature of the terminal; if \var{flag} is *************** *** 745,749 **** \end{methoddesc} ! \begin{methoddesc}{idlok}{yes} If called with \var{yes} equal to 1, \module{curses} will try and use hardware line editing facilities. Otherwise, line insertion/deletion --- 745,749 ---- \end{methoddesc} ! \begin{methoddesc}[window]{idlok}{yes} If called with \var{yes} equal to 1, \module{curses} will try and use hardware line editing facilities. Otherwise, line insertion/deletion *************** *** 751,755 **** \end{methoddesc} ! \begin{methoddesc}{immedok}{flag} If \var{flag} is true, any change in the window image automatically causes the window to be refreshed; you no longer --- 751,755 ---- \end{methoddesc} ! \begin{methoddesc}[window]{immedok}{flag} If \var{flag} is true, any change in the window image automatically causes the window to be refreshed; you no longer *************** *** 759,768 **** \end{methoddesc} ! \begin{methoddesc}{inch}{\optional{x, y}} Return the character at the given position in the window. The bottom 8 bits are the character proper, and upper bits are the attributes. \end{methoddesc} ! \begin{methoddesc}{insch}{\optional{y, x,} ch\optional{, attr}} Paint character \var{ch} at \code{(\var{y}, \var{x})} with attributes \var{attr}, moving the line from position \var{x} right by one --- 759,768 ---- \end{methoddesc} ! \begin{methoddesc}[window]{inch}{\optional{x, y}} Return the character at the given position in the window. The bottom 8 bits are the character proper, and upper bits are the attributes. \end{methoddesc} ! \begin{methoddesc}[window]{insch}{\optional{y, x,} ch\optional{, attr}} Paint character \var{ch} at \code{(\var{y}, \var{x})} with attributes \var{attr}, moving the line from position \var{x} right by one *************** *** 770,774 **** \end{methoddesc} ! \begin{methoddesc}{insdelln}{nlines} Inserts \var{nlines} lines into the specified window above the current line. The \var{nlines} bottom lines are lost. For negative --- 770,774 ---- \end{methoddesc} ! \begin{methoddesc}[window]{insdelln}{nlines} Inserts \var{nlines} lines into the specified window above the current line. The \var{nlines} bottom lines are lost. For negative *************** *** 778,787 **** \end{methoddesc} ! \begin{methoddesc}{insertln}{} Insert a blank line under the cursor. All following lines are moved down by 1 line. \end{methoddesc} ! \begin{methoddesc}{insnstr}{\optional{y, x, } str, n \optional{, attr}} Insert a character string (as many characters as will fit on the line) before the character under the cursor, up to \var{n} characters. --- 778,787 ---- \end{methoddesc} ! \begin{methoddesc}[window]{insertln}{} Insert a blank line under the cursor. All following lines are moved down by 1 line. \end{methoddesc} ! \begin{methoddesc}[window]{insnstr}{\optional{y, x,} str, n \optional{, attr}} Insert a character string (as many characters as will fit on the line) before the character under the cursor, up to \var{n} characters. *************** *** 794,798 **** \end{methoddesc} ! \begin{methoddesc}{insstr}{\optional{y, x, } str \optional{, attr}} Insert a character string (as many characters as will fit on the line) before the character under the cursor. All characters to the right of --- 794,798 ---- \end{methoddesc} ! \begin{methoddesc}[window]{insstr}{\optional{y, x, } str \optional{, attr}} Insert a character string (as many characters as will fit on the line) before the character under the cursor. All characters to the right of *************** *** 802,806 **** \end{methoddesc} ! \begin{methoddesc}{instr}{\optional{y, x} \optional{, n}} Returns a string of characters, extracted from the window starting at the current cursor position, or at \var{y}, \var{x} if specified. --- 802,806 ---- \end{methoddesc} ! \begin{methoddesc}[window]{instr}{\optional{y, x} \optional{, n}} Returns a string of characters, extracted from the window starting at the current cursor position, or at \var{y}, \var{x} if specified. *************** *** 810,814 **** \end{methoddesc} ! \begin{methoddesc}{is_linetouched}{\var{line}} Returns true if the specified line was modified since the last call to \method{refresh()}; otherwise returns false. Raises a --- 810,814 ---- \end{methoddesc} ! \begin{methoddesc}[window]{is_linetouched}{\var{line}} Returns true if the specified line was modified since the last call to \method{refresh()}; otherwise returns false. Raises a *************** *** 817,826 **** \end{methoddesc} ! \begin{methoddesc}{is_wintouched}{} Returns true if the specified window was modified since the last call to \method{refresh()}; otherwise returns false. \end{methoddesc} ! \begin{methoddesc}{keypad}{yes} If \var{yes} is 1, escape sequences generated by some keys (keypad, function keys) will be interpreted by \module{curses}. --- 817,826 ---- \end{methoddesc} ! \begin{methoddesc}[window]{is_wintouched}{} Returns true if the specified window was modified since the last call to \method{refresh()}; otherwise returns false. \end{methoddesc} ! \begin{methoddesc}[window]{keypad}{yes} If \var{yes} is 1, escape sequences generated by some keys (keypad, function keys) will be interpreted by \module{curses}. *************** *** 829,833 **** \end{methoddesc} ! \begin{methoddesc}{leaveok}{yes} If \var{yes} is 1, cursor is left where it is on update, instead of being at ``cursor position.'' This reduces cursor movement where --- 829,833 ---- \end{methoddesc} ! \begin{methoddesc}[window]{leaveok}{yes} If \var{yes} is 1, cursor is left where it is on update, instead of being at ``cursor position.'' This reduces cursor movement where *************** *** 838,846 **** \end{methoddesc} ! \begin{methoddesc}{move}{new_y, new_x} Move cursor to \code{(\var{new_y}, \var{new_x})}. \end{methoddesc} ! \begin{methoddesc}{mvderwin}{y, x} Moves the window inside its parent window. The screen-relative parameters of the window are not changed. This routine is used to --- 838,846 ---- \end{methoddesc} ! \begin{methoddesc}[window]{move}{new_y, new_x} Move cursor to \code{(\var{new_y}, \var{new_x})}. \end{methoddesc} ! \begin{methoddesc}[window]{mvderwin}{y, x} Moves the window inside its parent window. The screen-relative parameters of the window are not changed. This routine is used to *************** *** 849,862 **** \end{methoddesc} ! \begin{methoddesc}{mvwin}{new_y, new_x} Move the window so its upper-left corner is at \code{(\var{new_y}, \var{new_x})}. \end{methoddesc} ! \begin{methoddesc}{nodelay}{yes} If \var{yes} is \code{1}, \method{getch()} will be non-blocking. \end{methoddesc} ! \begin{methoddesc}{notimeout}{yes} If \var{yes} is \code{1}, escape sequences will not be timed out. --- 849,862 ---- \end{methoddesc} ! \begin{methoddesc}[window]{mvwin}{new_y, new_x} Move the window so its upper-left corner is at \code{(\var{new_y}, \var{new_x})}. \end{methoddesc} ! \begin{methoddesc}[window]{nodelay}{yes} If \var{yes} is \code{1}, \method{getch()} will be non-blocking. \end{methoddesc} ! \begin{methoddesc}[window]{notimeout}{yes} If \var{yes} is \code{1}, escape sequences will not be timed out. *************** *** 865,869 **** \end{methoddesc} ! \begin{methoddesc}{noutrefresh}{} Mark for refresh but wait. This function updates the data structure representing the desired state of the window, but does not force --- 865,869 ---- \end{methoddesc} ! \begin{methoddesc}[window]{noutrefresh}{} Mark for refresh but wait. This function updates the data structure representing the desired state of the window, but does not force *************** *** 872,877 **** \end{methoddesc} ! \begin{methoddesc}{overlay}{destwin\optional{, sminrow, smincol, ! dminrow, dmincol, dmaxrow, dmaxcol}} Overlay the window on top of \var{destwin}. The windows need not be the same size, only the overlapping region is copied. This copy is --- 872,877 ---- \end{methoddesc} ! \begin{methoddesc}[window]{overlay}{destwin\optional{, sminrow, smincol, ! dminrow, dmincol, dmaxrow, dmaxcol}} Overlay the window on top of \var{destwin}. The windows need not be the same size, only the overlapping region is copied. This copy is *************** *** 885,890 **** \end{methoddesc} ! \begin{methoddesc}{overwrite}{destwin\optional{, sminrow, smincol, ! dminrow, dmincol, dmaxrow, dmaxcol}} Overwrite the window on top of \var{destwin}. The windows need not be the same size, in which case only the overlapping region is --- 885,890 ---- \end{methoddesc} ! \begin{methoddesc}[window]{overwrite}{destwin\optional{, sminrow, smincol, ! dminrow, dmincol, dmaxrow, dmaxcol}} Overwrite the window on top of \var{destwin}. The windows need not be the same size, in which case only the overlapping region is *************** *** 898,909 **** \end{methoddesc} ! \begin{methoddesc}{putwin}{file} Writes all data associated with the window into the provided file object. This information can be later retrieved using the \function{getwin()} function. - \end{methoddesc} ! \begin{methoddesc}{redrawln}{beg, num} Indicates that the \var{num} screen lines, starting at line \var{beg}, are corrupted and should be completely redrawn on the next --- 898,908 ---- \end{methoddesc} ! \begin{methoddesc}[window]{putwin}{file} Writes all data associated with the window into the provided file object. This information can be later retrieved using the \function{getwin()} function. \end{methoddesc} ! \begin{methoddesc}[window]{redrawln}{beg, num} Indicates that the \var{num} screen lines, starting at line \var{beg}, are corrupted and should be completely redrawn on the next *************** *** 911,921 **** \end{methoddesc} ! \begin{methoddesc}{redrawwin}{} Touches the entire window, causing it to be completely redrawn on the next \method{refresh()} call. \end{methoddesc} ! \begin{methoddesc}{refresh}{\optional{pminrow, pmincol, sminrow, ! smincol, smaxrow, smaxcol}} Update the display immediately (sync actual screen with previous drawing/deleting methods). --- 910,920 ---- \end{methoddesc} ! \begin{methoddesc}[window]{redrawwin}{} Touches the entire window, causing it to be completely redrawn on the next \method{refresh()} call. \end{methoddesc} ! \begin{methoddesc}[window]{refresh}{\optional{pminrow, pmincol, sminrow, ! smincol, smaxrow, smaxcol}} Update the display immediately (sync actual screen with previous drawing/deleting methods). *************** *** 935,943 **** \end{methoddesc} ! \begin{methoddesc}{scroll}{\optional{lines\code{ = 1}}} Scroll the screen or scrolling region upward by \var{lines} lines. \end{methoddesc} ! \begin{methoddesc}{scrollok}{flag} Controls what happens when the cursor of a window is moved off the edge of the window or scrolling region, either as a result of a --- 934,942 ---- \end{methoddesc} ! \begin{methoddesc}[window]{scroll}{\optional{lines\code{ = 1}}} Scroll the screen or scrolling region upward by \var{lines} lines. \end{methoddesc} ! \begin{methoddesc}[window]{scrollok}{flag} Controls what happens when the cursor of a window is moved off the edge of the window or scrolling region, either as a result of a *************** *** 950,968 **** \end{methoddesc} ! \begin{methoddesc}{setscrreg}{top, bottom} Set the scrolling region from line \var{top} to line \var{bottom}. All scrolling actions will take place in this region. \end{methoddesc} ! \begin{methoddesc}{standend}{} Turn off the standout attribute. On some terminals this has the side effect of turning off all attributes. \end{methoddesc} ! \begin{methoddesc}{standout}{} Turn on attribute \var{A_STANDOUT}. \end{methoddesc} ! \begin{methoddesc}{subpad}{\optional{nlines, ncols,} begin_y, begin_y} Return a sub-window, whose upper-left corner is at \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is --- 949,967 ---- \end{methoddesc} ! \begin{methoddesc}[window]{setscrreg}{top, bottom} Set the scrolling region from line \var{top} to line \var{bottom}. All scrolling actions will take place in this region. \end{methoddesc} ! \begin{methoddesc}[window]{standend}{} Turn off the standout attribute. On some terminals this has the side effect of turning off all attributes. \end{methoddesc} ! \begin{methoddesc}[window]{standout}{} Turn on attribute \var{A_STANDOUT}. \end{methoddesc} ! \begin{methoddesc}[window]{subpad}{\optional{nlines, ncols,} begin_y, begin_x} Return a sub-window, whose upper-left corner is at \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is *************** *** 970,974 **** \end{methoddesc} ! \begin{methoddesc}{subwin}{\optional{nlines, ncols,} begin_y, begin_y} Return a sub-window, whose upper-left corner is at \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is --- 969,973 ---- \end{methoddesc} ! \begin{methoddesc}[window]{subwin}{\optional{nlines, ncols,} begin_y, begin_x} Return a sub-window, whose upper-left corner is at \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is *************** *** 979,983 **** \end{methoddesc} ! \begin{methoddesc}{syncdown}{} Touches each location in the window that has been touched in any of its ancestor windows. This routine is called by \method{refresh()}, --- 978,982 ---- \end{methoddesc} ! \begin{methoddesc}[window]{syncdown}{} Touches each location in the window that has been touched in any of its ancestor windows. This routine is called by \method{refresh()}, *************** *** 985,999 **** \end{methoddesc} ! \begin{methoddesc}{syncok}{flag} If called with \var{flag} set to true, then \method{syncup()} is called automatically whenever there is a change in the window. \end{methoddesc} ! \begin{methoddesc}{syncup}{} Touches all locations in ancestors of the window that have been changed in the window. \end{methoddesc} ! \begin{methoddesc}{timeout}{delay} Sets blocking or non-blocking read behavior for the window. If \var{delay} is negative, blocking read is used, which will wait --- 984,998 ---- \end{methoddesc} ! \begin{methoddesc}[window]{syncok}{flag} If called with \var{flag} set to true, then \method{syncup()} is called automatically whenever there is a change in the window. \end{methoddesc} ! \begin{methoddesc}[window]{syncup}{} Touches all locations in ancestors of the window that have been changed in the window. \end{methoddesc} ! \begin{methoddesc}[window]{timeout}{delay} Sets blocking or non-blocking read behavior for the window. If \var{delay} is negative, blocking read is used, which will wait *************** *** 1005,1024 **** \end{methoddesc} ! \begin{methoddesc}{touchline}{start, count} Pretend \var{count} lines have been changed, starting with line \var{start}. \end{methoddesc} ! \begin{methoddesc}{touchwin}{} Pretend the whole window has been changed, for purposes of drawing optimizations. \end{methoddesc} ! \begin{methoddesc}{untouchwin}{} Marks all lines in the window as unchanged since the last call to \method{refresh()}. \end{methoddesc} ! \begin{methoddesc}{vline}{\optional{y, x,} ch, n} Display a vertical line starting at \code{(\var{y}, \var{x})} with length \var{n} consisting of the character \var{ch}. --- 1004,1023 ---- \end{methoddesc} ! \begin{methoddesc}[window]{touchline}{start, count} Pretend \var{count} lines have been changed, starting with line \var{start}. \end{methoddesc} ! \begin{methoddesc}[window]{touchwin}{} Pretend the whole window has been changed, for purposes of drawing optimizations. \end{methoddesc} ! \begin{methoddesc}[window]{untouchwin}{} Marks all lines in the window as unchanged since the last call to \method{refresh()}. \end{methoddesc} ! \begin{methoddesc}[window]{vline}{\optional{y, x,} ch, n} Display a vertical line starting at \code{(\var{y}, \var{x})} with length \var{n} consisting of the character \var{ch}. From jackjansen@users.sourceforge.net Wed Dec 26 22:52:44 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 26 Dec 2001 14:52:44 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Python macglue.c,1.109,1.109.4.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Python In directory usw-pr-cvs1:/tmp/cvs-serv6116/Python/Mac/Python Modified Files: Tag: release22-branch macglue.c Log Message: Silly workaround for MacOS 8.1: the UH3.4 CarbonAccessors.o is apparently no longer good enough for 8.1. This is a partial fix that at least makes the core build. Index: macglue.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Python/macglue.c,v retrieving revision 1.109 retrieving revision 1.109.4.1 diff -C2 -d -r1.109 -r1.109.4.1 *** macglue.c 2001/12/10 16:08:06 1.109 --- macglue.c 2001/12/26 22:52:41 1.109.4.1 *************** *** 393,396 **** --- 393,407 ---- #if TARGET_API_MAC_OS8 + Point + LMGetMouse(void) + { + return LMGetMouseLocation(); + } + + long LMGetExpandMem(void) + { + return 0; + } + void c2pstrcpy(unsigned char *dst, const char *src) From jackjansen@users.sourceforge.net Wed Dec 26 22:54:23 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 26 Dec 2001 14:54:23 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Distributions/(vise) Python 2.2.vct,1.6.4.1,1.6.4.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Distributions/(vise) In directory usw-pr-cvs1:/tmp/cvs-serv6279/Python/Mac/Distributions/(vise) Modified Files: Tag: release22-branch Python 2.2.vct Log Message: Files used for MacPython 2.2 final distribution. Index: Python 2.2.vct =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/(vise)/Python 2.2.vct,v retrieving revision 1.6.4.1 retrieving revision 1.6.4.2 diff -C2 -d -r1.6.4.1 -r1.6.4.2 Binary files /tmp/cvsQWC5iU and /tmp/cvsMZdxVL differ From jackjansen@users.sourceforge.net Wed Dec 26 22:55:18 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 26 Dec 2001 14:55:18 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Include macbuildno.h,1.22.4.1,1.22.4.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Include In directory usw-pr-cvs1:/tmp/cvs-serv6616/Python/Mac/Include Modified Files: Tag: release22-branch macbuildno.h Log Message: Files used for MacPython 2.2 final distribution. Index: macbuildno.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Include/macbuildno.h,v retrieving revision 1.22.4.1 retrieving revision 1.22.4.2 diff -C2 -d -r1.22.4.1 -r1.22.4.2 *** macbuildno.h 2001/12/21 22:31:58 1.22.4.1 --- macbuildno.h 2001/12/26 22:55:16 1.22.4.2 *************** *** 1 **** ! #define BUILD 121 --- 1 ---- ! #define BUILD 124 From jackjansen@users.sourceforge.net Wed Dec 26 22:54:59 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 26 Dec 2001 14:54:59 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Build PythonCore.mcp,1.31,1.31.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Build In directory usw-pr-cvs1:/tmp/cvs-serv6472/Python/Mac/Build Modified Files: Tag: release22-branch PythonCore.mcp Log Message: Files used for MacPython 2.2 final distribution. Index: PythonCore.mcp =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Build/PythonCore.mcp,v retrieving revision 1.31 retrieving revision 1.31.2.1 diff -C2 -d -r1.31 -r1.31.2.1 Binary files /tmp/cvsmo7dfU and /tmp/cvsIBxIhG differ From jackjansen@users.sourceforge.net Wed Dec 26 22:55:37 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 26 Dec 2001 14:55:37 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Distributions binary.exclude,1.10.6.1,1.10.6.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Distributions In directory usw-pr-cvs1:/tmp/cvs-serv6655/Python/Mac/Distributions Modified Files: Tag: release22-branch binary.exclude Log Message: Files used for MacPython 2.2 final distribution. Index: binary.exclude =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/binary.exclude,v retrieving revision 1.10.6.1 retrieving revision 1.10.6.2 diff -C2 -d -r1.10.6.1 -r1.10.6.2 *** binary.exclude 2001/12/21 22:31:57 1.10.6.1 --- binary.exclude 2001/12/26 22:55:34 1.10.6.2 *************** *** 35,36 **** --- 35,37 ---- Setup.in [(]*[)] + *~[0-9] From jackjansen@users.sourceforge.net Wed Dec 26 22:55:56 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 26 Dec 2001 14:55:56 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Distributions binary.include,1.19.6.1,1.19.6.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Distributions In directory usw-pr-cvs1:/tmp/cvs-serv6712/Python/Mac/Distributions Modified Files: Tag: release22-branch binary.include Log Message: Files used for MacPython 2.2 final distribution. Index: binary.include =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/binary.include,v retrieving revision 1.19.6.1 retrieving revision 1.19.6.2 diff -C2 -d -r1.19.6.1 -r1.19.6.2 *** binary.include 2001/12/21 22:31:57 1.19.6.1 --- binary.include 2001/12/26 22:55:54 1.19.6.2 *************** *** 128,131 **** --- 128,132 ---- (':Mac:Contrib:Sherlock', '') (':Mac:Contrib:Tabcleaner', '') + (':Mac:Contrib:mpwsystem', '') (':Mac:Contrib:osam:OSAm.carbon.slb', '') (':Mac:Contrib:osam:OSAm.exp', None) *************** *** 150,153 **** --- 151,155 ---- (':Mac:ReadMe-dev', None) (':Mac:ReadMe-src', None) + (':Mac:ReadMe~0', None) (':Mac:ReadmeSource', None) (':Mac:Relnotes', ':Relnotes:') *************** *** 220,223 **** (':setup.py', None) (':site-packages', None) - (':Mac:ReadMe~0', None) - (':Mac:Contrib:mpwsystem', '') --- 222,223 ---- From jackjansen@users.sourceforge.net Wed Dec 26 22:56:17 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 26 Dec 2001 14:56:17 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Distributions dev.exclude,1.8,1.8.4.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Distributions In directory usw-pr-cvs1:/tmp/cvs-serv6780/Python/Mac/Distributions Modified Files: Tag: release22-branch dev.exclude Log Message: Files used for MacPython 2.2 final distribution. Index: dev.exclude =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/dev.exclude,v retrieving revision 1.8 retrieving revision 1.8.4.1 diff -C2 -d -r1.8 -r1.8.4.1 *** dev.exclude 2001/11/30 14:16:29 1.8 --- dev.exclude 2001/12/26 22:56:14 1.8.4.1 *************** *** 18,19 **** --- 18,20 ---- CVS [(]*[)] + *~[0-9] From jackjansen@users.sourceforge.net Wed Dec 26 22:56:39 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 26 Dec 2001 14:56:39 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Distributions dev.include,1.23.4.1,1.23.4.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Distributions In directory usw-pr-cvs1:/tmp/cvs-serv6834/Python/Mac/Distributions Modified Files: Tag: release22-branch dev.include Log Message: Files used for MacPython 2.2 final distribution. Index: dev.include =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/dev.include,v retrieving revision 1.23.4.1 retrieving revision 1.23.4.2 diff -C2 -d -r1.23.4.1 -r1.23.4.2 *** dev.include 2001/12/21 22:31:57 1.23.4.1 --- dev.include 2001/12/26 22:56:37 1.23.4.2 *************** *** 64,74 **** --- 64,77 ---- (':Mac:Build:Printing.mcp.exp', None) (':Mac:Build:Printing.mcp.xml', None) + (':Mac:Build:PythonCore.axp', None) (':Mac:Build:PythonCore.exp', None) (':Mac:Build:PythonCore.mcp', None) (':Mac:Build:PythonCoreCarbon.exp', None) (':Mac:Build:PythonInterpreter.mcp', None) + (':Mac:Build:PythonInterpreter.old.mcp', None) (':Mac:Build:PythonStandSmall.mcp', None) (':Mac:Build:PythonStandSmall.mcp~0', None) (':Mac:Build:PythonStandSmall.mcp~1', None) + (':Mac:Build:PythonStandSmall.old.mcp', None) (':Mac:Build:PythonStandalone.mcp', None) (':Mac:Build:PythonStandalone.mcp~0', None) *************** *** 105,108 **** --- 108,117 ---- (':Mac:Build:_CF.carbon.mcp.exp', None) (':Mac:Build:_CF.carbon.mcp.xml', None) + (':Mac:Build:_CG.carbon.mcp', None) + (':Mac:Build:_CG.carbon.mcp.exp', None) + (':Mac:Build:_CG.carbon.old.mcp', None) + (':Mac:Build:_CarbonEvt.carbon.mcp', None) + (':Mac:Build:_CarbonEvt.carbon.mcp.exp', None) + (':Mac:Build:_CarbonEvt.carbon.mcp.xml', None) (':Mac:Build:_Cm.carbon.mcp', None) (':Mac:Build:_Cm.carbon.mcp.exp', None) *************** *** 224,227 **** --- 233,237 ---- (':Mac:Build:_dummy_tkinter.mcp', None) (':Mac:Build:_dummy_tkinter.mcp.exp', None) + (':Mac:Build:_dummy_tkinter.old.mcp', None) (':Mac:Build:_hotshot.carbon.mcp', None) (':Mac:Build:_hotshot.carbon.mcp.exp', None) *************** *** 374,377 **** --- 384,388 ---- (':Mac:ReadMe-dev', ':') (':Mac:ReadMe-src', None) + (':Mac:ReadMe~0', None) (':Mac:Relnotes', None) (':Mac:Relnotes-source', None) *************** *** 530,533 **** --- 541,546 ---- (':Modules:threadmodule.c', None) (':Modules:timemodule.c', None) + (':Modules:timemodule.c~0', None) + (':Modules:timemodule.c~1', None) (':Modules:timing.h', None) (':Modules:timingmodule.c', None) *************** *** 601,615 **** (':setup.py', None) (':site-packages', None) - (':Mac:Build:_CG.carbon.old.mcp', None) - (':Mac:Build:_CG.carbon.mcp.exp', None) - (':Mac:Build:_CG.carbon.mcp', None) - (':Mac:Build:_CarbonEvt.carbon.mcp.xml', None) - (':Mac:Build:_CarbonEvt.carbon.mcp.exp', None) - (':Mac:Build:_CarbonEvt.carbon.mcp', None) - (':Mac:ReadMe~0', None) - (':Modules:timemodule.c~1', None) - (':Modules:timemodule.c~0', None) - (':Mac:Build:PythonStandSmall.old.mcp', None) - (':Mac:Build:PythonInterpreter.old.mcp', None) - (':Mac:Build:PythonCore.axp', None) - (':Mac:Build:_dummy_tkinter.old.mcp', None) --- 614,615 ---- From jackjansen@users.sourceforge.net Wed Dec 26 22:56:46 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 26 Dec 2001 14:56:46 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac ReadMe,1.38.4.1,1.38.4.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac In directory usw-pr-cvs1:/tmp/cvs-serv6876/Python/Mac Modified Files: Tag: release22-branch ReadMe Log Message: Files used for MacPython 2.2 final distribution. Index: ReadMe =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/ReadMe,v retrieving revision 1.38.4.1 retrieving revision 1.38.4.2 diff -C2 -d -r1.38.4.1 -r1.38.4.2 *** ReadMe 2001/12/21 22:31:57 1.38.4.1 --- ReadMe 2001/12/26 22:56:44 1.38.4.2 *************** *** 1,8 **** ! How to install Python 2.2c1 on your Macintosh --------------------------------------------- - This is a release candidate for MacPython 2.2, please report any problems as - soon as possible, by email to pythonmac-sig@python.org. - This is a MacPython that can run on classic MacOS (from 8.1 onwards) and natively on MacOSX. The installer tries to work out whether you can --- 1,5 ---- ! How to install Python 2.2 on your Macintosh --------------------------------------------- This is a MacPython that can run on classic MacOS (from 8.1 onwards) and natively on MacOSX. The installer tries to work out whether you can *************** *** 33,41 **** This installer installs MacPython for classic PPC MacOS, MacPython for Carbon ! (OS X, OS 9 or OS8 with CarbonLib installed) or both, depending on your configuration. By selecting custom install you can bypass these tests and install what you want. ! If you want 68k support you will have to stay with MacPython 1.5.2. Toolbox module reorganization and more --- 30,38 ---- This installer installs MacPython for classic PPC MacOS, MacPython for Carbon ! (OS X, OS 9 or OS 8 with CarbonLib installed) or both, depending on your configuration. By selecting custom install you can bypass these tests and install what you want. ! If you want 68k support you will have get MacPython 1.5.2. Toolbox module reorganization and more *************** *** 44,49 **** You can safely skip this section if this is your first encounter with MacPython. ! I am working on a new organization of the mac-specific modules, and in ! general bringing the MacPython folder structure more in line with unix-Python. This is not only a good idea, it will also immensely facilitate moving MacPython functionality to an OSX Python that is based --- 41,46 ---- You can safely skip this section if this is your first encounter with MacPython. ! This release has a new organization of the mac-specific modules, and in ! general brings the MacPython folder structure more in line with unix-Python. This is not only a good idea, it will also immensely facilitate moving MacPython functionality to an OSX Python that is based *************** *** 93,96 **** --- 90,95 ---- linefeed convention of the file was. - Windows \r\n linefeeds are not supported and get turned into \n\n. + - in 2.3 this feature will be replaced by a more general, platform independent + way of handling files with foreign newline conventions. What to install *************** *** 170,187 **** ------------ ! Two items are installed in the system folder: the interpreter shared ! libraries PythonCore and PythonCoreCarbon lives in the Extensions ! folder and the "Python 2.2c1 Preferences" file in the Python subfolder in the Preferences folder. All the rest of Python lives in the folder you installed in. ! On OSX the libraries are installed in /Library/CFMSupport. There is a ! nasty bug in OSX that is triggered by Python: if any orphaned aliases ! are left in /Library/CFMSupport your machine will start to behave very ! badly. 2.1 beta installers triggered this problem if you simply threw ! away your Python folder, so if you installed a 2.1beta you should ! clean out the aliases in /Library/CFMSupport too. The final 2.1 and ! 2.1.1 installers always copied the shared libraries on OSX, so it does ! not have the problem anymore. Things to see --- 169,184 ---- ------------ ! Up to three items are installed in the system folder: the interpreter shared ! libraries PythonCore and PythonCoreCarbon live in the Extensions ! folder and the "Python 2.2 Preferences" file in the Python subfolder in the Preferences folder. All the rest of Python lives in the folder you installed in. ! On OSX the libraries are installed in /Library/CFMSupport. The ConfigurePython ! applets will complain if you have no right to create the libraries there ! (you need Admin privileges). This has one consequence: you will not be able to ! run applets unless they reside in the MacPython folder (such as the IDE or ! EditPythonPrefs). If you try to run an applet stored elsewhere you will ! get a "Cannot locate PythonCore" error message. Things to see *************** *** 222,228 **** are lost and you have to set them again. ! After you are satisfied that 2.2c1 works as expected you can trash anything in the system folder that has "python" in the name and not ! "2.2c1". The ConfigurePython... applets will try to detect incompatible --- 219,225 ---- are lost and you have to set them again. ! After you are satisfied that 2.2 works as expected you can trash anything in the system folder that has "python" in the name and not ! "2.2". The ConfigurePython... applets will try to detect incompatible *************** *** 279,285 **** Jack Jansen ! Oratrix Development BV ! Valeriusplein 30 ! Amsterdam the Netherlands --- 276,282 ---- Jack Jansen ! CWI ! Kruislaan 413 ! 1098 SJ Amsterdam the Netherlands From jackjansen@users.sourceforge.net Wed Dec 26 22:56:52 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 26 Dec 2001 14:56:52 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac Relnotes,1.28.4.1,1.28.4.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac In directory usw-pr-cvs1:/tmp/cvs-serv6914/Python/Mac Modified Files: Tag: release22-branch Relnotes Log Message: Files used for MacPython 2.2 final distribution. Index: Relnotes =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Relnotes,v retrieving revision 1.28.4.1 retrieving revision 1.28.4.2 diff -C2 -d -r1.28.4.1 -r1.28.4.2 *** Relnotes 2001/12/21 22:31:57 1.28.4.1 --- Relnotes 2001/12/26 22:56:50 1.28.4.2 *************** *** 1,7 **** ! Changes in 2.2c1 since 2.1.1 ---------------------------- These release notes refer to Mac-specific changes only. See NEWS (in the Misc folder) ! for machine-independent changes. Changes that are new in 2.2c1 are flagged as such. --- 1,7 ---- ! Changes in 2.2 since 2.1.1 ---------------------------- These release notes refer to Mac-specific changes only. See NEWS (in the Misc folder) ! for machine-independent changes. *************** *** 12,22 **** to contribute. Aside from reducing clutter this change will also benefit the port to Mach-O/OSX Python later. ! - All toolbox modules have been updated to Universal Headers 3.4. [2.2c1] - Toolbox modules are weaklinked against InterfaceLib (for PPC builds) and raise ! an exception when you call an unimplemented one on an old MacOS. [2.2c1] - On input MacPython now accepts either \n (unix style) or \r (mac style) newlines for text files. This behaviour can be turned off with a preference. This is an experimental feature; again: feedback is requested. ! - The IDE looks better on OS X, but still not as good as on OS9. [2.2c1] - Command-dot handling has been improved a lot: scripts are now much easier to interrupt, and they only scan for cmd-. while in the foreground. --- 12,22 ---- to contribute. Aside from reducing clutter this change will also benefit the port to Mach-O/OSX Python later. ! - All toolbox modules have been updated to Universal Headers 3.4. - Toolbox modules are weaklinked against InterfaceLib (for PPC builds) and raise ! an exception when you call an unimplemented one on an old MacOS. - On input MacPython now accepts either \n (unix style) or \r (mac style) newlines for text files. This behaviour can be turned off with a preference. This is an experimental feature; again: feedback is requested. ! - The IDE looks better on OS X, but still not as good as on OS9. - Command-dot handling has been improved a lot: scripts are now much easier to interrupt, and they only scan for cmd-. while in the foreground. *************** *** 24,36 **** - This release should run on MacOS 8.1 again. - A new, rather different GUSI I/O library is used. ! - time.time() returns positive values again. [2.2c1] - There is a new module macresource which makes it easier to open a resource file accompanying your script when the script is not (yet) converted to an applet. This module will later also do the right thing in Mach-O/OSX Python. - (Carbon only) experimental modules Carbon.CG (CoreGraphics) and CarbonEvt have ! been added. [2.2c1] - A new, experimental module hfsplus is included, which gives access to some of the functionality of the HFS+ API. ! - A new, experimental module gives access to Carbon Events. [2.2c1] - Threads had a stack that was too small for many serious Python applications (20K). They now get 64K. There is still no overflow check, though. --- 24,36 ---- - This release should run on MacOS 8.1 again. - A new, rather different GUSI I/O library is used. ! - time.time() returns positive values again. - There is a new module macresource which makes it easier to open a resource file accompanying your script when the script is not (yet) converted to an applet. This module will later also do the right thing in Mach-O/OSX Python. - (Carbon only) experimental modules Carbon.CG (CoreGraphics) and CarbonEvt have ! been added. - A new, experimental module hfsplus is included, which gives access to some of the functionality of the HFS+ API. ! - A new, experimental module gives access to Carbon Events. - Threads had a stack that was too small for many serious Python applications (20K). They now get 64K. There is still no overflow check, though. *************** *** 53,61 **** the standard module findertools.py. - What is not in this distribution - -------------------------------- - - - The toolbox modules have not all been updated to Universal Header 3.4 or CarbonLib 1.4 yet. - Known problems -------------- --- 53,56 ---- *************** *** 66,70 **** - MacPython 2.2 (and MacPython 2.1) will not run correctly on a multiprocessor MacOS X machine, it will quickly deadlock during I/O operations. The GUSI I/O library is suspected, ! hints/clues/workarounds are solicited. - Tkinter does not work under Carbon. - The IDE and Tkinter do not work together. Run tkinter programs under PythonInterpreter. --- 61,66 ---- - MacPython 2.2 (and MacPython 2.1) will not run correctly on a multiprocessor MacOS X machine, it will quickly deadlock during I/O operations. The GUSI I/O library is suspected, ! hints/clues/workarounds are solicited. This problem also occurs intermittently on fast ! OS X single-processor machines. - Tkinter does not work under Carbon. - The IDE and Tkinter do not work together. Run tkinter programs under PythonInterpreter. From jackjansen@users.sourceforge.net Wed Dec 26 22:57:00 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Wed, 26 Dec 2001 14:57:00 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac _checkversion.py,1.11,1.11.6.1 Message-ID: Update of /cvsroot/python/python/dist/src/Mac In directory usw-pr-cvs1:/tmp/cvs-serv6942/Python/Mac Modified Files: Tag: release22-branch _checkversion.py Log Message: Files used for MacPython 2.2 final distribution. Index: _checkversion.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/_checkversion.py,v retrieving revision 1.11 retrieving revision 1.11.6.1 diff -C2 -d -r1.11 -r1.11.6.1 *** _checkversion.py 2001/10/23 22:21:10 1.11 --- _checkversion.py 2001/12/26 22:56:58 1.11.6.1 *************** *** 6,10 **** _PACKAGE="MacPython" ! _VERSION="2.2b1" _URL="http://www.cwi.nl/~jack/macpythonversion.txt" --- 6,10 ---- _PACKAGE="MacPython" ! _VERSION="2.2" _URL="http://www.cwi.nl/~jack/macpythonversion.txt" From fdrake@users.sourceforge.net Thu Dec 27 05:09:47 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Wed, 26 Dec 2001 21:09:47 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcmd.tex,1.7,1.7.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv30837/lib Modified Files: Tag: release21-maint libcmd.tex Log Message: Elaborate the descriptions for onecmd(), precmd(), and postcmd() so they are useful. Includes one correction in the precmd() description. Index: libcmd.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcmd.tex,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** libcmd.tex 2001/03/24 19:17:35 1.7 --- libcmd.tex 2001/12/27 05:09:45 1.7.2.1 *************** *** 57,62 **** \begin{methoddesc}{onecmd}{str} ! Interpret the argument as though it had been typed in in ! response to the prompt. \end{methoddesc} --- 57,65 ---- \begin{methoddesc}{onecmd}{str} ! Interpret the argument as though it had been typed in response to the ! prompt. This may be overridden, but should not normally need to be; ! see the \method{precmd()} and \method{postcmd()} methods for useful ! execution hooks. The return value is a flag indicating whether ! interpretation of commands by the interpreter should stop. \end{methoddesc} *************** *** 74,86 **** \begin{methoddesc}{precmd}{} ! Hook method executed just before the input prompt is issued. This method is a stub in \class{Cmd}; it exists to be overridden by ! subclasses. \end{methoddesc} ! \begin{methoddesc}{postcmd}{} Hook method executed just after a command dispatch is finished. This method is a stub in \class{Cmd}; it exists to be overridden by ! subclasses. \end{methoddesc} --- 77,99 ---- \begin{methoddesc}{precmd}{} ! Hook method executed just before the command line \var{line} is ! interpreted, but after the input prompt is generated and issued. This method is a stub in \class{Cmd}; it exists to be overridden by ! subclasses. The return value is used as the command which will be ! executed by the \method{onecmd()} method; the \method{precmd()} ! implementation may re-write the command or simply return \var{line} ! unchanged. \end{methoddesc} ! \begin{methoddesc}{postcmd}{stop, line} Hook method executed just after a command dispatch is finished. This method is a stub in \class{Cmd}; it exists to be overridden by ! subclasses. \var{line} is the command line which was executed, and ! \var{stop} is a flag which indicates whether execution will be ! terminated after the call to \method{postcmd()}; this will be the ! return value of the \method{onecmd()} method. The return value of ! this method will be used as the new value for the internal flag which ! corresponds to \var{stop}; returning false will cause interpretation ! to continue. \end{methoddesc} From fdrake@users.sourceforge.net Thu Dec 27 05:10:20 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Wed, 26 Dec 2001 21:10:20 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcmd.tex,1.11,1.12 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv30943/lib Modified Files: libcmd.tex Log Message: Elaborate the descriptions for onecmd(), precmd(), and postcmd() so they are useful. Index: libcmd.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcmd.tex,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** libcmd.tex 2001/07/29 03:41:23 1.11 --- libcmd.tex 2001/12/27 05:10:18 1.12 *************** *** 23,27 **** and \module{readline} is available, command completion is done automatically. - \end{classdesc} --- 23,26 ---- *************** *** 73,78 **** \begin{methoddesc}{onecmd}{str} ! Interpret the argument as though it had been typed in in ! response to the prompt. \end{methoddesc} --- 72,80 ---- \begin{methoddesc}{onecmd}{str} ! Interpret the argument as though it had been typed in response to the ! prompt. This may be overridden, but should not normally need to be; ! see the \method{precmd()} and \method{postcmd()} methods for useful ! execution hooks. The return value is a flag indicating whether ! interpretation of commands by the interpreter should stop. \end{methoddesc} *************** *** 95,109 **** \end{methoddesc} ! \begin{methoddesc}{precmd}{} ! Hook method executed just before the command line is interpreted, but ! after the input prompt is generated and issued. This method is a stub in \class{Cmd}; it exists to be overridden by ! subclasses. \end{methoddesc} ! \begin{methoddesc}{postcmd}{} Hook method executed just after a command dispatch is finished. This method is a stub in \class{Cmd}; it exists to be overridden by ! subclasses. \end{methoddesc} --- 97,120 ---- \end{methoddesc} ! \begin{methoddesc}{precmd}{line} ! Hook method executed just before the command line \var{line} is ! interpreted, but after the input prompt is generated and issued. This method is a stub in \class{Cmd}; it exists to be overridden by ! subclasses. The return value is used as the command which will be ! executed by the \method{onecmd()} method; the \method{precmd()} ! implementation may re-write the command or simply return \var{line} ! unchanged. \end{methoddesc} ! \begin{methoddesc}{postcmd}{stop, line} Hook method executed just after a command dispatch is finished. This method is a stub in \class{Cmd}; it exists to be overridden by ! subclasses. \var{line} is the command line which was executed, and ! \var{stop} is a flag which indicates whether execution will be ! terminated after the call to \method{postcmd()}; this will be the ! return value of the \method{onecmd()} method. The return value of ! this method will be used as the new value for the internal flag which ! corresponds to \var{stop}; returning false will cause interpretation ! to continue. \end{methoddesc} From jvr@users.sourceforge.net Thu Dec 27 10:29:09 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Thu, 27 Dec 2001 02:29:09 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Tools/IDE PyConsole.py,1.8,1.9 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE In directory usw-pr-cvs1:/tmp/cvs-serv29872 Modified Files: PyConsole.py Log Message: Modified version of patch #496882: echo SimpleStdin readline() input to stdout. Index: PyConsole.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PyConsole.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PyConsole.py 2001/08/25 12:09:34 1.8 --- PyConsole.py 2001/12/27 10:29:07 1.9 *************** *** 355,359 **** if rv is None: return "" ! return rv + '\n' --- 355,361 ---- if rv is None: return "" ! rv = rv + "\n" # readline should include line terminator ! sys.stdout.write(rv) # echo user's reply ! return rv From gvanrossum@users.sourceforge.net Thu Dec 27 16:23:31 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Thu, 27 Dec 2001 08:23:31 -0800 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.216,2.217 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv28612 Modified Files: posixmodule.c Log Message: Due to a cut-and-paste error, the type object exported under the name statvfs_result was in fact the stat_result type object. :-( 2.2.1 bugfix! Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.216 retrieving revision 2.217 diff -C2 -d -r2.216 -r2.217 *** posixmodule.c 2001/12/19 19:05:01 2.216 --- posixmodule.c 2001/12/27 16:23:28 2.217 *************** *** 6015,6018 **** statvfs_result_desc.name = MODNAME ".statvfs_result"; PyStructSequence_InitType(&StatVFSResultType, &statvfs_result_desc); ! PyDict_SetItemString(d, "statvfs_result", (PyObject*) &StatResultType); } --- 6015,6018 ---- statvfs_result_desc.name = MODNAME ".statvfs_result"; PyStructSequence_InitType(&StatVFSResultType, &statvfs_result_desc); ! PyDict_SetItemString(d, "statvfs_result", (PyObject*) &StatVFSResultType); } From gvanrossum@users.sourceforge.net Thu Dec 27 16:27:30 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Thu, 27 Dec 2001 08:27:30 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib copy_reg.py,1.9,1.10 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv29843 Modified Files: copy_reg.py Log Message: _reduce(): Avoid infinite recursion in the pickler when self.__class__ doesn't have the _HEAPTYPE flag set, e.g. for time.struct_time and posix.stat_result. This fixes the immediate symptoms of SF bug #496873 (cPickle / time.struct_time loop), replacing the infinite loop with an exception. Index: copy_reg.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/copy_reg.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** copy_reg.py 2001/11/24 21:04:31 1.9 --- copy_reg.py 2001/12/27 16:27:28 1.10 *************** *** 54,57 **** --- 54,59 ---- state = None else: + if base is self.__class__: + raise TypeError, "can't pickle %s objects" % base.__name__ state = base(self) args = (self.__class__, base, state) From guido@python.org Thu Dec 27 16:30:25 2001 From: guido@python.org (Guido van Rossum) Date: Thu, 27 Dec 2001 11:30:25 -0500 Subject: [Python-checkins] CVS: python/dist/src/Lib copy_reg.py,1.9,1.10 In-Reply-To: Your message of "Thu, 27 Dec 2001 08:27:30 PST." References: Message-ID: <200112271630.LAA14177@cj20424-a.reston1.va.home.com> > Modified Files: > copy_reg.py > Log Message: > _reduce(): Avoid infinite recursion in the pickler when self.__class__ > doesn't have the _HEAPTYPE flag set, e.g. for time.struct_time and > posix.stat_result. > > This fixes the immediate symptoms of SF bug #496873 (cPickle / > time.struct_time loop), replacing the infinite loop with an exception. For the 2.2.1 release czar: this is also a definite 2.2.1 bugfix! --Guido van Rossum (home page: http://www.python.org/~guido/) From gvanrossum@users.sourceforge.net Thu Dec 27 16:48:29 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Thu, 27 Dec 2001 08:48:29 -0800 Subject: [Python-checkins] CVS: python/dist/src/Demo/extend README,1.1,NONE make_clean,1.1,NONE make_shared,1.1,NONE make_static,1.1,NONE Message-ID: Update of /cvsroot/python/python/dist/src/Demo/extend In directory usw-pr-cvs1:/tmp/cvs-serv3692 Removed Files: README make_clean make_shared make_static Log Message: Removing this directory; it's no longer needed now that Misc/Makefile.pre.in no longer exists. Docs for distutils are plenty elsewhere. --- README DELETED --- --- make_clean DELETED --- --- make_shared DELETED --- --- make_static DELETED --- From gvanrossum@users.sourceforge.net Thu Dec 27 16:57:51 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Thu, 27 Dec 2001 08:57:51 -0800 Subject: [Python-checkins] CVS: python/dist/src/Demo README,1.14,1.15 Message-ID: Update of /cvsroot/python/python/dist/src/Demo In directory usw-pr-cvs1:/tmp/cvs-serv6056 Modified Files: README Log Message: Updated -- all Demo subdirectories are once again listed here, in alphabetical order (!), and the obsolete 'extend' directory is no longer mentioned. This and the erasure of the extend directory are 2.2.1 bugfix candidates (but only of you want to be thorough -- it's not like anybody cares :-). Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/README,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** README 2001/03/21 14:18:12 1.14 --- README 2001/12/27 16:57:49 1.15 *************** *** 16,28 **** classes Some examples of how to use classes. embed An example of embedding Python in another application (see also pysvr). ! extend An example of using the generic Makefile.pre.in from ! the Misc directory to build a statically linked or ! shared extension module. md5test Test program for the optional md5 module. pysvr An example of embedding Python in a threaded application. --- 16,38 ---- classes Some examples of how to use classes. + comparisons A set of responses to a really old language-comparison + challenge. + + curses A set of curses demos. + embed An example of embedding Python in another application (see also pysvr). ! imputil Demonstration subclasses of imputil.Importer. md5test Test program for the optional md5 module. + metaclasses The code from the 1.5 metaclasses paper on the web. + + parser Example using the parser module. + + pdist Old, unfinished code messing with CVS, RCS and remote + files. + pysvr An example of embedding Python in a threaded application. *************** *** 34,39 **** directory. No optional built-in modules needed. - sockets Examples for the new built-in module 'socket'. - sgi Demos that only run on Silicon Graphics machines. These require at least one of the optional built-in --- 44,47 ---- *************** *** 42,50 **** per subject. threads Demos that use the 'thread' module. (Currently these only run on SGIs, but this may change in the future.) tkinter Demos using the Tk interface (including Matt Conway's excellent set of demos). ! tix Demos using the Tix widget set addition to Tkinter. --- 50,68 ---- per subject. + sockets Examples for the new built-in module 'socket'. + threads Demos that use the 'thread' module. (Currently these only run on SGIs, but this may change in the future.) + tix Demos using the Tix widget set addition to Tkinter. + tkinter Demos using the Tk interface (including Matt Conway's excellent set of demos). ! xml Some XML demos. ! ! xmlrpc XML-RPC server framework (but see the standard library ! module SimpleXMLRPCServer.py for a replacement). ! ! zlib Some demos for the zlib module (see also the standard ! library module gzip.py). From fdrake@users.sourceforge.net Thu Dec 27 18:38:12 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 10:38:12 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref7.tex,1.29,1.30 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory usw-pr-cvs1:/tmp/cvs-serv931/ref Modified Files: ref7.tex Log Message: Added some missing index entries, noted by L. Peter Deutsch. This should be included in Python 2.2.1. Index: ref7.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref7.tex,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** ref7.tex 2001/10/20 04:19:51 1.29 --- ref7.tex 2001/12/27 18:38:10 1.30 *************** *** 299,302 **** --- 299,303 ---- \section{Function definitions\label{function}} \indexii{function}{definition} + \stindex{def} A function definition defines a user-defined function object (see *************** *** 394,397 **** --- 395,399 ---- \section{Class definitions\label{class}} \indexii{class}{definition} + \stindex{class} A class definition defines a class object (see section \ref{types}): From fdrake@users.sourceforge.net Thu Dec 27 18:38:49 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 10:38:49 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref7.tex,1.24.2.1,1.24.2.2 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory usw-pr-cvs1:/tmp/cvs-serv1077/ref Modified Files: Tag: release21-maint ref7.tex Log Message: Added some missing index entries, noted by L. Peter Deutsch. Index: ref7.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref7.tex,v retrieving revision 1.24.2.1 retrieving revision 1.24.2.2 diff -C2 -d -r1.24.2.1 -r1.24.2.2 *** ref7.tex 2001/05/10 15:10:17 1.24.2.1 --- ref7.tex 2001/12/27 18:38:47 1.24.2.2 *************** *** 281,284 **** --- 281,285 ---- \section{Function definitions\label{function}} \indexii{function}{definition} + \stindex{def} A function definition defines a user-defined function object (see *************** *** 371,374 **** --- 372,376 ---- \section{Class definitions\label{class}} \indexii{class}{definition} + \stindex{class} A class definition defines a class object (see section \ref{types}): From fdrake@users.sourceforge.net Thu Dec 27 18:40:20 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 10:40:20 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc ACKS,1.34,1.35 Message-ID: Update of /cvsroot/python/python/dist/src/Doc In directory usw-pr-cvs1:/tmp/cvs-serv1475 Modified Files: ACKS Log Message: Another name; should be added to Python 2.2.1. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** ACKS 2001/12/26 22:08:35 1.34 --- ACKS 2001/12/27 18:40:18 1.35 *************** *** 45,48 **** --- 45,49 ---- Andrew Dalke Ben Darnell + L. Peter Deutsch Robert Donohue Fred L. Drake, Jr. From fdrake@users.sourceforge.net Thu Dec 27 18:40:56 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 10:40:56 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc ACKS,1.16.4.6,1.16.4.7 Message-ID: Update of /cvsroot/python/python/dist/src/Doc In directory usw-pr-cvs1:/tmp/cvs-serv1630 Modified Files: Tag: release21-maint ACKS Log Message: Another name. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.16.4.6 retrieving revision 1.16.4.7 diff -C2 -d -r1.16.4.6 -r1.16.4.7 *** ACKS 2001/12/26 22:03:41 1.16.4.6 --- ACKS 2001/12/27 18:40:54 1.16.4.7 *************** *** 38,41 **** --- 38,42 ---- Andrew Dalke Ben Darnell + L. Peter Deutsch Robert Donohue Fred L. Drake, Jr. From fdrake@users.sourceforge.net Thu Dec 27 21:12:25 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 13:12:25 -0800 Subject: [Python-checkins] CVS: python/nondist/peps pep-0101.txt,1.20,1.21 Message-ID: Update of /cvsroot/python/python/nondist/peps In directory usw-pr-cvs1:/tmp/cvs-serv13766 Modified Files: pep-0101.txt Log Message: Add note about driving the HTML Help conversion. Index: pep-0101.txt =================================================================== RCS file: /cvsroot/python/python/nondist/peps/pep-0101.txt,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** pep-0101.txt 2001/12/21 21:07:57 1.20 --- pep-0101.txt 2001/12/27 21:12:22 1.21 *************** *** 167,171 **** the Doc/ directory -- not even by the RM. For final releases, Fred also sends email to Milan Zamazal for conversion to the GNU ! Info format. Note that Fred is responsible both for merging doc changes from --- 167,172 ---- the Doc/ directory -- not even by the RM. For final releases, Fred also sends email to Milan Zamazal for conversion to the GNU ! Info format, and to Hernan M. Foffani for conversion to HTML ! Help. Note that Fred is responsible both for merging doc changes from From jackjansen@users.sourceforge.net Thu Dec 27 21:51:04 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Thu, 27 Dec 2001 13:51:04 -0800 Subject: [Python-checkins] CVS: python/dist/src setup.py,1.38.2.2,1.38.2.3 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv26011 Modified Files: Tag: release21-maint setup.py Log Message: Don;t build curses on MacOSX 10.1 or later. This is patch 496905, and Anthony asked me to check it in. Index: setup.py =================================================================== RCS file: /cvsroot/python/python/dist/src/setup.py,v retrieving revision 1.38.2.2 retrieving revision 1.38.2.3 diff -C2 -d -r1.38.2.2 -r1.38.2.3 *** setup.py 2001/12/05 06:55:46 1.38.2.2 --- setup.py 2001/12/27 21:51:02 1.38.2.3 *************** *** 411,415 **** exts.append( Extension('_curses', ['_cursesmodule.c'], libraries = curses_libs) ) ! elif (self.compiler.find_library_file(lib_dirs, 'curses')) and platform != 'darwin1': # OSX has an old Berkeley curses, not good enough for the _curses module. if (self.compiler.find_library_file(lib_dirs, 'terminfo')): --- 411,415 ---- exts.append( Extension('_curses', ['_cursesmodule.c'], libraries = curses_libs) ) ! elif (self.compiler.find_library_file(lib_dirs, 'curses')) and platform[:6] != 'darwin': # OSX has an old Berkeley curses, not good enough for the _curses module. if (self.compiler.find_library_file(lib_dirs, 'terminfo')): From jackjansen@users.sourceforge.net Thu Dec 27 21:55:53 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Thu, 27 Dec 2001 13:55:53 -0800 Subject: [Python-checkins] CVS: python/dist/src configure.in,1.215.2.6,1.215.2.7 configure,1.207.2.6,1.207.2.7 Message-ID: Update of /cvsroot/python/python/dist/src In directory usw-pr-cvs1:/tmp/cvs-serv27379 Modified Files: Tag: release21-maint configure.in configure Log Message: A slightly different version of patch 489388 which addresses two MacOSX issues: - Use -flat-namespace linker option to allow building on 10.1 and later. - Allows it to build on 10.1.1 and later (which use a different version numbering scheme for "uname"). Anthony asked me to check this in. Index: configure.in =================================================================== RCS file: /cvsroot/python/python/dist/src/configure.in,v retrieving revision 1.215.2.6 retrieving revision 1.215.2.7 diff -C2 -d -r1.215.2.6 -r1.215.2.7 *** configure.in 2001/12/23 04:07:25 1.215.2.6 --- configure.in 2001/12/27 21:55:46 1.215.2.7 *************** *** 325,328 **** --- 325,332 ---- esac esac + case $ac_sys_system in + Darwin*) + OPT="$OPT -no-cpp-precomp";; + esac fi *************** *** 505,511 **** AC_SUBST(LIBTOOL_CRUFT) case $ac_sys_system/$ac_sys_release in ! Darwin/*) ns_undef_sym='_environ' LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;; next/4*) ns_undef_sym='__environ' --- 509,518 ---- AC_SUBST(LIBTOOL_CRUFT) case $ac_sys_system/$ac_sys_release in ! Darwin/1.3*) ns_undef_sym='_environ' LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;; + Darwin/*) + ns_undef_sym='_environ' + LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym" ;; next/4*) ns_undef_sym='__environ' *************** *** 522,526 **** # -U __environ is needed since bundles don't have access # to crt0 when built but will always be linked against it ! LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym" AC_DEFINE(WITH_NEXT_FRAMEWORK) AC_MSG_RESULT(yes) --- 529,536 ---- # -U __environ is needed since bundles don't have access # to crt0 when built but will always be linked against it ! case $ac_sys_system/$ac_sys_release in ! Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";; ! Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";; ! esac AC_DEFINE(WITH_NEXT_FRAMEWORK) AC_MSG_RESULT(yes) *************** *** 589,598 **** OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; DYNIX/ptx*) LDSHARED="ld -G";; ! Darwin/*|next/*) if test "$ns_dyld" then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress' else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; fi ! if test "$with_next_framework" ; then LDSHARED="$LDSHARED \$(LDLIBRARY)" fi ;; --- 599,613 ---- OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; DYNIX/ptx*) LDSHARED="ld -G";; ! Darwin/1.3*|next/*) if test "$ns_dyld" then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress' else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r'; fi ! if test "$with_next_framework" ; then ! LDSHARED="$LDSHARED \$(LDLIBRARY)" ! fi ;; ! Darwin/*) ! LDSHARED='$(CC) $(LDFLAGS) -flat_namespace -bundle -undefined suppress' ! if test "$with_next_framework" ; then LDSHARED="$LDSHARED \$(LDLIBRARY)" fi ;; Index: configure =================================================================== RCS file: /cvsroot/python/python/dist/src/configure,v retrieving revision 1.207.2.6 retrieving revision 1.207.2.7 diff -C2 -d -r1.207.2.6 -r1.207.2.7 *** configure 2001/12/23 04:07:22 1.207.2.6 --- configure 2001/12/27 21:55:46 1.207.2.7 *************** *** 1,5 **** #! /bin/sh ! # From configure.in Revision: 1.215.2.5 # Guess values for system-dependent variables and create Makefiles. --- 1,5 ---- #! /bin/sh ! # From configure.in Revision: 1.215.2.6 [...3905 lines suppressed...] if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 6369,6373 **** SRCDIRS="Parser Grammar Objects Python Modules" echo $ac_n "checking for build directories""... $ac_c" 1>&6 ! echo "configure:6372: checking for build directories" >&5 for dir in $SRCDIRS; do if test ! -d $dir; then --- 6384,6388 ---- SRCDIRS="Parser Grammar Objects Python Modules" echo $ac_n "checking for build directories""... $ac_c" 1>&6 ! echo "configure:6387: checking for build directories" >&5 for dir in $SRCDIRS; do if test ! -d $dir; then From jackjansen@users.sourceforge.net Thu Dec 27 23:01:19 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Thu, 27 Dec 2001 15:01:19 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Build PythonCore.mcp,1.31,1.32 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Build In directory usw-pr-cvs1:/tmp/cvs-serv16564/Build Modified Files: PythonCore.mcp Log Message: Merging changes from release22-branch. Index: PythonCore.mcp =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Build/PythonCore.mcp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 Binary files /tmp/cvsyF8xvL and /tmp/cvs8usX5n differ From jackjansen@users.sourceforge.net Thu Dec 27 23:01:19 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Thu, 27 Dec 2001 15:01:19 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac ReadMe,1.39,1.40 Relnotes,1.29,1.30 _checkversion.py,1.11,1.12 Message-ID: Update of /cvsroot/python/python/dist/src/Mac In directory usw-pr-cvs1:/tmp/cvs-serv16564 Modified Files: ReadMe Relnotes _checkversion.py Log Message: Merging changes from release22-branch. Index: ReadMe =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/ReadMe,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** ReadMe 2001/12/20 20:41:44 1.39 --- ReadMe 2001/12/27 23:01:17 1.40 *************** *** 1,8 **** ! How to install Python 2.2c1 on your Macintosh --------------------------------------------- - This is a release candidate for MacPython 2.2, please report any problems as - soon as possible, by email to pythonmac-sig@python.org. - This is a MacPython that can run on classic MacOS (from 8.1 onwards) and natively on MacOSX. The installer tries to work out whether you can --- 1,5 ---- ! How to install Python 2.2 on your Macintosh --------------------------------------------- This is a MacPython that can run on classic MacOS (from 8.1 onwards) and natively on MacOSX. The installer tries to work out whether you can *************** *** 33,41 **** This installer installs MacPython for classic PPC MacOS, MacPython for Carbon ! (OS X, OS 9 or OS8 with CarbonLib installed) or both, depending on your configuration. By selecting custom install you can bypass these tests and install what you want. ! If you want 68k support you will have to stay with MacPython 1.5.2. Toolbox module reorganization and more --- 30,38 ---- This installer installs MacPython for classic PPC MacOS, MacPython for Carbon ! (OS X, OS 9 or OS 8 with CarbonLib installed) or both, depending on your configuration. By selecting custom install you can bypass these tests and install what you want. ! If you want 68k support you will have get MacPython 1.5.2. Toolbox module reorganization and more *************** *** 44,49 **** You can safely skip this section if this is your first encounter with MacPython. ! I am working on a new organization of the mac-specific modules, and in ! general bringing the MacPython folder structure more in line with unix-Python. This is not only a good idea, it will also immensely facilitate moving MacPython functionality to an OSX Python that is based --- 41,46 ---- You can safely skip this section if this is your first encounter with MacPython. ! This release has a new organization of the mac-specific modules, and in ! general brings the MacPython folder structure more in line with unix-Python. This is not only a good idea, it will also immensely facilitate moving MacPython functionality to an OSX Python that is based *************** *** 93,96 **** --- 90,95 ---- linefeed convention of the file was. - Windows \r\n linefeeds are not supported and get turned into \n\n. + - in 2.3 this feature will be replaced by a more general, platform independent + way of handling files with foreign newline conventions. What to install *************** *** 170,187 **** ------------ ! Two items are installed in the system folder: the interpreter shared ! libraries PythonCore and PythonCoreCarbon lives in the Extensions ! folder and the "Python 2.2c1 Preferences" file in the Python subfolder in the Preferences folder. All the rest of Python lives in the folder you installed in. ! On OSX the libraries are installed in /Library/CFMSupport. There is a ! nasty bug in OSX that is triggered by Python: if any orphaned aliases ! are left in /Library/CFMSupport your machine will start to behave very ! badly. 2.1 beta installers triggered this problem if you simply threw ! away your Python folder, so if you installed a 2.1beta you should ! clean out the aliases in /Library/CFMSupport too. The final 2.1 and ! 2.1.1 installers always copied the shared libraries on OSX, so it does ! not have the problem anymore. Things to see --- 169,184 ---- ------------ ! Up to three items are installed in the system folder: the interpreter shared ! libraries PythonCore and PythonCoreCarbon live in the Extensions ! folder and the "Python 2.2 Preferences" file in the Python subfolder in the Preferences folder. All the rest of Python lives in the folder you installed in. ! On OSX the libraries are installed in /Library/CFMSupport. The ConfigurePython ! applets will complain if you have no right to create the libraries there ! (you need Admin privileges). This has one consequence: you will not be able to ! run applets unless they reside in the MacPython folder (such as the IDE or ! EditPythonPrefs). If you try to run an applet stored elsewhere you will ! get a "Cannot locate PythonCore" error message. Things to see *************** *** 222,228 **** are lost and you have to set them again. ! After you are satisfied that 2.2c1 works as expected you can trash anything in the system folder that has "python" in the name and not ! "2.2c1". The ConfigurePython... applets will try to detect incompatible --- 219,225 ---- are lost and you have to set them again. ! After you are satisfied that 2.2 works as expected you can trash anything in the system folder that has "python" in the name and not ! "2.2". The ConfigurePython... applets will try to detect incompatible *************** *** 279,285 **** Jack Jansen ! Oratrix Development BV ! Valeriusplein 30 ! Amsterdam the Netherlands --- 276,282 ---- Jack Jansen ! CWI ! Kruislaan 413 ! 1098 SJ Amsterdam the Netherlands Index: Relnotes =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Relnotes,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Relnotes 2001/12/20 20:41:44 1.29 --- Relnotes 2001/12/27 23:01:17 1.30 *************** *** 1,7 **** ! Changes in 2.2c1 since 2.1.1 ---------------------------- These release notes refer to Mac-specific changes only. See NEWS (in the Misc folder) ! for machine-independent changes. Changes that are new in 2.2c1 are flagged as such. --- 1,7 ---- ! Changes in 2.2 since 2.1.1 ---------------------------- These release notes refer to Mac-specific changes only. See NEWS (in the Misc folder) ! for machine-independent changes. *************** *** 12,22 **** to contribute. Aside from reducing clutter this change will also benefit the port to Mach-O/OSX Python later. ! - All toolbox modules have been updated to Universal Headers 3.4. [2.2c1] - Toolbox modules are weaklinked against InterfaceLib (for PPC builds) and raise ! an exception when you call an unimplemented one on an old MacOS. [2.2c1] - On input MacPython now accepts either \n (unix style) or \r (mac style) newlines for text files. This behaviour can be turned off with a preference. This is an experimental feature; again: feedback is requested. ! - The IDE looks better on OS X, but still not as good as on OS9. [2.2c1] - Command-dot handling has been improved a lot: scripts are now much easier to interrupt, and they only scan for cmd-. while in the foreground. --- 12,22 ---- to contribute. Aside from reducing clutter this change will also benefit the port to Mach-O/OSX Python later. ! - All toolbox modules have been updated to Universal Headers 3.4. - Toolbox modules are weaklinked against InterfaceLib (for PPC builds) and raise ! an exception when you call an unimplemented one on an old MacOS. - On input MacPython now accepts either \n (unix style) or \r (mac style) newlines for text files. This behaviour can be turned off with a preference. This is an experimental feature; again: feedback is requested. ! - The IDE looks better on OS X, but still not as good as on OS9. - Command-dot handling has been improved a lot: scripts are now much easier to interrupt, and they only scan for cmd-. while in the foreground. *************** *** 24,36 **** - This release should run on MacOS 8.1 again. - A new, rather different GUSI I/O library is used. ! - time.time() returns positive values again. [2.2c1] - There is a new module macresource which makes it easier to open a resource file accompanying your script when the script is not (yet) converted to an applet. This module will later also do the right thing in Mach-O/OSX Python. - (Carbon only) experimental modules Carbon.CG (CoreGraphics) and CarbonEvt have ! been added. [2.2c1] - A new, experimental module hfsplus is included, which gives access to some of the functionality of the HFS+ API. ! - A new, experimental module gives access to Carbon Events. [2.2c1] - Threads had a stack that was too small for many serious Python applications (20K). They now get 64K. There is still no overflow check, though. --- 24,36 ---- - This release should run on MacOS 8.1 again. - A new, rather different GUSI I/O library is used. ! - time.time() returns positive values again. - There is a new module macresource which makes it easier to open a resource file accompanying your script when the script is not (yet) converted to an applet. This module will later also do the right thing in Mach-O/OSX Python. - (Carbon only) experimental modules Carbon.CG (CoreGraphics) and CarbonEvt have ! been added. - A new, experimental module hfsplus is included, which gives access to some of the functionality of the HFS+ API. ! - A new, experimental module gives access to Carbon Events. - Threads had a stack that was too small for many serious Python applications (20K). They now get 64K. There is still no overflow check, though. *************** *** 53,61 **** the standard module findertools.py. - What is not in this distribution - -------------------------------- - - - The toolbox modules have not all been updated to Universal Header 3.4 or CarbonLib 1.4 yet. - Known problems -------------- --- 53,56 ---- *************** *** 66,70 **** - MacPython 2.2 (and MacPython 2.1) will not run correctly on a multiprocessor MacOS X machine, it will quickly deadlock during I/O operations. The GUSI I/O library is suspected, ! hints/clues/workarounds are solicited. - Tkinter does not work under Carbon. - The IDE and Tkinter do not work together. Run tkinter programs under PythonInterpreter. --- 61,66 ---- - MacPython 2.2 (and MacPython 2.1) will not run correctly on a multiprocessor MacOS X machine, it will quickly deadlock during I/O operations. The GUSI I/O library is suspected, ! hints/clues/workarounds are solicited. This problem also occurs intermittently on fast ! OS X single-processor machines. - Tkinter does not work under Carbon. - The IDE and Tkinter do not work together. Run tkinter programs under PythonInterpreter. Index: _checkversion.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/_checkversion.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** _checkversion.py 2001/10/23 22:21:10 1.11 --- _checkversion.py 2001/12/27 23:01:17 1.12 *************** *** 6,10 **** _PACKAGE="MacPython" ! _VERSION="2.2b1" _URL="http://www.cwi.nl/~jack/macpythonversion.txt" --- 6,10 ---- _PACKAGE="MacPython" ! _VERSION="2.2" _URL="http://www.cwi.nl/~jack/macpythonversion.txt" From jackjansen@users.sourceforge.net Thu Dec 27 23:01:20 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Thu, 27 Dec 2001 15:01:20 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Include macbuildno.h,1.23,1.24 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Include In directory usw-pr-cvs1:/tmp/cvs-serv16564/Include Modified Files: macbuildno.h Log Message: Merging changes from release22-branch. Index: macbuildno.h =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Include/macbuildno.h,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** macbuildno.h 2001/12/20 20:41:45 1.23 --- macbuildno.h 2001/12/27 23:01:18 1.24 *************** *** 1 **** ! #define BUILD 121 --- 1 ---- ! #define BUILD 124 From jackjansen@users.sourceforge.net Thu Dec 27 23:01:19 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Thu, 27 Dec 2001 15:01:19 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Distributions binary.exclude,1.11,1.12 binary.include,1.20,1.21 dev.exclude,1.8,1.9 dev.include,1.24,1.25 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Distributions In directory usw-pr-cvs1:/tmp/cvs-serv16564/Distributions Modified Files: binary.exclude binary.include dev.exclude dev.include Log Message: Merging changes from release22-branch. Index: binary.exclude =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/binary.exclude,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** binary.exclude 2001/12/20 20:41:44 1.11 --- binary.exclude 2001/12/27 23:01:17 1.12 *************** *** 35,36 **** --- 35,37 ---- Setup.in [(]*[)] + *~[0-9] Index: binary.include =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/binary.include,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** binary.include 2001/12/20 20:41:45 1.20 --- binary.include 2001/12/27 23:01:17 1.21 *************** *** 128,131 **** --- 128,132 ---- (':Mac:Contrib:Sherlock', '') (':Mac:Contrib:Tabcleaner', '') + (':Mac:Contrib:mpwsystem', '') (':Mac:Contrib:osam:OSAm.carbon.slb', '') (':Mac:Contrib:osam:OSAm.exp', None) *************** *** 150,153 **** --- 151,155 ---- (':Mac:ReadMe-dev', None) (':Mac:ReadMe-src', None) + (':Mac:ReadMe~0', None) (':Mac:ReadmeSource', None) (':Mac:Relnotes', ':Relnotes:') *************** *** 220,223 **** (':setup.py', None) (':site-packages', None) - (':Mac:ReadMe~0', None) - (':Mac:Contrib:mpwsystem', '') --- 222,223 ---- Index: dev.exclude =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/dev.exclude,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** dev.exclude 2001/11/30 14:16:29 1.8 --- dev.exclude 2001/12/27 23:01:17 1.9 *************** *** 18,19 **** --- 18,20 ---- CVS [(]*[)] + *~[0-9] Index: dev.include =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/dev.include,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** dev.include 2001/12/20 20:41:45 1.24 --- dev.include 2001/12/27 23:01:17 1.25 *************** *** 64,74 **** --- 64,77 ---- (':Mac:Build:Printing.mcp.exp', None) (':Mac:Build:Printing.mcp.xml', None) + (':Mac:Build:PythonCore.axp', None) (':Mac:Build:PythonCore.exp', None) (':Mac:Build:PythonCore.mcp', None) (':Mac:Build:PythonCoreCarbon.exp', None) (':Mac:Build:PythonInterpreter.mcp', None) + (':Mac:Build:PythonInterpreter.old.mcp', None) (':Mac:Build:PythonStandSmall.mcp', None) (':Mac:Build:PythonStandSmall.mcp~0', None) (':Mac:Build:PythonStandSmall.mcp~1', None) + (':Mac:Build:PythonStandSmall.old.mcp', None) (':Mac:Build:PythonStandalone.mcp', None) (':Mac:Build:PythonStandalone.mcp~0', None) *************** *** 105,108 **** --- 108,117 ---- (':Mac:Build:_CF.carbon.mcp.exp', None) (':Mac:Build:_CF.carbon.mcp.xml', None) + (':Mac:Build:_CG.carbon.mcp', None) + (':Mac:Build:_CG.carbon.mcp.exp', None) + (':Mac:Build:_CG.carbon.old.mcp', None) + (':Mac:Build:_CarbonEvt.carbon.mcp', None) + (':Mac:Build:_CarbonEvt.carbon.mcp.exp', None) + (':Mac:Build:_CarbonEvt.carbon.mcp.xml', None) (':Mac:Build:_Cm.carbon.mcp', None) (':Mac:Build:_Cm.carbon.mcp.exp', None) *************** *** 224,227 **** --- 233,237 ---- (':Mac:Build:_dummy_tkinter.mcp', None) (':Mac:Build:_dummy_tkinter.mcp.exp', None) + (':Mac:Build:_dummy_tkinter.old.mcp', None) (':Mac:Build:_hotshot.carbon.mcp', None) (':Mac:Build:_hotshot.carbon.mcp.exp', None) *************** *** 374,377 **** --- 384,388 ---- (':Mac:ReadMe-dev', ':') (':Mac:ReadMe-src', None) + (':Mac:ReadMe~0', None) (':Mac:Relnotes', None) (':Mac:Relnotes-source', None) *************** *** 530,533 **** --- 541,546 ---- (':Modules:threadmodule.c', None) (':Modules:timemodule.c', None) + (':Modules:timemodule.c~0', None) + (':Modules:timemodule.c~1', None) (':Modules:timing.h', None) (':Modules:timingmodule.c', None) *************** *** 601,615 **** (':setup.py', None) (':site-packages', None) - (':Mac:Build:_CG.carbon.old.mcp', None) - (':Mac:Build:_CG.carbon.mcp.exp', None) - (':Mac:Build:_CG.carbon.mcp', None) - (':Mac:Build:_CarbonEvt.carbon.mcp.xml', None) - (':Mac:Build:_CarbonEvt.carbon.mcp.exp', None) - (':Mac:Build:_CarbonEvt.carbon.mcp', None) - (':Mac:ReadMe~0', None) - (':Modules:timemodule.c~1', None) - (':Modules:timemodule.c~0', None) - (':Mac:Build:PythonStandSmall.old.mcp', None) - (':Mac:Build:PythonInterpreter.old.mcp', None) - (':Mac:Build:PythonCore.axp', None) - (':Mac:Build:_dummy_tkinter.old.mcp', None) --- 614,615 ---- From jackjansen@users.sourceforge.net Thu Dec 27 23:01:20 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Thu, 27 Dec 2001 15:01:20 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Distributions/(vise) Python 2.2.vct,1.7,1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Distributions/(vise) In directory usw-pr-cvs1:/tmp/cvs-serv16564/Distributions/(vise) Modified Files: Python 2.2.vct Log Message: Merging changes from release22-branch. Index: Python 2.2.vct =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Distributions/(vise)/Python 2.2.vct,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 Binary files /tmp/cvsHYLYxb and /tmp/cvsgO7qsj differ From jackjansen@users.sourceforge.net Thu Dec 27 23:01:20 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Thu, 27 Dec 2001 15:01:20 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Python macglue.c,1.109,1.110 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Python In directory usw-pr-cvs1:/tmp/cvs-serv16564/Python Modified Files: macglue.c Log Message: Merging changes from release22-branch. Index: macglue.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Python/macglue.c,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -d -r1.109 -r1.110 *** macglue.c 2001/12/10 16:08:06 1.109 --- macglue.c 2001/12/27 23:01:18 1.110 *************** *** 393,396 **** --- 393,407 ---- #if TARGET_API_MAC_OS8 + Point + LMGetMouse(void) + { + return LMGetMouseLocation(); + } + + long LMGetExpandMem(void) + { + return 0; + } + void c2pstrcpy(unsigned char *dst, const char *src) From jackjansen@users.sourceforge.net Thu Dec 27 23:35:44 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Thu, 27 Dec 2001 15:35:44 -0800 Subject: [Python-checkins] CVS: python/dist/src/Tools/modulator modulator.py,1.8,1.9 varsubst.py,1.2,1.3 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/modulator In directory usw-pr-cvs1:/tmp/cvs-serv25168 Modified Files: modulator.py varsubst.py Log Message: Patches by Jens B. Jorgensen with small mods by me: - Converted the templates to use ANSI C prototypes (finally!) - Use re in stead of deprecated regex Index: modulator.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/modulator.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** modulator.py 2001/07/20 18:57:32 1.8 --- modulator.py 2001/12/27 23:35:42 1.9 *************** *** 31,36 **** oops = 'oops' ! IDENTSTARTCHARS = string.ascii_letters + '_' ! IDENTCHARS = string.ascii_letters + string.digits + '_' # Check that string is a legal C identifier --- 31,36 ---- oops = 'oops' ! IDENTSTARTCHARS = string.letters + '_' ! IDENTCHARS = string.letters + string.digits + '_' # Check that string is a legal C identifier Index: varsubst.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/varsubst.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** varsubst.py 1998/04/10 19:15:27 1.2 --- varsubst.py 2001/12/27 23:35:42 1.3 *************** *** 3,8 **** # import string ! import regex ! import regsub error = 'varsubst.error' --- 3,7 ---- # import string ! import re error = 'varsubst.error' *************** *** 11,15 **** def __init__(self, dict): self.dict = dict ! self.prog = regex.compile('\$[a-zA-Z0-9_]*\$') self.do_useindent = 0 --- 10,14 ---- def __init__(self, dict): self.dict = dict ! self.prog = re.compile('\$([a-zA-Z0-9_]*)\$') self.do_useindent = 0 *************** *** 17,37 **** self.do_useindent = onoff ! def subst(self, str): rv = '' while 1: ! pos = self.prog.search(str) ! if pos < 0: ! return rv + str ! if pos: ! rv = rv + str[:pos] ! str = str[pos:] ! len = self.prog.match(str) ! if len == 2: # Escaped dollar rv = rv + '$' ! str = str[2:] continue ! name = str[1:len-1] ! str = str[len:] if not self.dict.has_key(name): raise error, 'No such variable: '+name --- 16,33 ---- self.do_useindent = onoff ! def subst(self, s): rv = '' while 1: ! m = self.prog.search(s) ! if not m: ! return rv + s ! rv = rv + s[:m.start()] ! s = s[m.end():] ! if m.end() - m.start() == 2: # Escaped dollar rv = rv + '$' ! s = s[2:] continue ! name = m.group(1) if not self.dict.has_key(name): raise error, 'No such variable: '+name *************** *** 45,49 **** lastnl = len(old) - lastnl sub = '\n' + (' '*lastnl) ! return regsub.gsub('\n', sub, value) def _test(): --- 41,45 ---- lastnl = len(old) - lastnl sub = '\n' + (' '*lastnl) ! return re.sub('\n', sub, value) def _test(): From jackjansen@users.sourceforge.net Thu Dec 27 23:35:45 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Thu, 27 Dec 2001 15:35:45 -0800 Subject: [Python-checkins] CVS: python/dist/src/Tools/modulator/Templates module_method,1.3,1.4 object_method,1.3,1.4 object_structure,1.2,1.3 object_tp_as_mapping,1.2,1.3 object_tp_as_number,1.2,1.3 object_tp_as_sequence,1.2,1.3 object_tp_call,1.2,1.3 object_tp_compare,1.1,1.2 object_tp_dealloc,1.2,1.3 object_tp_getattr,1.2,1.3 object_tp_hash,1.1,1.2 object_tp_print,1.1,1.2 object_tp_repr,1.2,1.3 object_tp_setattr,1.3,1.4 object_tp_str,1.1,1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Tools/modulator/Templates In directory usw-pr-cvs1:/tmp/cvs-serv25168/Templates Modified Files: module_method object_method object_structure object_tp_as_mapping object_tp_as_number object_tp_as_sequence object_tp_call object_tp_compare object_tp_dealloc object_tp_getattr object_tp_hash object_tp_print object_tp_repr object_tp_setattr object_tp_str Log Message: Patches by Jens B. Jorgensen with small mods by me: - Converted the templates to use ANSI C prototypes (finally!) - Use re in stead of deprecated regex Index: module_method =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/module_method,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** module_method 1995/06/20 12:25:59 1.3 --- module_method 2001/12/27 23:35:42 1.4 *************** *** 5,11 **** static PyObject * ! $abbrev$_$method$(self, args) ! PyObject *self; /* Not used */ ! PyObject *args; { --- 5,9 ---- static PyObject * ! $abbrev$_$method$(PyObject *self /* Not used */, PyObject *args) { Index: object_method =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/object_method,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** object_method 1995/06/20 12:26:02 1.3 --- object_method 2001/12/27 23:35:42 1.4 *************** *** 5,11 **** static PyObject * ! $abbrev$_$method$(self, args) ! $abbrev$object *self; ! PyObject *args; { if (!PyArg_ParseTuple(args, "")) --- 5,9 ---- static PyObject * ! $abbrev$_$method$($abbrev$object *self, PyObject *args) { if (!PyArg_ParseTuple(args, "")) Index: object_structure =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/object_structure,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** object_structure 1995/05/16 13:46:55 1.2 --- object_structure 2001/12/27 23:35:42 1.3 *************** *** 13,19 **** static PyObject * ! $abbrev$_getattr(self, name) ! $abbrev$object *self; ! char *name; { PyObject *rv; --- 13,17 ---- static PyObject * ! $abbrev$_getattr($abbrev$object *self, char *name) { PyObject *rv; *************** *** 29,36 **** static int ! $abbrev$_setattr(self, name, v) ! $abbrev$object *self; ! char *name; ! PyObject *v; { /* XXXX Add your own setattr code here */ --- 27,31 ---- static int ! $abbrev$_setattr($abbrev$object *self, char *name, PyObject *v) { /* XXXX Add your own setattr code here */ Index: object_tp_as_mapping =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/object_tp_as_mapping,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** object_tp_as_mapping 1995/05/16 13:46:57 1.2 --- object_tp_as_mapping 2001/12/27 23:35:42 1.3 *************** *** 3,8 **** static int ! $abbrev$_length(self) ! $abbrev$object *self; { /* XXXX Return the size of the mapping */ --- 3,7 ---- static int ! $abbrev$_length($abbrev$object *self) { /* XXXX Return the size of the mapping */ *************** *** 10,16 **** static PyObject * ! $abbrev$_subscript(self, key) ! $abbrev$object *self; ! PyObject *key; { /* XXXX Return the item of self indexed by key */ --- 9,13 ---- static PyObject * ! $abbrev$_subscript($abbrev$object *self, PyObject *key) { /* XXXX Return the item of self indexed by key */ *************** *** 18,24 **** static int ! $abbrev$_ass_sub(self, v, w) ! $abbrev$object *self; ! PyObject *v, *w; { /* XXXX Put w in self under key v */ --- 15,19 ---- static int ! $abbrev$_ass_sub($abbrev$object *self, PyObject *v, PyObject *w) { /* XXXX Put w in self under key v */ Index: object_tp_as_number =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/object_tp_as_number,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** object_tp_as_number 1995/05/16 13:46:58 1.2 --- object_tp_as_number 2001/12/27 23:35:42 1.3 *************** *** 3,9 **** static PyObject * ! $abbrev$_add(v, w) ! $abbrev$object *v; ! $abbrev$object *w; { /* XXXX Add them */ --- 3,7 ---- static PyObject * ! $abbrev$_add($abbrev$object *v, $abbrev$object *w) { /* XXXX Add them */ *************** *** 11,17 **** static PyObject * ! $abbrev$_sub(v, w) ! $abbrev$object *v; ! $abbrev$object *w; { /* XXXX Subtract them */ --- 9,13 ---- static PyObject * ! $abbrev$_sub($abbrev$object *v, $abbrev$object *w) { /* XXXX Subtract them */ *************** *** 19,25 **** static PyObject * ! $abbrev$_mul(v, w) ! $abbrev$object *v; ! $abbrev$object *w; { /* XXXX Multiply them */ --- 15,19 ---- static PyObject * ! $abbrev$_mul($abbrev$object *v, $abbrev$object *w) { /* XXXX Multiply them */ *************** *** 27,33 **** static PyObject * ! $abbrev$_div(x, y) ! $abbrev$object *x; ! $abbrev$object *y; { /* XXXX Divide them */ --- 21,25 ---- static PyObject * ! $abbrev$_div($abbrev$object *x, $abbrev$object *y) { /* XXXX Divide them */ *************** *** 35,41 **** static PyObject * ! $abbrev$_mod(x, y) ! $abbrev$object *x; ! $abbrev$object *y; { /* XXXX Modulo them */ --- 27,31 ---- static PyObject * ! $abbrev$_mod($abbrev$object *x, $abbrev$object *y) { /* XXXX Modulo them */ *************** *** 43,49 **** static PyObject * ! $abbrev$_divmod(x, y) ! $abbrev$object *x; ! $abbrev$object *y; { /* XXXX Return 2-tuple with div and mod */ --- 33,37 ---- static PyObject * ! $abbrev$_divmod($abbrev$object *x, $abbrev$object *y) { /* XXXX Return 2-tuple with div and mod */ *************** *** 51,58 **** static PyObject * ! $abbrev$_pow(v, w, z) ! $abbrev$object *v; ! $abbrev$object *w; ! $abbrev$object *z; { /* XXXX */ --- 39,43 ---- static PyObject * ! $abbrev$_pow($abbrev$object *v, $abbrev$object *w, $abbrev$object *z) { /* XXXX */ *************** *** 60,65 **** static PyObject * ! $abbrev$_neg(v) ! $abbrev$object *v; { /* XXXX */ --- 45,49 ---- static PyObject * ! $abbrev$_neg($abbrev$object *v) { /* XXXX */ *************** *** 67,72 **** static PyObject * ! $abbrev$_pos(v) ! $abbrev$object *v; { /* XXXX */ --- 51,55 ---- static PyObject * ! $abbrev$_pos($abbrev$object *v) { /* XXXX */ *************** *** 74,79 **** static PyObject * ! $abbrev$_abs(v) ! $abbrev$object *v; { /* XXXX */ --- 57,61 ---- static PyObject * ! $abbrev$_abs($abbrev$object *v) { /* XXXX */ *************** *** 81,86 **** static int ! $abbrev$_nonzero(v) ! $abbrev$object *v; { /* XXXX Return 1 if non-zero */ --- 63,67 ---- static int ! $abbrev$_nonzero($abbrev$object *v) { /* XXXX Return 1 if non-zero */ *************** *** 88,93 **** static PyObject * ! $abbrev$_invert(v) ! $abbrev$object *v; { /* XXXX */ --- 69,73 ---- static PyObject * ! $abbrev$_invert($abbrev$object *v) { /* XXXX */ *************** *** 95,101 **** static PyObject * ! $abbrev$_lshift(v, w) ! $abbrev$object *v; ! $abbrev$object *w; { /* XXXX */ --- 75,79 ---- static PyObject * ! $abbrev$_lshift($abbrev$object *v, $abbrev$object *w) { /* XXXX */ *************** *** 103,109 **** static PyObject * ! $abbrev$_rshift(v, w) ! $abbrev$object *v; ! $abbrev$object *w; { /* XXXX */ --- 81,85 ---- static PyObject * ! $abbrev$_rshift($abbrev$object *v, $abbrev$object *w) { /* XXXX */ *************** *** 111,117 **** static PyObject * ! $abbrev$_and(v, w) ! $abbrev$object *v; ! $abbrev$object *w; { /* XXXX */ --- 87,91 ---- static PyObject * ! $abbrev$_and($abbrev$object *v, $abbrev$object *w) { /* XXXX */ *************** *** 119,125 **** static PyObject * ! $abbrev$_xor(v, w) ! $abbrev$object *v; ! $abbrev$object *w; { /* XXXX */ --- 93,97 ---- static PyObject * ! $abbrev$_xor($abbrev$object *v, $abbrev$object *w) { /* XXXX */ *************** *** 127,133 **** static PyObject * ! $abbrev$_or(v, w) ! $abbrev$object *v; ! $abbrev$object *w; { /* XXXX */ --- 99,103 ---- static PyObject * ! $abbrev$_or($abbrev$object *v, $abbrev$object *w) { /* XXXX */ *************** *** 135,141 **** static int ! $abbrev$_coerce(pv, pw) ! PyObject **pv; ! PyObject **pw; { /* XXXX I haven't a clue... */ --- 105,109 ---- static int ! $abbrev$_coerce(PyObject **pv, PyObject **pw) { /* XXXX I haven't a clue... */ *************** *** 144,149 **** static PyObject * ! $abbrev$_int(v) ! $abbrev$object *v; { /* XXXX */ --- 112,116 ---- static PyObject * ! $abbrev$_int($abbrev$object *v) { /* XXXX */ *************** *** 151,156 **** static PyObject * ! $abbrev$_long(v) ! $abbrev$object *v; { /* XXXX */ --- 118,122 ---- static PyObject * ! $abbrev$_long($abbrev$object *v) { /* XXXX */ *************** *** 158,163 **** static PyObject * ! $abbrev$_float(v) ! $abbrev$object *v; { /* XXXX */ --- 124,128 ---- static PyObject * ! $abbrev$_float($abbrev$object *v) { /* XXXX */ *************** *** 165,170 **** static PyObject * ! $abbrev$_oct(v) ! $abbrev$object *v; { /* XXXX Return object as octal stringobject */ --- 130,134 ---- static PyObject * ! $abbrev$_oct($abbrev$object *v) { /* XXXX Return object as octal stringobject */ *************** *** 172,177 **** static PyObject * ! $abbrev$_hex(v) ! $abbrev$object *v; { /* XXXX Return object as hex stringobject */ --- 136,140 ---- static PyObject * ! $abbrev$_hex($abbrev$object *v) { /* XXXX Return object as hex stringobject */ Index: object_tp_as_sequence =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/object_tp_as_sequence,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** object_tp_as_sequence 1995/05/16 13:46:59 1.2 --- object_tp_as_sequence 2001/12/27 23:35:42 1.3 *************** *** 3,8 **** static int ! $abbrev$_length(self) ! $abbrev$object *self; { /* XXXX Return the size of the object */ --- 3,7 ---- static int ! $abbrev$_length($abbrev$object *self) { /* XXXX Return the size of the object */ *************** *** 10,16 **** static PyObject * ! $abbrev$_concat(self, bb) ! $abbrev$object *self; ! PyObject *bb; { /* XXXX Return the concatenation of self and bb */ --- 9,13 ---- static PyObject * ! $abbrev$_concat($abbrev$object *self, PyObject *bb) { /* XXXX Return the concatenation of self and bb */ *************** *** 18,24 **** static PyObject * ! $abbrev$_repeat(self, n) ! $abbrev$object *self; ! int n; { /* XXXX Return a new object that is n times self */ --- 15,19 ---- static PyObject * ! $abbrev$_repeat($abbrev$object *self, int n) { /* XXXX Return a new object that is n times self */ *************** *** 26,32 **** static PyObject * ! $abbrev$_item(self, i) ! $abbrev$object *self; ! int i; { /* XXXX Return the i-th object of self */ --- 21,25 ---- static PyObject * ! $abbrev$_item($abbrev$object *self, int i) { /* XXXX Return the i-th object of self */ *************** *** 34,40 **** static PyObject * ! $abbrev$_slice(self, ilow, ihigh) ! $abbrev$object *self; ! int ilow, ihigh; { /* XXXX Return the ilow..ihigh slice of self in a new object */ --- 27,31 ---- static PyObject * ! $abbrev$_slice($abbrev$object *self, int ilow, int ihigh) { /* XXXX Return the ilow..ihigh slice of self in a new object */ *************** *** 42,49 **** static int ! $abbrev$_ass_item(self, i, v) ! $abbrev$object *self; ! int i; ! PyObject *v; { /* XXXX Assign to the i-th element of self */ --- 33,37 ---- static int ! $abbrev$_ass_item($abbrev$object *self, int i, PyObject *v) { /* XXXX Assign to the i-th element of self */ *************** *** 52,59 **** static int ! $abbrev$_ass_slice(self, ilow, ihigh, v) ! PyListObject *self; ! int ilow, ihigh; ! PyObject *v; { /* XXXX Replace ilow..ihigh slice of self with v */ --- 40,44 ---- static int ! $abbrev$_ass_slice(PyListObject *self, int ilow, int ihigh, PyObject *v) { /* XXXX Replace ilow..ihigh slice of self with v */ Index: object_tp_call =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/object_tp_call,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** object_tp_call 1995/10/12 13:45:25 1.2 --- object_tp_call 2001/12/27 23:35:42 1.3 *************** *** 1,8 **** static PyObject * ! $abbrev$_call(self, args, kwargs) ! $abbrev$object *self; ! PyObject *args; ! PyObject *kwargs; { /* XXXX Return the result of calling self with argument args */ --- 1,5 ---- static PyObject * ! $abbrev$_call($abbrev$object *self, PyObject *args, PyObject *kwargs) { /* XXXX Return the result of calling self with argument args */ Index: object_tp_compare =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/object_tp_compare,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** object_tp_compare 1995/03/02 14:05:23 1.1 --- object_tp_compare 2001/12/27 23:35:42 1.2 *************** *** 1,6 **** static int ! $abbrev$_compare(v, w) ! $abbrev$object *v, *w; { /* XXXX Compare objects and return -1, 0 or 1 */ --- 1,5 ---- static int ! $abbrev$_compare($abbrev$object *v, $abbrev$object *w) { /* XXXX Compare objects and return -1, 0 or 1 */ Index: object_tp_dealloc =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/object_tp_dealloc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** object_tp_dealloc 1995/05/16 13:47:00 1.2 --- object_tp_dealloc 2001/12/27 23:35:43 1.3 *************** *** 1,6 **** static void ! $abbrev$_dealloc(self) ! $abbrev$object *self; { /* XXXX Add your own cleanup code here */ --- 1,5 ---- static void ! $abbrev$_dealloc($abbrev$object *self) { /* XXXX Add your own cleanup code here */ Index: object_tp_getattr =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/object_tp_getattr,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** object_tp_getattr 1995/05/16 13:47:01 1.2 --- object_tp_getattr 2001/12/27 23:35:43 1.3 *************** *** 1,7 **** static PyObject * ! $abbrev$_getattr(self, name) ! $abbrev$object *self; ! char *name; { /* XXXX Add your own getattr code here */ --- 1,5 ---- static PyObject * ! $abbrev$_getattr($abbrev$object *self, char *name) { /* XXXX Add your own getattr code here */ Index: object_tp_hash =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/object_tp_hash,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** object_tp_hash 1995/03/02 14:05:26 1.1 --- object_tp_hash 2001/12/27 23:35:43 1.2 *************** *** 1,6 **** static long ! $abbrev$_hash(self) ! $abbrev$object *self; { /* XXXX Return a hash of self (or -1) */ --- 1,5 ---- static long ! $abbrev$_hash($abbrev$object *self) { /* XXXX Return a hash of self (or -1) */ Index: object_tp_print =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/object_tp_print,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** object_tp_print 1995/03/02 14:05:27 1.1 --- object_tp_print 2001/12/27 23:35:43 1.2 *************** *** 1,8 **** static int ! $abbrev$_print(self, fp, flags) ! $abbrev$object *self; ! FILE *fp; ! int flags; { /* XXXX Add code here to print self to fp */ --- 1,5 ---- static int ! $abbrev$_print($abbrev$object *self, FILE *fp, int flags) { /* XXXX Add code here to print self to fp */ Index: object_tp_repr =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/object_tp_repr,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** object_tp_repr 1995/05/16 13:47:02 1.2 --- object_tp_repr 2001/12/27 23:35:43 1.3 *************** *** 1,6 **** static PyObject * ! $abbrev$_repr(self) ! $abbrev$object *self; { PyObject *s; --- 1,5 ---- static PyObject * ! $abbrev$_repr($abbrev$object *self) { PyObject *s; Index: object_tp_setattr =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/object_tp_setattr,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** object_tp_setattr 1995/10/23 13:52:52 1.3 --- object_tp_setattr 2001/12/27 23:35:43 1.4 *************** *** 1,8 **** static int ! $abbrev$_setattr(self, name, v) ! $abbrev$object *self; ! char *name; ! PyObject *v; { /* Set attribute 'name' to value 'v'. v==NULL means delete */ --- 1,5 ---- static int ! $abbrev$_setattr($abbrev$object *self, char *name, PyObject *v) { /* Set attribute 'name' to value 'v'. v==NULL means delete */ Index: object_tp_str =================================================================== RCS file: /cvsroot/python/python/dist/src/Tools/modulator/Templates/object_tp_str,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** object_tp_str 1995/06/20 12:42:39 1.1 --- object_tp_str 2001/12/27 23:35:43 1.2 *************** *** 1,6 **** static PyObject * ! $abbrev$_str(self) ! $abbrev$object *self; { PyObject *s; --- 1,5 ---- static PyObject * ! $abbrev$_str($abbrev$object *self) { PyObject *s; From jackjansen@users.sourceforge.net Thu Dec 27 23:37:51 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Thu, 27 Dec 2001 15:37:51 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc ACKS,1.149,1.150 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv25609 Modified Files: ACKS Log Message: Added someone. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.149 retrieving revision 1.150 diff -C2 -d -r1.149 -r1.150 *** ACKS 2001/12/20 15:56:23 1.149 --- ACKS 2001/12/27 23:37:49 1.150 *************** *** 224,227 **** --- 224,228 ---- Richard Jones Lucas de Jonge + Jens B. Jorgensen John Jorgensen Andreas Jung From fdrake@users.sourceforge.net Fri Dec 28 04:27:48 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 20:27:48 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/texinputs boilerplate.tex,1.70.2.1,1.70.2.1.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/texinputs In directory usw-pr-cvs1:/tmp/cvs-serv3960/texinputs Modified Files: Tag: release22-maint boilerplate.tex Log Message: Bump version info for maintenance branch. Index: boilerplate.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/texinputs/boilerplate.tex,v retrieving revision 1.70.2.1 retrieving revision 1.70.2.1.2.1 diff -C2 -d -r1.70.2.1 -r1.70.2.1.2.1 *** boilerplate.tex 2001/12/21 04:13:27 1.70.2.1 --- boilerplate.tex 2001/12/28 04:27:46 1.70.2.1.2.1 *************** *** 6,11 **** } ! \date{December 21, 2001} % XXX update before release! ! \release{2.2} % software release, not documentation ! \setreleaseinfo{} % empty for final release \setshortversion{2.2} % major.minor only for software --- 6,11 ---- } ! \date{\today} % XXX update before release! ! \release{2.2.1} % software release, not documentation ! \setreleaseinfo{--} % empty for final release \setshortversion{2.2} % major.minor only for software From fdrake@users.sourceforge.net Fri Dec 28 04:27:48 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 20:27:48 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc Makefile,1.235.2.1,1.235.2.1.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc In directory usw-pr-cvs1:/tmp/cvs-serv3960 Modified Files: Tag: release22-maint Makefile Log Message: Bump version info for maintenance branch. Index: Makefile =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/Makefile,v retrieving revision 1.235.2.1 retrieving revision 1.235.2.1.2.1 diff -C2 -d -r1.235.2.1 -r1.235.2.1.2.1 *** Makefile 2001/12/21 04:13:27 1.235.2.1 --- Makefile 2001/12/28 04:27:45 1.235.2.1.2.1 *************** *** 67,71 **** # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.2 PYTHON= python --- 67,71 ---- # This is the *documentation* release, and is used to construct the file # names of the downloadable tarballs. ! RELEASE=2.2.1-- PYTHON= python From fdrake@users.sourceforge.net Fri Dec 28 04:29:24 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 20:29:24 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc ACKS,1.33,1.33.6.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc In directory usw-pr-cvs1:/tmp/cvs-serv4240 Modified Files: Tag: release22-maint ACKS Log Message: Merge names added on the trunk (contributions are being merged as well). Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ACKS,v retrieving revision 1.33 retrieving revision 1.33.6.1 diff -C2 -d -r1.33 -r1.33.6.1 *** ACKS 2001/12/07 18:27:38 1.33 --- ACKS 2001/12/28 04:29:22 1.33.6.1 *************** *** 45,48 **** --- 45,49 ---- Andrew Dalke Ben Darnell + L. Peter Deutsch Robert Donohue Fred L. Drake, Jr. *************** *** 86,89 **** --- 87,91 ---- Randall Hopper Michael Hudson + Eric Huss Jeremy Hylton Roger Irwin From fdrake@users.sourceforge.net Fri Dec 28 04:30:41 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 20:30:41 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/api abstract.tex,1.8,1.8.6.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/api In directory usw-pr-cvs1:/tmp/cvs-serv4543/api Modified Files: Tag: release22-maint abstract.tex Log Message: Close an improperly-closed verbatim environment. This closes SF patch #496215. Add a little more detail to the example that had not been closed. Index: abstract.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/api/abstract.tex,v retrieving revision 1.8 retrieving revision 1.8.6.1 diff -C2 -d -r1.8 -r1.8.6.1 *** abstract.tex 2001/11/28 07:26:14 1.8 --- abstract.tex 2001/12/28 04:30:38 1.8.6.1 *************** *** 861,864 **** --- 861,867 ---- while (item = PyIter_Next(iter)) { /* do something with item */ + ... + /* release reference when done */ + Py_DECREF(item); } if (PyErr_Occurred()) { *************** *** 868,871 **** --- 871,876 ---- /* continue doing useful work */ } + \end{verbatim} + \section{Buffer Protocol \label{abstract-buffer}} *************** *** 898,902 **** buffer interface. Otherwise returns \code{0}. \versionadded{2.2} ! \enc{cfuncdesc} \begin{cfuncdesc}{int}{PyObject_AsWriteBuffer}{PyObject *obj, --- 903,907 ---- buffer interface. Otherwise returns \code{0}. \versionadded{2.2} ! \end{cfuncdesc} \begin{cfuncdesc}{int}{PyObject_AsWriteBuffer}{PyObject *obj, *************** *** 910,913 **** \versionadded{1.6} \end{cfuncdesc} - - \end{verbatim} --- 915,916 ---- From fdrake@users.sourceforge.net Fri Dec 28 04:31:39 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 20:31:39 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcurses.tex,1.37,1.37.6.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv4704/lib Modified Files: Tag: release22-maint libcurses.tex Log Message: Fix wrongly-named formal parameters in three places: begin_y was used twice instead of begin_y and begin_x for derwin(), subpad(), and subwin(). Reported for derwin() by Eric Huss. Added class annotations for the window methods so they would be properly described in the index. Index: libcurses.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcurses.tex,v retrieving revision 1.37 retrieving revision 1.37.6.1 diff -C2 -d -r1.37 -r1.37.6.1 *** libcurses.tex 2001/11/28 07:26:15 1.37 --- libcurses.tex 2001/12/28 04:31:36 1.37.6.1 *************** *** 542,546 **** following methods: ! \begin{methoddesc}{addch}{\optional{y, x,} ch\optional{, attr}} \note{A \emph{character} means a C character (an \ASCII{} code), rather then a Python character (a string of length 1). --- 542,546 ---- following methods: ! \begin{methoddesc}[window]{addch}{\optional{y, x,} ch\optional{, attr}} \note{A \emph{character} means a C character (an \ASCII{} code), rather then a Python character (a string of length 1). *************** *** 554,558 **** \end{methoddesc} ! \begin{methoddesc}{addnstr}{\optional{y, x,} str, n\optional{, attr}} Paint at most \var{n} characters of the string \var{str} at \code{(\var{y}, \var{x})} with attributes --- 554,558 ---- \end{methoddesc} ! \begin{methoddesc}[window]{addnstr}{\optional{y, x,} str, n\optional{, attr}} Paint at most \var{n} characters of the string \var{str} at \code{(\var{y}, \var{x})} with attributes *************** *** 560,584 **** \end{methoddesc} ! \begin{methoddesc}{addstr}{\optional{y, x,} str\optional{, attr}} Paint the string \var{str} at \code{(\var{y}, \var{x})} with attributes \var{attr}, overwriting anything previously on the display. \end{methoddesc} ! \begin{methoddesc}{attroff}{attr} Remove attribute \var{attr} from the ``background'' set applied to all writes to the current window. \end{methoddesc} ! \begin{methoddesc}{attron}{attr} Add attribute \var{attr} from the ``background'' set applied to all writes to the current window. \end{methoddesc} ! \begin{methoddesc}{attrset}{attr} Set the ``background'' set of attributes to \var{attr}. This set is initially 0 (no attributes). \end{methoddesc} ! \begin{methoddesc}{bkgd}{ch\optional{, attr}} Sets the background property of the window to the character \var{ch}, with attributes \var{attr}. The change is then applied to every --- 560,584 ---- \end{methoddesc} ! \begin{methoddesc}[window]{addstr}{\optional{y, x,} str\optional{, attr}} Paint the string \var{str} at \code{(\var{y}, \var{x})} with attributes \var{attr}, overwriting anything previously on the display. \end{methoddesc} ! \begin{methoddesc}[window]{attroff}{attr} Remove attribute \var{attr} from the ``background'' set applied to all writes to the current window. \end{methoddesc} ! \begin{methoddesc}[window]{attron}{attr} Add attribute \var{attr} from the ``background'' set applied to all writes to the current window. \end{methoddesc} ! \begin{methoddesc}[window]{attrset}{attr} Set the ``background'' set of attributes to \var{attr}. This set is initially 0 (no attributes). \end{methoddesc} ! \begin{methoddesc}[window]{bkgd}{ch\optional{, attr}} Sets the background property of the window to the character \var{ch}, with attributes \var{attr}. The change is then applied to every *************** *** 595,599 **** \end{methoddesc} ! \begin{methoddesc}{bkgdset}{ch\optional{, attr}} Sets the window's background. A window's background consists of a character and any combination of attributes. The attribute part of --- 595,599 ---- \end{methoddesc} ! \begin{methoddesc}[window]{bkgdset}{ch\optional{, attr}} Sets the window's background. A window's background consists of a character and any combination of attributes. The attribute part of *************** *** 606,612 **** \end{methoddesc} ! \begin{methoddesc}{border}{\optional{ls\optional{, rs\optional{, ts\optional{, ! bs\optional{, tl\optional{, tr\optional{, ! bl\optional{, br}}}}}}}}} Draw a border around the edges of the window. Each parameter specifies the character to use for a specific part of the border; see the table --- 606,612 ---- \end{methoddesc} ! \begin{methoddesc}[window]{border}{\optional{ls\optional{, rs\optional{, ! ts\optional{, bs\optional{, tl\optional{, ! tr\optional{, bl\optional{, br}}}}}}}}} Draw a border around the edges of the window. Each parameter specifies the character to use for a specific part of the border; see the table *************** *** 630,634 **** \end{methoddesc} ! \begin{methoddesc}{box}{\optional{vertch, horch}} Similar to \method{border()}, but both \var{ls} and \var{rs} are \var{vertch} and both \var{ts} and {bs} are \var{horch}. The default --- 630,634 ---- \end{methoddesc} ! \begin{methoddesc}[window]{box}{\optional{vertch, horch}} Similar to \method{border()}, but both \var{ls} and \var{rs} are \var{vertch} and both \var{ts} and {bs} are \var{horch}. The default *************** *** 636,673 **** \end{methoddesc} ! \begin{methoddesc}{clear}{} Like \method{erase()}, but also causes the whole window to be repainted upon next call to \method{refresh()}. \end{methoddesc} ! \begin{methoddesc}{clearok}{yes} If \var{yes} is 1, the next call to \method{refresh()} will clear the window completely. \end{methoddesc} ! \begin{methoddesc}{clrtobot}{} Erase from cursor to the end of the window: all lines below the cursor are deleted, and then the equivalent of \method{clrtoeol()} is performed. \end{methoddesc} ! \begin{methoddesc}{clrtoeol}{} Erase from cursor to the end of the line. \end{methoddesc} ! \begin{methoddesc}{cursyncup}{} Updates the current cursor position of all the ancestors of the window to reflect the current cursor position of the window. \end{methoddesc} ! \begin{methoddesc}{delch}{\optional{x, y}} Delete any character at \code{(\var{y}, \var{x})}. \end{methoddesc} ! \begin{methoddesc}{deleteln}{} Delete the line under the cursor. All following lines are moved up by 1 line. \end{methoddesc} ! \begin{methoddesc}{derwin}{\optional{nlines, ncols,} begin_y, begin_y} An abbreviation for ``derive window'', \method{derwin()} is the same as calling \method{subwin()}, except that \var{begin_y} and --- 636,673 ---- \end{methoddesc} ! \begin{methoddesc}[window]{clear}{} Like \method{erase()}, but also causes the whole window to be repainted upon next call to \method{refresh()}. \end{methoddesc} ! \begin{methoddesc}[window]{clearok}{yes} If \var{yes} is 1, the next call to \method{refresh()} will clear the window completely. \end{methoddesc} ! \begin{methoddesc}[window]{clrtobot}{} Erase from cursor to the end of the window: all lines below the cursor are deleted, and then the equivalent of \method{clrtoeol()} is performed. \end{methoddesc} ! \begin{methoddesc}[window]{clrtoeol}{} Erase from cursor to the end of the line. \end{methoddesc} ! \begin{methoddesc}[window]{cursyncup}{} Updates the current cursor position of all the ancestors of the window to reflect the current cursor position of the window. \end{methoddesc} ! \begin{methoddesc}[window]{delch}{\optional{x, y}} Delete any character at \code{(\var{y}, \var{x})}. \end{methoddesc} ! \begin{methoddesc}[window]{deleteln}{} Delete the line under the cursor. All following lines are moved up by 1 line. \end{methoddesc} ! \begin{methoddesc}[window]{derwin}{\optional{nlines, ncols,} begin_y, begin_x} An abbreviation for ``derive window'', \method{derwin()} is the same as calling \method{subwin()}, except that \var{begin_y} and *************** *** 677,686 **** \end{methoddesc} ! \begin{methoddesc}{echochar}{ch\optional{, attr}} Add character \var{ch} with attribute \var{attr}, and immediately call \method{refresh()} on the window. \end{methoddesc} ! \begin{methoddesc}{enclose}{y, x} Tests whether the given pair of screen-relative character-cell coordinates are enclosed by the given window, returning true or --- 677,686 ---- \end{methoddesc} ! \begin{methoddesc}[window]{echochar}{ch\optional{, attr}} Add character \var{ch} with attribute \var{attr}, and immediately call \method{refresh()} on the window. \end{methoddesc} ! \begin{methoddesc}[window]{enclose}{y, x} Tests whether the given pair of screen-relative character-cell coordinates are enclosed by the given window, returning true or *************** *** 689,702 **** \end{methoddesc} ! \begin{methoddesc}{erase}{} Clear the window. \end{methoddesc} ! \begin{methoddesc}{getbegyx}{} Return a tuple \code{(\var{y}, \var{x})} of co-ordinates of upper-left corner. \end{methoddesc} ! \begin{methoddesc}{getch}{\optional{x, y}} Get a character. Note that the integer returned does \emph{not} have to be in \ASCII{} range: function keys, keypad keys and so on return numbers --- 689,702 ---- \end{methoddesc} ! \begin{methoddesc}[window]{erase}{} Clear the window. \end{methoddesc} ! \begin{methoddesc}[window]{getbegyx}{} Return a tuple \code{(\var{y}, \var{x})} of co-ordinates of upper-left corner. \end{methoddesc} ! \begin{methoddesc}[window]{getch}{\optional{x, y}} Get a character. Note that the integer returned does \emph{not} have to be in \ASCII{} range: function keys, keypad keys and so on return numbers *************** *** 705,709 **** \end{methoddesc} ! \begin{methoddesc}{getkey}{\optional{x, y}} Get a character, returning a string instead of an integer, as \method{getch()} does. Function keys, keypad keys and so on return a --- 705,709 ---- \end{methoddesc} ! \begin{methoddesc}[window]{getkey}{\optional{x, y}} Get a character, returning a string instead of an integer, as \method{getch()} does. Function keys, keypad keys and so on return a *************** *** 712,721 **** \end{methoddesc} ! \begin{methoddesc}{getmaxyx}{} Return a tuple \code{(\var{y}, \var{x})} of the height and width of the window. \end{methoddesc} ! \begin{methoddesc}{getparyx}{} Returns the beginning coordinates of this window relative to its parent window into two integer variables y and x. Returns --- 712,721 ---- \end{methoddesc} ! \begin{methoddesc}[window]{getmaxyx}{} Return a tuple \code{(\var{y}, \var{x})} of the height and width of the window. \end{methoddesc} ! \begin{methoddesc}[window]{getparyx}{} Returns the beginning coordinates of this window relative to its parent window into two integer variables y and x. Returns *************** *** 723,741 **** \end{methoddesc} ! \begin{methoddesc}{getstr}{\optional{x, y}} Read a string from the user, with primitive line editing capacity. \end{methoddesc} ! \begin{methoddesc}{getyx}{} Return a tuple \code{(\var{y}, \var{x})} of current cursor position relative to the window's upper-left corner. \end{methoddesc} ! \begin{methoddesc}{hline}{\optional{y, x,} ch, n} Display a horizontal line starting at \code{(\var{y}, \var{x})} with length \var{n} consisting of the character \var{ch}. \end{methoddesc} ! \begin{methoddesc}{idcok}{flag} If \var{flag} is false, curses no longer considers using the hardware insert/delete character feature of the terminal; if \var{flag} is --- 723,741 ---- \end{methoddesc} ! \begin{methoddesc}[window]{getstr}{\optional{x, y}} Read a string from the user, with primitive line editing capacity. \end{methoddesc} ! \begin{methoddesc}[window]{getyx}{} Return a tuple \code{(\var{y}, \var{x})} of current cursor position relative to the window's upper-left corner. \end{methoddesc} ! \begin{methoddesc}[window]{hline}{\optional{y, x,} ch, n} Display a horizontal line starting at \code{(\var{y}, \var{x})} with length \var{n} consisting of the character \var{ch}. \end{methoddesc} ! \begin{methoddesc}[window]{idcok}{flag} If \var{flag} is false, curses no longer considers using the hardware insert/delete character feature of the terminal; if \var{flag} is *************** *** 745,749 **** \end{methoddesc} ! \begin{methoddesc}{idlok}{yes} If called with \var{yes} equal to 1, \module{curses} will try and use hardware line editing facilities. Otherwise, line insertion/deletion --- 745,749 ---- \end{methoddesc} ! \begin{methoddesc}[window]{idlok}{yes} If called with \var{yes} equal to 1, \module{curses} will try and use hardware line editing facilities. Otherwise, line insertion/deletion *************** *** 751,755 **** \end{methoddesc} ! \begin{methoddesc}{immedok}{flag} If \var{flag} is true, any change in the window image automatically causes the window to be refreshed; you no longer --- 751,755 ---- \end{methoddesc} ! \begin{methoddesc}[window]{immedok}{flag} If \var{flag} is true, any change in the window image automatically causes the window to be refreshed; you no longer *************** *** 759,768 **** \end{methoddesc} ! \begin{methoddesc}{inch}{\optional{x, y}} Return the character at the given position in the window. The bottom 8 bits are the character proper, and upper bits are the attributes. \end{methoddesc} ! \begin{methoddesc}{insch}{\optional{y, x,} ch\optional{, attr}} Paint character \var{ch} at \code{(\var{y}, \var{x})} with attributes \var{attr}, moving the line from position \var{x} right by one --- 759,768 ---- \end{methoddesc} ! \begin{methoddesc}[window]{inch}{\optional{x, y}} Return the character at the given position in the window. The bottom 8 bits are the character proper, and upper bits are the attributes. \end{methoddesc} ! \begin{methoddesc}[window]{insch}{\optional{y, x,} ch\optional{, attr}} Paint character \var{ch} at \code{(\var{y}, \var{x})} with attributes \var{attr}, moving the line from position \var{x} right by one *************** *** 770,774 **** \end{methoddesc} ! \begin{methoddesc}{insdelln}{nlines} Inserts \var{nlines} lines into the specified window above the current line. The \var{nlines} bottom lines are lost. For negative --- 770,774 ---- \end{methoddesc} ! \begin{methoddesc}[window]{insdelln}{nlines} Inserts \var{nlines} lines into the specified window above the current line. The \var{nlines} bottom lines are lost. For negative *************** *** 778,787 **** \end{methoddesc} ! \begin{methoddesc}{insertln}{} Insert a blank line under the cursor. All following lines are moved down by 1 line. \end{methoddesc} ! \begin{methoddesc}{insnstr}{\optional{y, x, } str, n \optional{, attr}} Insert a character string (as many characters as will fit on the line) before the character under the cursor, up to \var{n} characters. --- 778,787 ---- \end{methoddesc} ! \begin{methoddesc}[window]{insertln}{} Insert a blank line under the cursor. All following lines are moved down by 1 line. \end{methoddesc} ! \begin{methoddesc}[window]{insnstr}{\optional{y, x,} str, n \optional{, attr}} Insert a character string (as many characters as will fit on the line) before the character under the cursor, up to \var{n} characters. *************** *** 794,798 **** \end{methoddesc} ! \begin{methoddesc}{insstr}{\optional{y, x, } str \optional{, attr}} Insert a character string (as many characters as will fit on the line) before the character under the cursor. All characters to the right of --- 794,798 ---- \end{methoddesc} ! \begin{methoddesc}[window]{insstr}{\optional{y, x, } str \optional{, attr}} Insert a character string (as many characters as will fit on the line) before the character under the cursor. All characters to the right of *************** *** 802,806 **** \end{methoddesc} ! \begin{methoddesc}{instr}{\optional{y, x} \optional{, n}} Returns a string of characters, extracted from the window starting at the current cursor position, or at \var{y}, \var{x} if specified. --- 802,806 ---- \end{methoddesc} ! \begin{methoddesc}[window]{instr}{\optional{y, x} \optional{, n}} Returns a string of characters, extracted from the window starting at the current cursor position, or at \var{y}, \var{x} if specified. *************** *** 810,814 **** \end{methoddesc} ! \begin{methoddesc}{is_linetouched}{\var{line}} Returns true if the specified line was modified since the last call to \method{refresh()}; otherwise returns false. Raises a --- 810,814 ---- \end{methoddesc} ! \begin{methoddesc}[window]{is_linetouched}{\var{line}} Returns true if the specified line was modified since the last call to \method{refresh()}; otherwise returns false. Raises a *************** *** 817,826 **** \end{methoddesc} ! \begin{methoddesc}{is_wintouched}{} Returns true if the specified window was modified since the last call to \method{refresh()}; otherwise returns false. \end{methoddesc} ! \begin{methoddesc}{keypad}{yes} If \var{yes} is 1, escape sequences generated by some keys (keypad, function keys) will be interpreted by \module{curses}. --- 817,826 ---- \end{methoddesc} ! \begin{methoddesc}[window]{is_wintouched}{} Returns true if the specified window was modified since the last call to \method{refresh()}; otherwise returns false. \end{methoddesc} ! \begin{methoddesc}[window]{keypad}{yes} If \var{yes} is 1, escape sequences generated by some keys (keypad, function keys) will be interpreted by \module{curses}. *************** *** 829,833 **** \end{methoddesc} ! \begin{methoddesc}{leaveok}{yes} If \var{yes} is 1, cursor is left where it is on update, instead of being at ``cursor position.'' This reduces cursor movement where --- 829,833 ---- \end{methoddesc} ! \begin{methoddesc}[window]{leaveok}{yes} If \var{yes} is 1, cursor is left where it is on update, instead of being at ``cursor position.'' This reduces cursor movement where *************** *** 838,846 **** \end{methoddesc} ! \begin{methoddesc}{move}{new_y, new_x} Move cursor to \code{(\var{new_y}, \var{new_x})}. \end{methoddesc} ! \begin{methoddesc}{mvderwin}{y, x} Moves the window inside its parent window. The screen-relative parameters of the window are not changed. This routine is used to --- 838,846 ---- \end{methoddesc} ! \begin{methoddesc}[window]{move}{new_y, new_x} Move cursor to \code{(\var{new_y}, \var{new_x})}. \end{methoddesc} ! \begin{methoddesc}[window]{mvderwin}{y, x} Moves the window inside its parent window. The screen-relative parameters of the window are not changed. This routine is used to *************** *** 849,862 **** \end{methoddesc} ! \begin{methoddesc}{mvwin}{new_y, new_x} Move the window so its upper-left corner is at \code{(\var{new_y}, \var{new_x})}. \end{methoddesc} ! \begin{methoddesc}{nodelay}{yes} If \var{yes} is \code{1}, \method{getch()} will be non-blocking. \end{methoddesc} ! \begin{methoddesc}{notimeout}{yes} If \var{yes} is \code{1}, escape sequences will not be timed out. --- 849,862 ---- \end{methoddesc} ! \begin{methoddesc}[window]{mvwin}{new_y, new_x} Move the window so its upper-left corner is at \code{(\var{new_y}, \var{new_x})}. \end{methoddesc} ! \begin{methoddesc}[window]{nodelay}{yes} If \var{yes} is \code{1}, \method{getch()} will be non-blocking. \end{methoddesc} ! \begin{methoddesc}[window]{notimeout}{yes} If \var{yes} is \code{1}, escape sequences will not be timed out. *************** *** 865,869 **** \end{methoddesc} ! \begin{methoddesc}{noutrefresh}{} Mark for refresh but wait. This function updates the data structure representing the desired state of the window, but does not force --- 865,869 ---- \end{methoddesc} ! \begin{methoddesc}[window]{noutrefresh}{} Mark for refresh but wait. This function updates the data structure representing the desired state of the window, but does not force *************** *** 872,877 **** \end{methoddesc} ! \begin{methoddesc}{overlay}{destwin\optional{, sminrow, smincol, ! dminrow, dmincol, dmaxrow, dmaxcol}} Overlay the window on top of \var{destwin}. The windows need not be the same size, only the overlapping region is copied. This copy is --- 872,877 ---- \end{methoddesc} ! \begin{methoddesc}[window]{overlay}{destwin\optional{, sminrow, smincol, ! dminrow, dmincol, dmaxrow, dmaxcol}} Overlay the window on top of \var{destwin}. The windows need not be the same size, only the overlapping region is copied. This copy is *************** *** 885,890 **** \end{methoddesc} ! \begin{methoddesc}{overwrite}{destwin\optional{, sminrow, smincol, ! dminrow, dmincol, dmaxrow, dmaxcol}} Overwrite the window on top of \var{destwin}. The windows need not be the same size, in which case only the overlapping region is --- 885,890 ---- \end{methoddesc} ! \begin{methoddesc}[window]{overwrite}{destwin\optional{, sminrow, smincol, ! dminrow, dmincol, dmaxrow, dmaxcol}} Overwrite the window on top of \var{destwin}. The windows need not be the same size, in which case only the overlapping region is *************** *** 898,909 **** \end{methoddesc} ! \begin{methoddesc}{putwin}{file} Writes all data associated with the window into the provided file object. This information can be later retrieved using the \function{getwin()} function. - \end{methoddesc} ! \begin{methoddesc}{redrawln}{beg, num} Indicates that the \var{num} screen lines, starting at line \var{beg}, are corrupted and should be completely redrawn on the next --- 898,908 ---- \end{methoddesc} ! \begin{methoddesc}[window]{putwin}{file} Writes all data associated with the window into the provided file object. This information can be later retrieved using the \function{getwin()} function. \end{methoddesc} ! \begin{methoddesc}[window]{redrawln}{beg, num} Indicates that the \var{num} screen lines, starting at line \var{beg}, are corrupted and should be completely redrawn on the next *************** *** 911,921 **** \end{methoddesc} ! \begin{methoddesc}{redrawwin}{} Touches the entire window, causing it to be completely redrawn on the next \method{refresh()} call. \end{methoddesc} ! \begin{methoddesc}{refresh}{\optional{pminrow, pmincol, sminrow, ! smincol, smaxrow, smaxcol}} Update the display immediately (sync actual screen with previous drawing/deleting methods). --- 910,920 ---- \end{methoddesc} ! \begin{methoddesc}[window]{redrawwin}{} Touches the entire window, causing it to be completely redrawn on the next \method{refresh()} call. \end{methoddesc} ! \begin{methoddesc}[window]{refresh}{\optional{pminrow, pmincol, sminrow, ! smincol, smaxrow, smaxcol}} Update the display immediately (sync actual screen with previous drawing/deleting methods). *************** *** 935,943 **** \end{methoddesc} ! \begin{methoddesc}{scroll}{\optional{lines\code{ = 1}}} Scroll the screen or scrolling region upward by \var{lines} lines. \end{methoddesc} ! \begin{methoddesc}{scrollok}{flag} Controls what happens when the cursor of a window is moved off the edge of the window or scrolling region, either as a result of a --- 934,942 ---- \end{methoddesc} ! \begin{methoddesc}[window]{scroll}{\optional{lines\code{ = 1}}} Scroll the screen or scrolling region upward by \var{lines} lines. \end{methoddesc} ! \begin{methoddesc}[window]{scrollok}{flag} Controls what happens when the cursor of a window is moved off the edge of the window or scrolling region, either as a result of a *************** *** 950,968 **** \end{methoddesc} ! \begin{methoddesc}{setscrreg}{top, bottom} Set the scrolling region from line \var{top} to line \var{bottom}. All scrolling actions will take place in this region. \end{methoddesc} ! \begin{methoddesc}{standend}{} Turn off the standout attribute. On some terminals this has the side effect of turning off all attributes. \end{methoddesc} ! \begin{methoddesc}{standout}{} Turn on attribute \var{A_STANDOUT}. \end{methoddesc} ! \begin{methoddesc}{subpad}{\optional{nlines, ncols,} begin_y, begin_y} Return a sub-window, whose upper-left corner is at \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is --- 949,967 ---- \end{methoddesc} ! \begin{methoddesc}[window]{setscrreg}{top, bottom} Set the scrolling region from line \var{top} to line \var{bottom}. All scrolling actions will take place in this region. \end{methoddesc} ! \begin{methoddesc}[window]{standend}{} Turn off the standout attribute. On some terminals this has the side effect of turning off all attributes. \end{methoddesc} ! \begin{methoddesc}[window]{standout}{} Turn on attribute \var{A_STANDOUT}. \end{methoddesc} ! \begin{methoddesc}[window]{subpad}{\optional{nlines, ncols,} begin_y, begin_x} Return a sub-window, whose upper-left corner is at \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is *************** *** 970,974 **** \end{methoddesc} ! \begin{methoddesc}{subwin}{\optional{nlines, ncols,} begin_y, begin_y} Return a sub-window, whose upper-left corner is at \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is --- 969,973 ---- \end{methoddesc} ! \begin{methoddesc}[window]{subwin}{\optional{nlines, ncols,} begin_y, begin_x} Return a sub-window, whose upper-left corner is at \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is *************** *** 979,983 **** \end{methoddesc} ! \begin{methoddesc}{syncdown}{} Touches each location in the window that has been touched in any of its ancestor windows. This routine is called by \method{refresh()}, --- 978,982 ---- \end{methoddesc} ! \begin{methoddesc}[window]{syncdown}{} Touches each location in the window that has been touched in any of its ancestor windows. This routine is called by \method{refresh()}, *************** *** 985,999 **** \end{methoddesc} ! \begin{methoddesc}{syncok}{flag} If called with \var{flag} set to true, then \method{syncup()} is called automatically whenever there is a change in the window. \end{methoddesc} ! \begin{methoddesc}{syncup}{} Touches all locations in ancestors of the window that have been changed in the window. \end{methoddesc} ! \begin{methoddesc}{timeout}{delay} Sets blocking or non-blocking read behavior for the window. If \var{delay} is negative, blocking read is used, which will wait --- 984,998 ---- \end{methoddesc} ! \begin{methoddesc}[window]{syncok}{flag} If called with \var{flag} set to true, then \method{syncup()} is called automatically whenever there is a change in the window. \end{methoddesc} ! \begin{methoddesc}[window]{syncup}{} Touches all locations in ancestors of the window that have been changed in the window. \end{methoddesc} ! \begin{methoddesc}[window]{timeout}{delay} Sets blocking or non-blocking read behavior for the window. If \var{delay} is negative, blocking read is used, which will wait *************** *** 1005,1024 **** \end{methoddesc} ! \begin{methoddesc}{touchline}{start, count} Pretend \var{count} lines have been changed, starting with line \var{start}. \end{methoddesc} ! \begin{methoddesc}{touchwin}{} Pretend the whole window has been changed, for purposes of drawing optimizations. \end{methoddesc} ! \begin{methoddesc}{untouchwin}{} Marks all lines in the window as unchanged since the last call to \method{refresh()}. \end{methoddesc} ! \begin{methoddesc}{vline}{\optional{y, x,} ch, n} Display a vertical line starting at \code{(\var{y}, \var{x})} with length \var{n} consisting of the character \var{ch}. --- 1004,1023 ---- \end{methoddesc} ! \begin{methoddesc}[window]{touchline}{start, count} Pretend \var{count} lines have been changed, starting with line \var{start}. \end{methoddesc} ! \begin{methoddesc}[window]{touchwin}{} Pretend the whole window has been changed, for purposes of drawing optimizations. \end{methoddesc} ! \begin{methoddesc}[window]{untouchwin}{} Marks all lines in the window as unchanged since the last call to \method{refresh()}. \end{methoddesc} ! \begin{methoddesc}[window]{vline}{\optional{y, x,} ch, n} Display a vertical line starting at \code{(\var{y}, \var{x})} with length \var{n} consisting of the character \var{ch}. From fdrake@users.sourceforge.net Fri Dec 28 04:33:05 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 20:33:05 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libcmd.tex,1.11,1.11.16.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv4889/lib Modified Files: Tag: release22-maint libcmd.tex Log Message: Elaborate the descriptions for onecmd(), precmd(), and postcmd() so they are useful. Index: libcmd.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libcmd.tex,v retrieving revision 1.11 retrieving revision 1.11.16.1 diff -C2 -d -r1.11 -r1.11.16.1 *** libcmd.tex 2001/07/29 03:41:23 1.11 --- libcmd.tex 2001/12/28 04:33:03 1.11.16.1 *************** *** 23,27 **** and \module{readline} is available, command completion is done automatically. - \end{classdesc} --- 23,26 ---- *************** *** 73,78 **** \begin{methoddesc}{onecmd}{str} ! Interpret the argument as though it had been typed in in ! response to the prompt. \end{methoddesc} --- 72,80 ---- \begin{methoddesc}{onecmd}{str} ! Interpret the argument as though it had been typed in response to the ! prompt. This may be overridden, but should not normally need to be; ! see the \method{precmd()} and \method{postcmd()} methods for useful ! execution hooks. The return value is a flag indicating whether ! interpretation of commands by the interpreter should stop. \end{methoddesc} *************** *** 95,109 **** \end{methoddesc} ! \begin{methoddesc}{precmd}{} ! Hook method executed just before the command line is interpreted, but ! after the input prompt is generated and issued. This method is a stub in \class{Cmd}; it exists to be overridden by ! subclasses. \end{methoddesc} ! \begin{methoddesc}{postcmd}{} Hook method executed just after a command dispatch is finished. This method is a stub in \class{Cmd}; it exists to be overridden by ! subclasses. \end{methoddesc} --- 97,120 ---- \end{methoddesc} ! \begin{methoddesc}{precmd}{line} ! Hook method executed just before the command line \var{line} is ! interpreted, but after the input prompt is generated and issued. This method is a stub in \class{Cmd}; it exists to be overridden by ! subclasses. The return value is used as the command which will be ! executed by the \method{onecmd()} method; the \method{precmd()} ! implementation may re-write the command or simply return \var{line} ! unchanged. \end{methoddesc} ! \begin{methoddesc}{postcmd}{stop, line} Hook method executed just after a command dispatch is finished. This method is a stub in \class{Cmd}; it exists to be overridden by ! subclasses. \var{line} is the command line which was executed, and ! \var{stop} is a flag which indicates whether execution will be ! terminated after the call to \method{postcmd()}; this will be the ! return value of the \method{onecmd()} method. The return value of ! this method will be used as the new value for the internal flag which ! corresponds to \var{stop}; returning false will cause interpretation ! to continue. \end{methoddesc} From fdrake@users.sourceforge.net Fri Dec 28 04:35:12 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 20:35:12 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libftplib.tex,1.33,1.33.16.1 libhttplib.tex,1.28.4.1,1.28.4.1.2.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv5173/lib Modified Files: Tag: release22-maint libftplib.tex libhttplib.tex Log Message: Fixed up some index entries. Index: libftplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libftplib.tex,v retrieving revision 1.33 retrieving revision 1.33.16.1 diff -C2 -d -r1.33 -r1.33.16.1 *** libftplib.tex 2001/08/04 22:22:45 1.33 --- libftplib.tex 2001/12/28 04:35:10 1.33.16.1 *************** *** 5,12 **** \modulesynopsis{FTP protocol client (requires sockets).} This module defines the class \class{FTP} and a few related items. The \class{FTP} class implements the client side of the FTP ! protocol.\indexii{FTP}{protocol} You can use this to write Python programs that perform a variety of automated FTP jobs, such as mirroring other ftp servers. It is also used by the module --- 5,14 ---- \modulesynopsis{FTP protocol client (requires sockets).} + \indexii{FTP}{protocol} + \index{FTP!\module{ftplib} (standard module)} This module defines the class \class{FTP} and a few related items. The \class{FTP} class implements the client side of the FTP ! protocol. You can use this to write Python programs that perform a variety of automated FTP jobs, such as mirroring other ftp servers. It is also used by the module Index: libhttplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libhttplib.tex,v retrieving revision 1.28.4.1 retrieving revision 1.28.4.1.2.1 diff -C2 -d -r1.28.4.1 -r1.28.4.1.2.1 *** libhttplib.tex 2001/12/21 03:51:53 1.28.4.1 --- libhttplib.tex 2001/12/28 04:35:10 1.28.4.1.2.1 *************** *** 6,9 **** --- 6,10 ---- \indexii{HTTP}{protocol} + \index{HTTP!\module{httplib} (standard module)} This module defines classes which implement the client side of the From fdrake@users.sourceforge.net Fri Dec 28 04:35:45 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 20:35:45 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/ref ref7.tex,1.29,1.29.8.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/ref In directory usw-pr-cvs1:/tmp/cvs-serv5257/ref Modified Files: Tag: release22-maint ref7.tex Log Message: Added some missing index entries, noted by L. Peter Deutsch. Index: ref7.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref7.tex,v retrieving revision 1.29 retrieving revision 1.29.8.1 diff -C2 -d -r1.29 -r1.29.8.1 *** ref7.tex 2001/10/20 04:19:51 1.29 --- ref7.tex 2001/12/28 04:35:43 1.29.8.1 *************** *** 299,302 **** --- 299,303 ---- \section{Function definitions\label{function}} \indexii{function}{definition} + \stindex{def} A function definition defines a user-defined function object (see *************** *** 394,397 **** --- 395,399 ---- \section{Class definitions\label{class}} \indexii{class}{definition} + \stindex{class} A class definition defines a class object (see section \ref{types}): From fdrake@users.sourceforge.net Fri Dec 28 04:36:16 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 20:36:16 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/tools buildindex.py,1.11,1.11.26.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/tools In directory usw-pr-cvs1:/tmp/cvs-serv5343/tools Modified Files: Tag: release22-maint buildindex.py Log Message: Make this do the right thing with entries which start with the percent sign, in response to Skip's comments in SF bug #487165. Make use of string methods instead of string module functions in most places. Add (and make the default) a way to collapse symbol entries into a single "Symbols" section in the generated index. This is similar to what makeindex does, but does not include entries beginning with an underscore. Index: buildindex.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/tools/buildindex.py,v retrieving revision 1.11 retrieving revision 1.11.26.1 diff -C2 -d -r1.11 -r1.11.26.1 *** buildindex.py 2000/04/03 04:19:14 1.11 --- buildindex.py 2001/12/28 04:36:14 1.11.26.1 *************** *** 9,12 **** --- 9,16 ---- + bang_join = "!".join + null_join = "".join + + class Node: __rmjunk = re.compile("<#\d+#>") *************** *** 39,51 **** def __repr__(self): ! return "" % (string.join(self.text, '!'), self.seqno) def __str__(self): ! return string.join(self.key, '!') def dump(self): return "%s\1%s###%s\n" \ % (string.join(self.links, "\1"), ! string.join(self.text, '!'), self.seqno) --- 43,55 ---- def __repr__(self): ! return "" % (bang_join(self.text), self.seqno) def __str__(self): ! return bang_join(self.key) def dump(self): return "%s\1%s###%s\n" \ % (string.join(self.links, "\1"), ! bang_join(self.text), self.seqno) *************** *** 55,60 **** if result == 0: return 0 ! l1 = string.lower(s1) ! l2 = string.lower(s2) minlen = min(len(s1), len(s2)) if len(s1) < len(s2) and l1 == l2[:len(s1)]: --- 59,64 ---- if result == 0: return 0 ! l1 = s1.lower() ! l2 = s2.lower() minlen = min(len(s1), len(s2)) if len(s1) < len(s2) and l1 == l2[:len(s1)]: *************** *** 69,74 **** def split_entry(str, which): stuff = [] ! parts = string.split(str, '!') ! parts = map(string.split, parts, ['@'] * len(parts)) for entry in parts: if len(entry) != 1: --- 73,78 ---- def split_entry(str, which): stuff = [] ! parts = str.split('!') ! parts = [part.split('@') for part in parts] for entry in parts: if len(entry) != 1: *************** *** 89,95 **** m = _rmtt.match(parts[i]) if m: ! parts[i] = string.join(m.group(1, 2, 3), '') else: ! parts[i] = string.lower(parts[i]) # remove '()' from the key: parts[i] = _rmparens.sub('', parts[i]) --- 93,99 ---- m = _rmtt.match(parts[i]) if m: ! parts[i] = null_join(m.group(1, 2, 3)) else: ! parts[i] = parts[i].lower() # remove '()' from the key: parts[i] = _rmparens.sub('', parts[i]) *************** *** 101,105 **** m = _rmtt.match(str) if m: ! str = string.join(m.group(1, 2, 3), '') return split_entry(str, 1) --- 105,109 ---- m = _rmtt.match(str) if m: ! str = null_join(m.group(1, 2, 3)) return split_entry(str, 1) *************** *** 122,133 **** # ignore $ to keep environment variables with the # leading letter from the name ! s = string.lower(s) ! if s[0] == "$": ! return s[1:] else: ! return s def get_first_letter(s): ! return string.lower(trim_ignored_letters(s)[0]) --- 126,139 ---- # ignore $ to keep environment variables with the # leading letter from the name ! if s.startswith("$"): ! return s[1:].lower() else: ! return s.lower() def get_first_letter(s): ! if s.startswith(""): ! return "%" ! else: ! return trim_ignored_letters(s)[0] *************** *** 150,153 **** --- 156,169 ---- + def group_symbols(groups): + entries = [] + ident_letters = string.ascii_letters + "_" + while groups[0][0] not in ident_letters: + entries += groups[0][1] + del groups[0] + if entries: + groups.insert(0, ("Symbols", entries)) + + # need a function to separate the nodes into columns... def split_columns(nodes, columns=1): *************** *** 156,161 **** # This is a rough height; we may have to increase to avoid breaks before # a subitem. ! colheight = len(nodes) / columns ! numlong = len(nodes) % columns if numlong: colheight = colheight + 1 --- 172,177 ---- # This is a rough height; we may have to increase to avoid breaks before # a subitem. ! colheight = int(len(nodes) / columns) ! numlong = int(len(nodes) % columns) if numlong: colheight = colheight + 1 *************** *** 170,174 **** colheight = colheight - 1 try: ! numshort = len(nodes) / colheight except ZeroDivisionError: cols = cols + (columns - len(cols)) * [[]] --- 186,190 ---- colheight = colheight - 1 try: ! numshort = int(len(nodes) / colheight) except ZeroDivisionError: cols = cols + (columns - len(cols)) * [[]] *************** *** 236,240 **** append("\n") append("" * (level + 1)) ! return string.join(strings, '') --- 252,256 ---- append("\n") append("" * (level + 1)) ! return null_join(strings) *************** *** 244,251 **** if columns > 1: colnos = range(columns) ! colheight = len(nodes) / columns if len(nodes) % columns: colheight = colheight + 1 ! colwidth = 100 / columns append('
') for col in split_columns(nodes, columns): --- 260,267 ---- if columns > 1: colnos = range(columns) ! colheight = int(len(nodes) / columns) if len(nodes) % columns: colheight = colheight + 1 ! colwidth = int(100 / columns) append('
') for col in split_columns(nodes, columns): *************** *** 257,261 **** append(format_column(nodes)) append("\n

\n") ! return string.join(strings, '') --- 273,277 ---- append(format_column(nodes)) append("\n

\n") ! return null_join(strings) *************** *** 266,276 **** lettername = "_ (underscore)" else: ! lettername = string.upper(letter) return "\n


\n

%s

\n\n" \ % (letter, lettername) ! def format_html_letters(nodes, columns=1): letter_groups = split_letters(nodes) items = [] for letter, nodes in letter_groups: --- 282,294 ---- lettername = "_ (underscore)" else: ! lettername = letter.capitalize() return "\n
\n

%s

\n\n" \ % (letter, lettername) ! def format_html_letters(nodes, columns, group_symbol_nodes): letter_groups = split_letters(nodes) + if group_symbol_nodes: + group_symbols(letter_groups) items = [] for letter, nodes in letter_groups: *************** *** 281,285 **** s.append(format_letter(letter)) s.append(format_nodes(nodes, columns)) ! return string.join(s, '') def format_html(nodes, columns): --- 299,303 ---- s.append(format_letter(letter)) s.append(format_nodes(nodes, columns)) ! return null_join(s) def format_html(nodes, columns): *************** *** 309,317 **** ! def process_nodes(nodes, columns, letters): nodes.sort() collapse(nodes) if letters: ! return format_html_letters(nodes, columns) else: return format_html(nodes, columns) --- 327,335 ---- ! def process_nodes(nodes, columns, letters=0, group_symbol_nodes=0): nodes.sort() collapse(nodes) if letters: ! return format_html_letters(nodes, columns, group_symbol_nodes) else: return format_html(nodes, columns) *************** *** 324,336 **** columns = 1 letters = 0 opts, args = getopt.getopt(sys.argv[1:], "c:lo:", ! ["columns=", "letters", "output="]) for opt, val in opts: if opt in ("-o", "--output"): ofn = val elif opt in ("-c", "--columns"): ! columns = string.atoi(val) elif opt in ("-l", "--letters"): letters = 1 if not args: args = [ifn] --- 342,360 ---- columns = 1 letters = 0 + group_symbol_nodes = 1 opts, args = getopt.getopt(sys.argv[1:], "c:lo:", ! ["columns=", "dont-group-symbols", ! "group-symbols", "letters", "output="]) for opt, val in opts: if opt in ("-o", "--output"): ofn = val elif opt in ("-c", "--columns"): ! columns = int(val, 10) elif opt in ("-l", "--letters"): letters = 1 + elif opt == "--group-symbols": + group_symbol_nodes = 1 + elif opt == "--dont-group-symbols": + group_symbol_nodes = 0 if not args: args = [ifn] *************** *** 339,343 **** nodes = nodes + load(open(fn)) num_nodes = len(nodes) ! html = process_nodes(nodes, columns, letters) program = os.path.basename(sys.argv[0]) if ofn == "-": --- 363,367 ---- nodes = nodes + load(open(fn)) num_nodes = len(nodes) ! html = process_nodes(nodes, columns, letters, group_symbol_nodes) program = os.path.basename(sys.argv[0]) if ofn == "-": From fdrake@users.sourceforge.net Fri Dec 28 04:37:39 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 20:37:39 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libstdtypes.tex,1.80,1.80.6.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv5569/lib Modified Files: Tag: release22-maint libstdtypes.tex Log Message: Added index entries similar to some recommended by Skip, and used the word "interpolation" in the text, to make the string formatting material easier to find. This closes SF bug #487165. Index: libstdtypes.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libstdtypes.tex,v retrieving revision 1.80 retrieving revision 1.80.6.1 diff -C2 -d -r1.80 -r1.80.6.1 *** libstdtypes.tex 2001/12/10 16:43:08 1.80 --- libstdtypes.tex 2001/12/28 04:37:37 1.80.6.1 *************** *** 682,699 **** \index{formatting, string (\%{})} \index{string!formatting} \index{printf-style formatting} \index{sprintf-style formatting} \index{\protect\%{} formatting} String and Unicode objects have one unique built-in operation: the ! \code{\%} operator (modulo). Given \code{\var{format} \% ! \var{values}} (where \var{format} is a string or Unicode object), ! \code{\%} conversion specifications in \var{format} are replaced with ! zero or more elements of \var{values}. The effect is similar to the ! using \cfunction{sprintf()} in the C language. If \var{format} is a ! Unicode object, or if any of the objects being converted using the ! \code{\%s} conversion are Unicode objects, the result will be a ! Unicode object as well. If \var{format} requires a single argument, \var{values} may be a --- 682,703 ---- \index{formatting, string (\%{})} + \index{interpolation, string (\%{})} \index{string!formatting} + \index{string!interpolation} \index{printf-style formatting} \index{sprintf-style formatting} \index{\protect\%{} formatting} + \index{\protect\%{} interpolation} String and Unicode objects have one unique built-in operation: the ! \code{\%} operator (modulo). This is also known as the string ! \emph{formatting} or \emph{interpolation} operator. Given ! \code{\var{format} \% \var{values}} (where \var{format} is a string or ! Unicode object), \code{\%} conversion specifications in \var{format} ! are replaced with zero or more elements of \var{values}. The effect ! is similar to the using \cfunction{sprintf()} in the C language. If ! \var{format} is a Unicode object, or if any of the objects being ! converted using the \code{\%s} conversion are Unicode objects, the ! result will be a Unicode object as well. If \var{format} requires a single argument, \var{values} may be a From fdrake@users.sourceforge.net Fri Dec 28 04:42:12 2001 From: fdrake@users.sourceforge.net (Fred L. Drake) Date: Thu, 27 Dec 2001 20:42:12 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libsocket.tex,1.58,1.58.6.1 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv6305/lib Modified Files: Tag: release22-maint libsocket.tex Log Message: Add note that fromfd() is Unix-specific. This fixes SF bug #495896. Fix up various markup consistency & style guide conformance nits. Index: libsocket.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libsocket.tex,v retrieving revision 1.58 retrieving revision 1.58.6.1 diff -C2 -d -r1.58 -r1.58.6.1 *** libsocket.tex 2001/12/05 05:25:59 1.58 --- libsocket.tex 2001/12/28 04:42:10 1.58.6.1 *************** *** 91,110 **** \begin{excdesc}{herror} This exception is raised for address-related errors, i.e. for ! functions that use \var{h_errno} in C API, including ! \function{gethostbyname_ex} and \function{gethostbyaddr}. The accompanying value is a pair \code{(\var{h_errno}, \var{string})} representing an error returned by a library call. \var{string} represents the description of \var{h_errno}, as returned by ! \cfunction{hstrerror} C API. \end{excdesc} \begin{excdesc}{gaierror} This exception is raised for address-related errors, for ! \function{getaddrinfo} and \function{getnameinfo}. The accompanying value is a pair \code{(\var{error}, \var{string})} representing an error returned by a library call. \var{string} represents the description of \var{error}, as returned ! by \cfunction{gai_strerror} C API. \end{excdesc} --- 91,110 ---- \begin{excdesc}{herror} This exception is raised for address-related errors, i.e. for ! functions that use \var{h_errno} in the C API, including ! \function{gethostbyname_ex()} and \function{gethostbyaddr()}. The accompanying value is a pair \code{(\var{h_errno}, \var{string})} representing an error returned by a library call. \var{string} represents the description of \var{h_errno}, as returned by ! the \cfunction{hstrerror()} C function. \end{excdesc} \begin{excdesc}{gaierror} This exception is raised for address-related errors, for ! \function{getaddrinfo()} and \function{getnameinfo()}. The accompanying value is a pair \code{(\var{error}, \var{string})} representing an error returned by a library call. \var{string} represents the description of \var{error}, as returned ! by the \cfunction{gai_strerror()} C function. \end{excdesc} *************** *** 141,144 **** --- 141,145 ---- \dataline{AI_*} \dataline{NI_*} + \dataline{TCP_*} Many constants of these forms, documented in the \UNIX{} documentation on sockets and/or the IP protocol, are also defined in the socket module. *************** *** 190,194 **** \begin{funcdesc}{gethostbyname}{hostname} Translate a host name to IPv4 address format. The IPv4 address is ! returned as a string, e.g., \code{'100.50.200.5'}. If the host name is an IPv4 address itself it is returned unchanged. See \function{gethostbyname_ex()} for a more complete interface. --- 191,195 ---- \begin{funcdesc}{gethostbyname}{hostname} Translate a host name to IPv4 address format. The IPv4 address is ! returned as a string, such as \code{'100.50.200.5'}. If the host name is an IPv4 address itself it is returned unchanged. See \function{gethostbyname_ex()} for a more complete interface. *************** *** 244,248 **** \begin{funcdesc}{getprotobyname}{protocolname} ! Translate an Internet protocol name (e.g.\ \code{'icmp'}) to a constant suitable for passing as the (optional) third argument to the \function{socket()} function. This is usually only needed for sockets --- 245,249 ---- \begin{funcdesc}{getprotobyname}{protocolname} ! Translate an Internet protocol name (for example, \code{'icmp'}) to a constant suitable for passing as the (optional) third argument to the \function{socket()} function. This is usually only needed for sockets *************** *** 283,288 **** descriptor is invalid. This function is rarely needed, but can be used to get or set socket options on a socket passed to a program as ! standard input or output (e.g.\ a server started by the \UNIX{} inet daemon). \end{funcdesc} --- 284,290 ---- descriptor is invalid. This function is rarely needed, but can be used to get or set socket options on a socket passed to a program as ! standard input or output (such as a server started by the \UNIX{} inet daemon). + Availability: \UNIX. \end{funcdesc} *************** *** 312,317 **** \begin{funcdesc}{inet_aton}{ip_string} ! Convert an IPv4 address from dotted-quad string format ! (e.g.\ '123.45.67.89') to 32-bit packed binary format, as a string four characters in length. --- 314,319 ---- \begin{funcdesc}{inet_aton}{ip_string} ! Convert an IPv4 address from dotted-quad string format (for example, ! '123.45.67.89') to 32-bit packed binary format, as a string four characters in length. *************** *** 325,330 **** \cfunction{inet_aton()}. ! \function{inet_aton} does not support IPv6, and ! \function{getnameinfo()} should be used instead for IPv4/v6 dual stack support. \end{funcdesc} --- 327,333 ---- \cfunction{inet_aton()}. ! \function{inet_aton()} does not support IPv6, and ! \function{getnameinfo()} should be used instead for IPv4/v6 dual stack ! support. \end{funcdesc} *************** *** 332,336 **** Convert a 32-bit packed IPv4 address (a string four characters in length) to its standard dotted-quad string representation ! (e.g. '123.45.67.89'). Useful when conversing with a program that uses the standard C library --- 335,339 ---- Convert a 32-bit packed IPv4 address (a string four characters in length) to its standard dotted-quad string representation ! (for example, '123.45.67.89'). Useful when conversing with a program that uses the standard C library *************** *** 341,346 **** length, \exception{socket.error} will be raised. ! \function{inet_ntoa} does not support IPv6, and ! \function{getnameinfo()} should be used instead for IPv4/v6 dual stack support. \end{funcdesc} --- 344,350 ---- length, \exception{socket.error} will be raised. ! \function{inet_ntoa()} does not support IPv6, and ! \function{getnameinfo()} should be used instead for IPv4/v6 dual stack ! support. \end{funcdesc} *************** *** 401,405 **** can still raise exceptions). The error indicator is \code{0} if the operation succeeded, otherwise the value of the \cdata{errno} ! variable. This is useful, e.g., for asynchronous connects. \note{This method has historically accepted a pair of parameters for \constant{AF_INET} addresses instead of only a tuple. --- 405,409 ---- can still raise exceptions). The error indicator is \code{0} if the operation succeeded, otherwise the value of the \cdata{errno} ! variable. This is useful to support, for example, asynchronous connects. \note{This method has historically accepted a pair of parameters for \constant{AF_INET} addresses instead of only a tuple. From mwh@users.sourceforge.net Fri Dec 28 10:11:35 2001 From: mwh@users.sourceforge.net (Michael Hudson) Date: Fri, 28 Dec 2001 02:11:35 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib ftplib.py,1.60,1.60.10.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv18702 Modified Files: Tag: release22-maint ftplib.py Log Message: Backport Guido's checkin of version 1.61: Don't set passiveserver to 0 in connect(). See SF bug #495693. This should definitely be backported to 2.2.1. I'll leave it to Jack to decide whether he wants to fix this in MacPython 2.2. Index: ftplib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ftplib.py,v retrieving revision 1.60 retrieving revision 1.60.10.1 diff -C2 -d -r1.60 -r1.60.10.1 *** ftplib.py 2001/10/17 17:21:47 1.60 --- ftplib.py 2001/12/28 10:11:32 1.60.10.1 *************** *** 115,119 **** if host: self.host = host if port: self.port = port - self.passiveserver = 0 msg = "getaddrinfo returns an empty list" for res in socket.getaddrinfo(self.host, self.port, 0, socket.SOCK_STREAM): --- 115,118 ---- From mwh@users.sourceforge.net Fri Dec 28 10:12:47 2001 From: mwh@users.sourceforge.net (Michael Hudson) Date: Fri, 28 Dec 2001 02:12:47 -0800 Subject: [Python-checkins] CVS: python/dist/src/Modules socketmodule.c,1.200,1.200.6.1 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv19074 Modified Files: Tag: release22-maint socketmodule.c Log Message: Backport loewis' checkin of version 1.201: Add TCP socket options from glibc 2.2.4. Fixes #495680. 2.2.1 bugfix candidate. Index: socketmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v retrieving revision 1.200 retrieving revision 1.200.6.1 diff -C2 -d -r1.200 -r1.200.6.1 *** socketmodule.c 2001/12/02 10:15:37 1.200 --- socketmodule.c 2001/12/28 10:12:44 1.200.6.1 *************** *** 3622,3625 **** --- 3622,3656 ---- insint(d, "TCP_MAXSEG", TCP_MAXSEG); #endif + #ifdef TCP_CORK + insint(d, "TCP_CORK", TCP_CORK); + #endif + #ifdef TCP_KEEPIDLE + insint(d, "TCP_KEEPIDLE", TCP_KEEPIDLE); + #endif + #ifdef TCP_KEEPINTVL + insint(d, "TCP_KEEPINTVL", TCP_KEEPINTVL); + #endif + #ifdef TCP_KEEPCNT + insint(d, "TCP_KEEPCNT", TCP_KEEPCNT); + #endif + #ifdef TCP_SYNCNT + insint(d, "TCP_SYNCNT", TCP_SYNCNT); + #endif + #ifdef TCP_LINGER2 + insint(d, "TCP_LINGER2", TCP_LINGER2); + #endif + #ifdef TCP_DEFER_ACCEPT + insint(d, "TCP_DEFER_ACCEPT", TCP_DEFER_ACCEPT); + #endif + #ifdef TCP_WINDOW_CLAMP + insint(d, "TCP_WINDOW_CLAMP", TCP_WINDOW_CLAMP); + #endif + #ifdef TCP_INFO + insint(d, "TCP_INFO", TCP_INFO); + #endif + #ifdef TCP_QUICKACK + insint(d, "TCP_QUICKACK", TCP_QUICKACK); + #endif + /* IPX options */ From mwh@users.sourceforge.net Fri Dec 28 10:17:09 2001 From: mwh@users.sourceforge.net (Michael Hudson) Date: Fri, 28 Dec 2001 02:17:09 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/plat-linux2 CDROM.py,1.1,1.1.30.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/plat-linux2 In directory usw-pr-cvs1:/tmp/cvs-serv20056 Modified Files: Tag: release22-maint CDROM.py Log Message: Backport loewis' checkin of version 1.2: Regenerated for Linux 2.2.4. This wasn't flagged as a bugfix candidate, but I think it probably was. Howl if you disagree. Index: CDROM.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/plat-linux2/CDROM.py,v retrieving revision 1.1 retrieving revision 1.1.30.1 diff -C2 -d -r1.1 -r1.1.30.1 *** CDROM.py 1999/04/12 14:34:49 1.1 --- CDROM.py 2001/12/28 10:17:07 1.1.30.1 *************** *** 1,39 **** # Generated by h2py from /usr/include/linux/cdrom.h ! CD_MINS = 74 ! CD_SECS = 60 ! CD_FRAMES = 75 ! CD_SYNC_SIZE = 12 ! CD_HEAD_SIZE = 4 ! CD_SUBHEAD_SIZE = 8 ! CD_XA_HEAD = (CD_HEAD_SIZE+CD_SUBHEAD_SIZE) ! CD_XA_SYNC_HEAD = (CD_SYNC_SIZE+CD_XA_HEAD) ! CD_FRAMESIZE = 2048 ! CD_FRAMESIZE_RAW = 2352 ! CD_FRAMESIZE_RAW1 = (CD_FRAMESIZE_RAW-CD_SYNC_SIZE) ! CD_FRAMESIZE_RAW0 = (CD_FRAMESIZE_RAW-CD_SYNC_SIZE-CD_HEAD_SIZE) ! CD_FRAMESIZE_RAWER = 2646 ! CD_EDC_SIZE = 4 ! CD_ZERO_SIZE = 8 ! CD_ECC_SIZE = 276 ! CD_XA_TAIL = (CD_EDC_SIZE+CD_ECC_SIZE) ! CD_FRAMESIZE_SUB = 96 ! CD_MSF_OFFSET = 150 ! CD_CHUNK_SIZE = 24 ! CD_NUM_OF_CHUNKS = 98 ! CD_FRAMESIZE_XA = CD_FRAMESIZE_RAW1 ! CD_BLOCK_OFFSET = CD_MSF_OFFSET ! CDROM_LBA = 0x01 ! CDROM_MSF = 0x02 ! CDROM_DATA_TRACK = 0x04 ! CDROM_LEADOUT = 0xAA ! CDROM_AUDIO_INVALID = 0x00 ! CDROM_AUDIO_PLAY = 0x11 ! CDROM_AUDIO_PAUSED = 0x12 ! CDROM_AUDIO_COMPLETED = 0x13 ! CDROM_AUDIO_ERROR = 0x14 ! CDROM_AUDIO_NO_STATUS = 0x15 ! CDROM_MODE1_SIZE = 512 ! CDROM_MODE1_SIZE = 2048 ! CDROM_MODE2_SIZE = 2336 CDROMPAUSE = 0x5301 CDROMRESUME = 0x5302 --- 1,4 ---- # Generated by h2py from /usr/include/linux/cdrom.h ! CDROMPAUSE = 0x5301 CDROMRESUME = 0x5302 *************** *** 52,56 **** CDROMEJECT_SW = 0x530f CDROMMULTISESSION = 0x5310 ! CDROM_GET_UPC = 0x5311 CDROMRESET = 0x5312 CDROMVOLREAD = 0x5313 --- 17,22 ---- CDROMEJECT_SW = 0x530f CDROMMULTISESSION = 0x5310 ! CDROM_GET_MCN = 0x5311 ! CDROM_GET_UPC = CDROM_GET_MCN CDROMRESET = 0x5312 CDROMVOLREAD = 0x5313 *************** *** 60,80 **** CDROMPLAYBLK = 0x5317 CDROMREADALL = 0x5318 CDROMCLOSETRAY = 0x5319 ! CDROMLOADFROMSLOT = 0x531a ! SCMD_READ_TOC = 0x43 ! SCMD_PLAYAUDIO_MSF = 0x47 ! SCMD_PLAYAUDIO_TI = 0x48 ! SCMD_PAUSE_RESUME = 0x4B ! SCMD_READ_SUBCHANNEL = 0x42 ! SCMD_PLAYAUDIO10 = 0x45 ! SCMD_READ_HEADER = 0x44 ! SCMD_PLAYAUDIO12 = 0xA5 ! SCMD_PLAYTRACK_REL12 = 0xA9 ! SCMD_CD_PLAYBACK_CONTROL = 0xC9 ! SCMD_CD_PLAYBACK_STATUS = 0xC4 ! ERR_RECOVERY_PARMS = 0x01 ! DISCO_RECO_PARMS = 0x02 ! FORMAT_PARMS = 0x03 ! GEOMETRY_PARMS = 0x04 ! CERTIFICATION_PARMS = 0x06 ! CACHE_PARMS = 0x38 --- 26,207 ---- CDROMPLAYBLK = 0x5317 CDROMREADALL = 0x5318 + CDROMGETSPINDOWN = 0x531d + CDROMSETSPINDOWN = 0x531e CDROMCLOSETRAY = 0x5319 ! CDROM_SET_OPTIONS = 0x5320 ! CDROM_CLEAR_OPTIONS = 0x5321 ! CDROM_SELECT_SPEED = 0x5322 ! CDROM_SELECT_DISC = 0x5323 ! CDROM_MEDIA_CHANGED = 0x5325 ! CDROM_DRIVE_STATUS = 0x5326 ! CDROM_DISC_STATUS = 0x5327 ! CDROM_CHANGER_NSLOTS = 0x5328 ! CDROM_LOCKDOOR = 0x5329 ! CDROM_DEBUG = 0x5330 ! CDROM_GET_CAPABILITY = 0x5331 ! CDROMAUDIOBUFSIZ = 0x5382 ! DVD_READ_STRUCT = 0x5390 ! DVD_WRITE_STRUCT = 0x5391 ! DVD_AUTH = 0x5392 ! CDROM_SEND_PACKET = 0x5393 ! CDROM_NEXT_WRITABLE = 0x5394 ! CDROM_LAST_WRITTEN = 0x5395 ! CDROM_PACKET_SIZE = 12 ! CGC_DATA_UNKNOWN = 0 ! CGC_DATA_WRITE = 1 ! CGC_DATA_READ = 2 ! CGC_DATA_NONE = 3 ! CD_MINS = 74 ! CD_SECS = 60 ! CD_FRAMES = 75 ! CD_SYNC_SIZE = 12 ! CD_MSF_OFFSET = 150 ! CD_CHUNK_SIZE = 24 ! CD_NUM_OF_CHUNKS = 98 ! CD_FRAMESIZE_SUB = 96 ! CD_HEAD_SIZE = 4 ! CD_SUBHEAD_SIZE = 8 ! CD_EDC_SIZE = 4 ! CD_ZERO_SIZE = 8 ! CD_ECC_SIZE = 276 ! CD_FRAMESIZE = 2048 ! CD_FRAMESIZE_RAW = 2352 ! CD_FRAMESIZE_RAWER = 2646 ! CD_FRAMESIZE_RAW1 = (CD_FRAMESIZE_RAW-CD_SYNC_SIZE) ! CD_FRAMESIZE_RAW0 = (CD_FRAMESIZE_RAW-CD_SYNC_SIZE-CD_HEAD_SIZE) ! CD_XA_HEAD = (CD_HEAD_SIZE+CD_SUBHEAD_SIZE) ! CD_XA_TAIL = (CD_EDC_SIZE+CD_ECC_SIZE) ! CD_XA_SYNC_HEAD = (CD_SYNC_SIZE+CD_XA_HEAD) ! CDROM_LBA = 0x01 ! CDROM_MSF = 0x02 ! CDROM_DATA_TRACK = 0x04 ! CDROM_LEADOUT = 0xAA ! CDROM_AUDIO_INVALID = 0x00 ! CDROM_AUDIO_PLAY = 0x11 ! CDROM_AUDIO_PAUSED = 0x12 ! CDROM_AUDIO_COMPLETED = 0x13 ! CDROM_AUDIO_ERROR = 0x14 ! CDROM_AUDIO_NO_STATUS = 0x15 ! CDC_CLOSE_TRAY = 0x1 ! CDC_OPEN_TRAY = 0x2 ! CDC_LOCK = 0x4 ! CDC_SELECT_SPEED = 0x8 ! CDC_SELECT_DISC = 0x10 ! CDC_MULTI_SESSION = 0x20 ! CDC_MCN = 0x40 ! CDC_MEDIA_CHANGED = 0x80 ! CDC_PLAY_AUDIO = 0x100 ! CDC_RESET = 0x200 ! CDC_IOCTLS = 0x400 ! CDC_DRIVE_STATUS = 0x800 ! CDC_GENERIC_PACKET = 0x1000 ! CDC_CD_R = 0x2000 ! CDC_CD_RW = 0x4000 ! CDC_DVD = 0x8000 ! CDC_DVD_R = 0x10000 ! CDC_DVD_RAM = 0x20000 ! CDS_NO_INFO = 0 ! CDS_NO_DISC = 1 ! CDS_TRAY_OPEN = 2 ! CDS_DRIVE_NOT_READY = 3 ! CDS_DISC_OK = 4 ! CDS_AUDIO = 100 ! CDS_DATA_1 = 101 ! CDS_DATA_2 = 102 ! CDS_XA_2_1 = 103 ! CDS_XA_2_2 = 104 ! CDS_MIXED = 105 ! CDO_AUTO_CLOSE = 0x1 ! CDO_AUTO_EJECT = 0x2 ! CDO_USE_FFLAGS = 0x4 ! CDO_LOCK = 0x8 ! CDO_CHECK_TYPE = 0x10 ! CD_PART_MAX = 64 ! CD_PART_MASK = (CD_PART_MAX - 1) ! GPCMD_BLANK = 0xa1 ! GPCMD_CLOSE_TRACK = 0x5b ! GPCMD_FLUSH_CACHE = 0x35 ! GPCMD_FORMAT_UNIT = 0x04 ! GPCMD_GET_CONFIGURATION = 0x46 ! GPCMD_GET_EVENT_STATUS_NOTIFICATION = 0x4a ! GPCMD_GET_PERFORMANCE = 0xac ! GPCMD_INQUIRY = 0x12 ! GPCMD_LOAD_UNLOAD = 0xa6 ! GPCMD_MECHANISM_STATUS = 0xbd ! GPCMD_MODE_SELECT_10 = 0x55 ! GPCMD_MODE_SENSE_10 = 0x5a ! GPCMD_PAUSE_RESUME = 0x4b ! GPCMD_PLAY_AUDIO_10 = 0x45 ! GPCMD_PLAY_AUDIO_MSF = 0x47 ! GPCMD_PLAY_AUDIO_TI = 0x48 ! GPCMD_PLAY_CD = 0xbc ! GPCMD_PREVENT_ALLOW_MEDIUM_REMOVAL = 0x1e ! GPCMD_READ_10 = 0x28 ! GPCMD_READ_12 = 0xa8 ! GPCMD_READ_CDVD_CAPACITY = 0x25 ! GPCMD_READ_CD = 0xbe ! GPCMD_READ_CD_MSF = 0xb9 ! GPCMD_READ_DISC_INFO = 0x51 ! GPCMD_READ_DVD_STRUCTURE = 0xad ! GPCMD_READ_FORMAT_CAPACITIES = 0x23 ! GPCMD_READ_HEADER = 0x44 ! GPCMD_READ_TRACK_RZONE_INFO = 0x52 ! GPCMD_READ_SUBCHANNEL = 0x42 ! GPCMD_READ_TOC_PMA_ATIP = 0x43 ! GPCMD_REPAIR_RZONE_TRACK = 0x58 ! GPCMD_REPORT_KEY = 0xa4 ! GPCMD_REQUEST_SENSE = 0x03 ! GPCMD_RESERVE_RZONE_TRACK = 0x53 ! GPCMD_SCAN = 0xba ! GPCMD_SEEK = 0x2b ! GPCMD_SEND_DVD_STRUCTURE = 0xad ! GPCMD_SEND_EVENT = 0xa2 ! GPCMD_SEND_KEY = 0xa3 ! GPCMD_SEND_OPC = 0x54 ! GPCMD_SET_READ_AHEAD = 0xa7 ! GPCMD_SET_STREAMING = 0xb6 ! GPCMD_START_STOP_UNIT = 0x1b ! GPCMD_STOP_PLAY_SCAN = 0x4e ! GPCMD_TEST_UNIT_READY = 0x00 ! GPCMD_VERIFY_10 = 0x2f ! GPCMD_WRITE_10 = 0x2a ! GPCMD_WRITE_AND_VERIFY_10 = 0x2e ! GPCMD_SET_SPEED = 0xbb ! GPCMD_PLAYAUDIO_TI = 0x48 ! GPCMD_GET_MEDIA_STATUS = 0xda ! GPMODE_R_W_ERROR_PAGE = 0x01 ! GPMODE_WRITE_PARMS_PAGE = 0x05 ! GPMODE_AUDIO_CTL_PAGE = 0x0e ! GPMODE_POWER_PAGE = 0x1a ! GPMODE_FAULT_FAIL_PAGE = 0x1c ! GPMODE_TO_PROTECT_PAGE = 0x1d ! GPMODE_CAPABILITIES_PAGE = 0x2a ! GPMODE_ALL_PAGES = 0x3f ! GPMODE_CDROM_PAGE = 0x0d ! DVD_STRUCT_PHYSICAL = 0x00 ! DVD_STRUCT_COPYRIGHT = 0x01 ! DVD_STRUCT_DISCKEY = 0x02 ! DVD_STRUCT_BCA = 0x03 ! DVD_STRUCT_MANUFACT = 0x04 ! DVD_LAYERS = 4 ! DVD_LU_SEND_AGID = 0 ! DVD_HOST_SEND_CHALLENGE = 1 ! DVD_LU_SEND_KEY1 = 2 ! DVD_LU_SEND_CHALLENGE = 3 ! DVD_HOST_SEND_KEY2 = 4 ! DVD_AUTH_ESTABLISHED = 5 ! DVD_AUTH_FAILURE = 6 ! DVD_LU_SEND_TITLE_KEY = 7 ! DVD_LU_SEND_ASF = 8 ! DVD_INVALIDATE_AGID = 9 ! DVD_LU_SEND_RPC_STATE = 10 ! DVD_HOST_SEND_RPC_STATE = 11 ! DVD_CPM_NO_COPYRIGHT = 0 ! DVD_CPM_COPYRIGHTED = 1 ! DVD_CP_SEC_NONE = 0 ! DVD_CP_SEC_EXIST = 1 ! DVD_CGMS_UNRESTRICTED = 0 ! DVD_CGMS_SINGLE = 2 ! DVD_CGMS_RESTRICTED = 3 ! ! CDROM_MAX_SLOTS = 256 From mwh@users.sourceforge.net Fri Dec 28 10:20:08 2001 From: mwh@users.sourceforge.net (Michael Hudson) Date: Fri, 28 Dec 2001 02:20:08 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/distutils extension.py,1.9,1.9.6.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/distutils In directory usw-pr-cvs1:/tmp/cvs-serv21226 Modified Files: Tag: release22-maint extension.py Log Message: Backport of akuchling's checkin of 1.10: Suggested by Pete Shinners: treat .m and .mm files as source code. Question for Jack Jansen: is this reasonable? Candidate for 2.2 release branch (if Jack thinks it's OK). Not sure how this wasn't on the branch already, seeing as I thought it went into 2.2. Index: extension.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/distutils/extension.py,v retrieving revision 1.9 retrieving revision 1.9.6.1 diff -C2 -d -r1.9 -r1.9.6.1 *** extension.py 2001/12/06 20:51:35 1.9 --- extension.py 2001/12/28 10:20:06 1.9.6.1 *************** *** 161,165 **** switch = word[0:2] ; value = word[2:] ! if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++"): # hmm, should we do something about C vs. C++ sources? # or leave it up to the CCompiler implementation to --- 161,165 ---- switch = word[0:2] ; value = word[2:] ! if suffix in (".c", ".cc", ".cpp", ".cxx", ".c++", ".m", ".mm"): # hmm, should we do something about C vs. C++ sources? # or leave it up to the CCompiler implementation to From mwh@users.sourceforge.net Fri Dec 28 10:22:17 2001 From: mwh@users.sourceforge.net (Michael Hudson) Date: Fri, 28 Dec 2001 02:22:17 -0800 Subject: [Python-checkins] CVS: python/dist/src/Python ceval.c,2.301,2.301.4.1 Message-ID: Update of /cvsroot/python/python/dist/src/Python In directory usw-pr-cvs1:/tmp/cvs-serv21939 Modified Files: Tag: release22-maint ceval.c Log Message: Backport tim_one's checkin of version 2.302: SF bug #496549 -Qnew and in-place division "/=". eval_frame(): Under -Qnew, INPLACE_DIVIDE wasn't getting handed off to INPLACE_TRUE_DIVIDE (like BINARY_DIVIDE was getting handed off to BINARY_TRUE_DIVIDE). Bugfix candidate. Index: ceval.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v retrieving revision 2.301 retrieving revision 2.301.4.1 diff -C2 -d -r2.301 -r2.301.4.1 *** ceval.c 2001/12/19 04:11:07 2.301 --- ceval.c 2001/12/28 10:22:15 2.301.4.1 *************** *** 1092,1098 **** case INPLACE_DIVIDE: w = POP(); v = POP(); ! x = PyNumber_InPlaceDivide(v, w); Py_DECREF(v); Py_DECREF(w); --- 1092,1111 ---- case INPLACE_DIVIDE: + if (!_Py_QnewFlag) { + w = POP(); + v = POP(); + x = PyNumber_InPlaceDivide(v, w); + Py_DECREF(v); + Py_DECREF(w); + PUSH(x); + if (x != NULL) continue; + break; + } + /* -Qnew is in effect: fall through to + INPLACE_TRUE_DIVIDE */ + case INPLACE_TRUE_DIVIDE: w = POP(); v = POP(); ! x = PyNumber_InPlaceTrueDivide(v, w); Py_DECREF(v); Py_DECREF(w); *************** *** 1105,1118 **** v = POP(); x = PyNumber_InPlaceFloorDivide(v, w); - Py_DECREF(v); - Py_DECREF(w); - PUSH(x); - if (x != NULL) continue; - break; - - case INPLACE_TRUE_DIVIDE: - w = POP(); - v = POP(); - x = PyNumber_InPlaceTrueDivide(v, w); Py_DECREF(v); Py_DECREF(w); --- 1118,1121 ---- From mwh@users.sourceforge.net Fri Dec 28 10:24:47 2001 From: mwh@users.sourceforge.net (Michael Hudson) Date: Fri, 28 Dec 2001 02:24:47 -0800 Subject: [Python-checkins] CVS: python/dist/src/Modules posixmodule.c,2.216,2.216.4.1 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv22755 Modified Files: Tag: release22-maint posixmodule.c Log Message: Backport gvanrossum's checkin of version 2.217: Due to a cut-and-paste error, the type object exported under the name statvfs_result was in fact the stat_result type object. :-( 2.2.1 bugfix! Index: posixmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v retrieving revision 2.216 retrieving revision 2.216.4.1 diff -C2 -d -r2.216 -r2.216.4.1 *** posixmodule.c 2001/12/19 19:05:01 2.216 --- posixmodule.c 2001/12/28 10:24:44 2.216.4.1 *************** *** 6015,6018 **** statvfs_result_desc.name = MODNAME ".statvfs_result"; PyStructSequence_InitType(&StatVFSResultType, &statvfs_result_desc); ! PyDict_SetItemString(d, "statvfs_result", (PyObject*) &StatResultType); } --- 6015,6018 ---- statvfs_result_desc.name = MODNAME ".statvfs_result"; PyStructSequence_InitType(&StatVFSResultType, &statvfs_result_desc); ! PyDict_SetItemString(d, "statvfs_result", (PyObject*) &StatVFSResultType); } From mwh@users.sourceforge.net Fri Dec 28 10:29:25 2001 From: mwh@users.sourceforge.net (Michael Hudson) Date: Fri, 28 Dec 2001 02:29:25 -0800 Subject: [Python-checkins] CVS: python/dist/src/Demo/extend README,1.1,NONE make_clean,1.1,NONE make_shared,1.1,NONE make_static,1.1,NONE Message-ID: Update of /cvsroot/python/python/dist/src/Demo/extend In directory usw-pr-cvs1:/tmp/cvs-serv23582/extend Removed Files: Tag: release22-maint README make_clean make_shared make_static Log Message: Remove extend directory and tidy up README as gvanrossum did on the trunk. I'm feeling thorough today :) --- README DELETED --- --- make_clean DELETED --- --- make_shared DELETED --- --- make_static DELETED --- From mwh@users.sourceforge.net Fri Dec 28 10:29:25 2001 From: mwh@users.sourceforge.net (Michael Hudson) Date: Fri, 28 Dec 2001 02:29:25 -0800 Subject: [Python-checkins] CVS: python/dist/src/Demo README,1.14,1.14.20.1 Message-ID: Update of /cvsroot/python/python/dist/src/Demo In directory usw-pr-cvs1:/tmp/cvs-serv23582 Modified Files: Tag: release22-maint README Log Message: Remove extend directory and tidy up README as gvanrossum did on the trunk. I'm feeling thorough today :) Index: README =================================================================== RCS file: /cvsroot/python/python/dist/src/Demo/README,v retrieving revision 1.14 retrieving revision 1.14.20.1 diff -C2 -d -r1.14 -r1.14.20.1 *** README 2001/03/21 14:18:12 1.14 --- README 2001/12/28 10:29:23 1.14.20.1 *************** *** 16,28 **** classes Some examples of how to use classes. embed An example of embedding Python in another application (see also pysvr). ! extend An example of using the generic Makefile.pre.in from ! the Misc directory to build a statically linked or ! shared extension module. md5test Test program for the optional md5 module. pysvr An example of embedding Python in a threaded application. --- 16,38 ---- classes Some examples of how to use classes. + comparisons A set of responses to a really old language-comparison + challenge. + + curses A set of curses demos. + embed An example of embedding Python in another application (see also pysvr). ! imputil Demonstration subclasses of imputil.Importer. md5test Test program for the optional md5 module. + metaclasses The code from the 1.5 metaclasses paper on the web. + + parser Example using the parser module. + + pdist Old, unfinished code messing with CVS, RCS and remote + files. + pysvr An example of embedding Python in a threaded application. *************** *** 34,39 **** directory. No optional built-in modules needed. - sockets Examples for the new built-in module 'socket'. - sgi Demos that only run on Silicon Graphics machines. These require at least one of the optional built-in --- 44,47 ---- *************** *** 42,50 **** per subject. threads Demos that use the 'thread' module. (Currently these only run on SGIs, but this may change in the future.) tkinter Demos using the Tk interface (including Matt Conway's excellent set of demos). ! tix Demos using the Tix widget set addition to Tkinter. --- 50,68 ---- per subject. + sockets Examples for the new built-in module 'socket'. + threads Demos that use the 'thread' module. (Currently these only run on SGIs, but this may change in the future.) + tix Demos using the Tix widget set addition to Tkinter. + tkinter Demos using the Tk interface (including Matt Conway's excellent set of demos). ! xml Some XML demos. ! ! xmlrpc XML-RPC server framework (but see the standard library ! module SimpleXMLRPCServer.py for a replacement). ! ! zlib Some demos for the zlib module (see also the standard ! library module gzip.py). From jack@oratrix.nl Fri Dec 28 12:16:33 2001 From: jack@oratrix.nl (Jack Jansen) Date: Fri, 28 Dec 2001 13:16:33 +0100 Subject: [Python-checkins] CVS: python/dist/src/Lib/distutils extension.py,1.9,1.9.6.1 In-Reply-To: Message by Michael Hudson , Fri, 28 Dec 2001 02:20:08 -0800 , Message-ID: <20011228121639.084E9E8448@oratrix.oratrix.nl> Recently, Michael Hudson said: > Suggested by Pete Shinners: treat .m and .mm files as source code. > > Question for Jack Jansen: is this reasonable? > > Candidate for 2.2 release branch (if Jack thinks it's OK). Yes. Yes. -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.cwi.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm From mwh@users.sourceforge.net Fri Dec 28 15:48:11 2001 From: mwh@users.sourceforge.net (Michael Hudson) Date: Fri, 28 Dec 2001 07:48:11 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib copy_reg.py,1.9,1.9.6.1 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv18346 Modified Files: Tag: release22-maint copy_reg.py Log Message: Backport gvanrossum's checkin of version 1.10: _reduce(): Avoid infinite recursion in the pickler when self.__class__ doesn't have the _HEAPTYPE flag set, e.g. for time.struct_time and posix.stat_result. This fixes the immediate symptoms of SF bug #496873 (cPickle / time.struct_time loop), replacing the infinite loop with an exception. Index: copy_reg.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/copy_reg.py,v retrieving revision 1.9 retrieving revision 1.9.6.1 diff -C2 -d -r1.9 -r1.9.6.1 *** copy_reg.py 2001/11/24 21:04:31 1.9 --- copy_reg.py 2001/12/28 15:48:09 1.9.6.1 *************** *** 54,57 **** --- 54,59 ---- state = None else: + if base is self.__class__: + raise TypeError, "can't pickle %s objects" % base.__name__ state = base(self) args = (self.__class__, base, state) From gvanrossum@users.sourceforge.net Fri Dec 28 20:52:55 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Fri, 28 Dec 2001 12:52:55 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib ftplib.py,1.61,1.62 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv15627 Modified Files: ftplib.py Log Message: SF patch #497420 (Eduardo Pérez): ftplib: ftp anonymous password Instead of sending the real user and host, use "anonymous@" (i.e. no host name at all!) as the default anonymous FTP password. This avoids privacy violations. Index: ftplib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ftplib.py,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** ftplib.py 2001/12/23 13:54:19 1.61 --- ftplib.py 2001/12/28 20:52:52 1.62 *************** *** 352,368 **** if not acct: acct = '' if user == 'anonymous' and passwd in ('', '-'): ! # get fully qualified domain name of local host ! thishost = socket.getfqdn() ! try: ! if os.environ.has_key('LOGNAME'): ! realuser = os.environ['LOGNAME'] ! elif os.environ.has_key('USER'): ! realuser = os.environ['USER'] ! else: ! realuser = 'anonymous' ! except AttributeError: ! # Not all systems have os.environ.... ! realuser = 'anonymous' ! passwd = passwd + realuser + '@' + thishost resp = self.sendcmd('USER ' + user) if resp[0] == '3': resp = self.sendcmd('PASS ' + passwd) --- 352,363 ---- if not acct: acct = '' if user == 'anonymous' and passwd in ('', '-'): ! # If there is no anonymous ftp password specified ! # then we'll just use anonymous@ ! # We don't send any other thing because: ! # - We want to remain anonymous ! # - We want to stop SPAM ! # - We don't want to let ftp sites to discriminate by the user, ! # host or country. ! passwd = passwd + 'anonymous@' resp = self.sendcmd('USER ' + user) if resp[0] == '3': resp = self.sendcmd('PASS ' + passwd) From gvanrossum@users.sourceforge.net Fri Dec 28 20:53:24 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Fri, 28 Dec 2001 12:53:24 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc ACKS,1.150,1.151 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv15775 Modified Files: ACKS Log Message: SF patch #497420 (Eduardo Pérez): ftplib: ftp anonymous password Instead of sending the real user and host, use "anonymous@" (i.e. no host name at all!) as the default anonymous FTP password. This avoids privacy violations. Index: ACKS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/ACKS,v retrieving revision 1.150 retrieving revision 1.151 diff -C2 -d -r1.150 -r1.151 *** ACKS 2001/12/27 23:37:49 1.150 --- ACKS 2001/12/28 20:53:22 1.151 *************** *** 331,334 **** --- 331,335 ---- Samuele Pedroni Steven Pemberton + Eduardo Pérez Tim Peters Chris Petrilli From gvanrossum@users.sourceforge.net Fri Dec 28 20:54:30 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Fri, 28 Dec 2001 12:54:30 -0800 Subject: [Python-checkins] CVS: python/dist/src/Doc/lib libftplib.tex,1.34,1.35 Message-ID: Update of /cvsroot/python/python/dist/src/Doc/lib In directory usw-pr-cvs1:/tmp/cvs-serv16049 Modified Files: libftplib.tex Log Message: SF patch #497420 (Eduardo Pérez): ftplib: ftp anonymous password Instead of sending the real user and host, use "anonymous@" (i.e. no host name at all!) as the default anonymous FTP password. This avoids privacy violations. Index: libftplib.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/lib/libftplib.tex,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** libftplib.tex 2001/12/26 19:48:43 1.34 --- libftplib.tex 2001/12/28 20:54:28 1.35 *************** *** 21,25 **** >>> from ftplib import FTP >>> ftp = FTP('ftp.cwi.nl') # connect to host, default port ! >>> ftp.login() # user anonymous, passwd user@hostname >>> ftp.retrlines('LIST') # list directory contents total 24418 --- 21,25 ---- >>> from ftplib import FTP >>> ftp = FTP('ftp.cwi.nl') # connect to host, default port ! >>> ftp.login() # user anonymous, passwd anonymous@ >>> ftp.retrlines('LIST') # list directory contents total 24418 *************** *** 122,129 **** \var{user} is specified, it defaults to \code{'anonymous'}. If \var{user} is \code{'anonymous'}, the default \var{passwd} is ! \samp{\var{realuser}@\var{host}} where \var{realuser} is the real user ! name (glanced from the \envvar{LOGNAME} or \envvar{USER} environment ! variable) and \var{host} is the hostname as returned by ! \function{socket.gethostname()}. This function should be called only once for each instance, after a connection has been established; it should not be called at all if a host and user were given when the --- 122,126 ---- \var{user} is specified, it defaults to \code{'anonymous'}. If \var{user} is \code{'anonymous'}, the default \var{passwd} is ! \code{'anonymous@'}. This function should be called only once for each instance, after a connection has been established; it should not be called at all if a host and user were given when the From gvanrossum@users.sourceforge.net Fri Dec 28 20:54:57 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Fri, 28 Dec 2001 12:54:57 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib ftplib.py,1.62,1.63 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv16165 Modified Files: ftplib.py Log Message: Update the docstring too. :-) Index: ftplib.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/ftplib.py,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** ftplib.py 2001/12/28 20:52:52 1.62 --- ftplib.py 2001/12/28 20:54:55 1.63 *************** *** 7,11 **** >>> from ftplib import FTP >>> ftp = FTP('ftp.python.org') # connect to host, default port ! >>> ftp.login() # default, i.e.: user anonymous, passwd user@hostname '230 Guest login ok, access restrictions apply.' >>> ftp.retrlines('LIST') # list directory contents --- 7,11 ---- >>> from ftplib import FTP >>> ftp = FTP('ftp.python.org') # connect to host, default port ! >>> ftp.login() # default, i.e.: user anonymous, passwd anonymous@ '230 Guest login ok, access restrictions apply.' >>> ftp.retrlines('LIST') # list directory contents From gvanrossum@users.sourceforge.net Fri Dec 28 20:57:17 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Fri, 28 Dec 2001 12:57:17 -0800 Subject: [Python-checkins] CVS: python/dist/src/Misc NEWS,1.340,1.341 Message-ID: Update of /cvsroot/python/python/dist/src/Misc In directory usw-pr-cvs1:/tmp/cvs-serv16654 Modified Files: NEWS Log Message: SF patch #497420 (Eduardo Pérez): ftplib: ftp anonymous password Instead of sending the real user and host, use "anonymous@" (i.e. no host name at all!) as the default anonymous FTP password. This avoids privacy violations. Index: NEWS =================================================================== RCS file: /cvsroot/python/python/dist/src/Misc/NEWS,v retrieving revision 1.340 retrieving revision 1.341 diff -C2 -d -r1.340 -r1.341 *** NEWS 2001/12/25 19:07:38 1.340 --- NEWS 2001/12/28 20:57:14 1.341 *************** *** 11,14 **** --- 11,18 ---- Library + - ftplib: to safeguard the user's privacy, anonymous login will use + "anonymous@" as default password, rather than the real user and host + name. + Tools/Demos From loewis@users.sourceforge.net Fri Dec 28 21:08:14 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Fri, 28 Dec 2001 13:08:14 -0800 Subject: [Python-checkins] CVS: python/dist/src/Modules fcntlmodule.c,2.31,2.32 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv20380 Modified Files: fcntlmodule.c Log Message: Add fcntl.h constants from glibc 2.2.4. Fixes #496171. Index: fcntlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v retrieving revision 2.31 retrieving revision 2.32 diff -C2 -d -r2.31 -r2.32 *** fcntlmodule.c 2001/05/14 21:02:36 2.31 --- fcntlmodule.c 2001/12/28 21:08:12 2.32 *************** *** 345,348 **** --- 345,362 ---- if (ins(d, "LOCK_NB", (long)LOCK_NB)) return -1; if (ins(d, "LOCK_UN", (long)LOCK_UN)) return -1; + /* GNU extensions, as of glibc 2.2.4 */ + #ifdef LOCK_MAND + if (ins(d, "LOCK_MAND", (long)LOCK_MAND)) return -1; + #endif + #ifdef LOCK_READ + if (ins(d, "LOCK_READ", (long)LOCK_READ)) return -1; + #endif + #ifdef LOCK_WRITE + if (ins(d, "LOCK_WRITE", (long)LOCK_WRITE)) return -1; + #endif + #ifdef LOCK_RW + if (ins(d, "LOCK_RW", (long)LOCK_RW)) return -1; + #endif + #ifdef F_DUPFD if (ins(d, "F_DUPFD", (long)F_DUPFD)) return -1; *************** *** 390,393 **** --- 404,463 ---- if (ins(d, "F_UNLCK", (long)F_UNLCK)) return -1; #endif + /* LFS constants */ + #ifdef F_GETLK64 + if (ins(d, "F_GETLK64", (long)F_GETLK64)) return -1; + #endif + #ifdef F_SETLK64 + if (ins(d, "F_SETLK64", (long)F_SETLK64)) return -1; + #endif + #ifdef F_SETLKW64 + if (ins(d, "F_SETLKW64", (long)F_SETLKW64)) return -1; + #endif + /* GNU extensions, as of glibc 2.2.4. */ + #ifdef F_SETLEASE + if (ins(d, "F_SETLEASE", (long)F_SETLEASE)) return -1; + #endif + #ifdef F_GETLEASE + if (ins(d, "F_GETLEASE", (long)F_GETLEASE)) return -1; + #endif + #ifdef F_NOTIFY + if (ins(d, "F_NOTIFY", (long)F_NOTIFY)) return -1; + #endif + /* Old BSD flock(). */ + #ifdef F_EXLCK + if (ins(d, "F_EXLCK", (long)F_EXLCK)) return -1; + #endif + #ifdef F_SHLCK + if (ins(d, "F_SHLCK", (long)F_SHLCK)) return -1; + #endif + + /* For F_{GET|SET}FL */ + #ifdef FD_CLOEXEC + if (ins(d, "FD_CLOEXEC", (long)FD_CLOEXEC)) return -1; + #endif + + /* For F_NOTIFY */ + #ifdef DN_ACCESS + if (ins(d, "DN_ACCESS", (long)DN_ACCESS)) return -1; + #endif + #ifdef DN_MODIFY + if (ins(d, "DN_MODIFY", (long)DN_MODIFY)) return -1; + #endif + #ifdef DN_CREATE + if (ins(d, "DN_CREATE", (long)DN_CREATE)) return -1; + #endif + #ifdef DN_DELETE + if (ins(d, "DN_DELETE", (long)DN_DELETE)) return -1; + #endif + #ifdef DN_RENAME + if (ins(d, "DN_RENAME", (long)DN_RENAME)) return -1; + #endif + #ifdef DN_ATTRIB + if (ins(d, "DN_ATTRIB", (long)DN_ATTRIB)) return -1; + #endif + #ifdef DN_MULTISHOT + if (ins(d, "DN_MULTISHOT", (long)DN_MULTISHOT)) return -1; + #endif + return 0; } From loewis@users.sourceforge.net Fri Dec 28 21:09:25 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Fri, 28 Dec 2001 13:09:25 -0800 Subject: [Python-checkins] CVS: python/dist/src/Modules fcntlmodule.c,2.31,2.31.18.1 Message-ID: Update of /cvsroot/python/python/dist/src/Modules In directory usw-pr-cvs1:/tmp/cvs-serv20787 Modified Files: Tag: release22-maint fcntlmodule.c Log Message: Add fcntl.h constants from glibc 2.2.4. Fixes #496171. Index: fcntlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/fcntlmodule.c,v retrieving revision 2.31 retrieving revision 2.31.18.1 diff -C2 -d -r2.31 -r2.31.18.1 *** fcntlmodule.c 2001/05/14 21:02:36 2.31 --- fcntlmodule.c 2001/12/28 21:09:23 2.31.18.1 *************** *** 345,348 **** --- 345,362 ---- if (ins(d, "LOCK_NB", (long)LOCK_NB)) return -1; if (ins(d, "LOCK_UN", (long)LOCK_UN)) return -1; + /* GNU extensions, as of glibc 2.2.4 */ + #ifdef LOCK_MAND + if (ins(d, "LOCK_MAND", (long)LOCK_MAND)) return -1; + #endif + #ifdef LOCK_READ + if (ins(d, "LOCK_READ", (long)LOCK_READ)) return -1; + #endif + #ifdef LOCK_WRITE + if (ins(d, "LOCK_WRITE", (long)LOCK_WRITE)) return -1; + #endif + #ifdef LOCK_RW + if (ins(d, "LOCK_RW", (long)LOCK_RW)) return -1; + #endif + #ifdef F_DUPFD if (ins(d, "F_DUPFD", (long)F_DUPFD)) return -1; *************** *** 390,393 **** --- 404,463 ---- if (ins(d, "F_UNLCK", (long)F_UNLCK)) return -1; #endif + /* LFS constants */ + #ifdef F_GETLK64 + if (ins(d, "F_GETLK64", (long)F_GETLK64)) return -1; + #endif + #ifdef F_SETLK64 + if (ins(d, "F_SETLK64", (long)F_SETLK64)) return -1; + #endif + #ifdef F_SETLKW64 + if (ins(d, "F_SETLKW64", (long)F_SETLKW64)) return -1; + #endif + /* GNU extensions, as of glibc 2.2.4. */ + #ifdef F_SETLEASE + if (ins(d, "F_SETLEASE", (long)F_SETLEASE)) return -1; + #endif + #ifdef F_GETLEASE + if (ins(d, "F_GETLEASE", (long)F_GETLEASE)) return -1; + #endif + #ifdef F_NOTIFY + if (ins(d, "F_NOTIFY", (long)F_NOTIFY)) return -1; + #endif + /* Old BSD flock(). */ + #ifdef F_EXLCK + if (ins(d, "F_EXLCK", (long)F_EXLCK)) return -1; + #endif + #ifdef F_SHLCK + if (ins(d, "F_SHLCK", (long)F_SHLCK)) return -1; + #endif + + /* For F_{GET|SET}FL */ + #ifdef FD_CLOEXEC + if (ins(d, "FD_CLOEXEC", (long)FD_CLOEXEC)) return -1; + #endif + + /* For F_NOTIFY */ + #ifdef DN_ACCESS + if (ins(d, "DN_ACCESS", (long)DN_ACCESS)) return -1; + #endif + #ifdef DN_MODIFY + if (ins(d, "DN_MODIFY", (long)DN_MODIFY)) return -1; + #endif + #ifdef DN_CREATE + if (ins(d, "DN_CREATE", (long)DN_CREATE)) return -1; + #endif + #ifdef DN_DELETE + if (ins(d, "DN_DELETE", (long)DN_DELETE)) return -1; + #endif + #ifdef DN_RENAME + if (ins(d, "DN_RENAME", (long)DN_RENAME)) return -1; + #endif + #ifdef DN_ATTRIB + if (ins(d, "DN_ATTRIB", (long)DN_ATTRIB)) return -1; + #endif + #ifdef DN_MULTISHOT + if (ins(d, "DN_MULTISHOT", (long)DN_MULTISHOT)) return -1; + #endif + return 0; } From gvanrossum@users.sourceforge.net Fri Dec 28 21:33:25 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Fri, 28 Dec 2001 13:33:25 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib copy.py,1.22,1.23 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv29054 Modified Files: copy.py Log Message: Fix for SF bug ##497426: can't deepcopy recursive new objects deepcopy(), _reconstruct(): pass the memo to the other function, so that recursive data structures built out of new-style objects may be deeply copied correctly. 2.2.1 bugfix! Index: copy.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/copy.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** copy.py 2001/09/28 18:16:13 1.22 --- copy.py 2001/12/28 21:33:22 1.23 *************** *** 173,177 **** "un-deep-copyable object of type %s" % type(x) else: ! y = _reconstruct(x, reductor(), 1) else: y = copier(memo) --- 173,177 ---- "un-deep-copyable object of type %s" % type(x) else: ! y = _reconstruct(x, reductor(), 1, memo) else: y = copier(memo) *************** *** 280,287 **** d[types.InstanceType] = _deepcopy_inst ! def _reconstruct(x, info, deep): if isinstance(info, str): return x assert isinstance(info, tuple) n = len(info) assert n in (2, 3) --- 280,289 ---- d[types.InstanceType] = _deepcopy_inst ! def _reconstruct(x, info, deep, memo=None): if isinstance(info, str): return x assert isinstance(info, tuple) + if memo is None: + memo = {} n = len(info) assert n in (2, 3) *************** *** 292,300 **** state = {} if deep: ! args = deepcopy(args) y = callable(*args) if state: if deep: ! state = deepcopy(state) y.__dict__.update(state) return y --- 294,302 ---- state = {} if deep: ! args = deepcopy(args, memo) y = callable(*args) if state: if deep: ! state = deepcopy(state, memo) y.__dict__.update(state) return y From gvanrossum@users.sourceforge.net Fri Dec 28 21:39:05 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Fri, 28 Dec 2001 13:39:05 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_descr.py,1.113,1.114 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv31033 Modified Files: test_descr.py Log Message: Fix for SF bug ##497426: can't deepcopy recursive new objects deepcopy(), _reconstruct(): pass the memo to the other function, so that recursive data structures built out of new-style objects may be deeply copied correctly. 2.2.1 bugfix! Index: test_descr.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** test_descr.py 2001/12/14 04:19:56 1.113 --- test_descr.py 2001/12/28 21:39:03 1.114 *************** *** 2703,2707 **** vereq('%c' % '5', '5') ! --- 2703,2715 ---- vereq('%c' % '5', '5') ! def deepcopyrecursive(): ! if verbose: print "Testing deepcopy of recursive objects..." ! class Node: ! pass ! a = Node() ! b = Node() ! a.b = b ! b.a = a ! z = deepcopy(a) # This blew up before *************** *** 2760,2763 **** --- 2768,2772 ---- hashinherit() strops() + deepcopyrecursive() if verbose: print "All OK" From gvanrossum@users.sourceforge.net Fri Dec 28 22:07:13 2001 From: gvanrossum@users.sourceforge.net (Guido van Rossum) Date: Fri, 28 Dec 2001 14:07:13 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib threading.py,1.19,1.20 Message-ID: Update of /cvsroot/python/python/dist/src/Lib In directory usw-pr-cvs1:/tmp/cvs-serv8901 Modified Files: threading.py Log Message: Thread.__bootstrap(): ignore exceptions in the self.__delete() call in the finally clause. An exception here could happen when a daemon thread exits after the threading module has already been trashed by the import finalization, and there's not much of a point in trying to insist doing the cleanup in that stage. This should fix SF bug ##497111: active_limbo_lock error at program exit. 2.1.2 and 2.2.1 Bugfix candidate! Index: threading.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/threading.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** threading.py 2001/09/18 02:26:39 1.19 --- threading.py 2001/12/28 22:07:09 1.20 *************** *** 422,426 **** finally: self.__stop() ! self.__delete() def __stop(self): --- 422,429 ---- finally: self.__stop() ! try: ! self.__delete() ! except: ! pass def __stop(self): From nnorwitz@users.sourceforge.net Sat Dec 29 00:16:11 2001 From: nnorwitz@users.sourceforge.net (Neal Norwitz) Date: Fri, 28 Dec 2001 16:16:11 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_b2.py,1.29,1.30 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv13998 Modified Files: test_b2.py Log Message: SF Patch #494876, test invalid parameters to pow() Index: test_b2.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_b2.py,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** test_b2.py 2001/12/07 18:21:56 1.29 --- test_b2.py 2001/12/29 00:16:09 1.30 *************** *** 106,109 **** --- 106,129 ---- raise TestFailed, 'pow(%s, %s, %s)' % (x, y, z) + try: pow(-1, -2, 3) + except TypeError: pass + else: raise TestFailed, 'pow(1, -2, 3) should raise TypeError' + + try: pow(1, 2, 0) + except ValueError: pass + else: raise TestFailed, 'pow(1, 2, 0) should raise ValueError' + + try: pow(-1L, -2L, 3L) + except TypeError: pass + else: raise TestFailed, 'pow(1L, -2L, 3L) should raise TypeError' + + try: pow(1L, 2L, 0L) + except ValueError: pass + else: raise TestFailed, 'pow(1L, 2L, 0L) should raise ValueError' + + try: pow(-342.43, 0.234) + except ValueError: pass + else: raise TestFailed, 'pow(-342.43, 0.234) should raise ValueError' + print 'range' if range(3) != [0, 1, 2]: raise TestFailed, 'range(3)' From nnorwitz@users.sourceforge.net Sat Dec 29 00:25:44 2001 From: nnorwitz@users.sourceforge.net (Neal Norwitz) Date: Fri, 28 Dec 2001 16:25:44 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_repr.py,1.10,1.11 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv17061 Modified Files: test_repr.py Log Message: SF Patch #494872 test repr() of a built-in module Index: test_repr.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_repr.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** test_repr.py 2001/10/29 22:25:44 1.10 --- test_repr.py 2001/12/29 00:25:42 1.11 *************** *** 200,203 **** --- 200,204 ---- eq(repr(areallylongpackageandmodulenametotestreprtruncation), "" % areallylongpackageandmodulenametotestreprtruncation.__file__) + eq(repr(sys), "") def test_type(self): From nnorwitz@users.sourceforge.net Sat Dec 29 00:35:23 2001 From: nnorwitz@users.sourceforge.net (Neal Norwitz) Date: Fri, 28 Dec 2001 16:35:23 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_b1.py,1.42,1.43 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv19441 Modified Files: test_b1.py Log Message: SF Patch #494874 add tests for int()/long() invalid parameters Index: test_b1.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_b1.py,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** test_b1.py 2001/12/13 19:52:03 1.42 --- test_b1.py 2001/12/29 00:35:20 1.43 *************** *** 433,436 **** --- 433,451 ---- else: raise TestFailed("int('123\0') didn't raise exception") + try: int('53', 40) + except ValueError: pass + else: raise TestFailed("int('53', 40) didn't raise ValueError") + + try: int('1' * 512) + except ValueError: pass + else: raise TestFailed("int('1' * 512) didn't raise ValueError") + + try: int(1, 12) + except TypeError: pass + else: raise TestFailed("int(1, 12) didn't raise TypeError") + + if int('0123', 0) != 83: + raise TestFailed("int('0123', 0) != 83") + print 'isinstance' class C: *************** *** 524,527 **** --- 539,550 ---- except ValueError: pass else: raise TestFailed("long('123\0') didn't raise exception") + + try: long('53', 40) + except ValueError: pass + else: raise TestFailed("long('53', 40) didn't raise ValueError") + + try: long(1, 12) + except TypeError: pass + else: raise TestFailed("long(1, 12) didn't raise TypeError") print 'map' From nnorwitz@users.sourceforge.net Sat Dec 29 01:02:24 2001 From: nnorwitz@users.sourceforge.net (Neal Norwitz) Date: Fri, 28 Dec 2001 17:02:24 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_complex.py,1.5,1.6 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv26363 Modified Files: test_complex.py Log Message: SF Patch #494873 add tests for complex numbers including calls to int()/long() Index: test_complex.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_complex.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** test_complex.py 2001/12/13 19:57:53 1.5 --- test_complex.py 2001/12/29 01:02:21 1.6 *************** *** 57,60 **** --- 57,81 ---- complex(random(), random())) + for i in range(100): + if not complex(random() + 1e-6, random() + 1e-6): + raise TestFailed("complex(random(), random()) should be true") + + if complex(0.0, 0.0): + raise TestFailed("complex(0.0, 0.0) should be false") + + try: + print int(5+3j) + except TypeError: + pass + else: + raise TestFailed("int(complex()) didn't raise TypeError") + + try: + print float(5+3j) + except TypeError: + pass + else: + raise TestFailed("float(complex()) didn't raise TypeError") + try: z = 1.0 / (0+0j) From nnorwitz@users.sourceforge.net Sat Dec 29 14:31:48 2001 From: nnorwitz@users.sourceforge.net (Neal Norwitz) Date: Sat, 29 Dec 2001 06:31:48 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_complex.py,1.6,1.7 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv26077 Modified Files: test_complex.py Log Message: SF Patch #497487 add test to compare conjugate of a complex number Index: test_complex.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_complex.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** test_complex.py 2001/12/29 01:02:21 1.6 --- test_complex.py 2001/12/29 14:31:46 1.7 *************** *** 1,3 **** ! from test_support import TestFailed from random import random --- 1,3 ---- ! from test_support import TestFailed, vereq from random import random *************** *** 63,66 **** --- 63,69 ---- if complex(0.0, 0.0): raise TestFailed("complex(0.0, 0.0) should be false") + + if vereq(complex(5.3, 9.8).conjugate(), 5.3-9.8j): + raise TestFailed("complex.conjugate() didn't work") try: From tim_one@users.sourceforge.net Sat Dec 29 17:35:00 2001 From: tim_one@users.sourceforge.net (Tim Peters) Date: Sat, 29 Dec 2001 09:35:00 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/test test_complex.py,1.7,1.8 test_support.py,1.40,1.41 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv21035/python/Lib/test Modified Files: test_complex.py test_support.py Log Message: test_support: add a docstring to vereq(). test_complex: repair new test's usage of vereq(). Index: test_complex.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_complex.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** test_complex.py 2001/12/29 14:31:46 1.7 --- test_complex.py 2001/12/29 17:34:57 1.8 *************** *** 64,69 **** raise TestFailed("complex(0.0, 0.0) should be false") ! if vereq(complex(5.3, 9.8).conjugate(), 5.3-9.8j): ! raise TestFailed("complex.conjugate() didn't work") try: --- 64,68 ---- raise TestFailed("complex(0.0, 0.0) should be false") ! vereq(complex(5.3, 9.8).conjugate(), 5.3-9.8j) try: Index: test_support.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** test_support.py 2001/10/30 23:20:46 1.40 --- test_support.py 2001/12/29 17:34:57 1.41 *************** *** 119,122 **** --- 119,132 ---- def vereq(a, b): + """Raise TestFailed if a == b is false. + + This is better than verify(a == b) because, in case of failure, the + error message incorporates repr(a) and repr(b) so you can see the + inputs. + + Note that "not (a == b)" isn't necessarily the same as "a != b"; the + former is tested. + """ + if not (a == b): raise TestFailed, "%r == %r" % (a, b) From loewis@users.sourceforge.net Sun Dec 30 14:43:58 2001 From: loewis@users.sourceforge.net (Martin v. L?wis) Date: Sun, 30 Dec 2001 06:43:58 -0800 Subject: [Python-checkins] CVS: python/dist/src/Lib/lib-tk tkFileDialog.py,1.4,1.5 Message-ID: Update of /cvsroot/python/python/dist/src/Lib/lib-tk In directory usw-pr-cvs1:/tmp/cvs-serv17192 Modified Files: tkFileDialog.py Log Message: Print encoded versions of the file names in test application. Index: tkFileDialog.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/tkFileDialog.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tkFileDialog.py 2001/11/08 17:51:33 1.4 --- tkFileDialog.py 2001/12/30 14:43:56 1.5 *************** *** 125,129 **** if __name__ == "__main__": ! print "open", askopenfilename(filetypes=[("all filez", "*")]) ! print "saveas", asksaveasfilename() --- 125,143 ---- if __name__ == "__main__": + # Since the file name may contain non-ASCII characters, we need + # to find an encoding that likely supports the file name, and + # displays correctly on the terminal. ! # Start off with UTF-8 ! enc = "utf-8" ! ! # See whether CODESET is defined ! try: ! import locale ! enc = locale.nl_langinfo(locale.CODESET) ! except (ImportError, AttributeError): ! pass ! ! print "open", askopenfilename(filetypes=[("all filez", "*")]).encode(enc) ! print "saveas", asksaveasfilename().encode(enc) ! From jvr@users.sourceforge.net Sun Dec 30 21:25:29 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Sun, 30 Dec 2001 13:25:29 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/ctl _Ctlmodule.c,1.13,1.14 ctlscan.py,1.25,1.26 ctlsupport.py,1.47,1.48 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/ctl In directory usw-pr-cvs1:/tmp/cvs-serv16470 Modified Files: _Ctlmodule.c ctlscan.py ctlsupport.py Log Message: - added support for ControlActionProcs, exposing the following calls: - ctl.SetControlAction() - CreateScrollBarControl() - CreateSliderControl() - print traceback when callbacks fail Index: _Ctlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/_Ctlmodule.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** _Ctlmodule.c 2001/12/18 20:15:26 1.13 --- _Ctlmodule.c 2001/12/30 21:25:26 1.14 *************** *** 129,134 **** --- 129,136 ---- /* TrackControl and HandleControlClick callback support */ + #define kMyControlActionProcTag 'ACTN' /* not an official tag, only for internal use */ static PyObject *tracker; static ControlActionUPP mytracker_upp; + static ControlActionUPP myactionproc_upp; static ControlUserPaneDrawUPP mydrawproc_upp; static ControlUserPaneIdleUPP myidleproc_upp; *************** *** 1184,1187 **** --- 1186,1208 ---- } + static PyObject *CtlObj_SetControlAction(ControlObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + PyObject* actionProc; + UniversalProcPtr c_callback; + #ifndef SetControlAction + PyMac_PRECHECK(SetControlAction); + #endif + if (!PyArg_ParseTuple(_args, "O", + &actionProc)) + return NULL; + SetControlAction(_self->ob_itself, + myactionproc_upp); + Py_INCREF(Py_None); + _res = Py_None; + setcallback((PyObject*)_self, kMyControlActionProcTag, actionProc, &c_callback); + return _res; + } + static PyObject *CtlObj_SetControlReference(ControlObject *_self, PyObject *_args) { *************** *** 4005,4008 **** --- 4026,4031 ---- {"GetControlVariant", (PyCFunction)CtlObj_GetControlVariant, 1, "() -> (ControlVariant _rv)"}, + {"SetControlAction", (PyCFunction)CtlObj_SetControlAction, 1, + "(PyObject* actionProc) -> None"}, {"SetControlReference", (PyCFunction)CtlObj_SetControlReference, 1, "(SInt32 data) -> None"}, *************** *** 4990,4993 **** --- 5013,5062 ---- #endif + static PyObject *Ctl_CreateSliderControl(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + OSStatus _err; + WindowPtr window; + Rect boundsRect; + SInt32 value; + SInt32 minimum; + SInt32 maximum; + UInt16 orientation; + UInt16 numTickMarks; + Boolean liveTracking; + PyObject* liveTrackingProc; + UniversalProcPtr c_callback; + ControlHandle outControl; + #ifndef CreateSliderControl + PyMac_PRECHECK(CreateSliderControl); + #endif + if (!PyArg_ParseTuple(_args, "O&O&lllHHbO", + WinObj_Convert, &window, + PyMac_GetRect, &boundsRect, + &value, + &minimum, + &maximum, + &orientation, + &numTickMarks, + &liveTracking, + &liveTrackingProc)) + return NULL; + _err = CreateSliderControl(window, + &boundsRect, + value, + minimum, + maximum, + orientation, + numTickMarks, + liveTracking, + myactionproc_upp, + &outControl); + if (_err != noErr) return PyMac_Error(_err); + _res = Py_BuildValue("O&", + CtlObj_New, outControl); + setcallback(_res, kMyControlActionProcTag, liveTrackingProc, &c_callback); + return _res; + } + #if TARGET_API_MAC_CARBON *************** *** 5756,5759 **** --- 5825,5871 ---- #endif + static PyObject *Ctl_CreateScrollBarControl(PyObject *_self, PyObject *_args) + { + PyObject *_res = NULL; + OSStatus _err; + WindowPtr window; + Rect boundsRect; + SInt32 value; + SInt32 minimum; + SInt32 maximum; + SInt32 viewSize; + Boolean liveTracking; + PyObject* liveTrackingProc; + UniversalProcPtr c_callback; + ControlHandle outControl; + #ifndef CreateScrollBarControl + PyMac_PRECHECK(CreateScrollBarControl); + #endif + if (!PyArg_ParseTuple(_args, "O&O&llllbO", + WinObj_Convert, &window, + PyMac_GetRect, &boundsRect, + &value, + &minimum, + &maximum, + &viewSize, + &liveTracking, + &liveTrackingProc)) + return NULL; + _err = CreateScrollBarControl(window, + &boundsRect, + value, + minimum, + maximum, + viewSize, + liveTracking, + myactionproc_upp, + &outControl); + if (_err != noErr) return PyMac_Error(_err); + _res = Py_BuildValue("O&", + CtlObj_New, outControl); + setcallback(_res, kMyControlActionProcTag, liveTrackingProc, &c_callback); + return _res; + } + #if TARGET_API_MAC_CARBON *************** *** 6145,6148 **** --- 6257,6262 ---- "(WindowPtr window, Rect boundsRect, CFStringRef title, UInt16 thickness, UInt16 behavior, ControlButtonContentInfo info, SInt16 menuID, UInt16 menuBehavior, UInt16 menuPlacement) -> (ControlHandle outControl)"}, #endif + {"CreateSliderControl", (PyCFunction)Ctl_CreateSliderControl, 1, + "(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, UInt16 orientation, UInt16 numTickMarks, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)"}, #if TARGET_API_MAC_CARBON *************** *** 6260,6263 **** --- 6374,6379 ---- "(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)"}, #endif + {"CreateScrollBarControl", (PyCFunction)Ctl_CreateScrollBarControl, 1, + "(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, SInt32 viewSize, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)"}, #if TARGET_API_MAC_CARBON *************** *** 6372,6377 **** if (rv) Py_DECREF(rv); ! else PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\n"); } --- 6488,6495 ---- if (rv) Py_DECREF(rv); ! else { PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\n"); + PyErr_Print(); + } } *************** *** 6382,6386 **** char keybuf[9]; ! if ( which == kControlUserPaneDrawProcTag ) *uppp = (UniversalProcPtr)mydrawproc_upp; else if ( which == kControlUserPaneIdleProcTag ) --- 6500,6506 ---- char keybuf[9]; ! if ( which == kMyControlActionProcTag ) ! *uppp = (UniversalProcPtr)myactionproc_upp; ! else if ( which == kControlUserPaneDrawProcTag ) *uppp = (UniversalProcPtr)mydrawproc_upp; else if ( which == kControlUserPaneIdleProcTag ) *************** *** 6419,6428 **** } rv = PyEval_CallObject(func, arglist); ! if ( rv == NULL ) PySys_WriteStderr("Exception in control callback %x handler\n", (unsigned)which); return rv; } static pascal void mydrawproc(ControlHandle control, SInt16 part) { --- 6539,6563 ---- } rv = PyEval_CallObject(func, arglist); ! if ( rv == NULL ) { PySys_WriteStderr("Exception in control callback %x handler\n", (unsigned)which); + PyErr_Print(); + } return rv; } static pascal void + myactionproc(ControlHandle control, SInt16 part) + { + ControlObject *ctl_obj; + PyObject *arglist, *rv; + + ctl_obj = (ControlObject *)CtlObj_WhichControl(control); + arglist = Py_BuildValue("Oh", ctl_obj, part); + rv = callcallback(ctl_obj, kMyControlActionProcTag, arglist); + Py_XDECREF(arglist); + Py_XDECREF(rv); + } + + static pascal void mydrawproc(ControlHandle control, SInt16 part) { *************** *** 6495,6498 **** --- 6630,6634 ---- mytracker_upp = NewControlActionUPP(mytracker); + myactionproc_upp = NewControlActionUPP(myactionproc); mydrawproc_upp = NewControlUserPaneDrawUPP(mydrawproc); myidleproc_upp = NewControlUserPaneIdleUPP(myidleproc); Index: ctlscan.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctlscan.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** ctlscan.py 2001/12/18 20:15:27 1.25 --- ctlscan.py 2001/12/30 21:25:26 1.26 *************** *** 89,92 **** --- 89,93 ---- 'SendControlMessage', # Parameter changed from long to void* from UH3.3 to UH3.4 'CreateTabsControl', # wrote manually + 'GetControlAction', # too much effort for too little usefulness # too lazy for now *************** *** 260,264 **** return [ 'ProcPtr', ! 'ControlActionUPP', 'Ptr', 'ControlDefSpec', # Don't know how to do this yet --- 261,265 ---- return [ 'ProcPtr', ! # 'ControlActionUPP', 'Ptr', 'ControlDefSpec', # Don't know how to do this yet *************** *** 320,323 **** --- 321,327 ---- ([("ControlButtonContentInfo", '*', "OutMode")], [("ControlButtonContentInfo", '*', "InMode")]), + + ([("ControlActionUPP", 'liveTrackingProc', "InMode")], + [("ControlActionUPPNewControl", 'liveTrackingProc', "InMode")]), ] Index: ctlsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctlsupport.py,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** ctlsupport.py 2001/12/18 12:53:47 1.47 --- ctlsupport.py 2001/12/30 21:25:26 1.48 *************** *** 95,98 **** --- 95,116 ---- ControlPushButtonIconAlignment = UInt16 + class ControlActionDefinition(Type): + def declare(self, name): + Output("%s %s;", self.typeName, name) + Output("UniversalProcPtr c_callback;") + def passInput(self, name): + return "myactionproc_upp" + def cleanup(self, name): + Output("setcallback((PyObject*)_self, kMyControlActionProcTag, actionProc, &c_callback);") + + class ControlActionDefinitionNewControl(ControlActionDefinition): + def cleanup(self, name): + Output("setcallback(_res, kMyControlActionProcTag, liveTrackingProc, &c_callback);") + + ControlActionUPP = ControlActionDefinition("PyObject*", "O") + ControlActionUPPNewControl = ControlActionDefinitionNewControl("PyObject*", "O") + ControlSliderOrientation = UInt16 + + includestuff = includestuff + """ #ifdef WITHOUT_FRAMEWORKS *************** *** 204,209 **** --- 222,229 ---- /* TrackControl and HandleControlClick callback support */ + #define kMyControlActionProcTag 'ACTN' /* not an official tag, only for internal use */ static PyObject *tracker; static ControlActionUPP mytracker_upp; + static ControlActionUPP myactionproc_upp; static ControlUserPaneDrawUPP mydrawproc_upp; static ControlUserPaneIdleUPP myidleproc_upp; *************** *** 280,285 **** if (rv) Py_DECREF(rv); ! else PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\\n"); } --- 300,307 ---- if (rv) Py_DECREF(rv); ! else { PySys_WriteStderr("TrackControl or HandleControlClick: exception in tracker function\\n"); + PyErr_Print(); + } } *************** *** 290,294 **** char keybuf[9]; ! if ( which == kControlUserPaneDrawProcTag ) *uppp = (UniversalProcPtr)mydrawproc_upp; else if ( which == kControlUserPaneIdleProcTag ) --- 312,318 ---- char keybuf[9]; ! if ( which == kMyControlActionProcTag ) ! *uppp = (UniversalProcPtr)myactionproc_upp; ! else if ( which == kControlUserPaneDrawProcTag ) *uppp = (UniversalProcPtr)mydrawproc_upp; else if ( which == kControlUserPaneIdleProcTag ) *************** *** 327,336 **** } rv = PyEval_CallObject(func, arglist); ! if ( rv == NULL ) PySys_WriteStderr("Exception in control callback %x handler\\n", (unsigned)which); return rv; } static pascal void mydrawproc(ControlHandle control, SInt16 part) { --- 351,375 ---- } rv = PyEval_CallObject(func, arglist); ! if ( rv == NULL ) { PySys_WriteStderr("Exception in control callback %x handler\\n", (unsigned)which); + PyErr_Print(); + } return rv; } static pascal void + myactionproc(ControlHandle control, SInt16 part) + { + ControlObject *ctl_obj; + PyObject *arglist, *rv; + + ctl_obj = (ControlObject *)CtlObj_WhichControl(control); + arglist = Py_BuildValue("Oh", ctl_obj, part); + rv = callcallback(ctl_obj, kMyControlActionProcTag, arglist); + Py_XDECREF(arglist); + Py_XDECREF(rv); + } + + static pascal void mydrawproc(ControlHandle control, SInt16 part) { *************** *** 397,400 **** --- 436,440 ---- initstuff = initstuff + """ mytracker_upp = NewControlActionUPP(mytracker); + myactionproc_upp = NewControlActionUPP(myactionproc); mydrawproc_upp = NewControlUserPaneDrawUPP(mydrawproc); myidleproc_upp = NewControlUserPaneIdleUPP(myidleproc); From jvr@users.sourceforge.net Mon Dec 31 08:56:54 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Mon, 31 Dec 2001 00:56:54 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Tools/IDE Wcontrols.py,1.12,1.13 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE In directory usw-pr-cvs1:/tmp/cvs-serv13925 Modified Files: Wcontrols.py Log Message: added support for live feedback in scrollbars Index: Wcontrols.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/Wcontrols.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Wcontrols.py 2001/12/04 13:30:17 1.12 --- Wcontrols.py 2001/12/31 08:56:52 1.13 *************** *** 296,301 **** """Standard scrollbar.""" ! def __init__(self, possize, callback = None, value = 0, min = 0, max = 0): ! procID = Controls.scrollBarProc ControlWidget.__init__(self, possize, "", procID, callback, value, min, max) --- 296,304 ---- """Standard scrollbar.""" ! def __init__(self, possize, callback=None, value=0, min=0, max=0, livefeedback=1): ! if livefeedback: ! procID = Controls.kControlScrollBarLiveProc ! else: ! procID = Controls.scrollBarProc ControlWidget.__init__(self, possize, "", procID, callback, value, min, max) *************** *** 374,405 **** if not self._enabled: return ! # custom TrackControl. A mousedown in a scrollbar arrow or page area should ! # generate _control hits as long as the mouse is a) down, b) still in the same part ! part = self._control.TestControl(point) ! if Controls.inUpButton <= part <= Controls.inPageDown: ! self._control.HiliteControl(part) ! self._hit(part) ! oldpart = part ! # slight delay before scrolling at top speed... ! now = Evt.TickCount() ! while Evt.StillDown(): ! if (Evt.TickCount() - now) > 18: # 0.3 seconds ! break ! while Evt.StillDown(): ! part = self._control.TestControl(point) ! if part == oldpart: ! self._control.HiliteControl(part) ! self._hit(part) ! else: ! self._control.HiliteControl(0) ! self.SetPort() ! point = Evt.GetMouse() ! self._control.HiliteControl(0) ! elif part == Controls.inThumb: ! part = self._control.TrackControl(point) if part: self._hit(part) def _hit(self, part): if part == Controls.inThumb: try: --- 377,389 ---- if not self._enabled: return ! def hitter(ctl, part, self=self): if part: self._hit(part) + part = self._control.TrackControl(point, hitter) + if part: + self._hit(part) def _hit(self, part): + value = None if part == Controls.inThumb: try: *************** *** 417,421 **** elif part == Controls.inPageDown: value = "--" ! if self._callback: Wbase.CallbackCall(self._callback, 1, value) --- 401,405 ---- elif part == Controls.inPageDown: value = "--" ! if value is not None and self._callback: Wbase.CallbackCall(self._callback, 1, value) From jvr@users.sourceforge.net Mon Dec 31 08:58:00 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Mon, 31 Dec 2001 00:58:00 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Tools/IDE PyBrowser.py,1.12,1.13 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE In directory usw-pr-cvs1:/tmp/cvs-serv14080 Modified Files: PyBrowser.py Log Message: half-hearted stab at supported the 2.2 object model better. Index: PyBrowser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PyBrowser.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** PyBrowser.py 2001/11/18 14:12:43 1.12 --- PyBrowser.py 2001/12/31 08:57:57 1.13 *************** *** 403,406 **** --- 403,415 ---- if hasattr(object, '__methods__'): attrs = attrs + object.__methods__ + if hasattr(object, '__dict__'): + attrs = attrs + object.__dict__.keys() + if hasattr(object, '__slots__'): + # XXX?? + attrs = attrs + object.__slots__ + if hasattr(object, "__class__") and "__class__" not in attrs: + attrs.append("__class__") + if hasattr(object, "__doc__") and "__doc__" not in attrs: + attrs.append("__doc__") items = [] for attr in attrs: From jvr@users.sourceforge.net Mon Dec 31 08:58:46 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Mon, 31 Dec 2001 00:58:46 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Tools/IDE ProfileBrowser.py,1.2,1.3 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE In directory usw-pr-cvs1:/tmp/cvs-serv14196 Modified Files: ProfileBrowser.py Log Message: made radio button labels readable under OSX Index: ProfileBrowser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/ProfileBrowser.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ProfileBrowser.py 2001/08/25 12:09:15 1.2 --- ProfileBrowser.py 2001/12/31 08:58:44 1.3 *************** *** 31,44 **** self.w.titlebar = W.TextBox((4, 4, 40, 12), 'Sort by:') self.buttons = [] ! self.w.button_calls = W.RadioButton((54, 4, 45, 12), 'calls', self.buttons, self.setsort) ! self.w.button_time = W.RadioButton((104, 4, 40, 12), 'time', self.buttons, self.setsort) ! self.w.button_cumulative = W.RadioButton((154, 4, 75, 12), 'cumulative', self.buttons, self.setsort) ! self.w.button_stdname = W.RadioButton((234, 4, 60, 12), 'stdname', self.buttons, self.setsort) self.w.button_calls.set(1) - self.w.button_file = W.RadioButton((304, 4, 40, 12), 'file', self.buttons, self.setsort) - self.w.button_line = W.RadioButton((354, 4, 50, 12), 'line', self.buttons, self.setsort) - self.w.button_name = W.RadioButton((404, 4, 50, 12), 'name', self.buttons, self.setsort) - ## self.w.button_nfl = W.RadioButton((4, 4, 12, 12), 'nfl', self.buttons, self.setsort) - ## self.w.button_pcalls = W.RadioButton((4, 4, 12, 12), 'pcalls', self.buttons, self.setsort) self.w.text = W.TextEditor((0, 21, -15, -15), inset = (6, 5), readonly = 1, wrap = 0, fontsettings = ('Monaco', 0, 9, (0, 0, 0))) --- 31,45 ---- self.w.titlebar = W.TextBox((4, 4, 40, 12), 'Sort by:') self.buttons = [] ! x = 54 ! width1 = 50 ! width2 = 75 ! for name in ["calls", "time", "cumulative", "stdname", "file", "line", "name"]: ! if len(name) > 6: ! width = width2 ! else: ! width = width1 ! self.w["button_" + name] = W.RadioButton((x, 4, width, 12), name, self.buttons, self.setsort) ! x += width + 10 self.w.button_calls.set(1) self.w.text = W.TextEditor((0, 21, -15, -15), inset = (6, 5), readonly = 1, wrap = 0, fontsettings = ('Monaco', 0, 9, (0, 0, 0))) From jvr@users.sourceforge.net Mon Dec 31 09:50:34 2001 From: jvr@users.sourceforge.net (Just van Rossum) Date: Mon, 31 Dec 2001 01:50:34 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/ctl _Ctlmodule.c,1.14,1.15 ctlscan.py,1.26,1.27 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/ctl In directory usw-pr-cvs1:/tmp/cvs-serv22335 Modified Files: _Ctlmodule.c ctlscan.py Log Message: Oops, forgot to mark CreateScrollBarControl and CreateSliderControl as Carbon-only Index: _Ctlmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/_Ctlmodule.c,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** _Ctlmodule.c 2001/12/30 21:25:26 1.14 --- _Ctlmodule.c 2001/12/31 09:50:31 1.15 *************** *** 5013,5016 **** --- 5013,5018 ---- #endif + #if TARGET_API_MAC_CARBON + static PyObject *Ctl_CreateSliderControl(PyObject *_self, PyObject *_args) { *************** *** 5058,5061 **** --- 5060,5064 ---- return _res; } + #endif #if TARGET_API_MAC_CARBON *************** *** 5825,5828 **** --- 5828,5833 ---- #endif + #if TARGET_API_MAC_CARBON + static PyObject *Ctl_CreateScrollBarControl(PyObject *_self, PyObject *_args) { *************** *** 5867,5870 **** --- 5872,5876 ---- return _res; } + #endif #if TARGET_API_MAC_CARBON *************** *** 6257,6262 **** --- 6263,6271 ---- "(WindowPtr window, Rect boundsRect, CFStringRef title, UInt16 thickness, UInt16 behavior, ControlButtonContentInfo info, SInt16 menuID, UInt16 menuBehavior, UInt16 menuPlacement) -> (ControlHandle outControl)"}, #endif + + #if TARGET_API_MAC_CARBON {"CreateSliderControl", (PyCFunction)Ctl_CreateSliderControl, 1, "(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, UInt16 orientation, UInt16 numTickMarks, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)"}, + #endif #if TARGET_API_MAC_CARBON *************** *** 6374,6379 **** --- 6383,6391 ---- "(WindowPtr window, Rect boundsRect, CFStringRef title, SInt32 initialValue, Boolean autoToggle) -> (ControlHandle outControl)"}, #endif + + #if TARGET_API_MAC_CARBON {"CreateScrollBarControl", (PyCFunction)Ctl_CreateScrollBarControl, 1, "(WindowPtr window, Rect boundsRect, SInt32 value, SInt32 minimum, SInt32 maximum, SInt32 viewSize, Boolean liveTracking, PyObject* liveTrackingProc) -> (ControlHandle outControl)"}, + #endif #if TARGET_API_MAC_CARBON Index: ctlscan.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/ctl/ctlscan.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** ctlscan.py 2001/12/30 21:25:26 1.26 --- ctlscan.py 2001/12/31 09:50:32 1.27 *************** *** 127,130 **** --- 127,132 ---- 'HandleControlContextualMenuClick', + "CreateScrollBarControl", + "CreateSliderControl", "CreateBevelButtonControl", "CreateImageWellControl", From jackjansen@users.sourceforge.net Mon Dec 31 14:51:56 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Mon, 31 Dec 2001 06:51:56 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/scrap _Scrapmodule.c,1.1,1.2 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/scrap In directory usw-pr-cvs1:/tmp/cvs-serv30492/Python/Mac/Modules/scrap Modified Files: _Scrapmodule.c Log Message: Added support for the Carbon scrap manager (finally). Index: _Scrapmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/scrap/_Scrapmodule.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** _Scrapmodule.c 2001/08/23 14:02:09 1.1 --- _Scrapmodule.c 2001/12/31 14:51:50 1.2 *************** *** 1,4 **** ! /* ========================== Module Scrap ========================== */ #include "Python.h" --- 1,4 ---- ! /* ========================= Module _Scrap ========================== */ #include "Python.h" *************** *** 6,12 **** --- 6,24 ---- + #ifdef _WIN32 + #include "pywintoolbox.h" + #else #include "macglue.h" #include "pymactoolbox.h" + #endif + /* Macro to test whether a weak-loaded CFM function exists */ + #define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\ + PyErr_SetString(PyExc_NotImplementedError, \ + "Not available in this shared library/OS version"); \ + return NULL; \ + }} while(0) + + #ifdef WITHOUT_FRAMEWORKS #include *************** *** 15,19 **** #endif ! #if !TARGET_API_MAC_CARBON /* --- 27,31 ---- #endif ! #if TARGET_API_MAC_OS8 /* *************** *** 33,40 **** static PyObject *Scrap_Error; ! static PyObject *Scrap_LoadScrap(_self, _args) ! PyObject *_self; ! PyObject *_args; { PyObject *_res = NULL; OSStatus _err; --- 45,285 ---- static PyObject *Scrap_Error; ! #if !TARGET_API_MAC_OS8 ! /* ----------------------- Object type Scrap ------------------------ */ ! ! PyTypeObject Scrap_Type; ! ! #define ScrapObj_Check(x) ((x)->ob_type == &Scrap_Type) ! ! typedef struct ScrapObject { ! PyObject_HEAD ! ScrapRef ob_itself; ! } ScrapObject; ! ! PyObject *ScrapObj_New(ScrapRef itself) ! { ! ScrapObject *it; ! it = PyObject_NEW(ScrapObject, &Scrap_Type); ! if (it == NULL) return NULL; ! it->ob_itself = itself; ! return (PyObject *)it; ! } ! int ScrapObj_Convert(PyObject *v, ScrapRef *p_itself) ! { ! if (!ScrapObj_Check(v)) ! { ! PyErr_SetString(PyExc_TypeError, "Scrap required"); ! return 0; ! } ! *p_itself = ((ScrapObject *)v)->ob_itself; ! return 1; ! } ! ! static void ScrapObj_dealloc(ScrapObject *self) ! { ! /* Cleanup of self->ob_itself goes here */ ! PyMem_DEL(self); ! } ! ! static PyObject *ScrapObj_GetScrapFlavorFlags(ScrapObject *_self, PyObject *_args) ! { ! PyObject *_res = NULL; ! OSStatus _err; ! ScrapFlavorType flavorType; ! ScrapFlavorFlags flavorFlags; ! if (!PyArg_ParseTuple(_args, "O&", ! PyMac_GetOSType, &flavorType)) ! return NULL; ! _err = GetScrapFlavorFlags(_self->ob_itself, ! flavorType, ! &flavorFlags); ! if (_err != noErr) return PyMac_Error(_err); ! _res = Py_BuildValue("l", ! flavorFlags); ! return _res; ! } ! ! static PyObject *ScrapObj_GetScrapFlavorSize(ScrapObject *_self, PyObject *_args) ! { ! PyObject *_res = NULL; ! OSStatus _err; ! ScrapFlavorType flavorType; ! Size byteCount; ! if (!PyArg_ParseTuple(_args, "O&", ! PyMac_GetOSType, &flavorType)) ! return NULL; ! _err = GetScrapFlavorSize(_self->ob_itself, ! flavorType, ! &byteCount); ! if (_err != noErr) return PyMac_Error(_err); ! _res = Py_BuildValue("l", ! byteCount); ! return _res; ! } ! ! static PyObject *ScrapObj_GetScrapFlavorData(ScrapObject *_self, PyObject *_args) ! { ! PyObject *_res = NULL; ! OSStatus _err; ! ScrapFlavorType flavorType; ! Size byteCount; ! ! if (!PyArg_ParseTuple(_args, "O&", ! PyMac_GetOSType, &flavorType)) ! return NULL; ! _err = GetScrapFlavorSize(_self->ob_itself, ! flavorType, ! &byteCount); ! if (_err != noErr) return PyMac_Error(_err); ! _res = PyString_FromStringAndSize(NULL, (int)byteCount); ! if ( _res == NULL ) return NULL; ! _err = GetScrapFlavorData(_self->ob_itself, ! flavorType, ! &byteCount, ! PyString_AS_STRING(_res)); ! if (_err != noErr) { ! Py_XDECREF(_res); ! return PyMac_Error(_err); ! } ! destination__error__: ; ! return _res; ! } ! ! static PyObject *ScrapObj_PutScrapFlavor(ScrapObject *_self, PyObject *_args) ! { ! PyObject *_res = NULL; ! OSStatus _err; ! ScrapFlavorType flavorType; ! ScrapFlavorFlags flavorFlags; ! char *flavorData__in__; ! int flavorData__in_len__; ! if (!PyArg_ParseTuple(_args, "O&ls#", ! PyMac_GetOSType, &flavorType, ! &flavorFlags, ! &flavorData__in__, &flavorData__in_len__)) ! return NULL; ! _err = PutScrapFlavor(_self->ob_itself, ! flavorType, ! flavorFlags, ! (Size)flavorData__in_len__, ! flavorData__in__); ! if (_err != noErr) return PyMac_Error(_err); ! Py_INCREF(Py_None); ! _res = Py_None; ! flavorData__error__: ; ! return _res; ! } ! ! static PyObject *ScrapObj_GetScrapFlavorCount(ScrapObject *_self, PyObject *_args) ! { ! PyObject *_res = NULL; ! OSStatus _err; ! UInt32 infoCount; ! if (!PyArg_ParseTuple(_args, "")) ! return NULL; ! _err = GetScrapFlavorCount(_self->ob_itself, ! &infoCount); ! if (_err != noErr) return PyMac_Error(_err); ! _res = Py_BuildValue("l", ! infoCount); ! return _res; ! } ! ! static PyObject *ScrapObj_GetScrapFlavorInfoList(ScrapObject *_self, PyObject *_args) ! { ! PyObject *_res = NULL; ! PyObject *item; ! OSStatus _err; ! UInt32 infoCount; ! ScrapFlavorInfo *infolist = NULL; ! int i; ! ! if (!PyArg_ParseTuple(_args, "")) ! return NULL; ! _err = GetScrapFlavorCount(_self->ob_itself, ! &infoCount); ! if (_err != noErr) return PyMac_Error(_err); ! if (infoCount == 0) return Py_BuildValue("[]"); ! ! if ((infolist = (ScrapFlavorInfo *)malloc(infoCount*sizeof(ScrapFlavorInfo))) == NULL ) ! return PyErr_NoMemory(); ! ! _err = GetScrapFlavorInfoList(_self->ob_itself, &infoCount, infolist); ! if (_err != noErr) { ! free(infolist); ! return NULL; ! } ! if ((_res = PyList_New(infoCount)) == NULL ) { ! free(infolist); ! return NULL; ! } ! for(i=0; i (ScrapFlavorFlags flavorFlags)"}, ! {"GetScrapFlavorSize", (PyCFunction)ScrapObj_GetScrapFlavorSize, 1, ! "(ScrapFlavorType flavorType) -> (Size byteCount)"}, ! {"GetScrapFlavorData", (PyCFunction)ScrapObj_GetScrapFlavorData, 1, ! "(ScrapFlavorType flavorType) -> string"}, ! {"PutScrapFlavor", (PyCFunction)ScrapObj_PutScrapFlavor, 1, ! "(ScrapFlavorType flavorType, ScrapFlavorFlags flavorFlags, Buffer flavorData) -> None"}, ! {"GetScrapFlavorCount", (PyCFunction)ScrapObj_GetScrapFlavorCount, 1, ! "() -> (UInt32 infoCount)"}, ! {"GetScrapFlavorInfoList", (PyCFunction)ScrapObj_GetScrapFlavorInfoList, 1, ! "() -> ([(ScrapFlavorType, ScrapFlavorInfo), ...])"}, ! {NULL, NULL, 0} ! }; ! ! PyMethodChain ScrapObj_chain = { ScrapObj_methods, NULL }; ! ! static PyObject *ScrapObj_getattr(ScrapObject *self, char *name) { + return Py_FindMethodInChain(&ScrapObj_chain, (PyObject *)self, name); + } + + #define ScrapObj_setattr NULL + + #define ScrapObj_compare NULL + + #define ScrapObj_repr NULL + + #define ScrapObj_hash NULL + + PyTypeObject Scrap_Type = { + PyObject_HEAD_INIT(NULL) + 0, /*ob_size*/ + "_Scrap.Scrap", /*tp_name*/ + sizeof(ScrapObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + /* methods */ + (destructor) ScrapObj_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ + (getattrfunc) ScrapObj_getattr, /*tp_getattr*/ + (setattrfunc) ScrapObj_setattr, /*tp_setattr*/ + (cmpfunc) ScrapObj_compare, /*tp_compare*/ + (reprfunc) ScrapObj_repr, /*tp_repr*/ + (PyNumberMethods *)0, /* tp_as_number */ + (PySequenceMethods *)0, /* tp_as_sequence */ + (PyMappingMethods *)0, /* tp_as_mapping */ + (hashfunc) ScrapObj_hash, /*tp_hash*/ + }; + + /* --------------------- End object type Scrap ---------------------- */ + #endif /* !TARGET_API_MAC_OS8 */ + + static PyObject *Scrap_LoadScrap(PyObject *_self, PyObject *_args) + { PyObject *_res = NULL; OSStatus _err; *************** *** 48,54 **** } ! static PyObject *Scrap_UnloadScrap(_self, _args) ! PyObject *_self; ! PyObject *_args; { PyObject *_res = NULL; --- 293,297 ---- } ! static PyObject *Scrap_UnloadScrap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; *************** *** 63,71 **** } ! #if !TARGET_API_MAC_CARBON ! static PyObject *Scrap_InfoScrap(_self, _args) ! PyObject *_self; ! PyObject *_args; { PyObject *_res = NULL; --- 306,312 ---- } ! #if TARGET_API_MAC_OS8 ! static PyObject *Scrap_InfoScrap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; *************** *** 78,88 **** return _res; } - #endif ! #if !TARGET_API_MAC_CARBON ! ! static PyObject *Scrap_GetScrap(_self, _args) ! PyObject *_self; ! PyObject *_args; { PyObject *_res = NULL; --- 319,324 ---- return _res; } ! static PyObject *Scrap_GetScrap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; *************** *** 103,112 **** return _res; } - #endif - ! static PyObject *Scrap_ZeroScrap(_self, _args) ! PyObject *_self; ! PyObject *_args; { PyObject *_res = NULL; --- 339,344 ---- return _res; } ! static PyObject *Scrap_ZeroScrap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; *************** *** 114,128 **** if (!PyArg_ParseTuple(_args, "")) return NULL; - #if TARGET_API_MAC_CARBON - { - ScrapRef scrap; - - _err = ClearCurrentScrap(); - if (_err != noErr) return PyMac_Error(_err); - _err = GetCurrentScrap(&scrap); - } - #else _err = ZeroScrap(); - #endif if (_err != noErr) return PyMac_Error(_err); Py_INCREF(Py_None); --- 346,350 ---- *************** *** 131,137 **** } ! static PyObject *Scrap_PutScrap(_self, _args) ! PyObject *_self; ! PyObject *_args; { PyObject *_res = NULL; --- 353,357 ---- } ! static PyObject *Scrap_PutScrap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; *************** *** 142,164 **** int sourceBuffer__len__; int sourceBuffer__in_len__; ! #if TARGET_API_MAC_CARBON ! ScrapRef scrap; ! #endif ! ! if (!PyArg_ParseTuple(_args, "O&s#", PyMac_GetOSType, &flavorType, &sourceBuffer__in__, &sourceBuffer__in_len__)) return NULL; - sourceBufferByteCount = sourceBuffer__in_len__; - sourceBuffer__len__ = sourceBuffer__in_len__; - #if TARGET_API_MAC_CARBON - _err = GetCurrentScrap(&scrap); - if (_err != noErr) return PyMac_Error(_err); - _err = PutScrapFlavor(scrap, flavorType, 0, sourceBufferByteCount, sourceBuffer__in__); - #else _err = PutScrap(sourceBufferByteCount, flavorType, sourceBuffer__in__); - #endif if (_err != noErr) return PyMac_Error(_err); Py_INCREF(Py_None); --- 362,373 ---- int sourceBuffer__len__; int sourceBuffer__in_len__; ! if (!PyArg_ParseTuple(_args, "lO&s#", ! &sourceBufferByteCount, PyMac_GetOSType, &flavorType, &sourceBuffer__in__, &sourceBuffer__in_len__)) return NULL; _err = PutScrap(sourceBufferByteCount, flavorType, sourceBuffer__in__); if (_err != noErr) return PyMac_Error(_err); Py_INCREF(Py_None); *************** *** 167,176 **** return _res; } ! #if TARGET_API_MAC_CARBON ! static PyObject *Scrap_ClearCurrentScrap(_self, _args) ! PyObject *_self; ! PyObject *_args; { PyObject *_res = NULL; --- 376,397 ---- return _res; } + #endif /* TARGET_API_MAC_OS8 */ ! #if !TARGET_API_MAC_OS8 ! static PyObject *Scrap_GetCurrentScrap(PyObject *_self, PyObject *_args) ! { ! PyObject *_res = NULL; ! OSStatus _err; ! ScrapRef scrap; ! if (!PyArg_ParseTuple(_args, "")) ! return NULL; ! _err = GetCurrentScrap(&scrap); ! if (_err != noErr) return PyMac_Error(_err); ! _res = Py_BuildValue("O&", ! ScrapObj_New, scrap); ! return _res; ! } ! static PyObject *Scrap_ClearCurrentScrap(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; *************** *** 184,194 **** return _res; } - #endif ! #if TARGET_API_MAC_CARBON ! ! static PyObject *Scrap_CallInScrapPromises(_self, _args) ! PyObject *_self; ! PyObject *_args; { PyObject *_res = NULL; --- 405,410 ---- return _res; } ! static PyObject *Scrap_CallInScrapPromises(PyObject *_self, PyObject *_args) { PyObject *_res = NULL; *************** *** 210,235 **** "() -> None"}, ! #if !TARGET_API_MAC_CARBON {"InfoScrap", (PyCFunction)Scrap_InfoScrap, 1, "() -> (ScrapStuffPtr _rv)"}, - #endif - - #if !TARGET_API_MAC_CARBON {"GetScrap", (PyCFunction)Scrap_GetScrap, 1, "(Handle destination, ScrapFlavorType flavorType) -> (long _rv, SInt32 offset)"}, - #endif - {"ZeroScrap", (PyCFunction)Scrap_ZeroScrap, 1, "() -> None"}, - {"PutScrap", (PyCFunction)Scrap_PutScrap, 1, ! "(ScrapFlavorType flavorType, Buffer sourceBuffer) -> None"}, ! #if TARGET_API_MAC_CARBON {"ClearCurrentScrap", (PyCFunction)Scrap_ClearCurrentScrap, 1, "() -> None"}, - #endif - - #if TARGET_API_MAC_CARBON {"CallInScrapPromises", (PyCFunction)Scrap_CallInScrapPromises, 1, "() -> None"}, --- 426,445 ---- "() -> None"}, ! #if TARGET_API_MAC_OS8 {"InfoScrap", (PyCFunction)Scrap_InfoScrap, 1, "() -> (ScrapStuffPtr _rv)"}, {"GetScrap", (PyCFunction)Scrap_GetScrap, 1, "(Handle destination, ScrapFlavorType flavorType) -> (long _rv, SInt32 offset)"}, {"ZeroScrap", (PyCFunction)Scrap_ZeroScrap, 1, "() -> None"}, {"PutScrap", (PyCFunction)Scrap_PutScrap, 1, ! "(SInt32 sourceBufferByteCount, ScrapFlavorType flavorType, Buffer sourceBuffer) -> None"}, ! #endif ! #if !TARGET_API_MAC_OS8 ! {"GetCurrentScrap", (PyCFunction)Scrap_GetCurrentScrap, 1, ! "() -> (ScrapRef scrap)"}, {"ClearCurrentScrap", (PyCFunction)Scrap_ClearCurrentScrap, 1, "() -> None"}, {"CallInScrapPromises", (PyCFunction)Scrap_CallInScrapPromises, 1, "() -> None"}, *************** *** 241,245 **** ! void init_Scrap() { PyObject *m; --- 451,455 ---- ! void init_Scrap(void) { PyObject *m; *************** *** 255,260 **** PyDict_SetItemString(d, "Error", Scrap_Error) != 0) return; } ! /* ======================== End module Scrap ======================== */ --- 465,476 ---- PyDict_SetItemString(d, "Error", Scrap_Error) != 0) return; + #if !TARGET_API_MAC_OS8 + Scrap_Type.ob_type = &PyType_Type; + Py_INCREF(&Scrap_Type); + if (PyDict_SetItemString(d, "ScrapType", (PyObject *)&Scrap_Type) != 0) + Py_FatalError("can't initialize ScrapType"); + #endif } ! /* ======================= End module _Scrap ======================== */ From jackjansen@users.sourceforge.net Mon Dec 31 14:52:01 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Mon, 31 Dec 2001 06:52:01 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/scrap scrapscan.py,1.4,1.5 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/scrap In directory usw-pr-cvs1:/tmp/cvs-serv30528/Python/Mac/Modules/scrap Modified Files: scrapscan.py Log Message: Added support for the Carbon scrap manager (finally). Index: scrapscan.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/scrap/scrapscan.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** scrapscan.py 2001/01/24 16:04:01 1.4 --- scrapscan.py 2001/12/31 14:51:59 1.5 *************** *** 6,10 **** import sys import os ! BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') sys.path.append(BGENDIR) from scantools import Scanner --- 6,13 ---- import sys import os ! if os.sep == ':': ! BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen') ! else: ! BGENDIR="../../../Tools/bgen/bgen" sys.path.append(BGENDIR) from scantools import Scanner *************** *** 30,37 **** --- 33,46 ---- classname = "Function" listname = "functions" + if arglist: + t, n, m = arglist[0] + if t == 'ScrapRef' and m == "InMode": + classname = "Method" + listname = "methods" return classname, listname def makeblacklistnames(self): return [ + "GetScrapFlavorInfoList", ] *************** *** 51,55 **** def makeblacklisttypes(self): return [ ! "ScrapRef", # For now -- This is the Carbon scrap main object ] --- 60,64 ---- def makeblacklisttypes(self): return [ ! 'ScrapPromiseKeeperUPP', ] From jackjansen@users.sourceforge.net Mon Dec 31 14:52:05 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Mon, 31 Dec 2001 06:52:05 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Modules/scrap scrapsupport.py,1.4,1.5 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Modules/scrap In directory usw-pr-cvs1:/tmp/cvs-serv30569/Python/Mac/Modules/scrap Modified Files: scrapsupport.py Log Message: Added support for the Carbon scrap manager (finally). Index: scrapsupport.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Modules/scrap/scrapsupport.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** scrapsupport.py 2001/08/23 13:50:47 1.4 --- scrapsupport.py 2001/12/31 14:52:03 1.5 *************** *** 12,18 **** --- 12,21 ---- MACHEADERFILE = 'Scrap.h' # The Apple header file MODNAME = '_Scrap' # The name of the module + OBJECTNAME = 'Scrap' # The basic name of the objects used here # The following is *usually* unchanged but may still require tuning MODPREFIX = 'Scrap' # The prefix for module-wide routines + OBJECTTYPE = OBJECTNAME + 'Ref' # The C type used to represent them + OBJECTPREFIX = MODPREFIX + 'Obj' # The prefix for object methods INPUTFILE = string.lower(MODPREFIX) + 'gen.py' # The file generated by the scanner OUTPUTFILE = '@' + MODNAME + "module.c" # The file generated by this program *************** *** 21,24 **** --- 24,28 ---- # Create the type objects + ScrapRef = OpaqueByValueType(OBJECTTYPE, OBJECTPREFIX) includestuff = includestuff + """ *************** *** 45,58 **** --- 49,71 ---- ScrapStuffPtr = OpaqueByValueType('ScrapStuffPtr', 'SCRRec') ScrapFlavorType = OSTypeType('ScrapFlavorType') + ScrapFlavorFlags = Type('ScrapFlavorFlags', 'l') + #ScrapFlavorInfo = OpaqueType('ScrapFlavorInfo', 'ScrapFlavorInfo') putscrapbuffer = FixedInputBufferType('void *') + class MyObjectDefinition(GlobalObjectDefinition): + pass + # Create the generator groups and link them module = MacModule(MODNAME, MODPREFIX, includestuff, finalstuff, initstuff) + object = MyObjectDefinition(OBJECTNAME, OBJECTPREFIX, OBJECTTYPE) + module.addobject(object) # Create the generator classes used to populate the lists Function = OSErrFunctionGenerator + Method = OSErrMethodGenerator # Create and populate the lists functions = [] + methods = [] execfile(INPUTFILE) *************** *** 60,63 **** --- 73,77 ---- # (in a different wordl the scan program would generate this) for f in functions: module.add(f) + for f in methods: object.add(f) # generate output (open the output file as late as possible) From jackjansen@users.sourceforge.net Mon Dec 31 14:52:54 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Mon, 31 Dec 2001 06:52:54 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Tools/IDE Wtext.py,1.16,1.17 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE In directory usw-pr-cvs1:/tmp/cvs-serv30662/Python/Mac/Tools/IDE Modified Files: Wtext.py Log Message: Use the Carbon scrap manager interface if the old interface isn't available. Index: Wtext.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/Wtext.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Wtext.py 2001/12/04 13:30:29 1.16 --- Wtext.py 2001/12/31 14:52:52 1.17 *************** *** 431,435 **** if selbegin == selend: return ! Scrap.ZeroScrap() self.ted.WECopy() self.updatescrollbars() --- 431,438 ---- if selbegin == selend: return ! if hasattr(Scrap, 'ZeroScrap'): ! Scrap.ZeroScrap() ! else: ! Scrap.ClearCurrentScrap() self.ted.WECopy() self.updatescrollbars() *************** *** 439,443 **** if selbegin == selend: return ! Scrap.ZeroScrap() self.ted.WECut() self.updatescrollbars() --- 442,449 ---- if selbegin == selend: return ! if hasattr(Scrap, 'ZeroScrap'): ! Scrap.ZeroScrap() ! else: ! Scrap.ClearCurrentScrap() self.ted.WECut() self.updatescrollbars() From jackjansen@users.sourceforge.net Mon Dec 31 14:53:01 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Mon, 31 Dec 2001 06:53:01 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Tools/IDE Wwindows.py,1.13,1.14 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE In directory usw-pr-cvs1:/tmp/cvs-serv30688/Python/Mac/Tools/IDE Modified Files: Wwindows.py Log Message: Use the Carbon scrap manager interface if the old interface isn't available. Index: Wwindows.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/Wwindows.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Wwindows.py 2001/11/02 19:09:34 1.13 --- Wwindows.py 2001/12/31 14:52:59 1.14 *************** *** 565,570 **** 1) == 1: from Carbon import Scrap ! Scrap.ZeroScrap() ! Scrap.PutScrap('TEXT', stuff) --- 565,575 ---- 1) == 1: from Carbon import Scrap ! if hasattr(Scrap, 'PutScrap'): ! Scrap.ZeroScrap() ! Scrap.PutScrap('TEXT', stuff) ! else: ! Scrap.ClearCurrentScrap() ! sc = Scrap.GetCurrentScrap() ! sc.PutScrapFlavor('TEXT', 0, stuff) From jackjansen@users.sourceforge.net Mon Dec 31 14:53:07 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Mon, 31 Dec 2001 06:53:07 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Tools/IDE Wlists.py,1.10,1.11 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE In directory usw-pr-cvs1:/tmp/cvs-serv30739/Python/Mac/Tools/IDE Modified Files: Wlists.py Log Message: Use the Carbon scrap manager interface if the old interface isn't available. Index: Wlists.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/Wlists.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Wlists.py 2001/12/08 09:51:41 1.10 --- Wlists.py 2001/12/31 14:53:05 1.11 *************** *** 177,182 **** text = string.join(selitems, '\r') if text: ! Scrap.ZeroScrap() ! Scrap.PutScrap('TEXT', text) def can_copy(self, *args): --- 177,187 ---- text = string.join(selitems, '\r') if text: ! if hasattr(Scrap, 'PutScrap'): ! Scrap.ZeroScrap() ! Scrap.PutScrap('TEXT', text) ! else: ! Scrap.ClearCurrentScrap() ! sc = Scrap.GetCurrentScrap() ! sc.PutScrapFlavor('TEXT', 0, text) def can_copy(self, *args): From jackjansen@users.sourceforge.net Mon Dec 31 15:02:32 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Mon, 31 Dec 2001 07:02:32 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Demo/waste wed.py,1.7,1.8 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Demo/waste In directory usw-pr-cvs1:/tmp/cvs-serv32104/Python/Mac/Demo/waste Modified Files: wed.py Log Message: Updated to optionally use Carbon Scrap manager. Index: wed.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Demo/waste/wed.py,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wed.py 2001/08/25 12:14:04 1.7 --- wed.py 2001/12/31 15:02:30 1.8 *************** *** 191,196 **** def menu_cut(self): self.ted.WESelView() ! self.ted.WECut() ! Scrap.ZeroScrap() self.ted.WECut() self.updatescrollbars() --- 191,198 ---- def menu_cut(self): self.ted.WESelView() ! if hasattr(Scrap, 'ZeroScrap'): ! Scrap.ZeroScrap() ! else: ! Scrap.ClearCurrentScrap() self.ted.WECut() self.updatescrollbars() *************** *** 199,203 **** def menu_copy(self): ! Scrap.ZeroScrap() self.ted.WECopy() self.updatescrollbars() --- 201,208 ---- def menu_copy(self): ! if hasattr(Scrap, 'ZeroScrap'): ! Scrap.ZeroScrap() ! else: ! Scrap.ClearCurrentScrap() self.ted.WECopy() self.updatescrollbars() From jackjansen@users.sourceforge.net Mon Dec 31 15:02:41 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Mon, 31 Dec 2001 07:02:41 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Demo/waste swed.py,1.11,1.12 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Demo/waste In directory usw-pr-cvs1:/tmp/cvs-serv32131/Python/Mac/Demo/waste Modified Files: swed.py Log Message: Updated to optionally use Carbon Scrap manager. Index: swed.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Demo/waste/swed.py,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** swed.py 2001/08/25 12:12:59 1.11 --- swed.py 2001/12/31 15:02:38 1.12 *************** *** 236,241 **** def menu_cut(self): self.ted.WESelView() ! self.ted.WECut() ! Scrap.ZeroScrap() self.ted.WECut() self.updatescrollbars() --- 236,243 ---- def menu_cut(self): self.ted.WESelView() ! if hasattr(Scrap, 'ZeroScrap'): ! Scrap.ZeroScrap() ! else: ! Scrap.ClearCurrentScrap() self.ted.WECut() self.updatescrollbars() *************** *** 243,247 **** def menu_copy(self): ! Scrap.ZeroScrap() self.ted.WECopy() self.updatescrollbars() --- 245,252 ---- def menu_copy(self): ! if hasattr(Scrap, 'ZeroScrap'): ! Scrap.ZeroScrap() ! else: ! Scrap.ClearCurrentScrap() self.ted.WECopy() self.updatescrollbars() From jackjansen@users.sourceforge.net Mon Dec 31 15:02:50 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Mon, 31 Dec 2001 07:02:50 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Demo/waste htmled.py,1.10,1.11 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Demo/waste In directory usw-pr-cvs1:/tmp/cvs-serv32165/Python/Mac/Demo/waste Modified Files: htmled.py Log Message: Updated to optionally use Carbon Scrap manager. Index: htmled.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Demo/waste/htmled.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** htmled.py 2001/08/25 12:05:14 1.10 --- htmled.py 2001/12/31 15:02:48 1.11 *************** *** 298,303 **** def menu_cut(self): self.ted.WESelView() ! self.ted.WECut() ! Scrap.ZeroScrap() self.ted.WECut() self.updatescrollbars() --- 298,305 ---- def menu_cut(self): self.ted.WESelView() ! if hasattr(Scrap, 'ZeroScrap'): ! Scrap.ZeroScrap() ! else: ! Scrap.ClearCurrentScrap() self.ted.WECut() self.updatescrollbars() *************** *** 305,309 **** def menu_copy(self): ! Scrap.ZeroScrap() self.ted.WECopy() self.updatescrollbars() --- 307,314 ---- def menu_copy(self): ! if hasattr(Scrap, 'ZeroScrap'): ! Scrap.ZeroScrap() ! else: ! Scrap.ClearCurrentScrap() self.ted.WECopy() self.updatescrollbars() From jackjansen@users.sourceforge.net Mon Dec 31 15:02:58 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Mon, 31 Dec 2001 07:02:58 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Demo/textedit ped.py,1.8,1.9 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Demo/textedit In directory usw-pr-cvs1:/tmp/cvs-serv32190/Python/Mac/Demo/textedit Modified Files: ped.py Log Message: Updated to optionally use Carbon Scrap manager. Index: ped.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Demo/textedit/ped.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ped.py 2001/08/25 12:07:57 1.8 --- ped.py 2001/12/31 15:02:56 1.9 *************** *** 142,146 **** self.ted.TESelView() self.ted.TECut() ! Scrap.ZeroScrap() TE.TEToScrap() self.updatescrollbars() --- 142,149 ---- self.ted.TESelView() self.ted.TECut() ! if hasattr(Scrap, 'ZeroScrap'): ! Scrap.ZeroScrap() ! else: ! Scrap.ClearCurrentScrap() TE.TEToScrap() self.updatescrollbars() *************** *** 150,154 **** def menu_copy(self): self.ted.TECopy() ! Scrap.ZeroScrap() TE.TEToScrap() self.updatescrollbars() --- 153,160 ---- def menu_copy(self): self.ted.TECopy() ! if hasattr(Scrap, 'ZeroScrap'): ! Scrap.ZeroScrap() ! else: ! Scrap.ClearCurrentScrap() TE.TEToScrap() self.updatescrollbars() *************** *** 227,232 **** on = (Scrap.InfoScrap()[0] <> 0) else: ! # Not there yet on Carbon, simply always enable ! on = 1 if on <> self.pastegroup_on: self.pasteitem.enable(on) --- 233,243 ---- on = (Scrap.InfoScrap()[0] <> 0) else: ! flavors = Scrap.GetCurrentScrap().GetScrapFlavorInfoList() ! for tp, info in flavors: ! if tp == 'TEXT': ! on = 1 ! break ! else: ! on = 0 if on <> self.pastegroup_on: self.pasteitem.enable(on) From jackjansen@users.sourceforge.net Mon Dec 31 15:08:07 2001 From: jackjansen@users.sourceforge.net (Jack Jansen) Date: Mon, 31 Dec 2001 07:08:07 -0800 Subject: [Python-checkins] CVS: python/dist/src/Mac/Tools/IDE PyBrowser.py,1.13,1.14 Message-ID: Update of /cvsroot/python/python/dist/src/Mac/Tools/IDE In directory usw-pr-cvs1:/tmp/cvs-serv592/Python/Mac/Tools/IDE Modified Files: PyBrowser.py Log Message: Use the Carbon scrap manager interface if the old interface isn't available. Index: PyBrowser.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Mac/Tools/IDE/PyBrowser.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PyBrowser.py 2001/12/31 08:57:57 1.13 --- PyBrowser.py 2001/12/31 15:08:04 1.14 *************** *** 292,297 **** if text: from Carbon import Scrap ! Scrap.ZeroScrap() ! Scrap.PutScrap('TEXT', text) --- 292,302 ---- if text: from Carbon import Scrap ! if hasattr(Scrap, 'PutScrap'): ! Scrap.ZeroScrap() ! Scrap.PutScrap('TEXT', text) ! else: ! Scrap.ClearCurrentScrap() ! sc = Scrap.GetCurrentScrap() ! sc.PutScrapFlavor('TEXT', 0, text)