Update stubs

This commit is contained in:
Trinh Anh Ngoc
2022-11-19 23:05:09 +07:00
parent 5b7e1e1e24
commit bdede74058
14 changed files with 279 additions and 219 deletions

View File

@@ -1,16 +1,33 @@
from . import addons as addons, api as api, cli as cli, conf as conf, fields as fields, http as http, loglevels as loglevels, models as models, netsvc as netsvc, osv as osv, release as release, service as service, sql_db as sql_db, tools as tools, upgrade as upgrade from psycopg2 import connection
from .tools.translate import _ as _, _lt as _lt
from typing import Any, Optional from . import (
addons as addons,
api as api,
cli as cli,
conf as conf,
fields as fields,
http as http,
loglevels as loglevels,
models as models,
netsvc as netsvc,
osv as osv,
release as release,
service as service,
sql_db as sql_db,
tools as tools,
upgrade as upgrade
)
from .api import Registry
from .tools.translate import _ as _, _lt as _lt
__path__: Any
evented: bool evented: bool
def gevent_wait_callback(conn: Any, timeout: Optional[Any] = ...) -> None: ... def gevent_wait_callback(conn: connection, timeout: float | None = ...) -> None: ...
multi_process: bool multi_process: bool
def _decompress(data: Any): ... def _decompress(data: bytes) -> bytes: ...
SUPERUSER_ID: int SUPERUSER_ID: int
def registry(database_name: Optional[Any] = ...): ... def registry(database_name: str | None = ...) -> Registry: ...

View File

@@ -1,4 +1,2 @@
from typing import Any addons_paths: list[str]
server_wide_modules: list[str]
addons_paths: Any
server_wide_modules: Any

View File

@@ -1,4 +1,4 @@
from typing import Any from typing import Generator
LOG_NOTSET: str LOG_NOTSET: str
LOG_DEBUG: str LOG_DEBUG: str
@@ -7,9 +7,9 @@ LOG_WARNING: str
LOG_ERROR: str LOG_ERROR: str
LOG_CRITICAL: str LOG_CRITICAL: str
def get_encodings(hint_encoding: str = ...) -> None: ... def get_encodings(hint_encoding: str = ...) -> Generator[str, None, None]: ...
text_type: Any text_type: type[str]
def ustr(value: Any, hint_encoding: str = ..., errors: str = ...): ... def ustr(value, hint_encoding: str = ..., errors: str = ...) -> str: ...
def exception_to_unicode(e: Any): ... def exception_to_unicode(e: BaseException) -> str: ...

View File

@@ -1,3 +1,24 @@
from . import db as db, graph as graph, loading as loading, migration as migration, module as module, registry as registry from . import (
from odoo.modules.loading import load_modules as load_modules, reset_modules_state as reset_modules_state db as db,
from odoo.modules.module import adapt_version as adapt_version, get_module_path as get_module_path, get_module_resource as get_module_resource, get_modules as get_modules, get_modules_with_version as get_modules_with_version, get_resource_from_path as get_resource_from_path, get_resource_path as get_resource_path, initialize_sys_path as initialize_sys_path, load_information_from_description_file as load_information_from_description_file, load_openerp_module as load_openerp_module graph as graph,
loading as loading,
migration as migration,
module as module,
registry as registry
)
from .loading import (
load_modules as load_modules,
reset_modules_state as reset_modules_state
)
from .module import (
adapt_version as adapt_version,
get_module_path as get_module_path,
get_module_resource as get_module_resource,
get_modules as get_modules,
get_modules_with_version as get_modules_with_version,
get_resource_from_path as get_resource_from_path,
get_resource_path as get_resource_path,
initialize_sys_path as initialize_sys_path,
load_information_from_description_file as load_information_from_description_file,
load_openerp_module as load_openerp_module
)

View File

@@ -1,8 +1,6 @@
from typing import Any from ..sql_db import Cursor
_logger: Any def is_initialized(cr: Cursor) -> bool: ...
def initialize(cr: Cursor) -> None: ...
def is_initialized(cr: Any): ... def create_categories(cr: Cursor, categories: list[str]) -> int | None: ...
def initialize(cr: Any) -> None: ... def has_unaccent(cr: Cursor) -> bool: ...
def create_categories(cr: Any, categories: Any): ...
def has_unaccent(cr: Any): ...

