Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-user_agent for
openSUSE:Factory checked in at 2022-10-12 18:24:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-user_agent (Old)
and /work/SRC/openSUSE:Factory/.python-user_agent.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-user_agent"
Wed Oct 12 18:24:38 2022 rev:7 rq:1009895 version:0.1.10
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-user_agent/python-user_agent.changes
2021-08-28 22:29:50.146019798 +0200
+++
/work/SRC/openSUSE:Factory/.python-user_agent.new.2275/python-user_agent.changes
2022-10-12 18:26:16.221898380 +0200
@@ -1,0 +2,6 @@
+Tue Oct 11 16:46:07 UTC 2022 - Yogalakshmi Arunachalam <[email protected]>
+
+- Update to version 0.1.10
+ No upstream changelog
+
+-------------------------------------------------------------------
Old:
----
user_agent-0.1.9.tar.gz
New:
----
user_agent-0.1.10.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-user_agent.spec ++++++
--- /var/tmp/diff_new_pack.6O3TIg/_old 2022-10-12 18:26:16.661899349 +0200
+++ /var/tmp/diff_new_pack.6O3TIg/_new 2022-10-12 18:26:16.665899357 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-user_agent
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-user_agent
-Version: 0.1.9
+Version: 0.1.10
Release: 0
Summary: User-Agent generator for Python
License: MIT
++++++ user_agent-0.1.9.tar.gz -> user_agent-0.1.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/user_agent-0.1.9/CHANGELOG.md
new/user_agent-0.1.10/CHANGELOG.md
--- old/user_agent-0.1.9/CHANGELOG.md 2017-02-23 05:46:23.000000000 +0100
+++ new/user_agent-0.1.10/CHANGELOG.md 2020-11-07 02:12:15.000000000 +0100
@@ -1,6 +1,11 @@
# Change Log of user_agent Library
-## [0.1.9] - Unreleased
+## [0.1.20] - Unreleased
+### Changed
+
+## [0.1.9] - 2017-08-05
+### Changed
+* Use InvalidOption exception instead of UserAgentRuntimeError and
UserAgentInvalidRequirements
## [0.1.8] - 2017-02-23
### Changed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/user_agent-0.1.9/LICENSE
new/user_agent-0.1.10/LICENSE
--- old/user_agent-0.1.9/LICENSE 2017-02-26 16:23:10.000000000 +0100
+++ new/user_agent-0.1.10/LICENSE 2020-11-07 02:12:15.000000000 +0100
@@ -1,7 +1,6 @@
The MIT License (MIT)
-Copyright (c) 2015, jamboss
-Copyright (c) 2015-2017, Gregory Petukhov
+Copyright (c) 2015-2018, Gregory Petukhov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/user_agent-0.1.9/Makefile
new/user_agent-0.1.10/Makefile
--- old/user_agent-0.1.9/Makefile 2017-03-07 11:54:23.000000000 +0100
+++ new/user_agent-0.1.10/Makefile 2021-12-04 14:58:52.000000000 +0100
@@ -1,13 +1,10 @@
-.PHONY: clean upload build venv deps viewdoc
+.PHONY: clean release build venv deps viewdoc
clean:
find -name '*.pyc' -delete
find -name '*.swp' -delete
find -name __pycache__ -delete
-upload:
- git push --tags; python setup.py sdist upload
-
build: venv deps
venv:
@@ -18,3 +15,6 @@
viewdoc:
x-www-browser docs/build/html/index.html
+
+release:
+ git push; git push --tags; rm dist/*; python3 setup.py clean sdist;
twine upload dist/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/user_agent-0.1.9/PKG-INFO
new/user_agent-0.1.10/PKG-INFO
--- old/user_agent-0.1.9/PKG-INFO 2017-08-05 13:18:55.000000000 +0200
+++ new/user_agent-0.1.10/PKG-INFO 2021-12-04 14:59:01.000000000 +0100
@@ -1,10 +1,12 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: user_agent
-Version: 0.1.9
+Version: 0.1.10
Summary: User-Agent generator
Home-page: https://github.com/lorien/user_agent
Author: Gregory Petukhov
Author-email: [email protected]
+Maintainer: Gregory Petukhov
+Maintainer-email: [email protected]
License: MIT License
Download-URL: http://pypi.python.org/pypi/user_agent
Description: ==========
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/user_agent-0.1.9/pylintrc
new/user_agent-0.1.10/pylintrc
--- old/user_agent-0.1.9/pylintrc 2017-05-11 14:26:55.000000000 +0200
+++ new/user_agent-0.1.10/pylintrc 2021-12-04 14:56:01.000000000 +0100
@@ -5,7 +5,7 @@
[TYPECHEK]
[MESSAGES CONTROL]
-disable=R,I,fixme,missing-docstring
+disable=R,I,fixme,missing-docstring,C0209
[REPORTS]
reports=no
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/user_agent-0.1.9/setup.py
new/user_agent-0.1.10/setup.py
--- old/user_agent-0.1.9/setup.py 2017-08-05 13:17:24.000000000 +0200
+++ new/user_agent-0.1.10/setup.py 2021-12-04 14:56:56.000000000 +0100
@@ -3,19 +3,21 @@
from setuptools import setup
ROOT = os.path.dirname(os.path.realpath(__file__))
+with open(os.path.join(ROOT, 'README.rst'), encoding='utf-8') as inp:
+ LONG_DESCRIPTION = inp.read()
setup(
# Meta data
name='user_agent',
- version='0.1.9',
+ version='0.1.10',
author="Gregory Petukhov",
author_email='[email protected]',
maintainer="Gregory Petukhov",
maintainer_email='[email protected]',
url='https://github.com/lorien/user_agent',
description='User-Agent generator',
- long_description=open(os.path.join(ROOT, 'README.rst')).read(),
+ long_description=LONG_DESCRIPTION,
download_url='http://pypi.python.org/pypi/user_agent',
keywords="user agent browser navigator",
license="MIT License",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/user_agent-0.1.9/test/release.py
new/user_agent-0.1.10/test/release.py
--- old/user_agent-0.1.9/test/release.py 2017-02-23 05:46:23.000000000
+0100
+++ new/user_agent-0.1.10/test/release.py 2021-12-04 14:55:41.000000000
+0100
@@ -13,7 +13,7 @@
re_date = re.compile(r'^\d{4}-\d{2}-\d{2}$')
ver_dates = {}
ver_history = []
- for line in open('CHANGELOG.md'):
+ for line in open('CHANGELOG.md', encoding='utf-8'):
if line.startswith('## ['):
ver = line.split('[')[1].split(']')[0]
date = line.split('-', 1)[1].strip().lower()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/user_agent-0.1.9/test/user_agent.py
new/user_agent-0.1.10/test/user_agent.py
--- old/user_agent-0.1.9/test/user_agent.py 2017-05-11 14:36:26.000000000
+0200
+++ new/user_agent-0.1.10/test/user_agent.py 2020-11-07 02:29:27.000000000
+0100
@@ -10,8 +10,11 @@
import six
import pytest
-from user_agent import (generate_user_agent, generate_navigator,
- generate_navigator_js, InvalidOption)
+import user_agent.base
+from user_agent import (
+ generate_user_agent, generate_navigator,
+ generate_navigator_js, InvalidOption
+)
def test_it():
@@ -216,10 +219,8 @@
def test_build_id_firefox():
- from user_agent import base
-
- orig_ff_ver = deepcopy(base.FIREFOX_VERSION)
- base.FIREFOX_VERSION = [
+ orig_ff_ver = deepcopy(user_agent.base.FIREFOX_VERSION)
+ user_agent.base.FIREFOX_VERSION = [
('49.0', datetime(2016, 9, 20)),
('50.0', datetime(2016, 11, 15)),
]
@@ -234,7 +235,7 @@
assert datetime(2016, 9, 20, 0) <= time_
assert time_ < datetime(2016, 11, 15)
finally:
- base.FIREFOX_VERSION = orig_ff_ver
+ user_agent.base.FIREFOX_VERSION = orig_ff_ver
def test_android_firefox():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/user_agent-0.1.9/tox.ini
new/user_agent-0.1.10/tox.ini
--- old/user_agent-0.1.9/tox.ini 2017-05-11 14:36:26.000000000 +0200
+++ new/user_agent-0.1.10/tox.ini 2020-11-07 02:48:35.000000000 +0100
@@ -1,5 +1,5 @@
[tox]
-envlist = py2,py3,qa
+envlist = py3,qa
[testenv]
commands =
@@ -10,6 +10,7 @@
pylint
flake8
mock
+# pytype
[testenv:appveyor]
passenv = DISTUTILS_USE_SDK MSSdk INCLUDE LIB WINDIR
@@ -21,8 +22,9 @@
[testenv:qa]
commands =
python setup.py check -s
- flake8 setup.py useragent test
- pylint setup user_agent test
+ flake8 setup.py user_agent test
+ pylint setup.py user_agent test
+# pytype setup.py user_agent test
[testenv:doc]
whitelist_externals=make
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/user_agent-0.1.9/user_agent/__init__.py
new/user_agent-0.1.10/user_agent/__init__.py
--- old/user_agent-0.1.9/user_agent/__init__.py 2017-08-05 13:17:24.000000000
+0200
+++ new/user_agent-0.1.10/user_agent/__init__.py 2021-12-04
14:56:56.000000000 +0100
@@ -1,4 +1,4 @@
-from user_agent.base import * # pylint: disable=wildcard-import
-from user_agent.error import * # pylint: disable=wildcard-import
+from user_agent.base import * # noqa: F403 pylint: disable=wildcard-import
+from user_agent.error import * # noqa: F403 pylint: disable=wildcard-import
-__version__ = '0.1.9'
+__version__ = '0.1.10'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/user_agent-0.1.9/user_agent/base.py
new/user_agent-0.1.10/user_agent/base.py
--- old/user_agent-0.1.9/user_agent/base.py 2017-07-30 18:46:08.000000000
+0200
+++ new/user_agent-0.1.10/user_agent/base.py 2021-12-04 14:42:46.000000000
+0100
@@ -34,7 +34,7 @@
"""
# pylint: enable=line-too-long
-from random import choice, randint
+from random import SystemRandom
from datetime import datetime, timedelta
from itertools import product
@@ -49,7 +49,7 @@
__all__ = ['generate_user_agent', 'generate_navigator',
'generate_navigator_js']
-
+randomizer = SystemRandom()
DEVICE_TYPE_OS = {
'desktop': ('win', 'mac', 'linux'),
'smartphone': ('android',),
@@ -147,16 +147,42 @@
('50.0', datetime(2016, 11, 15)),
('51.0', datetime(2017, 1, 24)),
)
-CHROME_BUILD = (
- (49, 2623, 2660), # 2016-03-02
- (50, 2661, 2703), # 2016-04-13
- (51, 2704, 2742), # 2016-05-25
- (52, 2743, 2784), # 2016-07-20
- (53, 2785, 2839), # 2016-08-31
- (54, 2840, 2882), # 2016-10-12
- (55, 2883, 2923), # 2016-12-01
- (56, 2924, 2986), # 2016-12-01
-)
+
+# Top chrome builds from website access log
+# for september, october 2020
+CHROME_BUILD = '''
+80.0.3987.132
+80.0.3987.149
+80.0.3987.99
+81.0.4044.117
+81.0.4044.138
+83.0.4103.101
+83.0.4103.106
+83.0.4103.96
+84.0.4147.105
+84.0.4147.111
+84.0.4147.125
+84.0.4147.135
+84.0.4147.89
+85.0.4183.101
+85.0.4183.102
+85.0.4183.120
+85.0.4183.121
+85.0.4183.127
+85.0.4183.81
+85.0.4183.83
+86.0.4240.110
+86.0.4240.111
+86.0.4240.114
+86.0.4240.183
+86.0.4240.185
+86.0.4240.75
+86.0.4240.78
+86.0.4240.80
+86.0.4240.96
+86.0.4240.99
+'''.strip().splitlines()
+
IE_VERSION = (
# (numeric ver, string ver, trident ver) # release year
(8, 'MSIE 8.0', '4.0'), # 2009
@@ -203,26 +229,21 @@
def get_firefox_build():
- build_ver, date_from = choice(FIREFOX_VERSION)
+ build_ver, date_from = randomizer.choice(FIREFOX_VERSION)
try:
idx = FIREFOX_VERSION.index((build_ver, date_from))
_, date_to = FIREFOX_VERSION[idx + 1]
except IndexError:
date_to = date_from + timedelta(days=1)
sec_range = (date_to - date_from).total_seconds() - 1
- build_rnd_time = (date_from +
- timedelta(seconds=randint(0, sec_range)))
+ build_rnd_time = (
+ date_from + timedelta(seconds=randomizer.randint(0, int(sec_range)))
+ )
return build_ver, build_rnd_time.strftime('%Y%m%d%H%M%S')
-
def get_chrome_build():
- build = choice(CHROME_BUILD)
- return '%d.0.%d.%d' % (
- build[0],
- randint(build[1], build[2]),
- randint(0, 99),
- )
+ return randomizer.choice(CHROME_BUILD)
def get_ie_build():
@@ -233,7 +254,7 @@
Example: (8, 'MSIE 8.0')
"""
- return choice(IE_VERSION)
+ return randomizer.choice(IE_VERSION)
MACOSX_CHROME_BUILD_RANGE = {
@@ -258,7 +279,7 @@
"""
ver = platform.split('OS X ')[1]
build_range = range(*MACOSX_CHROME_BUILD_RANGE[ver])
- build = choice(build_range)
+ build = randomizer.choice(build_range)
mac_ver = ver.replace('.', '_') + '_' + str(build)
return 'Macintosh; Intel Mac OS X %s' % mac_ver
@@ -277,8 +298,8 @@
"""
if os_id == 'win':
- platform_version = choice(OS_PLATFORM['win'])
- cpu = choice(OS_CPU['win'])
+ platform_version = randomizer.choice(OS_PLATFORM['win'])
+ cpu = randomizer.choice(OS_CPU['win'])
if cpu:
platform = '%s; %s' % (platform_version, cpu)
else:
@@ -290,8 +311,8 @@
'oscpu': platform,
}
elif os_id == 'linux':
- cpu = choice(OS_CPU['linux'])
- platform_version = choice(OS_PLATFORM['linux'])
+ cpu = randomizer.choice(OS_CPU['linux'])
+ platform_version = randomizer.choice(OS_PLATFORM['linux'])
platform = '%s %s' % (platform_version, cpu)
res = {
'platform_version': platform_version,
@@ -300,8 +321,8 @@
'oscpu': 'Linux %s' % cpu,
}
elif os_id == 'mac':
- cpu = choice(OS_CPU['mac'])
- platform_version = choice(OS_PLATFORM['mac'])
+ cpu = randomizer.choice(OS_CPU['mac'])
+ platform_version = randomizer.choice(OS_PLATFORM['mac'])
platform = platform_version
if navigator_id == 'chrome':
platform = fix_chrome_mac_platform(platform)
@@ -314,16 +335,16 @@
elif os_id == 'android':
assert navigator_id in ('firefox', 'chrome')
assert device_type in ('smartphone', 'tablet')
- platform_version = choice(OS_PLATFORM['android'])
+ platform_version = randomizer.choice(OS_PLATFORM['android'])
if navigator_id == 'firefox':
if device_type == 'smartphone':
ua_platform = '%s; Mobile' % platform_version
elif device_type == 'tablet':
ua_platform = '%s; Tablet' % platform_version
elif navigator_id == 'chrome':
- device_id = choice(SMARTPHONE_DEV_IDS)
+ device_id = randomizer.choice(SMARTPHONE_DEV_IDS)
ua_platform = 'Linux; %s; %s' % (platform_version, device_id)
- oscpu = 'Linux %s' % choice(OS_CPU['android'])
+ oscpu = 'Linux %s' % randomizer.choice(OS_CPU['android'])
res = {
'platform_version': platform_version,
'ua_platform': ua_platform,
@@ -420,7 +441,6 @@
"desktop", "smartphone", "tablet", "all"
"""
-
if os is None:
default_dev_types = ['desktop']
else:
@@ -446,7 +466,7 @@
if not variants:
raise InvalidOption('Options device_type, os and navigator'
' conflicts with each other')
- device_type, os_id, navigator_id = choice(variants)
+ device_type, os_id, navigator_id = randomizer.choice(variants)
assert os_id in OS_PLATFORM
assert navigator_id in NAVIGATOR_OS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/user_agent-0.1.9/user_agent/device.py
new/user_agent-0.1.10/user_agent/device.py
--- old/user_agent-0.1.9/user_agent/device.py 2017-02-23 05:26:45.000000000
+0100
+++ new/user_agent-0.1.10/user_agent/device.py 2021-12-04 14:53:57.000000000
+0100
@@ -3,7 +3,13 @@
PACKAGE_DIR = os.path.dirname(os.path.realpath(__file__))
-SMARTPHONE_DEV_IDS = json.load(open(os.path.join(
- PACKAGE_DIR, 'data/smartphone_dev_id.json')))
-TABLET_DEV_IDS = json.load(open(os.path.join(
- PACKAGE_DIR, 'data/tablet_dev_id.json')))
+
+
+def load_json_data(rel_path):
+ path = os.path.join(PACKAGE_DIR, rel_path)
+ with open(path, encoding='utf-8') as inp:
+ return json.load(inp)
+
+
+SMARTPHONE_DEV_IDS = load_json_data('data/smartphone_dev_id.json')
+TABLET_DEV_IDS = load_json_data('data/tablet_dev_id.json')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/user_agent-0.1.9/user_agent.egg-info/PKG-INFO
new/user_agent-0.1.10/user_agent.egg-info/PKG-INFO
--- old/user_agent-0.1.9/user_agent.egg-info/PKG-INFO 2017-08-05
13:18:55.000000000 +0200
+++ new/user_agent-0.1.10/user_agent.egg-info/PKG-INFO 2021-12-04
14:59:01.000000000 +0100
@@ -1,10 +1,12 @@
-Metadata-Version: 1.1
+Metadata-Version: 1.2
Name: user-agent
-Version: 0.1.9
+Version: 0.1.10
Summary: User-Agent generator
Home-page: https://github.com/lorien/user_agent
Author: Gregory Petukhov
Author-email: [email protected]
+Maintainer: Gregory Petukhov
+Maintainer-email: [email protected]
License: MIT License
Download-URL: http://pypi.python.org/pypi/user_agent
Description: ==========