pymavlink
pymavlink copied to clipboard
Please straighten out your supported Python versions and dependencies
I just came back to this after several years and there seems to be zero progress in terms of cleaning up Python version support or packaging. Meaning setup.py still requires future pkg even though several other places claim only py36 or later (and several variants thereof). This is getting ridiculous trying to maintain a package that won't let go of out-dated dependencies. The world moves on and even bionic has been declared lifeless. Please lurch forward into at least the early 21st century...
I just came back to this after several years and there seems to be zero progress in terms of cleaning up Python version support or packaging. Meaning
setup.pystill requires future pkg even though several other places claim only py36 or later
We're not going out of our way to support Python2 any more - if it breaks it breaks.
But we are also not going out of our way to kill it right now in pymavlink. That day may come - and it will be a good day!
(and several variants thereof). This is getting ridiculous trying to maintain a package that won't let go of out-dated
I think we may be unaware of problems that our laggardly behaviour may be causing other people here.
Are you attempting to create system packages or the like?
dependencies. The world moves on and even bionic has been declared lifeless
.... python3 is a possibility on Bionic.
Please lurch forward into at least the early 21st century...
Wait, who doesn't like steam trains?
Am I missing something? I don't see any reference to future in the *.py files in the project. I just built the package with python13 and without installing future. I haven't done extensive testing (so maybe something is broken), but I was able to run the sender/receiver examples from mavlink-routerd
Is future only required for python2?
Derp, I can be kinda dumb sometimes. I had the mavlink project checked out (with pymavlink as a submodule) and I was doing git grep from within mavlink instead of in mavlink/pymavlink :-/
Attached is a patch that I think should maintain python2 compatibility without requiring the future module in python 3.11+. I understand sorted(mydict.items()) is a bit slower on python2.7 than using iteritems() from future, but it should still return the same result.
Partially closed by https://github.com/ArduPilot/pymavlink/pull/1003 which officially says we're no longer doing Python2 and happy to actively remove support code.
Derp, I can be kinda dumb sometimes. I had the mavlink project checked out (with pymavlink as a submodule) and I was doing
git grepfrom withinmavlinkinstead of inmavlink/pymavlink:-/Attached is a patch that I think should maintain python2 compatibility without requiring the future module in python 3.11+. I understand
sorted(mydict.items())is a bit slower on python2.7 than usingiteritems()from future, but it should still return the same result.
Could you create a PR with your fixes in it, please? Happy to walk you through that if you need it - generally knowing a github workflow is a useful life skill :-)
Sure, though I would probably do things a bit differently if if's OK to actively remove support. PR #1000 already gets one of the files.
Sure, though I would probably do things a bit differently if if's OK to actively remove support. PR #1000 already gets one of the files.
I've merged https://github.com/ArduPilot/pymavlink/pull/1025 which actively removed Python2 support :-)
@peterbarker maybe we can close this one then?
@peterbarker maybe we can close this one then?
Need to investigate import of future module first, I think.