Index: abstract.c =================================================================== RCS file: /projects/cvsroot/python/dist/src/Objects/abstract.c,v retrieving revision 2.14 diff -c -r2.14 abstract.c *** old/Objects/abstract.c 1997/05/20 22:09:08 2.14 --- Objects/abstract.c 1998/04/03 23:36:10 *************** *** 463,469 **** "pow() requires numeric arguments"); return NULL; } ! if (PyFloat_Check(w) && PyFloat_AsDouble(v) < 0.0) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_ValueError, "negative number to float power"); --- 463,470 ---- "pow() requires numeric arguments"); return NULL; } ! if (PyFloat_Check(v) && PyFloat_Check(w) && ! PyFloat_AsDouble(v) < 0.0) { if (!PyErr_Occurred()) PyErr_SetString(PyExc_ValueError, "negative number to float power"); Index: code.py =================================================================== RCS file: /projects/cvsroot/python/dist/src/Lib/code.py,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** old/Lib/code.py 1997/10/07 14:47:24 1.2 --- Lib/code.py 1998/01/14 15:40:30 1.3 *************** *** 1,5 **** - # XXX This is broken with class exceptions - """Utilities dealing with code objects.""" def compile_command(source, filename="", symbol="single"): --- 1,3 ---- *************** *** 50,56 **** if code: return code ! if not code1 and err1 == err2: raise SyntaxError, err1 --- 48,62 ---- if code: return code ! try: ! e1 = err1.__dict__ ! except AttributeError: ! e1 = err1 ! try: ! e2 = err2.__dict__ ! except AttributeError: ! e2 = err2 ! if not code1 and e1 == e2: raise SyntaxError, err1 Index: fileobject.c =================================================================== RCS file: /projects/cvsroot/python/dist/src/Objects/fileobject.c,v retrieving revision 2.53 retrieving revision 2.57 diff -c -r2.53 -r2.57 *** old/Objects/fileobject.c 1997/11/07 19:20:34 2.53 --- Objects/fileobject.c 1998/03/18 17:59:20 2.57 *************** *** 165,171 **** } setvbuf(((PyFileObject *)f)->f_fp, (char *)NULL, type, bufsize); ! #endif /* HAVE_SETVBUF */ } } --- 165,174 ---- } setvbuf(((PyFileObject *)f)->f_fp, (char *)NULL, type, bufsize); ! #else /* !HAVE_SETVBUF */ ! if (bufsize <= 1) ! setbuf(((PyFileObject *)f)->f_fp, (char *)NULL); ! #endif /* !HAVE_SETVBUF */ } } *************** *** 406,422 **** size_t currentsize; { #ifdef HAVE_FSTAT - #ifndef SEEK_CUR - #define SEEK_CUR 1 - #endif long pos, end; struct stat st; if (fstat(fileno(f->f_fp), &st) == 0) { end = st.st_size; ! pos = lseek(fileno(f->f_fp), 0L, SEEK_CUR); if (end > pos && pos >= 0) ! return end - pos + BUFSIZ; ! /* Add BUFSIZ to allow for stdio buffered data */ } #endif if (currentsize > SMALLCHUNK) { --- 409,422 ---- size_t currentsize; { #ifdef HAVE_FSTAT long pos, end; struct stat st; if (fstat(fileno(f->f_fp), &st) == 0) { end = st.st_size; ! pos = ftell(f->f_fp); if (end > pos && pos >= 0) ! return end - pos + 1; ! /* Add 1 so if the file were to grow we'd notice. */ } #endif if (currentsize > SMALLCHUNK) { *************** *** 469,475 **** if (bytesread < buffersize) break; if (bytesrequested < 0) { ! buffersize = new_buffersize(f, buffersize); if (_PyString_Resize(&v, buffersize) < 0) return NULL; } --- 469,475 ---- if (bytesread < buffersize) break; if (bytesrequested < 0) { ! buffersize = bytesread + new_buffersize(f, buffersize); if (_PyString_Resize(&v, buffersize) < 0) return NULL; } *************** *** 695,701 **** Py_END_ALLOW_THREADS if (nread == 0) { sizehint = 0; ! if (nread == 0) break; PyErr_SetFromErrno(PyExc_IOError); clearerr(f->f_fp); --- 695,701 ---- Py_END_ALLOW_THREADS if (nread == 0) { sizehint = 0; ! if (!ferror(f->f_fp)) break; PyErr_SetFromErrno(PyExc_IOError); clearerr(f->f_fp); diff -cr ../Python-1.5.orig/Objects/listobject.c ./Objects/listobject.c *** ../Python-1.5.orig/Objects/listobject.c Wed Dec 10 16:14:24 1997 --- Objects/listobject.c Thu Mar 12 19:43:24 1998 *************** *** 719,725 **** r = hi-2; for (;;) { /* Move left index to element > pivot */ ! for (;;) { k = docompare(*l, pivot, compare); if (k == CMPERROR) return -1; --- 719,725 ---- r = hi-2; for (;;) { /* Move left index to element > pivot */ ! while (l < hi) { k = docompare(*l, pivot, compare); if (k == CMPERROR) return -1; *************** *** 728,734 **** l++; } /* Move right index to element < pivot */ ! for (;;) { k = docompare(pivot, *r, compare); if (k == CMPERROR) return -1; --- 728,734 ---- l++; } /* Move right index to element < pivot */ ! while (r >= lo) { k = docompare(pivot, *r, compare); if (k == CMPERROR) return -1; diff -cr ../Python-1.5.orig/Lib/ntpath.py ./Lib/ntpath.py *** ../Python-1.5.orig/Lib/ntpath.py Fri Dec 5 20:03:01 1997 --- Lib/ntpath.py Thu Mar 12 19:43:34 1998 *************** *** 13,25 **** # Other normalizations (such as optimizing '../' away) are not done # (this is done by normpath). - _normtable = string.maketrans(string.uppercase + "\\/", - string.lowercase + os.sep * 2) - def normcase(s): ! """Normalize case of pathname. Makes all characters lowercase and all ! slashes into backslashes""" ! return string.translate(s, _normtable) # Return wheter a path is absolute. --- 13,25 ---- # Other normalizations (such as optimizing '../' away) are not done # (this is done by normpath). def normcase(s): ! """Normalize case of pathname. ! ! Makes all characters lowercase and all slashes into backslashes. ! ! """ ! return string.lower(string.replace(s, "/", "\\")) # Return wheter a path is absolute. *************** *** 223,230 **** # XXX This degenerates in: 'is this the root?' on DOS def ismount(path): ! """Test whether a path is a mount point""" ! return isabs(splitdrive(path)[1]) # Directory tree walk. --- 223,231 ---- # XXX This degenerates in: 'is this the root?' on DOS def ismount(path): ! """Test whether a path is a mount point (defined as root of drive)""" ! p = splitdrive(path)[1] ! return len(p)==1 and p[0] in '/\\' # Directory tree walk. *************** *** 355,361 **** def normpath(path): """Normalize path, eliminating double slashes, etc.""" ! path = normcase(path) prefix, path = splitdrive(path) while path[:1] == os.sep: prefix = prefix + os.sep --- 356,362 ---- def normpath(path): """Normalize path, eliminating double slashes, etc.""" ! path = string.replace(path, "/", "\\") prefix, path = splitdrive(path) while path[:1] == os.sep: prefix = prefix + os.sep diff -cr ../Python-1.5.orig/Modules/pcre.h ./Modules/pcre.h *** ../Python-1.5.orig/Modules/pcre.h Mon Dec 22 23:46:46 1997 --- Modules/pcre.h Thu Mar 12 19:44:43 1998 *************** *** 57,67 **** #ifdef FOR_PYTHON extern pcre *pcre_compile(const char *, int, const char **, int *, PyObject *); #else extern pcre *pcre_compile(const char *, int, const char **, int *); - #endif extern int pcre_exec(const pcre *, const pcre_extra *, const char *, int, int, int *, int); extern int pcre_info(const pcre *, int *, int *); extern pcre_extra *pcre_study(const pcre *, int, const char **); extern const char *pcre_version(void); --- 57,69 ---- #ifdef FOR_PYTHON extern pcre *pcre_compile(const char *, int, const char **, int *, PyObject *); + extern int pcre_exec(const pcre *, const pcre_extra *, const char *, + int, int, int, int *, int); #else extern pcre *pcre_compile(const char *, int, const char **, int *); extern int pcre_exec(const pcre *, const pcre_extra *, const char *, int, int, int *, int); + #endif extern int pcre_info(const pcre *, int *, int *); extern pcre_extra *pcre_study(const pcre *, int, const char **); extern const char *pcre_version(void); diff -cr ../Python-1.5.orig/Modules/pcremodule.c ./Modules/pcremodule.c *** ../Python-1.5.orig/Modules/pcremodule.c Mon Dec 22 23:46:48 1997 --- Modules/pcremodule.c Thu Mar 12 19:44:03 1998 *************** *** 115,121 **** return NULL; if (endpos == -1) {endpos = stringlen;} count = pcre_exec(self->regex, self->regex_extra, ! (char *)string+pos, endpos - pos, options, offsets, sizeof(offsets)/sizeof(int) ); /* If an error occurred during the match, and an exception was raised, just return NULL and leave the exception alone. The most likely --- 115,121 ---- return NULL; if (endpos == -1) {endpos = stringlen;} count = pcre_exec(self->regex, self->regex_extra, ! (char *)string, endpos, pos, options, offsets, sizeof(offsets)/sizeof(int) ); /* If an error occurred during the match, and an exception was raised, just return NULL and leave the exception alone. The most likely *************** *** 143,150 **** /* If the group wasn't affected by the match, return -1, -1 */ if (start<0 || count<=i) {start=end=-1;} - else - {start += pos; end +=pos;} v=Py_BuildValue("ii", start, end); if (v==NULL) {Py_DECREF(list); return NULL;} PyList_SetItem(list, i, v); --- 143,148 ---- diff -cr ../Python-1.5.orig/Modules/pypcre.c ./Modules/pypcre.c *** ../Python-1.5.orig/Modules/pypcre.c Mon Dec 22 23:46:52 1997 --- Modules/pypcre.c Thu Mar 12 19:46:04 1998 *************** *** 4419,4425 **** int pcre_exec(const pcre *external_re, const pcre_extra *external_extra, ! const char *subject, int length, int options, int *offsets, int offsetcount) { /* The "volatile" directives are to make gcc -Wall stop complaining that these variables can be clobbered by the longjmp. Hopefully --- 4424,4431 ---- int pcre_exec(const pcre *external_re, const pcre_extra *external_extra, ! const char *subject, int length, int start_pos, int options, ! int *offsets, int offsetcount) { /* The "volatile" directives are to make gcc -Wall stop complaining that these variables can be clobbered by the longjmp. Hopefully *************** *** 4428,4434 **** int first_char = -1; match_data match_block; const uschar *start_bits = NULL; ! const uschar *start_match = (const uschar *)subject; const uschar *end_subject; const real_pcre *re = (const real_pcre *)external_re; const real_pcre_extra *extra = (const real_pcre_extra *)external_extra; --- 4434,4440 ---- int first_char = -1; match_data match_block; const uschar *start_bits = NULL; ! const uschar *start_match = (const uschar *)subject + start_pos; const uschar *end_subject; const real_pcre *re = (const real_pcre *)external_re; const real_pcre_extra *extra = (const real_pcre_extra *)external_extra; Subject: [String-SIG] \ escapes in re.sub From: "Andrew M. Kuchling" To: string-sig@python.org Date: Sun, 22 Mar 1998 22:48:27 -0500 (EST) The patch below changes the way escapes are handled in the replacement string of re.sub and re.subn. An unknown escape like \s is currently treated as just an 's', which is different from the way unknown escapes are usually treated in Python's string literals. This patch modifies the behaviour so that the \ is preserved, and \s results in '\s'. This was reported as a bug a little while back. I'm not sure if it really is; keeping just the 's' is inconsistent with Python string literals, but it's consistent with re patterns. For example, r'\j' matches just 'j'. It can be argued that the behaviour should be left as it is. So it's a stylistic question: which consistency is better? Which inconsistency is worse? Some of the tests in test_re.py will break as a result of this change; I'm going to take care of that in a separate patch in a little bit, if it's decided that the change should be accepted. Once this is settled, I'll be issuing a new PCRE release that implements \g<1> in replacement strings, as a synonym for \1 that isn't vulnerable to ambiguities as in \10\1. No patch will be made for that, because it's a new feature and not a bug. A.M. Kuchling http://starship.skyport.net/crew/amk/ There was not a lot that could be done to make Morpork a worse place. A direct hit by a meteorite, for example, would count as gentrification. -- Terry Pratchett, _Pyramids_ *** pcremodule.c 1998/03/11 04:49:44 1.9 --- Modules/pcremodule.c 1998/03/19 03:55:57 *************** *** 73,77 **** #define BEGINNING_OF_BUFFER 7 #define END_OF_BUFFER 8 ! static PcreObject * --- 73,77 ---- #define BEGINNING_OF_BUFFER 7 #define END_OF_BUFFER 8 ! #define STRING 9 static PcreObject * *************** *** 284,287 **** --- 284,291 ---- return Py_BuildValue("c", (char)8); break; + case('\\'): + *indexptr=index; + return Py_BuildValue("c", '\\'); + break; case('x'): *************** *** 450,455 **** default: *indexptr = index; ! return Py_BuildValue("c", c); break; } --- 454,462 ---- default: + /* It's some unknown escape like \s, so return a string containing + \s */ + *typeptr = STRING; *indexptr = index; ! return Py_BuildValue("s#", pattern+index-2, 2); break; } *************** *** 543,546 **** --- 550,559 ---- } break; + case(STRING): + { + PyList_Append(results, value); + total_len += PyString_Size(value); + break; + } default: Py_DECREF(results); ------------------------------------------------------ String-SIG maillist - String-SIG@python.org http://www.python.org/mailman/listinfo/string-sig diff -cr ../Python-1.5.orig/Modules/pypcre.c ./Modules/pypcre.c *** ../Python-1.5.orig/Modules/pypcre.c Mon Dec 22 23:46:52 1997 --- Modules/pypcre.c Thu Mar 12 19:46:04 1998 *************** *** 809,814 **** --- 809,821 ---- case OP_KETRMIN: return TRUE; + /* Skip over entire bracket groups with zero lower bound */ + + case OP_BRAZERO: + case OP_BRAMINZERO: + cc++; + /* Fall through */ + /* Skip over assertive subpatterns */ case OP_ASSERT: *************** *** 823,830 **** case OP_EOD: case OP_CIRC: case OP_DOLL: - case OP_BRAZERO: - case OP_BRAMINZERO: case OP_NOT_WORD_BOUNDARY: case OP_WORD_BOUNDARY: case OP_NOT_WORD_BOUNDARY_L: --- 830,835 ---- Index: pythonrun.c =================================================================== RCS file: /projects/cvsroot/python/dist/src/Python/pythonrun.c,v retrieving revision 2.74 retrieving revision 2.75 diff -c -r2.74 -r2.75 *** old/Python/pythonrun.c 1998/02/06 22:27:24 2.74 --- Python/pythonrun.c 1998/02/28 04:31:39 2.75 *************** *** 676,682 **** return; if (PyErr_GivenExceptionMatches(exception, PyExc_SystemExit)) { ! err = Py_FlushLine(); fflush(stdout); if (v == NULL || v == Py_None) Py_Exit(0); --- 676,683 ---- return; if (PyErr_GivenExceptionMatches(exception, PyExc_SystemExit)) { ! if (Py_FlushLine()) ! PyErr_Clear(); fflush(stdout); if (v == NULL || v == Py_None) Py_Exit(0); *************** *** 714,723 **** if (f == NULL) fprintf(stderr, "lost sys.stderr\n"); else { ! err = Py_FlushLine(); fflush(stdout); ! if (err == 0) ! err = PyTraceBack_Print(tb, f); if (err == 0 && PyErr_GivenExceptionMatches(exception, PyExc_SyntaxError)) { --- 715,724 ---- if (f == NULL) fprintf(stderr, "lost sys.stderr\n"); else { ! if (Py_FlushLine()) ! PyErr_Clear(); fflush(stdout); ! err = PyTraceBack_Print(tb, f); if (err == 0 && PyErr_GivenExceptionMatches(exception, PyExc_SyntaxError)) { *************** *** 1062,1068 **** Py_DECREF(exitfunc); } ! Py_FlushLine(); } static void --- 1063,1070 ---- Py_DECREF(exitfunc); } ! if (Py_FlushLine()) ! PyErr_Clear(); } static void diff -cr ../Python-1.5.orig/Lib/random.py ./Lib/random.py *** ../Python-1.5.orig/Lib/random.py Tue Dec 9 20:43:18 1997 --- Lib/random.py Thu Mar 12 19:46:11 1998 *************** *** 182,193 **** # When x and y are two variables from [0, 1), uniformly # distributed, then # ! # cos(2*pi*x)*log(1-y) ! # sin(2*pi*x)*log(1-y) # # are two *independent* variables with normal distribution # (mu = 0, sigma = 1). # (Lambert Meertens) global gauss_next --- 182,194 ---- # When x and y are two variables from [0, 1), uniformly # distributed, then # ! # cos(2*pi*x)*sqrt(-2*log(1-y)) ! # sin(2*pi*x)*sqrt(-2*log(1-y)) # # are two *independent* variables with normal distribution # (mu = 0, sigma = 1). # (Lambert Meertens) + # (corrected version; bug discovered by Mike Miller, fixed by LM) global gauss_next *************** *** 196,204 **** gauss_next = None else: x2pi = random() * TWOPI ! log1_y = log(1.0 - random()) ! z = cos(x2pi) * log1_y ! gauss_next = sin(x2pi) * log1_y return mu + z*sigma --- 197,205 ---- gauss_next = None else: x2pi = random() * TWOPI ! g2rad = sqrt(-2.0 * log(1.0 - random())) ! z = cos(x2pi) * g2rad ! gauss_next = sin(x2pi) * g2rad return mu + z*sigma diff -cr ../Python-1.5.orig/Lib/re.py ./Lib/re.py *** ../Python-1.5.orig/Lib/re.py Mon Dec 8 18:12:00 1997 --- Lib/re.py Thu Mar 12 19:48:21 1998 *************** *** 203,208 **** --- 203,209 ---- if type(g)==type( "" ): g = [g] results[len(results):] = list(g) pos = lastmatch = j + n = n + 1 results.append(source[lastmatch:]) return results diff -cr ../Python-1.5.orig/Lib/re.py ./Lib/re.py *** ../Python-1.5.orig/Lib/re.py Mon Dec 8 18:12:00 1997 --- Lib/re.py Thu Mar 12 19:48:21 1998 *************** *** 259,269 **** def groups(self): "Return a tuple containing all subgroups of the match object" ! ! # If _num_regs==1, we don't want to call self.group with an ! # empty tuple. ! if self.re._num_regs == 1: return () ! return apply(self.group, tuple(range(1, self.re._num_regs) ) ) def group(self, *groups): "Return one or more groups of the match." --- 260,272 ---- def groups(self): "Return a tuple containing all subgroups of the match object" ! result = [] ! for g in range(1, self.re._num_regs): ! if (self.regs[g][0] == -1) or (self.regs[g][1] == -1): ! result.append(None) ! else: ! result.append(self.string[self.regs[g][0]:self.regs[g][1]]) ! return tuple(result) def group(self, *groups): "Return one or more groups of the match." diff -cr ../Python-1.5.orig/Lib/rfc822.py ./Lib/rfc822.py *** ../Python-1.5.orig/Lib/rfc822.py Thu Dec 11 22:41:13 1997 --- Lib/rfc822.py Thu Mar 12 19:46:57 1998 *************** *** 696,702 **** """ t = time.mktime(data[:8] + (0,)) ! return t + data[9] - time.timezone # When used as script, run a small test program. --- 696,702 ---- """ t = time.mktime(data[:8] + (0,)) ! return t - data[9] - time.timezone # When used as script, run a small test program. Index: shelve.py =================================================================== RCS file: /projects/cvsroot/python/dist/src/Lib/shelve.py,v retrieving revision 1.9 diff -c -r1.9 shelve.py *** old/Lib/shelve.py 1997/12/09 14:18:33 1.9 --- Lib/shelve.py 1998/03/24 19:33:19 *************** *** 75,82 **** def close(self): try: ! if self.dict: ! self.dict.close() except: pass self.dict = 0 --- 75,81 ---- def close(self): try: ! self.dict.close() except: pass self.dict = 0 Index: stropmodule.c =================================================================== RCS file: /projects/cvsroot/python/dist/src/Modules/stropmodule.c,v retrieving revision 2.44 retrieving revision 2.46 diff -c -r2.44 -r2.46 *** old/Modules/stropmodule.c 1997/12/30 05:44:10 2.44 --- Modules/stropmodule.c 1998/03/24 04:19:22 2.46 *************** *** 225,233 **** if (seqlen == 1) { /* Optimization if there's only one item */ PyObject *item = PySequence_GetItem(seq, 0); ! if (item && !PyString_Check(item)) PyErr_SetString(PyExc_TypeError, "first argument must be sequence of strings"); return item; } --- 225,235 ---- if (seqlen == 1) { /* Optimization if there's only one item */ PyObject *item = PySequence_GetItem(seq, 0); ! if (item && !PyString_Check(item)) { PyErr_SetString(PyExc_TypeError, "first argument must be sequence of strings"); + return NULL; + } return item; } *************** *** 347,353 **** if (i < 0) i = 0; ! if (n == 0) return PyInt_FromLong((long)i); last -= n; --- 349,355 ---- if (i < 0) i = 0; ! if (n == 0 && i <= last) return PyInt_FromLong((long)i); last -= n; *************** *** 392,398 **** if (i < 0) i = 0; ! if (n == 0) return PyInt_FromLong((long)last); for (j = last-n; j >= i; --j) --- 394,400 ---- if (i < 0) i = 0; ! if (n == 0 && i <= last) return PyInt_FromLong((long)last); for (j = last-n; j >= i; --j) diff -cr ../Python-1.5.orig/Parser/tokenizer.c ./Parser/tokenizer.c *** ../Python-1.5.orig/Parser/tokenizer.c Tue Apr 29 23:03:03 1997 --- Parser/tokenizer.c Thu Mar 12 19:48:33 1998 *************** *** 664,670 **** letter_quote: /* String */ if (c == '\'' || c == '"') { ! char *quote2 = tok->cur+1; int quote = c; int triple = 0; int tripcount = 0; --- 664,670 ---- letter_quote: /* String */ if (c == '\'' || c == '"') { ! int quote2 = tok->cur - tok->start + 1; int quote = c; int triple = 0; int tripcount = 0; *************** *** 685,691 **** } else if (c == quote) { tripcount++; ! if (tok->cur == quote2) { c = tok_nextc(tok); if (c == quote) { triple = 1; --- 685,691 ---- } else if (c == quote) { tripcount++; ! if (tok->cur - tok->start == quote2) { c = tok_nextc(tok); if (c == quote) { triple = 1; diff -cr ../Python-1.5.orig/Parser/tokenizer.c ./Parser/tokenizer.c *** ../Python-1.5.orig/Parser/tokenizer.c Tue Apr 29 23:03:03 1997 --- Parser/tokenizer.c Thu Mar 12 19:48:33 1998 *************** *** 477,484 **** /* Dedent -- any number, must be consistent */ while (tok->indent > 0 && col < tok->indstack[tok->indent]) { - tok->indent--; tok->pendin--; } if (col != tok->indstack[tok->indent]) { fprintf(stderr, --- 477,484 ---- /* Dedent -- any number, must be consistent */ while (tok->indent > 0 && col < tok->indstack[tok->indent]) { tok->pendin--; + tok->indent--; } if (col != tok->indstack[tok->indent]) { fprintf(stderr, diff -cr ../Python-1.5.orig/Lib/urllib.py ./Lib/urllib.py *** ../Python-1.5.orig/Lib/urllib.py Sun Dec 28 05:21:20 1997 --- Lib/urllib.py Thu Mar 12 19:48:44 1998 *************** *** 521,526 **** --- 521,528 ---- except ftplib.error_perm, reason: raise IOError, ('ftp error', reason), \ sys.exc_info()[2] + # Restore the transfer mode! + self.ftp.voidcmd(cmd) # Try to retrieve as a file try: cmd = 'RETR ' + file *************** *** 530,535 **** --- 532,539 ---- raise IOError, ('ftp error', reason), \ sys.exc_info()[2] if not conn: + # Set transfer mode to ASCII! + self.ftp.voidcmd('TYPE A') # Try a directory listing if file: cmd = 'LIST ' + file else: cmd = 'LIST' diff -cr ../Python-1.5.orig/Lib/urllib.py ./Lib/urllib.py *** ../Python-1.5.orig/Lib/urllib.py Sun Dec 28 05:21:20 1997 --- Lib/urllib.py Thu Mar 12 19:48:44 1998 *************** *** 393,399 **** match = re.match( '[ \t]*([^ \t]+)[ \t]+realm="([^"]*)"', stuff) if match: ! scheme, realm = match.group() if string.lower(scheme) == 'basic': return self.retry_http_basic_auth( url, realm) --- 393,399 ---- match = re.match( '[ \t]*([^ \t]+)[ \t]+realm="([^"]*)"', stuff) if match: ! scheme, realm = match.groups() if string.lower(scheme) == 'basic': return self.retry_http_basic_auth( url, realm) diff -cr ../Python-1.5.orig/Tools/versioncheck/checkversions.py ./Tools/versioncheck/checkversions.py *** ../Python-1.5.orig/Tools/versioncheck/checkversions.py Tue Dec 23 19:43:53 1997 --- Tools/versioncheck/checkversions.py Thu Mar 12 19:47:48 1998 *************** *** 5,10 **** --- 5,11 ---- import os import getopt import sys + import string import pyversioncheck CHECKNAME="_checkversion.py" diff -cr ../Python-1.5.orig/Tools/versioncheck/pyversioncheck.py ./Tools/versioncheck/pyversioncheck.py *** ../Python-1.5.orig/Tools/versioncheck/pyversioncheck.py Tue Dec 23 19:43:55 1997 --- Tools/versioncheck/pyversioncheck.py Thu Mar 12 19:48:06 1998 *************** *** 1,5 **** """pyversioncheck - Module to help with checking versions""" ! import Types import rfc822 import urllib import sys --- 1,5 ---- """pyversioncheck - Module to help with checking versions""" ! import types import rfc822 import urllib import sys *************** *** 36,42 **** def checkonly(package, url, version, verbose=0): if verbose >= VERBOSE_EACHFILE: print '%s:'%package ! if type(url) == Types.StringType: ok, newversion, fp = _check1version(package, url, version, verbose) else: for u in url: --- 36,42 ---- def checkonly(package, url, version, verbose=0): if verbose >= VERBOSE_EACHFILE: print '%s:'%package ! if type(url) == types.StringType: ok, newversion, fp = _check1version(package, url, version, verbose) else: for u in url: