python-update-checker 1.2.0__tar.gz → 1.4.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.2.0 → python_update_checker-1.4.0}/PKG-INFO +16 -1
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/README.md +15 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/pyproject.toml +4 -4
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/pyproject.toml.orig +5 -5
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/src/puc/__init__.py +1 -1
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/src/puc/pyprojecttoml.py +29 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/src/puc/uvlock.py +11 -16
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/tests/data/pyproject.toml +11 -1
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/tests/data/uv.lock +6 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/tests/test_pyproject_toml.py +3 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/tests/test_uv_lock.py +1 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/.gitignore +0 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/.ruff.toml +0 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/Makefile +0 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/scripts/install_dev.sh +0 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/src/puc/cli.py +0 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/src/puc/dependencies.py +0 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/src/puc/logging.py +0 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/src/puc/requirementstxt.py +0 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/tests/__init__.py +0 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/tests/data/other-requirements.txt +0 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/tests/data/pyproject_compatible.toml +0 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/tests/data/requirements.txt +0 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.0}/tests/test_latest.py +0 -0
- {python_update_checker-1.2.0 → python_update_checker-1.4.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.4.0
|
|
4
4
|
License-Expression: GPL-3.0-only
|
|
5
5
|
Classifier: Development Status :: 5 - Production/Stable
|
|
6
6
|
Classifier: Environment :: Console
|
|
@@ -48,6 +48,8 @@ uv sync
|
|
|
48
48
|
* supports pyproject.toml, uv.lock and requirements.txt formats
|
|
49
49
|
* supports `[project.dependencies]`, `[project.optional-dependencies]`
|
|
50
50
|
and `[dependency-groups]` in pyproject.toml
|
|
51
|
+
* supports legacy dependency format `[tool.uv.dev-dependencies]`
|
|
52
|
+
in pyproject.toml
|
|
51
53
|
* supports recursive references (-r) in requirements.txt formats
|
|
52
54
|
* can run in check only mode, ie. it checks if updates are available
|
|
53
55
|
* limit updates to specific packages
|
|
@@ -126,6 +128,19 @@ Dependencies are
|
|
|
126
128
|
|
|
127
129
|
puc needs Python >= 3.11 since it uses the tomllib Python module.
|
|
128
130
|
|
|
131
|
+
## Updating minimum version requirements
|
|
132
|
+
|
|
133
|
+
Dependencies like `requests>=1.12` or `django>5` specify a
|
|
134
|
+
minimum version requirement.
|
|
135
|
+
|
|
136
|
+
Minimum requirements are necessary to work with different versioned
|
|
137
|
+
dependencies, since different distributions package different
|
|
138
|
+
versions of those dependencies.
|
|
139
|
+
Minimum requirements change when the project uses a
|
|
140
|
+
feature that is only available in newer versions of a dependency.
|
|
141
|
+
This cannot be determined automatically by puc.
|
|
142
|
+
So minimum version requirements should be updated manually.
|
|
143
|
+
|
|
129
144
|
## Limitations
|
|
130
145
|
|
|
131
146
|
* No support for custom dependency formats in pyproject.toml
|
|
@@ -26,6 +26,8 @@ uv sync
|
|
|
26
26
|
* supports pyproject.toml, uv.lock and requirements.txt formats
|
|
27
27
|
* supports `[project.dependencies]`, `[project.optional-dependencies]`
|
|
28
28
|
and `[dependency-groups]` in pyproject.toml
|
|
29
|
+
* supports legacy dependency format `[tool.uv.dev-dependencies]`
|
|
30
|
+
in pyproject.toml
|
|
29
31
|
* supports recursive references (-r) in requirements.txt formats
|
|
30
32
|
* can run in check only mode, ie. it checks if updates are available
|
|
31
33
|
* limit updates to specific packages
|
|
@@ -104,6 +106,19 @@ Dependencies are
|
|
|
104
106
|
|
|
105
107
|
puc needs Python >= 3.11 since it uses the tomllib Python module.
|
|
106
108
|
|
|
109
|
+
## Updating minimum version requirements
|
|
110
|
+
|
|
111
|
+
Dependencies like `requests>=1.12` or `django>5` specify a
|
|
112
|
+
minimum version requirement.
|
|
113
|
+
|
|
114
|
+
Minimum requirements are necessary to work with different versioned
|
|
115
|
+
dependencies, since different distributions package different
|
|
116
|
+
versions of those dependencies.
|
|
117
|
+
Minimum requirements change when the project uses a
|
|
118
|
+
feature that is only available in newer versions of a dependency.
|
|
119
|
+
This cannot be determined automatically by puc.
|
|
120
|
+
So minimum version requirements should be updated manually.
|
|
121
|
+
|
|
107
122
|
## Limitations
|
|
108
123
|
|
|
109
124
|
* No support for custom dependency formats in pyproject.toml
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "python-update-checker"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.4.0"
|
|
4
4
|
readme = "README.md"
|
|
5
5
|
requires-python = ">=3.11"
|
|
6
6
|
license = "GPL-3.0-only"
|
|
@@ -33,9 +33,9 @@ dev = [
|
|
|
33
33
|
"bump2version==1.0.1",
|
|
34
34
|
"pytest==9.1.1",
|
|
35
35
|
"ruff==0.16.5",
|
|
36
|
-
"rumdl==0.2.
|
|
36
|
+
"rumdl==0.2.63",
|
|
37
37
|
"tombi==1.5.0",
|
|
38
|
-
"ty==0.0.
|
|
38
|
+
"ty==0.0.77",
|
|
39
39
|
"zizmor==1.30.0",
|
|
40
40
|
]
|
|
41
41
|
|
|
@@ -45,7 +45,7 @@ build-backend = "uv_build"
|
|
|
45
45
|
|
|
46
46
|
[tool.project]
|
|
47
47
|
python_version_dev = "3.14.7"
|
|
48
|
-
uv_version_dev = "0.12.
|
|
48
|
+
uv_version_dev = "0.12.11"
|
|
49
49
|
|
|
50
50
|
[tool.uv.build-backend]
|
|
51
51
|
module-name = "puc"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "python-update-checker"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.4.0"
|
|
4
4
|
readme = "README.md"
|
|
5
5
|
requires-python = ">=3.11"
|
|
6
6
|
license = "GPL-3.0-only"
|
|
@@ -18,7 +18,7 @@ classifiers = [
|
|
|
18
18
|
"Topic :: Software Development :: Build Tools",
|
|
19
19
|
]
|
|
20
20
|
dependencies = [
|
|
21
|
-
# track compatibility
|
|
21
|
+
# track compatibility, do not pin
|
|
22
22
|
"packaging>=26.1",
|
|
23
23
|
]
|
|
24
24
|
license_files = [
|
|
@@ -44,11 +44,11 @@ dev = [
|
|
|
44
44
|
# for python code linting
|
|
45
45
|
"ruff==0.16.5",
|
|
46
46
|
# Markdown style checking and formatting
|
|
47
|
-
"rumdl==0.2.
|
|
47
|
+
"rumdl==0.2.63",
|
|
48
48
|
# reformat toml files
|
|
49
49
|
"tombi==1.5.0",
|
|
50
50
|
# for python type checking
|
|
51
|
-
"ty==0.0.
|
|
51
|
+
"ty==0.0.77",
|
|
52
52
|
# for auditing github actions
|
|
53
53
|
"zizmor==1.30.0",
|
|
54
54
|
]
|
|
@@ -60,7 +60,7 @@ build-backend = "uv_build"
|
|
|
60
60
|
[tool.project]
|
|
61
61
|
# pin versions of Python and uv for development
|
|
62
62
|
python_version_dev = "3.14.7"
|
|
63
|
-
uv_version_dev = "0.12.
|
|
63
|
+
uv_version_dev = "0.12.11"
|
|
64
64
|
|
|
65
65
|
[tool.uv.build-backend]
|
|
66
66
|
module-name = "puc"
|
|
@@ -47,6 +47,11 @@ def handle_pyproject_toml(
|
|
|
47
47
|
if not project:
|
|
48
48
|
logger.warning(f"no project defined in {pyproject_path}")
|
|
49
49
|
return updatable
|
|
50
|
+
if pyproject.get("tool", {}).get("poetry", {}).get("dependencies", {}):
|
|
51
|
+
logger.warning(f"[tool.poetry.dependencies] detected in {pyproject_path}")
|
|
52
|
+
logger.warning(
|
|
53
|
+
"consider migrating to uv, see https://docs.astral.sh/uv/guides/migration/"
|
|
54
|
+
)
|
|
50
55
|
projectname = project.get("name", None)
|
|
51
56
|
logger.debug(f"found project name {projectname}")
|
|
52
57
|
# project dependencies
|
|
@@ -94,6 +99,30 @@ def handle_pyproject_toml(
|
|
|
94
99
|
constraint_file=constraint_file,
|
|
95
100
|
color=color,
|
|
96
101
|
)
|
|
102
|
+
# update legacy uv dev dependencies
|
|
103
|
+
# See https://docs.astral.sh/uv/concepts/projects/dependencies/#legacy-dev-dependencies
|
|
104
|
+
tool_uv = pyproject.get("tool", {}).get("uv", {})
|
|
105
|
+
deps = tool_uv.get("dev-dependencies", [])
|
|
106
|
+
if deps:
|
|
107
|
+
logger.warning(
|
|
108
|
+
f"Found legacy tool.uv.dev-dependencies in {pyproject_path}, replace with dependency-groups.dev"
|
|
109
|
+
)
|
|
110
|
+
logger.warning(
|
|
111
|
+
"See https://docs.astral.sh/uv/concepts/projects/dependencies/#development-dependencies"
|
|
112
|
+
)
|
|
113
|
+
updatable += update_pyproject_dependencies(
|
|
114
|
+
deps,
|
|
115
|
+
project_dir,
|
|
116
|
+
projectname,
|
|
117
|
+
group="dev",
|
|
118
|
+
command=command,
|
|
119
|
+
packages=packages,
|
|
120
|
+
exclude_newer=exclude_newer,
|
|
121
|
+
exclude_newer_package=exclude_newer_package,
|
|
122
|
+
exclude_packages=exclude_packages,
|
|
123
|
+
constraint_file=constraint_file,
|
|
124
|
+
color=color,
|
|
125
|
+
)
|
|
97
126
|
if command == "update":
|
|
98
127
|
logger.info(f"updated {updatable} package version(s) in {pyproject_path}")
|
|
99
128
|
return updatable
|
|
@@ -81,22 +81,17 @@ def check_source_registry(uvpackage, name):
|
|
|
81
81
|
"""
|
|
82
82
|
# check package source for skip reasons
|
|
83
83
|
source = uvpackage.get("source", {})
|
|
84
|
-
|
|
85
|
-
#
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
#
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
|
84
|
+
skip_sources = (
|
|
85
|
+
"virtual", # virtual packages (ie. the project itself)
|
|
86
|
+
"editable", # editable packages
|
|
87
|
+
"path", # local packages provided by file path
|
|
88
|
+
"git", # git packages provided by URL
|
|
89
|
+
"directory", # directory packages provided by local path
|
|
90
|
+
)
|
|
91
|
+
for skip_source in skip_sources:
|
|
92
|
+
if skip_source in source:
|
|
93
|
+
logger.info(f"skip {skip_source} package {name!r}")
|
|
94
|
+
return False
|
|
100
95
|
if "registry" not in source:
|
|
101
96
|
logger.warning(f"no registry entry found for package {name!r}")
|
|
102
97
|
return True
|
|
@@ -80,3 +80,9 @@ name = "fragilicous-git"
|
|
|
80
80
|
version = "1"
|
|
81
81
|
source = { git = "https://example.com/fragilicous-git/fragilicous-git.git#3a2dd24bdb6484c1c0da1116043586ec22a32962" }
|
|
82
82
|
dependencies = [ ]
|
|
83
|
+
|
|
84
|
+
[[package]]
|
|
85
|
+
name = "fragilicous-dir"
|
|
86
|
+
version = "1"
|
|
87
|
+
source = { directory = "../fragilicous-dir/" }
|
|
88
|
+
dependencies = [ ]
|
|
@@ -46,6 +46,7 @@ class PyprojectTomlTest(unittest.TestCase):
|
|
|
46
46
|
self.assertIn("found update 'tensorflow==", output)
|
|
47
47
|
self.assertIn("found update 'certifi===", output)
|
|
48
48
|
self.assertIn("skip excluded package 'fragilicous'", output)
|
|
49
|
+
self.assertIn("[tool.poetry.dependencies] detected", output)
|
|
49
50
|
|
|
50
51
|
@needs_program('uv')
|
|
51
52
|
def test_pyproject_check_package(self):
|
|
@@ -76,6 +77,7 @@ class PyprojectTomlTest(unittest.TestCase):
|
|
|
76
77
|
"ruff ==0.15.9",
|
|
77
78
|
"tensorflow==2.14.0",
|
|
78
79
|
"certifi===2026.1.4",
|
|
80
|
+
"tombi==1.4.0",
|
|
79
81
|
)
|
|
80
82
|
with open(filename) as f:
|
|
81
83
|
content = f.read()
|
|
@@ -97,6 +99,7 @@ class PyprojectTomlTest(unittest.TestCase):
|
|
|
97
99
|
self.assertIn("updating 'ruff ==", output)
|
|
98
100
|
self.assertIn("updating 'tensorflow==", output)
|
|
99
101
|
self.assertIn("updating 'certifi===", output)
|
|
102
|
+
self.assertIn("updating 'tombi==", output)
|
|
100
103
|
self.assertIn("skip excluded package 'fragilicous'", output)
|
|
101
104
|
# check that old package versions have been updated
|
|
102
105
|
with open(filename) as f:
|
|
@@ -47,6 +47,7 @@ class UvLockTest(unittest.TestCase):
|
|
|
47
47
|
self.assertIn("skip excluded package 'fragilicous'", output)
|
|
48
48
|
self.assertIn("skip path package 'superfragilicous'", output)
|
|
49
49
|
self.assertIn("skip git package 'fragilicous-git'", output)
|
|
50
|
+
self.assertIn("skip directory package 'fragilicous-dir'", output)
|
|
50
51
|
|
|
51
52
|
@needs_program('uv')
|
|
52
53
|
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.2.0 → python_update_checker-1.4.0}/tests/data/other-requirements.txt
RENAMED
|
File without changes
|
{python_update_checker-1.2.0 → python_update_checker-1.4.0}/tests/data/pyproject_compatible.toml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|