diff --git a/pyproject.toml b/pyproject.toml index a69156c..e5dd8e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,6 @@ authors = [ {name = "OpenXbox"}, ] dependencies = [ - "appdirs", "ecdsa", "httpx", "ms_cv", @@ -31,6 +30,11 @@ dynamic = ["version"] [project.urls] Homepage = "https://github.com/tr4nt0r/python-xbox" +[project.optional-dependencies] +cli = [ + "platformdirs>=4.5.0" +] + [project.scripts] xbox-authenticate = "pythonxbox.scripts.authenticate:main" xbox-change-gt = "pythonxbox.scripts.change_gamertag:main" @@ -90,7 +94,7 @@ packages = ["src/pythonxbox"] [tool.hatch.envs.default] python = "3.13" dependencies = [ - "appdirs==1.4.4", + "platformdirs==4.5.0", "ecdsa==0.19.1", "httpx==0.28.1", "ms_cv==0.1.1", diff --git a/src/pythonxbox/scripts/__init__.py b/src/pythonxbox/scripts/__init__.py index 6eca9df..aa75f23 100644 --- a/src/pythonxbox/scripts/__init__.py +++ b/src/pythonxbox/scripts/__init__.py @@ -1,6 +1,6 @@ import os -from appdirs import user_data_dir +from platformdirs import user_data_dir CLIENT_ID = "388ea51c-0b25-4029-aae2-17df49d23905" # No secret needed, we registered as "Desktop App" in Azure AD diff --git a/src/pythonxbox/scripts/authenticate.py b/src/pythonxbox/scripts/authenticate.py index 6fb2587..5cf265a 100644 --- a/src/pythonxbox/scripts/authenticate.py +++ b/src/pythonxbox/scripts/authenticate.py @@ -96,7 +96,7 @@ async def do_auth( with open(token_filepath, mode="w") as f: print(f"Finished authentication, writing tokens to {token_filepath}") - f.write(auth_mgr.oauth.json()) + f.write(auth_mgr.oauth.model_dump_json()) async def async_main():