diff --git a/doc/requirements.txt b/doc/requirements.txt index e3e0b5c5..7208af68 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,3 +1,2 @@ -sphinx>=1.6.2,!=1.6.6,!=1.6.7,<2.0.0;python_version=='2.7' # BSD -sphinx>=1.6.2,!=1.6.6,!=1.6.7,!=2.1.0;python_version>='3.4' # BSD -openstackdocstheme>=1.20.0 # Apache-2.0 +sphinx>=2.0.0 # BSD +openstackdocstheme>=2.0.0 # Apache-2.0 diff --git a/os_net_config/impl_ifcfg.py b/os_net_config/impl_ifcfg.py index b058e096..aa13b583 100644 --- a/os_net_config/impl_ifcfg.py +++ b/os_net_config/impl_ifcfg.py @@ -47,7 +47,7 @@ def ifcfg_config_path(name): def remove_ifcfg_config(ifname): - if re.match('[\w-]+$', ifname): + if re.match(r'[\w-]+$', ifname): ifcfg_file = ifcfg_config_path(ifname) if os.path.exists(ifcfg_file): os.remove(ifcfg_file) @@ -430,7 +430,7 @@ class IfcfgNetConfig(os_net_config.NetConfig): data += "PKEY=yes\n" data += "PHYSDEV=%s\n" % base_opt.parent data += "PKEY_ID=%s\n" % base_opt.pkey_id - elif re.match('\w+\.\d+$', base_opt.name): + elif re.match(r'\w+\.\d+$', base_opt.name): data += "VLAN=yes\n" elif isinstance(base_opt, objects.Interface): if base_opt.linkdelay: diff --git a/os_net_config/sriov_config.py b/os_net_config/sriov_config.py index ec73fd31..2ffb0319 100644 --- a/os_net_config/sriov_config.py +++ b/os_net_config/sriov_config.py @@ -113,7 +113,7 @@ def get_numvfs(ifname): "device/sriov_numvfs") with open(sriov_numvfs_path, 'r') as f: return int(f.read()) - except IOError as exc: + except IOError: msg = ("Unable to read numvfs for %s" % ifname) raise SRIOVNumvfsException(msg) @@ -591,7 +591,7 @@ def main(argv=sys.argv): configure_logger(opts.verbose, opts.debug) if opts.numvfs: - if re.match("^\w+:\d+$", opts.numvfs): + if re.match(r"^\w+:\d+$", opts.numvfs): device_name, numvfs = opts.numvfs.split(':') _write_numvfs(device_name, int(numvfs)) else: diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 726bc7c9..384b0971 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -142,11 +142,6 @@ html_theme = 'openstackdocs' # directly to the root of the documentation. # html_extra_path = [] -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -# html_last_updated_fmt = '%b %d, %Y' -html_last_updated_fmt = '%Y-%m-%d %H:%M' - # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. # html_use_smartypants = True diff --git a/setup.cfg b/setup.cfg index da99a4e3..cb5d737c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,6 +7,7 @@ author = OpenStack author-email = openstack-discuss@lists.openstack.org license = Apache License (2.0) home-page = https://opendev.org/openstack/os-net-config +python-requires = >=3.6 classifier = Environment :: OpenStack Intended Audience :: Developers @@ -14,6 +15,8 @@ classifier = License :: OSI Approved :: Apache Software License Operating System :: OS Independent Programming Language :: Python + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: 3 :: Only Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 @@ -26,16 +29,3 @@ packages = console_scripts = os-net-config = os_net_config.cli:main os-net-config-sriov = os_net_config.sriov_config:main - -[build_sphinx] -source-dir = doc/source -build-dir = doc/build -all_files = 1 - -[upload_sphinx] -upload-dir = doc/build/html - -[egg_info] -tag_build = -tag_date = 0 -tag_svn_revision = 0 diff --git a/setup.py b/setup.py index 566d8443..cd35c3c3 100644 --- a/setup.py +++ b/setup.py @@ -13,17 +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'], pbr=True) diff --git a/test-requirements.txt b/test-requirements.txt index ed22996d..8fa262d2 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,7 +1,7 @@ # The order of packages is significant, because pip processes them in the order # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=1.1.0,<1.2.0 # Apache-2.0 +hacking>=3.0,<3.1.0 # Apache-2.0 coverage>=4.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD diff --git a/tox.ini b/tox.ini index c4845dc8..92c9a1af 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,6 @@ skipsdist = True [testenv] usedevelop = True basepython = python3 -install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} deps = @@ -37,8 +36,8 @@ commands = [flake8] # E123, E125 skipped as they are invalid PEP-8. - +# W504 line break after binary operator show-source = True -ignore = E123,E125 +ignore = E123,E125,W504 builtins = _ exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build