python-update-checker 1.1.0__tar.gz → 1.3.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.
Files changed (25) hide show
  1. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/PKG-INFO +2 -1
  2. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/README.md +1 -0
  3. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/pyproject.toml +1 -1
  4. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/pyproject.toml.orig +1 -1
  5. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/src/puc/__init__.py +1 -1
  6. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/src/puc/uvlock.py +24 -13
  7. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/tests/data/uv.lock +12 -0
  8. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/tests/test_uv_lock.py +2 -0
  9. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/.gitignore +0 -0
  10. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/.ruff.toml +0 -0
  11. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/Makefile +0 -0
  12. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/scripts/install_dev.sh +0 -0
  13. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/src/puc/cli.py +0 -0
  14. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/src/puc/dependencies.py +0 -0
  15. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/src/puc/logging.py +0 -0
  16. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/src/puc/pyprojecttoml.py +0 -0
  17. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/src/puc/requirementstxt.py +0 -0
  18. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/tests/__init__.py +0 -0
  19. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/tests/data/other-requirements.txt +0 -0
  20. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/tests/data/pyproject.toml +0 -0
  21. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/tests/data/pyproject_compatible.toml +0 -0
  22. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/tests/data/requirements.txt +0 -0
  23. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/tests/test_latest.py +0 -0
  24. {python_update_checker-1.1.0 → python_update_checker-1.3.0}/tests/test_pyproject_toml.py +0 -0
  25. {python_update_checker-1.1.0 → python_update_checker-1.3.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.1.0
3
+ Version: 1.3.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'"`
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "python-update-checker"
3
- version = "1.1.0"
3
+ version = "1.3.0"
4
4
  readme = "README.md"
5
5
  requires-python = ">=3.11"
6
6
  license = "GPL-3.0-only"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "python-update-checker"
3
- version = "1.1.0"
3
+ version = "1.3.0"
4
4
  readme = "README.md"
5
5
  requires-python = ">=3.11"
6
6
  license = "GPL-3.0-only"
@@ -2,4 +2,4 @@
2
2
  # Copyright: GPL-v3
3
3
  """module file"""
4
4
 
5
- __version__ = "1.1.0"
5
+ __version__ = "1.3.0"
@@ -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 package source for skip reasons
57
- source = uvpackage.get("source", {})
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,28 @@ 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
+ 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
95
+ if "registry" not in source:
96
+ logger.warning(f"no registry entry found for package {name!r}")
97
+ return True
98
+
99
+
89
100
  def update_uvlock_dependency(
90
101
  package,
91
102
  version,
@@ -74,3 +74,15 @@ 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 = [ ]
83
+
84
+ [[package]]
85
+ name = "fragilicous-dir"
86
+ version = "1"
87
+ source = { directory = "../fragilicous-dir/" }
88
+ dependencies = [ ]
@@ -46,6 +46,8 @@ 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)
50
+ self.assertIn("skip directory package 'fragilicous-dir'", output)
49
51
 
50
52
  @needs_program('uv')
51
53
  def test_uvlock_check_package(self):