Commit Graph

14 Commits

Author SHA1 Message Date
Stephen Finucane fa137a5bf1 Remove six
This mostly affects tests. Nothing too complicated

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Iabc78f651e1d48db35638280722f8019798eccd6
2022-03-21 18:31:10 +00:00
Aarni Koskela c09621eb42 Don't patch Requests globally on import
This also upgrades the Requests dependency to 2.4+ (released in 2014)
to avoid having to do version comparisons altogether.

Refs https://bugs.launchpad.net/python-swiftclient/+bug/1904551

Signed-off-by: Aarni Koskela <akx@iki.fi>
Change-Id: I58399f6c526b0b78462f31739c43076314ba9e76
2022-03-21 08:05:54 -07:00
Stephen Finucane 2636965f38 Drop support for Python 2
There's a lot of cleanup possible, but this is a start.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ia1176b7fd5434d52070d482a37abfbb98800cdb3
2022-03-16 15:06:19 -07:00
Tim Burke 5cb9061487 Clean up some requirements
* Drop the py26 marker for futures; we don't support 2.6 anymore.
* Split hacking version used based on python version.
* Clean up sphinx split -- 2.0+ aren't available to install on py2,
  anyway.

Depends-On: https://review.opendev.org/#/c/752340/
Depends-On: https://review.opendev.org/#/c/752736/
Change-Id: I5a6ba8e65c23ada7297f6684dcbdd886591d0af5
2020-09-18 12:22:01 -07:00
Tim Burke da362a653e Back out some version bumps
I'm giving up on trying to back out all of the test-requirements
up-revs, but let's try to stay compatibile with old requests/six.

As part of that, only disable some requests warnings on new-enough requests.

Note that we should now be compatible with distro packages back to
Ubuntu 16.04 and CentOS 6. Our six is still too new for Trusty, but
hey, there's less than a year left on that anyway, right?

Change-Id: Iccb23638393616f9ec3da660dd5e39ea4ea94220
Related-Change: I2a8f465c8b08370517cbec857933b08fca94ca38
2018-07-11 13:09:00 -07:00
Doug Hellmann b5ed14f90a add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

Update the dependencies needed to make the unit tests pass while
constrained to the lower bounds.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Co-Authored-By: Nguyen Hai <nguyentrihai93@gmail.com>
Change-Id: I2a8f465c8b08370517cbec857933b08fca94ca38
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-25 09:33:54 -04:00
Claudiu Belu b3921b26e8 Installs futures only for python 2.7 and 2.6
The futures library is native to python 3 and it doesn't
have to be installed from pypi.

If the futures library is installed, it can cause issues when used.

Changes the futures' library requirement to match the one in
global requirements. [1]

[1] https://github.com/openstack/requirements/blob/master/global-requirements.txt

Change-Id: I8f13d63a303b71f7bdd8c3e67c15d0a0df5ea7a9
Closes-Bug: #1628107
2016-09-27 16:28:11 +00:00
Tim Burke 317df7e527 Remove simplejson dependency
In addition to removing an unnecessary dependency, this closes another
hole that was allowing raw bytes to appear in user-facing messages.

Change-Id: Ia0b76426a38e5a5c368c4c7e7ba2aef286758aca
2015-05-20 18:14:53 -07:00
Joel Wright 24673f8d19 Add importable SwiftService incorporating shell.py logic
This patch adds a SwiftService class that incorporates the high
level logic from swiftclient/shell.py. It also ports shell.py to
use the new class, and updates the code in swiftclient/multithreading.py
to allow the SwiftService to be used for multiple operations whilst
using only one thread pool.

Currently, code that imports swiftclient has to have its own logic for
things like creating large objects, parallel uploads, and parallel
downloads. This patch adds a SwiftService class that makes that
functionality available in Python code as well as through the shell.

Change-Id: I08c5796b4c01001d79fd571651c3017c16462ffd
Implements: blueprint bin-swift-logic-as-importable-library
2014-08-26 14:14:21 +02:00
Victor Stinner ac92c5cd7f Python 3: Add six dependency
Change-Id: I350eb089e02b4c33cf34c9fdb65289a2ad77f9c9
2014-03-28 09:25:11 +01:00
Tristan Cacqueray b182112719 Port to python-requests
Currently, httplib implementation does not support SSL certificate
verification. This patch fixes this. Note that ssl compression parameter
and 100-continue thing is still missing from requests, though those are
lower priority.

Requests now takes care of:
* proxy configuration (get_environ_proxies),
* chunked encoding (with data generator),
* bulk uploading (with files dictionary),
* SSL certificate verification (with 'insecure' and 'cacert' parameter).

This patch have been tested with requests 1.1.0 (CentOS 6) and requests
2.2.1 (current version).

Change-Id: Ib5de962f4102d57c71ad85fd81a615362ef175dc
Closes-Bug: #1199783
DocImpact
SecurityImpact
2014-02-12 13:21:26 +01:00
Samuel Merritt 7d61c54399 Make pbr only a build-time dependency.
This lets you build python-swiftclient packages that don't require pbr
to be installed at all. You would need pbr on the machine running
rpmbuild / debuild, but not on the machines that install the packages.

Unfortunately, this does not make python-swiftclient able to be
installed via pip 0.3.1 on Lucid; you'll need to uninstall the system
python-pip package and install a new pip some other way. Given that
pip < 1.3 doesn't perform SSL certificate validation for pypi (trivial
MITM attack, anyone?), you'd probably want to get a new pip anyway.

Change-Id: I85d4d77aacf094e48d39e48e750594b95dbc7af0
2013-10-10 11:57:47 -07:00
Monty Taylor 66e8c5a384 Sync with global requirements
Specifically, removing d2to1 is the important part. While we're at it
though, use hacking to get the pyflakes/pep8 pins.

Change-Id: Ic4a43955526fcde313ad2f2afec8fafeb87f37a6
2013-09-13 11:02:05 -05:00
niu-zglinux 2d12f09c66 Rename requires files to standard names.
Rename tools/pip-requires to requirements.txt and tools/test-requires
to test-requirements.txt. These are standard files, and tools in the
general world are growing intelligence about them.

Change-Id: I9c1356f22f6527be44b4b3f6a77012156ff1637b
Fixes: bug #1179008
2013-05-30 22:14:28 +00:00