Skip to content

Commit 89ea461

Browse files
authored
Replace deprecated appdirs with platformdirs (#17)
1 parent c515c11 commit 89ea461

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ authors = [
55
{name = "OpenXbox"},
66
]
77
dependencies = [
8-
"appdirs",
98
"ecdsa",
109
"httpx",
1110
"ms_cv",
@@ -31,6 +30,11 @@ dynamic = ["version"]
3130
[project.urls]
3231
Homepage = "https://github.com/tr4nt0r/python-xbox"
3332

33+
[project.optional-dependencies]
34+
cli = [
35+
"platformdirs>=4.5.0"
36+
]
37+
3438
[project.scripts]
3539
xbox-authenticate = "pythonxbox.scripts.authenticate:main"
3640
xbox-change-gt = "pythonxbox.scripts.change_gamertag:main"
@@ -90,7 +94,7 @@ packages = ["src/pythonxbox"]
9094
[tool.hatch.envs.default]
9195
python = "3.13"
9296
dependencies = [
93-
"appdirs==1.4.4",
97+
"platformdirs==4.5.0",
9498
"ecdsa==0.19.1",
9599
"httpx==0.28.1",
96100
"ms_cv==0.1.1",

src/pythonxbox/scripts/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22

3-
from appdirs import user_data_dir
3+
from platformdirs import user_data_dir
44

55
CLIENT_ID = "388ea51c-0b25-4029-aae2-17df49d23905"
66
# No secret needed, we registered as "Desktop App" in Azure AD

src/pythonxbox/scripts/authenticate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async def do_auth(
9696

9797
with open(token_filepath, mode="w") as f:
9898
print(f"Finished authentication, writing tokens to {token_filepath}")
99-
f.write(auth_mgr.oauth.json())
99+
f.write(auth_mgr.oauth.model_dump_json())
100100

101101

102102
async def async_main():

0 commit comments

Comments
 (0)