Commit Graph

12 Commits

Author SHA1 Message Date
Hervé Beraud 560c890dce 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: I57212750f6bfc922fb462dee15567e864f73743e
2020-06-02 20:25:55 +02:00
Andreas Jaeger f037523797 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found by updated hacking version.

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

Change-Id: Ibef3bbaceb61612d678c542bc8c95da24a7e2c87
2020-04-01 12:22:43 +00:00
Charles Short 4cfdc71d70 Make monasca-ui python3 compatible
In order to make monasca-ui python3 compatible this
patch set:
- Add six to requirements.txt
- Add py35 to tox.ini
- Replace dict.iteritems() with six.iteritems(dict)
- Replace prit msg with print(msg)
- Replace unicode with six.text_type(msg)
- Replaces urlparse with six.moves.urllib
- Python 3 getting the keys() of a dict returns
  a dict_keys object instead of a list
- python 2.x calling keys makes a copy of the key
  that you can iterate over while modifying the dict.
  This doesn't work in python 3.x because keys
  returns an iterator instead of a list.
  Another way is to use list to force a copy of the keys
  to be made.

Story: 2000975
Task: 4129

Signed-off-by: Charles Short <zulcss@gmail.com>

Change-Id: Ibc644a734edceea0b36f2df2c73300d1e4db925f
2018-03-29 15:53:22 -04:00
Andreas Jaeger cc0af490cf Avoid tox-install.sh
Instead of using tox-install.sh, we can install horizon and neutron
now directly from pypi - or use the current branch in CI system using
tox-siblings.

Update tox.ini for this change and add horizon to requirements file.

Change-Id: Ife02518fce62083661bf06c0fb98e683c5c3d311
2018-03-14 21:08:44 +01:00
Witold Bedyk 361e486753 Fix installing horizon dependency
* copied tox_install from openstack/heat-dashboard
* removed horizon dep from tox.ini

Change-Id: I1066f674065d7a89bff8aaf510dac2684228454e
2018-02-05 09:01:37 +00:00
Tomasz Trębski 08b09b6f83 Make tox working for zuulv3
Previously taken approach, where python-monascacient, is installed
from the Zuul reference or master made the new ZuulV3 based
tox gates failing.

Change-Id: I864a83862958ec21a681254d7c7a0efb72cf194a
2017-10-24 09:30:58 +02:00
Tomasz Trębski 9dc87decbf Integrate with newer client
In overall following change adjustes monasca-ui code to the
shape of the python-monascaclient (integrated with osc-lib,
see Depends-On for details).

Extra:
- added profiling capabilities
- added caching of client instances
- installing master python-monascaclient for test purposes
- supporting installing python-monascaclient if specified via Depends-On

Depends-On: I1712a24739438e2d8331a495f18f357749a633c5
Change-Id: I01d0f3d9814376f9358feb23494e1ca5231aedac
2017-07-13 23:05:55 +00:00
Thomas Bechtold fff9bf0255 Fix tox_install branch name
In master we want to use the master branch. Commit e27a1c9970
introcuced the wrong branch name.

Change-Id: Ic1e9b8f95b5b4bb7ae8d655be4d0b0f260be6d10
2017-04-10 13:35:51 +02:00
Thomas Bechtold e27a1c9970 Sync tools/tox_install.sh
Sync tools/tox_install.sh with python-openstackclient. This brings in
the following improvements:

* 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: Ie56634fcb4dcf670510771efffccb4214c87359c
2017-04-10 12:09:09 +02:00
Dirk Mueller f97c2da088 Add Constraints support
Adding constraints support to clients is slightly more complex than
services as the clients 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 monasca-ui.

Change-Id: Ie2f4e3ed3e309b1176ec8bffa5466da25345fd64
2017-01-02 12:30:55 +01:00
Piotr Smialkowski 5cb8b8dad8 Fix unittests
- Update horizon version
- Remove --upgrade option in venv installer and tox.ini
- Freeze oslo libs versions

Change-Id: I4b6697cba20699da59af8f9cc7440a669d9f0c6e
2015-07-27 12:07:20 +02:00
Rob Raymond 125ee4b768 Enable unit and pep8 tests 2014-06-27 16:16:29 -06:00