View File

@@ -1,30 +1,34 @@
from typing import Any, Optional from typing import Any, Iterable, Iterator
_logger: Any from ..sql_db import Cursor
class Graph(dict): class Graph(dict[str, Node]):
def add_node(self, name: Any, info: Any): ... def add_node(self, name: str, info: dict[str, Any]) -> Node: ...
def update_from_db(self, cr: Any) -> None: ... def update_from_db(self, cr: Cursor) -> None: ...
def add_module(self, cr: Any, module: Any, force: Optional[Any] = ...) -> None: ... def add_module(self, cr: Cursor, module: str, force: list | None = ...) -> None: ...
def add_modules(self, cr: Any, module_list: Any, force: Optional[Any] = ...): ... def add_modules(self, cr: Cursor, module_list: list[str], force: list | None = ...): ...
def __iter__(self) -> Any: ... def __iter__(self) -> Iterator[Node]: ...
def __str__(self): ... def __str__(self) -> str: ...
class Node: class Node:
def __new__(cls, name: Any, graph: Any, info: Any): ... def __new__(cls, name: str, graph: Graph, info: dict[str, Any]) -> Node: ...
name: Any = ... id: int
graph: Any = ... name: str
info: Any = ... graph: Graph
children: Any = ... info: dict[str, Any]
depth: int = ... children: list[Node]
def __init__(self, name: Any, graph: Any, info: Any) -> None: ... depth: int
dbdemo: bool
state: str
installed_version: str
def __init__(self, name: str, graph: Graph, info: dict[str, Any] | None) -> None: ...
@property @property
def data(self): ... def data(self) -> dict[str, Any]: ...
def add_child(self, name: Any, info: Any): ... def add_child(self, name: str, info: dict[str, Any]): ...
def __setattr__(self, name: Any, value: Any) -> None: ... def __setattr__(self, name: str, value) -> None: ...
def __iter__(self) -> Any: ... def __iter__(self) -> Iterator[Node]: ...
def __str__(self): ... def __str__(self) -> str: ...
def _pprint(self, depth: int = ...): ... def _pprint(self, depth: int = ...) -> str: ...
def should_have_demo(self): ... def should_have_demo(self) -> bool: ...
@property @property
def parents(self): ... def parents(self) -> Iterable[Node]: ...

View File

@@ -1,13 +1,14 @@
from typing import Any from types import ModuleType
_logger: Any from .graph import Graph, Node
from ..sql_db import Cursor
def load_script(path: Any, module_name: Any): ... def load_script(path: str, module_name: str) -> ModuleType: ...
class MigrationManager: class MigrationManager:
cr: Any = ... cr: Cursor
graph: Any = ... graph: Graph
migrations: Any = ... migrations: dict
def __init__(self, cr: Any, graph: Any) -> None: ... def __init__(self, cr: Cursor, graph: Graph) -> None: ...
def _get_files(self): ... def _get_files(self) -> None: ...
def migrate_module(self, pkg: Any, stage: Any): ... def migrate_module(self, pkg: Node, stage: str) -> None: ...

View File

@@ -1,16 +1,14 @@
from typing import Any RELEASE_LEVELS: list[str]
ALPHA: str
RELEASE_LEVELS: Any BETA: str
ALPHA: Any RELEASE_CANDIDATE: str
BETA: Any FINAL: str
RELEASE_CANDIDATE: Any RELEASE_LEVELS_DISPLAY: dict[str, str]
FINAL: Any version_info: tuple
RELEASE_LEVELS_DISPLAY: Any version: str
version_info: Any series: str
version: Any serie: str
series: Any major_version: str
serie: Any
major_version: Any
product_name: str product_name: str
description: str description: str
long_desc: str long_desc: str
@@ -19,4 +17,4 @@ url: str
author: str author: str
author_email: str author_email: str
license: str license: str
nt_service_name: Any nt_service_name: str

