update pylint to 1.9.2
The older version of pylint being used does not work correctly under python 3. In order to be able to update the pylint job to run under python 3, we need to update the tool. This patch updates to the latest version at this time. It also updates and pins astroid, which was previously capped. Using a pin instead of a cap should let us avoid issues with new releases while being specific about which version to actually use. Disable not-callable because that appears to be a new rule that is confused by the use of properties to access things that are set to callables. Co-Authored-By: Fan Zhang <zh.f@outlook.com> Co-Authored-By: Marcin Piwowarczyk <m.piwowarczy@samsung.com> Change-Id: I65705804b222dcd30a653fe10be3d823fa6143ff Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
parent
6c6d43eb1a
commit
7e4e25f12f
@ -3,7 +3,7 @@ alembic==0.9.8
|
||||
amqp==2.2.2
|
||||
appdirs==1.4.3
|
||||
asn1crypto==0.24.0
|
||||
astroid==1.3.8
|
||||
astroid==1.6.5 # LGPLv2.1
|
||||
Babel==2.3.4
|
||||
bandit==1.1.0
|
||||
beautifulsoup4==4.6.0
|
||||
@ -107,7 +107,7 @@ pycparser==2.18
|
||||
pyflakes==1.0.0
|
||||
Pygments==2.2.0
|
||||
pyinotify==0.9.6
|
||||
pylint==1.4.5
|
||||
pylint==1.9.2 # GPLv2
|
||||
pymongo==3.0.2
|
||||
PyMySQL==0.7.6
|
||||
pyOpenSSL==17.5.0
|
||||
|
@ -25,5 +25,5 @@ cassandra-driver!=3.6.0,>=2.1.4 # Apache-2.0
|
||||
couchdb>=0.8 # Apache-2.0
|
||||
stestr>=1.1.0 # Apache-2.0
|
||||
doc8>=0.6.0 # Apache-2.0
|
||||
astroid<1.4.0 # LGPLv2.1 # breaks pylint 1.4.4
|
||||
pylint==1.4.5 # GPLv2
|
||||
astroid==1.6.5 # LGPLv2.1
|
||||
pylint==1.9.2 # GPLv2
|
||||
|
@ -161,10 +161,7 @@ and astroid. In testing, I've found that if the version of either of
|
||||
these changes, you could either have a failure of the tool (exceptions
|
||||
thrown, ...) or a different set of errors reported.
|
||||
|
||||
Currently, test-requirements.txt sets these versions in this way.
|
||||
|
||||
astroid<1.4.0 # LGPLv2.1 # breaks pylint 1.4.4
|
||||
pylint==1.4.5 # GPLv2
|
||||
Refer to test-requirements.txt to see the versions currently being used.
|
||||
|
||||
If you run the tool on your machine and find that there are no errors,
|
||||
but find that either the CI generates errors, or that the tool run
|
||||
|
@ -7,7 +7,7 @@
|
||||
"Undefined variable '_LW'"
|
||||
],
|
||||
"folder": "trove",
|
||||
"ignored_codes": [],
|
||||
"ignored_codes": ["not-callable"],
|
||||
"ignored_file_code_messages": [
|
||||
[
|
||||
"trove/backup/models.py",
|
||||
|
@ -207,10 +207,7 @@ class IniCodec(StreamCodec):
|
||||
|
||||
def deserialize(self, stream):
|
||||
parser = self._init_config_parser()
|
||||
if sys.version_info >= (3, 2):
|
||||
parser.read_file(self._pre_parse(stream))
|
||||
else:
|
||||
parser.readfp(self._pre_parse(stream))
|
||||
parser.readfp(self._pre_parse(stream))
|
||||
|
||||
return {s: {k:
|
||||
StringConverter({None: self._default_value}).to_objects(v)
|
||||
|
@ -132,10 +132,10 @@ def clean_db():
|
||||
meta.bind = engine
|
||||
meta.reflect()
|
||||
with contextlib.closing(engine.connect()) as con:
|
||||
trans = con.begin()
|
||||
trans = con.begin() # pylint: disable=E1101
|
||||
for table in reversed(meta.sorted_tables):
|
||||
if table.name != "migrate_version":
|
||||
con.execute(table.delete())
|
||||
con.execute(table.delete()) # pylint: disable=E1101
|
||||
trans.commit()
|
||||
|
||||
|
||||
|
@ -838,10 +838,10 @@ class PgSqlAdmin(object):
|
||||
:type user: PostgreSQLUser
|
||||
"""
|
||||
# Postgresql requires that you revoke grants before dropping the user
|
||||
dbs = self.list_access(context, user.name, None)
|
||||
for d in dbs:
|
||||
db = models.PostgreSQLSchema.deserialize(d)
|
||||
self.revoke_access(context, user.name, None, db.name)
|
||||
databases = list(self.list_access(context, user.name, None))
|
||||
for db in databases:
|
||||
db_schema = models.PostgreSQLSchema.deserialize(db)
|
||||
self.revoke_access(context, user.name, None, db_schema.name)
|
||||
|
||||
LOG.info(
|
||||
"{guest_id}: Dropping user {name}.".format(
|
||||
|
@ -1363,6 +1363,8 @@ class BuiltInstanceTasks(BuiltInstance, NotifyMixin, ConfigurationMixin):
|
||||
volume = self.volume_client.volumes.get(self.volume_id)
|
||||
volume_device = self._fix_device_path(
|
||||
volume.attachments[0]['device'])
|
||||
if volume:
|
||||
upgrade_info['device'] = volume_device
|
||||
|
||||
# BUG(1650518): Cleanup in the Pike release some instances
|
||||
# that we will be upgrading will be pre secureserialier
|
||||
@ -1394,13 +1396,10 @@ class BuiltInstanceTasks(BuiltInstance, NotifyMixin, ConfigurationMixin):
|
||||
sleep_time=2, time_out=600)
|
||||
if not self.server_status_matches(['ACTIVE']):
|
||||
raise TroveError(_("Instance %(instance)s failed to "
|
||||
"upgrade to %(datastore_version)s"),
|
||||
"upgrade to %(datastore_version)s") %
|
||||
{'instance': self,
|
||||
'datastore_version': datastore_version})
|
||||
|
||||
if volume:
|
||||
upgrade_info['device'] = volume_device
|
||||
|
||||
self.guest.post_upgrade(upgrade_info)
|
||||
|
||||
self.reset_task_status()
|
||||
|
Loading…
Reference in New Issue
Block a user