Commit Graph

122 Commits

Author SHA1 Message Date
Zuul bfe51dd28e Merge "Bump hacking" 2024-03-08 15:32:19 +00:00
Takashi Kajinami 589582d6af Bump hacking
hacking 3.0.x is too old.

Change-Id: I00a92adec7f166e4ed6bb6659ed2a230a6262a13
2024-01-27 23:06:21 +09:00
Takashi Kajinami 9eb0242aa8 Remove deprecated pbr options
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
2023-12-20 11:44:39 +09:00
Zuul 17b532cd6e Merge "setup.cfg: Replace dashes by underscores" 2023-10-06 14:43:09 +00:00
Zuul 09d1122420 Merge "Stop to use the __future__ module." 2023-10-06 14:34:54 +00:00
Sven Kieske 606164d828
fix small typo in BackendError class
Change-Id: I54e16e807527a6986d67c17ab85aac48ada3a380
Signed-off-by: Sven Kieske <kieske@osism.tech>
2023-07-03 15:53:32 +02:00
Takashi Kajinami 0a56650693 Remove usage of six library
... because now ldappool supports Python 3 only.

Change-Id: Ibeb60dbc81ef5b03f0732439ed07c2b672e78df5
2023-05-23 10:30:49 +02:00
Jimmy McCrory 73b1b09b25 Fix pep8 gate
Update flake8-docstrings requirement.
Ignore missing docstring in __init__ methods.

