dependence 1.2.2__tar.gz → 1.2.4__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.
- {dependence-1.2.2 → dependence-1.2.4}/PKG-INFO +3 -3
- {dependence-1.2.2 → dependence-1.2.4}/README.md +1 -1
- {dependence-1.2.2 → dependence-1.2.4}/dependence/_utilities.py +14 -4
- {dependence-1.2.2 → dependence-1.2.4}/dependence/freeze.py +3 -3
- {dependence-1.2.2 → dependence-1.2.4}/dependence/update.py +1 -2
- {dependence-1.2.2 → dependence-1.2.4}/dependence/upgrade.py +2 -1
- {dependence-1.2.2 → dependence-1.2.4}/pyproject.toml +5 -5
- {dependence-1.2.2 → dependence-1.2.4}/.gitignore +0 -0
- {dependence-1.2.2 → dependence-1.2.4}/dependence/__init__.py +0 -0
- {dependence-1.2.2 → dependence-1.2.4}/dependence/__main__.py +0 -0
- {dependence-1.2.2 → dependence-1.2.4}/dependence/py.typed +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dependence
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.4
|
|
4
4
|
Summary: A dependency management tool for python projects
|
|
5
5
|
Project-URL: Documentation, https://dependence.enorganic.org
|
|
6
6
|
Project-URL: Repository, https://github.com/enorganic/dependence
|
|
7
7
|
Author-email: david@belais.me
|
|
8
8
|
License-Expression: MIT
|
|
9
9
|
Keywords: dependencies,requirements
|
|
10
|
-
Requires-Python: ~=3.
|
|
10
|
+
Requires-Python: ~=3.10
|
|
11
11
|
Requires-Dist: jsonpointer
|
|
12
12
|
Requires-Dist: packaging
|
|
13
13
|
Requires-Dist: pip
|
|
@@ -59,7 +59,7 @@ For example, in [this project's Makefile
|
|
|
59
59
|
|
|
60
60
|
```Makefile
|
|
61
61
|
SHELL := bash
|
|
62
|
-
PYTHON_VERSION := 3.
|
|
62
|
+
PYTHON_VERSION := 3.10
|
|
63
63
|
|
|
64
64
|
upgrade:
|
|
65
65
|
hatch run dependence upgrade\
|
|
@@ -7,8 +7,6 @@ import re
|
|
|
7
7
|
import shutil
|
|
8
8
|
import sys
|
|
9
9
|
from collections import deque
|
|
10
|
-
from collections.abc import Container, Hashable, Iterable, MutableSet
|
|
11
|
-
from collections.abc import Set as AbstractSet
|
|
12
10
|
from configparser import ConfigParser, SectionProxy
|
|
13
11
|
from enum import Enum, auto
|
|
14
12
|
from glob import iglob
|
|
@@ -22,8 +20,8 @@ from subprocess import DEVNULL, PIPE, CalledProcessError, list2cmdline, run
|
|
|
22
20
|
from traceback import format_exception
|
|
23
21
|
from typing import (
|
|
24
22
|
IO,
|
|
23
|
+
TYPE_CHECKING,
|
|
25
24
|
Any,
|
|
26
|
-
Callable,
|
|
27
25
|
TypedDict,
|
|
28
26
|
cast,
|
|
29
27
|
overload,
|
|
@@ -35,6 +33,18 @@ from jsonpointer import resolve_pointer # type: ignore
|
|
|
35
33
|
from packaging.requirements import InvalidRequirement, Requirement
|
|
36
34
|
from packaging.utils import canonicalize_name
|
|
37
35
|
|
|
36
|
+
if TYPE_CHECKING:
|
|
37
|
+
from collections.abc import (
|
|
38
|
+
Callable,
|
|
39
|
+
Container,
|
|
40
|
+
Hashable,
|
|
41
|
+
Iterable,
|
|
42
|
+
MutableSet,
|
|
43
|
+
)
|
|
44
|
+
from collections.abc import (
|
|
45
|
+
Set as AbstractSet,
|
|
46
|
+
)
|
|
47
|
+
|
|
38
48
|
_BUILTIN_DISTRIBUTION_NAMES: tuple[str] = ("distribute",)
|
|
39
49
|
_UNSAFE_CHARACTERS_PATTERN: re.Pattern = re.compile("[^A-Za-z0-9.]+")
|
|
40
50
|
|
|
@@ -1246,7 +1256,7 @@ def _iter_requirement_names(
|
|
|
1246
1256
|
yield from _iter_requirement_names(
|
|
1247
1257
|
requirement_,
|
|
1248
1258
|
exclude=cast(
|
|
1249
|
-
MutableSet[str],
|
|
1259
|
+
"MutableSet[str]",
|
|
1250
1260
|
exclude
|
|
1251
1261
|
| (
|
|
1252
1262
|
lateral_exclude - {_get_requirement_name(requirement_)}
|
|
@@ -2,7 +2,6 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import argparse
|
|
4
4
|
import os
|
|
5
|
-
from collections.abc import Iterable, MutableSet
|
|
6
5
|
from fnmatch import fnmatch
|
|
7
6
|
from functools import partial
|
|
8
7
|
from itertools import chain
|
|
@@ -21,6 +20,7 @@ from dependence._utilities import (
|
|
|
21
20
|
)
|
|
22
21
|
|
|
23
22
|
if TYPE_CHECKING:
|
|
23
|
+
from collections.abc import Iterable, MutableSet
|
|
24
24
|
from importlib.metadata import Distribution
|
|
25
25
|
|
|
26
26
|
_DO_NOT_PIN_DISTRIBUTION_NAMES: MutableSet[str] = {
|
|
@@ -268,7 +268,7 @@ def _iter_frozen_requirements(
|
|
|
268
268
|
if keep_version_specifier and any(
|
|
269
269
|
fnmatch(name, pattern) for pattern in keep_version_specifier
|
|
270
270
|
):
|
|
271
|
-
distribution_names_specifiers[name] = requirement_string
|
|
271
|
+
distribution_names_specifiers[name] = requirement_string.rstrip()
|
|
272
272
|
distribution_names: MutableSet[str] = {name}
|
|
273
273
|
if (depth_ is None) or depth_:
|
|
274
274
|
distribution_names |= get_required_distribution_names(
|
|
@@ -277,7 +277,7 @@ def _iter_frozen_requirements(
|
|
|
277
277
|
depth=None if (depth_ is None) else depth_ - 1,
|
|
278
278
|
)
|
|
279
279
|
return cast(
|
|
280
|
-
MutableSet[str],
|
|
280
|
+
"MutableSet[str]",
|
|
281
281
|
distribution_names - exclude,
|
|
282
282
|
)
|
|
283
283
|
|
|
@@ -13,7 +13,6 @@ from typing import (
|
|
|
13
13
|
IO,
|
|
14
14
|
TYPE_CHECKING,
|
|
15
15
|
Any,
|
|
16
|
-
Callable,
|
|
17
16
|
)
|
|
18
17
|
|
|
19
18
|
import tomli
|
|
@@ -35,7 +34,7 @@ from dependence._utilities import (
|
|
|
35
34
|
)
|
|
36
35
|
|
|
37
36
|
if TYPE_CHECKING:
|
|
38
|
-
from collections.abc import Iterable
|
|
37
|
+
from collections.abc import Callable, Iterable
|
|
39
38
|
from importlib.metadata import Distribution
|
|
40
39
|
|
|
41
40
|
|
|
@@ -27,6 +27,7 @@ def upgrade(
|
|
|
27
27
|
exclude: Iterable[str] = (),
|
|
28
28
|
exclude_recursive: Iterable[str] = (),
|
|
29
29
|
depth: int | None = None,
|
|
30
|
+
echo: bool = False,
|
|
30
31
|
) -> None:
|
|
31
32
|
"""
|
|
32
33
|
This function obtains a list of dependencies for the specified
|
|
@@ -86,7 +87,7 @@ def upgrade(
|
|
|
86
87
|
"--upgrade",
|
|
87
88
|
*frozen_requirements,
|
|
88
89
|
)
|
|
89
|
-
check_output(command)
|
|
90
|
+
check_output(command, echo=echo)
|
|
90
91
|
configuration_files: tuple[str, ...] = tuple(
|
|
91
92
|
chain(
|
|
92
93
|
*map(iter_configuration_files, requirements) # type: ignore
|
|
@@ -6,11 +6,11 @@ build-backend = "hatchling.build"
|
|
|
6
6
|
|
|
7
7
|
[project]
|
|
8
8
|
name = "dependence"
|
|
9
|
-
version = "1.2.
|
|
9
|
+
version = "1.2.4"
|
|
10
10
|
description = "A dependency management tool for python projects"
|
|
11
11
|
readme = "README.md"
|
|
12
12
|
license = "MIT"
|
|
13
|
-
requires-python = "~=3.
|
|
13
|
+
requires-python = "~=3.10"
|
|
14
14
|
authors = [
|
|
15
15
|
{ email = "david@belais.me" },
|
|
16
16
|
]
|
|
@@ -51,7 +51,7 @@ packages = [
|
|
|
51
51
|
src = ""
|
|
52
52
|
|
|
53
53
|
[tool.hatch.envs.default]
|
|
54
|
-
python = "3.
|
|
54
|
+
python = "3.10"
|
|
55
55
|
dependencies = [
|
|
56
56
|
"mypy",
|
|
57
57
|
"pytest",
|
|
@@ -91,7 +91,6 @@ extra-arguments = [
|
|
|
91
91
|
|
|
92
92
|
[[tool.hatch.envs.hatch-test.matrix]]
|
|
93
93
|
python = [
|
|
94
|
-
"3.9",
|
|
95
94
|
"3.10",
|
|
96
95
|
"3.11",
|
|
97
96
|
"3.12",
|
|
@@ -135,7 +134,7 @@ target-version = [
|
|
|
135
134
|
]
|
|
136
135
|
|
|
137
136
|
[tool.mypy]
|
|
138
|
-
python_version = "3.
|
|
137
|
+
python_version = "3.10"
|
|
139
138
|
files = [
|
|
140
139
|
"src",
|
|
141
140
|
"tests",
|
|
@@ -161,3 +160,4 @@ source = [
|
|
|
161
160
|
|
|
162
161
|
[tool.coverage.report]
|
|
163
162
|
fail_under = 70
|
|
163
|
+
show_missing = true
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|