-
Notifications
You must be signed in to change notification settings - Fork 1k
2.5.3 #660
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
2.5.3 #660
Conversation
|
Kudos, SonarCloud Quality Gate passed!
|
|
I'm also have issue with #657. When will this PR be merged? |
|
@Akkarine Please give a try with https://pypi.org/project/pymodbus/2.5.3rc1/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fix for the timeout fixes the timeout, but breaks loop argument. One of the possible solutions is to filter out already specified arguments from the function calls
| """ | ||
| self.framer = framer | ||
| ReconnectingAsyncioModbusTcpClient.__init__(self, protocol_class, loop) | ||
| ReconnectingAsyncioModbusTcpClient.__init__(self, protocol_class, loop, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before this, remove protocol_class and loop from kwargs
| Factory function to create initialized protocol instance. | ||
| """ | ||
| protocol = self.protocol_class(framer=self.framer) | ||
| protocol = self.protocol_class(framer=self.framer, **self._proto_args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before this, remove framer from self._proto_args
| DELAY_MAX_MS = 1000 * 60 * 5 | ||
|
|
||
| def __init__(self, protocol_class=None, loop=None): | ||
| def __init__(self, protocol_class=None, loop=None, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before this, remove protocol_class and loop from kwargs
| """ | ||
| client = ReconnectingAsyncioModbusTcpClient(protocol_class=proto_cls, | ||
| loop=loop) | ||
| loop=loop, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before this, remove loop and protocol_class from kwargs
| client = ReconnectingAsyncioModbusTlsClient(protocol_class=proto_cls, | ||
| loop=loop, framer=framer) | ||
| loop=loop, framer=framer, | ||
| **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before this, remove loop and framer from kwargs
| """ | ||
| client = ReconnectingAsyncioModbusUdpClient(protocol_class=proto_cls, | ||
| loop=loop) | ||
| loop=loop, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before this, remove from kwargs (i.e. {arg:argv[arg] for arg in kwargs if arg not in ["loop", "protocol_class"]}
| if not loop.is_running(): | ||
| asyncio.set_event_loop(loop) | ||
| cor = init_tcp_client(proto_cls, loop, host, port) | ||
| cor = init_tcp_client(proto_cls, loop, host, port, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before this, remove from kwargs (i.e. {arg:argv[arg] for arg in kwargs if arg not in ["proto_cls","loop","host","port"]}
| client = loop.run_until_complete(asyncio.gather(cor))[0] | ||
| else: | ||
| cor = init_tcp_client(proto_cls, loop, host, port) | ||
| cor = init_tcp_client(proto_cls, loop, host, port, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before this, remove from kwargs (i.e. {arg:argv[arg] for arg in kwargs if arg not in ["proto_cls","loop","host","port"]}
| loop = kwargs.get("loop") or asyncio.get_event_loop() | ||
| proto_cls = kwargs.get("proto_cls", None) | ||
| cor = init_udp_client(proto_cls, loop, host, port) | ||
| cor = init_udp_client(proto_cls, loop, host, port, **kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before this, remove from kwargs (i.e. {arg:argv[arg] for arg in kwargs if arg not in ["proto_cls","loop","host","port"]}
|
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
|
Kudos, SonarCloud Quality Gate passed!
|








version 2.5.3