VirtualBox

Changeset 102957 in vbox for trunk/src/VBox/Main/glue


Ignore:
Timestamp:
Jan 18, 2024 5:31:53 PM (11 months ago)
Author:
vboxsync
Message:

Main/Python bindings: Moved the Python deprecation warning from VBoxShell into the actual Python bindings module where it belongs. This way all Python API clients get notified (as long as they show stdout somehow).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/glue/vboxapi.py

    r98103 r102957  
    991991
    992992    def __init__(self, sStyle=None, dPlatformParams=None):
     993
     994        # Deprecation warning for older Python stuff (< Python 3.x).
     995        if sys.version_info.major < 3:
     996            print("\nWarning: Running VirtualBox with Python %d.%d is marked as being deprecated.\n" \
     997                  "Please upgrade your Python installation to avoid breakage.\n" \
     998                  % (sys.version_info.major, sys.version_info.minor))
     999
    9931000        if sStyle is None:
    9941001            if sys.platform == 'win32':
     
    12921299            sRet = self.xcptToString(oXcpt)
    12931300        return sRet
    1294 
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette