forked from pool/python-python-jenkins
- Update to 1.8.2:
* Fix compatibility with setuptools >= 66 * get_build_artifact_as_bytes to support non-json files * Handle 'all' view name when requested 'All' * WrappedSession: Fix URL to requests issue 3829 * support urllib3 newer DEFAULT_TIMEOUT * Use multiprocess to avoid pickle errors in tox on macos - Dropped patch use-parts-of-legacy-version.patch: * Merged upstream. - Refreshed patch python-python-jenkins-no-mock.patch: * It was submitted upstream. - Add patch remove-six.patch: * Remove usage of six. - Remove pin against urllib3. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-jenkins?expand=0&rev=40
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.osc
|
3
python-jenkins-1.8.0.tar.gz
Normal file
3
python-jenkins-1.8.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0180a5463f68e2e0110f382b4248d2284bc68481db4a16fcbf61f4f55801c31f
|
||||||
|
size 64814
|
3
python-jenkins-1.8.2.tar.gz
Normal file
3
python-jenkins-1.8.2.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:56e7dabb0607bdb8e1d6fc6d2d4301abedbed9165da2b206facbd3071cb6eecb
|
||||||
|
size 66548
|
372
python-python-jenkins-no-mock.patch
Normal file
372
python-python-jenkins-no-mock.patch
Normal file
@@ -0,0 +1,372 @@
|
|||||||
|
From c37936698341e1bbbec2b9b62dfc64ddc51f3dfd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Steve Kowalik <steven@wedontsleep.org>
|
||||||
|
Date: Wed, 25 Jun 2025 16:02:31 +1000
|
||||||
|
Subject: [PATCH] Stop using external mock module
|
||||||
|
|
||||||
|
Now that support for Python 2 has been dropped, we can switch to the
|
||||||
|
built-in unittest.mock module and drop one more external test
|
||||||
|
dependency.
|
||||||
|
|
||||||
|
Change-Id: Ie6e3b2c4047d00509053769fd5b49a1e4464e951
|
||||||
|
---
|
||||||
|
test-requirements.txt | 1 -
|
||||||
|
tests/jobs/test_assert.py | 2 +-
|
||||||
|
tests/jobs/test_config.py | 2 +-
|
||||||
|
tests/jobs/test_copy.py | 2 +-
|
||||||
|
tests/jobs/test_count.py | 2 +-
|
||||||
|
tests/jobs/test_create.py | 2 +-
|
||||||
|
tests/jobs/test_debug.py | 2 +-
|
||||||
|
tests/jobs/test_delete.py | 2 +-
|
||||||
|
tests/jobs/test_disable.py | 2 +-
|
||||||
|
tests/jobs/test_enable.py | 2 +-
|
||||||
|
tests/jobs/test_get.py | 2 +-
|
||||||
|
tests/jobs/test_getall.py | 2 +-
|
||||||
|
tests/jobs/test_info.py | 2 +-
|
||||||
|
tests/jobs/test_name.py | 2 +-
|
||||||
|
tests/jobs/test_reconfig.py | 2 +-
|
||||||
|
tests/jobs/test_rename.py | 2 +-
|
||||||
|
tests/jobs/test_set_next_build_number.py | 2 +-
|
||||||
|
tests/test_build.py | 2 +-
|
||||||
|
tests/test_check_jenkinsfile_syntax.py | 2 +-
|
||||||
|
tests/test_credential.py | 2 +-
|
||||||
|
tests/test_info.py | 2 +-
|
||||||
|
tests/test_job_folder.py | 2 +-
|
||||||
|
tests/test_node.py | 2 +-
|
||||||
|
tests/test_plugins.py | 2 +-
|
||||||
|
tests/test_queue.py | 2 +-
|
||||||
|
tests/test_quiet_down.py | 2 +-
|
||||||
|
tests/test_script.py | 2 +-
|
||||||
|
tests/test_version.py | 2 +-
|
||||||
|
tests/test_view.py | 2 +-
|
||||||
|
tests/test_whoami.py | 2 +-
|
||||||
|
30 files changed, 29 insertions(+), 30 deletions(-)
|
||||||
|
|
||||||
|
Index: python-jenkins-1.8.2/test-requirements.txt
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/test-requirements.txt
|
||||||
|
+++ python-jenkins-1.8.2/test-requirements.txt
|
||||||
|
@@ -1,7 +1,6 @@
|
||||||
|
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
|
||||||
|
unittest2
|
||||||
|
python-subunit
|
||||||
|
requests-mock>=1.11.0
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_assert.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_assert.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_assert.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.jobs.base import JenkinsJobsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_config.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_config.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_config.py
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.jobs.base import JenkinsJobsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_copy.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_copy.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_copy.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.jobs.base import JenkinsJobsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_count.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_count.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_count.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.jobs.base import JenkinsJobsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_create.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_create.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_create.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.jobs.base import JenkinsJobsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_debug.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_debug.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_debug.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.jobs.base import JenkinsJobsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_delete.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_delete.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_delete.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.jobs.base import JenkinsJobsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_disable.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_disable.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_disable.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.jobs.base import JenkinsJobsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_enable.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_enable.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_enable.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.jobs.base import JenkinsJobsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_get.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_get.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_get.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.helper import build_response_mock
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_getall.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_getall.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_getall.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.jobs.base import JenkinsGetJobsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_info.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_info.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_info.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.helper import build_response_mock
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_name.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_name.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_name.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.jobs.base import JenkinsJobsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_reconfig.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_reconfig.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_reconfig.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.jobs.base import JenkinsJobsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_rename.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_rename.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_rename.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.jobs.base import JenkinsJobsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_set_next_build_number.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_set_next_build_number.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_set_next_build_number.py
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.jobs.base import JenkinsJobsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_build.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_build.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_build.py
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
import json
|
||||||
|
|
||||||
|
import collections
|
||||||
|
-from mock import patch, Mock
|
||||||
|
+from unittest.mock import patch, Mock
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.base import JenkinsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_check_jenkinsfile_syntax.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_check_jenkinsfile_syntax.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_check_jenkinsfile_syntax.py
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
from tests.base import JenkinsTestBase
|
||||||
|
from tests.helper import build_response_mock
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_credential.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_credential.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_credential.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.base import JenkinsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_info.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_info.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_info.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.base import JenkinsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_job_folder.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_job_folder.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_job_folder.py
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.base import JenkinsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_node.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_node.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_node.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
import requests_mock
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_plugins.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_plugins.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_plugins.py
|
||||||
|
@@ -32,7 +32,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
from testscenarios.scenarios import multiply_scenarios
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_queue.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_queue.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_queue.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.base import JenkinsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_quiet_down.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_quiet_down.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_quiet_down.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.base import JenkinsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_script.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_script.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_script.py
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.base import JenkinsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_version.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_version.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_version.py
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.base import JenkinsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_view.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_view.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_view.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.base import JenkinsTestBase
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_whoami.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_whoami.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_whoami.py
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.base import JenkinsTestBase
|
333
python-python-jenkins.changes
Normal file
333
python-python-jenkins.changes
Normal file
@@ -0,0 +1,333 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 28 04:08:10 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Update to 1.8.2:
|
||||||
|
* Fix compatibility with setuptools >= 66
|
||||||
|
* get_build_artifact_as_bytes to support non-json files
|
||||||
|
* Handle 'all' view name when requested 'All'
|
||||||
|
* WrappedSession: Fix URL to requests issue 3829
|
||||||
|
* support urllib3 newer DEFAULT_TIMEOUT
|
||||||
|
* Use multiprocess to avoid pickle errors in tox on macos
|
||||||
|
- Dropped patch use-parts-of-legacy-version.patch:
|
||||||
|
* Merged upstream.
|
||||||
|
- Refreshed patch python-python-jenkins-no-mock.patch:
|
||||||
|
* It was submitted upstream.
|
||||||
|
- Add patch remove-six.patch:
|
||||||
|
* Remove usage of six.
|
||||||
|
- Remove pin against urllib3.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 24 06:15:47 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Pin {Build,}Requires on urllib3 to < 2.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 17 08:05:56 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Update to 1.8.0:
|
||||||
|
* Add retrieval of stages of artifacts
|
||||||
|
* Switch links to opendev.org
|
||||||
|
* Allow build number to be a string
|
||||||
|
* Use fullname in get_job_info_regex
|
||||||
|
- Add patch use-parts-of-legacy-version.patch:
|
||||||
|
* Use underpining parts of LegacyVersion pre-removal.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 4 05:46:39 UTC 2022 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- added patches
|
||||||
|
fix https://bugs.launchpad.net/python-jenkins/+bug/1971524
|
||||||
|
+ python-python-jenkins-no-mock.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 15 15:45:33 UTC 2021 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- we don't need stestr to run tests
|
||||||
|
* which enables the tests again
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 20 12:14:40 UTC 2020 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- version update to 1.7.0
|
||||||
|
* Include placeholder tasks in get\_running\_builds
|
||||||
|
* Fix reconfig\_credential() to send the xml data
|
||||||
|
* new method: create\_folder (with tests)
|
||||||
|
* new method: check\_jenkinsfile\_syntax (with tests)
|
||||||
|
* Update docs building job
|
||||||
|
* upsert\_job
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 1 12:01:53 UTC 2019 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 14 18:18:30 UTC 2019 - Jonathan <jharker@suse.com>
|
||||||
|
|
||||||
|
- Fix dependencies for version 1.4.0
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 11 15:07:10 UTC 2018 - Thomas Bechtold <tbechtold@suse.com>
|
||||||
|
|
||||||
|
- update to 1.4.0:
|
||||||
|
* Update min tox version to 2.0
|
||||||
|
* Request multiple folder levels at once in get\_all\_jobs
|
||||||
|
* Replace build\_jobs\_list\_responses with actual Jenkins responses
|
||||||
|
* Clean up job/folder path handling
|
||||||
|
* Test requested URLs in test\_getall
|
||||||
|
* Make jjb-tox-cross-jenkins-job-builder voting
|
||||||
|
* Allow adding extra HTTP headers to Jenkins requests
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 4 17:51:40 UTC 2018 - dmueller@suse.com
|
||||||
|
|
||||||
|
- update to 1.2.1:
|
||||||
|
* Revert "detect and respect http redirects"
|
||||||
|
* Revert "Avoid empty body failure on HEAD requests"
|
||||||
|
* Avoid empty body failure on HEAD requests
|
||||||
|
* Fix item being ignored in get\_info
|
||||||
|
* detect and respect http redirects
|
||||||
|
* Fix run\_script method
|
||||||
|
* Adopt use of pre-commit hooks
|
||||||
|
* Adds support for executing Groovy scripts on jenkins nodes
|
||||||
|
* Allow use of unicode job names
|
||||||
|
* Added pypy-dev to bindep.txt
|
||||||
|
* Fix run\_scripts() API
|
||||||
|
* fix tox python3 overrides
|
||||||
|
* Selectively mock requests\_kerberos import
|
||||||
|
* Ensure timeout exceptions are re-raised during auth attempts
|
||||||
|
* Revert "Do not require requests-kerberos for tests"
|
||||||
|
* Freeze cmd2 library on python2
|
||||||
|
* Update URLS that require depth or tree filters
|
||||||
|
* README: mention #openstack-jjb channel
|
||||||
|
* Do not require requests-kerberos for tests
|
||||||
|
* Fix: send proxy as empty dict
|
||||||
|
* Add functions to retrieve more data from Jenkins
|
||||||
|
* Update to \_response\_handler
|
||||||
|
* Trivial: Update pypi url to new url
|
||||||
|
* add get\_queue\_item() method
|
||||||
|
* build\_job: return queue item identifier
|
||||||
|
* add jenkins\_request() method
|
||||||
|
* Use proper code highlight in docs
|
||||||
|
* Fix docstrings params
|
||||||
|
* Adds support for wiping out a job's workspace
|
||||||
|
* Adds support for multi-select build parameters
|
||||||
|
* Adds support for deleting builds
|
||||||
|
* enable cross testing with jenkins-job-builder
|
||||||
|
* Improve SSL support with requests lib
|
||||||
|
* Enables use of PYTHONHTTPSVERIFY override
|
||||||
|
* Adding pypy to bindep test profile
|
||||||
|
* Added folder support in views keeping backward compatibility and added tests for it
|
||||||
|
* Add EMPTY\_FOLDER\_XML str to match docs
|
||||||
|
* build\_job: fix grammar in comment
|
||||||
|
* Replace testr with stestr
|
||||||
|
* This Allow to include folders in jobs list when calling get\_all\_jobs() method. Closes-Bug: #1731903
|
||||||
|
* repair .gitgnore
|
||||||
|
* Migration to using requests
|
||||||
|
* trivial: modify spelling error of version
|
||||||
|
* modify version spelling errors
|
||||||
|
* Pass form data as body instead of in the url
|
||||||
|
* get\_build\_console\_output: fix docs for "number" parameter
|
||||||
|
* Sanitize url in get\_info() function
|
||||||
|
* get\_job\_name: fix grammar in comment
|
||||||
|
* doc: add get\_job\_config() example
|
||||||
|
* create\_node: avoid double-encoding
|
||||||
|
* Add py35 to tox envlist
|
||||||
|
- run tests
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 18 11:32:00 UTC 2018 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Depend on python-rpm-macros
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 25 12:39:24 UTC 2017 - dmueller@suse.com
|
||||||
|
|
||||||
|
- convert to singlespec
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 28 10:43:13 UTC 2017 - tbechtold@suse.com
|
||||||
|
|
||||||
|
update to version 0.4.14
|
||||||
|
* get_running_builds failed when server has a path
|
||||||
|
* Move other-requirements.txt to bindep.txt
|
||||||
|
* Add optional kerberos support
|
||||||
|
* Allow to wait for jenkins to enter normal operation
|
||||||
|
* Remove discover from test-requirements
|
||||||
|
* Fixed a minor typo in example of Python-jenkins
|
||||||
|
* Fix relative import in kerberos support for python3
|
||||||
|
* Changes get_job_info to get_build_info
|
||||||
|
* url-proof scripts passed to run_script
|
||||||
|
* Do not force DeprecationWarning to be displayed
|
||||||
|
* Add support for handling promotions
|
||||||
|
* Use standard cover setup
|
||||||
|
* Adds possibility to retrieve all jobs from the view specified
|
||||||
|
* Setup required packages with bindep
|
||||||
|
* Make the kerberos support python3 ready
|
||||||
|
* remove cap on pbr
|
||||||
|
* Fetch all builds from a job
|
||||||
|
* Remove redundant 'the'
|
||||||
|
* add get_whoami()
|
||||||
|
- Use pypi.io as Source url
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 12 12:46:15 UTC 2016 - tbechtold@suse.com
|
||||||
|
|
||||||
|
- Add missing Requires for python-setuptools
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 26 13:43:02 UTC 2016 - tbechtold@suse.com
|
||||||
|
|
||||||
|
- Rename python-jenkins to python-python-jenkins. It's openSUSE
|
||||||
|
policy to use python-$pypi name.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jan 3 09:23:02 UTC 2016 - tbechtold@suse.com
|
||||||
|
|
||||||
|
- update to 0.4.12:
|
||||||
|
* Drop py33 support
|
||||||
|
* Fixed create_node() Error
|
||||||
|
* Deprecated tox -downloadcache option removed
|
||||||
|
* Use TestWithScenarios to add additional url tests
|
||||||
|
* Change repositories from stackforge to openstack
|
||||||
|
* Update .gitreview for new namespace
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 30 14:32:03 UTC 2015 - tbechtold@suse.com
|
||||||
|
|
||||||
|
- update to 0.4.11:
|
||||||
|
* Handle depth errors in get_running_builds
|
||||||
|
* Use str as base class for PluginVersion
|
||||||
|
* Support ability to install plugins
|
||||||
|
* Provider helper classes for plugin data management
|
||||||
|
* Allow setting the next build number
|
||||||
|
* Adds Cloudbees folder plugin support
|
||||||
|
* Add function to get running builds
|
||||||
|
* Change order of tox envs for testr
|
||||||
|
* Add support for quiet down
|
||||||
|
* fix get version example
|
||||||
|
* remove support for python 2.6
|
||||||
|
* Separate tests in separate files and classes
|
||||||
|
* Create module member index from autodoc
|
||||||
|
* Fix timeout function and add capturing of messages on failure
|
||||||
|
* Stop specifying requirements.txt in tox.ini
|
||||||
|
* Wrap url building with helper method
|
||||||
|
* Rework the examples
|
||||||
|
* Add socket timeout tests and helpers
|
||||||
|
- adjust Requires according to requirements.txt
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Aug 4 15:00:20 UTC 2015 - tbechtold@suse.com
|
||||||
|
|
||||||
|
- Add COPYING and README.rst as %doc files
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 31 04:55:19 UTC 2015 - tbechtold@suse.com
|
||||||
|
|
||||||
|
- update to 0.4.8:
|
||||||
|
* Fix tests on python 2.6 and mark as deprecated
|
||||||
|
* Remove unneeded wrapping of imports
|
||||||
|
* Support scriptText api to execute groovy scripts on the server
|
||||||
|
* Creates ability to work with views in jenkins
|
||||||
|
* fix passing of byte object to url request method
|
||||||
|
* requirements: pin pbr>=0.8.2,<2.0
|
||||||
|
* Ensure request data is in the correct format
|
||||||
|
* Ensure data is utf-8 encoded
|
||||||
|
* Modify tests to exercise Request on python3
|
||||||
|
* Add decode to utf8 for python 3.x
|
||||||
|
* Fix examples
|
||||||
|
* Add utf8 to headers
|
||||||
|
* Add a get_nodes method
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 11 11:39:12 UTC 2015 - tbechtold@suse.com
|
||||||
|
|
||||||
|
- update to 0.4.5:
|
||||||
|
* Add get_job_info_regex method to get info about a set of jobs
|
||||||
|
* Set the server connection timeout to same as socket timeout
|
||||||
|
* Consolidate raising identical exceptions
|
||||||
|
* Add a jobs_count method
|
||||||
|
* Doc Update: Fix formatting for inclusion of README.rst
|
||||||
|
* Doc Change: update supported python versions
|
||||||
|
* Add BadHTTPException
|
||||||
|
* Fix incorrect indentation
|
||||||
|
* Don't return None on unhandled http errors
|
||||||
|
* Use empty crumb on empty response
|
||||||
|
* Don't assume we get a valid response
|
||||||
|
* Update and clean up docs
|
||||||
|
* Add a default http timeout for connections to jenkins
|
||||||
|
* Eliminate redundant calls to assert_job_exists()
|
||||||
|
* Raise an exception on 404
|
||||||
|
* testtools requires unittest2
|
||||||
|
* Fix cancel_queue() method
|
||||||
|
* Fix enable_node and disable_node methods
|
||||||
|
* Handle job and node names that contain spaces
|
||||||
|
* Workflow documentation is now in infra-manual
|
||||||
|
* fix typo, must be 'classifier' to appear on pypi.python.org
|
||||||
|
* Yield HTTPError reason on open error
|
||||||
|
* fix auth with long username or password
|
||||||
|
* Add a readme and make it appear on pypi.python.org
|
||||||
|
* Add get_plugins_info and get_plugin_info methods
|
||||||
|
* generate a code coverage html report
|
||||||
|
* add get_version method
|
||||||
|
* exclude tests from code coverage report
|
||||||
|
* Setup pbr versioning for docs
|
||||||
|
* Support node configuration
|
||||||
|
* Fix it so build_job triggers a build
|
||||||
|
* Rename doc environment to docs
|
||||||
|
* Enabled hacking check H404
|
||||||
|
* Add MANIFEST.in
|
||||||
|
* Six is a runtime requirement not a test req
|
||||||
|
* Update version info
|
||||||
|
* Fix `tox -e doc` duplicate id error
|
||||||
|
* Use pbr, pep8 checks & fixes, add "doc" tox target
|
||||||
|
* make JSON depth response configurable
|
||||||
|
* Add a gitreview file
|
||||||
|
* Adds assert_node_exists()
|
||||||
|
* Speed up job existence tests by fetching less info
|
||||||
|
* Fix remaining PEP8 errors in docstrings
|
||||||
|
* Fix hacking docstring warnings
|
||||||
|
* Make it work on Python 3
|
||||||
|
* 100% test coverage
|
||||||
|
* Add support for measuring coverage
|
||||||
|
* Support node startup with the JNLP Launcher
|
||||||
|
* Add .gitignore
|
||||||
|
* Clarify job_exists() error messages
|
||||||
|
* Doc fixes
|
||||||
|
* Wrap tests and linting with tox
|
||||||
|
* David Strauss 2014-03-06 Fedora 19+ has packages, too
|
||||||
|
* Fedora 19+ has packages, too
|
||||||
|
* [soren] Add fixes for crumb addition to post requests
|
||||||
|
* Add bug metadata
|
||||||
|
* Change method name to reflect behaviour
|
||||||
|
* Recycle crumb. Apparently, it's not a nonce
|
||||||
|
* Attempt to fetch a crumb (needed if CSRF protection is enabled)
|
||||||
|
* Release 0.2.1
|
||||||
|
* speed up job existence test by fetching less informations
|
||||||
|
* Add rename_job()
|
||||||
|
* speed up job existence test by fetching less informations
|
||||||
|
* Add rename_job()
|
||||||
|
* Add ability to fetch raw console text for build
|
||||||
|
* Antoine Musso:
|
||||||
|
* overhaul the sphinx documentation
|
||||||
|
* pass pep8 on all files
|
||||||
|
* Add support for a rename_job() call
|
||||||
|
* Merged new node management features including using SSH and
|
||||||
|
Windows slaves plus cancel job/queue methods
|
||||||
|
* Add additional methods:
|
||||||
|
* Merged bug fix and tests for job names with spaces
|
||||||
|
* Open for 0.3 development
|
||||||
|
- update Requires
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 21 14:10:30 UTC 2014 - thomasbechtold@jpberlin.de
|
||||||
|
|
||||||
|
- Initial packaging of python-jenkins.
|
||||||
|
|
81
python-python-jenkins.spec
Normal file
81
python-python-jenkins.spec
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
#
|
||||||
|
# spec file for package python-python-jenkins
|
||||||
|
#
|
||||||
|
# Copyright (c) 2025 SUSE LLC
|
||||||
|
# Copyright (c) 2014 Thomas Bechtold <thomasbechtold@jpberlin.de>
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: python-python-jenkins
|
||||||
|
Version: 1.8.2
|
||||||
|
Release: 0
|
||||||
|
Summary: Python bindings for the remote Jenkins API
|
||||||
|
License: BSD-3-Clause
|
||||||
|
URL: https://opendev.org/jjb/python-jenkins
|
||||||
|
Source: https://files.pythonhosted.org/packages/source/p/python-jenkins/python-jenkins-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM Based on https://review.opendev.org/c/jjb/python-jenkins/+/953273
|
||||||
|
Patch0: python-python-jenkins-no-mock.patch
|
||||||
|
# PATCH-FIX-UPSTREAM Based on https://opendev.org/jjb/python-jenkins/commit/63b657fe23c3b33903061a17b88787886be3c6dd
|
||||||
|
Patch1: remove-six.patch
|
||||||
|
BuildRequires: %{python_module cmd2}
|
||||||
|
BuildRequires: %{python_module multi_key_dict}
|
||||||
|
BuildRequires: %{python_module multiprocess}
|
||||||
|
BuildRequires: %{python_module pbr >= 0.8.2}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
|
BuildRequires: %{python_module requests-mock >= 1.11}
|
||||||
|
BuildRequires: %{python_module requests}
|
||||||
|
BuildRequires: %{python_module testscenarios}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: openssl-devel
|
||||||
|
BuildRequires: pkgconfig
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
|
BuildRequires: pkgconfig(krb5-gssapi)
|
||||||
|
Requires: python-multi_key_dict
|
||||||
|
Requires: python-pbr
|
||||||
|
Requires: python-requests
|
||||||
|
Provides: python-jenkins = %{version}
|
||||||
|
Obsoletes: python-jenkins < %{version}
|
||||||
|
BuildArch: noarch
|
||||||
|
%python_subpackages
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package provides Python bindings for the Jenkins Remote
|
||||||
|
API. It currently supports management of:
|
||||||
|
* Project configuration
|
||||||
|
* Build control
|
||||||
|
* Slave node configuration
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1 -n python-jenkins-%{version}
|
||||||
|
|
||||||
|
sed -i '1{\@^#!%{_bindir}/env python@d}' jenkins/__init__.py
|
||||||
|
|
||||||
|
%build
|
||||||
|
%pyproject_wheel
|
||||||
|
|
||||||
|
%install
|
||||||
|
%pyproject_install
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
|
%check
|
||||||
|
%pyunittest discover -v tests
|
||||||
|
|
||||||
|
%files %{python_files}
|
||||||
|
%license COPYING
|
||||||
|
%doc README.rst
|
||||||
|
%{python_sitelib}/jenkins
|
||||||
|
%{python_sitelib}/python_jenkins-%{version}.dist-info
|
||||||
|
|
||||||
|
%changelog
|
197
remove-six.patch
Normal file
197
remove-six.patch
Normal file
@@ -0,0 +1,197 @@
|
|||||||
|
From 63b657fe23c3b33903061a17b88787886be3c6dd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexandre Detiste <alexandre.detiste@gmail.com>
|
||||||
|
Date: Sat, 11 Jan 2025 14:55:46 +0100
|
||||||
|
Subject: [PATCH] remove Python2 & six
|
||||||
|
|
||||||
|
Change-Id: I4b64b01d607446a7aa8cbe2070b97717ed6267b5
|
||||||
|
---
|
||||||
|
jenkins/__init__.py | 6 +++---
|
||||||
|
requirements.txt | 1 -
|
||||||
|
setup.cfg | 8 +++++---
|
||||||
|
test-requirements.txt | 1 -
|
||||||
|
tests/base.py | 9 ++-------
|
||||||
|
tests/helper.py | 4 ++--
|
||||||
|
tests/jobs/test_build.py | 4 ++--
|
||||||
|
tests/test_jenkins.py | 11 +++++------
|
||||||
|
tests/test_jenkins_sockets.py | 3 ++-
|
||||||
|
tests/test_promotion.py | 5 ++---
|
||||||
|
10 files changed, 23 insertions(+), 29 deletions(-)
|
||||||
|
|
||||||
|
Index: python-jenkins-1.8.2/jenkins/__init__.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/jenkins/__init__.py
|
||||||
|
+++ python-jenkins-1.8.2/jenkins/__init__.py
|
||||||
|
@@ -59,9 +59,9 @@ import requests
|
||||||
|
import requests.exceptions as req_exc
|
||||||
|
import urllib3.util.timeout
|
||||||
|
from requests.packages.urllib3.exceptions import InsecureRequestWarning
|
||||||
|
-from six.moves.http_client import BadStatusLine
|
||||||
|
-from six.moves.urllib.error import URLError
|
||||||
|
-from six.moves.urllib.parse import quote, urlencode, urljoin, urlparse
|
||||||
|
+from http.client import BadStatusLine
|
||||||
|
+from urllib.error import URLError
|
||||||
|
+from urllib.parse import quote, urlencode, urljoin, urlparse
|
||||||
|
import xml.etree.ElementTree as ET
|
||||||
|
|
||||||
|
from jenkins import plugins
|
||||||
|
Index: python-jenkins-1.8.2/requirements.txt
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/requirements.txt
|
||||||
|
+++ python-jenkins-1.8.2/requirements.txt
|
||||||
|
@@ -1,4 +1,3 @@
|
||||||
|
-six>=1.3.0
|
||||||
|
pbr>=0.8.2
|
||||||
|
multi_key_dict
|
||||||
|
requests
|
||||||
|
Index: python-jenkins-1.8.2/setup.cfg
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/setup.cfg
|
||||||
|
+++ python-jenkins-1.8.2/setup.cfg
|
||||||
|
@@ -19,12 +19,14 @@ classifier =
|
||||||
|
License :: OSI Approved :: BSD License
|
||||||
|
Operating System :: OS Independent
|
||||||
|
Programming Language :: Python
|
||||||
|
- Programming Language :: Python :: 2
|
||||||
|
- Programming Language :: Python :: 2.7
|
||||||
|
Programming Language :: Python :: 3
|
||||||
|
- Programming Language :: Python :: 3.4
|
||||||
|
Programming Language :: Python :: 3.5
|
||||||
|
Programming Language :: Python :: 3.6
|
||||||
|
+ Programming Language :: Python :: 3.7
|
||||||
|
+ Programming Language :: Python :: 3.8
|
||||||
|
+ Programming Language :: Python :: 3.9
|
||||||
|
+ Programming Language :: Python :: 3.10
|
||||||
|
+ Programming Language :: Python :: 3.11
|
||||||
|
|
||||||
|
[files]
|
||||||
|
packages =
|
||||||
|
Index: python-jenkins-1.8.2/test-requirements.txt
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/test-requirements.txt
|
||||||
|
+++ python-jenkins-1.8.2/test-requirements.txt
|
||||||
|
@@ -1,7 +1,6 @@
|
||||||
|
cmd2!=0.8.3,<0.9.0;python_version<'3.0' # MIT
|
||||||
|
cmd2!=0.8.3;python_version>='3.0' # MIT
|
||||||
|
coverage>=3.6
|
||||||
|
-unittest2
|
||||||
|
python-subunit
|
||||||
|
requests-mock>=1.11.0
|
||||||
|
requests-kerberos<=0.12.0;python_version<'3.6'
|
||||||
|
Index: python-jenkins-1.8.2/tests/base.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/base.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/base.py
|
||||||
|
@@ -1,15 +1,10 @@
|
||||||
|
-import sys
|
||||||
|
+import unittest
|
||||||
|
+from unittest import mock
|
||||||
|
|
||||||
|
-import mock
|
||||||
|
from testscenarios import TestWithScenarios
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
|
||||||
|
-if sys.version_info < (2, 7):
|
||||||
|
- import unittest2 as unittest
|
||||||
|
-else:
|
||||||
|
- import unittest
|
||||||
|
-
|
||||||
|
|
||||||
|
class JenkinsTestBase(TestWithScenarios, unittest.TestCase):
|
||||||
|
|
||||||
|
Index: python-jenkins-1.8.2/tests/helper.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/helper.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/helper.py
|
||||||
|
@@ -2,11 +2,11 @@ import functools
|
||||||
|
import json
|
||||||
|
from multiprocess import Process
|
||||||
|
from multiprocess import Queue
|
||||||
|
+import socketserver
|
||||||
|
import traceback
|
||||||
|
+from unittest.mock import Mock
|
||||||
|
|
||||||
|
-from mock import Mock
|
||||||
|
import requests
|
||||||
|
-from six.moves import socketserver
|
||||||
|
|
||||||
|
|
||||||
|
class TestsTimeoutException(Exception):
|
||||||
|
Index: python-jenkins-1.8.2/tests/jobs/test_build.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/jobs/test_build.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/jobs/test_build.py
|
||||||
|
@@ -1,8 +1,8 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
+from urllib.parse import quote
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
-from six.moves.urllib.parse import quote
|
||||||
|
from tests.helper import build_response_mock
|
||||||
|
from tests.jobs.base import JenkinsJobsTestBase
|
||||||
|
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_jenkins.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_jenkins.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_jenkins.py
|
||||||
|
@@ -1,7 +1,6 @@
|
||||||
|
import json
|
||||||
|
-
|
||||||
|
-from mock import patch
|
||||||
|
-import six
|
||||||
|
+import io
|
||||||
|
+from unittest.mock import patch
|
||||||
|
|
||||||
|
from tests.base import JenkinsTestBase
|
||||||
|
from tests.helper import build_response_mock
|
||||||
|
@@ -12,7 +11,7 @@ import jenkins
|
||||||
|
def get_mock_urlopen_return_value(a_dict=None):
|
||||||
|
if a_dict is None:
|
||||||
|
a_dict = {}
|
||||||
|
- return six.BytesIO(json.dumps(a_dict).encode('utf-8'))
|
||||||
|
+ return io.BytesIO(json.dumps(a_dict).encode('utf-8'))
|
||||||
|
|
||||||
|
|
||||||
|
class JenkinsConstructorTest(JenkinsTestBase):
|
||||||
|
@@ -45,8 +44,8 @@ class JenkinsConstructorTest(JenkinsTest
|
||||||
|
|
||||||
|
def test_unicode_password(self):
|
||||||
|
j = jenkins.Jenkins('{0}'.format(self.base_url),
|
||||||
|
- six.u('nonascii'),
|
||||||
|
- six.u('\xe9\u20ac'))
|
||||||
|
+ 'nonascii',
|
||||||
|
+ '\xe9\u20ac')
|
||||||
|
j._maybe_add_auth()
|
||||||
|
self.assertEqual(j.server, self.make_url(''))
|
||||||
|
self.assertEqual(j.auth(self.req).headers['Authorization'],
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_jenkins_sockets.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_jenkins_sockets.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_jenkins_sockets.py
|
||||||
|
@@ -1,4 +1,5 @@
|
||||||
|
-from six.moves import StringIO
|
||||||
|
+from io import StringIO
|
||||||
|
+
|
||||||
|
import testtools
|
||||||
|
from testtools.content import text_content
|
||||||
|
|
||||||
|
Index: python-jenkins-1.8.2/tests/test_promotion.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.2.orig/tests/test_promotion.py
|
||||||
|
+++ python-jenkins-1.8.2/tests/test_promotion.py
|
||||||
|
@@ -1,11 +1,10 @@
|
||||||
|
import json
|
||||||
|
-from mock import patch
|
||||||
|
+from unittest.mock import patch
|
||||||
|
+from urllib.error import HTTPError
|
||||||
|
|
||||||
|
import jenkins
|
||||||
|
from tests.base import JenkinsTestBase
|
||||||
|
|
||||||
|
-from six.moves.urllib.error import HTTPError
|
||||||
|
-
|
||||||
|
|
||||||
|
class JenkinsPromotionsTestBase(JenkinsTestBase):
|
||||||
|
config_xml = """<hudson.plugins.promoted__builds.PromotionProcess>
|
107
use-parts-of-legacy-version.patch
Normal file
107
use-parts-of-legacy-version.patch
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
Index: python-jenkins-1.8.0/jenkins/plugins.py
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.0.orig/jenkins/plugins.py
|
||||||
|
+++ python-jenkins-1.8.0/jenkins/plugins.py
|
||||||
|
@@ -41,8 +41,7 @@
|
||||||
|
|
||||||
|
import operator
|
||||||
|
import re
|
||||||
|
-
|
||||||
|
-import pkg_resources
|
||||||
|
+from typing import Iterator, Tuple
|
||||||
|
|
||||||
|
|
||||||
|
class Plugin(dict):
|
||||||
|
@@ -67,6 +66,63 @@ class Plugin(dict):
|
||||||
|
super(Plugin, self).__setitem__(key, value)
|
||||||
|
|
||||||
|
|
||||||
|
+# Portion of code from packaging module, dual licensed under the terms of
|
||||||
|
+# the Apache License, Version 2.0, and the BSD License.
|
||||||
|
+_legacy_version_component_re = re.compile(r"(\d+ | [a-z]+ | \.| -)", re.VERBOSE)
|
||||||
|
+
|
||||||
|
+_legacy_version_replacement_map = {
|
||||||
|
+ "pre": "c",
|
||||||
|
+ "preview": "c",
|
||||||
|
+ "-": "final-",
|
||||||
|
+ "rc": "c",
|
||||||
|
+ "dev": "@",
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+def _parse_version_parts(s: str) -> Iterator[str]:
|
||||||
|
+ for part in _legacy_version_component_re.split(s):
|
||||||
|
+ part = _legacy_version_replacement_map.get(part, part)
|
||||||
|
+
|
||||||
|
+ if not part or part == ".":
|
||||||
|
+ continue
|
||||||
|
+
|
||||||
|
+ if part[:1] in "0123456789":
|
||||||
|
+ # pad for numeric comparison
|
||||||
|
+ yield part.zfill(8)
|
||||||
|
+ else:
|
||||||
|
+ yield "*" + part
|
||||||
|
+
|
||||||
|
+ # ensure that alpha/beta/candidate are before final
|
||||||
|
+ yield "*final"
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+def _legacy_cmpkey(version: str) -> Tuple[int, Tuple[str, ...]]:
|
||||||
|
+
|
||||||
|
+ # We hardcode an epoch of -1 here. A PEP 440 version can only have a epoch
|
||||||
|
+ # greater than or equal to 0. This will effectively put the LegacyVersion,
|
||||||
|
+ # which uses the defacto standard originally implemented by setuptools,
|
||||||
|
+ # as before all PEP 440 versions.
|
||||||
|
+ epoch = -1
|
||||||
|
+
|
||||||
|
+ # This scheme is taken from pkg_resources.parse_version setuptools prior to
|
||||||
|
+ # it's adoption of the packaging library.
|
||||||
|
+ parts: List[str] = []
|
||||||
|
+ for part in _parse_version_parts(version.lower()):
|
||||||
|
+ if part.startswith("*"):
|
||||||
|
+ # remove "-" before a prerelease tag
|
||||||
|
+ if part < "*final":
|
||||||
|
+ while parts and parts[-1] == "*final-":
|
||||||
|
+ parts.pop()
|
||||||
|
+
|
||||||
|
+ # remove trailing zeros from each series of numeric parts
|
||||||
|
+ while parts and parts[-1] == "00000000":
|
||||||
|
+ parts.pop()
|
||||||
|
+
|
||||||
|
+ parts.append(part)
|
||||||
|
+
|
||||||
|
+ return epoch, tuple(parts)
|
||||||
|
+
|
||||||
|
+
|
||||||
|
class PluginVersion(str):
|
||||||
|
'''Class providing comparison capabilities for plugin versions.'''
|
||||||
|
|
||||||
|
@@ -76,15 +132,14 @@ class PluginVersion(str):
|
||||||
|
'''Parse plugin version and store it for comparison.'''
|
||||||
|
|
||||||
|
self._version = version
|
||||||
|
- self.parsed_version = pkg_resources.parse_version(
|
||||||
|
- self.__convert_version(version))
|
||||||
|
+ self.parsed_version = _legacy_cmpkey(self.__convert_version(version))
|
||||||
|
|
||||||
|
def __convert_version(self, version):
|
||||||
|
return self._VERSION_RE.sub(r'\g<1>.preview', str(version))
|
||||||
|
|
||||||
|
def __compare(self, op, version):
|
||||||
|
- return op(self.parsed_version, pkg_resources.parse_version(
|
||||||
|
- self.__convert_version(version)))
|
||||||
|
+ return op(self.parsed_version,
|
||||||
|
+ _legacy_cmpkey(self.__convert_version(version)))
|
||||||
|
|
||||||
|
def __le__(self, version):
|
||||||
|
return self.__compare(operator.le, version)
|
||||||
|
Index: python-jenkins-1.8.0/requirements.txt
|
||||||
|
===================================================================
|
||||||
|
--- python-jenkins-1.8.0.orig/requirements.txt
|
||||||
|
+++ python-jenkins-1.8.0/requirements.txt
|
||||||
|
@@ -1,5 +1,3 @@
|
||||||
|
-# Setuptools removed support for PEP 440 non-conforming versions
|
||||||
|
-setuptools<66
|
||||||
|
six>=1.3.0
|
||||||
|
pbr>=0.8.2
|
||||||
|
multi_key_dict
|
Reference in New Issue
Block a user