Update requirements for recent pip failures

Bump astroid test requirement to 2.4.0
Older versions trigger an error on wrapt dependency:
https://github.com/PyCQA/astroid/issues/755

Bump pylint accordingly to new astroid

Fix some new PEP8 warnings appearing with new versions, and filter out
the larget I202 "Additional newline in a group of imports" one for now

Drop psutil from functional requirements, it indicated an old version
and we have it in common requirements now

Bump a series of lower-constraints and requirements to work with new pip
resolver, testing with steps outlined at:
http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019285.html
This includes eventlet 0.22.1, previous versions triggered a hard to
track error on enum34
Cap cryptography in lower-constraints to prevent discovery failure in
relevant job (other jobs have it capped via upper-constraints)

Change-Id: Ie74ea517a403e6e2a7a4e0a245dd20e5281339e8
Closes-Bug: #1907242
This commit is contained in:
Bernard Cafarelli 2020-12-08 15:11:49 +01:00
parent b5ea767bc3
commit 8d6c301301
No known key found for this signature in database
GPG Key ID: 9531F08245465A52
12 changed files with 36 additions and 35 deletions

View File

@ -1,11 +1,12 @@
alabaster==0.7.10
alembic==0.8.10
amqp==2.1.1
alembic==0.9.6
amqp==2.5.0
appdirs==1.4.3
Babel==2.3.4
bashate==0.5.1
beautifulsoup4==4.6.0
cachetools==2.0.0
cryptography<3.3
cffi==1.13.2
cliff==2.8.0
cmd2==0.8.0
@ -19,7 +20,7 @@ doc8==0.6.0
docutils==0.11
dogpile.cache==0.6.5
dulwich==0.15.0
eventlet==0.21.0
eventlet==0.22.1
extras==1.0.0
fasteners==0.7.0
fixtures==3.0.0
@ -57,11 +58,11 @@ os-client-config==1.28.0
os-ken==0.3.0
os-service-types==1.7.0
os-vif==1.15.1
os-xenapi==0.3.1
os-xenapi==0.3.4
osc-lib==1.8.0
oslo.cache==1.26.0
oslo.concurrency==3.26.0
oslo.config==5.2.0
oslo.config==6.0.0
oslo.context==2.22.0
oslo.db==4.44.0
oslo.i18n==3.20.0
@ -73,7 +74,7 @@ oslo.privsep==2.3.0
oslo.reports==1.18.0
oslo.rootwrap==5.8.0
oslo.serialization==2.25.0
oslo.service==1.24.0
oslo.service==1.31.0
oslo.upgradecheck==0.1.0
oslo.utils==4.4.0
oslo.versionedobjects==1.35.1
@ -100,7 +101,7 @@ pyOpenSSL==17.1.0
pyparsing==2.1.0
pyperclip==1.5.27
pyroute2==0.5.13
python-dateutil==2.5.3
python-dateutil==2.7.0
python-designateclient==2.7.0
python-editor==1.0.3
python-keystoneclient==3.8.0
@ -109,7 +110,7 @@ python-neutronclient==6.7.0
python-novaclient==9.1.0
python-subunit==1.0.0
pytz==2013.6
PyYAML==3.13
PyYAML==5.3.1
reno==3.1.0
repoze.lru==0.7
requests==2.14.2
@ -139,4 +140,4 @@ waitress==1.1.0
WebOb==1.8.2
WebTest==2.0.27
wmi==1.4.9
wrapt==1.7.0
wrapt==1.12.0

View File

