Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory:Rebuild
python-sseclient
no-six.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File no-six.patch of Package python-sseclient
Index: sseclient-0.0.27/sseclient.py =================================================================== --- sseclient-0.0.27.orig/sseclient.py +++ sseclient-0.0.27/sseclient.py @@ -9,8 +9,7 @@ import codecs import re import time import warnings - -import six +import http.client import requests @@ -94,7 +93,7 @@ class SSEClient(object): raise EOFError() self.buf += self.decoder.decode(next_chunk) - except (StopIteration, requests.RequestException, EOFError, six.moves.http_client.IncompleteRead) as e: + except (StopIteration, requests.RequestException, EOFError, http.client.IncompleteRead) as e: print(e) time.sleep(self.retry / 1000.0) self._connect() @@ -122,16 +121,13 @@ class SSEClient(object): return msg - if six.PY2: - next = __next__ - class Event(object): sse_line_pattern = re.compile('(?P<name>[^:]*):?( ?(?P<value>.*))?') def __init__(self, data='', event='message', id=None, retry=None): - assert isinstance(data, six.string_types), "Data must be text" + assert isinstance(data, str), "Data must be text" self.data = data self.event = event self.id = id Index: sseclient-0.0.27/test_sseclient.py =================================================================== --- sseclient-0.0.27.orig/test_sseclient.py +++ sseclient-0.0.27/test_sseclient.py @@ -15,7 +15,6 @@ except ImportError: import pytest import requests -import six from requests.cookies import RequestsCookieJar import sseclient @@ -77,7 +76,7 @@ class FakeResponse(object): self.status_code = status_code self.encoding = encoding self.apparent_encoding = "utf-8" - if not isinstance(content, six.text_type): + if not isinstance(content, str): content = content.decode("utf-8") self.stream = content self.headers = headers or None Index: sseclient-0.0.27/setup.py =================================================================== --- sseclient-0.0.27.orig/setup.py +++ sseclient-0.0.27/setup.py @@ -17,7 +17,7 @@ setup( author='Brent Tubbs', author_email='brent.tubbs@gmail.com', py_modules=['sseclient'], - install_requires=['requests>=2.9', 'six'], + install_requires=['requests>=2.9'], tests_require=['pytest', 'backports.unittest_mock'], setup_requires=[] + pytest_runner, description=( Index: sseclient-0.0.27/sseclient.egg-info/requires.txt =================================================================== --- sseclient-0.0.27.orig/sseclient.egg-info/requires.txt +++ sseclient-0.0.27/sseclient.egg-info/requires.txt @@ -1,2 +1 @@ requests>=2.9 -six
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor