[ 
https://issues.apache.org/jira/browse/BEAM-8350?focusedWorklogId=327088&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-327088
 ]

ASF GitHub Bot logged work on BEAM-8350:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Oct/19 21:57
            Start Date: 11/Oct/19 21:57
    Worklog Time Spent: 10m 
      Work Description: chadrik commented on issue #9725: [BEAM-8350] Upgrade 
to Pylint 2.4
URL: https://github.com/apache/beam/pull/9725#issuecomment-541237653
 
 
   > Re: Py 2 deprecation date - I am not making a statement here on when. My 
argument was it has not happened yet, earliest it will happen in early 2020, 
and I would like to keep py2 linting support as long as py2 is supported in the 
codebase.
   
   Ah, sorry I misunderstood.  Yes, I agree we need to continue fully 
supporting python2 linting/tests for as long as the codebase supports python2.
   
   > Is the following correct for this change:
   > 
   > All py2 syntax errors will still be caught.
   
   yes, by virtue of the unittests.
   
   > There might be linting issues specific to py2 linter that might be missed 
but that is not harmful.
   
   Not quite.  I'm saying that, outside of syntax changes, there's not really a 
such thing as py2-specific linter issues.  I may be overlooking something here, 
so I welcome anyone fact checking me on this.  One thing that comes to mind is 
errors related to modules that were moved or renamed between python 2 and 3, 
but I did a quick check and I don't think pylint warns about this. 
   
   Lint rules are mostly about style, and Beam's style is the same on python 2 
as it is in python 3.  Outside of style, there are structural checks which 
apply equally to python 2 and 3.  So, since the lint rules are independent of 
python version (excluding syntax changes), nothing changes by virtue of running 
it in python3. 
   
   And lastly, there are additional style enforcements that can only be checked 
from python3 (like type annotations), hence this PR.  You'll notice that in 
this PR I had to fix some style issues in our `_py3*` suffixed files, because 
these were not being checked before, so that's another plus about this PR!
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 327088)
    Time Spent: 3h 40m  (was: 3.5h)

> Upgrade to pylint 2.4
> ---------------------
>
>                 Key: BEAM-8350
>                 URL: https://issues.apache.org/jira/browse/BEAM-8350
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: Chad Dombrova
>            Assignee: Chad Dombrova
>            Priority: Major
>          Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
> pylint 2.4 provides a number of new features and fixes, but the most 
> important/pressing one for me is that 2.4 adds support for understanding 
> python type annotations, which fixes a bunch of spurious unused import errors 
> in the PR I'm working on for BEAM-7746.
> As of 2.0, pylint dropped support for running tests in python2, so to make 
> the upgrade we have to move our lint jobs to python3.  Doing so will put 
> pylint into "python3-mode" and there is not an option to run in 
> python2-compatible mode.  That said, the beam code is intended to be python3 
> compatible, so in practice, performing a python3 lint on the Beam code-base 
> is perfectly safe.  The primary risk of doing this is that someone introduces 
> a python-3 only change that breaks python2, but these would largely be syntax 
> errors that would be immediately caught by the unit and integration tests.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to