Skip to content

Conversation

Ryanf55
Copy link
Contributor

@Ryanf55 Ryanf55 commented May 21, 2025

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.

Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
@Ryanf55 Ryanf55 force-pushed the py2-conditional-removal branch from 564a5c3 to 1e30b72 Compare May 21, 2025 04:39
Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

Has to pass CI.

How was this tested?

if prompt != self.prompt:
self.prompt = prompt
if platform.system() != 'Windows' or sys.version_info < (3, 0):
if platform.system() != 'Windows' or sys.version_info < (3, 0): #??
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Finish before merge

@Ryanf55
Copy link
Contributor Author

Ryanf55 commented May 23, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants