80 Commits

Author SHA1 Message Date
Tim Burke
3264fd6cfd Drop *_proxy from passenv
For tox 3.x and earlier, passenv was a space-separated list; as of tox
4.0.0, it's comma-separated. For a while, our spaces would be silently
included in the now-one-and-only passenv value parsed (which wasn't
great, but mostly just caused confusion) -- as of tox 4.0.6, however, it
became a hard error, and all tests would fail like

  pass_env values cannot contain whitespace, use comma to have multiple
  values in a single line, invalid values found 'SWIFT_* *_proxy'

Unfortunately, we don't really know what versions of tox all our various
stakeholders might want/need to use (though we currently set a
minversion of 3.18.0), and (to my knowledge) there's no way to specify
multiple values for passenv in a way that would be compatible with both
old and new tox.

Fortunately, as of 3.14.4, tox include HTTP_PROXY, HTTPS_PROXY, and
NO_PROXY in passenv by default. I'm fairly certain those were the only
reason we had *_proxy to begin with, so just drop it.

Change-Id: I8ddfbc6376434c39e231846135a99bd0bdca9497
2023-01-05 16:58:36 -08: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
wu.shiming
b846071d2f Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I244d98bb3fc7cb75624b598f4d26f784159f5428
2021-07-06 16:15:55 +08:00
Tim Burke
abda44a87d Use upper-constraints for docs jobs
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
2021-05-25 12:20:23 -07:00
zhangboye
998bb8b578 Use py3 as the default runtime for tox
Moving on py3 as the default runtime for tox to avoid to update
this at each new cycle.

Change-Id: I4a54455e7e8b1b4de2f9656d13f65ef090da68eb
2021-04-20 15:11:06 +08:00
Tim Burke
06b36ae0e2 Drop lower-constraints testing
The OpenStack community consensus seems to be that it's not worth the
hassle of fixing. *Maybe* we can revisit this if we ever drop py2
support?

Reasonable spot to start on ML threads:
http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019672.html

Change-Id: Ibf0c891782afe014cc453b713a94c187340d172e
Depends-On: https://review.opendev.org/c/openstack/requirements/+/777025
2021-02-22 16:05:25 -08:00
Sean McGinnis
e44ca6d8af
Bump default tox env from py37 to py38
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.

This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.

Change-Id: I7bc7d7a49de746cc8fdb58a44619bc5ce66b7003
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:58 -05:00
Andreas Jaeger
bb3888e73e Update docs building
Update docs building:
* Switch to sphinx-build
* Update requirements for Sphinx and openstackdocstheme for
  python 3
* Remove unneeded doc and translation sections from setup.cfg
* Remove install_command, it's unneeded, the default is fine.

Change-Id: Ib9fe754b700bceb164ba0f596cbcc6d864ccbadc
2020-04-19 09:57:27 +02:00
Andreas Jaeger
f9f2090a02 Drop pypy testing
The pypy job is always failing, drop it.

Change-Id: Ibc80d23846b364bfcd82043430ef71ad4b6e271b
2020-04-12 20:41:23 +02:00
Tim Burke
1eda8f9f3e Rename "tests" directory to be "test" like in the swift repo
In addition to being less confusing for devs, this lets us actually run
tempauth tests in swiftclient dsvm jobs.

The job definition (over in the swift repo) specifies test/sample.conf,
which does not exist in this repo. As a result, those tests would skip
with

    SKIPPING FUNCTIONAL TESTS DUE TO NO CONFIG

Change-Id: I558dbf9a657d442e6e19468e543bbec855129eeb
2019-11-06 03:48:02 +00:00
Matthew Oliver
14095c109f PDF Documentation Build tox target
This patch adds a `pdf-docs` tox target that will build
PDF versions of our docs. As per the Train community goal:

  https://governance.openstack.org/tc/goals/selected/train/pdf-doc-generation.html

Story: 2006122
Task: 35514
Change-Id: I7e0ee410ac603774e4b03f859ac3aa20e5afc9b8
2019-09-04 11:29:37 -07:00
Corey Bryant
efe3d084de Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: I764b9765484e1d8217d56796d984f910aa5f9c5a
Story: #2005924
Task: #34249
2019-07-05 16:22:32 -04:00
Tim Burke
3b21157a84 Clean up warnings from newer flake8
Change-Id: I18a6327b3acdd4db5ae80097080c043f7c20c353
2019-06-27 21:43:46 -07:00
Tim Burke
113eacf3b8 Isolate docs requirements
...since modern sphinx won't install on py27.

While we're at it, clean up some warnings and treat warnings as errors.

