[Python-checkins] r78752 - in python/branches/py3k/Lib: test/test_urllib2.py urllib/request.py

senthil.kumaran python-checkins at python.org
Sun Mar 7 05:12:02 CET 2010


Author: senthil.kumaran
Date: Sun Mar 7 05:12:02 2010
New Revision: 78752
Log:
Reverting the changes made in r78433.
Modified:
 python/branches/py3k/Lib/test/test_urllib2.py
 python/branches/py3k/Lib/urllib/request.py
Modified: python/branches/py3k/Lib/test/test_urllib2.py
==============================================================================
--- python/branches/py3k/Lib/test/test_urllib2.py	(original)
+++ python/branches/py3k/Lib/test/test_urllib2.py	Sun Mar 7 05:12:02 2010
@@ -1220,7 +1220,6 @@
 self.get.add_data("spam")
 self.assertTrue(self.get.has_data())
 self.assertEqual("POST", self.get.get_method())
- self.assertRaises(TypeError,self.get.add_data, "more spam")
 
 def test_get_full_url(self):
 self.assertEqual("http://www.python.org/~jeremy/",
Modified: python/branches/py3k/Lib/urllib/request.py
==============================================================================
--- python/branches/py3k/Lib/urllib/request.py	(original)
+++ python/branches/py3k/Lib/urllib/request.py	Sun Mar 7 05:12:02 2010
@@ -192,9 +192,6 @@
 # Begin deprecated methods
 
 def add_data(self, data):
- if self.has_data():
- raise TypeError("Request Obj already contains data: %s" %
- self.data)
 self.data = data
 
 def has_data(self):


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /