Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AsyncModbusTcpClient defer_start doesn't seem to work anymore #1546

Closed
albireox opened this issue May 24, 2023 · 3 comments · Fixed by #1548
Closed

AsyncModbusTcpClient defer_start doesn't seem to work anymore #1546

albireox opened this issue May 24, 2023 · 3 comments · Fixed by #1548

Comments

@albireox
Copy link

Versions

  • Python: 3.10
  • OS: macOS 13.4
  • Pymodbus: 3.2.2
  • Modbus Hardware (if used): N/A

Pymodbus Specific

  • Server: tcp - async
  • Client: tcp - async

Description

It seems the option defer_start=True in AsyncModbusTcpClient is not honoured anymore in Pymodbus 3.2.2 (I think it was working in 3.1.x). Regardless of whether defer_start is True or False, the function will block once it's awaited. In itself, removing defer_start, that's not necessarily a showstopper, and code can be adapted to work with it, but this breaks a lot of code and it's a bit annoying that this breaking change was made in a minor release.

@janiversen
Copy link
Collaborator

If I remember right it also is no longer documented. We do not support defer_start, if you want that you need to instantiate the class e.g. ModbusTcpServer, and do whatever task handling you want.

@janiversen
Copy link
Collaborator

I can see we still have a couple of references, so lets keep this open until all is removed

@janiversen janiversen reopened this May 24, 2023
@janiversen
Copy link
Collaborator

The change is documented in https://github.com/pymodbus-dev/pymodbus/blob/dev/API_changes.rst#version-320
so it should not come as a surprise.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants