summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authortron <tron>1998-05-06 21:39:52 +0000
committertron <tron>1998-05-06 21:39:52 +0000
commit49f3f5c73c746f0f5391e01079b34246225b324e (patch)
tree5e5c5699163099334ca1781a9ad1ab0ad149f7d3 /lang
parent84983eacd7a869a455bb13bb26194a006a610612 (diff)
downloadpkgsrc-49f3f5c73c746f0f5391e01079b34246225b324e.tar.gz
Add or update patches for Python 1.5.1 as suggested by Jaromir Dolecek
in PR pkg/5407 and PR pkg/5412.
Diffstat (limited to 'lang')
-rw-r--r--lang/python/patches/patch-aj33
-rw-r--r--lang/python/patches/patch-ak71
-rw-r--r--lang/python/patches/patch-an19
-rw-r--r--lang/python/patches/patch-ao12
4 files changed, 67 insertions, 68 deletions
diff --git a/lang/python/patches/patch-aj b/lang/python/patches/patch-aj
index dc7acbd886f..06c2b493ff0 100644
--- a/lang/python/patches/patch-aj
+++ b/lang/python/patches/patch-aj
@@ -1,18 +1,15 @@
-Index: Objects/fileobject.c
-===================================================================
-RCS file: /projects/cvsroot/python/dist/src/Objects/fileobject.c,v
-retrieving revision 2.58
-diff -c -r2.58 fileobject.c
-*** fileobject.c 1998/04/10 22:16:34 2.58
---- fileobject.c 1998/04/27 18:52:40
-***************
-*** 416,421 ****
---- 416,423 ----
- if (fstat(fileno(f->f_fp), &st) == 0) {
- end = st.st_size;
- pos = ftell(f->f_fp);
-+ if (pos < 0)
-+ clearerr(f->f_fp);
- if (end > pos && pos >= 0)
- return end - pos + 1;
- /* Add 1 so if the file were to grow we'd notice. */
+--- Objects/fileobject.c.orig Sat Apr 11 00:16:34 1998
++++ Objects/fileobject.c Wed May 6 23:09:41 1998
+@@ -415,7 +415,11 @@
+ struct stat st;
+ if (fstat(fileno(f->f_fp), &st) == 0) {
+ end = st.st_size;
+- pos = ftell(f->f_fp);
++ pos = lseek(fileno(f->f_fp), 0L, SEEK_CUR);
++ if (pos >= 0)
++ pos = ftell(f->f_fp);
++ if (pos < 0)
++ clearerr(f->f_fp);
+ if (end > pos && pos >= 0)
+ return end - pos + 1;
+ /* Add 1 so if the file were to grow we'd notice. */
diff --git a/lang/python/patches/patch-ak b/lang/python/patches/patch-ak
index 076996ca62a..0aff359273f 100644
--- a/lang/python/patches/patch-ak
+++ b/lang/python/patches/patch-ak
@@ -1,50 +1,21 @@
-Index: Lib/urllib.py
-===================================================================
-RCS file: /projects/cvsroot/python/dist/src/Lib/urllib.py,v
-retrieving revision 1.64
-retrieving revision 1.65
-diff -c -r1.64 -r1.65
-*** urllib.py 1998/04/11 01:18:35 1.64
---- urllib.py 1998/04/27 15:19:17 1.65
-***************
-*** 214,222 ****
- # Use HTTP protocol
- def open_http(self, url, data=None):
- import httplib
- if type(url) is type(""):
- host, selector = splithost(url)
-! user_passwd, host = splituser(host)
- realhost = host
- else:
- host, selector = url
---- 214,224 ----
- # Use HTTP protocol
- def open_http(self, url, data=None):
- import httplib
-+ user_passwd = None
- if type(url) is type(""):
- host, selector = splithost(url)
-! if host:
-! user_passwd, host = splituser(host)
- realhost = host
- else:
- host, selector = url
-***************
-*** 226,232 ****
- realhost = None
- else:
- realhost, rest = splithost(rest)
-! user_passwd, realhost = splituser(realhost)
- if user_passwd:
- selector = "%s://%s%s" % (urltype,
- realhost,
---- 228,236 ----
- realhost = None
- else:
- realhost, rest = splithost(rest)
-! if realhost:
-! user_passwd, realhost = \
-! splituser(realhost)
- if user_passwd:
- selector = "%s://%s%s" % (urltype,
- realhost,
+--- Lib/urllib.py.orig Sat Apr 11 03:18:35 1998
++++ Lib/urllib.py Wed May 6 23:26:57 1998
+@@ -221,6 +221,7 @@
+ else:
+ host, selector = url
+ urltype, rest = splittype(selector)
++ url = rest
+ user_passwd = None
+ if string.lower(urltype) != 'http':
+ realhost = None
+@@ -455,8 +456,8 @@
+ user, passwd = self.get_user_passwd(host, realm, i)
+ if not (user or passwd): return None
+ host = user + ':' + passwd + '@' + host
+- newurl = '//' + host + selector
+- return self.open_http(newurl)
++ newurl = 'http://' + host + selector
++ return self.open(newurl)
+
+ def get_user_passwd(self, host, realm, clear_cache = 0):
+ key = realm + '@' + string.lower(host)
diff --git a/lang/python/patches/patch-an b/lang/python/patches/patch-an
new file mode 100644
index 00000000000..9ef1134d0a0
--- /dev/null
+++ b/lang/python/patches/patch-an
@@ -0,0 +1,19 @@
+--- Lib/sgmllib.py.orig Thu Mar 26 22:12:54 1998
++++ Lib/sgmllib.py Wed May 6 23:10:29 1998
+@@ -30,12 +30,12 @@
+ endbracket = re.compile('[<>]')
+ special = re.compile('<![^<>]*>')
+ commentopen = re.compile('<!--')
+-commentclose = re.compile('--[ \t\n]*>')
++commentclose = re.compile('--[%s]*>' % string.whitespace)
+ tagfind = re.compile('[a-zA-Z][a-zA-Z0-9]*')
+ attrfind = re.compile(
+- '[ \t\n]+([a-zA-Z_][-.a-zA-Z_0-9]*)'
+- '([ \t\n]*=[ \t\n]*'
+- r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./:+*%?!\(\)_#=~]*))?')
++ '[ \t\n\r]+([a-zA-Z_][-.a-zA-Z_0-9]*)'
++ + ('([%s]*=[%s]*' % (string.whitespace, string.whitespace))
++ + r'(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./:+*%?!\(\)_#=~]*))?')
+
+
+ # SGML parser base class -- find tags and call handler functions.
diff --git a/lang/python/patches/patch-ao b/lang/python/patches/patch-ao
new file mode 100644
index 00000000000..a21d40e05e6
--- /dev/null
+++ b/lang/python/patches/patch-ao
@@ -0,0 +1,12 @@
+--- Lib/imaplib.py.orig Sat Apr 11 05:11:51 1998
++++ Lib/imaplib.py Wed May 6 23:27:32 1998
+@@ -275,9 +275,6 @@
+
+ (typ, [data]) = <instance>.list(user, password)
+ """
+- if not 'AUTH=LOGIN' in self.capabilities \
+- and not 'AUTH-LOGIN' in self.capabilities:
+- raise self.error("server doesn't allow LOGIN authorisation")
+ typ, dat = self._simple_command('LOGIN', user, password)
+ if typ != 'OK':
+ raise self.error(dat)