From c760757dc1694f9d44cc41a53bcddfba8fa67e19 Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sat, 21 Aug 2021 08:54:51 +0200 Subject: [PATCH 1/2] Fix changelog --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index d2f9d99a00..ce7a8610b7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,9 @@ What's New in Pylint 2.10.2? ============================ Release date: TBA +.. + Put bug fixes that should not wait for a new minor version here + What's New in Pylint 2.10.1? From 013607974cfc344f887b1e0e015fba4638ce976e Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Sat, 21 Aug 2021 09:04:05 +0200 Subject: [PATCH 2/2] Migrate from appdirs to platformdirs Closes #4886 --- ChangeLog | 3 +++ pylint/config/__init__.py | 4 ++-- setup.cfg | 6 +++--- tests/lint/unittest_lint.py | 4 ++-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index ce7a8610b7..49fc5d968f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,9 @@ Release date: TBA .. Put bug fixes that should not wait for a new minor version here +* We now use platformdirs instead of appdirs since the latter is not maintained. + + Closes #4886 What's New in Pylint 2.10.1? diff --git a/pylint/config/__init__.py b/pylint/config/__init__.py index c9a200315f..8c85cc7fa3 100644 --- a/pylint/config/__init__.py +++ b/pylint/config/__init__.py @@ -40,7 +40,7 @@ import sys from datetime import datetime -import appdirs +import platformdirs from pylint.config.configuration_mixin import ConfigurationMixIn from pylint.config.find_default_config_files import find_default_config_files @@ -69,7 +69,7 @@ elif USER_HOME == "~": PYLINT_HOME = ".pylint.d" else: - PYLINT_HOME = appdirs.user_cache_dir("pylint") + PYLINT_HOME = platformdirs.user_cache_dir("pylint") # The spam prevention is due to pylint being used in parallel by # pre-commit, and the message being spammy in this context # Also if you work with old version of pylint that recreate the diff --git a/setup.cfg b/setup.cfg index b04fcf1f25..bdf0a87431 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,7 +42,7 @@ project_urls = [options] packages = find: install_requires = - appdirs>=1.4.0 + platformdirs>=2.0.0 astroid>=2.7.2,<2.8 # (You should also upgrade requirements_test_min.txt) isort>=4.2.5,<6 mccabe>=0.6,<0.7 @@ -75,7 +75,7 @@ markers = [isort] multi_line_output = 3 line_length = 88 -known_third_party = appdirs, astroid, sphinx, isort, pytest, mccabe, six, toml +known_third_party = platformdirs, astroid, sphinx, isort, pytest, mccabe, six, toml include_trailing_comma = True skip_glob = tests/functional/**,tests/input/**,tests/extensions/data/**,tests/regrtest_data/**,tests/data/**,astroid/**,venv/** src_paths = pylint @@ -83,7 +83,7 @@ src_paths = pylint [mypy] scripts_are_modules = True -[mypy-appdirs] +[mypy-platformdirs] ignore_missing_imports = True [mypy-astroid.*] diff --git a/tests/lint/unittest_lint.py b/tests/lint/unittest_lint.py index 8c8a1c550e..fee47c9cf0 100644 --- a/tests/lint/unittest_lint.py +++ b/tests/lint/unittest_lint.py @@ -49,7 +49,7 @@ from os.path import abspath, basename, dirname, isdir, join, sep from shutil import rmtree -import appdirs +import platformdirs import pytest from pylint import checkers, config, exceptions, interfaces, lint, testutils @@ -635,7 +635,7 @@ def test_pylint_home(): if uhome == "~": expected = ".pylint.d" else: - expected = appdirs.user_cache_dir("pylint") + expected = platformdirs.user_cache_dir("pylint") assert config.PYLINT_HOME == expected try: