diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 6b43e22..3c77f06 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -11,10 +11,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.9, "3.10", 3.11, 3.12] + python-version: [3.8, 3.9, "3.10", 3.11, 3.12, 3.13] steps: - uses: actions/checkout@v2 - + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: diff --git a/s3path/current_version.py b/s3path/current_version.py index b77f83e..b74628c 100644 --- a/s3path/current_version.py +++ b/s3path/current_version.py @@ -57,6 +57,10 @@ class PureS3Path(PurePath): S3 is not a file-system but we can look at it like a POSIX system. """ _flavour = flavour + + if sys.version_info >= (3, 13): + parser = _S3Flavour() + __slots__ = () def __init__(self, *args): @@ -70,7 +74,10 @@ def __init__(self, *args): new_parts.remove(part) self._raw_paths = new_parts - self._load_parts() + if sys.version_info >= (3, 13): + self._drv, self._root, self._tail_cached = self._parse_path(self._raw_path) + else: + self._load_parts() @classmethod def from_uri(cls, uri: str):