Hello community,
here is the log from the commit of package python-python-jenkins for
openSUSE:Factory checked in at 2019-08-05 10:37:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-jenkins (Old)
and /work/SRC/openSUSE:Factory/.python-python-jenkins.new.4126 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-jenkins"
Mon Aug 5 10:37:27 2019 rev:9 rq:720220 version:1.5.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-python-jenkins/python-python-jenkins.changes
2019-05-22 12:19:44.516861389 +0200
+++
/work/SRC/openSUSE:Factory/.python-python-jenkins.new.4126/python-python-jenkins.changes
2019-08-05 10:37:34.655325950 +0200
@@ -1,0 +2,12 @@
+Thu Aug 1 12:01:53 UTC 2019 - [email protected]
+
+- version update to 1.5.0
+ * Remove pin on mock module
+ * Update jobs
+ * Make get\_job\_info fetch\_all\_builds work with jobs in folders
+ * OpenDev Migration Patch
+ * When updating jobs the response body may be empty
+ * Add Python 3.6 classifier to setup.cfg
+ * add python 3.6 unit test job
+
+-------------------------------------------------------------------
Old:
----
python-jenkins-1.4.0.tar.gz
New:
----
python-jenkins-1.5.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-python-jenkins.spec ++++++
--- /var/tmp/diff_new_pack.0ZQg2A/_old 2019-08-05 10:37:36.043325781 +0200
+++ /var/tmp/diff_new_pack.0ZQg2A/_new 2019-08-05 10:37:36.047325781 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-python-jenkins
-Version: 1.4.0
+Version: 1.5.0
Release: 0
Summary: Python bindings for the remote Jenkins API
License: BSD-3-Clause
++++++ python-jenkins-1.4.0.tar.gz -> python-jenkins-1.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jenkins-1.4.0/.zuul.yaml
new/python-jenkins-1.5.0/.zuul.yaml
--- old/python-jenkins-1.4.0/.zuul.yaml 2018-11-19 02:55:24.000000000 +0100
+++ new/python-jenkins-1.5.0/.zuul.yaml 2019-07-25 18:52:55.000000000 +0200
@@ -4,28 +4,25 @@
description: Tests compatibility with master branch of jenkins-job-builder
parent: tox-py27
required-projects:
- - openstack/python-jenkins
- - openstack-infra/jenkins-job-builder
+ - jjb/python-jenkins
+ - jjb/jenkins-job-builder
voting: true
- project:
templates:
- - docs-on-readthedocs
- - publish-to-pypi
+ - docs-on-readthedocs-failing
+ - openstack-cover-jobs
+ - openstack-python35-jobs
+ - openstack-python36-jobs
check:
jobs:
- openstack-tox-linters
- openstack-tox-py27
- - openstack-tox-py35
- - openstack-tox-py36
- openstack-tox-pypy:
nodeset: ubuntu-bionic
- jjb-tox-cross-jenkins-job-builder
gate:
jobs:
- - build-openstack-sphinx-docs
- openstack-tox-linters
- openstack-tox-py27
- - openstack-tox-py35
- - openstack-tox-py36
- jjb-tox-cross-jenkins-job-builder
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jenkins-1.4.0/AUTHORS
new/python-jenkins-1.5.0/AUTHORS
--- old/python-jenkins-1.4.0/AUTHORS 2018-11-19 02:56:08.000000000 +0100
+++ new/python-jenkins-1.5.0/AUTHORS 2019-07-25 18:54:14.000000000 +0200
@@ -24,6 +24,7 @@
Dong Ma <[email protected]>
Eduardo Gonzalez <[email protected]>
Emilien Macchi <[email protected]>
+Frank Lichtenheld <[email protected]>
Guido Günther <[email protected]>
JP Sullivan <[email protected]>
James E. Blair <[email protected]>
@@ -32,10 +33,12 @@
Jan Hruban <[email protected]>
Jan Hruban <[email protected]>
Jan Priessnitz <[email protected]>
+Jan Zerebecki <[email protected]>
Jeremy Stanley <[email protected]>
Jerome Hourquebie <[email protected]>
Jerry Zhao <[email protected]>
Jonathan Perret <[email protected]>
+K Jonathan Harker <[email protected]>
Ken Conley [email protected] <>
Ken Dreyer <[email protected]>
Ken Rumer <[email protected]>
@@ -58,6 +61,7 @@
Terry Howe <[email protected]>
Thanh Ha <[email protected]>
Tomas Janousek <[email protected]>
+Vieri <[email protected]>
ZhangHongtao <[email protected]>
grahamlyons <[email protected]>
huang.zhiping <[email protected]>
@@ -65,6 +69,7 @@
lvxianguo <[email protected]>
melissaml <[email protected]>
mhuin <[email protected]>
+qingszhao <[email protected]>
shu-mutou <[email protected]>
sunyandi <[email protected]>
venkatamahesh <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jenkins-1.4.0/ChangeLog
new/python-jenkins-1.5.0/ChangeLog
--- old/python-jenkins-1.4.0/ChangeLog 2018-11-19 02:56:08.000000000 +0100
+++ new/python-jenkins-1.5.0/ChangeLog 2019-07-25 18:54:14.000000000 +0200
@@ -1,6 +1,17 @@
CHANGES
=======
+1.5.0
+-----
+
+* Remove pin on mock module
+* Update jobs
+* Make get\_job\_info fetch\_all\_builds work with jobs in folders
+* OpenDev Migration Patch
+* When updating jobs the response body may be empty
+* Add Python 3.6 classifier to setup.cfg
+* add python 3.6 unit test job
+
1.4.0
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jenkins-1.4.0/PKG-INFO
new/python-jenkins-1.5.0/PKG-INFO
--- old/python-jenkins-1.4.0/PKG-INFO 2018-11-19 02:56:08.000000000 +0100
+++ new/python-jenkins-1.5.0/PKG-INFO 2019-07-25 18:54:14.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: python-jenkins
-Version: 1.4.0
+Version: 1.5.0
Summary: Python bindings for the remote Jenkins API
Home-page: http://git.openstack.org/cgit/openstack/python-jenkins
Author: Ken Conley
@@ -119,3 +119,4 @@
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jenkins-1.4.0/jenkins/__init__.py
new/python-jenkins-1.5.0/jenkins/__init__.py
--- old/python-jenkins-1.4.0/jenkins/__init__.py 2018-11-19
02:55:24.000000000 +0100
+++ new/python-jenkins-1.5.0/jenkins/__init__.py 2019-07-25
18:52:55.000000000 +0200
@@ -368,6 +368,8 @@
try:
response = self.jenkins_open(requests.Request(
'GET', self._build_url(CRUMB_URL)), add_crumb=False)
+ if not response:
+ raise EmptyResponseException("Empty response for crumb")
except (NotFoundException, EmptyResponseException):
self.crumb = False
else:
@@ -432,7 +434,7 @@
all_builds_loaded = (oldest_loaded_build_number == first_build_number)
if all_builds_loaded:
return data
- folder_url, short_name = self._get_job_folder(data["name"])
+ folder_url, short_name = self._get_job_folder(data["fullName"])
response = self.jenkins_open(requests.Request(
'GET', self._build_url(ALL_BUILDS, locals())
))
@@ -440,7 +442,7 @@
data["builds"] = json.loads(response)["allBuilds"]
else:
raise JenkinsException('Could not fetch all builds from job[%s]' %
- data["name"])
+ data["fullName"])
return data
def get_job_info(self, name, depth=0, fetch_all_builds=False):
@@ -532,16 +534,6 @@
# raise exceptions if occurred
response.raise_for_status()
- headers = response.headers
- if (headers.get('content-length') is None and
- headers.get('transfer-encoding') is None and
- headers.get('location') is None and
- (response.content is None or len(response.content) <= 0)):
- # response body should only exist if one of these is provided
- raise EmptyResponseException(
- "Error communicating with server[%s]: "
- "empty response" % self.server)
-
# Response objects will automatically return unicode encoded
# when accessing .text property
return response
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-jenkins-1.4.0/python_jenkins.egg-info/PKG-INFO
new/python-jenkins-1.5.0/python_jenkins.egg-info/PKG-INFO
--- old/python-jenkins-1.4.0/python_jenkins.egg-info/PKG-INFO 2018-11-19
02:56:08.000000000 +0100
+++ new/python-jenkins-1.5.0/python_jenkins.egg-info/PKG-INFO 2019-07-25
18:54:14.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: python-jenkins
-Version: 1.4.0
+Version: 1.5.0
Summary: Python bindings for the remote Jenkins API
Home-page: http://git.openstack.org/cgit/openstack/python-jenkins
Author: Ken Conley
@@ -119,3 +119,4 @@
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/python-jenkins-1.4.0/python_jenkins.egg-info/pbr.json
new/python-jenkins-1.5.0/python_jenkins.egg-info/pbr.json
--- old/python-jenkins-1.4.0/python_jenkins.egg-info/pbr.json 2018-11-19
02:56:08.000000000 +0100
+++ new/python-jenkins-1.5.0/python_jenkins.egg-info/pbr.json 2019-07-25
18:54:14.000000000 +0200
@@ -1 +1 @@
-{"git_version": "7166f87", "is_release": true}
\ No newline at end of file
+{"git_version": "35f660a", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jenkins-1.4.0/setup.cfg
new/python-jenkins-1.5.0/setup.cfg
--- old/python-jenkins-1.4.0/setup.cfg 2018-11-19 02:56:08.000000000 +0100
+++ new/python-jenkins-1.5.0/setup.cfg 2019-07-25 18:54:14.000000000 +0200
@@ -22,6 +22,7 @@
Programming Language :: Python :: 3
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.5
+ Programming Language :: Python :: 3.6
[files]
packages =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jenkins-1.4.0/test-requirements.txt
new/python-jenkins-1.5.0/test-requirements.txt
--- old/python-jenkins-1.4.0/test-requirements.txt 2018-11-19
02:55:24.000000000 +0100
+++ new/python-jenkins-1.5.0/test-requirements.txt 2019-07-25
18:52:55.000000000 +0200
@@ -1,12 +1,13 @@
cmd2!=0.8.3,<0.9.0;python_version<'3.0' # MIT
cmd2!=0.8.3;python_version>='3.0' # MIT
coverage>=3.6
-mock<1.1
+mock
unittest2
python-subunit
requests-mock>=1.4.0
requests-kerberos
-sphinx>=1.6.0
+sphinx>=1.6.0,<2.0.0;python_version=='2.7' # BSD
+sphinx>=1.6.0;python_version>='3.4' # BSD
stestr>=2.0.0
testscenarios
testtools
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jenkins-1.4.0/tests/jobs/test_build.py
new/python-jenkins-1.5.0/tests/jobs/test_build.py
--- old/python-jenkins-1.4.0/tests/jobs/test_build.py 2018-11-19
02:55:24.000000000 +0100
+++ new/python-jenkins-1.5.0/tests/jobs/test_build.py 2019-07-25
18:52:55.000000000 +0200
@@ -60,7 +60,7 @@
self.assertEqual(
str(context_mgr.exception),
- 'Error communicating with server[{0}]: empty response'.format(
+ "Header 'Location' not found in response from server[{0}]".format(
self.make_url('')))
@patch('jenkins.requests.Session.send', autospec=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jenkins-1.4.0/tests/jobs/test_get.py
new/python-jenkins-1.5.0/tests/jobs/test_get.py
--- old/python-jenkins-1.4.0/tests/jobs/test_get.py 2018-11-19
02:55:24.000000000 +0100
+++ new/python-jenkins-1.5.0/tests/jobs/test_get.py 2019-07-25
18:52:55.000000000 +0200
@@ -128,7 +128,7 @@
self.assertEqual(
session_send_mock.call_args_list[1][0][1].url,
self.make_url(
- 'view/Test%20View/api/json?tree=jobs[url,color,name]'
+ 'view/Test%20View/api/json?tree=jobs%5Burl,color,name%5D'
))
self.assertEqual(
str(context_manager.exception),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jenkins-1.4.0/tests/jobs/test_info.py
new/python-jenkins-1.5.0/tests/jobs/test_info.py
--- old/python-jenkins-1.4.0/tests/jobs/test_info.py 2018-11-19
02:55:24.000000000 +0100
+++ new/python-jenkins-1.5.0/tests/jobs/test_info.py 2019-07-25
18:52:55.000000000 +0200
@@ -35,7 +35,8 @@
u'user': u'unknown',
u'firstBuild': {u'number': 4},
u'builds': [{u'number': 5}],
- u'name': u'Test Job'
+ u'name': u'Test Job',
+ u'fullName': u'Test Job'
}
all_builds_to_return = {u'allBuilds': [{u'number': 4},
{u'number': 5}]}
@@ -76,6 +77,38 @@
self._check_requests(jenkins_mock.call_args_list)
@patch.object(jenkins.Jenkins, 'jenkins_open')
+ def test_all_builds_in_folder(self, jenkins_mock):
+ job_info_to_return = {
+ u'building': False,
+ u'msg': u'test',
+ u'revision': 66,
+ u'user': u'unknown',
+ u'firstBuild': {u'number': 4},
+ u'builds': [{u'number': 5}],
+ u'name': u'Test Job',
+ u'fullName': u'a Folder/Test Job'
+ }
+ all_builds_to_return = {u'allBuilds': [{u'number': 4},
+ {u'number': 5}]}
+ jenkins_mock.side_effect = [json.dumps(job_info_to_return),
+ json.dumps(all_builds_to_return)]
+
+ job_info = self.j.get_job_info(u'a Folder/Test Job',
fetch_all_builds=True)
+
+ expected = dict(job_info_to_return)
+ expected["builds"] = [{u'number': 4}, {u'number': 5}]
+
+ self.assertEqual(job_info, expected)
+ self.assertEqual(
+ jenkins_mock.call_args_list[0][0][0].url,
+ self.make_url('job/a%20Folder/job/Test%20Job/api/json?depth=0'))
+ self.assertEqual(
+ jenkins_mock.call_args_list[1][0][0].url,
+ self.make_url(
+
'job/a%20Folder/job/Test%20Job/api/json?tree=allBuilds[number,url]'))
+ self._check_requests(jenkins_mock.call_args_list)
+
+ @patch.object(jenkins.Jenkins, 'jenkins_open')
def test_regex(self, jenkins_mock):
jobs = [
{u'name': u'my-job-1'},
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jenkins-1.4.0/tests/test_jenkins.py
new/python-jenkins-1.5.0/tests/test_jenkins.py
--- old/python-jenkins-1.4.0/tests/test_jenkins.py 2018-11-19
02:55:24.000000000 +0100
+++ new/python-jenkins-1.5.0/tests/test_jenkins.py 2019-07-25
18:52:55.000000000 +0200
@@ -108,7 +108,7 @@
@patch.object(jenkins.Jenkins, 'jenkins_open')
def test_return_empty_response(self, jenkins_mock):
"Don't try to create crumb header from an empty response"
- jenkins_mock.side_effect = jenkins.EmptyResponseException("empty
response")
+ jenkins_mock.return_value = ''
request = jenkins.requests.Request('GET',
'http://example.com/job/TestJob')
self.j.maybe_add_crumb(request)
@@ -254,11 +254,9 @@
j = jenkins.Jenkins('http://example.com', 'test', 'test')
self.assertTrue(j.wait_for_normal_op(0))
- @patch.object(jenkins.Jenkins, 'jenkins_open',
- side_effect=jenkins.EmptyResponseException())
@patch.object(jenkins.Jenkins, 'get_version',
- side_effect=jenkins.EmptyResponseException())
- def test_wait_for_normal_op__empty_response(self, version_mock,
jenkins_mock):
+ side_effect=jenkins.BadHTTPException())
+ def test_wait_for_normal_op__failed_response(self, version_mock):
j = jenkins.Jenkins('http://example.com', 'test', 'test')
self.assertFalse(j.wait_for_normal_op(0))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jenkins-1.4.0/tests/test_node.py
new/python-jenkins-1.5.0/tests/test_node.py
--- old/python-jenkins-1.4.0/tests/test_node.py 2018-11-19 02:55:24.000000000
+0100
+++ new/python-jenkins-1.5.0/tests/test_node.py 2019-07-25 18:52:56.000000000
+0200
@@ -266,11 +266,10 @@
@requests_mock.Mocker()
def test_already_exists(self, req_mock):
- req_mock.get(self.make_url(jenkins.CRUMB_URL))
+ req_mock.get(self.make_url(jenkins.CRUMB_URL), content=None)
req_mock.get(
self.make_url('computer/test_node/api/json?depth=0'),
- status_code=200, json=self.node_info,
- headers={'content-length': '20'}
+ status_code=200, json=self.node_info
)
with self.assertRaises(jenkins.JenkinsException) as context_manager:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jenkins-1.4.0/tests/test_version.py
new/python-jenkins-1.5.0/tests/test_version.py
--- old/python-jenkins-1.4.0/tests/test_version.py 2018-11-19
02:55:24.000000000 +0100
+++ new/python-jenkins-1.5.0/tests/test_version.py 2019-07-25
18:52:56.000000000 +0200
@@ -36,11 +36,10 @@
'Error communicating with server[{0}/]'.format(self.base_url))
@patch('jenkins.requests.Session.send', autospec=True)
- def test_return_empty_response(self, session_send_mock):
+ def test_return_without_version_header(self, session_send_mock):
session_send_mock.return_value = build_response_mock(0)
- with self.assertRaises(jenkins.EmptyResponseException) as
context_manager:
+ with self.assertRaises(KeyError) as context_manager:
self.j.get_version()
self.assertEqual(
str(context_manager.exception),
- 'Error communicating with server[{0}/]:'
- ' empty response'.format(self.base_url))
+ "'x-jenkins'")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/python-jenkins-1.4.0/tox.ini
new/python-jenkins-1.5.0/tox.ini
--- old/python-jenkins-1.4.0/tox.ini 2018-11-19 02:55:24.000000000 +0100
+++ new/python-jenkins-1.5.0/tox.ini 2019-07-25 18:52:56.000000000 +0200
@@ -1,7 +1,7 @@
[tox]
minversion = 2.0
skipsdist = True
-envlist = py{34,27,35}, linters, pypy
+envlist = py{34,27,35,36}, linters, pypy
[testenv]
setenv =