Droopy icon indicating copy to clipboard operation
Droopy copied to clipboard

/usr/bin/droopy:78: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13

Open zoof opened this issue 2 years ago • 1 comments

The cgi module has been deprecated and will be removed as of Python 3.13. Debian Bookworm currently runs Python 3.11 but I imagine that unless fixed, droopy will not work with Debian Trixie. Unfortunately, the fix does not look trivial: https://peps.python.org/pep-0594/#cgi

zoof avatar Jul 28 '23 12:07 zoof

As a debian unstable user, and user of droopy since the days of python2, I brought this to the debian forums and someone suggested installing python3-legacy-cgi as a workaround. I tried it and I can verify that it works!

$ python3 --version
Python 3.13.2

$ droopy 
/usr/bin/droopy:1075: SyntaxWarning: invalid escape sequence '\.'
  print('''\
     _____
    |     \.----.-----.-----.-----.--.--.
    |  --  |   _|  _  |  _  |  _  |  |  |
    |_____/|__| |_____|_____|   __|___  |
                            |__|  |_____|
    
Configuration found in /home/user/.droopy
Files will be uploaded to /home/user

HTTP server starting... Check it out at http://localhost:8080

Please ignore the syntax warning on the top, it is a side effect since python 3.12.

The github repo for python3-legacy-cgi is here, but a package is available for debian testing/unstable in the main repo. https://github.com/jackrosenthal/legacy-cgi

pitsi avatar Feb 23 '25 05:02 pitsi