@ -255,7 +255,7 @@ class NeutronDbPluginV2(db_base_plugin_common.DbBasePluginCommon,
ctx_admin, object_id=network_id, action='access_as_shared',
target_tenant='*'):
return
ports = ports.filter(models_v2.Port.tenant_id == tenant_id)
ports = ports.filter(models_v2.Port.project_id == tenant_id)
if ports.count():
raise exc.InvalidSharedSetting(network=network_id)
@ -1425,20 +1425,20 @@ class NeutronDbPluginV2(db_base_plugin_common.DbBasePluginCommon,
# Create the port
db_port = self._create_db_port_obj(context, port_data)
p['mac_address'] = db_port['mac_address']
p['mac_address'] = db_port.mac_address
try:
self.ipam.allocate_ips_for_port_and_store(
context, port, port_id)
db_port['ip_allocation'] = (ipalloc_apidef.
IP_ALLOCATION_IMMEDIATE)
db_port.ip_allocation = (ipalloc_apidef.
IP_ALLOCATION_IMMEDIATE)
except ipam_exc.DeferIpam:
db_port['ip_allocation'] = (ipalloc_apidef.
IP_ALLOCATION_DEFERRED)
db_port.ip_allocation = (ipalloc_apidef.
IP_ALLOCATION_DEFERRED)
fixed_ips = p['fixed_ips']
if validators.is_attr_set(fixed_ips) and not fixed_ips:
# [] was passed explicitly as fixed_ips. An unaddressed port.
db_port['ip_allocation'] = ipalloc_apidef.IP_ALLOCATION_NONE
db_port.ip_allocation = ipalloc_apidef.IP_ALLOCATION_NONE
return db_port

View File

@ -1556,7 +1556,7 @@ class Ml2Plugin(db_base_plugin_v2.NeutronDbPluginV2,
binding_host = pdata.get(
portbindings.HOST_ID, const.ATTR_NOT_SPECIFIED)
if binding_host != const.ATTR_NOT_SPECIFIED:
binding["host"] = binding_host
binding.host = binding_host
mech_context = driver_context.PortContext(self, context,
port_dict, network,
binding, None)

View File

@ -48,7 +48,7 @@ def _get_ports_filter_in_tenant(context, tenant_id):
ports = context.session.query(
sg_db.SecurityGroupPortBinding.port_id).join(
sg_db.SecurityGroup, sg_db.SecurityGroup.id == sg_id).filter(
sg_db.SecurityGroup.tenant_id == tenant_id).all()
sg_db.SecurityGroup.project_id == tenant_id).all()
return list({port for (port,) in ports})
except orm_exc.NoResultFound:
return []

View File

@ -13,6 +13,7 @@
# under the License.
import ipaddress
import netaddr
from neutron_lib.agent import topics
@ -66,13 +67,11 @@ class MeteringPlugin(metering_db.MeteringDbMixin):
def delete_metering_label(self, context, label_id):
data = self.get_sync_data_metering(context, label_id)
label = super(MeteringPlugin, self).delete_metering_label(
super(MeteringPlugin, self).delete_metering_label(
context, label_id)
self.meter_rpc.remove_metering_label(context, data)
return label
def create_metering_label_rule(self, context, metering_label_rule):
metering_label_rule = metering_label_rule['metering_label_rule']
MeteringPlugin.validate_metering_label_rule(metering_label_rule)

View File

@ -15,6 +15,7 @@
from unittest import mock
import copy
import netaddr
from neutron_lib.api.definitions import dns as dns_apidef
from neutron_lib.utils import net as n_net

View File

@ -5,5 +5,4 @@
# process, which may cause wedges in the gate later.
psycopg2
psutil>=1.1.1,<3.2.2
PyMySQL>=0.6.2 # MIT License

View File

@ -1023,7 +1023,7 @@ class TestDhcpAgentEventHandler(base.BaseTestCase):
method_path = ('neutron.agent.metadata.driver.MetadataDriver'
'.spawn_monitored_metadata_proxy')
with mock.patch(method_path) as spawn, \
mock.patch.object(netutils, 'is_ipv6_enabled') as mock_ipv6:
mock.patch.object(netutils, 'is_ipv6_enabled') as mock_ipv6:
mock_ipv6.return_value = True
self.call_driver.return_value = 'fake-interface'
self.dhcp.enable_isolated_metadata_proxy(network)

View File

@ -2668,9 +2668,9 @@ class TestBasicRouterOperations(BasicRouterOperationsFramework):
driver = metadata_driver.MetadataDriver
with mock.patch.object(
driver, 'destroy_monitored_metadata_proxy') as destroy_proxy, \
mock.patch.object(
driver, 'spawn_monitored_metadata_proxy') as spawn_proxy, \
mock.patch.object(netutils, 'is_ipv6_enabled') as ipv6_mock:
mock.patch.object(
driver, 'spawn_monitored_metadata_proxy') as spawn_proxy, \
mock.patch.object(netutils, 'is_ipv6_enabled') as ipv6_mock:
ipv6_mock.return_value = True
agent._process_added_router(router)
if enableflag:

View File

@ -8,7 +8,7 @@ PasteDeploy>=1.5.0 # MIT
Routes>=2.3.1 # MIT
debtcollector>=1.19.0 # Apache-2.0
decorator>=3.4.0 # BSD
eventlet>=0.21.0 # MIT
eventlet>=0.22.1 # MIT
pecan>=1.3.2 # BSD
httplib2>=0.9.1 # MIT
requests>=2.14.2 # Apache-2.0
@ -22,11 +22,11 @@ tenacity>=6.0.0 # Apache-2.0
SQLAlchemy>=1.2.0 # MIT
WebOb>=1.8.2 # MIT
keystoneauth1>=3.14.0 # Apache-2.0
alembic>=0.8.10 # MIT
alembic>=0.9.6 # MIT
stevedore>=1.20.0 # Apache-2.0
oslo.cache>=1.26.0 # Apache-2.0
oslo.concurrency>=3.26.0 # Apache-2.0
oslo.config>=5.2.0 # Apache-2.0
oslo.config>=6.0.0 # Apache-2.0
oslo.context>=2.22.0 # Apache-2.0
oslo.db>=4.44.0 # Apache-2.0
oslo.i18n>=3.20.0 # Apache-2.0
@ -38,7 +38,7 @@ oslo.privsep>=2.3.0 # Apache-2.0
oslo.reports>=1.18.0 # Apache-2.0
oslo.rootwrap>=5.8.0 # Apache-2.0
oslo.serialization>=2.25.0 # Apache-2.0
oslo.service!=1.28.1,>=1.24.0 # Apache-2.0
oslo.service>=1.31.0 # Apache-2.0
oslo.upgradecheck>=0.1.0 # Apache-2.0
oslo.utils>=4.4.0 # Apache-2.0
oslo.versionedobjects>=1.35.1 # Apache-2.0
@ -54,7 +54,7 @@ pyOpenSSL>=17.1.0 # Apache-2.0
python-novaclient>=9.1.0 # Apache-2.0
openstacksdk>=0.31.2 # Apache-2.0
python-designateclient>=2.7.0 # Apache-2.0
os-xenapi>=0.3.1 # Apache-2.0
os-xenapi>=0.3.4 # Apache-2.0
os-vif>=1.15.1 # Apache-2.0
futurist>=1.2.0 # Apache-2.0
tooz>=1.58.0 # Apache-2.0

View File

@ -5,7 +5,7 @@ hacking>=3.0.1,<3.1.0 # Apache-2.0
bandit!=1.6.0,>=1.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
flake8-import-order==0.12 # LGPLv3
flake8-import-order==0.18.1 # LGPLv3
python-subunit>=1.0.0 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
testresources>=2.0.0 # Apache-2.0/BSD
@ -15,8 +15,8 @@ oslotest>=3.2.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
reno>=3.1.0 # Apache-2.0
ddt>=1.0.1 # MIT
astroid==2.3.3 # LGPLv2.1
pylint==2.4.4 # GPLv2
astroid==2.4.0 # LGPLv2.1
pylint==2.5.3 # GPLv2
isort==4.3.21 # MIT
# Needed to run DB commands in virtualenvs
PyMySQL>=0.7.6 # MIT License

View File

@ -153,11 +153,12 @@ commands = sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
# E126 continuation line over-indented for hanging indent
# E128 continuation line under-indented for visual indent
# H405 multi line docstring summary not separated with an empty line
# I202 Additional newline in a group of imports
# N530 direct neutron imports not allowed
# TODO(amotoki) check the following new rules should be fixed or ignored
# E731 do not assign a lambda expression, use a def
# W504 line break after binary operator
ignore = E126,E128,E731,H405,N530,W504
ignore = E126,E128,E731,I202,H405,N530,W504
# H106: Don't put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
# H204: Use assert(Not)Equal to check for equality