python-mister-fpga 0.3.1__tar.gz → 0.3.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.
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/CHANGELOG.md +3 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/PKG-INFO +1 -1
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/docs/changelog.md +3 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/pyproject.toml +1 -1
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/src/mister_fpga/__init__.py +1 -1
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/src/mister_fpga/websocket.py +6 -2
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/tests/test_ra.py +1 -1
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/tests/test_ra_web.py +1 -1
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/tests/test_websocket.py +9 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/.github/workflows/docs.yml +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/.github/workflows/release.yml +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/.github/workflows/tests.yml +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/.gitignore +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/LICENSE +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/README.md +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/assets/dark_logo.png +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/assets/icon.png +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/assets/logo.png +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/docs/api.md +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/docs/assets/dark_logo.png +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/docs/assets/icon.png +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/docs/assets/logo.png +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/docs/index.md +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/docs/usage.md +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/mkdocs.yml +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/src/mister_fpga/client.py +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/src/mister_fpga/const.py +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/src/mister_fpga/gamepad.py +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/src/mister_fpga/py.typed +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/src/mister_fpga/ra.py +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/src/mister_fpga/ra_web.py +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/src/mister_fpga/ssh.py +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/tests/test_client.py +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/tests/test_gamepad_ralog.py +0 -0
- {python_mister_fpga-0.3.1 → python_mister_fpga-0.3.2}/tests/test_ssh.py +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.2
|
|
4
|
+
- WebSocket reducer: a launch from the menu emits `gameRunning` before `coreRunning`; the core update no longer wipes that game. Only a switch from another core clears the stale game/system.
|
|
5
|
+
|
|
3
6
|
## 0.3.1
|
|
4
7
|
- Import `asyncssh` at module load. The lazy import inside `MisterSSH._ensure` ran on the event loop and made Home Assistant report blocking calls (liboqs/fido2 file reads) on the first SSH connection.
|
|
5
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: python-mister-fpga
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: Async Python client for the MiSTer FPGA mrext Remote API (REST + WebSocket) and SSH telemetry
|
|
5
5
|
Project-URL: Homepage, https://github.com/hudsonbrendon/python-mister-fpga
|
|
6
6
|
Project-URL: Documentation, https://hudsonbrendon.github.io/python-mister-fpga/
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.2
|
|
4
|
+
- WebSocket reducer: a launch from the menu emits `gameRunning` before `coreRunning`; the core update no longer wipes that game. Only a switch from another core clears the stale game/system.
|
|
5
|
+
|
|
3
6
|
## 0.3.1
|
|
4
7
|
- Import `asyncssh` at module load. The lazy import inside `MisterSSH._ensure` ran on the event loop and made Home Assistant report blocking calls (liboqs/fido2 file reads) on the first SSH connection.
|
|
5
8
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "python-mister-fpga"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.2"
|
|
8
8
|
description = "Async Python client for the MiSTer FPGA mrext Remote API (REST + WebSocket) and SSH telemetry"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -72,8 +72,9 @@ def apply_ws_message(
|
|
|
72
72
|
|
|
73
73
|
Understood prefixes (``prefix:rest``):
|
|
74
74
|
|
|
75
|
-
* ``coreRunning`` — updates :attr:`~mister_fpga.MisterStatus.core`;
|
|
76
|
-
core clears the
|
|
75
|
+
* ``coreRunning`` — updates :attr:`~mister_fpga.MisterStatus.core`;
|
|
76
|
+
switching from another core clears the stale system and game fields
|
|
77
|
+
(a launch from the menu sends ``gameRunning`` first, so that is kept).
|
|
77
78
|
* ``gameRunning`` — updates :attr:`~mister_fpga.MisterStatus.game` and
|
|
78
79
|
:attr:`~mister_fpga.MisterStatus.game_name` (``<system>/<file>``, or the
|
|
79
80
|
bare core name for arcade).
|
|
@@ -104,6 +105,9 @@ def apply_ws_message(
|
|
|
104
105
|
)
|
|
105
106
|
if core == status.core:
|
|
106
107
|
return status, menu_path, index_state
|
|
108
|
+
if status.core is None:
|
|
109
|
+
# On launch mrext sends gameRunning before coreRunning; keep the game.
|
|
110
|
+
return replace(status, core=core), menu_path, index_state
|
|
107
111
|
return (
|
|
108
112
|
replace(
|
|
109
113
|
status, core=core, system=None, system_name=None,
|
|
@@ -160,4 +160,4 @@ def test_public_exports():
|
|
|
160
160
|
assert hasattr(mister_fpga, "MisterRAStatus")
|
|
161
161
|
assert hasattr(mister_fpga, "MisterRAError")
|
|
162
162
|
assert hasattr(mister_fpga, "RA_SUPPORTED_SYSTEMS")
|
|
163
|
-
assert mister_fpga.__version__ == "0.3.
|
|
163
|
+
assert mister_fpga.__version__ == "0.3.2"
|
|
@@ -254,7 +254,7 @@ async def test_validate_success_and_failure():
|
|
|
254
254
|
|
|
255
255
|
|
|
256
256
|
def test_top_level_exports():
|
|
257
|
-
assert mister_fpga.__version__ == "0.3.
|
|
257
|
+
assert mister_fpga.__version__ == "0.3.2"
|
|
258
258
|
assert hasattr(mister_fpga, "MisterRAWeb")
|
|
259
259
|
assert hasattr(mister_fpga, "MisterRAWebError")
|
|
260
260
|
assert hasattr(mister_fpga, "MisterRAWebStats")
|
|
@@ -111,3 +111,12 @@ def test_parse_index_status_progress():
|
|
|
111
111
|
assert (idx.total_steps, idx.current_step) == (10, 3)
|
|
112
112
|
assert idx.description == "Indexing SNES, part 2"
|
|
113
113
|
assert parse_index_status("y,n,0,0,").indexing is False
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def test_core_after_game_on_launch_keeps_game():
|
|
117
|
+
# mrext order on launch: coreRunning: -> gameRunning:SNES/x -> coreRunning:SNES
|
|
118
|
+
status = MisterStatus(online=True, core="sf2")
|
|
119
|
+
for frame in ("coreRunning:", "gameRunning:SNES/x.sfc", "coreRunning:SNES"):
|
|
120
|
+
status, _, _ = apply_ws_message(frame, status, None, (False, False))
|
|
121
|
+
assert status.core == "SNES"
|
|
122
|
+
assert status.game_name == "x"
|
|
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
|