View File

@@ -1,11 +1,11 @@
from typing import Any, Optional from logging import Logger
from typing import Any, Literal
_logger: Any RPC_VERSION_1: dict[str, Any]
RPC_VERSION_1: Any
def exp_login(db: Any, login: Any, password: Any): ... def exp_login(db: str, login: str, password: str) -> int: ...
def exp_authenticate(db: Any, login: Any, password: Any, user_agent_env: Any): ... def exp_authenticate(db: str, login: str, password: str, user_agent_env: dict | None) -> int: ...
def exp_version(): ... def exp_version() -> dict[str, Any]: ...
def exp_about(extended: bool = ...): ... def exp_about(extended: bool = ...) -> str | tuple[str, str]: ...
def exp_set_loglevel(loglevel: Any, logger: Optional[Any] = ...): ... def exp_set_loglevel(loglevel, logger: Logger | None = ...) -> Literal[True]: ...
def dispatch(method: Any, params: Any): ... def dispatch(method: str, params): ...

View File

@@ -1,31 +1,35 @@
from functools import wraps as wraps from functools import wraps as wraps
from typing import Any, Optional from typing import Any, Callable, IO, Iterable, Literal, TypeVar
_logger: Any from ..sql_db import Cursor
_CallableT = TypeVar('_CallableT', bound=Callable)
class DatabaseExists(Warning): ... class DatabaseExists(Warning): ...
def check_db_management_enabled(method: Any): ... def check_db_management_enabled(method: _CallableT) -> _CallableT: ...
def check_super(passwd: Any): ... def check_super(passwd: str) -> Literal[True]: ...
def _initialize_db(id: Any, db_name: Any, demo: Any, lang: Any, user_password: Any, login: str = ..., country_code: Optional[Any] = ..., phone: Optional[Any] = ...) -> None: ... def _initialize_db(id, db_name: str, demo: bool, lang: str, user_password: str, login: str = ...,
def _create_empty_database(name: Any) -> None: ... country_code: str | None = ..., phone: str | None = ...) -> None: ...
def exp_create_database(db_name: Any, demo: Any, lang: Any, user_password: str = ..., login: str = ..., country_code: Optional[Any] = ..., phone: Optional[Any] = ...): ... def _create_empty_database(name: str) -> None: ...
def exp_duplicate_database(db_original_name: Any, db_name: Any): ... def exp_create_database(db_name: str, demo: bool, lang: str, user_password: str = ..., login: str = ...,
def _drop_conn(cr: Any, db_name: Any) -> None: ... country_code: str | None = ..., phone: str | None = ...) -> Literal[True]: ...
def exp_drop(db_name: Any): ... def exp_duplicate_database(db_original_name: str, db_name: str) -> Literal[True]: ...
def exp_dump(db_name: Any, format: Any): ... def _drop_conn(cr: Cursor, db_name: str) -> None: ...
def dump_db_manifest(cr: Any): ... def exp_drop(db_name: str) -> bool: ...
def dump_db(db_name: Any, stream: Any, backup_format: str = ...): ... def exp_dump(db_name: str, format: str) -> str: ...
def exp_restore(db_name: Any, data: Any, copy: bool = ...): ... def dump_db_manifest(cr: Cursor) -> dict[str, Any]: ...
def restore_db(db: Any, dump_file: Any, copy: bool = ...) -> None: ... def dump_db(db_name: str, stream, backup_format: str = ...) -> IO | None: ...
def exp_rename(old_name: Any, new_name: Any): ... def exp_restore(db_name: str, data, copy: bool = ...) -> Literal[True]: ...
def exp_change_admin_password(new_password: Any): ... def restore_db(db: str, dump_file: str, copy: bool = ...) -> None: ...
def exp_migrate_databases(databases: Any): ... def exp_rename(old_name: str, new_name: str) -> Literal[True]: ...
def exp_db_exist(db_name: Any): ... def exp_change_admin_password(new_password: str) -> Literal[True]: ...
def list_dbs(force: bool = ...): ... def exp_migrate_databases(databases: Iterable[str]) -> Literal[True]: ...
def list_db_incompatible(databases: Any): ... def exp_db_exist(db_name: str) -> bool: ...
def exp_list(document: bool = ...): ... def list_dbs(force: bool = ...) -> list[str]: ...
def exp_list_lang(): ... def list_db_incompatible(databases: Iterable[str]) -> list[str]: ...
def exp_list_countries(): ... def exp_list(document: bool = ...) -> list[str]: ...
def exp_server_version(): ... def exp_list_lang() -> list[tuple[str, str]]: ...
def dispatch(method: Any, params: Any): ... def exp_list_countries() -> list[tuple[str, str]]: ...
def exp_server_version() -> str: ...
def dispatch(method: str, params): ...

