diff --git a/ChangeLog b/ChangeLog index 4c39dd6623..c6c75dcbbd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,11 @@ Release date: TBA .. Put new features and bugfixes here and also in 'doc/whatsnew/2.9.rst' +* Add numversion back (temporarily) in ``__pkginfo__`` because it broke Pylama and revert the unnecessary + ``pylint.version`` breaking change. + + Closes #4399 + What's New in Pylint 2.8.0? =========================== @@ -46,7 +51,7 @@ Release date: 2021-04-24 * The 'doc' extra-require has been removed. * ``__pkginfo__`` now only contain ``__version__`` (also accessible with ``pylint.__version__``), other meta-information are still - accessible with ``import importlib;metadata.metadata('pylint')``. + accessible with ``from importlib import metadata;metadata.metadata('pylint')``. * COPYING has been renamed to LICENSE for standardization. diff --git a/doc/whatsnew/2.8.rst b/doc/whatsnew/2.8.rst index 23a6a84362..571a21a988 100644 --- a/doc/whatsnew/2.8.rst +++ b/doc/whatsnew/2.8.rst @@ -8,6 +8,17 @@ Summary -- Release highlights ============================= +Breaking changes +================ + +* The 'doc' extra-require has been removed. `__pkginfo__`` does not contain the package metadata anymore + (except ``numversion``, until 3.0). Meta-information are accessible with + +```python +from importlib import metadata +metadata.metadata('pylint') +``` +Prefer that to an import from ``__pkginfo__``. New checkers ============ @@ -43,9 +54,6 @@ Other Changes * The packaging is now done via setuptools exclusively. ``doc``, ``tests``, ``man``, ``elisp`` and ``Changelog`` are not packaged anymore - reducing the size of the package by 75%. -* The 'doc' extra-require has been removed. ``pylint.version`` is now ``pylint.__version__`` and ``__pkginfo__`` does - not contain the package metadata anymore. - * Updated ``astroid`` to 2.5.4 * COPYING has been renamed to LICENSE for standardization. diff --git a/pylint/__init__.py b/pylint/__init__.py index b02d57e735..14bf18d3b5 100644 --- a/pylint/__init__.py +++ b/pylint/__init__.py @@ -74,4 +74,5 @@ def modify_sys_path() -> None: sys.path.pop(1) -__all__ = ["__version__"] +version = __version__ +__all__ = ["__version__", "version"] diff --git a/pylint/__pkginfo__.py b/pylint/__pkginfo__.py index 43ed5090a7..d01c6a56a2 100644 --- a/pylint/__pkginfo__.py +++ b/pylint/__pkginfo__.py @@ -13,3 +13,7 @@ __version__ += f"a{dev_version}" else: __version__ += f".dev{dev_version}" + + +# Kept for compatibility reason, see https://github.com/PyCQA/pylint/issues/4399 +numversion = __version__.split(".")