Age | Commit message (Collapse) | Author |
|
linuxnamespaces/__init__.py:
* linuxnamespaces.filedescriptor only exports FileDescriptor. By
importing *, we re-export it implicitly.
linuxnamespaces/atlocation.py:
* PathLike should be parameterized and we no longer allow bytes there.
linuxnamespaces/tarutils.py:
* Resolve dict vs Mapping.
tests/test_simple.py:
* Establish expected type to mypy.
examples/unschroot.py:
* pidfd is first an int and later a FileDescriptor, but we always use
it as int.
* Also tell mypy that we cannot get NULL from waitid.
|
|
It serves two main purposes. For one thing, it allows telling bare
integers and file descriptors apart on a typing level similar to a
NewType. For another it adds common methods to a file descriptor and
enables closing it via a context manager.
|
|
|
|
|
|
|
|
It does not make sense to read a link after having followed it.
|
|
Also allow joining an AtLocation. When doing that note that any kind of
absolute location object (absolute path without fd and any location with
an fd) results in just that latter location just like os.path.join
returns the latter path when it is absolute.
Fixes: 034f732a1af4 ("initial checkin")
|
|
|
|
|
|
Fixes: 1c265b6e11c3 ("add os.stat wrapper AtLocation.stat")
|
|
|
|
These are the is_* family and exists all from pathlib.Path.
|
|
|
|
This mirrors what was done for pathlib.Path to avoid confusion about
argument order.
|
|
This is similar to pathlib.Path.is_absolute.
|
|
|
|
|
|
|
|
|
|
pathlib.Path(somebytes) fails. Hence bytes is not actually convertible
and should not be included in PathConvertible. Then, we can simplify
matters in quite a few places by knowing that the thing we work with is
not bytes.
|
|
|