commit b17f6fcb1ce61316bb8c9c70d2627e97a9d12d5a Author: Bernard Cafarelli Date: Wed Sep 16 12:56:36 2020 +0200 Fix lower-constraints and pep8 for Focal Bump lower-constraints to versions supporting python 3.8 and with wheels available and sync requirements Bump hacking to 3.2.0 in order to work with Focal, disabling W504 to align with neutron and F405 (similar F403 is already disabled and it needs a large fix) Master branch switched to running tests on focal, with py38, after releasing and branching stable/victoria, so we need to backport these changes. Change-Id: I6b6329b2bb7a117f7426fdd63186d321290d9b67 diff --git a/lower-constraints.txt b/lower-constraints.txt index 351b8a0..256c9c7 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -7,19 +7,19 @@ bandit==1.1.0 bashate==0.5.1 beautifulsoup4==4.6.0 cachetools==2.0.0 -cffi==1.7.0 +cffi==1.14.0 cliff==2.8.0 cmd2==0.8.0 contextlib2==0.4.0 coverage==4.0 ddt==1.0.1 debtcollector==1.2.0 -decorator==3.4.0 +decorator==4.4.0 deprecation==1.0 docutils==0.11 -dogpile.cache==0.6.2 +dogpile.cache==0.8.0 dulwich==0.15.0 -eventlet==0.18.2 +eventlet==0.21.0 extras==1.0.0 fasteners==0.7.0 fixtures==3.0.0 @@ -29,7 +29,7 @@ future==0.16.0 futurist==1.2.0 gitdb==0.6.4 GitPython==1.0.1 -greenlet==0.4.10 +greenlet==0.4.15 hacking==1.1.0 httplib2==0.9.1 imagesize==0.7.1 @@ -41,12 +41,12 @@ jsonpointer==1.13 jsonschema==2.6.0 keystoneauth1==3.4.0 keystonemiddleware==4.17.0 -kombu==4.0.0 +kombu==4.6.1 linecache2==1.0.0 logilab-common==1.4.1 logutils==0.3.5 Mako==0.4.0 -MarkupSafe==1.0 +MarkupSafe==1.1.1 mccabe==0.2.1 monotonic==0.6 mox3==0.20.0 @@ -68,7 +68,7 @@ oslo.context==2.19.2 oslo.db==4.27.0 oslo.i18n==3.15.3 oslo.log==3.36.0 -oslo.messaging==5.29.0 +oslo.messaging==12.4.0 oslo.middleware==3.31.0 oslo.policy==1.30.0 oslo.privsep==1.23.0 @@ -102,7 +102,7 @@ pylint==1.9.2 PyMySQL==0.7.6 pyparsing==2.1.0 pyperclip==1.5.27 -pyroute2==0.4.21 +pyroute2==0.5.13 python-dateutil==2.5.3 python-designateclient==2.7.0 python-editor==1.0.3 @@ -112,7 +112,7 @@ python-neutronclient==6.7.0 python-novaclient==9.1.0 python-subunit==1.0.0 pytz==2013.6 -PyYAML==3.12 +PyYAML==3.13 repoze.lru==0.7 requests==2.14.2 requestsexceptions==1.2.0 @@ -124,7 +124,7 @@ six==1.10.0 smmap==0.9.0 snowballstemmer==1.2.1 sqlalchemy-migrate==0.11.0 -SQLAlchemy==1.2.0 +SQLAlchemy==1.2.19 sqlparse==0.2.2 statsd==3.2.1 stestr==1.0.0 diff --git a/os_ken/lib/packet/cfm.py b/os_ken/lib/packet/cfm.py index 93632e4..7eaf133 100644 --- a/os_ken/lib/packet/cfm.py +++ b/os_ken/lib/packet/cfm.py @@ -268,7 +268,7 @@ class cc_message(operation): self._opcode = CFM_CC_MESSAGE assert rdi in [0, 1] self.rdi = rdi - assert interval is not 0 + assert interval != 0 self.interval = interval self.seq_num = seq_num assert 1 <= mep_id <= 8191 diff --git a/requirements.txt b/requirements.txt index 35763f2..9caccef 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ pbr>=2.0 # Apache-2.0 eventlet!=0.18.3,>=0.18.2,!=0.20.1,!=0.21.0,!=0.23.0 msgpack>=0.3.0 # RPC library, BGP speaker(net_cntl) netaddr>=0.7.18 # BSD -oslo.config>=2.5.0 +oslo.config>=5.1.0 ovs>=2.6.0 # OVSDB Routes>=2.3.1 # MIT six>=1.4.0 diff --git a/test-requirements.txt b/test-requirements.txt index f9cdda9..f429a7f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,7 +2,7 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -hacking>=0.12.0,<0.13 # Apache-2.0 +hacking>=3.2.0,<3.3.0 # Apache-2.0 coverage>=4.0,!=4.4 # Apache-2.0 python-subunit>=0.0.18 # Apache-2.0/BSD diff --git a/tox.ini b/tox.ini index 0be0860..9bb8f59 100644 --- a/tox.ini +++ b/tox.ini @@ -74,6 +74,7 @@ show-source = True # E741: do not use variables named 'l', 'O', or 'I' # F401: Module imported but unused # F403: 'from module import *' used; unable to detect undefined names +# F405: Name may be undefined, or defined from star imports: module # F811: redefinition of unused variable # F812: list comprehension redefines name from line # F821: undefined name '' @@ -90,7 +91,8 @@ show-source = True # H404: Multi line docstrings should start without a leading new line. # H405: Multi line docstrings should start with a one line summary followed by an empty line. # H501: Do not use ``locals()`` or ``self.__dict__`` for formatting strings -ignore = E113,E123,E125,W503,E116,E128,E402,E501,E704,E722,E731,E741,F401,F403,F811,F812,F821,F841,H101,H102,H104,H105,H201,H301,H306,H401,H403,H404,H405,H501 +# W504 line break after binary operator +ignore = E113,E123,E125,W503,E116,E128,E402,E501,E704,E722,E731,E741,F401,F403,F405,F811,F812,F821,F841,H101,H102,H104,H105,H201,H301,H306,H401,H403,H404,H405,H501,W504 builtins = _ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,tools,os_ken/contrib