Please backport python-socketio-client 0.5.3-1 (universe) from utopic

Bug #1458651 reported by Tim Landscheidt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Precise Backports
Won't Fix
Undecided
Unassigned
trusty-backports
Fix Released
Undecided
Unassigned

Bug Description

Please backport python-socketio-client 0.5.3-1 (universe) from utopic to precise, trusty.

Reason for the backport:
========================
We are using this module locally in our Precise and Trusty cluster and would like to see this backported properly (cf. https://phabricator.wikimedia.org/T91874).

Testing:
========
Mark off items in the checklist [X] as you test them, but please leave the checklist so that backporters can quickly evaluate the state of testing.

You can test-build the backport in your PPA with backportpackage:
$ backportpackage -u ppa:<lp username>/<ppa name> -s utopic -d precise python-socketio-client
$ backportpackage -u ppa:<lp username>/<ppa name> -s utopic -d trusty python-socketio-client

* precise:
[ ] Package builds without modification
[X] python-socketio-client installs cleanly and runs
* trusty:
[X] Package builds without modification
[X] python-socketio-client installs cleanly and runs

No reverse dependencies

Tim Landscheidt (scfc)
description: updated
Revision history for this message
Tim Landscheidt (scfc) wrote :

Tested with script from https://wikitech.wikimedia.org/wiki/RCStream#Python:

import socketIO_client

class WikiNamespace(socketIO_client.BaseNamespace):
    def on_change(self, change):
        print('%(user)s edited %(title)s' % change)

    def on_connect(self):
        self.emit('subscribe', 'commons.wikimedia.org')

socketIO = socketIO_client.SocketIO('stream.wikimedia.org', 80)
socketIO.define(WikiNamespace, '/rc')

socketIO.wait()

This works on Trusty, but on Precise it fails with:

scfc@toolsbeta-test-precise:~$ bin/socketio_client-test.py
Traceback (most recent call last):
  File "bin/socketio_client-test.py", line 13, in <module>
    socketIO = socketIO_client.SocketIO('stream.wikimedia.org', 80)
  File "/usr/lib/python2.7/dist-packages/socketIO_client/__init__.py", line 136, in __init__
    self.define(Namespace)
  File "/usr/lib/python2.7/dist-packages/socketIO_client/__init__.py", line 150, in define
    namespace = Namespace(self._transport, path)
  File "/usr/lib/python2.7/dist-packages/socketIO_client/__init__.py", line 237, in _transport
    self.__transport = self._get_transport()
  File "/usr/lib/python2.7/dist-packages/socketIO_client/__init__.py", line 251, in _get_transport
    self.is_secure, self.base_url, **self.kw)
  File "/usr/lib/python2.7/dist-packages/socketIO_client/__init__.py", line 402, in _get_socketIO_session
    response_parts = response.text.split(':')
AttributeError: 'Response' object has no attribute 'text'
Exception AttributeError: "'SocketIO' object has no attribute '_SocketIO__transport'" in <bound method SocketIO.__del__ of <socketIO_client.SocketIO object at 0x7f234dddd4d0>> ignored
scfc@toolsbeta-test-precise:~$

This is probably due to python-requests being 0.8.2 in Precise and 2.2.1 in Trusty.

description: updated
Revision history for this message
Micah Gersten (micahg) wrote :

Thank you for testing this backport, I'll upload this now.

Changed in trusty-backports:
assignee: nobody → Micah Gersten (micahg)
status: New → In Progress
Revision history for this message
Micah Gersten (micahg) wrote :

This has been uploaded. It'll need to clear binary NEW before it's published in the archive.

Changed in trusty-backports:
assignee: Micah Gersten (micahg) → nobody
status: In Progress → Fix Released
Revision history for this message
Micah Gersten (micahg) wrote :

This is now published in trusty.

Revision history for this message
Tim Landscheidt (scfc) wrote :

With regard to Precise, I have a working patch, but before submitting it, I want to wait for more input about other typical test cases (cf. https://github.com/invisibleroads/socketIO-client/issues/79).

Revision history for this message
Tim Landscheidt (scfc) wrote :

I tested the package built for Precise by the attached patch against Utopic successfully with the test script. The discussion at https://github.com/invisibleroads/socketIO-client/issues/79 confirmed that it is a proper solution to be compatible with python-requests 0.8.2 as shipped with Precise while remaining compatible with later releases of python-requests.

description: updated
Changed in precise-backports:
status: New → Confirmed
Revision history for this message
Tim Landscheidt (scfc) wrote :

What do I need to do on my part to resolve the backport to Precise? Is the patch in the expected format? Is this blocked on something else?

Dan Streetman (ddstreet)
Changed in precise-backports:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.