Page MenuHomePhabricator

Pull python-socketio-client and python-websocket from backports
Closed, ResolvedPublic

Description

python-socketio-client had originally been installed in 4b9e12408cd3d6dab2f023d9553051618229fcbe for T86015. It was packaged locally as a tandem with python-websocket-client. I requested backports of both for Trusty as part of T91874 and they have been available for some time, but with python-websocket being 0.12.0 and not 0.23.0.

On Trusty, this works fine with the packages from backports:

scfc@toolsbeta-mail-04:~/core_stable$ python pwb.py listpages -liverecentchanges
No handlers could be found for logger "socketIO_client"
   1 Baseball/Neue Artikel
   2 Roses (Lied)
   3 Japetus Steenstrup
   4 Manorainjan
^CTraceback (most recent call last):
  File "pwb.py", line 270, in <module>
    if not main():
  File "pwb.py", line 264, in main
    run_python_file(filename, [filename] + args, argvu, file_package)
  File "pwb.py", line 109, in run_python_file
    main_mod.__dict__)
  File "./scripts/listpages.py", line 240, in <module>
    main()
  File "./scripts/listpages.py", line 220, in main
    for i, page in enumerate(gen, start=1):
  File "/mnt/nfs/labstore-secondary-home/scfc/core_stable/pywikibot/pagegenerators.py", line 2052, in LiveRCPageGenerator
    for entry in site_rc_listener(site, total=total):
  File "/mnt/nfs/labstore-secondary-home/scfc/core_stable/pywikibot/comms/rcstream.py", line 189, in rc_listener
    element = rc_thread.queue.get(timeout=0.1)
  File "/usr/lib/python2.7/Queue.py", line 177, in get
    self.not_empty.wait(remaining)
  File "/usr/lib/python2.7/threading.py", line 358, in wait
    _sleep(delay)
KeyboardInterrupt
<type 'exceptions.KeyboardInterrupt'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort
scfc@toolsbeta-mail-04:~/core_stable$

But in b96e7f57905751c08a0b5c5197d47dff3bcfe182, @Anoopchandu18 added a requirement on websocket-client>=0.33 because a bug was introduced in version 0.27.0 and fixed in 0.33.0 (T114913), i. e. Pywikibot does not depend on an API only available in 0.33.0. (IMHO this is flawed: If someone fixes version 0.27.0 locally with 0.27.0~something, there is no need to update to 0.33.0).

My assumption is that the Trusty packages python-socketio-client (and its implicit dependency python-websocket) can be safely installed from backports because it will work for people not executing setup.py and those who do execute setup.py will probably work in a virtual environment anyway.

So my plan is:

  1. Remove python-socketio-client and python-websocket-client from our local Trusty repository.
  2. Reinstall those packages from Trusty backports (requires purge and install because the package name in backports is python-websocket).

Comments?

Event Timeline

Pywikibot no longer needs python-socketio-client, as the new eventstream protocol doesn't use socketio anymore, so we could also just remove the packages.

If you want to go for

Remove python-socketio-client and python-websocket-client from our local Trusty repository.
Reinstall those packages from Trusty backports (requires purge and install because the package name in backports is python-websocket).

then (if this is not too much effort) I would suggest to make a virtual python-websocket-client package in our local repo that installes backports\python-websocket.

bd808 claimed this task.
bd808 subscribed.

Fixed by time and grid upgrades:

$ apt-cache show python-socketio-client
Package: python-socketio-client
Version: 0.6.5-0.1
Installed-Size: 100
Maintainer: Leo Iannacone <l3on@ubuntu.com>
Architecture: all
Depends: python (>= 2.7), python (<< 2.8), python-requests, python-six, python-websocket
Description-en: socket.io-client library for Python
 This package contains a socket.io client library
 for Python.
 .
 You can use it to write test code against your
 socket.io server.
Description-md5: c2dbc33ca1748e4cdc053eb9a0a6d22e
Homepage: https://github.com/invisibleroads/socketIO-client
Section: python
Priority: optional
Filename: pool/main/p/python-socketio-client/python-socketio-client_0.6.5-0.1_all.deb
Size: 21530
MD5sum: 552a18cccd8df1b014766c76e1f5955a
SHA256: 07400f65d0b8769805d616ab290245c76c1599c29269c15e76e987961e6c63dc

$ apt-cache show python-websocket
Package: python-websocket
Source: websocket-client
Version: 0.37.0-2
Installed-Size: 158
Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
Architecture: all
Depends: python-six, python:any (<< 2.8), python:any (>= 2.7.5-5~)
Description-en: WebSocket client library - Python 2.7
 websocket-client provides a low-level, synchronous API providing WebSocket
 client functionality to Python programs. It conforms to the WebSocket
 specification as standardized by the IETF in RFC 6455.
 .
 WebSocket is a protocol providing full-duplex communication channels over
 TCP, mostly used in Web browsers.
 .
 This package provides the Python 2.7 version.
Description-md5: 96b2cfdbaf92343d8b61a90f985ae527
Homepage: https://github.com/liris/websocket-client
Section: python
Priority: optional
Filename: pool/main/w/websocket-client/python-websocket_0.37.0-2_all.deb
Size: 31502
MD5sum: d386707086932468cebfad856f939074
SHA256: c49efece74a6e013885b03fa8a2a813d126c755a5820f29a2bec52e0460e0beb