MAVProxy icon indicating copy to clipboard operation
MAVProxy copied to clipboard

Treewide: Remove python2 conditional logic/imports

Open Ryanf55 opened this issue 7 months ago • 1 comments

Remove conditional imports and conditional logic searching for sys.version_info that only apply to python2.

Used ChatGTP with a grepped import list to find legacy python2 module logic too.

Ryanf55 avatar May 21 '25 04:05 Ryanf55

Here's a test plan based on the changes, I'll check off things as I go. I might request help on some of the modules like ntrip that I don't know how to use.

  • [ ] Run mavproxy, import a module that doesn't exist with moddebug=3, see get_exception_stacktrace works.
  • [ ] Check wx/wxagg backends warning show up for MacOS
  • [ ] Check grapher can be instantiated
  • [ ] Check mission_item_protocol can import
  • [ ] Check mp_util can import
  • [ ] Check null_term works
  • [ ] Test ntrip` can be initialized and getMountPointString works
  • [ ] Check params can download of param_ftp
  • [ ] Test windows rline.py
  • [ ] Test srtm terrain can be read
  • [ ] Test wavefront import
  • [ ] Check wxsettings loads the dialog
  • [ ] Check dataflash logs are written and parseable
  • [ ] Ensure mavproxy_devop works
  • [ ] Check mavproxy_ftp can import and handle_list_reply is covered
  • [ ] Check mavproxy_link imports
  • [ ] Check mp_tile can import and be instantiated
  • [ ] Check mavproxy_misc can be imported and cmd_playtune works
  • [ ] Check mavproxy_oldwp can still import
  • [ ] Check OSD param_set works
  • [ ] Check mavproxy_param can import
  • [ ] CHeck signing passphrase_to_key works and cmd_signing_setup works
  • [ ] Check mavproxy_swarm paramString works
  • [ ] Check mavproxy_useralerts can import
  • [ ] Check MAVExplorer can print exceptions correctly
  • [ ] Check setup.py build on windows

Ryanf55 avatar May 23 '25 17:05 Ryanf55