diff --git a/poetry.lock b/poetry.lock index 77c49a6..8def6fd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. [[package]] name = "anyio" @@ -1723,6 +1723,17 @@ files = [ [package.dependencies] tokenize-rt = ">=5.2.0" +[[package]] +name = "pyxdg" +version = "0.28" +description = "PyXDG contains implementations of freedesktop.org standards in python." +optional = true +python-versions = "*" +files = [ + {file = "pyxdg-0.28-py2.py3-none-any.whl", hash = "sha256:bdaf595999a0178ecea4052b7f4195569c1ff4d344567bccdc12dfdf02d545ab"}, + {file = "pyxdg-0.28.tar.gz", hash = "sha256:3267bb3074e934df202af2ee0868575484108581e6f3cb006af1da35395e88b4"}, +] + [[package]] name = "pyyaml" version = "5.3.1" @@ -2529,17 +2540,6 @@ files = [ [package.dependencies] cffi = ">=1.0" -[[package]] -name = "xdg" -version = "6.0.0" -description = "Variables defined by the XDG Base Directory Specification" -optional = true -python-versions = ">=3.7,<4.0" -files = [ - {file = "xdg-6.0.0-py3-none-any.whl", hash = "sha256:df3510755b4395157fc04fc3b02467c777f3b3ca383257397f09ab0d4c16f936"}, - {file = "xdg-6.0.0.tar.gz", hash = "sha256:24278094f2d45e846d1eb28a2ebb92d7b67fc0cab5249ee3ce88c95f649a1c92"}, -] - [[package]] name = "zipp" version = "3.20.0" @@ -2562,9 +2562,9 @@ fs = ["xattr"] gkeep = ["gkeepapi", "gkeepapi"] google = ["google-api-python-client", "google-auth-oauthlib", "setuptools"] notion = ["notion-client"] -tw = ["taskw-ng", "xdg"] +tw = ["pyxdg", "taskw-ng"] [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<=3.12.5" -content-hash = "eba5002826c17b8831db5486299b466f8673c50f5bc900d8d3dcfe6530eb510b" +content-hash = "06b7da267d7fb19af91a988094d78f3039bdfe01b681de298c0ddc7cc45d78ec" diff --git a/pyproject.toml b/pyproject.toml index 1c35133..030cd73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ caldav = { version = "^0.11.0", optional = true } icalendar = { version = "^5.0.13", optional = true } taskw-ng = { version = "0.2.7", optional = true } xattr = { version = "^0.9.9", optional = true } -xdg = { version = "^6.0.0", optional = true } +pyxdg = { version = "^0.28", optional = true } loguru = "^0.5.3" python-dateutil = "^2.9.0.post0" @@ -85,7 +85,7 @@ gkeep = ["gkeepapi"] notion = ["notion-client"] asana = ["asana"] caldav = ["caldav", "icalendar"] -tw = ["taskw-ng", "xdg"] +tw = ["taskw-ng", "pyxdg"] fs = ["xattr"] # dev dependencies ------------------------------------------------------------- diff --git a/syncall/taskwarrior/taskwarrior_side.py b/syncall/taskwarrior/taskwarrior_side.py index e84d8f9..d513746 100644 --- a/syncall/taskwarrior/taskwarrior_side.py +++ b/syncall/taskwarrior/taskwarrior_side.py @@ -8,7 +8,7 @@ from bubop import logger, parse_datetime from taskw_ng import TaskWarrior from taskw_ng.warrior import TASKRC -from xdg import xdg_config_home +from xdg.BaseDirectory import xdg_config_home from syncall.sync_side import ItemType, SyncSide from syncall.types import TaskwarriorRawItem @@ -78,7 +78,7 @@ def __init__( config_file = None candidate_config_files = [ Path(TASKRC).expanduser(), - xdg_config_home() / "task" / "taskrc", + f"{xdg_config_home} / task / taskrc", ] if config_file_override is not None: if not config_file_override.is_file():