Skip to content

Conversation

@moltob
Copy link

@moltob moltob commented Jan 24, 2015

Hi Galen,

this is the pull request, including the client code for asyncio support in Python 3 including tests and some adaptations to the existing tests. Asynchronous tests with Twisted imports have been disabled completely. Some adaptations were also made to synchronous server tests to provide mocks for standard library internal socket calls.

Also I kept the Twisted code in there to allow later merging of Python 3 and Python 2.

This pull request references a clean feature branch to ease your review.

Best,
Mike

@meeas
Copy link
Contributor

meeas commented Mar 22, 2016

Mike, I'm looking at using this patch for one of my projects. Anything I should know before I start using the asyncio functionality? Is this tested for both serial and tcp? Any limitations with using the new 3.5 syntax (PEP 492)?

@moltob
Copy link
Author

moltob commented Mar 22, 2016

Hey meeas, I am using the patch in a production environment for over a year now without issues. Note that I am using only a very limited set of pymodubus features, namely only the asynchronous client to talk to my devices over TCP.

With respect to using async/await: I havent't tried this yet, but the PEP says that the 3.4 generator-based coroutines are awaitable, so you should be able to drive them via await. Let me know.

@mbustamanteo
Copy link

I'm using this patch on production as well. Thanks @moltob !

Copy link
Contributor

@dhoomakethu dhoomakethu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moltob I do not have a working setup for python3 . I see no harm with the PR. I will go ahead and merge,

@dhoomakethu dhoomakethu added this to the 1.3.0 milestone May 12, 2017
@dhoomakethu dhoomakethu mentioned this pull request May 12, 2017
@dhoomakethu dhoomakethu modified the milestones: 1.4.0, 1.3.0 Jun 27, 2017
@dhoomakethu
Copy link
Contributor

@moltob I am planning to have this PR merged for pymodbus 1.4.0, any special thing in particualr to be taken care with this PR ? ( I mean known issues etc ?)

@moltob
Copy link
Author

moltob commented Jun 27, 2017

Hey, nothing I know of. Various users have pulled this PR, so the asyncio functionality should be good. No defects came up so far.

@dhoomakethu
Copy link
Contributor

dhoomakethu commented Jun 27, 2017

@moltob Thanks for the confirmation. Could you change the target branch to riptide:dev from riptideio:python3 ?

@meeas
Copy link
Contributor

meeas commented Jun 27, 2017

Thank you @dhoomakethu for completing the merge! I'm excited to see it propagate to pip so I can go back to making my software dependent on your pip package instead of embedding @moltob 's version.

@dhoomakethu
Copy link
Contributor

@moltob , just a reminder if you haven't seen my earlier comment, could you please change the target branch for this PR from riptideio:python3 to riptideio:dev

@moltob
Copy link
Author

moltob commented Jun 28, 2017

Sorry, I indeed missed your branch request. I'll do it as soon as I'm in front of a keyboard.

@moltob moltob changed the base branch from python3 to dev June 28, 2017 06:41
@moltob
Copy link
Author

moltob commented Jun 28, 2017

Wow, switching the target branch looks messy! People using my PR explicitly will run into these issues now. I assume the new target branch was not created with the Python 3 fixes made by the original maintainers.

Here is what I'll do: Switch the target branch back to python3 to allow using the PR as stand-alone fix. Then, please let me know what your plan is with respect to Python 3 support. The dev branch was created from master and I did not find a merge of python3 into that line so far.

So either we merge my PR still to python3, and/or python3 must be merged to dev by the project maintainer first.

Please let me know how you want to go ahead.

@moltob moltob changed the base branch from dev to python3 June 28, 2017 07:03
@dhoomakethu
Copy link
Contributor

ha, I now see the problem, the master is made compatible with python3 with this PR, the pip installable from the master and dev branches are compatible with both python2 and python3 . I remember approving your PR a long while ago but may be missed it because of the target branch and merged other PR for porting in to python 3 (I believe #152 ). I will go ahead and merge your branch with python3 branch and see what could be done to get this in to master.

@dhoomakethu dhoomakethu merged commit b3366ff into pymodbus-dev:python3 Jun 28, 2017
@patrickfuller
Copy link
Contributor

Any update on getting this into master?

I'm currently using the branch (pip install git+https://github.com/riptideio/pymodbus.git@python3 for those interested) but branches are notorious for falling behind over time.

@dhoomakethu
Copy link
Contributor

@patrickfuller there is a PR already #187 , I am short of hands to review and make it compatible with python2 , I have no definite timeline but it will part of 1.4 for sure.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 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 this pull request may close these issues.

5 participants