lastversion 3.6.3__tar.gz → 3.6.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.
Files changed (57) hide show
  1. {lastversion-3.6.3/src/lastversion.egg-info → lastversion-3.6.4}/PKG-INFO +1 -1
  2. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/__about__.py +1 -1
  3. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/cli.py +3 -1
  4. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/lastversion.py +6 -3
  5. {lastversion-3.6.3 → lastversion-3.6.4/src/lastversion.egg-info}/PKG-INFO +1 -1
  6. {lastversion-3.6.3 → lastversion-3.6.4}/LICENSE +0 -0
  7. {lastversion-3.6.3 → lastversion-3.6.4}/MANIFEST.in +0 -0
  8. {lastversion-3.6.3 → lastversion-3.6.4}/README-ZH-CN.md +0 -0
  9. {lastversion-3.6.3 → lastversion-3.6.4}/README.md +0 -0
  10. {lastversion-3.6.3 → lastversion-3.6.4}/pyproject.toml +0 -0
  11. {lastversion-3.6.3 → lastversion-3.6.4}/setup.cfg +0 -0
  12. {lastversion-3.6.3 → lastversion-3.6.4}/setup.py +0 -0
  13. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/__init__.py +0 -0
  14. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/__main__.py +0 -0
  15. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/ai.py +0 -0
  16. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/argparse_version.py +0 -0
  17. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/cache.py +0 -0
  18. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/config.py +0 -0
  19. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/exceptions.py +0 -0
  20. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/holder_factory.py +0 -0
  21. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/__init__.py +0 -0
  22. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/alpine.py +0 -0
  23. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/base.py +0 -0
  24. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/bibucket.py +0 -0
  25. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/feed.py +0 -0
  26. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/gitea.py +0 -0
  27. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/github.py +0 -0
  28. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/gitlab.py +0 -0
  29. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/helmchat.py +0 -0
  30. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/local.py +0 -0
  31. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/mercurial.py +0 -0
  32. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/pypi.py +0 -0
  33. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/sourceforge.py +0 -0
  34. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/system.py +0 -0
  35. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/test.py +0 -0
  36. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/wikipedia.py +0 -0
  37. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/repo_holders/wordpress.py +0 -0
  38. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/spdx_id_to_rpmspec.py +0 -0
  39. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/utils.py +0 -0
  40. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion/version.py +0 -0
  41. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion.egg-info/SOURCES.txt +0 -0
  42. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion.egg-info/dependency_links.txt +0 -0
  43. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion.egg-info/entry_points.txt +0 -0
  44. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion.egg-info/not-zip-safe +0 -0
  45. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion.egg-info/requires.txt +0 -0
  46. {lastversion-3.6.3 → lastversion-3.6.4}/src/lastversion.egg-info/top_level.txt +0 -0
  47. {lastversion-3.6.3 → lastversion-3.6.4}/tests/test_alpine.py +0 -0
  48. {lastversion-3.6.3 → lastversion-3.6.4}/tests/test_cache.py +0 -0
  49. {lastversion-3.6.3 → lastversion-3.6.4}/tests/test_cli.py +0 -0
  50. {lastversion-3.6.3 → lastversion-3.6.4}/tests/test_gitea.py +0 -0
  51. {lastversion-3.6.3 → lastversion-3.6.4}/tests/test_github.py +0 -0
  52. {lastversion-3.6.3 → lastversion-3.6.4}/tests/test_gitlab.py +0 -0
  53. {lastversion-3.6.3 → lastversion-3.6.4}/tests/test_hg.py +0 -0
  54. {lastversion-3.6.3 → lastversion-3.6.4}/tests/test_lastversion.py +0 -0
  55. {lastversion-3.6.3 → lastversion-3.6.4}/tests/test_pypi.py +0 -0
  56. {lastversion-3.6.3 → lastversion-3.6.4}/tests/test_sf.py +0 -0
  57. {lastversion-3.6.3 → lastversion-3.6.4}/tests/test_wiki.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lastversion
3
- Version: 3.6.3
3
+ Version: 3.6.4
4
4
  Summary: A CLI tool to find the latest stable version of an arbitrary project
5
5
  Home-page: https://github.com/dvershinin/lastversion
6
6
  Author: Danila Vershinin
@@ -1,4 +1,4 @@
1
1
  """Package metadata"""
2
2
 
3
- __version__ = "3.6.3"
3
+ __version__ = "3.6.4"
4
4
  __self__ = "dvershinin/lastversion"
@@ -230,6 +230,7 @@ def process_bulk_input(args):
230
230
  only=args.only,
231
231
  even=args.even,
232
232
  cache_ttl=args.cache_ttl,
233
+ skip_release_cache=args.no_cache,
233
234
  )
234
235
  if result:
235
236
  if args.format == "json":
@@ -444,7 +445,7 @@ def main(argv=None):
444
445
  "--no-cache",
445
446
  dest="no_cache",
446
447
  action="store_true",
447
- help="Do not use cache for HTTP requests",
448
+ help="Do not use cache (both HTTP requests and release data cache)",
448
449
  )
449
450
  parser.add_argument(
450
451
  "--cache-ttl",
@@ -620,6 +621,7 @@ def main(argv=None):
620
621
  formal=args.formal,
621
622
  changelog=args.changelog,
622
623
  cache_ttl=args.cache_ttl,
624
+ skip_release_cache=args.no_cache,
623
625
  )
624
626
  except (ApiCredentialsError, BadProjectError) as error:
625
627
  log.critical(str(error))
@@ -203,6 +203,7 @@ def latest(
203
203
  formal=False,
204
204
  changelog=False,
205
205
  cache_ttl=None,
206
+ skip_release_cache=False,
206
207
  ):
207
208
  r"""Find the latest release version for a project.
208
209
 
@@ -231,6 +232,8 @@ def latest(
231
232
  changelog (bool): Populate release["changelog"] using upstream notes (if True)
232
233
  cache_ttl (int): Optional TTL override for release data cache (seconds).
233
234
  Only used when release cache is enabled in config.
235
+ skip_release_cache (bool): Skip the release data cache entirely (both read and write).
236
+ Useful when you need fresh data from the source.
234
237
 
235
238
  Examples:
236
239
  Find the latest version of Mautic, it is OK to consider betas.
@@ -290,7 +293,7 @@ def latest(
290
293
  return cached_data
291
294
 
292
295
  # Try to get from cache for formats that can use cached data
293
- if release_cache.enabled and output_format in ["json", "dict", "version", "tag"]:
296
+ if release_cache.enabled and not skip_release_cache and output_format in ["json", "dict", "version", "tag"]:
294
297
  cached_release = release_cache.get(repo, **cache_key_params)
295
298
  if cached_release:
296
299
  result = _return_from_cache(cached_release, output_format, is_stale=False)
@@ -401,8 +404,8 @@ def latest(
401
404
 
402
405
  release["source_url"] = project.release_download_url(release, short_urls)
403
406
 
404
- # Store in release cache if enabled
405
- if release_cache.enabled:
407
+ # Store in release cache if enabled (skip if explicitly bypassing cache)
408
+ if release_cache.enabled and not skip_release_cache:
406
409
  release_cache.set(repo, release, ttl=cache_ttl, **cache_key_params)
407
410
 
408
411
  return release
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lastversion
3
- Version: 3.6.3
3
+ Version: 3.6.4
4
4
  Summary: A CLI tool to find the latest stable version of an arbitrary project
5
5
  Home-page: https://github.com/dvershinin/lastversion
6
6
  Author: Danila Vershinin
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes