Remove coloredlogs and now unused log constants

This commit is contained in:
rlaphoenix 2023-02-25 11:46:03 +00:00
parent 77c16f557c
commit 8d626822cb
4 changed files with 2 additions and 54 deletions

View File

@ -4,15 +4,14 @@ from datetime import datetime
from pathlib import Path
import click
import coloredlogs
import urllib3
from urllib3.exceptions import InsecureRequestWarning
from devine.core import __version__
from devine.core.commands import Commands
from devine.core.config import config
from devine.core.constants import LOG_FORMAT, LOG_FORMATTER, context_settings
from devine.core.console import console
from devine.core.constants import context_settings
from devine.core.utilities import rotate_log_file
LOGGING_PATH = None
@ -27,7 +26,6 @@ def main(version: bool, debug: bool, log_path: Path) -> None:
"""Devine—Open-Source Movie, TV, and Music Downloading Solution."""
logging.basicConfig(level=logging.DEBUG if debug else logging.INFO)
log = logging.getLogger()
coloredlogs.install(level=log.level, fmt=LOG_FORMAT, style="{")
if log_path:
global LOGGING_PATH

View File

@ -1,9 +1,5 @@
import logging
from typing import TypeVar, Union
LOG_FORMAT = "{asctime} [{levelname[0]}] {name} : {message}" # must be '{}' style
LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
LOG_FORMATTER = logging.Formatter(LOG_FORMAT, LOG_DATE_FORMAT, "{")
DRM_SORT_MAP = ["ClearKey", "Widevine"]
LANGUAGE_MUX_MAP = {
# List of language tags that cannot be used by mkvmerge and need replacements.

47
poetry.lock generated
View File

@ -344,24 +344,6 @@ files = [
{file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
]
[[package]]
name = "coloredlogs"
version = "15.0.1"
description = "Colored terminal output for Python's logging module"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
files = [
{file = "coloredlogs-15.0.1-py2.py3-none-any.whl", hash = "sha256:612ee75c546f53e92e70049c9dbfcc18c935a2b9a53b66085ce9ef6a6e5c0934"},
{file = "coloredlogs-15.0.1.tar.gz", hash = "sha256:7c991aa71a4577af2f82600d8f8f3a89f936baeaf9b50a9c197da014e5bf16b0"},
]
[package.dependencies]
humanfriendly = ">=9.1"
[package.extras]
cron = ["capturer (>=2.4)"]
[[package]]
name = "construct"
version = "2.8.8"
@ -513,21 +495,6 @@ files = [
{file = "frozenlist-1.3.3.tar.gz", hash = "sha256:58bcc55721e8a90b88332d6cd441261ebb22342e238296bb330968952fbb3a6a"},
]
[[package]]
name = "humanfriendly"
version = "10.0"
description = "Human friendly output for text interfaces using Python"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
files = [
{file = "humanfriendly-10.0-py2.py3-none-any.whl", hash = "sha256:1697e1a8a8f550fd43c2865cd84542fc175a61dcb779b6fee18cf6b6ccba1477"},
{file = "humanfriendly-10.0.tar.gz", hash = "sha256:6b0b831ce8f15f7300721aa49829fc4e83921a9a301cc7f606be6686a2288ddc"},
]
[package.dependencies]
pyreadline3 = {version = "*", markers = "sys_platform == \"win32\" and python_version >= \"3.8\""}
[[package]]
name = "identify"
version = "2.5.17"
@ -1298,18 +1265,6 @@ files = [
ed25519 = ["PyNaCl (>=1.4.0)"]
rsa = ["cryptography"]
[[package]]
name = "pyreadline3"
version = "3.4.1"
description = "A python implementation of GNU readline."
category = "main"
optional = false
python-versions = "*"
files = [
{file = "pyreadline3-3.4.1-py3-none-any.whl", hash = "sha256:b0efb6516fd4fb07b45949053826a62fa4cb353db5be2bbb4a7aa1fdd1e345fb"},
{file = "pyreadline3-3.4.1.tar.gz", hash = "sha256:6f3d1f7b8a31ba32b73917cefc1f28cc660562f39aea8646d30bd6eff21f7bae"},
]
[[package]]
name = "pysocks"
version = "1.7.1"
@ -1794,4 +1749,4 @@ multidict = ">=4.0"
[metadata]
lock-version = "2.0"
python-versions = ">=3.9.0,<3.12"
content-hash = "f05f1fea944de6ea58af155b4b4fbeb271c2152e2118a59bf14e5b20059c29ad"
content-hash = "1d8f1bde762ed7674faeb003d2c812ccb370231fab4cecc3122c66a0d013d72c"

View File

@ -28,7 +28,6 @@ appdirs = "^1.4.4"
Brotli = "^1.0.9"
click = "^8.1.3"
colorama = "^0.4.6"
coloredlogs = "^15.0.1"
construct = "^2.8.8"
crccheck = "^1.3.0"
jsonpickle = "^3.0.1"