[Python-checkins] commit of r41549 - in python/branches/release24-maint: Lib Misc

reinhold.birkenfeld@python.org reinhold.birkenfeld at python.org
Sat Nov 26 17:51:09 CET 2005


Author: reinhold.birkenfeld
Date: Sat Nov 26 17:51:02 2005
New Revision: 41549

Modified:
   python/branches/release24-maint/Lib/urllib.py
   python/branches/release24-maint/Misc/NEWS
Log:
backport: bug #1365984, urllib and data: URLs^^




Modified: python/branches/release24-maint/Lib/urllib.py
==============================================================================
--- python/branches/release24-maint/Lib/urllib.py	(original)
+++ python/branches/release24-maint/Lib/urllib.py	Sat Nov 26 17:51:02 2005
@@ -556,7 +556,7 @@
         msg = '\n'.join(msg)
         f = StringIO(msg)
         headers = mimetools.Message(f, 0)
-        f.fileno = None     # needed for addinfourl
+        #f.fileno = None     # needed for addinfourl
         return addinfourl(f, headers, url)
 
 
@@ -813,7 +813,10 @@
         self.read = self.fp.read
         self.readline = self.fp.readline
         if hasattr(self.fp, "readlines"): self.readlines = self.fp.readlines
-        if hasattr(self.fp, "fileno"): self.fileno = self.fp.fileno
+        if hasattr(self.fp, "fileno"):
+            self.fileno = self.fp.fileno
+        else:
+            self.fileno = lambda: None
         if hasattr(self.fp, "__iter__"):
             self.__iter__ = self.fp.__iter__
             if hasattr(self.fp, "next"):

Modified: python/branches/release24-maint/Misc/NEWS
==============================================================================
--- python/branches/release24-maint/Misc/NEWS	(original)
+++ python/branches/release24-maint/Misc/NEWS	Sat Nov 26 17:51:02 2005
@@ -47,6 +47,8 @@
 Library
 -------
 
+- Bug #1365984: urllib now opens "data:" URLs again.
+
 - Patch #1314396: Prevent threading.Thread.join() from blocking if a previous
   call caused an exception to be raised (e.g., calling join() with an illegal
   argument).


More information about the Python-checkins mailing list