Compare commits

...

1 Commits

Author SHA1 Message Date
dgtlmoon
2fbc23c1fd packing our own strtobool 2024-04-03 15:39:08 +02:00
11 changed files with 33 additions and 10 deletions

View File

@@ -4,7 +4,7 @@
__version__ = '0.45.17' __version__ = '0.45.17'
from distutils.util import strtobool from changedetectionio.strtobool import strtobool
from json.decoder import JSONDecodeError from json.decoder import JSONDecodeError
import os import os
#os.environ['EVENTLET_NO_GREENDNS'] = 'yes' #os.environ['EVENTLET_NO_GREENDNS'] = 'yes'

View File

@@ -1,5 +1,5 @@
import os import os
from distutils.util import strtobool from changedetectionio.strtobool import strtobool
from flask_expects_json import expects_json from flask_expects_json import expects_json
from changedetectionio import queuedWatchMetaData from changedetectionio import queuedWatchMetaData

View File

@@ -12,7 +12,7 @@
# #
# #
from distutils.util import strtobool from changedetectionio.strtobool import strtobool
from flask import Blueprint, request, make_response from flask import Blueprint, request, make_response
import os import os

View File

@@ -1,5 +1,5 @@
from distutils.util import strtobool from changedetectionio.strtobool import strtobool
from flask import Blueprint, flash, redirect, url_for from flask import Blueprint, flash, redirect, url_for
from flask_login import login_required from flask_login import login_required
from changedetectionio.store import ChangeDetectionStore from changedetectionio.store import ChangeDetectionStore

View File

@@ -1,5 +1,5 @@
import sys import sys
from distutils.util import strtobool from changedetectionio.strtobool import strtobool
from loguru import logger from loguru import logger
from changedetectionio.content_fetchers.exceptions import BrowserStepsStepException from changedetectionio.content_fetchers.exceptions import BrowserStepsStepException
import os import os

View File

@@ -6,7 +6,7 @@ import queue
import threading import threading
import time import time
from copy import deepcopy from copy import deepcopy
from distutils.util import strtobool from changedetectionio.strtobool import strtobool
from functools import wraps from functools import wraps
from threading import Event from threading import Event

View File

@@ -1,6 +1,6 @@
import os import os
import re import re
from distutils.util import strtobool from changedetectionio.strtobool import strtobool
from wtforms import ( from wtforms import (
BooleanField, BooleanField,

View File

@@ -1,4 +1,4 @@
from distutils.util import strtobool from changedetectionio.strtobool import strtobool
import os import os
import re import re
import time import time

View File

@@ -3,7 +3,7 @@ import os
import hashlib import hashlib
import re import re
from copy import deepcopy from copy import deepcopy
from distutils.util import strtobool from changedetectionio.strtobool import strtobool
from loguru import logger from loguru import logger
class difference_detection_processor(): class difference_detection_processor():

View File

@@ -1,4 +1,4 @@
from distutils.util import strtobool from changedetectionio.strtobool import strtobool
from flask import ( from flask import (
flash flash

View File

@@ -0,0 +1,23 @@
# Because strtobool was removed in python 3.12 distutils
_MAP = {
'y': True,
'yes': True,
't': True,
'true': True,
'on': True,
'1': True,
'n': False,
'no': False,
'f': False,
'false': False,
'off': False,
'0': False
}
def strtobool(value):
try:
return _MAP[str(value).lower()]
except KeyError:
raise ValueError('"{}" is not a valid bool value'.format(value))