You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/han/.virtualenv/flexget/lib/python3.12/site-packages/flexget/plugins/cli/inject.py:2: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13
import cgi
So I started digging around in the docs and came up with the following patch:
% diff -u /home/han/.virtualenv/flexget/lib/python3.12/site-packages/flexget/plugins/cli/inject.py.orig /home/han/.virtualenv/flexget/lib/python3.12/site-packages/flexget/plugins/cli/inject.py
--- /home/han/.virtualenv/flexget/lib/python3.12/site-packages/flexget/plugins/cli/inject.py.orig 2024-02-14 18:56:24.723822371 +0100+++ /home/han/.virtualenv/flexget/lib/python3.12/site-packages/flexget/plugins/cli/inject.py 2024-02-14 18:59:18.184871193 +0100@@ -1,5 +1,5 @@
import argparse
-import cgi+from email.header import Header
import random
import string
@@ -23,7 +23,7 @@
if options.url and not options.title:
# Attempt to get a title from the URL response's headers
try:
- value, params = cgi.parse_header(+ value, params = Header(
requests.head(options.url).headers['Content-Disposition']
)
options.title = params['filename']
I have no idea if this really fixes the issue, or just the symptom, so please double triple check before applying this patch.
The text was updated successfully, but these errors were encountered:
I kept noticing this deprecation warning:
So I started digging around in the docs and came up with the following patch:
I have no idea if this really fixes the issue, or just the symptom, so please double triple check before applying this patch.
The text was updated successfully, but these errors were encountered: