Merge ~raharper/cloud-init:fix/pylint-no-member into cloud-init:master

Proposed by Ryan Harper on 2019-09-25
Status: Merged
Approved by: Dan Watkins on 2019-09-25
Approved revision: 92227e036d36273b973b87cd94527d602498ed7f
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~raharper/cloud-init:fix/pylint-no-member
Merge into: cloud-init:master
Diff against target: 10 lines (+1/-1)
1 file modified
.pylintrc (+1/-1)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve on 2019-09-25
Scott Moser 2019-09-25 Approve on 2019-09-25
Review via email: mp+373177@code.launchpad.net

Commit message

pylintrc: add 'enter_context' to generated-members list

On Bionic (python 3.6.8) we now see no-member errors on untouched code.
This does not reproduce on Xenial (3.5) nor on Eoan (3.7.4). The source
of the failure was the release of astroid 2.3.0 vs. 2.2.5. Resolve this
by adding the member attribute to the generated member list in pylintrc.
This fixes CI failures.

To post a comment you must log in.

PASSED: Continuous integration, rev:92227e036d36273b973b87cd94527d602498ed7f
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1171/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1171//rebuild

review: Approve (continuous-integration)
Scott Moser (smoser) wrote :

Did the bionic version of pylint fail?
Really just curious what changed.

Ryan Harper (raharper) wrote :

Yes, you can reproduce inside a bionic lxd container with master. just tox -e pylint

Ryan Harper (raharper) wrote :
Ryan Harper (raharper) wrote :

From Paride,

## [E1101(no-member), TestConfig.test_handle_with_no_growpart_entry]
## Instance of 'AbstractContextManager' has no 'enter_context' member

This is caused by astroid 2.3.0 (released yesterday). It does not happen
with Python 3.7, but with Python 3.6 it does. This could be because
contextlib2 (where the failures happen) does nothing in Py37, as there
is nothing to backport.

Scott Moser (smoser) wrote :

seems like filing an issue with astroid would be good thing to do.

but other than that, i guess approve.

Scott Moser (smoser) :
review: Approve

Commit message lints:
- Line #3 has 69 too many characters. Line starts with: "This does not reproduce"...

review: Needs Fixing
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.pylintrc b/.pylintrc
2index e376b48..365c8c8 100644
3--- a/.pylintrc
4+++ b/.pylintrc
5@@ -67,5 +67,5 @@ ignored-classes=argparse.Namespace,optparse.Values,thread._local
6 # List of members which are set dynamically and missed by pylint inference
7 # system, and so shouldn't trigger E1101 when accessed. Python regular
8 # expressions are accepted.
9-generated-members=types,http.client,command_handlers,m_.*
10+generated-members=types,http.client,command_handlers,m_.*,enter_context
11

Subscribers

People subscribed via source and target branches