Commit Graph

10 Commits

Author SHA1 Message Date
Takashi Kajinami 14a188fa90 Remove unused test tools
These tools were added 9 years ago but has no longer been used recently
in favor of tox.

Change-Id: I105dc3eba7cbe54d68a5e576340f1b0ca4a35090
2023-11-16 01:09:09 +09:00
Takashi Kajinami b07dd1d2f8 Remove logic for Python <= 2.6
... because that old version is no longer supported.

Also the check_python_version method is removed by this change, because
the required python version is now enforced by setup.cfg.

Change-Id: Ie9c91adcb81a1a5dbca2587b6592a58d4cc91e4a
2022-07-17 00:47:15 +09:00
liyou01 5ff06df97f Remove Python 2 support
Python 2 has been deprecated for almost two years, and has not been
guaranteed to work with glance_store for a while. This patch removes all
traces of six, unicode strings and Python 2 tweaks.

Co-Authored-By: Cyril Roelandt <cyril@redhat.com>
Change-Id: Ifa78924d7ecf4f2d9a54c677888ab2926530c487
2022-05-25 04:42:06 +02:00
Hervé Beraud 3d476079a4 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I9dcb02f5417c0f1d0ffce94267953a426252a56b
2020-06-02 20:14:52 +02:00
Andreas Jaeger 279ea4766e Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Remove hacking and friends from lower-constraints, they are not needed
for installation.

Change-Id: I99b8b24f714858f6b289e5e7b5976e519bb81c11
2020-04-02 15:26:13 +02:00
Paul Belanger d0657add82
Remove tox_install.sh
Fully removing tox_install.sh as it is no longer needed with zuulv3.

Closes-bug: #1766500
Change-Id: Ic332b54bd5fbc64efc23f1118a8416291ae65df8
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-04-24 14:25:28 -04:00
Andreas Jaeger 3795c3fe35 Improve tools/tox_install.sh
Inspired from the tox_install script in the python-openstackclient, this
commit brings in the following improvements to glance_store's
tools/tox_install.sh:

* Do not leave temporary directory around, instead delete temporary
  directory directly after usage (change
  I939eae82dba3287fd4e4086128ebf4609a0e0770).
* Do not set ZUUL_BRANCH explicitely and remove unused if condition
  (change I0077c986a17d6bb92791474e03d1e77776e9382f).

Change-Id: I1dfa42eac22f3f9515d69146a25c4f96e55523e4
2016-08-30 20:40:41 +02:00
yuyafei 19d8df31fd Replace dict.iterkeys with six.iterkeys to make PY3 compatible
Python3 do not use dict.iterkeys, which would raise AttributeError:
'dict' object has no attribute 'iterkeys'.

Change-Id: I97e320eac9f2f0b2cb5cf34a1d3fc57e80e440ed
Closes-Bug: #1596124
2016-06-28 11:54:43 +00:00
Nikhil Komawar ea4483c0bf tox respects upper-constraints.txt
This will force pip install to use the upper-constraints.txt specified
version of pip modules. When you don't do this, you are out on the
bleeding edge and become unstable everytime some python library in the
wide world changes in a way that you don't expect.

There are a few 'post' jobs as Andreas has mentioned on this review,
that have the install_command overridden (until that will be supported
in upstream infra).

This change has been inspired by
Ie1133e4c020106e8098685ba9125f84b356d8e0c , notes from jaegerandi in the
openstack/glance's tox.ini file and Ihar's python-neutronclient's fix
I33302cdcab980a42c39dc9ec1e430add459615ff

Change-Id: I1f8be8184683c9a3671f750ebaa87c38163c9795
Closes-Bug: 1563038
2016-06-03 11:59:23 -05:00
Brian D. Elliott 5bfe34f744 Add a run_tests.sh
An alternative to running tox, similar to other repos like glance and
nova.

Change-Id: I0dbab69dbfed2186b0c45036718081abed56d689
2014-09-17 16:05:17 +00:00