redfetch 1.4.1__tar.gz → 1.4.2__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.
- {redfetch-1.4.1 → redfetch-1.4.2}/CHANGELOG.md +5 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/PKG-INFO +2 -2
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/__about__.py +2 -2
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/processes.py +19 -21
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/cli_reference.py +1 -1
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_close_gating.py +44 -2
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_self_heal_eqpath.py +3 -12
- redfetch-1.4.1/tests/test_readme_cli_reference.py +0 -36
- {redfetch-1.4.1 → redfetch-1.4.2}/.github/workflows/pipeline.yml +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/.gitignore +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/AGENTS.md +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/LICENSE +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/README.md +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/pyproject.toml +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/redfetch.ico +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/__init__.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/api.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/auth.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/config.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/config_firstrun.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/desktop_shortcut.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/detecteq.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/download.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/listener.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/main.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/meta.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/navmesh.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/net.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/post_update.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/push.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/runtime_errors.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/settings.toml +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/shortcuts.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/special.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/store.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/sync.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/sync_discovery.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/sync_executor.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/sync_planner.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/sync_remote.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/sync_types.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/terminal_ui.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/terminal_ui.tcss +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/update_status.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/src/redfetch/utils.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_autologin_eqpath.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_check.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_env_selection.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_fetch_sync_info.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_first_run_setup.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_is_special_or_dependency.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_licensed_resources_filtering.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_path_reset.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_process_lock.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_remote_snapshot.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_settings_local_deltas.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_shortcuts.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_staged_extraction.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_sync_pipeline_regressions.py +0 -0
- {redfetch-1.4.1 → redfetch-1.4.2}/tests/test_sync_queue_rules.py +0 -0
|
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.4.2] - 2026-07-06
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- The update button wouldn't launch MQ if eqbcs.exe was running.
|
|
12
|
+
|
|
8
13
|
## [1.4.1] - 2026-07-05
|
|
9
14
|
|
|
10
15
|
### Changed
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: redfetch
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.2
|
|
4
4
|
Summary: Download and publish EverQuest scripts and software using the RedGuides API
|
|
5
5
|
Project-URL: Homepage, https://www.redguides.com
|
|
6
6
|
Project-URL: Documentation, https://www.redguides.com/community/resources/redfetch.3177/
|
|
7
7
|
Project-URL: Repository, https://github.com/RedGuides/redfetch
|
|
8
8
|
Project-URL: Issues, https://github.com/RedGuides/redfetch/issues
|
|
9
9
|
Project-URL: Changelog, https://github.com/RedGuides/redfetch/blob/main/CHANGELOG.md
|
|
10
|
-
Project-URL: Source_archive, https://github.com/RedGuides/redfetch/archive/
|
|
10
|
+
Project-URL: Source_archive, https://github.com/RedGuides/redfetch/archive/38aedc8ce3dc8e7164b3d3c308732461531a7d4a.zip
|
|
11
11
|
Author-email: Redbot <ask@redguides.com>
|
|
12
12
|
License-Expression: GPL-3.0-or-later
|
|
13
13
|
License-File: LICENSE
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.4.
|
|
22
|
-
__version_tuple__ = version_tuple = (1, 4,
|
|
21
|
+
__version__ = version = '1.4.2'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 4, 2)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Helpers for managing external processes."""
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
|
+
import configparser
|
|
4
5
|
import os
|
|
5
6
|
import subprocess
|
|
6
7
|
import sys
|
|
@@ -95,22 +96,20 @@ def is_executable_running(exe_path: str, running: set[str] | None = None) -> boo
|
|
|
95
96
|
|
|
96
97
|
|
|
97
98
|
def _spawned_loader_name(mq_folder: str) -> str | None:
|
|
98
|
-
"""Loader-copy filename from MacroQuest.ini
|
|
99
|
-
ini_path
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
except OSError:
|
|
113
|
-
pass
|
|
99
|
+
"""Loader-copy filename from MacroQuest.ini."""
|
|
100
|
+
for ini_path in (
|
|
101
|
+
os.path.join(mq_folder, "config", "MacroQuest.ini"),
|
|
102
|
+
os.path.join(mq_folder, "MacroQuest.ini"),
|
|
103
|
+
):
|
|
104
|
+
|
|
105
|
+
parser = configparser.ConfigParser(interpolation=None, strict=False)
|
|
106
|
+
try:
|
|
107
|
+
parser.read(ini_path, encoding="utf-8")
|
|
108
|
+
name = parser.get("Internal", "SpawnedProcess", fallback="").strip()
|
|
109
|
+
except (configparser.Error, OSError):
|
|
110
|
+
continue
|
|
111
|
+
if name:
|
|
112
|
+
return name
|
|
114
113
|
return None
|
|
115
114
|
|
|
116
115
|
|
|
@@ -136,13 +135,12 @@ def macroquest_session_running(mq_folder: str, running: set[str] | None = None)
|
|
|
136
135
|
if running is None:
|
|
137
136
|
running = running_executable_paths()
|
|
138
137
|
folder = _norm(mq_folder)
|
|
138
|
+
alias = _spawned_loader_name(mq_folder)
|
|
139
|
+
alias = alias.lower() if alias else None
|
|
139
140
|
for path in running:
|
|
140
|
-
|
|
141
|
+
base = os.path.basename(path)
|
|
142
|
+
if base == alias or (base == "macroquest.exe" and os.path.dirname(path) == folder):
|
|
141
143
|
return True
|
|
142
|
-
spawned = _spawned_loader_name(mq_folder)
|
|
143
|
-
if spawned:
|
|
144
|
-
spawned = spawned.lower()
|
|
145
|
-
return any(os.path.basename(path) == spawned for path in running)
|
|
146
144
|
return False
|
|
147
145
|
|
|
148
146
|
|
|
@@ -5,7 +5,7 @@ changing a command or option, refresh the docs:
|
|
|
5
5
|
|
|
6
6
|
hatch run dev:gen-docs # or: python tests/cli_reference.py --write
|
|
7
7
|
|
|
8
|
-
``
|
|
8
|
+
Run ``hatch run dev:check-docs`` in CI or before release to catch drift.
|
|
9
9
|
"""
|
|
10
10
|
from __future__ import annotations
|
|
11
11
|
|
|
@@ -194,10 +194,11 @@ def _norm_set(*paths):
|
|
|
194
194
|
return {os.path.normcase(os.path.normpath(p)) for p in paths}
|
|
195
195
|
|
|
196
196
|
|
|
197
|
-
def
|
|
197
|
+
def test_session_ignores_unrecorded_exe_in_folder(tmp_path, monkeypatch):
|
|
198
|
+
# With no loader recorded (fresh install), a stray exe in the folder is NOT a session.
|
|
198
199
|
monkeypatch.setattr(processes, "_spawned_loader_name", lambda folder: None)
|
|
199
200
|
running = _norm_set(str(tmp_path / "LV3XGukn.exe"))
|
|
200
|
-
assert processes.macroquest_session_running(str(tmp_path), running) is
|
|
201
|
+
assert processes.macroquest_session_running(str(tmp_path), running) is False
|
|
201
202
|
|
|
202
203
|
|
|
203
204
|
@windows_paths
|
|
@@ -222,6 +223,39 @@ def test_session_not_running_when_nothing_matches(tmp_path, monkeypatch):
|
|
|
222
223
|
assert processes.macroquest_session_running(str(tmp_path), running) is False
|
|
223
224
|
|
|
224
225
|
|
|
226
|
+
@windows_paths
|
|
227
|
+
def test_session_ignores_renamed_eqbcs_copy_when_loader_not_running(tmp_path, monkeypatch):
|
|
228
|
+
# The reported bug: EQBCS runs as a random-named RunFromTemp copy next to MQ and survives it.
|
|
229
|
+
monkeypatch.setattr(processes, "_spawned_loader_name", lambda folder: "LV3XGukn.exe")
|
|
230
|
+
running = _norm_set(str(tmp_path / "wUUayFYjXM.exe")) # an EQBCS copy; loader not running
|
|
231
|
+
assert processes.macroquest_session_running(str(tmp_path), running) is False
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
@windows_paths
|
|
235
|
+
def test_session_matches_recorded_loader_amid_other_folder_exes(tmp_path, monkeypatch):
|
|
236
|
+
# The recorded loader name is authoritative: MQ is up when that copy runs, whatever else
|
|
237
|
+
# (LootSort, MeshGenerator, an EQBCS copy...) happens to share the folder.
|
|
238
|
+
monkeypatch.setattr(processes, "_spawned_loader_name", lambda folder: "LV3XGukn.exe")
|
|
239
|
+
running = _norm_set(str(tmp_path / "LV3XGukn.exe"), str(tmp_path / "LootSort.exe"))
|
|
240
|
+
assert processes.macroquest_session_running(str(tmp_path), running) is True
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
@windows_paths
|
|
244
|
+
def test_session_ignores_folder_tools_when_loader_recorded(tmp_path, monkeypatch):
|
|
245
|
+
# A folder tool running is not a session when a loader name is recorded and its process is gone.
|
|
246
|
+
monkeypatch.setattr(processes, "_spawned_loader_name", lambda folder: "LV3XGukn.exe")
|
|
247
|
+
running = _norm_set(str(tmp_path / "LootSort.exe"))
|
|
248
|
+
assert processes.macroquest_session_running(str(tmp_path), running) is False
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
@windows_paths
|
|
252
|
+
def test_session_detects_macroquest_exe_direct(tmp_path, monkeypatch):
|
|
253
|
+
# RunFromTemp off: MacroQuest.exe runs directly from the folder -> unambiguously a session.
|
|
254
|
+
monkeypatch.setattr(processes, "_spawned_loader_name", lambda folder: None)
|
|
255
|
+
running = _norm_set(str(tmp_path / "MacroQuest.exe"))
|
|
256
|
+
assert processes.macroquest_session_running(str(tmp_path), running) is True
|
|
257
|
+
|
|
258
|
+
|
|
225
259
|
def test_spawned_loader_name_parsed_from_ini(tmp_path):
|
|
226
260
|
(tmp_path / "MacroQuest.ini").write_text(
|
|
227
261
|
"[Other]\nSpawnedProcess=wrong.exe\n[Internal]\nSpawnedProcess=Ab12Cd34.exe\n"
|
|
@@ -230,6 +264,14 @@ def test_spawned_loader_name_parsed_from_ini(tmp_path):
|
|
|
230
264
|
assert processes._spawned_loader_name(str(tmp_path / "missing")) is None
|
|
231
265
|
|
|
232
266
|
|
|
267
|
+
def test_spawned_loader_name_prefers_config_subfolder(tmp_path):
|
|
268
|
+
# Current MQ writes its INI under config/; the reader must look there, and it wins over root.
|
|
269
|
+
(tmp_path / "config").mkdir()
|
|
270
|
+
(tmp_path / "config" / "MacroQuest.ini").write_text("[Internal]\nSpawnedProcess=fromconfig.exe\n")
|
|
271
|
+
(tmp_path / "MacroQuest.ini").write_text("[Internal]\nSpawnedProcess=fromroot.exe\n")
|
|
272
|
+
assert processes._spawned_loader_name(str(tmp_path)) == "fromconfig.exe"
|
|
273
|
+
|
|
274
|
+
|
|
233
275
|
# --- terminate/restart hardening --------------------------------------------------------
|
|
234
276
|
|
|
235
277
|
def test_terminate_reports_hung_process_and_continues(fake_windows):
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
"""config.self_heal_eqpath fills a blank/stale EQPATH from MacroQuest autologin at startup.
|
|
2
|
-
|
|
3
|
-
Covers the empty-or-invalid heal policy: heal when EQPATH is blank or its folder is gone,
|
|
4
|
-
never clobber a valid deliberate value, and keep one env's failure from aborting the others.
|
|
5
|
-
The @format linchpin test proves the payoff: a stored EQPATH makes maps resolve to <eq>/maps.
|
|
6
|
-
"""
|
|
1
|
+
"""config.self_heal_eqpath fills a blank/stale EQPATH from MacroQuest autologin at startup."""
|
|
7
2
|
import os
|
|
8
3
|
import sqlite3
|
|
9
4
|
|
|
@@ -138,7 +133,6 @@ def test_no_login_db_no_heal(tmp_path, spy, monkeypatch):
|
|
|
138
133
|
|
|
139
134
|
assert spy == []
|
|
140
135
|
|
|
141
|
-
|
|
142
136
|
def test_only_blank_env_heals(tmp_path, eq_dir, spy, monkeypatch):
|
|
143
137
|
vvmq = _make_vvmq(tmp_path, "vvmq_live", "live", eq_dir)
|
|
144
138
|
envs = {
|
|
@@ -169,11 +163,7 @@ def test_exception_in_one_env_does_not_abort_others(tmp_path, eq_dir, spy, monke
|
|
|
169
163
|
# --- the @format linchpin ---------------------------------------------------
|
|
170
164
|
|
|
171
165
|
def test_maps_resolve_under_stored_eqpath(tmp_path, monkeypatch):
|
|
172
|
-
"""A stored EQPATH (where the heal writes it) makes maps resource 153 resolve to <eq>/maps.
|
|
173
|
-
|
|
174
|
-
This is the whole point of self-heal over the old read-through: fix the stored value once
|
|
175
|
-
and every `@format {this.eqpath}` consumer lights up for free.
|
|
176
|
-
"""
|
|
166
|
+
"""A stored EQPATH (where the heal writes it) makes maps resource 153 resolve to <eq>/maps."""
|
|
177
167
|
from dynaconf import Dynaconf
|
|
178
168
|
from redfetch import sync_discovery
|
|
179
169
|
|
|
@@ -196,3 +186,4 @@ def test_maps_resolve_under_stored_eqpath(tmp_path, monkeypatch):
|
|
|
196
186
|
|
|
197
187
|
resolved = sync_discovery.resolve_root_path("153", None, "LIVE")
|
|
198
188
|
assert resolved == os.path.normpath(str(eq / "maps"))
|
|
189
|
+
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"""Guard against README drift: the Command Line Reference is generated from the
|
|
2
|
-
typer app (see cli_reference.py). This fails if README.md is out of date, i.e.
|
|
3
|
-
someone changed a command/option in main.py but didn't regenerate the docs.
|
|
4
|
-
|
|
5
|
-
Fix a failure with: hatch run dev:gen-docs
|
|
6
|
-
"""
|
|
7
|
-
import difflib
|
|
8
|
-
import sys
|
|
9
|
-
from pathlib import Path
|
|
10
|
-
|
|
11
|
-
sys.path.insert(0, str(Path(__file__).resolve().parent)) # import the sibling helper
|
|
12
|
-
|
|
13
|
-
from cli_reference import README, current_block, render_reference
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def test_readme_cli_reference_is_current():
|
|
17
|
-
readme = README.read_text(encoding="utf-8")
|
|
18
|
-
block = current_block(readme)
|
|
19
|
-
assert block is not None, (
|
|
20
|
-
"CLI reference markers are missing from README.md. Restore them and run "
|
|
21
|
-
"`hatch run dev:gen-docs`."
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
expected = render_reference()
|
|
25
|
-
if block != expected:
|
|
26
|
-
diff = "\n".join(
|
|
27
|
-
difflib.unified_diff(
|
|
28
|
-
block.splitlines(), expected.splitlines(),
|
|
29
|
-
fromfile="README.md (committed)", tofile="generated from main.py",
|
|
30
|
-
lineterm="",
|
|
31
|
-
)
|
|
32
|
-
)
|
|
33
|
-
raise AssertionError(
|
|
34
|
-
"README.md Command Line Reference is stale. Regenerate with "
|
|
35
|
-
"`hatch run dev:gen-docs` (command help lives in src/redfetch/main.py).\n" + diff
|
|
36
|
-
)
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|