View File

@@ -1,11 +1,14 @@
from typing import Any, Optional from typing import Callable, TypeVar
_logger: Any from ..sql_db import Cursor
PG_CONCURRENCY_ERRORS_TO_RETRY: Any
PG_CONCURRENCY_ERRORS_TO_RETRY: tuple[str, str, str]
MAX_TRIES_ON_CONCURRENCY_FAILURE: int MAX_TRIES_ON_CONCURRENCY_FAILURE: int
def dispatch(method: Any, params: Any): ... _CallableT = TypeVar('_CallableT', bound=Callable)
def check(f: Any): ...
def execute_cr(cr: Any, uid: Any, obj: Any, method: Any, *args: Any, **kw: Any): ... def dispatch(method: str, params): ...
def execute_kw(db: Any, uid: Any, obj: Any, method: Any, args: Any, kw: Optional[Any] = ...): ... def check(f: _CallableT) -> _CallableT: ...
def execute(db: Any, uid: Any, obj: Any, method: Any, *args: Any, **kw: Any): ... def execute_cr(cr: Cursor, uid: int, obj: str, method: str, *args, **kw): ...
def execute_kw(db: str, uid: int, obj: str, method: str, args, kw: dict | None = ...): ...
def execute(db: str, uid: int, obj: str, method: str, *args, **kw): ...

View File

@@ -1,6 +1,9 @@
from typing import Any from typing import Literal
def login(db: Any, login: Any, password: Any): ... from ..api import Environment
def check(db: Any, uid: Any, passwd: Any): ... from ..http import OpenERPSession
def compute_session_token(session: Any, env: Any): ...
def check_session(session: Any, env: Any): ... def login(db: str, login: str, password: str) -> int | Literal[False]: ...
def check(db: str, uid: int, passwd: str) -> None: ...
def compute_session_token(session: OpenERPSession, env: Environment) -> str | Literal[False]: ...
def check_session(session: OpenERPSession, env: Environment) -> bool: ...

View File

