Since Python 3.4, the unittest module has provided mock, negating the
need for the external dependancy. Switch to using unittest.mock.
Change-Id: Idec3aaed2fddd1ece3ed86ee0bcc48f7616d56fa
Connection class has timeout parameter but SwiftService and shell don't use it.
That can lead to an endless wait when network is unreachable.
Change-Id: Iafa42fc2f8b56feefa2bc8ea6a1b8845717d3bab
All strings are unicode by default in Python 3. No need to mark them as
such.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I68fb60ef271abfddebcc9d2137424f5db2a17e92
All classes subclass from object by default in Python 3.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I5a1ad57bcc092861ce969759b06a07c880ad3d35
This mostly affects tests. Nothing too complicated
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Iabc78f651e1d48db35638280722f8019798eccd6
These aren't needed in modern Python 3 versions.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I5e81d6fb2e2cb8e4bfae4ed746da002f44e871c4
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
There's a lot of cleanup possible, but this is a start.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ia1176b7fd5434d52070d482a37abfbb98800cdb3
It got busted somewhere between 2022-01-15 and 2022-02-11; looks like
needing to override devstack to install on bionic finally caught up with
us. ;-)
FWIW, it fails down in stack.sh while trying to pip install grpcio:
commands.CommandError: We expect a missing `_needs_stub` attribute
from older versions of setuptools. Consider upgrading setuptools.
Change-Id: Iff9094e9dd7a3d0bcdb0dee3b08fa5b61c9186d0
Add file to the reno documentation build to show release notes for
stable/yoga.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/yoga.
Sem-Ver: feature
Change-Id: I55d45e6f076974a3b44ab8b26adbccef26373f85
Previously, we would write out totals for every page of listings, like
$ swift list sync --prefix=09-21 --total -l
80000000000
80000000000
80000000000
58096000000
Now, roll those all into a single total:
$ swift list sync --prefix=09-21 --total -l
298096000000
Change-Id: Icc265636815220e33e8c9eec0a3ab80e9f899038
Add file to the reno documentation build to show release notes for
stable/xena.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.
Sem-Ver: feature
Change-Id: I79a7fbda1ea9ae034d009c54be4b401809183c42
Looks like there are some issues with too-new-Sphinx and the PDF docs
builds.
Also, get devstack installing on bionic again for our py2 func test job.
Change-Id: I633398054694fe6ba1e0de50278f274daf69fefd
You can run all tests by just running
$ pytest
Or just unit tests with
$ pytest test/unit/
Or one specific test with
$ pytest test/unit/test_swiftclient.py::TestConnection::test_reauth
Change-Id: I1dfa239f9ee9ea85663b5c1f22631a97f87b4dfc
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:
UserWarning: Usage of dash-separated 'description-file' will not be
supported in future versions. Please use the underscore name
'description_file' instead
[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb
Change-Id: Ief2c7a217914dc5cacdffc6959ed0585fc6a1225
Add file to the reno documentation build to show release notes for
stable/wallaby.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/wallaby.
Sem-Ver: feature
Change-Id: Idcc50c36c1fac81ed214bcbaf6a97307e3db7ee7
For a time, we wanted to flag it as being voting while it still wasn't
voting for most of OpenStack. It's not needed now, though.
Change-Id: Idccb731a0814335fc4d314eed5caa1f336212b22