pyappify 1.0.11__tar.gz → 1.0.13__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyappify
3
- Version: 1.0.11
3
+ Version: 1.0.13
4
4
  Summary: My awesome Python application
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -412,6 +412,12 @@ def get_version_list(
412
412
  if not isinstance(release_only, bool):
413
413
  raise TypeError("release_only must be a boolean")
414
414
 
415
+ if not _is_supported_pyappify_version(pyappify_version):
416
+ raise RuntimeError(
417
+ "PyAppify does not support checking for updates for "
418
+ f"pyappify_version: {pyappify_version}"
419
+ )
420
+
415
421
  if "PYAPPIFY_PYTHON_TEST" in os.environ:
416
422
  if _wait_for_exit(exit_event, 5):
417
423
  _raise_if_exit_requested(exit_event)
@@ -433,6 +439,19 @@ def get_version_list(
433
439
  return response
434
440
 
435
441
 
442
+ def _is_supported_pyappify_version(version):
443
+ """Return whether a PyAppify version is valid and supports version checks."""
444
+ if not isinstance(version, str) or not version:
445
+ return False
446
+
447
+ normalized = version[1:] if version.startswith("v") else version
448
+ parts = normalized.split(".")
449
+ if not parts or any(not part.isdigit() for part in parts):
450
+ return False
451
+
452
+ return tuple(int(part) for part in parts) >= (1, 2, 2)
453
+
454
+
436
455
  def get_versions(number_versions=10, release_only=True, timeout=120, exit_event=None):
437
456
  """Alias for get_version_list."""
438
457
  return get_version_list(number_versions, release_only, timeout, exit_event)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyappify
3
- Version: 1.0.11
3
+ Version: 1.0.13
4
4
  Summary: My awesome Python application
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pyappify"
7
- version = "1.0.11"
7
+ version = "1.0.13"
8
8
  description = "My awesome Python application"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.7"
File without changes
File without changes