tmpkit 1.0.0__tar.gz → 1.0.1__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.
- {tmpkit-1.0.0 → tmpkit-1.0.1}/.github/workflows/ci.yml +5 -5
- {tmpkit-1.0.0 → tmpkit-1.0.1}/.github/workflows/release.yml +7 -7
- {tmpkit-1.0.0 → tmpkit-1.0.1}/CHANGELOG.md +11 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/CODE_OF_CONDUCT.md +1 -1
- {tmpkit-1.0.0 → tmpkit-1.0.1}/PKG-INFO +3 -3
- {tmpkit-1.0.0 → tmpkit-1.0.1}/SECURITY.md +3 -3
- {tmpkit-1.0.0 → tmpkit-1.0.1}/pyproject.toml +3 -3
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/e2e/test_real_cleanup.py +1 -1
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/unit/test_async_dir.py +1 -1
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/unit/test_smoke.py +1 -1
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/unit/test_sync_dir.py +4 -4
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/unit/test_windows.py +12 -1
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tmpkit/__init__.py +1 -1
- {tmpkit-1.0.0 → tmpkit-1.0.1}/.github/FUNDING.yml +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/.github/dependabot.yml +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/.gitignore +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/.pre-commit-config.yaml +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/CONTRIBUTING.md +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/LICENSE +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/README.md +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/conftest.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/integration/test_concurrent.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/integration/test_subprocess.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/unit/test_async_file.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/unit/test_atomic.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/unit/test_config.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/unit/test_decorators.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/unit/test_error_paths.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/unit/test_keep.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/unit/test_registry.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/unit/test_sync_file.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tests/unit/test_types.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tmpkit/_async.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tmpkit/_atomic.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tmpkit/_config.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tmpkit/_decorators.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tmpkit/_registry.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tmpkit/_sync.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tmpkit/_types.py +0 -0
- {tmpkit-1.0.0 → tmpkit-1.0.1}/tmpkit/py.typed +0 -0
|
@@ -13,8 +13,8 @@ jobs:
|
|
|
13
13
|
lint:
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
15
|
steps:
|
|
16
|
-
- uses: actions/checkout@
|
|
17
|
-
- uses: actions/setup-python@
|
|
16
|
+
- uses: actions/checkout@v7
|
|
17
|
+
- uses: actions/setup-python@v7
|
|
18
18
|
with:
|
|
19
19
|
python-version: "3.13"
|
|
20
20
|
- name: Install dev deps
|
|
@@ -36,8 +36,8 @@ jobs:
|
|
|
36
36
|
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
37
37
|
runs-on: ${{ matrix.os }}
|
|
38
38
|
steps:
|
|
39
|
-
- uses: actions/checkout@
|
|
40
|
-
- uses: actions/setup-python@
|
|
39
|
+
- uses: actions/checkout@v7
|
|
40
|
+
- uses: actions/setup-python@v7
|
|
41
41
|
with:
|
|
42
42
|
python-version: ${{ matrix.python-version }}
|
|
43
43
|
- name: Install dev deps
|
|
@@ -46,7 +46,7 @@ jobs:
|
|
|
46
46
|
run: pytest --cov=tmpkit --cov-report=xml --cov-branch
|
|
47
47
|
- name: Upload coverage
|
|
48
48
|
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
|
|
49
|
-
uses: codecov/codecov-action@
|
|
49
|
+
uses: codecov/codecov-action@v7
|
|
50
50
|
with:
|
|
51
51
|
files: ./coverage.xml
|
|
52
52
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -14,8 +14,8 @@ jobs:
|
|
|
14
14
|
permissions:
|
|
15
15
|
contents: read
|
|
16
16
|
steps:
|
|
17
|
-
- uses: actions/checkout@
|
|
18
|
-
- uses: actions/setup-python@
|
|
17
|
+
- uses: actions/checkout@v7
|
|
18
|
+
- uses: actions/setup-python@v7
|
|
19
19
|
with:
|
|
20
20
|
python-version: "3.13"
|
|
21
21
|
- name: Install build
|
|
@@ -23,7 +23,7 @@ jobs:
|
|
|
23
23
|
- name: Build dist
|
|
24
24
|
run: python -m build
|
|
25
25
|
- name: Upload artifacts
|
|
26
|
-
uses: actions/upload-artifact@
|
|
26
|
+
uses: actions/upload-artifact@v7
|
|
27
27
|
with:
|
|
28
28
|
name: dist
|
|
29
29
|
path: dist/
|
|
@@ -35,7 +35,7 @@ jobs:
|
|
|
35
35
|
permissions:
|
|
36
36
|
id-token: write
|
|
37
37
|
steps:
|
|
38
|
-
- uses: actions/download-artifact@
|
|
38
|
+
- uses: actions/download-artifact@v8
|
|
39
39
|
with:
|
|
40
40
|
name: dist
|
|
41
41
|
path: dist/
|
|
@@ -48,8 +48,8 @@ jobs:
|
|
|
48
48
|
permissions:
|
|
49
49
|
contents: write
|
|
50
50
|
steps:
|
|
51
|
-
- uses: actions/checkout@
|
|
52
|
-
- uses: actions/download-artifact@
|
|
51
|
+
- uses: actions/checkout@v7
|
|
52
|
+
- uses: actions/download-artifact@v8
|
|
53
53
|
with:
|
|
54
54
|
name: dist
|
|
55
55
|
path: dist/
|
|
@@ -88,7 +88,7 @@ jobs:
|
|
|
88
88
|
needs: publish-pypi
|
|
89
89
|
runs-on: ubuntu-latest
|
|
90
90
|
steps:
|
|
91
|
-
- uses: actions/setup-python@
|
|
91
|
+
- uses: actions/setup-python@v7
|
|
92
92
|
with:
|
|
93
93
|
python-version: "3.13"
|
|
94
94
|
- name: Install from PyPI
|
|
@@ -31,6 +31,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
31
31
|
|
|
32
32
|
- Nothing yet.
|
|
33
33
|
|
|
34
|
+
## [1.0.1] - 2025-01-24
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- Bump `codecov/codecov-action` from v4 to v7 to resolve Node.js 20
|
|
39
|
+
deprecation warnings in CI.
|
|
40
|
+
- Fix `test_windows.py` failures on Linux/macOS — `TestWindowsNameMock`
|
|
41
|
+
tests now skip on non-Windows platforms.
|
|
42
|
+
- Fix macOS CI failures from `/var` symlink resolution — cwd tests now
|
|
43
|
+
compare resolved paths.
|
|
44
|
+
|
|
34
45
|
## [1.0.0] - 2025-01-24
|
|
35
46
|
|
|
36
47
|
### Added
|
|
@@ -60,7 +60,7 @@ representative at an online or offline event.
|
|
|
60
60
|
|
|
61
61
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
62
|
reported to the community leaders responsible for enforcement at
|
|
63
|
-
**
|
|
63
|
+
**mathias.paulenko@outlook.com**.
|
|
64
64
|
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
65
|
|
|
66
66
|
All community leaders are obligated to respect the privacy and security of the
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: tmpkit
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.1
|
|
4
4
|
Summary: Ergonomic tempfile & tempdir context managers with auto-cleanup, atomic writes, async support, and zero dependencies.
|
|
5
5
|
Project-URL: Homepage, https://github.com/MathiasPaulenko/tmpkit
|
|
6
6
|
Project-URL: Repository, https://github.com/MathiasPaulenko/tmpkit
|
|
7
7
|
Project-URL: Issues, https://github.com/MathiasPaulenko/tmpkit/issues
|
|
8
8
|
Project-URL: Changelog, https://github.com/MathiasPaulenko/tmpkit/blob/main/CHANGELOG.md
|
|
9
|
-
Author: Mathias Paulenko
|
|
9
|
+
Author-email: Mathias Paulenko <mathias.paulenko@outlook.com>
|
|
10
10
|
License-Expression: MIT
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
Keywords: async,atomic,cleanup,context manager,filesystem,temp,tempfile,temporary,tmp
|
|
13
|
-
Classifier: Development Status ::
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
15
15
|
Classifier: License :: OSI Approved :: MIT License
|
|
16
16
|
Classifier: Operating System :: OS Independent
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
| Version | Supported |
|
|
6
6
|
|---------|--------------------|
|
|
7
|
-
| 0.
|
|
8
|
-
| < 0
|
|
7
|
+
| 1.0.x | :white_check_mark: |
|
|
8
|
+
| < 1.0 | :x: |
|
|
9
9
|
|
|
10
10
|
## Reporting a Vulnerability
|
|
11
11
|
|
|
12
12
|
If you discover a security vulnerability in tmpkit, please report it responsibly.
|
|
13
13
|
|
|
14
14
|
1. **Do NOT open a public GitHub issue.**
|
|
15
|
-
2. Email **
|
|
15
|
+
2. Email **mathias.paulenko@outlook.com** with a description of the vulnerability and, if possible, a proof of concept.
|
|
16
16
|
3. You will receive an acknowledgment within **48 hours**.
|
|
17
17
|
4. We will investigate and, if confirmed, release a fix as soon as possible depending on severity.
|
|
18
18
|
|
|
@@ -4,15 +4,15 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "tmpkit"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.1"
|
|
8
8
|
description = "Ergonomic tempfile & tempdir context managers with auto-cleanup, atomic writes, async support, and zero dependencies."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
11
11
|
requires-python = ">=3.11"
|
|
12
|
-
authors = [{ name = "Mathias Paulenko" }]
|
|
12
|
+
authors = [{ name = "Mathias Paulenko", email = "mathias.paulenko@outlook.com" }]
|
|
13
13
|
keywords = ["tempfile", "temp", "temporary", "context manager", "cleanup", "async", "atomic", "filesystem", "tmp"]
|
|
14
14
|
classifiers = [
|
|
15
|
-
"Development Status ::
|
|
15
|
+
"Development Status :: 5 - Production/Stable",
|
|
16
16
|
"Intended Audience :: Developers",
|
|
17
17
|
"License :: OSI Approved :: MIT License",
|
|
18
18
|
"Operating System :: OS Independent",
|
|
@@ -80,7 +80,7 @@ class TestRealDirCleanup:
|
|
|
80
80
|
def test_dir_cwd_restored_after_exit(self) -> None:
|
|
81
81
|
original = Path.cwd()
|
|
82
82
|
with temp_dir(cwd=True) as d:
|
|
83
|
-
assert Path.cwd() == d
|
|
83
|
+
assert Path.cwd().resolve() == d.resolve()
|
|
84
84
|
assert Path.cwd() == original
|
|
85
85
|
|
|
86
86
|
def test_dir_tree_fully_removed(self) -> None:
|
|
@@ -86,7 +86,7 @@ class TestAsyncCwd:
|
|
|
86
86
|
async def test_cwd_changes_and_restores(self) -> None:
|
|
87
87
|
original = Path.cwd()
|
|
88
88
|
async with async_temp_dir(cwd=True) as d:
|
|
89
|
-
assert Path.cwd() == d
|
|
89
|
+
assert Path.cwd().resolve() == d.resolve()
|
|
90
90
|
assert Path.cwd() == original
|
|
91
91
|
|
|
92
92
|
async def test_cwd_restored_on_exception(self) -> None:
|
|
@@ -146,7 +146,7 @@ class TestCwd:
|
|
|
146
146
|
def test_cwd_changes_to_temp_dir(self) -> None:
|
|
147
147
|
original = Path.cwd()
|
|
148
148
|
with temp_dir(cwd=True) as d:
|
|
149
|
-
assert Path.cwd() == d
|
|
149
|
+
assert Path.cwd().resolve() == d.resolve()
|
|
150
150
|
assert Path.cwd() == original
|
|
151
151
|
|
|
152
152
|
def test_cwd_restored_on_exception(self) -> None:
|
|
@@ -166,10 +166,10 @@ class TestCwd:
|
|
|
166
166
|
outer = temp_dir(cwd=True)
|
|
167
167
|
inner = temp_dir(cwd=True)
|
|
168
168
|
with outer as od:
|
|
169
|
-
assert Path.cwd() == od
|
|
169
|
+
assert Path.cwd().resolve() == od.resolve()
|
|
170
170
|
with inner as id_:
|
|
171
|
-
assert Path.cwd() == id_
|
|
172
|
-
assert Path.cwd() == od
|
|
171
|
+
assert Path.cwd().resolve() == id_.resolve()
|
|
172
|
+
assert Path.cwd().resolve() == od.resolve()
|
|
173
173
|
assert Path.cwd() == original
|
|
174
174
|
|
|
175
175
|
def test_cwd_with_keep(self) -> None:
|
|
@@ -149,8 +149,17 @@ class TestMkstempUsage:
|
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
class TestWindowsNameMock:
|
|
152
|
-
"""Mock os.name=='nt' to exercise Windows code paths on non-Windows.
|
|
152
|
+
"""Mock os.name=='nt' to exercise Windows code paths on non-Windows.
|
|
153
153
|
|
|
154
|
+
These tests mock ``os.name`` to ``"nt"`` to verify that tmpkit's code
|
|
155
|
+
paths don't break when ``os.name`` is ``"nt"``. However, ``tempfile``
|
|
156
|
+
uses ``os.name`` internally to select the temp directory and path
|
|
157
|
+
conventions, so mocking it on non-Windows causes ``mkstemp``/``mkdtemp``
|
|
158
|
+
to produce paths that don't exist on the real filesystem. Therefore
|
|
159
|
+
these tests only run on Windows.
|
|
160
|
+
"""
|
|
161
|
+
|
|
162
|
+
@pytest.mark.skipif(os.name != "nt", reason="requires real Windows filesystem")
|
|
154
163
|
def test_file_works_with_nt_name(self, monkeypatch: pytest.MonkeyPatch) -> None:
|
|
155
164
|
monkeypatch.setattr(os, "name", "nt")
|
|
156
165
|
with temp_file() as f:
|
|
@@ -158,12 +167,14 @@ class TestWindowsNameMock:
|
|
|
158
167
|
f.seek(0)
|
|
159
168
|
assert f.read() == b"test"
|
|
160
169
|
|
|
170
|
+
@pytest.mark.skipif(os.name != "nt", reason="requires real Windows filesystem")
|
|
161
171
|
def test_dir_works_with_nt_name(self, monkeypatch: pytest.MonkeyPatch) -> None:
|
|
162
172
|
monkeypatch.setattr(os, "name", "nt")
|
|
163
173
|
with temp_dir() as d:
|
|
164
174
|
assert d.exists()
|
|
165
175
|
assert not d.exists()
|
|
166
176
|
|
|
177
|
+
@pytest.mark.skipif(os.name != "nt", reason="requires real Windows filesystem")
|
|
167
178
|
def test_close_does_not_delete_with_nt_name(
|
|
168
179
|
self, monkeypatch: pytest.MonkeyPatch
|
|
169
180
|
) -> None:
|
|
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
|
|
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
|
|
File without changes
|