@@ -1,145 +1,158 @@
from socket import socket as socket_
from threading import Semaphore, Thread
from gevent.pywsgi import WSGIServer
from itertools import chain as chain
from typing import Any, Callable, Iterable, Literal, TypeVar
import werkzeug.serving import werkzeug.serving
from typing import Any, Optional from inotify.adapters import InotifyTrees
from psutil import Process
from watchdog.observers import Observer
from ..modules.registry import Registry
from ..sql_db import Cursor
from ..tests import runner as runner
_WorkerT = TypeVar('_WorkerT', bound=Worker)
INOTIFY_LISTEN_EVENTS: Any INOTIFY_LISTEN_EVENTS: Any
_logger: Any
SLEEP_INTERVAL: int SLEEP_INTERVAL: int
def memory_info(process: Any): ... def memory_info(process: Process): ...
def set_limit_memory_hard() -> None: ... def set_limit_memory_hard() -> None: ...
def empty_pipe(fd: Any) -> None: ... def empty_pipe(fd: int) -> None: ...
class LoggingBaseWSGIServerMixIn: class LoggingBaseWSGIServerMixIn:
def handle_error(self, request: Any, client_address: Any) -> None: ... def handle_error(self, request, client_address) -> None: ...
class BaseWSGIServerNoBind(LoggingBaseWSGIServerMixIn, werkzeug.serving.BaseWSGIServer): class BaseWSGIServerNoBind(LoggingBaseWSGIServerMixIn, werkzeug.serving.BaseWSGIServer):
def __init__(self, app: Any) -> None: ... def __init__(self, app) -> None: ...
def server_activate(self) -> None: ... def server_activate(self) -> None: ...
class RequestHandler(werkzeug.serving.WSGIRequestHandler): class RequestHandler(werkzeug.serving.WSGIRequestHandler):
timeout: int = ...
def setup(self) -> None: ... def setup(self) -> None: ...
class ThreadedWSGIServerReloadable(LoggingBaseWSGIServerMixIn, werkzeug.serving.ThreadedWSGIServer): class ThreadedWSGIServerReloadable(LoggingBaseWSGIServerMixIn, werkzeug.serving.ThreadedWSGIServer):
max_http_threads: Any = ... max_http_threads: Any
http_threads_sem: Any = ... http_threads_sem: Semaphore
daemon_threads: bool = ... daemon_threads: bool
def __init__(self, host: Any, port: Any, app: Any) -> None: ... def __init__(self, host: str, port: int, app) -> None: ...
reload_socket: bool = ... reload_socket: bool
socket: Any = ... socket: socket_
def server_bind(self) -> None: ... def server_bind(self) -> None: ...
def server_activate(self) -> None: ... def server_activate(self) -> None: ...
def process_request(self, request: Any, client_address: Any) -> None: ... def process_request(self, request, client_address) -> None: ...
def _handle_request_noblock(self) -> None: ... def _handle_request_noblock(self) -> None: ...
def shutdown_request(self, request: Any) -> None: ... def shutdown_request(self, request) -> None: ...
class FSWatcherBase: class FSWatcherBase:
def handle_file(self, path: Any): ... def handle_file(self, path: str) -> Literal[True]: ...
class FSWatcherWatchdog(FSWatcherBase): class FSWatcherWatchdog(FSWatcherBase):
observer: Any = ... observer: Observer
def __init__(self) -> None: ... def __init__(self) -> None: ...
def dispatch(self, event: Any) -> None: ... def dispatch(self, event) -> None: ...
def start(self) -> None: ... def start(self) -> None: ...
def stop(self) -> None: ... def stop(self) -> None: ...
class FSWatcherInotify(FSWatcherBase): class FSWatcherInotify(FSWatcherBase):
started: bool = ... started: bool
watcher: Any = ... watcher: InotifyTrees
def __init__(self) -> None: ... def __init__(self) -> None: ...
def run(self) -> None: ... def run(self) -> None: ...
thread: Any = ... thread: Thread
def start(self) -> None: ... def start(self) -> None: ...
def stop(self) -> None: ... def stop(self) -> None: ...
class CommonServer: class CommonServer:
app: Any = ... app: Any
interface: Any = ... interface: str
port: Any = ... port: int
pid: Any = ... pid: int
def __init__(self, app: Any) -> None: ... def __init__(self, app) -> None: ...
def close_socket(self, sock: Any) -> None: ... def close_socket(self, sock: socket_) -> None: ...
class ThreadedServer(CommonServer): class ThreadedServer(CommonServer):
main_thread_id: Any = ... main_thread_id: int | None
quit_signals_received: int = ... quit_signals_received: int
httpd: Any = ... httpd: ThreadedWSGIServerReloadable | None
limits_reached_threads: Any = ... limits_reached_threads: set[Thread]
limit_reached_time: Any = ... limit_reached_time: float | None
def __init__(self, app: Any) -> None: ... def __init__(self, app) -> None: ...
def signal_handler(self, sig: Any, frame: Any) -> None: ... def signal_handler(self, sig, frame) -> None: ...
def process_limit(self) -> None: ... def process_limit(self) -> None: ...
def cron_thread(self, number: Any) -> None: ... def cron_thread(self, number) -> None: ...
def cron_spawn(self) -> None: ... def cron_spawn(self) -> None: ...
def http_thread(self): ... def http_thread(self): ...
def http_spawn(self) -> None: ... def http_spawn(self) -> None: ...
def start(self, stop: bool = ...): ... def start(self, stop: bool = ...): ...
def stop(self) -> None: ... def stop(self) -> None: ...
def run(self, preload: Optional[Any] = ..., stop: bool = ...): ... def run(self, preload: Any | None = ..., stop: bool = ...): ...
def reload(self) -> None: ... def reload(self) -> None: ...
class GeventServer(CommonServer): class GeventServer(CommonServer):
port: Any = ... port: int
httpd: Any = ... httpd: WSGIServer | None
def __init__(self, app: Any) -> None: ... def __init__(self, app) -> None: ...
def process_limits(self) -> None: ... def process_limits(self) -> None: ...
ppid: Any = ... ppid: int
def watchdog(self, beat: int = ...) -> None: ... def watchdog(self, beat: int = ...) -> None: ...
client_address: Any = ... client_address: Any
def start(self): ... def start(self): ...
def stop(self) -> None: ... def stop(self) -> None: ...
def run(self, preload: Any, stop: Any) -> None: ... def run(self, preload, stop: bool) -> None: ...
class PreforkServer(CommonServer): class PreforkServer(CommonServer):
address: Any = ... address: Any
population: Any = ... population: int
timeout: Any = ... timeout: int
limit_request: Any = ... limit_request: int
cron_timeout: Any = ... cron_timeout: int
beat: int = ... beat: int
app: Any = ... app: Any
pid: Any = ... pid: int
socket: Any = ... socket: socket_ | None
workers_http: Any = ... workers_http: dict[int, WorkerHTTP]
workers_cron: Any = ... workers_cron: dict[int, WorkerCron]
workers: Any = ... workers: dict[int, Worker]
generation: int = ... generation: int
queue: Any = ... queue: list
long_polling_pid: Any = ... long_polling_pid: int | None
def __init__(self, app: Any) -> None: ... def __init__(self, app) -> None: ...
def pipe_new(self): ... def pipe_new(self) -> tuple[int, int]: ...
def pipe_ping(self, pipe: Any) -> None: ... def pipe_ping(self, pipe: tuple[int, int]) -> None: ...
def signal_handler(self, sig: Any, frame: Any) -> None: ... def signal_handler(self, sig: int, frame) -> None: ...
def worker_spawn(self, klass: Any, workers_registry: Any): ... def worker_spawn(self, klass: Callable[..., _WorkerT], workers_registry: dict[int, _WorkerT]) -> _WorkerT | None: ...
def long_polling_spawn(self) -> None: ... def long_polling_spawn(self) -> None: ...
def worker_pop(self, pid: Any) -> None: ... def worker_pop(self, pid: int) -> None: ...
def worker_kill(self, pid: Any, sig: Any) -> None: ... def worker_kill(self, pid: int, sig: int) -> None: ...
def process_signals(self) -> None: ... def process_signals(self) -> None: ...
def process_zombie(self) -> None: ... def process_zombie(self) -> None: ...
def process_timeout(self) -> None: ... def process_timeout(self) -> None: ...
def process_spawn(self) -> None: ... def process_spawn(self) -> None: ...
def sleep(self) -> None: ... def sleep(self) -> None: ...
pipe: Any = ... pipe: tuple[int, int]
def start(self) -> None: ... def start(self) -> None: ...
def stop(self, graceful: bool = ...) -> None: ... def stop(self, graceful: bool = ...) -> None: ...
def run(self, preload: Any, stop: Any): ... def run(self, preload, stop: bool): ...
class Worker: class Worker:
multi: Any = ... multi: PreforkServer
watchdog_time: Any = ... watchdog_time: float
watchdog_pipe: Any = ... watchdog_pipe: tuple[int, int]
eintr_pipe: Any = ... eintr_pipe: tuple[int, int]
watchdog_timeout: Any = ... watchdog_timeout: Any
ppid: Any = ... ppid: int
pid: Any = ... pid: int | None
alive: bool = ... alive: bool
request_max: Any = ... request_max: Any
request_count: int = ... request_count: int
def __init__(self, multi: Any) -> None: ... def __init__(self, multi: PreforkServer) -> None: ...
def setproctitle(self, title: str = ...) -> None: ... def setproctitle(self, title: str = ...) -> None: ...
def close(self) -> None: ... def close(self) -> None: ...
def signal_handler(self, sig: Any, frame: Any) -> None: ... def signal_handler(self, sig: int, frame) -> None: ...
def signal_time_expired_handler(self, n: Any, stack: Any) -> None: ... def signal_time_expired_handler(self, n, stack) -> None: ...
def sleep(self) -> None: ... def sleep(self) -> None: ...
def check_limits(self) -> None: ... def check_limits(self) -> None: ...
def process_work(self) -> None: ... def process_work(self) -> None: ...
@@ -149,27 +162,27 @@ class Worker:
def _runloop(self) -> None: ... def _runloop(self) -> None: ...
class WorkerHTTP(Worker): class WorkerHTTP(Worker):
sock_timeout: Any = ... sock_timeout: float
def __init__(self, multi: Any) -> None: ... def __init__(self, multi: PreforkServer) -> None: ...
def process_request(self, client: Any, addr: Any) -> None: ... def process_request(self, client: socket_, addr) -> None: ...
def process_work(self) -> None: ... def process_work(self) -> None: ...
server: Any = ... server: BaseWSGIServerNoBind
def start(self) -> None: ... def start(self) -> None: ...
class WorkerCron(Worker): class WorkerCron(Worker):
db_index: int = ... db_index: int
watchdog_timeout: Any = ... watchdog_timeout: int
def __init__(self, multi: Any) -> None: ... def __init__(self, multi: PreforkServer) -> None: ...
def sleep(self) -> None: ... def sleep(self) -> None: ...
def _db_list(self): ... def _db_list(self): ...
def process_work(self) -> None: ... def process_work(self) -> None: ...
def start(self) -> None: ... def start(self) -> None: ...
server: Any server: CommonServer | None
def load_server_wide_modules() -> None: ... def load_server_wide_modules() -> None: ...
def _reexec(updated_modules: Optional[Any] = ...) -> None: ... def _reexec(updated_modules: Iterable[str] | None = ...) -> None: ...
def load_test_file_py(registry: Any, test_file: Any) -> None: ... def load_test_file_py(registry: Registry, test_file: str) -> None: ...
def preload_registries(dbnames: Any): ... def preload_registries(dbnames: list[str] | None): ...
def start(preload: Optional[Any] = ..., stop: bool = ...): ... def start(preload: list[str] | None = ..., stop: bool = ...): ...
def restart() -> None: ... def restart() -> None: ...

