Skip to content

Commit

Permalink
Better documentation on the packaging breaking changes
Browse files Browse the repository at this point in the history
Closes #4399
  • Loading branch information
Pierre-Sassoulas committed Apr 25, 2021
1 parent 45b4fbd commit c768e31
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
5 changes: 4 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Release date: TBA
..
Put new features and bugfixes here and also in 'doc/whatsnew/2.9.rst'

* Fixed some breaking change in 2.8.0, that we did not really have to do. The 'doc' extra-require and ``dependency_links``
and ``scripts`` from ``__pkginfo__`` are still removed.


What's New in Pylint 2.8.0?
===========================
Expand Down Expand Up @@ -46,7 +49,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.

Expand Down
14 changes: 11 additions & 3 deletions doc/whatsnew/2.8.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@
Summary -- Release highlights
=============================

Breaking changes
================

* The 'doc' extra-require has been removed. ``dependency_links`` and ``scripts`` have been removed from ``__pkginfo__``.
Meta-information are accessible with

```python
from importlib import metadata
metadata.metadata('pylint')
```
Prefer that to an import from ``__pkginfo__``.

New checkers
============
Expand Down Expand Up @@ -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.
3 changes: 2 additions & 1 deletion pylint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,5 @@ def modify_sys_path() -> None:
sys.path.pop(1)


__all__ = ["__version__"]
version = __version__
__all__ = ["__version__", "version"]
22 changes: 22 additions & 0 deletions pylint/__pkginfo__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/LICENSE

from importlib import metadata
from typing import Optional

__version__ = "2.8.1"
Expand All @@ -13,3 +14,24 @@
__version__ += f"a{dev_version}"
else:
__version__ += f".dev{dev_version}"


# Kept for compatibility reason, see https://github.com/PyCQA/pylint/issues/4399
pylint_info = metadata.metadata("pylint")
classifiers = []
project_urls = []
for header in pylint_info._headers: # type: ignore
key, value = header
if key == "Project-URL":
project_urls.append(value)
if key == "Classifier":
classifiers.append(value)
mailinglist = "mailto:code-quality@python.org"
numversion = pylint_info["version"].split(".")
version = pylint_info["version"]
install_requires = pylint_info["install_requires"]
license = pylint_info["license"] # pylint: disable=redefined-builtin # noqa
description = pylint_info["Keywords"]
web = pylint_info["Home-page"]
author = pylint_info["Author"]
author_email = pylint_info["Author-email"]

0 comments on commit c768e31

Please sign in to comment.