Commit Graph

10 Commits

Author SHA1 Message Date
Clark Boylan 376c2ba0d0 Update lodgeit container image to Python3.11 on Bookworm
We update the upper bound in testing from python3.10 to python3.11 to
match. This will allow the opendev team to clean up old bullseye images
and look ahead to python3.12.

Change-Id: I5321b2e75b4cf50f9342efa13fd4ef37cf87e1e0
2023-10-09 13:40:43 -07:00
Clark Boylan cc2728f1a3 Drop python 3.6 testing
Python 3.6 is sufficiently old at this point that we don't need to keep
testing on it. This will reduce the number of things we need to tend and
care for with this application and service.

Change-Id: Iadea5270f54631ef72a68a37073fd8d337bc4c5c
2022-11-10 10:30:17 -08:00
Clark Boylan b4e0cae3a3 Update uwsgi image to python 3.10
OpenDev has stopped building python3.8 images at this point. This means
we need to update our Dockerfile to use a newer python version. In this
case python3.10 is chosen as it is newer but still easy to test on
Ubuntu. This will also update the version of uwsgi we are using.

Change-Id: I3eb4c580d854ebe0437114701d1b3f9c721e530e
2022-11-10 10:30:17 -08:00
Clark Boylan 9e2d54bb5a Modernize test suite
This modernizes the lodgeit testsuite to use stestr instead of nose. The
primary reason for this is nose is not python3.10 compatible and we
would like to use newer python with lodgeit.

Change-Id: I8ae480d22bbef0258afc9d6ffd6cd820993430a1
2022-11-10 10:30:15 -08:00
Ian Wienand 04da41ceda Drop Python 2.7 support
Drop the 2.7 tox job and add some Python 3 classifiers to setup.cfg

Change-Id: I83fcdd39cbfffada7b26ab784f7a907aeea0b5cd
2021-07-01 17:08:06 +10:00
Dmitriy Rabotyagov 2b0ca071f9 Add py3.8 support
Change-Id: I3d97ec43f84d00f8403a4ecf355a6d9b7c75d57e
2021-06-29 17:43:26 +10:00
Tristan Cacqueray 9b854e7729 Fix python3 compatibility issue
This change fix python3 compatibility:
* replace except obj, name with except obj as name
* use print function
* replace iteritems by six.iteritems
* replace xrange by range
* convert items() result to list

Change-Id: I70364e47541274d446c4449f820dce3e0b331b27
2020-03-04 13:09:24 -06:00
David Pursehouse 2d4b0ebee6 Fix pep8 errors
- E722 do not use bare 'except'

  Replace bare except clauses with explicit exception types.

- E741 ambiguous variable name 'l'

  Rename 'l' to 'locale'

In addition this patch squashes 684782 to use older
werkzeug version to not face with exceptions.

Generally this patch fixes lodgeit CI.

Also, add tox jobs to in-tree zuul config

These were defined in project-config, but we don't need to manage
that centrally.

Change-Id: Id750715472f88fa5dba0a2414fb1667df4a6dc40
Signed-off-by: David Pursehouse <dpursehouse@collab.net>
2020-03-04 13:09:04 -06:00
David Pursehouse f79c65815a Fix up the tests and add tox configuration to run them
The alfajor HTTP test wrapper is not working properly.  All the tests
are failing with:

  AttributeError: '_APIClientResponse' object has no attribute '_status_code'

It doesn't look like alfajor is being maintained any more [1, 2], so
remove the dependency on it and run the tests directly through the
werkzeug client instead.

The test_json_get_styles test still failed because the content and
ordering of the styles returned from the API is dependent on the
platform on which the tests run.  Instead of testing against a fixed
expected result, which could be different on another platform,
generate the expected results dynamically.

Update the tox configuration and test-requirements.txt to be able to
run the tests via tox.

[1] https://github.com/idealist/Alfajor
[2] https://github.com/idealistdev/alfajor

Change-Id: I4db6783b9d725ce096575035ea27d28be8e6fed5
2015-11-24 13:33:00 +09:00
David Pursehouse fbb61e9c1d Add tox configuration to enable PEP-8 checks, and fix various failures
- E126 continuation line over-indented for hanging indent
- E127 continuation line over-indented for visual indent
- E128 continuation line under-indented for visual indent
- E131 continuation line unaligned for hanging indent
- E265 block comment should start with '# '
- E272 multiple spaces before keyword
- E302 expected 2 blank lines, found <n>
- E712 comparison to False should be 'if cond is False:' or 'if not cond:'
- F401 '<name>' imported but unused

Change-Id: I2344cf2e8fd7910e72e9d8043423d25e43065ef2
2015-11-17 19:09:23 +09:00