Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support python 3.11 #376

Merged
merged 5 commits into from
Sep 11, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11-dev']

steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1

- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand Down
18 changes: 17 additions & 1 deletion artifactory.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,13 @@ def __iter__(self):
return self.iterator


class _ArtifactoryAccessor(pathlib._Accessor):
_artifactory_access_parent_class = (
pathlib.WindowsPath if os.name == "nt" else pathlib.PosixPath
)


class _ArtifactoryAccessor(_artifactory_access_parent_class):
allburov marked this conversation as resolved.
Show resolved Hide resolved

"""
Implements operations with Artifactory REST API
"""
Expand Down Expand Up @@ -1897,6 +1903,16 @@ def lchmod(self, mode):
"""
raise NotImplementedError()

def unlink(self, missing_ok=False):
beliaev-maksim marked this conversation as resolved.
Show resolved Hide resolved
"""
Removes a file or folder
"""
try:
self._accessor.unlink(self)
except ArtifactoryException:
if not missing_ok:
allburov marked this conversation as resolved.
Show resolved Hide resolved
raise

def symlink_to(self, target, target_is_directory=False):
"""
Throw NotImplementedError
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development :: Libraries",
"Topic :: System :: Filesystems",
],
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ envlist =
py38
py39
py310
py311
pre-commit

[testenv]
Expand Down