jmcore.version
jmcore.version
Centralized version management for JoinMarket NG.
This is the single source of truth for the project version. All components inherit their version from here.
Attributes
GITHUB_RELEASES_URL = 'https://api.github.com/repos/joinmarket-ng/joinmarket-ng/releases/latest'
module-attribute
VERSION = __version__
module-attribute
__version__ = '0.19.3'
module-attribute
logger = logging.getLogger(__name__)
module-attribute
Classes
UpdateCheckResult
dataclass
Result of a GitHub update check.
Source code in jmcore/src/jmcore/version.py
61 62 63 64 65 66 | |
Attributes
is_newer: bool
instance-attribute
latest_version: str
instance-attribute
Functions
check_for_updates_from_github(socks_proxy: str | None = None, timeout: float = 30.0) -> UpdateCheckResult | None
async
Check GitHub for the latest release and compare with the local version.
This function makes an HTTP request to the GitHub API. When socks_proxy is provided, the request is routed through the given SOCKS5 proxy (e.g. Tor).
Privacy note: This contacts GitHub and reveals your IP (or Tor exit node).
Only call this when the user has explicitly opted in via check_for_updates.
Args: socks_proxy: Optional SOCKS5 proxy URL (e.g. "socks5h://127.0.0.1:9050"). timeout: HTTP request timeout in seconds.
Returns: UpdateCheckResult with the latest version and whether it is newer, or None if the check failed for any reason.
Source code in jmcore/src/jmcore/version.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
get_version() -> str
Return the current version string.
Source code in jmcore/src/jmcore/version.py
26 27 28 | |
get_version_info() -> dict[str, str | int]
Return version information as a dictionary.
Source code in jmcore/src/jmcore/version.py
37 38 39 40 41 42 43 44 45 | |
get_version_tuple() -> tuple[int, int, int]
Return the version as a tuple of (major, minor, patch).
Source code in jmcore/src/jmcore/version.py
31 32 33 34 | |