1. Benoit Chesneau
  2. py-restclient


ben...@pollen.nymphormation.net  committed ad99efd

more fixes

  • Participants
  • Parent commits 0adc2b8
  • Branches default

Comments (0)

Files changed (2)

File docs/whatsnew.txt

View file
 Transports changes
-* :mod:`restclient.http` have renamed to :mod:`restclient.transport`. In
-the same time all "clients" are now called "transports".
+* :mod:`restclient.http` have been renamed to :mod:`restclient.transport`. In the same time all "clients" are now called "transports".
 * urllib2 transport have been removed, Now httplib2 is used when pycurl
   isn't installed. This change was needed to simplify the code. And

File restclient/rest.py

View file
         self.client = RestClient(transport)
         self.uri = uri
-        self.transport = transport
+        self.transport = self.client.transport
     def __repr__(self):
         return '<%s %s>' % (self.__class__.__name__, self.uri)
             resr2 = res.clone()
-        obj = self.__class__(self.uri, http=self.transport)
+        obj = self.__class__(self.uri, transport=self.transport)
         return obj
     def __call__(self, path):
-        return type(self)(make_uri(self.uri, path), http=self.transport)
+        return type(self)(self.client.make_uri(self.uri, path),
+                transport=self.transport)
     def get(self, path=None, headers=None, **params):
         to set a new uri absolute path
-        self.uri = make_uri(self.uri, path)
+        self.uri = self.client.transport.make_uri(self.uri, path)
 class RestClient(object):