charmlibs-pathops 1.2.1__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.1 → charmlibs_pathops-1.3.0}/PKG-INFO +2 -2
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/pyproject.toml +4 -2
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_local_path.py +11 -1
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_types.py +3 -4
- charmlibs_pathops-1.3.0/src/charmlibs/pathops/_version.txt +1 -0
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs_pathops.egg-info/PKG-INFO +2 -2
- charmlibs_pathops-1.2.1/src/charmlibs/pathops/_version.txt +0 -1
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/README.md +0 -0
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/setup.cfg +0 -0
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/__init__.py +0 -0
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_constants.py +0 -0
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_container_path.py +0 -0
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_errors.py +0 -0
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_fileinfo.py +0 -0
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_functions.py +0 -0
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/py.typed +0 -0
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs_pathops.egg-info/SOURCES.txt +0 -0
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs_pathops.egg-info/dependency_links.txt +0 -0
- {charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs_pathops.egg-info/requires.txt +0 -0
- {charmlibs_pathops-1.2.1 → 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.
|
|
@@ -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,
|
|
@@ -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) -> Iterator[Self]:
|
|
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
|
|
@@ -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.1
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs/pathops/_container_path.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs_pathops.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs_pathops.egg-info/requires.txt
RENAMED
|
File without changes
|
{charmlibs_pathops-1.2.1 → charmlibs_pathops-1.3.0}/src/charmlibs_pathops.egg-info/top_level.txt
RENAMED
|
File without changes
|