pathrs 0.2.6__tar.gz → 0.2.7__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.
- {pathrs-0.2.6 → pathrs-0.2.7}/PKG-INFO +1 -1
- {pathrs-0.2.6 → pathrs-0.2.7}/pathrs/_internal.py +7 -1
- {pathrs-0.2.6 → pathrs-0.2.7}/pathrs.egg-info/PKG-INFO +1 -1
- {pathrs-0.2.6 → pathrs-0.2.7}/pyproject.toml +1 -1
- {pathrs-0.2.6 → pathrs-0.2.7}/COPYING +0 -0
- {pathrs-0.2.6 → pathrs-0.2.7}/README.md +0 -0
- {pathrs-0.2.6 → pathrs-0.2.7}/pathrs/__init__.py +0 -0
- {pathrs-0.2.6 → pathrs-0.2.7}/pathrs/_libpathrs_cffi/__init__.pyi +0 -0
- {pathrs-0.2.6 → pathrs-0.2.7}/pathrs/_libpathrs_cffi/lib.pyi +0 -0
- {pathrs-0.2.6 → pathrs-0.2.7}/pathrs/_pathrs.py +0 -0
- {pathrs-0.2.6 → pathrs-0.2.7}/pathrs/pathrs_build.py +0 -0
- {pathrs-0.2.6 → pathrs-0.2.7}/pathrs/procfs.py +0 -0
- {pathrs-0.2.6 → pathrs-0.2.7}/pathrs/py.typed +0 -0
- {pathrs-0.2.6 → pathrs-0.2.7}/pathrs.egg-info/SOURCES.txt +0 -0
- {pathrs-0.2.6 → pathrs-0.2.7}/pathrs.egg-info/dependency_links.txt +0 -0
- {pathrs-0.2.6 → pathrs-0.2.7}/pathrs.egg-info/requires.txt +0 -0
- {pathrs-0.2.6 → pathrs-0.2.7}/pathrs.egg-info/top_level.txt +0 -0
- {pathrs-0.2.6 → pathrs-0.2.7}/setup.cfg +0 -0
- {pathrs-0.2.6 → pathrs-0.2.7}/setup.py +0 -0
|
@@ -40,6 +40,12 @@ else:
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
def _cstr(pystr: str) -> CString:
|
|
43
|
+
# C cannot express embedded nul bytes which means that paths and other
|
|
44
|
+
# string arguments get silently truncated (as ffi.new("char[]") happily
|
|
45
|
+
# copies them over), which results in unexpected behaviour for Python
|
|
46
|
+
# users. Python raises a ValueError in this case so just emulate that.
|
|
47
|
+
if "\0" in pystr:
|
|
48
|
+
raise ValueError(f"embedded null character in string {pystr!r}")
|
|
43
49
|
return ffi.new("char[]", pystr.encode("utf8"))
|
|
44
50
|
|
|
45
51
|
|
|
@@ -158,7 +164,7 @@ class WrappedFd:
|
|
|
158
164
|
pathrs will return WrappedFds for most operations that return an fd.
|
|
159
165
|
"""
|
|
160
166
|
|
|
161
|
-
_fd: int | None
|
|
167
|
+
_fd: int | None = None
|
|
162
168
|
|
|
163
169
|
def __init__(self, file: FileLike, /):
|
|
164
170
|
"""
|
|
@@ -21,7 +21,7 @@ build-backend = "setuptools.build_meta"
|
|
|
21
21
|
[project]
|
|
22
22
|
name = "pathrs"
|
|
23
23
|
# TODO: Figure out a way to keep this version up-to-date with Cargo.toml.
|
|
24
|
-
version = "0.2.
|
|
24
|
+
version = "0.2.7"
|
|
25
25
|
description = "Python bindings for libpathrs, a safe path resolution library for Linux."
|
|
26
26
|
readme = "README.md"
|
|
27
27
|
keywords = ["libpathrs", "pathrs"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|