Also, fix up how we parse test configs so we can run func tests.

Related-Change: Id3c2ed87230c5918c18e2c01d086df8157f036b1
Change-Id: I3718f69610545b0dbcb0a2ab45b400da3a45682c
2019-06-27 16:48:33 -07:00
Zuul
e325ed7f9e Merge "Enable some off-by-default checks" 2019-03-30 07:17:20 +00:00
Zuul
b62d378836 Merge "Make proper functions instead of assigning lambdas" 2019-03-30 03:34:49 +00:00
Tim Burke
d32deaaddd Add py37 check/gate jobs; add py37 to default tox env list
Change-Id: Ifbc6dc731df20b4bba905a110e71ea5c9cc52c0f
2019-02-27 11:11:12 -08:00
Zuul
b8c863e6bb Merge "Update hacking version" 2019-02-22 02:45:59 +00:00
wangzhenyu
fd6e76029d Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None

Change-Id: I36a6997fdb806b4d0a9d064107cc1451c766c987
2019-02-21 09:31:09 -08:00
Tim Burke
0ee7c8272e Make proper functions instead of assigning lambdas
Change-Id: I89255f6923c649c7b9d3d36e96c09f8bc4f51a3c
2019-02-21 09:26:32 -08:00
Zuul
4b99492dc5 Merge "Add python 3.6 unit test job" 2019-02-14 04:11:09 +00:00
ZhijunWei
2ff36fde57 Update hacking version
1. update hacking version to latest
2. fix pep8 failed

Change-Id: Ifc3bfeff4038c93d8c8cf2c9d7814c3003e73504
2019-01-03 13:09:22 +08:00
Zuul
2d8836333b Merge "Update reno for stable/rocky" 2018-11-09 23:18:15 +00:00
0197a0f9ca Update reno for stable/rocky
Change-Id: I840f4363dfdb3b485dbaf768c71fbcc5227c330f
2018-11-09 10:24:47 -08:00
Nguyen Hai Truong
5e988c5cde Add python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: Iae4acab507e45a379c8af129912e13621a2a553b
2018-11-06 23:17:30 +07:00
Vu Cong Tuan
9acdfe0b46 Switch to stestr
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: Ic098f8560599554e0b6bb16ae326d4d30a8a5504
2018-11-05 09:52:03 +07:00
John Dickinson
a6baf00e24 py2 functional testing
Change-Id: I24ff8fb28969a0b074313bc9491b299afac3b49c
2018-09-27 13:28:05 -07:00
Doug Hellmann
37ee6459cd fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I86d24104033b490a35178fc504d88c1e4a566628
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-05 05:46:52 +00: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
Zuul
5910de3efa Merge "Remove trailing white space in tox.ini" 2018-04-12 22:31:11 +00:00
Kota Tsuyuzaki
046e04a7a4 Remove trailing white space in tox.ini
Change-Id: I706b69b7230390234ab255682478e8f69261cafe
2018-04-12 17:37:01 +09:00
Nguyen Hai
5f23f9a702 Remove py34 from envlist in tox.ini
py35 is enough.

Change-Id: Iebd7a6741dd60ed2fb11d1758bfec8e03e30a086
2018-04-06 07:27:24 +00:00
Tim Burke
a9b8f0a0d1 Revert "Add Constraints support"
Per http://lists.openstack.org/pipermail/openstack-dev/2017-December/125348.html

> For many projects, tox_install.sh is not needed at all

Let's see if that holds for python-swiftclient!

This reverts commit f2f278fcbec3ad52a1726bb5a3f775d13bcc99dc.

Change-Id: I0462c50ec71d87bac226f83a0d0942871ef5a0e7
2018-01-17 11:13:59 -08:00
Tim Burke
cb2778659e Make tox runnable in a directory with spaces
I noticed a disturbing lack of quote-wrapping in change
I7cb4b44952713752435e1faf0f63bf0d37e7dda6 but as I poked at it, I
realized that trouble runs rampant.

This seems to clean it all up, though I haven't tested *every*
environment we define.

Change-Id: I1454eb113e5bd9125d39f2e57e2ed96f6ddc42fc
2017-11-28 11:02:45 -08:00
Monty Taylor
ae2dfaec36 Update tox_install.sh to align for sphinx jobs
The updates to the sphinx docs jobs in support of the updates to
the PTI wound up exposing an unintended interface. There are two flavors
of the tox_install.sh file out there, and we basically need to collapse
them into one flavor.

Update the tox_install.sh script to match the
constraints-as-first-argument form.

