Commit Graph

29 Commits

Author SHA1 Message Date
likui 50723fa870 remove lower-constraints.txt
[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html

Change-Id: I407b2c9bc6e9c1cd5b070a1cdca7c0eabe19b0ca
2021-01-16 15:51:31 +08:00
Zuul 3767cfebb1 Merge "Remove Babel from lower-constraints.txt" 2021-01-16 06:50:07 +00:00
likui f1f873019d Remove Babel from lower-constraints.txt
Change-Id: I2012d7ceada837461b02a6041eb099d87306ed21
2020-09-03 14:53:59 +08:00
Stephen Finucane 78698b5c99 Convert rst to plaintext for oslo.config output
This lets us use powerful rST roles and directives in our help text
without these being emitted to the configuration file, where they don't
read quite as well. It also fixes our formatting somewhat, which is
nice.

Note that we're doing something funky where we disable line wrapping. We
can't totally disable this due to how rst2txt works, so instead we set
the line length to an arbitrarily long line length, which is taken from
RFC5322 (Internet Message Format) for want of something better. I
personally question whether anyone is configuring this, but that's a
fight for another day.

Also note that this might caught issues for people who are using invalid
rST in their docstrings or use roles/directives in their config options
that aren't part of the standard Sphinx set or oslo.config set. They
will already be seeing the former issues if they are using the
'sphinxext' extension though, and the latter sounds like it would be
fairly rare.

Change-Id: I6c7208f0facfb4f334d7440cb6a9562901543dd3
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-07-23 11:47:05 +02:00
Doug Hellmann 392922aa33 drop use of pkg_resources
Importing pkg_resources scans all of the installed modules for data
that won't be used. Switch to using importlib.metdata, which more
efficiently loads the metadata for a package.

Change-Id: Idd2a0d0026fef9296172c9995b428ea43a746483
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2020-07-05 19:37:01 -04:00
Sean McGinnis 04d5280c3d
Update lower-constraints versions
This updates lower constraints to versions that will work with py38 so
that when we move to running on focal nodes, which has py38 as its
default py3 runtime, the lower-constraints job will continue to pass.

It also cleans out some secondary requirements that are no longer needed
due to our direct dependencies being updated.

Linters are removed that are kept in the global requirements blacklist
as those are not version tracked and are not relevant for our
lower-constraints unit test runs.

Change-Id: Ied58e8aeb700c15354f1c040b2623f498d636061
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-06-09 16:49:27 -05:00
Zuul 2b698facfd Merge "Remove the unused coding style modules" 2020-05-26 13:44:43 +00:00
Zuul ad1eb1be0a Merge "Raise hacking minimum to 3.0.1" 2020-05-25 13:20:17 +00:00
Sean McGinnis 8242416801
Raise hacking minimum to 3.0.1
This raises hacking to a newer version, fixes a few issues the newer
version uncovered, and removes the cap for flake8 to allow that version
to be controlled by the hacking constraints.

Change-Id: Ie550119322bca3c217e4a74eca789f156cfa7e2c
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-05-19 15:15:53 -05:00
jacky06 c6961e1f73 Remove the unused coding style modules
Python modules related to coding style checks (listed in blacklist.txt in
openstack/requirements repo) are dropped from lower-constraints.txt
as they are not actually used in tests (other than pep8).

more info: https://github.com/openstack/requirements/blob/master/blacklist.txt

Change-Id: If14b70ceb1642ba3b81385a49fb0686be7628a2d
2020-05-16 04:26:38 +00:00
caoyuan 6fc84b0d2e Remove six from lower-constraints.txt
it should be removed in https://review.opendev.org/#/c/687355/ but missing

Change-Id: I45351e5913801982e93bd386ffb6d6a8845f03e6
2020-05-04 13:42:31 +08:00
Sean McGinnis 66b3da9689
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I2f8067eeb2aec62f098bfbb3770a67f1876ce7a2
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-03-31 14:40:09 -05:00
Stephen Finucane 5a5cf72c64 mypy: Add boilerplate configuration
Add the requirement, tox job, and basic configuration.

Change-Id: I3a865255ee731a27a00e7653557099fb99096486
2020-02-12 09:56:58 +00:00
Stephen Finucane 81589565ba Switch to hacking 2.x
This bumps the version of flake8 and pycodestyle to something much
newer, which resolves a long-standing warning about nested sets and
allows us to use new fangled features like f-strings if we so choose.

Note that this requires some minor modifications to keep the 'pep8' task
passing.

Change-Id: I3af8eb490345a6152372730ca3e0a6702bf482ea
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-02-12 09:56:58 +00:00
Stephen Finucane 4e071eb034 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in Ussuri cycle.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I13ce8e8264679a19c7b108381ccb969573ea9ac6
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Sem-Ver: api-break
2020-02-03 15:12:02 +00:00
caoyuan 0f7244f9dc tox: Keeping going with docs
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: Ied9f46640cf2f338a5784e1c72998f93b5c860c5
2019-10-24 14:04:44 +08:00
pengyuesheng 039fdae7d2 Bump the openstackdocstheme extension to 1.20
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release.

Change-Id: Iac913e9dea8318ad8398ed7478cb66d845fe7f1e
2019-08-01 09:46:12 +08:00
Ben Nemec dc9b711a3f Add unit tests for validator
We need to bump our minimum version for mock to 3.0.0 in order for
mocking of 'open' to work correctly with the ConfigParser. From the
mock changelog: "Issue #32933: unittest.mock.mock_open() now supports
iteration over the file contents."

Change-Id: I9522083b7b0f785fe0e9cbdf8a9042112820bed4
2019-06-03 20:55:31 +00:00
Stephen Finucane 0950403744 tox: Suppress output
As noted in I1678bcd26b41fdf09f98c36fc095d6d4c1826deb (for pbr), we need
to pass some flags [1] to stestr to ensure stdout is captured in
additional to any logs.

We also make it easier to override this capturing and remove some errant
whitespace.

[1] https://github.com/mtreinish/stestr/commit/1316ebd7

Change-Id: I5d98c2b8e31b4eb4741dfa5055a5628140b1add5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2019-04-08 16:45:12 +02:00
Zuul 7e20214802 Merge "Cleaning testrepository occurrences." 2019-01-23 18:57:24 +00:00
Zuul 8e17ded72a Merge "Migrating oslo.config to use stestr" 2019-01-21 05:22:35 +00:00
Hervé Beraud 915cec3784 Cleaning testrepository occurrences.
Since we have migrate test to stestr we can remove testrepository
from imports and stop to ignore him.

Change-Id: I74a24f19268d39dbce42963c95a9f06ca9b3f014
2019-01-15 17:13:04 +01:00
Rui Yuan Dou 819534b20b Migrating oslo.config to use stestr
os-testr has moved over to use stestr instead of testr. While this
is usually compaible with existing settings, there is a warning
that is emitted when .stestr.conf is not present. It is usually
able to fall back to parsing the .testr.conf file, but to be more
correct and to prevent future problems we should update the config.

Change-Id: I929f75d069f20b8cfa8af4e0712883e91a54dc4f
2019-01-15 16:15:34 +08:00
Andrey Volkov 4a2b7af718 Resolve deprecation warning for rfc3986 uri validation
rfc3986.is_valid_uri is deprecated in 1.1.0. That generates a lot of
warnings: "Please use rfc3986.validators.Validator instead. This
method will be eventually removed.".

This patch updates URI type to use rfc3986.validators.
ValueError exception is preserved.

Change-Id: Ida56dfa17fca0080b74c1a80d5420ebed203431f
2018-12-25 14:56:21 +03:00
Zuul 084ac31f4c Merge "Add config_source option" 2018-07-13 16:08:32 +00:00
Doug Hellmann e233fc58da Add config_source option
Define a config_source option that can be used to specify the
alternative sources that require drivers to load configuration
settings.

Co-Authored-By: Moises Guimaraes de Medeiros <moguimar@redhat.com>
Change-Id: Ibd5a6d306bb98d30d973dfe3604dcc0691d2e369
Blueprint: oslo-config-drivers
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-25 10:17:12 +02:00
Ben Nemec 5f8b0e0185 Optionally use oslo.log for deprecated opt logging
While we can't add a hard dependency on oslo.log because it uses
oslo.config, in most cases oslo.log will be installed anyway.  In
the interest of being able to make use of features like
fatal_deprecations in oslo.log, let's use it if it's available.

Change-Id: If9499aa6fc28a6b92447b3825d3ca1957cb2255a
2018-06-21 14:50:47 +00:00
Doug Hellmann 969fecd369 fix lower-constraints
We cannot modify the requirements list until the existing lower
constraints values are correct.

Change-Id: I8ed238bfcb6e11a0b5e28404ccb93e88e01d83b7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-05-15 11:34:17 -04:00
Doug Hellmann 98aba84d71 add a job to run unit tests against the lower bounds of our dependencies
This is part of the migration to stop syncing global requirements into
projects.

http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html

Depends-On: https://review.openstack.org/555034
Change-Id: Ie768d173b0940bea0d8c299a17cf2dbd6fc6e2fd
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-24 21:02:20 -04:00