Author: Daniel Baumann Description: Migrating from appdirs to platformdirs (Closes: #1067983). diff -Naurp ptpython.orig/README.rst ptpython/README.rst --- ptpython.orig/README.rst +++ ptpython/README.rst @@ -201,8 +201,8 @@ Configuration ************* It is possible to create a ``config.py`` file to customize configuration. -ptpython will look in an appropriate platform-specific directory via `appdirs -`. See the ``appdirs`` documentation for the +ptpython will look in an appropriate platform-specific directory via `platformdirs +`. See the ``platformdirs`` documentation for the precise location for your platform. A ``PTPYTHON_CONFIG_HOME`` environment variable, if set, can also be used to explicitly override where configuration is looked for. diff -Naurp ptpython.orig/ptpython/entry_points/run_ptpython.py ptpython/ptpython/entry_points/run_ptpython.py --- ptpython.orig/ptpython/entry_points/run_ptpython.py +++ ptpython/ptpython/entry_points/run_ptpython.py @@ -33,7 +33,7 @@ import sys from textwrap import dedent from typing import IO -import appdirs +import platformdirs from prompt_toolkit.formatted_text import HTML from prompt_toolkit.shortcuts import print_formatted_text @@ -107,9 +107,9 @@ def get_config_and_history_file(namespac """ config_dir = os.environ.get( "PTPYTHON_CONFIG_HOME", - appdirs.user_config_dir("ptpython", "prompt_toolkit"), + platformdirs.user_config_dir("ptpython", "prompt_toolkit"), ) - data_dir = appdirs.user_data_dir("ptpython", "prompt_toolkit") + data_dir = platformdirs.user_data_dir("ptpython", "prompt_toolkit") # Create directories. for d in (config_dir, data_dir): diff -Naurp ptpython.orig/setup.py ptpython/setup.py --- ptpython.orig/setup.py +++ ptpython/setup.py @@ -26,7 +26,7 @@ setup( packages=find_packages("."), package_data={"ptpython": ["py.typed"]}, install_requires=[ - "appdirs", + "platformdirs", "importlib_metadata;python_version<'3.8'", "jedi>=0.16.0", # Use prompt_toolkit 3.0.43, because of `OneStyleAndTextTuple` import.