The api_doc_dir option and the autodoc_index_modules option were both
deprecated in pbr 4.2.
The required options for the sphinxcontrib-apidoc extension are already
defined in doc/source/conf.py .
Change-Id: Ic17df7be9763bfa536f7145836161e7909ce542d
Since setuptools v54.1.0[1], the parmeters with dash have been
deprecated in favor of the new parameters with underscore.
This change updates the parameters accordingly to avoid the warnings
like the example below.
UserWarning: Usage of dash-separated 'description-file' will not be
supported in future versions. Please use the underscore name
'description_file' instead
[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb
Change-Id: Ic2f7e933c8e304c012cefc83308726d2a219b25f
UPPER_CONSTRAINTS_FILE is old name and deprecated
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.
Change-Id: I63fe48b93d3bfeedc07c9347284e6147c726bebf
In Zed cycle, we have dropped the python 3.6/3.7[1] testing
and its support. Removing the py36 centos8 job as well as
updating the python classifier also to reflect the same.
[1] https://governance.openstack.org/tc/reference/runtimes/zed.html
Change-Id: I562d51f54859d1009b6599c7f75e0a5d7803fe36
As part of the migration of this project to the independent release
model, we failed to notice that the job template was still tied to a
specific release. We've now introduced a new unversioned job template,
'openstack-python3-jobs' [1], which was can and should use. Do this.
[1] https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/833286/
NOTE:
This adds six to requirements to make that required library installed.
This will be removed later when we get rid of usage of the six library.
Depends-On: https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/833286/
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I906db4eeb673b667667f9706e0084fe441769e84
The lower-constraints jobs are timing out, which means we're failing to
find a match for our specified constraints. These jobs are of limited
value so just drop them.
The change to requirements flags the cap we currently enforce on
PrettyTable. This was previously necessary due to requirements enforcing
the same case, but PrettyTable is now maintained as a Jazzband project
[1] and the cap has been removed.
Finally, while we're here, we can cleanup tox.ini somewhat and remove
now unnecessary warnings from the 'requirements.txt' file (this isn't an
issue with pip's new resolver).
[1] https://github.com/jazzband/prettytable
Change-Id: Ib0fad16f3c9b817756996f79c0b0b61f854583a3
Co-authored-by: Stephen Finucane <stephenfin@redhat.com>
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems
Update Sphinx version as well.
Disable openstackdocs_auto_version to not auto-version the documents.
Disable openstackdocs_auto_name to use 'project' variable as name.
Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.
Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.
openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.
See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html
Change-Id: I26cabdc85596be44fca36cad2a609b8fca0e50e0
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
know about the requirement
- Remove obsolete sections from setup.cfg:
* Wheel is not needed for python 3 only repo
* Some other sections are obsolete
- Update classifiers
- Update requirements, no need for python_version anymore
Change-Id: I2602377334889d08ea3832a7f115b2937af2aa42
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: I5f0adcc9fc321848ef93dafc9c2ee2d4061a1cbc
Use sphinx-build instead of the pbr sphinx extention for building docs
as instructed by the PTI[1].
We remove the reference to the ChangeLog file that is usually generated
by pbr and instead refer to the published reno release notes. Also fixes
the header formatting for the index page, as the headers weren't
rendering at all.
[1] https://governance.openstack.org/tc/reference/pti/python.html
Change-Id: I36142eeb1590c551c6df3bd7d0bc7b7a4a8c692f
Without this patch, unit test jobs may fail if the base system does not
have the openLDAP development package installed. This patch ensures that
we don't rely on a fallback bindep file that may or may not be defined
or a base image that may or may not have the required packages
installed.
Change-Id: I5607e7c7307687857f254d9c7bd16af6532ad7e0
1. Sync sphinx dependency with global requirements. It caps python 2 since
sphinx 2.0 no longer supports Python 2.7.
2. Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Id9f496f57acd2d5a388920e6bdebe52c40a98073
With python3.7 jobs added to the Zuul jobs, it makes sense to add this
to the tox config too so that developers can run python3.7 tests as
well.
Change-Id: Iaa8e6ab9fc1a18d10f7d12eec0446d7db33d7f58
Small cleanups:
* Use openstack-lower-constraints-jobs template, remove individual
jobs.
* Sort list of templates
Change-Id: I598d98d9330b4ae2901da0d3d159d51305c5a76e
Needed-By: https://review.openstack.org/623229
We already run python3.6 unit tests in CI. Add the py36 environment to
the tox file so that developers with python3.6 available locally can opt
into running that version too.
Change-Id: I31cb1d4f6476427720b77b4370ab8e91bd3450b4
This patch adds a __str__() method to the ConnectionManager class,
which allows for a nice readible table to be obtained that shows
the current state of the connection pool. This can be very useful
for troubleshooting or monitoring issues related to connection
pooling. The table will contain a row for each connection within
the pool, with columns showing the connection slot, connectivity
status, activity status, URI, connection lifetime, and bind DN.
The header row will also indicate the pool size and maximum
connection lifetime setting.
Note that this adds a dependency on the prettytable module. This
new dependency seems worth it for the nice readible table format
it produces.
Change-Id: If0abfef405d05ecd499bdf6201ff465bd845957b
It is currently possible to specify multiple LDAP server URIs
for failover purposes when using LDAP connection pooling, as this
functionality is provided in the underlying python-ldap module.
Unfortunately, failover does not work properly if LDAP timeout
issue are encountered due to the way python-LDAP works. If multiple
URLs are provided, the first URL that results in a successful TCP
connection is considered to be a successful LDAP connection. If the
initial bind operation fails due to a timeout waiting for an LDAP
response from the server, it will never failover to additional
URIs. It is easy to demonstrate this behavior by forcing an LDAP
server to hang (attach with gdb to halt the process), then using
that server as the first URI when creating a connection pool.
This patch adds proper failover logic to ldappool. If multiple URIs
are provided, we split them and attempt to connect to them one-by-one
until we have either had a successful LDAP bind operation, or we have
exhausted the list of URIs. The connection retry logic is processed
per-URI as well, meaning we will attempt to reconnect to the first
URI up to the requested retry limit, then we will failover to the
next URI and reset the retry count.
The ldap.TIMEOUT exception was not raised to the caller like some
of the other common LDAP exceptions we might encounter. We should
raise the TIMEOUT exception instead of the more generic BackendError
exception to provide more detail to the calling code.
Change-Id: Iabc13363d2425e70a53163249e5389d336274533
The logging around the connection retry logic logs an info level
message when it fails to connect to the server, but still has retry
attempts left. Due to the way we increment the counter for the
number of connection attempts, we log this same message when the
final attempt has failed. There is an error level log message in
the code that is never reached due to this.
This patch changes the location where we increment the connection
attempt counter, which results in the proper error message being
logged when we fail on the final attempt. The retry wait is also
moved to be after the info level message, as it states that it is
about to wait before retrying. The current logic of waiting before
logging the message doesn't actually match what the message says.
I also added a debug level log message that indicates what connection
attempt it is about to make to help troubleshoot the retry logic.
Change-Id: Ib05d510b8816b5e0670b92749412378a100667d0
In Python 3, python-ldap no longer allows bytes for DN/RDN/field
names. Instead, text values are represented as str, the Unicode
text type.
This patch updates the code to adhere to this behavior.
More details about byte/str usage in python-ldap can be found at:
http://www.python-ldap.org/en/latest/bytes_mode.html#bytes-mode
Change-Id: I9ef10432229aaffe4ac9bd733d608098cdae3b9a
Partial-Bug: #1798184
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')
Change-Id: I7bb4ca54e9f266c7f2735b0339ea1d7b3138be57