__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import sys
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Any, TypeVar
T = TypeVar("T")
PY37 = sys.version_info[0] == 3 and sys.version_info[1] >= 7
PY38 = sys.version_info[0] == 3 and sys.version_info[1] >= 8
PY310 = sys.version_info[0] == 3 and sys.version_info[1] >= 10
PY311 = sys.version_info[0] == 3 and sys.version_info[1] >= 11
def with_metaclass(meta: "Any", *bases: "Any") -> "Any":
class MetaClass(type):
def __new__(metacls: "Any", name: "Any", this_bases: "Any", d: "Any") -> "Any":
return meta(name, bases, d)
return type.__new__(MetaClass, "temporary_class", (), {})
def check_uwsgi_thread_support() -> bool:
# We check two things here:
#
# 1. uWSGI doesn't run in threaded mode by default -- issue a warning if
# that's the case.
#
# 2. Additionally, if uWSGI is running in preforking mode (default), it needs
# the --py-call-uwsgi-fork-hooks option for the SDK to work properly. This
# is because any background threads spawned before the main process is
# forked are NOT CLEANED UP IN THE CHILDREN BY DEFAULT even if
# --enable-threads is on. One has to explicitly provide
# --py-call-uwsgi-fork-hooks to force uWSGI to run regular cpython
# after-fork hooks that take care of cleaning up stale thread data.
try:
from uwsgi import opt # type: ignore
except ImportError:
return True
from sentry_sdk.consts import FALSE_VALUES
def enabled(option: str) -> bool:
value = opt.get(option, False)
if isinstance(value, bool):
return value
if isinstance(value, bytes):
try:
value = value.decode()
except Exception:
pass
return value and str(value).lower() not in FALSE_VALUES # type: ignore[return-value]
# When `threads` is passed in as a uwsgi option,
# `enable-threads` is implied on.
threads_enabled = "threads" in opt or enabled("enable-threads")
fork_hooks_on = enabled("py-call-uwsgi-fork-hooks")
lazy_mode = enabled("lazy-apps") or enabled("lazy")
if lazy_mode and not threads_enabled:
from warnings import warn
warn(
Warning(
"IMPORTANT: "
"We detected the use of uWSGI without thread support. "
"This might lead to unexpected issues. "
'Please run uWSGI with "--enable-threads" for full support.'
)
)
return False
elif not lazy_mode and (not threads_enabled or not fork_hooks_on):
from warnings import warn
warn(
Warning(
"IMPORTANT: "
"We detected the use of uWSGI in preforking mode without "
"thread support. This might lead to crashing workers. "
'Please run uWSGI with both "--enable-threads" and '
'"--py-call-uwsgi-fork-hooks" for full support.'
)
)
return False
return True
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| ai | Folder | 0755 |
|
|
| crons | Folder | 0755 |
|
|
| integrations | Folder | 0755 |
|
|
| profiler | Folder | 0755 |
|
|
| __init__.py | File | 1.46 KB | 0644 |
|
| _batcher.py | File | 5.7 KB | 0644 |
|
| _compat.py | File | 3 KB | 0644 |
|
| _init_implementation.py | File | 2.43 KB | 0644 |
|
| _log_batcher.py | File | 1.88 KB | 0644 |
|
| _lru_cache.py | File | 1.14 KB | 0644 |
|
| _metrics_batcher.py | File | 1.21 KB | 0644 |
|
| _queue.py | File | 10.98 KB | 0644 |
|
| _span_batcher.py | File | 8.12 KB | 0644 |
|
| _types.py | File | 13.16 KB | 0644 |
|
| _werkzeug.py | File | 3.85 KB | 0644 |
|
| api.py | File | 15.59 KB | 0644 |
|
| attachments.py | File | 2.95 KB | 0644 |
|
| client.py | File | 49.95 KB | 0644 |
|
| consts.py | File | 61.95 KB | 0644 |
|
| debug.py | File | 959 B | 0644 |
|
| envelope.py | File | 9.37 KB | 0644 |
|
| feature_flags.py | File | 2.5 KB | 0644 |
|
| hub.py | File | 24.54 KB | 0644 |
|
| logger.py | File | 2.6 KB | 0644 |
|
| metrics.py | File | 1.42 KB | 0644 |
|
| monitor.py | File | 4.47 KB | 0644 |
|
| py.typed | File | 0 B | 0644 |
|
| scope.py | File | 74.09 KB | 0644 |
|
| scrubber.py | File | 5.99 KB | 0644 |
|
| serializer.py | File | 12.82 KB | 0644 |
|
| session.py | File | 5.08 KB | 0644 |
|
| sessions.py | File | 8.59 KB | 0644 |
|
| spotlight.py | File | 11.85 KB | 0644 |
|
| traces.py | File | 25.08 KB | 0644 |
|
| tracing.py | File | 50.33 KB | 0644 |
|
| tracing_utils.py | File | 54.36 KB | 0644 |
|
| transport.py | File | 44.41 KB | 0644 |
|
| types.py | File | 1.24 KB | 0644 |
|
| utils.py | File | 65.96 KB | 0644 |
|
| worker.py | File | 10.91 KB | 0644 |
|