-
Notifications
You must be signed in to change notification settings - Fork 184
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
Python 3 support #336
Comments
Thanks for asking, @jpmens and Karl. I would like to extend that answer to "definitively yes" ;]. Support for Python3
|
Python 2.7 is EOL in about 6 weeks. Any news? |
Dear Dan, thanks for asking. While [1] has been left behind due to my failure to continue working on that appropriately (sorry @jpmens!), I am still willing to catch up on that and finally update the codebase to support Python 3. Comparing the branches [2] shows it should be doable without too much hassle as I believe most of the improvements landed in the plugin area. The test harness added through 257d0b8 will definitively help here. With kind regards, [1] https://github.com/jpmens/mqttwarn/tree/develop |
I've just quickly scanned the commits and identified these to be relevant to
Merging all the enhancements to the As I didn't follow the development thoroughly, I am humbly asking @jpmens to review this list and maybe acknowledge my findings. If I failed on that summary, I will be happy to learn otherwise. [2] develop...master |
@dlangille first of all thank you for the reminder and rest assured: mqttwarn will not simply just die on that day in January, and neither will Python2. Admittedly in terms of Python2 support .... @amotl I'm really glad to see you back! Welcome home! :-) Both of you: unbelievable, but I dreamed of mqttwarn and Python3 last night. I'll review @amotl's question later in the course of the afternoon (TZ=CET) as I'm giving an Ansible training which begins in 45m. |
@amotl I couldn't resist. Yes, you're right, and as far as I can tell we're good to go. As soon as you have something, please go ahead and commit it. You're the boss here today (and tomorrow, etc. :-) ! |
@jpmens Thank you. This all came to mind over the weekend as I was replacing Python 2.7 with Python 3.6 |
@dlangille due to my current interest in FreeBSD, mqttwarn will also be a first-class citizen on that platform. Together with your packaging expertise on that platform I expect no less than greatness. :-) |
I've just updated the "develop" branch by integrating the changes from "master". It turned out to be a total no-brainer. For the records, these are the conflicts I got:
Resolving them was easy based on the review above and quickly looking up that the Also, the work-in-progress test harness (#332) has been integrated and as expected, all tests pass successfully. Anyone who is interested can also run them by just typing |
On the journey of making Read (and discuss) all about it within #127. This is a huge leap forward. However, please note the codebase has not been touched to support Python 3 yet. |
Hi there, 40fa69a finally brings mqttwarn core way closer to Python3. Within #127 (comment), @dlangille offered to send a merge request for bringing all service plugins up to speed. This would be very welcome. Please make sure you are submitting it to the "develop" branch of this repository. Thanks already! With kind regards, |
Some service modules are still based on The list of relevant service plugins are:
In order to have the code base compatible with Python2/3, we might want to either introduce the |
Let's take this to mqttwarn modules which are not converted by their maintainers will likely fall wayside. |
instapush has been closed, so that one can be removed altogether |
@dgomes thank you and thank you for that contribution. :-) |
Hi there, the latest and greatest mqttwarn-0.13.2 has just been released [1]. It should be reasonably compatible with Python 3, but we will be happy to hear about anything which doesn't work properly yet -- either on Python 2 and Python 3! In order to mitigate eventual fallout coming from this process, we want to encourage everyone to install mqttwarn from PyPI, test it using their favorite plugins and report the outcome back to us. Thanks already! With kind regards, |
For verifying Python 3.8 support, we might want to check if things related to Jinja2 are still working in this environment, see also pallets/jinja#1119. |
I just added I would like to close this issue if I could at least get some encouraging words from @jpmens, @ckrey, @dlangille, @rgitzel, @Gulaschcowboy or maybe others who are using If you are able to catch some time, I will be happy to hear on which systems you are running |
@amotl I can pretty much not get anything working on macOS (Python 3.7.2), neither with A trivial “hello” to topic
which makes me think something general is happening with encoding. I’ll continue testing tomorrow. |
@amotl that fixed it, thanks |
I have tested a few mqttwarn services on macOS 10.15 (Catalina)with Python 3.7.2 and on OpenBSD 6.6-CURRENT with Python 3.7.6. I chose services I'm most familiar with, You've done a fabulous job, @amotl, and I am now closing this issue. |
Thanks for testing! |
@amotl Apologies first for not having kept up. But I was glad to see all the activity. :-) I just gave the latest code in It runs, but fails miserably. The log is full of errors like this:
So presumably I need to get my functions running in Python 3 as well? Has there been any migration documentation prepared? I'm wondering what else I'll need to change. |
@rgitzel that error message appears to indicate that your print(something) |
Upgrading my functions to Python 3 seems to have done the trick. So, I'm seeing three times the log entries:
Should the "Invoking..." messages be at |
Hi again, GH-676 revealed that not all service plugins are compatible with Python 3 yet. On this matter, I just discovered the Would you still be up for upstreaming corresponding improvements to the service plugins selectively, Christopher? With kind regards, Footnotes |
Phew, that is more than 4 years ago. I almost forgot that I did that. I certainly forgot what I did. I'm afraid I currently don't have much time for FLOSS development and the little time I have I'd like to spend on my own projects. So I am not able to incorporate these change sino the current state of the project, sorry. However, feel free to pick whatever you want from my branch, be it whole commits or just individual changes or bits of code. |
Karl rightly asks whether we intend to support Python 3. The only valid response to the question is "yes".
The text was updated successfully, but these errors were encountered: