python-update-checker 1.0.0__tar.gz → 1.2.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.
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/PKG-INFO +2 -1
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/README.md +1 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/pyproject.toml +1 -1
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/pyproject.toml.orig +1 -1
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/src/puc/__init__.py +1 -1
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/src/puc/requirementstxt.py +5 -1
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/src/puc/uvlock.py +29 -13
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/tests/data/requirements.txt +2 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/tests/data/uv.lock +6 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/tests/test_uv_lock.py +1 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/.gitignore +0 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/.ruff.toml +0 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/Makefile +0 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/scripts/install_dev.sh +0 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/src/puc/cli.py +0 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/src/puc/dependencies.py +0 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/src/puc/logging.py +0 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/src/puc/pyprojecttoml.py +0 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/tests/__init__.py +0 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/tests/data/other-requirements.txt +0 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/tests/data/pyproject.toml +0 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/tests/data/pyproject_compatible.toml +0 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/tests/test_latest.py +0 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/tests/test_pyproject_toml.py +0 -0
- {python_update_checker-1.0.0 → python_update_checker-1.2.0}/tests/test_requirements_txt.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-update-checker
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
License-Expression: GPL-3.0-only
|
|
5
5
|
Classifier: Development Status :: 5 - Production/Stable
|
|
6
6
|
Classifier: Environment :: Console
|
|
@@ -51,6 +51,7 @@ uv sync
|
|
|
51
51
|
* supports recursive references (-r) in requirements.txt formats
|
|
52
52
|
* can run in check only mode, ie. it checks if updates are available
|
|
53
53
|
* limit updates to specific packages
|
|
54
|
+
* can ignore packages
|
|
54
55
|
* limit updates with package version constraints (ie. "django<6")
|
|
55
56
|
* limit updates to versions that were uploaded prior to a given date
|
|
56
57
|
* (limited) support for environment markers, ie. `"pywin32==311; os_name=='nt'"`
|
|
@@ -29,6 +29,7 @@ uv sync
|
|
|
29
29
|
* supports recursive references (-r) in requirements.txt formats
|
|
30
30
|
* can run in check only mode, ie. it checks if updates are available
|
|
31
31
|
* limit updates to specific packages
|
|
32
|
+
* can ignore packages
|
|
32
33
|
* limit updates with package version constraints (ie. "django<6")
|
|
33
34
|
* limit updates to versions that were uploaded prior to a given date
|
|
34
35
|
* (limited) support for environment markers, ie. `"pywin32==311; os_name=='nt'"`
|
|
@@ -59,7 +59,11 @@ def handle_requirements_txt(
|
|
|
59
59
|
output.write(line)
|
|
60
60
|
base_dir = os.path.dirname(requirements_txt_path)
|
|
61
61
|
requirements_txt_child = os.path.join(base_dir, pkg_req)
|
|
62
|
-
if os.path.
|
|
62
|
+
if not os.path.isfile(requirements_txt_child):
|
|
63
|
+
logger.warning(
|
|
64
|
+
f"requirements file {requirements_txt_path} references non-existing requirements file {requirements_txt_child!r}"
|
|
65
|
+
)
|
|
66
|
+
elif os.path.abspath(requirements_txt_child) not in handled_files:
|
|
63
67
|
updatable += handle_requirements_txt(
|
|
64
68
|
requirements_txt_child,
|
|
65
69
|
command,
|
|
@@ -53,19 +53,8 @@ def handle_uv_lock(
|
|
|
53
53
|
if exclude_packages and canonicalize_name(name) in exclude_packages:
|
|
54
54
|
logger.info(f"skip excluded package {name!r}")
|
|
55
55
|
continue
|
|
56
|
-
# check
|
|
57
|
-
|
|
58
|
-
if "virtual" in source:
|
|
59
|
-
# skip virtual packages (ie. the project itself)
|
|
60
|
-
logger.info(f"skip virtual package {name!r}")
|
|
61
|
-
continue
|
|
62
|
-
if "editable" in source:
|
|
63
|
-
# skip editable packages
|
|
64
|
-
logger.info(f"skip editable package {name!r}")
|
|
65
|
-
continue
|
|
66
|
-
if "path" in source:
|
|
67
|
-
# skip local packages provided by file path
|
|
68
|
-
logger.info(f"skip path package {name!r}")
|
|
56
|
+
# check source
|
|
57
|
+
if not check_source_registry(uvpackage, name):
|
|
69
58
|
continue
|
|
70
59
|
version = uvpackage.get("version", None)
|
|
71
60
|
if version is None:
|
|
@@ -86,6 +75,33 @@ def handle_uv_lock(
|
|
|
86
75
|
return updatable
|
|
87
76
|
|
|
88
77
|
|
|
78
|
+
def check_source_registry(uvpackage, name):
|
|
79
|
+
"""Check for a registry source, other known non-registry
|
|
80
|
+
sources are skipped.
|
|
81
|
+
"""
|
|
82
|
+
# check package source for skip reasons
|
|
83
|
+
source = uvpackage.get("source", {})
|
|
84
|
+
if "virtual" in source:
|
|
85
|
+
# skip virtual packages (ie. the project itself)
|
|
86
|
+
logger.info(f"skip virtual package {name!r}")
|
|
87
|
+
return False
|
|
88
|
+
if "editable" in source:
|
|
89
|
+
# skip editable packages
|
|
90
|
+
logger.info(f"skip editable package {name!r}")
|
|
91
|
+
return False
|
|
92
|
+
if "path" in source:
|
|
93
|
+
# skip local packages provided by file path
|
|
94
|
+
logger.info(f"skip path package {name!r}")
|
|
95
|
+
return False
|
|
96
|
+
if "git" in source:
|
|
97
|
+
# skip git packages provided by URL
|
|
98
|
+
logger.info(f"skip git package {name!r}")
|
|
99
|
+
return False
|
|
100
|
+
if "registry" not in source:
|
|
101
|
+
logger.warning(f"no registry entry found for package {name!r}")
|
|
102
|
+
return True
|
|
103
|
+
|
|
104
|
+
|
|
89
105
|
def update_uvlock_dependency(
|
|
90
106
|
package,
|
|
91
107
|
version,
|
|
@@ -24,6 +24,8 @@ urllib3 @ https://example.com/urllib3/urllib3/archive/refs/tags/1.26.8.zip
|
|
|
24
24
|
# It is possible to refer to other requirement files or constraints files.
|
|
25
25
|
-r other-requirements.txt
|
|
26
26
|
-c constraints.txt
|
|
27
|
+
# non-existing requirement
|
|
28
|
+
-r imadoofus.txt
|
|
27
29
|
|
|
28
30
|
# refer to specific local distribution paths
|
|
29
31
|
./downloads/numpy-1.9.2-cp34-none-win32.whl
|
|
@@ -74,3 +74,9 @@ name = "superfragilicous"
|
|
|
74
74
|
version = "1"
|
|
75
75
|
source = { path = "third_party/superfragilicous-1.tar.gz" }
|
|
76
76
|
dependencies = [ ]
|
|
77
|
+
|
|
78
|
+
[[package]]
|
|
79
|
+
name = "fragilicous-git"
|
|
80
|
+
version = "1"
|
|
81
|
+
source = { git = "https://example.com/fragilicous-git/fragilicous-git.git#3a2dd24bdb6484c1c0da1116043586ec22a32962" }
|
|
82
|
+
dependencies = [ ]
|
|
@@ -46,6 +46,7 @@ class UvLockTest(unittest.TestCase):
|
|
|
46
46
|
self.assertIn("skip editable package 'imabellend'", output)
|
|
47
47
|
self.assertIn("skip excluded package 'fragilicous'", output)
|
|
48
48
|
self.assertIn("skip path package 'superfragilicous'", output)
|
|
49
|
+
self.assertIn("skip git package 'fragilicous-git'", output)
|
|
49
50
|
|
|
50
51
|
@needs_program('uv')
|
|
51
52
|
def test_uvlock_check_package(self):
|
|
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
|
{python_update_checker-1.0.0 → python_update_checker-1.2.0}/tests/data/other-requirements.txt
RENAMED
|
File without changes
|
|
File without changes
|
{python_update_checker-1.0.0 → python_update_checker-1.2.0}/tests/data/pyproject_compatible.toml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|