Skip to content

Commit

Permalink
Deprecation following the separation of emacs related file to https:/…
Browse files Browse the repository at this point in the history
…/github.com/emacsorphanage/pylint (#7783)


Co-authored-by: Jonas Bernoulli <[email protected]>
Co-authored-by: Jacob Walls <[email protected]>
  • Loading branch information
3 people authored Nov 19, 2022
1 parent 8811992 commit b2462c9
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 316 deletions.
6 changes: 5 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,15 @@ Pylint ships with three additional tools:

- pyreverse_ (standalone tool that generates package and class diagrams.)
- symilar_ (duplicate code finder that is also integrated in pylint)
- epylint_ (Emacs and Flymake compatible Pylint)

.. _pyreverse: https://pylint.pycqa.org/en/latest/pyreverse.html
.. _symilar: https://pylint.pycqa.org/en/latest/symilar.html

The epylint_ Emacs package, which includes Flymake support, is now maintained
in `its own repository`_.

.. _epylint: https://pylint.pycqa.org/en/latest/user_guide/ide_integration/flymake-emacs.html
.. _its own repository: https://github.com/emacsorphanage/pylint

Projects that you might want to use alongside pylint include flake8_ (faster and simpler checks
with very few false positives), mypy_, pyright_ or pyre_ (typing checks), bandit_ (security
Expand Down
3 changes: 1 addition & 2 deletions doc/development_guide/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ Python program thanks to their APIs:

.. sourcecode:: python

from pylint import run_pylint, run_epylint, run_pyreverse, run_symilar
from pylint import run_pylint, run_pyreverse, run_symilar

run_pylint("--disable=C", "myfile.py")
run_epylint(...)
run_pyreverse(...)
run_symilar(...)

Expand Down
10 changes: 4 additions & 6 deletions doc/user_guide/installation/ide_integration/flymake-emacs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ Using Pylint through Flymake in Emacs
=====================================

.. warning::
If you're reading this doc and are actually using flymake please
open a support question at https://github.com/PyCQA/pylint/issues/new/choose
and tell us, we don't have any maintainers for emacs and are thinking about
dropping the support.

.. TODO 3.0, do we still need to support flymake ?
The Emacs package now has its own repository and is looking for a maintainer.
If you're reading this doc and are interested in maintaining this package or
are actually using flymake please open an issue at
https://github.com/emacsorphanage/pylint/issues/new/choose

To enable Flymake for Python, insert the following into your .emacs:

Expand Down
5 changes: 5 additions & 0 deletions doc/whatsnew/fragments/7737.other
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
epylint is now deprecated and will be removed in pylint 3.0.0. All emacs and flymake related
files were removed and their support will now happen in an external repository :
https://github.com/emacsorphanage/pylint.

Closes #7737
15 changes: 0 additions & 15 deletions elisp/pylint-flymake.el

This file was deleted.

255 changes: 0 additions & 255 deletions elisp/pylint.el

This file was deleted.

17 changes: 0 additions & 17 deletions elisp/startup

This file was deleted.

7 changes: 7 additions & 0 deletions pylint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import os
import sys
import warnings
from collections.abc import Sequence
from typing import NoReturn

Expand Down Expand Up @@ -54,6 +55,12 @@ def run_epylint(argv: Sequence[str] | None = None) -> NoReturn:
"""
from pylint.epylint import Run as EpylintRun

warnings.warn(
"'run_epylint' will be removed in pylint 3.0, use "
"https://github.com/emacsorphanage/pylint instead.",
DeprecationWarning,
stacklevel=1,
)
EpylintRun(argv)


Expand Down
11 changes: 11 additions & 0 deletions pylint/epylint.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import os
import shlex
import sys
import warnings
from collections.abc import Sequence
from io import StringIO
from subprocess import PIPE, Popen
Expand Down Expand Up @@ -168,6 +169,11 @@ def py_run(
To silently run Pylint on a module, and get its standard output and error:
>>> (pylint_stdout, pylint_stderr) = py_run( 'module_name.py', True)
"""
warnings.warn(
"'epylint' will be removed in pylint 3.0, use https://github.com/emacsorphanage/pylint instead.",
DeprecationWarning,
stacklevel=2,
)
# Detect if we use Python as executable or not, else default to `python`
executable = sys.executable if "python" in sys.executable else "python"

Expand Down Expand Up @@ -198,6 +204,11 @@ def py_run(


def Run(argv: Sequence[str] | None = None) -> NoReturn:
warnings.warn(
"'epylint' will be removed in pylint 3.0, use https://github.com/emacsorphanage/pylint instead.",
DeprecationWarning,
stacklevel=2,
)
if not argv and len(sys.argv) == 1:
print(f"Usage: {sys.argv[0]} <filename> [options]")
sys.exit(1)
Expand Down
Loading

0 comments on commit b2462c9

Please sign in to comment.