charmlibs-pathops 1.2.0.post0__tar.gz → 1.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/PKG-INFO +2 -2
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/pyproject.toml +4 -2
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_local_path.py +11 -1
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_types.py +5 -6
- charmlibs_pathops-1.3.0/src/charmlibs/pathops/_version.txt +1 -0
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs_pathops.egg-info/PKG-INFO +2 -2
- charmlibs_pathops-1.2.0.post0/src/charmlibs/pathops/_version.txt +0 -1
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/README.md +0 -0
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/setup.cfg +0 -0
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/__init__.py +0 -0
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_constants.py +0 -0
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_container_path.py +0 -0
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_errors.py +0 -0
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_fileinfo.py +0 -0
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_functions.py +0 -0
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/py.typed +0 -0
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs_pathops.egg-info/SOURCES.txt +0 -0
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs_pathops.egg-info/dependency_links.txt +0 -0
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs_pathops.egg-info/requires.txt +0 -0
- {charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs_pathops.egg-info/top_level.txt +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: charmlibs-pathops
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: A pathlib-like interface for Juju K8s charms to interact with files in their workload container.
|
|
5
5
|
Author: The Charm Tech team at Canonical Ltd.
|
|
6
|
+
License-Expression: Apache-2.0
|
|
6
7
|
Project-URL: Documentation, https://documentation.ubuntu.com/charmlibs/reference/charmlibs/pathops/
|
|
7
8
|
Project-URL: Repository, https://github.com/canonical/charmlibs
|
|
8
9
|
Project-URL: Issues, https://github.com/canonical/charmlibs/issues
|
|
9
10
|
Project-URL: Changelog, https://github.com/canonical/charmlibs/blob/main/pathops/CHANGELOG.md
|
|
10
11
|
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Operating System :: POSIX :: Linux
|
|
14
14
|
Classifier: Development Status :: 5 - Production/Stable
|
|
@@ -6,9 +6,9 @@ requires-python = ">=3.10"
|
|
|
6
6
|
authors = [
|
|
7
7
|
{name="The Charm Tech team at Canonical Ltd."},
|
|
8
8
|
]
|
|
9
|
+
license = "Apache-2.0"
|
|
9
10
|
classifiers = [
|
|
10
11
|
"Programming Language :: Python :: 3",
|
|
11
|
-
"License :: OSI Approved :: Apache Software License",
|
|
12
12
|
"Intended Audience :: Developers",
|
|
13
13
|
"Operating System :: POSIX :: Linux",
|
|
14
14
|
"Development Status :: 5 - Production/Stable",
|
|
@@ -57,4 +57,6 @@ pebble = ["v1.1.1","master"]
|
|
|
57
57
|
ubuntu = ["22.04", "latest"]
|
|
58
58
|
|
|
59
59
|
[tool.charmlibs.integration]
|
|
60
|
-
tags
|
|
60
|
+
# tags to run integration tests with (defaults to running once with no tag, i.e. tags = [''])
|
|
61
|
+
# Available in CI in tests/integration/pack.sh and integration tests as CHARMLIBS_TAG
|
|
62
|
+
tags = ["22.04", "24.04"] # The pathops pack.sh script uses CHARMLIBS_TAG to determine which base to pack for.
|
{charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_local_path.py
RENAMED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
from __future__ import annotations
|
|
18
18
|
|
|
19
19
|
import grp
|
|
20
|
+
import os
|
|
20
21
|
import pathlib
|
|
21
22
|
import pwd
|
|
22
23
|
import shutil
|
|
@@ -25,7 +26,9 @@ import typing
|
|
|
25
26
|
from . import _constants
|
|
26
27
|
|
|
27
28
|
if typing.TYPE_CHECKING:
|
|
28
|
-
from
|
|
29
|
+
from collections.abc import Iterator
|
|
30
|
+
|
|
31
|
+
from typing_extensions import Buffer, Self
|
|
29
32
|
|
|
30
33
|
|
|
31
34
|
class LocalPath(pathlib.PosixPath):
|
|
@@ -161,6 +164,13 @@ class LocalPath(pathlib.PosixPath):
|
|
|
161
164
|
self.chmod(mode)
|
|
162
165
|
return bytes_written
|
|
163
166
|
|
|
167
|
+
def glob( # pyright: ignore[reportIncompatibleMethodOverride]
|
|
168
|
+
self, pattern: str | os.PathLike[str]
|
|
169
|
+
) -> Iterator[Self]:
|
|
170
|
+
# On Python 3.12 and earlier, pathlib.Path.glob only accepts a str pattern.
|
|
171
|
+
# ContainerPath.glob accepts str | os.PathLike[str], so we normalise here to match.
|
|
172
|
+
return super().glob(os.fspath(pattern))
|
|
173
|
+
|
|
164
174
|
def mkdir(
|
|
165
175
|
self,
|
|
166
176
|
mode: int = _constants.DEFAULT_MKDIR_MODE,
|
|
@@ -22,7 +22,7 @@ from . import _constants
|
|
|
22
22
|
|
|
23
23
|
if typing.TYPE_CHECKING:
|
|
24
24
|
import os
|
|
25
|
-
from collections.abc import
|
|
25
|
+
from collections.abc import Iterator, Sequence
|
|
26
26
|
|
|
27
27
|
from typing_extensions import Self
|
|
28
28
|
|
|
@@ -244,7 +244,7 @@ class PathProtocol(typing.Protocol):
|
|
|
244
244
|
"""
|
|
245
245
|
...
|
|
246
246
|
|
|
247
|
-
def iterdir(self) ->
|
|
247
|
+
def iterdir(self) -> Iterator[Self]:
|
|
248
248
|
"""Yield objects of the same type corresponding to the directory's contents.
|
|
249
249
|
|
|
250
250
|
There are no guarantees about the order of the children. The special entries
|
|
@@ -259,9 +259,8 @@ class PathProtocol(typing.Protocol):
|
|
|
259
259
|
...
|
|
260
260
|
|
|
261
261
|
# NOTE: Not supported -- (Python 3.12) ``case_sensitive`` argument
|
|
262
|
-
# NOTE: Not supported -- (Python 3.13) ``pattern`` can be path-like
|
|
263
262
|
# NOTE: Not supported -- (Python 3.13) ``recurse_symlinks``
|
|
264
|
-
def glob(self, pattern: str) ->
|
|
263
|
+
def glob(self, pattern: str | os.PathLike[str]) -> Iterator[Self]:
|
|
265
264
|
r"""Iterate over this directory and yield all paths matching the provided pattern.
|
|
266
265
|
|
|
267
266
|
For example, ``path.glob('*.txt')``, ``path.glob('*/foo.txt')``.
|
|
@@ -271,8 +270,8 @@ class PathProtocol(typing.Protocol):
|
|
|
271
270
|
:meth:`ContainerPath.glob`.
|
|
272
271
|
|
|
273
272
|
Args:
|
|
274
|
-
pattern:
|
|
275
|
-
Matching is case-sensitive.
|
|
273
|
+
pattern: A :class:`str` or :class:`os.PathLike` object. The pattern must be relative,
|
|
274
|
+
meaning it cannot begin with ``'/'``. Matching is case-sensitive.
|
|
276
275
|
|
|
277
276
|
Returns:
|
|
278
277
|
A generator yielding objects of the same type as this path, corresponding to those
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1.3.0
|
{charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs_pathops.egg-info/PKG-INFO
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: charmlibs-pathops
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: A pathlib-like interface for Juju K8s charms to interact with files in their workload container.
|
|
5
5
|
Author: The Charm Tech team at Canonical Ltd.
|
|
6
|
+
License-Expression: Apache-2.0
|
|
6
7
|
Project-URL: Documentation, https://documentation.ubuntu.com/charmlibs/reference/charmlibs/pathops/
|
|
7
8
|
Project-URL: Repository, https://github.com/canonical/charmlibs
|
|
8
9
|
Project-URL: Issues, https://github.com/canonical/charmlibs/issues
|
|
9
10
|
Project-URL: Changelog, https://github.com/canonical/charmlibs/blob/main/pathops/CHANGELOG.md
|
|
10
11
|
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Operating System :: POSIX :: Linux
|
|
14
14
|
Classifier: Development Status :: 5 - Production/Stable
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1.2.0.post0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_constants.py
RENAMED
|
File without changes
|
{charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_container_path.py
RENAMED
|
File without changes
|
|
File without changes
|
{charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_fileinfo.py
RENAMED
|
File without changes
|
{charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_functions.py
RENAMED
|
File without changes
|
|
File without changes
|
{charmlibs_pathops-1.2.0.post0 → charmlibs_pathops-1.3.0}/src/charmlibs_pathops.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|