forked from pool/python-user_agent
- do not require six
- added patches
7a664a50cb
+ python-user_agent-no-six.patch
OBS-URL: https://build.opensuse.org/request/show/1091254
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-user_agent?expand=0&rev=16
70 lines
2.3 KiB
Diff
70 lines
2.3 KiB
Diff
Index: user_agent-0.1.10/setup.py
|
|
===================================================================
|
|
--- user_agent-0.1.10.orig/setup.py
|
|
+++ user_agent-0.1.10/setup.py
|
|
@@ -24,7 +24,6 @@ setup(
|
|
# Package files
|
|
packages=['user_agent'],
|
|
include_package_data=True,
|
|
- install_requires=['six'],
|
|
entry_points={
|
|
'console_scripts': [
|
|
'ua = user_agent.cli:script_ua',
|
|
@@ -33,7 +32,6 @@ setup(
|
|
# Topics
|
|
classifiers=[
|
|
'Programming Language :: Python',
|
|
- 'Programming Language :: Python :: 2.7',
|
|
'Programming Language :: Python :: 3.3',
|
|
'Programming Language :: Python :: 3.4',
|
|
'Programming Language :: Python :: 3.5',
|
|
Index: user_agent-0.1.10/test/user_agent.py
|
|
===================================================================
|
|
--- user_agent-0.1.10.orig/test/user_agent.py
|
|
+++ user_agent-0.1.10/test/user_agent.py
|
|
@@ -7,7 +7,6 @@ import json
|
|
from datetime import datetime
|
|
from copy import deepcopy
|
|
|
|
-import six
|
|
import pytest
|
|
|
|
import user_agent.base
|
|
@@ -134,7 +133,7 @@ def test_data_integrity():
|
|
for _ in range(50):
|
|
nav = generate_navigator()
|
|
for _, val in nav.items():
|
|
- assert val is None or isinstance(val, six.string_types)
|
|
+ assert val is None or isinstance(val, str)
|
|
|
|
|
|
def test_ua_script_simple():
|
|
Index: user_agent-0.1.10/user_agent.egg-info/requires.txt
|
|
===================================================================
|
|
--- user_agent-0.1.10.orig/user_agent.egg-info/requires.txt
|
|
+++ user_agent-0.1.10/user_agent.egg-info/requires.txt
|
|
@@ -1 +0,0 @@
|
|
-six
|
|
Index: user_agent-0.1.10/user_agent/base.py
|
|
===================================================================
|
|
--- user_agent-0.1.10.orig/user_agent/base.py
|
|
+++ user_agent-0.1.10/user_agent/base.py
|
|
@@ -38,8 +38,6 @@ from random import SystemRandom
|
|
from datetime import datetime, timedelta
|
|
from itertools import product
|
|
|
|
-import six
|
|
-
|
|
from .warning import warn
|
|
# pylint: disable=unused-import
|
|
from .device import SMARTPHONE_DEV_IDS, TABLET_DEV_IDS
|
|
@@ -408,7 +406,7 @@ def get_option_choices(opt_name, opt_val
|
|
"""
|
|
|
|
choices = []
|
|
- if isinstance(opt_value, six.string_types):
|
|
+ if isinstance(opt_value, str):
|
|
choices = [opt_value]
|
|
elif isinstance(opt_value, (list, tuple)):
|
|
choices = list(opt_value)
|