Repository: ranaroussi/yfinance (language: python)

Issue:
Replace 'appdirs' dependency with 'platformdirs'
`platformdirs` is the fork to abandoned `appdirs`. https://github.com/platformdirs/platformdirs

Should be a simple drop-in replacement. https://github.com/ranaroussi/yfinance/blob/1d31e7ca016768c5a3f820c29049d3aa25132b7d/yfinance/cache.py#L4


Discussion / hints:

Fix patch:
diff --git a/meta.yaml b/meta.yaml
index 843a8f43f..eaff1c58b 100644
--- a/meta.yaml
+++ b/meta.yaml
@@ -21,7 +21,7 @@ requirements:
     - requests >=2.31
     - multitasking >=0.0.7
     - lxml >=4.9.1
-    - appdirs >=1.4.4
+    - platformdirs >=2.0.0
     - pytz >=2022.5
     - frozendict >=2.3.4
     - beautifulsoup4 >=4.11.1
@@ -37,7 +37,7 @@ requirements:
     - requests >=2.31
     - multitasking >=0.0.7
     - lxml >=4.9.1
-    - appdirs >=1.4.4
+    - platformdirs >=2.0.0
     - pytz >=2022.5
     - frozendict >=2.3.4
     - beautifulsoup4 >=4.11.1
diff --git a/requirements.txt b/requirements.txt
index b8768416b..f19ca36b1 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -3,7 +3,7 @@ numpy>=1.16.5
 requests>=2.31
 multitasking>=0.0.7
 lxml>=4.9.1
-appdirs>=1.4.4
+platformdirs>=2.0.0
 pytz>=2022.5
 frozendict>=2.3.4
 beautifulsoup4>=4.11.1
diff --git a/setup.py b/setup.py
index 88050d963..9b0c073b4 100644
--- a/setup.py
+++ b/setup.py
@@ -61,7 +61,7 @@
     packages=find_packages(exclude=['contrib', 'docs', 'tests', 'examples']),
     install_requires=['pandas>=1.3.0', 'numpy>=1.16.5',
                       'requests>=2.31', 'multitasking>=0.0.7',
-                      'lxml>=4.9.1', 'appdirs>=1.4.4', 'pytz>=2022.5',
+                      'lxml>=4.9.1', 'platformdirs>=2.0.0', 'pytz>=2022.5',
                       'frozendict>=2.3.4', 'peewee>=3.16.2',
                       'beautifulsoup4>=4.11.1', 'html5lib>=1.1'],
     extras_require={
diff --git a/yfinance/cache.py b/yfinance/cache.py
index e34254909..0ab73c855 100644
--- a/yfinance/cache.py
+++ b/yfinance/cache.py
@@ -1,7 +1,7 @@
 import peewee as _peewee
 from threading import Lock
 import os as _os
-import appdirs as _ad
+import platformdirs as _ad
 import atexit as _atexit
 import datetime as _datetime
 import pickle as _pkl


Test patch:
diff --git a/tests/context.py b/tests/context.py
index a9ec7d07e..598cfa429 100644
--- a/tests/context.py
+++ b/tests/context.py
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 
-import appdirs as _ad
+import platformdirs as _ad
 import datetime as _dt
 import sys
 import os