Drop py36 and py37 support

Python runtimes for Zed are 3.8, 3.9 and optionally 3.10 [1][2],
so tox envs in tox.ini are updated accordingly.

Declare python_requires >=3.8 in setup.cfg
python_requires are declared in many projects during dropping
python 2.7 support. It is good to follow the convention and
it also clarifies our python interpreter requirement.

This commit also cleans up python2.7 related stuffs in setup.py.
Both are related to the supported versions of python,
so I made both changes in a single commit.

[1] https://governance.openstack.org/tc/reference/runtimes/zed.html
[2] b740b42fb1/zuul.d/project-templates.yaml (L542)

Change-Id: I4161816fd1fec19a3834cc7d994b3f761e1ab2ce
Closes-Bug: #1960887
This commit is contained in:
Akihiro Motoki 2022-02-17 14:33:49 +09:00
parent 8d45a9f941
commit ee80782504
4 changed files with 5 additions and 13 deletions

View File

@ -27,7 +27,7 @@
- job:
name: horizon-tox-py36-xstatic-master
parent: openstack-tox-py36
parent: openstack-tox-py39
required-projects: *xstatic-projects
- job:

View File

@ -6,6 +6,7 @@ description_file =
author = OpenStack
author_email = openstack-discuss@lists.openstack.org
home_page = https://docs.openstack.org/horizon/latest/
python_requires = >=3.8
classifier =
Development Status :: 5 - Production/Stable
Environment :: OpenStack
@ -19,8 +20,6 @@ classifier =
Programming Language :: Python
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Topic :: Internet :: WWW/HTTP

View File

@ -13,16 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT
import setuptools
# In python < 2.7.4, a lazy loading of package `pbr` will break
# setuptools if some other modules registered functions in `atexit`.
# solution from: http://bugs.python.org/issue15881#msg170215
try:
import multiprocessing # noqa
except ImportError:
pass
setuptools.setup(
setup_requires=['pbr>=2.0.0'],

View File

@ -1,6 +1,6 @@
[tox]
minversion = 3.18.0
envlist = pep8,py36,py39,releasenotes,npm,py3-dj32
envlist = pep8,py39,releasenotes,npm,py3-dj32
skipsdist = True
# Automatic envs (pyXX) will only use the python version appropriate to that
# env and ignore basepython inherited from [testenv] if we set
@ -13,8 +13,9 @@ usedevelop = True
setenv =
VIRTUAL_ENV = {envdir}
PYTHONDONTWRITEBYTECODE = 1
# TODO(amotoki): There are three variants of PYTHONWARNINGS. They should be merged.
PYTHONWARNINGS = once,ignore::PendingDeprecationWarning
py{3,36,37}:PYTHONWARNINGS = once,ignore::PendingDeprecationWarning,ignore::ImportWarning:backports
py{3,39}:PYTHONWARNINGS = once,ignore::PendingDeprecationWarning,ignore::ImportWarning:backports
# DeprecationWarning is disabled in dj32 tox env as Django 3.2
# deprecated Django 2.2 features. This workaround is just to reduce
# the number of warnings due to this change.