Setuptools v54.1.0 introduces a warning that the use of
dash-separated options in 'setup.cfg' will not be supported
in a future version [1].
Get ahead of the issue by replacing the dashes with underscores.
Without this, we see 'UserWarning' messages
like the following on new enough
versions of setuptools:
UserWarning: Usage of dash-separated 'description-file' will not be
supported in future versions. Please use the underscore name
'description_file' instead
Change-Id: I46ab12465f3e0ffa9fd309a8e770ba956151989e
Jinja2 3.0 has deprecated the contextfunction() and contextfilter()
filters, and recommends to use pass_context() instead [1].
This commit adds support for pre-3.1 and 3.1 versions of Jinja2.
[1] - https://jinja.palletsprojects.com/en/3.0.x/api/#jinja2.contextfilter
Change-Id: Ic011f19ee0f96339ffff7b316b40663e840c0529
On recent Fedora releases (seen with 32), /etc/os-release does not
include the ID_LIKE variable. This causes renderspec to fail when
run using Python 3.8.
This commit adds another identification method for those cases, using
the ID variable. It also makes sure to avoid using
platform.linux_distribution in Python 3.8 or later.
Change-Id: Idc84af8b2e7d2b4aca517c20af052dfcac55366c
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we don't need it
in lower-constraints and requirements.
These changes will help us to drop `mock` from openstack/requirements
Change-Id: I4d7b11ac4ac5725ad0605b03ddabed22bad8d0d3
Switch to openstackdocstheme 2.2.1 version. Using
this version will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems
Update Sphinx version as well.
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.
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: I6d6ed7c7db614dd1b5a678d496d6d8790383d8e9
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: I38ea03576c19cb008f5a07be3527535b4652a4c5
This function was deprecated and is removed in Python 3.8.
We can't remove all of the code as the unit tests are relying
on being able to mock this function.
Change-Id: If2bc9ee174fb65b81de012cb911fc8c2bd260d27
Ida03f9cca7d276ed8a449d21c0ba58330916e7d9 defined
the basepython in common place but
did not set the ignore_basepython_conflict to True
in tox to avoid the wrong version in py env and
error in future.
Change-Id: I398df150ebf6e5ec9bc34344f0f95a6eb2d0244d
This bumps jobs to the current usurri template and drops compatibility
code for Python 2.7.
Change-Id: Ida03f9cca7d276ed8a449d21c0ba58330916e7d9
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
unittest2 was needed for Python <= 2.6 and hasn't been needed for quite
awhile now. See unittest2 note at:
https://docs.python.org/2.7/library/unittest.html
This cleans up use to just use the standard unittest package.
Change-Id: I54c6ada7c4ad7147bf7f8547e249eb6998a05145
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Both are shortcuts to 'py2pkg' with specific py_versions set.
This is useful when defining BuildRequires that are eg. python3 only.
Change-Id: I273919cf4f47bf9859d71bc216cbf96e82a2a6f7
[1] ensured proper order for py_vers when using pymod2pkg, however
it did not consider the chance that skip_pyversion is None. In this
case, it failed with:
TypeError: argument of type 'NoneType' is not iterable
This patch ensures that it works even when skip_pyversion is None.
[1] - https://review.opendev.org/662719
Change-Id: Iac7dda35b44edf4a7af31129d9055280aa37df01
Previously, we converted the py_versions list into a set to substract
the versions to be skipped. However, Python does not guarantee the
item order in a set, so some unit tests could fail when the order
was reversed from ['py2', 'py3'] to ['py3', 'py2'].
This change fixes that by making sure the order is maintained.
Change-Id: I5bcdfa3a3dfe2583cc9653d6c87f6c24464b60a5
With the recent Sphinx release the previously used oslosphinx
theme is no longer functional. It is fine to switch over
to the more openstack standard openstackdocstheme which is
maintained and working with the new Sphinx.
Move doc-specific requirements for the docs process into
a separate doc/requirements.py and remove it from test-reqiurements.
Change-Id: I075a02bb9efbfc9c39277bc8ce7330e20bf91605
These requirements are expanded into the sdist tarball,
however they're not needed for building or runnig tests.
Move them into the pep8 target.
Change-Id: Ice851200a45538be4dd27736674fcd7315ed87a3
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: I61dca6dfd7f6227731fdd6902bdd79b5ba0fb995
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: Id0c9854f5515ee76339243482ddbba14ddd299a4
This is a mechanically generated patch to switch the documentation
jobs to use the new PTI versions of the jobs 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: Ib5893f970c0bd8fb2154132d0abf65eb6571b4d7
Story: #2002586
Task: #24323
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.
Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.
Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.
See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html
Change-Id: I3cdb7f54d4d550ad27d959acd47efe723bdd12c6
Story: #2002586
Task: #24323
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
For this, move bandit to test-requirements.txt.
Change-Id: If1ca9278e104c519a1aff88ed9ff27e120e34aff