Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove (some) Python 2 specific checks #1896

Closed
PCManticore opened this issue Feb 21, 2018 · 2 comments
Closed

Remove (some) Python 2 specific checks #1896

PCManticore opened this issue Feb 21, 2018 · 2 comments
Labels
Good first issue Friendly and approachable by new contributors Help wanted 🙏 Outside help would be appreciated, good for new contributors

Comments

@PCManticore
Copy link
Contributor

PCManticore commented Feb 21, 2018

We have a bunch of checks that are only emitted when running on Python 2. We decided in #1763 to support only Python 3 for the next major release, which means that these checks will never be triggered and can be safely removed. Doing a git grep in the projects yield around +10 checks that are in this situation:

pylint/checkers/base.py:                  {'maxversion': (3, 3)}),
pylint/checkers/base.py:                      {'maxversion': (3, 0)}),
pylint/checkers/exceptions.py:              {'maxversion': (3, 0)}),
pylint/checkers/format.py:              {'maxversion': (3, 0)}),
pylint/checkers/imports.py:              {'maxversion': (3, 0)}),
pylint/checkers/misc.py:              {'maxversion': (3, 0)}),
pylint/checkers/newstyle.py:              {'maxversion': (3, 0)}),
pylint/checkers/newstyle.py:              {'maxversion': (3, 0)}),
pylint/checkers/newstyle.py:              {'maxversion': (3, 0)}),
pylint/checkers/newstyle.py:              {'maxversion': (3, 0)}),
pylint/checkers/newstyle.py:              {'maxversion': (3, 0)})

Note: we should not remove for now the checks from Python 3 porting checker (checkers/python3). We can definitely remove its checks that are syntax checks (say octal literal, which will never be triggered on Python 3), but for the rest of AST checks, we should remove the maxversion limit so that we could still run the py3k check but this on Python 3.

Note: We still want to keep some checks around. We now use typed_ast for parsing Python code, and we'll be able to parse Python 2 code as well via some special flag a la pylint --two. In this case we still want a bunch of checks around (but we can 🔥 the rest).

@PCManticore PCManticore added Help wanted 🙏 Outside help would be appreciated, good for new contributors Good first issue Friendly and approachable by new contributors labels Feb 21, 2018
@sushobhit27
Copy link
Contributor

@PCManticore I would like to work on this issue.

wogsland added a commit to wogsland/pylint that referenced this issue May 14, 2018
wogsland added a commit to wogsland/pylint that referenced this issue May 14, 2018
wogsland added a commit to wogsland/pylint that referenced this issue May 14, 2018
wogsland added a commit to wogsland/pylint that referenced this issue May 14, 2018
wogsland added a commit to wogsland/pylint that referenced this issue May 14, 2018
@PCManticore PCManticore changed the title Remove Python 2 specific checks Remove (some) Python 2 specific checks May 26, 2018
PCManticore pushed a commit that referenced this issue Aug 15, 2018
The Removed Python 2 specific checks are: deprecated-lambda, nonstandard-exception,
lowercase-l-suffix, slots-on-old-class, super-on-old-class, property-on-old-class,
old-style-class.

Close #1896
@graingert
Copy link
Contributor

@PCManticore why was deprecated-lambda py2 only? Seems valuable on python 3 too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Friendly and approachable by new contributors Help wanted 🙏 Outside help would be appreciated, good for new contributors
Projects
None yet
Development

No branches or pull requests

3 participants