Change-Id: I7cb4b44952713752435e1faf0f63bf0d37e7dda6
2017-11-22 15:19:17 +00:00
Tim Burke
ed0858a4e4 Add releasenotes tox env
After this, we need to

* add release notes jobs for python-swiftclient in openstack-infra/project-config
* add release notes links for python-swiftclient in openstack/releases

For the corresponding change in the swift repo, see
I4e5f1ce1fcfbb2943036c821a24a0b4a3a2d9fc8

Change-Id: Iea6ed2ee26873edb3ef10146cdc906cf1a236255
2017-08-08 22:03:59 +00:00
Tony Breeds
f2f278fcbe Add Constraints support
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.

This change adds constraints support by also adding a helper script to
edit the constraints to remove python-swiftclient.

Change-Id: I3947a6165eaa9f5cb62a7df4f5a2c16065da2f1d
2016-12-27 15:47:18 -08:00
Jenkins
41de8b7c0b Merge "Enable code coverage report in console output" 2016-11-04 22:51:17 +00:00
shashi.kant
432df97c3a Enable code coverage report in console output
Modified swift-client tox.ini configuration to enable code coverage
report in console output.

Change-Id: I60276d6a87c62f4a112b01d97ab35a545d4e5462
2016-10-19 17:57:51 +05:30
John Dickinson
46937f8620 add pypy to the bindep "test" profile
According to the bindep docs
(http://docs.openstack.org/infra/bindep/readme.html#profiles),
we can specify profiles for each entry listed.

Also added a bindep env to tox.ini.

Change-Id: Ifb59d3ef2934c3d72ba84b337c38bb7eb14774bb
2016-09-23 13:21:58 -07:00
Tim Burke
52eab61e7e Move python-keystoneclient to "extras"
This should make it more clear to users that they may want to install
it.

Change-Id: I8bb4f3eba1fc6d2b7b23c3bd51663678e755a69e
2016-03-07 11:21:33 -08:00
Jenkins
b65d994937 Merge "Drop *.dbm* before running tests" 2016-03-04 17:40:37 +00:00
Jenkins
343ecbcfa2 Merge "Drop py33 support" 2016-03-03 04:38:28 +00:00
Pete Zaitcev
f179c36aea Drop *.dbm* before running tests
See change I74fb5122e80a223aaa70afaeec7a7c585aa33577 for the
previous discussion. But basically, if you run tox -e py27
then tox -e py34, the latter fails with "db type could not
be determined", because of stuck .testrepository/times.dbm.

This patch fixes it by clearing the *.dbm*. Should be safe
as long as periods aren't used commonly in stable file names.

Change-Id: I617eca308261f291c510c8cbd432779f1c00b182
2016-03-02 08:59:59 -07:00
Paul Belanger
adc3177d1f Have tox manage LANG environmental var
We need to do this because some of the py34 testing that
python-swiftclient uses depends on this variable.  The reason we don't
see the issue in the gate, is because current bare-trusty images have
this set on the jenkins shell user.

When we move to just using DIBs, the variable won't be setup by
default and python3 tests will fail.

For more information:
  https://review.openstack.org/282898

Change-Id: Id9017f31b0543bccac9c07b83237b909e2bd2b0c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-02-24 14:45:16 -05:00
shu-mutou
f95de16875 Drop py33 support
"Python 3.3 support is being dropped since OpenStack Liberty."
written in following URL.
https://wiki.openstack.org/wiki/Python3

And already the infra team and the oslo team are dropping py33
support from their projects.

Since we rely on oslo for a lot of our work, and depend on infra
for our CI, we should drop py33 support too.

Change-Id: Ia8f2b26e446175b0d892a11952ef3dc11dcdc73c
Closes-Bug: #1526170
2016-02-23 00:19:56 +00:00
Jenkins
b558f0b143 Merge "Deprecated tox -downloadcache option removed" 2015-12-15 09:13:09 +00:00
Jenkins
6cdf470e18 Merge "Delete python bytecode before every test run" 2015-12-15 03:25:23 +00:00
shu-mutou
6bb97044c2 Delete python bytecode before every test run
Because python creates pyc|pyo files and __pycache__
directories during tox runs, certain changes in the tree,
like deletes of files, or switching branches, can create
spurious errors.

Change-Id: Ibaac514521bab11bbf552e0310d1203230c0d984
Closes-Bug: #1368661
2015-12-14 13:59:22 +09:00
Ondřej Nový
7c78c7bc2e Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: I95015c79049633ed97714d6de8dd8f231bd15a03
2015-12-11 21:26:38 +01:00