From de3393d62b3bef3c83a1f368ab12bc77b0114a87 Mon Sep 17 00:00:00 2001 From: Tom Niget Date: Fri, 10 May 2024 07:18:08 +0200 Subject: [PATCH] Remove Python 2 handling code (#2098) * Remove Python 2 update modal * Remove Python 2 handling code * Remove backports dependencies * Remove uses of future and __future__ * Fix import * Remove requirements * Update lib folder * Clean up imports and blank lines --------- Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> --- Tautulli.py | 1 - data/interfaces/default/index.html | 34 - .../default/newsletter_preview.html | 2 +- lib/backports/__init__.py | 2 +- lib/backports/csv.py | 979 ------ lib/backports/functools_lru_cache.py | 243 -- lib/backports/tarfile/__init__.py | 2902 +++++++++++++++++ lib/backports/tarfile/__main__.py | 5 + .../tarfile}/compat/__init__.py | 0 lib/backports/tarfile/compat/py38.py | 24 + lib/future/__init__.py | 19 +- lib/future/backports/datetime.py | 2 +- .../backports/email/_header_value_parser.py | 2 +- lib/future/backports/email/parser.py | 4 +- lib/future/backports/http/cookiejar.py | 2 +- lib/future/backports/test/support.py | 32 - lib/future/backports/xmlrpc/client.py | 9 +- lib/future/builtins/__init__.py | 2 +- lib/future/moves/_dummy_thread.py | 11 +- lib/future/moves/multiprocessing.py | 7 + lib/future/moves/test/support.py | 9 + lib/future/standard_library/__init__.py | 14 +- lib/future/types/newint.py | 8 +- lib/future/types/newrange.py | 2 +- lib/inflect/__init__.py | 313 +- lib/inflect/compat/pydantic.py | 19 - lib/inflect/compat/pydantic1.py | 8 - lib/jaraco/classes/ancestry.py | 68 - lib/jaraco/classes/meta.py | 66 - lib/jaraco/classes/properties.py | 170 - lib/jaraco/collections/__init__.py | 56 +- lib/jaraco/context.py | 137 +- lib/jaraco/functools/__init__.pyi | 3 - lib/libfuturize/fixer_util.py | 12 +- lib/libfuturize/fixes/fix_metaclass.py | 4 +- lib/libpasteurize/fixes/fix_imports.py | 1 + lib/libpasteurize/fixes/fix_unpacking.py | 8 +- lib/past/__init__.py | 4 +- lib/past/builtins/misc.py | 9 +- lib/past/translation/__init__.py | 258 +- lib/typeguard/__init__.py | 48 + lib/typeguard/_checkers.py | 910 ++++++ lib/typeguard/_config.py | 108 + lib/typeguard/_decorators.py | 235 ++ lib/typeguard/_exceptions.py | 42 + lib/typeguard/_functions.py | 308 ++ lib/typeguard/_importhook.py | 213 ++ lib/typeguard/_memo.py | 48 + lib/typeguard/_pytest_plugin.py | 126 + lib/typeguard/_suppression.py | 86 + lib/typeguard/_transformer.py | 1229 +++++++ lib/typeguard/_union_transformer.py | 55 + lib/typeguard/_utils.py | 163 + lib/typeguard/py.typed | 0 lib/typing_extensions.py | 203 +- plexpy/__init__.py | 82 +- plexpy/activity_handler.py | 27 +- plexpy/activity_pinger.py | 34 +- plexpy/activity_processor.py | 24 +- plexpy/api2.py | 46 +- plexpy/classes.py | 75 - plexpy/common.py | 8 +- plexpy/config.py | 12 +- plexpy/database.py | 12 +- plexpy/datafactory.py | 34 +- plexpy/datatables.py | 14 +- plexpy/exceptions.py | 2 - plexpy/exporter.py | 25 +- plexpy/graphs.py | 27 +- plexpy/helpers.py | 34 +- plexpy/http_handler.py | 14 +- plexpy/libraries.py | 38 +- plexpy/lock.py | 10 +- plexpy/log_reader.py | 9 +- plexpy/logger.py | 12 +- plexpy/macos.py | 11 +- plexpy/mobile_app.py | 15 +- plexpy/newsletter_handler.py | 16 +- plexpy/newsletters.py | 38 +- plexpy/notification_handler.py | 61 +- plexpy/notifiers.py | 53 +- plexpy/plex.py | 9 - plexpy/plexivity_import.py | 24 +- plexpy/plextv.py | 33 +- plexpy/plexwatch_import.py | 21 +- plexpy/pmsconnect.py | 36 +- plexpy/request.py | 15 +- plexpy/session.py | 11 +- plexpy/users.py | 33 +- plexpy/version.py | 2 - plexpy/versioncheck.py | 26 +- plexpy/web_socket.py | 20 +- plexpy/webauth.py | 21 +- plexpy/webserve.py | 119 +- plexpy/webstart.py | 14 +- plexpy/windows.py | 12 +- requirements.txt | 6 +- 97 files changed, 7443 insertions(+), 2917 deletions(-) delete mode 100644 lib/backports/csv.py delete mode 100644 lib/backports/functools_lru_cache.py create mode 100644 lib/backports/tarfile/__init__.py create mode 100644 lib/backports/tarfile/__main__.py rename lib/{inflect => backports/tarfile}/compat/__init__.py (100%) create mode 100644 lib/backports/tarfile/compat/py38.py create mode 100644 lib/future/moves/multiprocessing.py delete mode 100644 lib/inflect/compat/pydantic.py delete mode 100644 lib/inflect/compat/pydantic1.py delete mode 100644 lib/jaraco/classes/ancestry.py delete mode 100644 lib/jaraco/classes/meta.py delete mode 100644 lib/jaraco/classes/properties.py create mode 100644 lib/typeguard/__init__.py create mode 100644 lib/typeguard/_checkers.py create mode 100644 lib/typeguard/_config.py create mode 100644 lib/typeguard/_decorators.py create mode 100644 lib/typeguard/_exceptions.py create mode 100644 lib/typeguard/_functions.py create mode 100644 lib/typeguard/_importhook.py create mode 100644 lib/typeguard/_memo.py create mode 100644 lib/typeguard/_pytest_plugin.py create mode 100644 lib/typeguard/_suppression.py create mode 100644 lib/typeguard/_transformer.py create mode 100644 lib/typeguard/_union_transformer.py create mode 100644 lib/typeguard/_utils.py create mode 100644 lib/typeguard/py.typed delete mode 100644 plexpy/classes.py diff --git a/Tautulli.py b/Tautulli.py index 04a6778e..8616df81 100755 --- a/Tautulli.py +++ b/Tautulli.py @@ -23,7 +23,6 @@ import sys # Ensure lib added to path, before any other imports sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')) -from future.builtins import str import argparse import datetime diff --git a/data/interfaces/default/index.html b/data/interfaces/default/index.html index 4a74b2e4..6e4818c7 100644 --- a/data/interfaces/default/index.html +++ b/data/interfaces/default/index.html @@ -212,28 +212,6 @@ -<% from plexpy.helpers import anon_url %> - % endif