Skip to content

docs: the comparison and FAQ know about Modbus TCP and RTU over TCP - #3

Merged
Mercurrial merged 1 commit into
mainfrom
claude/vigilant-turing-paxrb9
Oct 26, 2026
Merged

Mercurrial merged 1 commit into
mainfrom
claude/vigilant-turing-paxrb9

Conversation

@Mercurrial

Copy link
Copy Markdown
Owner

Что изменено и зачем

Страница сравнения с Modbus Poll / Modbus Slave всё ещё утверждала, что Modbus TCP в ModbusReader нет совсем, хотя Modbus TCP и RTU по TCP уже реализованы (core/transports.py, раздел «Не выпущено» в CHANGELOG.md, docs/modbus/tcp.md, docs/modbus/rtu-over-tcp.md).

  • docs/compare.md / docs/compare.en.md
    • строка протоколов разделена: «Modbus TCP, RTU по TCP — ✓ в следующей версии» и «Modbus ASCII, UDP — нет»;
    • «Когда нужен Modbus Poll» теперь называет только ASCII и UDP, плюс одна фраза о том, что TCP появится в следующей версии;
    • в «Когда хватит ModbusReader» добавлены приборы в сети, со ссылками на новые страницы о протоколе;
    • во вступлении и description упомянут TCP;
    • строка с источником и датой и дисклеймер о Witte Software не тронуты.
  • Строки о функциях мастера и эмулятора сверены с кодом, они по-прежнему верны. Мастер использует функции 01–06, а многорегистровые значения пишет по слову функцией 06 (ModbusCore._execute_write). Эмулятор отвечает на 01–06, 15 и 16 (slave_core.build_response).
  • FAQ на главной (docs/index.md, docs/index.en.md): в ответах «Чем отличается от Modbus Poll» и «Поддерживается ли Modbus TCP?» больше нет «пока нет»; оба говорят, что TCP будет в следующей версии.
  • README: вступление и английский абзац упоминают Modbus TCP и RTU по TCP как функции следующей версии.

TCP помечен как «в следующей версии», потому что в выпущенной 26.10.2 его нет, а сайт публикуется с main. Так же уже сделано на страницах modbus/tcp.md и modbus/rtu-over-tcp.md. При выпуске эту пометку нужно снять вместе с заметками на тех страницах. site_description в mkdocs.yml не меняется до выпуска: в нём нет утверждения, что TCP не поддерживается, он только описывает RTU.

Как проверено

  • python -m pytest проходит — не запускался: изменения только в документации
  • добавлен тест на новое поведение или на исправленную ошибку — не нужен, только документация
  • для изменений интерфейса приложены снимки «до» и «после» — интерфейс не менялся
  • тексты интерфейса добавлены в app/i18n.py на русском и английском — не нужно
  • заметное для пользователя изменение описано в разделе «Не выпущено» в CHANGELOG.md — TCP там уже описан

mkdocs build --strict с пакетами из requirements-docs.txt проходит без предупреждений. Новые ссылки на modbus/tcp/ и modbus/rtu-over-tcp/ в обеих языковых версиях разрешаются.


Generated by Claude Code

The Modbus Poll comparison still said ModbusReader had no TCP at all. The
protocol row is split: Modbus TCP and RTU over TCP are a tick, marked "in
the next version" like the Modbus TCP pages (they are in the unreleased
changelog, not in 26.10.2); ASCII and UDP stay "no". "When you need Modbus
Poll" now names ASCII and UDP only, "When ModbusReader is enough" gains
devices on a network, linked to the new protocol pages. The master and
emulator function rows were checked against the code and still hold
(01-06 with word-by-word 06 writes; the emulator 01-06, 15, 16).

The home-page FAQ and the README intro say the same; the site
description is left as it is until the release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BSin4uE9YSP4DTxziTKjoK

Copy link
Copy Markdown
Owner Author

tests / ubuntu-latest is red, but the failures don't come from this PR. The PR only changes Markdown. The same four tests have failed on main since 3af3ad5 (feat(update): updates install in the background), most recently on 8ca244f:

  • tests/test_side_by_side.py::test_a_background_update_ends_with_the_rail_button
  • tests/test_side_by_side.py::test_a_failed_background_install_says_so
  • tests/test_side_by_side.py::test_the_card_installs_and_turns_into_restart — ValueError: creationflags is only supported on Windows platforms
  • tests/test_updater.py::test_an_automatic_offer_waits_for_the_first_launch_guide — passes on its own; it fails only after the three above in a full run

Cause. core/updater.start_detached always passes Windows creationflags. On Linux, flags | 0x01000000 is non-zero, so Popen raises ValueError. That isn't the OSError its fallback catches, and it isn't the OSError caught in gui/update.py (InstallRunner.start) or gui/main_window.py (quit_for_update) either.

No fix exists yet. Proposed patch, for a separate PR rather than this docs one:

 def start_detached(args: list[str]) -> subprocess.Popen:
     """Start *args* so that it outlives this process."""
-    flags = (getattr(subprocess, "DETACHED_PROCESS", 0)
-             | getattr(subprocess, "CREATE_NEW_PROCESS_GROUP", 0))
     kw = dict(stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL,
               stderr=subprocess.DEVNULL, close_fds=True, env=child_env())
+    if sys.platform != "win32":
+        # creationflags exists only on Windows (elsewhere Popen raises
+        # ValueError); a session of its own detaches the child here.
+        return subprocess.Popen(args, start_new_session=True, **kw)
+    flags = (getattr(subprocess, "DETACHED_PROCESS", 0)
+             | getattr(subprocess, "CREATE_NEW_PROCESS_GROUP", 0))
     try:
         return subprocess.Popen(args, creationflags=flags | 0x01000000, **kw)

I ran the full suite locally on Linux, headless, with the pinned requirements-dev.txt. With the patch it exits 0, and all four tests pass. Without it, the same four fail as in CI. The Windows path is unchanged.

I'm re-running the failed job once. It will fail the same way until the fix lands on main.


Generated by Claude Code

@Mercurrial
Mercurrial marked this pull request as ready for review October 26, 2026 10:56
@Mercurrial
Mercurrial merged commit 2158346 into main Oct 26, 2026
0 of 2 checks passed
@Mercurrial
Mercurrial deleted the claude/vigilant-turing-paxrb9 branch October 26, 2026 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants