#10776 NORM 11.2.0-: laptop does not register with school server

Zarro Boogs per Child bugtracker at laptop.org
Thu Mar 24 07:22:45 EDT 2011


#10776: laptop does not register with school server
------------------------------+---------------------------------------------
           Reporter:  erikos  |       Owner:  erikos                           
               Type:  defect  |      Status:  new                              
           Priority:  normal  |   Milestone:  11.2.0-M4                        
          Component:  sugar   |     Version:  Development build as of this date
         Resolution:          |    Keywords:                                   
        Next_action:  code    |    Verified:  0                                
Deployment_affected:          |   Blockedby:                                   
           Blocking:          |  
------------------------------+---------------------------------------------
Changes (by sascha_silbe):

 * cc: sascha_silbe (added)
  * next_action:  diagnose => code


Comment:

 Python 2.7 switched from using {{{httplib.HTTP}}} to using
 {{{httplib.HTTPConnection}}}:

 {{{/usr/lib/python2.6/xmlrpclib.py}}} (Debian Squeeze):
 {{{
 class Transport:
 [...]
     ##
     # Connect to server.
     #
     # @param host Target host.
     # @return A connection handle.

     def make_connection(self, host):
         # create a HTTP connection object from a host descriptor
         import httplib
         host, extra_headers, x509 = self.get_host_info(host)
         return httplib.HTTP(host)
 }}}

 {{{/usr/lib/python2.7/xmlrpclib.py}}} (Fedora 14):
 {{{
 class Transport:
 [...]
     ##
     # Connect to server.
     #
     # @param host Target host.
     # @return A connection handle.

     def make_connection(self, host):
         #return an existing connection if possible.  This allows
         #HTTP/1.1 keep-alive.
         if self._connection and host == self._connection[0]:
             return self._connection[1]

         # create a HTTP connection object from a host descriptor
         chost, self._extra_headers, x509 = self.get_host_info(host)
         #store the host argument along with the connection object
         self._connection = host, httplib.HTTPConnection(chost)
         return self._connection[1]
 }}}

 So for 2.6 we need to return an {{{httplib.HTTP}}} instance in
 {{{_TimeoutTransport}}}, whereas for 2.7 we need to return an
 {{{httplib.HTTPConnection}}} instance. The
 [http://docs.python.org/dev/whatsnew/2.7.html Python 2.7 Release Notes]
 don't mention this clearly - only that "The XML-RPC client and server
 [...] have improved performance by supporting HTTP/1.1 keep-alive and by
 optionally using gzip encoding to compress the XML being exchanged." It
 seems upstream doesn't consider the return value of a public function to
 be public API. :-/

-- 
Ticket URL: <http://dev.laptop.org/ticket/10776#comment:2>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list