View File

@@ -1,17 +1,17 @@
from typing import Any from werkzeug.middleware.proxy_fix import ProxyFix as ProxyFix_
from typing import Callable
_logger: Any
RPC_FAULT_CODE_CLIENT_ERROR: int RPC_FAULT_CODE_CLIENT_ERROR: int
RPC_FAULT_CODE_APPLICATION_ERROR: int RPC_FAULT_CODE_APPLICATION_ERROR: int
RPC_FAULT_CODE_WARNING: int RPC_FAULT_CODE_WARNING: int
RPC_FAULT_CODE_ACCESS_DENIED: int RPC_FAULT_CODE_ACCESS_DENIED: int
RPC_FAULT_CODE_ACCESS_ERROR: int RPC_FAULT_CODE_ACCESS_ERROR: int
def xmlrpc_handle_exception_int(e: Any): ... def xmlrpc_handle_exception_int(e: Exception) -> str: ...
def xmlrpc_handle_exception_string(e: Any): ... def xmlrpc_handle_exception_string(e: Exception) -> str: ...
def _patch_xmlrpc_marshaller() -> None: ... def _patch_xmlrpc_marshaller() -> None: ...
def application_unproxied(environ: Any, start_response: Any): ... def application_unproxied(environ, start_response): ...
ProxyFix: Any ProxyFix: Callable[..., ProxyFix_]
def application(environ: Any, start_response: Any): ... def application(environ, start_response): ...