summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-04-25 09:52:45 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-04-25 11:37:20 +0200
commitaf1ac5ebe1c845b7eb736863826d75e3994c496c (patch)
treeb369f95952ee33a3104e0836fb35db850e5b3c97
parent45b4fbd1ae022c33730fa7531991bca7bb13a178 (diff)
downloadpylint-git-af1ac5ebe1c845b7eb736863826d75e3994c496c.tar.gz
Better documentation on the packaging breaking changes
Closes #4399
-rw-r--r--ChangeLog7
-rw-r--r--doc/whatsnew/2.8.rst14
-rw-r--r--pylint/__init__.py3
-rw-r--r--pylint/__pkginfo__.py4
4 files changed, 23 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c39dd662..c6c75dcbb 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 23a6a8436..571a21a98 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 b02d57e73..14bf18d3b 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 43ed5090a..d01c6a56a 100644
--- a/pylint/__pkginfo__.py
+++ b/pylint/__pkginfo__.py
@@ -13,3 +13,7 @@ if dev_version is not None:
__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(".")