Adjust some of the dependencies.
multi_key_dict is not shipped by OpenStack Zuul templates
`build-openstack-docs-pti` or `openstack-cover-jobs` we thus need to
depend on `requirements.txt`.
setuptools v66.0.0 removed support for PEP 440 non-conforming versions.
It provides pkg_resources which we use in PluginVersion.
Tox `whitelist_externals` has been renamed `allowlist_externals`.
Signed-off-by: Antoine Musso <hashar@free.fr>
Change-Id: Ie791c2bb0e7b3784913f45768d2f3db4c66ccae5
stestr 3.0.0 does not support python 2.7 but has been released without
the proper metadata to reflect that. As a result, there is a python2 wheel
stestr-3.0.0-py2-none-any.whl which get picked up.
Blacklist stestr 3.0.0 to fix '--list': no such option error
Drop pypy testing since pypy jobs are always failling.
Signed-off-by: Antoine Musso <hashar@free.fr>
Signed-off-by: Andreas Jaeger <aj@suse.com>
Change-Id: Ia2f7c814f21c78f29ec9024997469625f92bc401
The repo uses docs-on-read-the-docs, remove extra
build-openstack-sphinx gate job.
Without this change, two docs jobs would be building in gate, tox-docs
and build-sphinx. One is enough.
Also, use templates instead of individual jobs.
Import other templates from project-config, use the failing docs
template since readthedocs is not setup yet.
Remove publish-to-pypi, this should stay in project-config.
Fix sphinx requirements for python 3.
Fix decoding in failing test.
Change-Id: Ic4f715b45c1284ea49339e96c2aa87b2e81fcbea
The cmd2-0.9.0 is python3-only. Let's freeze the cmd2<0.9.0 as
recommended in https://pypi.org/project/cmd2/ while allowing any newer version on python 3+.
Change-Id: I5e631603e162da1d93347f954c9bc1af3f69597c
The test for kerberos was dropped in
34cca0c4d9, as it was not needed for the
simpler implementation with requests. Let's drop the requests-kerberos
from test dependencies as well, as it has only caused troubles in other
tests - at least for me.
One had to set jenkins.requests_kerberos to None, as was done in the
tests.base.JenkinsTestBase. In places where it was not set to None, the
jenkins.Jenkins.jenkins_open tried the kerberos authentication in
addition to anonymous authentication on the /api/json endpoint.
This was the case for
tests.test_jenkins_sockets.JenkinsRequestTimeoutTests.test_jenkins_open_timeout
where it has resulted in a different exception than was expected:
Traceback (most recent call last):
File "tests/test_jenkins_sockets.py", line 31, in test_jenkins_open_timeout
j.jenkins_open(request, add_crumb=False)
File "jenkins/__init__.py", line 533, in jenkins_open
return self.jenkins_request(req, add_crumb, resolve_auth).text
File "jenkins/__init__.py", line 547, in jenkins_request
self._maybe_add_auth()
File "jenkins/__init__.py", line 384, in _maybe_add_auth
% '\n'.join(failures))
jenkins.JenkinsException: Unable to authenticate with any scheme:
auth(kerberos) Error in request: HTTPConnectionPool(host='127.0.0.1', port=33921): Read timed out. (read timeout=0.1)
auth(anonymous) Error in request: HTTPConnectionPool(host='127.0.0.1', port=33921): Read timed out. (read timeout=0.1)
Change-Id: I45cbb3a666ee6a9ecbe628ca8b7f0b07dcfcb0eb
Switch to use stestr which is maintained as opposed
to testrepository (testr) which became a defunct project.
Change-Id: If53c985b6cf3b4122596f09ec4d0ec4a186688b8
Convert to the requests library to allow for more sophisticated response
handling to be added.
Want to allow for applications to override the response handling in
certain cases where the default is incorrect. Handling of urlopen
responses results in version specific handling to ensure correct
behaviour across multiple versions of python.
Changing to use the requests package, provides a higher level interface
and removes some of the version specific handling for exceptions.
Change-Id: I5369a0d35be4bf8b3b197a51e60aba21b5742cc7
Depends-On: Iabd70aa457ceb4dbc147d7cbaeec913148cb3b56
Check if "kerberos" package can be imported at runtime
(in __init__.py). If not, everything works as before.
If "kerberos" package can be imported register a new
urllib handler (defined in urllib_kerb.py) which adds
support for kerberos auth.
This urllib handler (urllib_kerb.py) is only triggered
on 401 (Unauthorized) response, and we try to auth
with kerberos. If unsuccessful, next 401 handler (if any)
is triggered.
Change-Id: I1a47e455aa14535a124df950994718a11d7e4f57
Add some common management and version comparison capabilities via
dedicated classes to simplify how calling libraries can perform version
checks on the installed plugins.
Update the comments on the existing methods to note that they return the
raw plugin data in JSON format instead of the parsed local objects.
Change-Id: If43bb945f55c6fb9f8a6595091eace12e4630ffa
This patch adds cloudbees folder plugin support. Folder should be
specified in job name : <folder>/<job>
This update also extend job_builder
(http://ci.openstack.org/jenkins-job-builder/) tool without any
modification.
Change-Id: I6d3957c217e1253e53152d90d5fcce5e69c77674
Co-Authored-By: Darragh Bailey <daragh.bailey@gmail.com>
Ensure process terminate is only called after checking whether the
process is still running so as not to accidentally set an exitcode.
Additionally include improved message exchange and capturing to allow
for easier debug should the expected exceptions not appear on socket
timeouts.
Change-Id: Ic51745ffa67570e9a3ca4574d2bfc54d0cd6724b
Pin mock to < 1.1 as newer versions no longer work on python 2.6.
Remove duplicate unittest2 for python 2.6 test env.
Adding warning to mark python 2.6 support as deprecated and intended to
be removed.
Testtools re-added the requirement for unittest2 so the separate
dependency for python 2.6 created a duplicate error that causes tox
to fail.
Change-Id: Ia79eeeb5d2432cf1025631a1722de5fb1babe2c9
This patch aims to pin pbr>=0.8.2,<2.0 instead of pbr>=0.8.2,<1.0.
To do that, we also need to update test-requirements.txt to pin hacking
to <0.11 (like in current Global OpenStack requirements).
We also need to ignore some hacking rules.
Some distros ship 1.0.1 so it conflicts with the version in
requirements.
Change-Id: I3620c5fe72e49e226f2f5d1e6c36179eb053f424
It seems like testtools requires unittest2 now so we need to add it to
the requirements.
Error I got when ran 'tox -epy27' in fresh env:
Running setup.py install for testtools
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/khaido/PycharmProjects/python-jenkins/.tox/py27/build/testtools/setup.py", line 10, in <module>
import testtools
File "testtools/__init__.py", line 69, in <module>
from testtools.testcase import (
File "testtools/testcase.py", line 28, in <module>
import unittest2 as unittest
ImportError: No module named unittest2
Complete output from command /Users/khaido/PycharmProjects/python-jenkins/.tox/py27/bin/python -c "import setuptools;__file__='/Users/khaido/PycharmProjects/python-jenkins/.tox/py27/build/testtools/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/5d/t1_1wr6n1_gg_jwnl8qx2fqm0000gn/T/pip-Lya9W8-record/install-record.txt --single-version-externally-managed --install-headers /Users/khaido/PycharmProjects/python-jenkins/.tox/py27/include/site/python2.7:
Traceback (most recent call last):
Change-Id: I060f0ff36cec915c86cfaf6277af89fb8d9ea58e
Six needs to be installed when python-jenkins is installed. By default
test-requirements are only installed when running tests. Six was listed
as a test-requirement so it was not installed when pip installing
python-jenkins. Make six a regular requirement so that it is installed
properly every time.
Change-Id: I2b7cb7e967b20ee0e06fe4c665f08c5932e524f2
Use tox configuration to expose linting and unit testing. Will let us
integrate them with OpenStack continuous integration infrastructure.
* updates .gitignore following the migration from bzr
* get rid of the old Makefile in favor of tox
* remove .pep8 file (that is now a [flake8] section in tox.ini)
* fix a few trivial pep8 errors (comments must start with '# ' and
modulo operator needs surrounding spaces) but ignore 'line too long
(E501)' for now.
* write module requirements in /test-requirements.txt. Discover is
needed for python 2.6.
* change the test command that cames from the Makefile so it works with
python 2.6
Change-Id: If58730d84315c0ea018a3757624d98bf2e1aeb3f