Change-Id: I966fe3fdc16765795f99e1f5984050baae305849
2023-05-05 08:59:21 -07:00
Takashi Kajinami 9dc4c36f9e setup.cfg: Replace dashes by underscores
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
2022-10-28 10:00:55 -05:00
LiZekun d1b6bf6094 Use TOX_CONSTRAINTS_FILE
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
2022-07-16 14:01:05 +00:00
LiZekun c31edd9572 Update python testing as per zed cycle testing runtime
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
2022-07-16 14:00:36 +00:00
Stephen Finucane 8b3f27b22a Update CI to use unversioned jobs template
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
2022-07-16 22:58:20 +09:00
Wander Way 322e0d753f Remove lower-constraints, uncap PrettyTable
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>
2021-02-24 14:00:21 +00:00
Hervé Beraud beca20c089 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: Ifd88d86705c8c89681a3144b0a747c140dd58159
2020-06-02 20:22:01 +02:00
Andreas Jaeger bbc0e139d5 Switch to newer openstackdocstheme and reno versions
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
2020-05-30 18:37:12 +02:00
Zuul 8d5c5bcabb Merge "Update hacking for Python3" 2020-04-06 16:15:57 +00:00
Andreas Jaeger be98d6d605 Cleanup py27 support
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
2020-04-05 09:37:51 +02:00
Andreas Jaeger 30fac42e42 Update hacking for Python3
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
2020-04-02 15:14:57 +02:00
Vishakha Agarwal a9e8ec4e3c [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

ldappool is ready with python 3 and ok to drop the
python 2.7 support.

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: Iafa765c5aa8ac83656003d8addf698795ce93e1a
2019-12-17 15:14:50 +00:00
Zuul 151a7ac177 Merge "Follow the PTI for docs" 2019-10-15 16:37:20 +00:00
Vishakha Agarwal 8f2f2e3827 Follow the PTI for docs
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
2019-10-09 06:17:09 -07:00
Zuul f75c1a8a34 Merge "Add Python 3 Train unit tests" 2019-07-22 15:48:22 +00:00
Corey Bryant dbf4776bbf 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

Depends-on: https://review.opendev.org/668970

Change-Id: I3ea85523b3f17a605bb2bda340f2b4dc553655fa
Story: #2005924
Task: #34215
2019-07-03 12:50:31 -07:00
Colleen Murphy 5121d8d99b Add bindep.txt
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
2019-07-03 12:29:11 -07:00
jacky06 732fc6bec7 Sync Sphinx requirement
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
2019-06-19 14:40:58 +08:00
OpenDev Sysadmins 70e0888a61 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:40:48 +00:00
Vishakha Agarwal bed9eb5ff9 Update the min version of tox
In Train, we will use python3.6 and 3.7 for which
the minimum tox version required is 2.5[1]

[1]https://tox.readthedocs.io/en/latest/changelog.html#v2-6-0-2017-02-04

Change-Id: I8adbf57d69ff888e94c9596493acd9ed8a78bc7a
2019-04-09 15:09:34 +05:30
Vishakha Agarwal 0c1f6fb480 Drop py35 jobs
Python 3.5 was the target runtime for the Rocky release.
The current target py3 runtime for Stein is Python 3.6,
so there is no reason to keep testing against the older version.

https://governance.openstack.org/tc/reference/runtimes/stein.html#python-runtime-for-stein

Change-Id: Ie8dbbf3180da6ba487cebfa40bf831f20ba33a90
2019-02-28 11:43:53 +05:30
Colleen Murphy 01d0eb3807 Add py37 tox env
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
2019-02-25 12:16:03 +01:00
Corey Bryant 2b8ce39b46 add python 3.7 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.7.

See ML discussion here [1] for context.

[1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135626.html

Change-Id: Ib72051f082f0478302bc8e3e8a9a4369ad06a1f8
Story: #2004073
Task: #27422
2019-02-14 08:22:06 -05:00
Andreas Jaeger 4e29af8bbc Use template for lower-constraints
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
2018-12-20 21:04:50 +01:00
Zuul f05adb1abc Merge "Add py36 tox environment" 2018-12-07 15:31:03 +00:00
Zuul 7573386017 Merge "Fix releasenotes build" 2018-12-07 14:59:13 +00:00
Colleen Murphy 1f8f8a3169 Fix releasenotes build
The Zuul sphinx job requires a _static directory to exist.

Change-Id: I814937a8496cdb4d3e24aabba849f10da42d0c89
2018-12-05 15:33:46 +01:00
Vieri a89bfd9d3c Change openstack-dev to openstack-discuss
Mailinglists have been updated. Openstack-discuss replaces openstack-dev.

Change-Id: Ia31bda114889b4e043b95dba19172085817eb7e3
2018-12-04 19:20:53 +00:00
Zuul 4a44122d74 Merge "Replacing the HTTP protocal with HTTPS in index.rst." 2018-12-04 16:46:45 +00:00
Zuul 50d600a633 Merge "Add release notes jobs" 2018-12-04 16:27:41 +00:00
zhouxinyong 82dc4dfb4a Replacing the HTTP protocal with HTTPS in index.rst.
Change-Id: I96c38a2e05b8fa986ee2dd17e745a1b0f342670a
2018-11-14 04:15:35 +08:00
Colleen Murphy 04f990936b Add py36 tox environment
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
2018-11-06 12:59:26 +01:00
Colleen Murphy bb3bd4345a Add release notes jobs
Add Zuul jobs to build and publish reno release notes.

Change-Id: Id9325b3c7ff677153d36d9da5fae7af6a9c854a7
2018-11-02 16:24:50 +01:00
Nathan Kinder acc14fca3a Allow pool status to be printed as a table
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
2018-11-02 06:43:16 -07:00
Zuul 1f6f57d9af Merge "Handle retry logic for timeouts with multiple LDAP servers" 2018-11-02 13:26:07 +00:00
Colleen Murphy 2626d58c4d Add plumbing to support reno release notes
Change-Id: I1b4187ca74586912c36bfa3650951a1e8b5fa7a2
2018-10-31 14:10:27 -07:00
Nathan Kinder 3f0ea8533a Handle retry logic for timeouts with multiple LDAP servers
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
2018-10-31 12:39:26 -07:00
Zuul fff2bf34cf Merge "Don't quote {posargs} in tox.ini" 2018-10-31 18:18:05 +00:00
Nathan Kinder a74cf70ff4 Improve connection retry logging
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
2018-10-30 19:18:33 -07:00
Corey Bryant 7734b7f45d PY3: switch to using unicode text values
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
2018-10-19 09:53:41 -04:00
98k 32dec4f40e Don't quote {posargs} in tox.ini
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
2018-10-09 21:04:52 +00:00
qingszhao 3c1ce2d830 Removed older version of python added 3.5
In setup.cfg file the python 3.5 is added
In tox.ini the python 3.5 is added

Change-Id: If4b47cb1a4bdd7c92ce438548defd8bf552dc170
2018-09-29 16:30:04 +08:00
Doug Hellmann 24ee84bc74 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: Ia96142fae1115f0e2ae76025e3e03c923b411e65
Story: #2002586
Task: #24304
2018-08-29 16:04:56 -04:00