From fb9e876a4cf908dc940449d96a2daa75b5e53f99 Mon Sep 17 00:00:00 2001 From: Sophie Brun Date: Thu, 23 Jan 2025 11:29:41 +0100 Subject: [PATCH] Replace deprecated appdirs with platformdirs --- requirements.txt | 2 +- src/pyshark/cache.py | 4 ++-- src/setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index 0c5de46e..78d6e0f3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # Development requirements. Only required for testing -appdirs +platformdirs py pytest lxml diff --git a/src/pyshark/cache.py b/src/pyshark/cache.py index 78f13ed5..0de585fa 100644 --- a/src/pyshark/cache.py +++ b/src/pyshark/cache.py @@ -1,11 +1,11 @@ import pathlib import shutil -import appdirs +import platformdirs def get_cache_dir(tshark_version) -> pathlib.Path: - cache_dir = pathlib.Path(appdirs.user_cache_dir(appname="pyshark", version=tshark_version)) + cache_dir = pathlib.Path(platformdirs.user_cache_dir(appname="pyshark", version=tshark_version)) if not cache_dir.exists(): cache_dir.mkdir(parents=True) return cache_dir diff --git a/src/setup.py b/src/setup.py index f98a57e5..54f8e054 100644 --- a/src/setup.py +++ b/src/setup.py @@ -9,7 +9,7 @@ version="0.6.1", packages=find_packages(), package_data={'': ['*.ini', '*.pcapng']}, - install_requires=['lxml', 'termcolor', 'packaging', 'appdirs'], + install_requires=['lxml', 'termcolor', 'packaging', 'platformdirs'], tests_require=['pytest'], url="https://github.com/KimiNewt/pyshark", license="MIT",