johan...@sun.com wrote:
On Thu, Jun 25, 2009 at 06:52:13PM -0700, johan...@sun.com wrote:
On Tue, Jun 23, 2009 at 01:34:41PM -0700, johan...@sun.com wrote:
Folks,
For a while, our transport system has not really been adequate to
address all of the goals for the pkg project. The python libraries that
we have been using are capabable for basic functionality, but fall flat
when we try to perform more complicated or performant network
operations.
The following webrev converts our transport from using the
urllib/httplib in python to PyCurl, which is based upon libcurl.
http://cr.opensolaris.org/~johansen/webrev-xport-1/
Comments welcome.
Thanks to all of you who have provided comments so far. I've
incorporated the feedback I've received. The webrev below contains the
changes requested in review, as well as a small feature that Shawn
requested.
http://cr.opensolaris.org/~johansen/webrev-xport-2/
I haven't had any further comments on this webrev. I just updated it to
include fixes to get distro-import to properly import SUNWpython-pycurl,
and to make sure the dependency is reflected in SUNWipkg. If no one has
anything else to add, I'll consider putting this back tomorrow.
src/gui/modules/installupdate.py:
line 38: unused import now due to removal of URLError from about line 432
src/modules/catalog.py:
lines 689-690: content_size doesn't exist anymore
lines 693, 711: size isn't used since content_size is gone
src/modules/client/api.py:
lines 29, 31: these imports are unused now because of transport changes
src/modules/client/api_errors.py:
lines 28, 30, 31: these imports are unused now because of transport
changes
line 320: shouldn't this be returned instead of 's =' ?
line 327: missing SearchException.__init__(self)
line 403: missing IndexingException.__init__(self)
src/modules/client/image.py:
line 56: unused import due to transport changes
src/modules/client/imageconfig.py:
line 129: unused now due to transport changes
src/modules/updatelog.py:
lines 322, 326: unused now due to transport changes
src/modules/client/transport/engine.py:
line 255: tx here clashes with your import named the same thing,
maybe safer to use a different name?
line 424: str is a python built-in function, better to use a
different name?
line 463: space needed after ','
line 516: where is data defined? did you mean treq.data?
line 552: could be a function
line 608: ultot, ulcur don't appear to be used anywhere
src/modules/client/transport/exception.py:
line 59: __cmp__ should exist as an abstract method that raises
NotImplemented in api_errors.TransportError for consistency with line 65?
lines 296-297: where is .data defined? I don't see it in the
__init__ for InvalidContentException, TransportException, or
api_errors.TransportError. Should this be hasattr(self, "data") and
self.data?
src/modules/client/transport/fileobj.py:
line 28: unused import
line 58: could be a staticmethod
line 173: list is a python keyword
src/modules/client/transport/repo.py:
lines 29, 34: unused imports
line 305: isn't __repo_cache redundant on a RepoCache object? What
about __cache instead? :)
line 307: missing self?
src/modules/client/transport/stats.py:
line 28: unused import
src/modules/client/transport/transport.py:
lines 136, 334: dir is a python built-in function, maybe use a
different name?
line 218: you assign this, but never use it?
line 376: s/api_errors/apx/
line 481: s/RepoResponse/DepotResponse/
line 573: could be a staticmethod
line 664: where is the import for zlib?
line 666: s/Invalid/tx.Invalid/
Cheers,
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
pkg-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss