Adding pymysql stubs to third_party/2and3 (#861)

(Original by @ghagerer, extracted from #647 by @WouldYouKindly.)
This commit is contained in:
Alexey
2017-01-30 08:01:49 +03:00
committed by Guido van Rossum
parent 92534805b5
commit f398628948
15 changed files with 935 additions and 0 deletions

39
third_party/2and3/pymysql/__init__.pyi vendored Normal file
View File

@@ -0,0 +1,39 @@
# Stubs for pymysql (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Union, Tuple, Callable
from .connections import Connection
from .constants import FIELD_TYPE as FIELD_TYPE
from .converters import escape_dict as escape_dict, escape_sequence as escape_sequence, escape_string as escape_string
from .err import Warning as Warning, Error as Error, InterfaceError as InterfaceError, DataError as DataError, DatabaseError as DatabaseError, OperationalError as OperationalError, IntegrityError as IntegrityError, InternalError as InternalError, NotSupportedError as NotSupportedError, ProgrammingError as ProgrammingError, MySQLError as MySQLError
from .times import Date as Date, Time as Time, Timestamp as Timestamp, DateFromTicks as DateFromTicks, TimeFromTicks as TimeFromTicks, TimestampFromTicks as TimestampFromTicks
threadsafety = ... # type: int
apilevel = ... # type: str
paramstyle = ... # type: str
class DBAPISet(frozenset):
def __ne__(self, other) -> bool: ...
def __eq__(self, other) -> bool: ...
def __hash__(self) -> int: ...
STRING = ... # type: DBAPISet
BINARY = ... # type: DBAPISet
NUMBER = ... # type: DBAPISet
DATE = ... # type: DBAPISet
TIME = ... # type: DBAPISet
TIMESTAMP = ... # type: DBAPISet
ROWID = ... # type: DBAPISet
def Binary(x) -> Union[bytearray, bytes]: ...
def Connect(*args, **kwargs) -> Connection: ...
def get_client_info() -> str: ...
connect = ... # type: Callable[..., Connection]
version_info = ... # type: Tuple[int, int, int, str, int]
NULL = ... # type: str
def install_as_MySQLdb() -> None: ...

20
third_party/2and3/pymysql/charset.pyi vendored Normal file
View File

@@ -0,0 +1,20 @@
# Stubs for pymysql.charset (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
MBLENGTH = ... # type: Any
class Charset:
is_default = ... # type: Any
def __init__(self, id, name, collation, is_default): ...
class Charsets:
def __init__(self): ...
def add(self, c): ...
def by_id(self, id): ...
def by_name(self, name): ...
def charset_by_name(name): ...
def charset_by_id(id): ...

View File

@@ -0,0 +1,142 @@
# Stubs for pymysql.connections (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any, Optional, Type
from .charset import MBLENGTH as MBLENGTH, charset_by_name as charset_by_name, charset_by_id as charset_by_id
from .cursors import Cursor as Cursor
from .constants import FIELD_TYPE as FIELD_TYPE, FLAG as FLAG
from .constants import SERVER_STATUS as SERVER_STATUS
from .constants import CLIENT as CLIENT
from .constants import COMMAND as COMMAND
from .util import join_bytes as join_bytes, byte2int as byte2int, int2byte as int2byte
from .converters import escape_item as escape_item, encoders as encoders, decoders as decoders
from .err import raise_mysql_exception as raise_mysql_exception, Warning as Warning, Error as Error, InterfaceError as InterfaceError, DataError as DataError, DatabaseError as DatabaseError, OperationalError as OperationalError, IntegrityError as IntegrityError, InternalError as InternalError, NotSupportedError as NotSupportedError, ProgrammingError as ProgrammingError
sha_new = ... # type: Any
SSL_ENABLED = ... # type: Any
DEFAULT_USER = ... # type: Any
DEBUG = ... # type: Any
NULL_COLUMN = ... # type: Any
UNSIGNED_CHAR_COLUMN = ... # type: Any
UNSIGNED_SHORT_COLUMN = ... # type: Any
UNSIGNED_INT24_COLUMN = ... # type: Any
UNSIGNED_INT64_COLUMN = ... # type: Any
UNSIGNED_CHAR_LENGTH = ... # type: Any
UNSIGNED_SHORT_LENGTH = ... # type: Any
UNSIGNED_INT24_LENGTH = ... # type: Any
UNSIGNED_INT64_LENGTH = ... # type: Any
DEFAULT_CHARSET = ... # type: Any
def dump_packet(data): ...
SCRAMBLE_LENGTH_323 = ... # type: Any
class RandStruct_323:
max_value = ... # type: Any
seed1 = ... # type: Any
seed2 = ... # type: Any
def __init__(self, seed1, seed2): ...
def my_rnd(self): ...
def pack_int24(n): ...
def unpack_uint16(n): ...
def unpack_int24(n): ...
def unpack_int32(n): ...
def unpack_int64(n): ...
def defaulterrorhandler(connection, cursor, errorclass, errorvalue): ...
class MysqlPacket:
connection = ... # type: Any
def __init__(self, connection): ...
def packet_number(self): ...
def get_all_data(self): ...
def read(self, size): ...
def read_all(self): ...
def advance(self, length): ...
def rewind(self, position=0): ...
def peek(self, size): ...
def get_bytes(self, position, length=1): ...
def read_length_coded_binary(self): ...
def read_length_coded_string(self): ...
def is_ok_packet(self): ...
def is_eof_packet(self): ...
def is_resultset_packet(self): ...
def is_error_packet(self): ...
def check_error(self): ...
def dump(self): ...
class FieldDescriptorPacket(MysqlPacket):
def __init__(self, *args): ...
def description(self): ...
def get_column_length(self): ...
class Connection:
errorhandler = ... # type: Any
ssl = ... # type: Any
host = ... # type: Any
port = ... # type: Any
user = ... # type: Any
password = ... # type: Any
db = ... # type: Any
unix_socket = ... # type: Any
charset = ... # type: Any
use_unicode = ... # type: Any
client_flag = ... # type: Any
cursorclass = ... # type: Any
connect_timeout = ... # type: Any
messages = ... # type: Any
encoders = ... # type: Any
decoders = ... # type: Any
host_info = ... # type: Any
def __init__(self, host='', user=None, passwd='', db=None, port=3306, unix_socket=None, charset='', sql_mode=None, read_default_file=None, conv=..., use_unicode=None, client_flag=0, cursorclass=..., init_command=None, connect_timeout=None, ssl=None, read_default_group=None, compress=None, named_pipe=None): ...
socket = ... # type: Any
rfile = ... # type: Any
wfile = ... # type: Any
def close(self): ...
def autocommit(self, value): ...
def commit(self): ...
def rollback(self): ...
def escape(self, obj): ...
def literal(self, obj): ...
def cursor(self, cursor: Optional[Type[Cursor]]=None): ...
def __enter__(self): ...
def __exit__(self, exc, value, traceback): ...
def query(self, sql): ...
def next_result(self): ...
def affected_rows(self): ...
def kill(self, thread_id): ...
def ping(self, reconnect=True): ...
def set_charset(self, charset): ...
def read_packet(self, packet_type=...): ...
def insert_id(self): ...
def thread_id(self): ...
def character_set_name(self): ...
def get_host_info(self): ...
def get_proto_info(self): ...
def get_server_info(self): ...
Warning = ... # type: Any
Error = ... # type: Any
InterfaceError = ... # type: Any
DatabaseError = ... # type: Any
DataError = ... # type: Any
OperationalError = ... # type: Any
IntegrityError = ... # type: Any
InternalError = ... # type: Any
ProgrammingError = ... # type: Any
NotSupportedError = ... # type: Any
class MySQLResult:
connection = ... # type: Any
affected_rows = ... # type: Any
insert_id = ... # type: Any
server_status = ... # type: Any
warning_count = ... # type: Any
message = ... # type: Any
field_count = ... # type: Any
description = ... # type: Any
rows = ... # type: Any
has_next = ... # type: Any
def __init__(self, connection): ...
first_packet = ... # type: Any
def read(self): ...

View File

@@ -0,0 +1,24 @@
# Stubs for pymysql.constants.CLIENT (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
LONG_PASSWORD = ... # type: Any
FOUND_ROWS = ... # type: Any
LONG_FLAG = ... # type: Any
CONNECT_WITH_DB = ... # type: Any
NO_SCHEMA = ... # type: Any
COMPRESS = ... # type: Any
ODBC = ... # type: Any
LOCAL_FILES = ... # type: Any
IGNORE_SPACE = ... # type: Any
PROTOCOL_41 = ... # type: Any
INTERACTIVE = ... # type: Any
SSL = ... # type: Any
IGNORE_SIGPIPE = ... # type: Any
TRANSACTIONS = ... # type: Any
SECURE_CONNECTION = ... # type: Any
MULTI_STATEMENTS = ... # type: Any
MULTI_RESULTS = ... # type: Any
CAPABILITIES = ... # type: Any

View File

@@ -0,0 +1,28 @@
# Stubs for pymysql.constants.COMMAND (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
COM_SLEEP = ... # type: Any
COM_QUIT = ... # type: Any
COM_INIT_DB = ... # type: Any
COM_QUERY = ... # type: Any
COM_FIELD_LIST = ... # type: Any
COM_CREATE_DB = ... # type: Any
COM_DROP_DB = ... # type: Any
COM_REFRESH = ... # type: Any
COM_SHUTDOWN = ... # type: Any
COM_STATISTICS = ... # type: Any
COM_PROCESS_INFO = ... # type: Any
COM_CONNECT = ... # type: Any
COM_PROCESS_KILL = ... # type: Any
COM_DEBUG = ... # type: Any
COM_PING = ... # type: Any
COM_TIME = ... # type: Any
COM_DELAYED_INSERT = ... # type: Any
COM_CHANGE_USER = ... # type: Any
COM_BINLOG_DUMP = ... # type: Any
COM_TABLE_DUMP = ... # type: Any
COM_CONNECT_OUT = ... # type: Any
COM_REGISTER_SLAVE = ... # type: Any

View File

@@ -0,0 +1,477 @@
# Stubs for pymysql.constants.ER (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
ERROR_FIRST = ... # type: Any
HASHCHK = ... # type: Any
NISAMCHK = ... # type: Any
NO = ... # type: Any
YES = ... # type: Any
CANT_CREATE_FILE = ... # type: Any
CANT_CREATE_TABLE = ... # type: Any
CANT_CREATE_DB = ... # type: Any
DB_CREATE_EXISTS = ... # type: Any
DB_DROP_EXISTS = ... # type: Any
DB_DROP_DELETE = ... # type: Any
DB_DROP_RMDIR = ... # type: Any
CANT_DELETE_FILE = ... # type: Any
CANT_FIND_SYSTEM_REC = ... # type: Any
CANT_GET_STAT = ... # type: Any
CANT_GET_WD = ... # type: Any
CANT_LOCK = ... # type: Any
CANT_OPEN_FILE = ... # type: Any
FILE_NOT_FOUND = ... # type: Any
CANT_READ_DIR = ... # type: Any
CANT_SET_WD = ... # type: Any
CHECKREAD = ... # type: Any
DISK_FULL = ... # type: Any
DUP_KEY = ... # type: Any
ERROR_ON_CLOSE = ... # type: Any
ERROR_ON_READ = ... # type: Any
ERROR_ON_RENAME = ... # type: Any
ERROR_ON_WRITE = ... # type: Any
FILE_USED = ... # type: Any
FILSORT_ABORT = ... # type: Any
FORM_NOT_FOUND = ... # type: Any
GET_ERRNO = ... # type: Any
ILLEGAL_HA = ... # type: Any
KEY_NOT_FOUND = ... # type: Any
NOT_FORM_FILE = ... # type: Any
NOT_KEYFILE = ... # type: Any
OLD_KEYFILE = ... # type: Any
OPEN_AS_READONLY = ... # type: Any
OUTOFMEMORY = ... # type: Any
OUT_OF_SORTMEMORY = ... # type: Any
UNEXPECTED_EOF = ... # type: Any
CON_COUNT_ERROR = ... # type: Any
OUT_OF_RESOURCES = ... # type: Any
BAD_HOST_ERROR = ... # type: Any
HANDSHAKE_ERROR = ... # type: Any
DBACCESS_DENIED_ERROR = ... # type: Any
ACCESS_DENIED_ERROR = ... # type: Any
NO_DB_ERROR = ... # type: Any
UNKNOWN_COM_ERROR = ... # type: Any
BAD_NULL_ERROR = ... # type: Any
BAD_DB_ERROR = ... # type: Any
TABLE_EXISTS_ERROR = ... # type: Any
BAD_TABLE_ERROR = ... # type: Any
NON_UNIQ_ERROR = ... # type: Any
SERVER_SHUTDOWN = ... # type: Any
BAD_FIELD_ERROR = ... # type: Any
WRONG_FIELD_WITH_GROUP = ... # type: Any
WRONG_GROUP_FIELD = ... # type: Any
WRONG_SUM_SELECT = ... # type: Any
WRONG_VALUE_COUNT = ... # type: Any
TOO_LONG_IDENT = ... # type: Any
DUP_FIELDNAME = ... # type: Any
DUP_KEYNAME = ... # type: Any
DUP_ENTRY = ... # type: Any
WRONG_FIELD_SPEC = ... # type: Any
PARSE_ERROR = ... # type: Any
EMPTY_QUERY = ... # type: Any
NONUNIQ_TABLE = ... # type: Any
INVALID_DEFAULT = ... # type: Any
MULTIPLE_PRI_KEY = ... # type: Any
TOO_MANY_KEYS = ... # type: Any
TOO_MANY_KEY_PARTS = ... # type: Any
TOO_LONG_KEY = ... # type: Any
KEY_COLUMN_DOES_NOT_EXITS = ... # type: Any
BLOB_USED_AS_KEY = ... # type: Any
TOO_BIG_FIELDLENGTH = ... # type: Any
WRONG_AUTO_KEY = ... # type: Any
READY = ... # type: Any
NORMAL_SHUTDOWN = ... # type: Any
GOT_SIGNAL = ... # type: Any
SHUTDOWN_COMPLETE = ... # type: Any
FORCING_CLOSE = ... # type: Any
IPSOCK_ERROR = ... # type: Any
NO_SUCH_INDEX = ... # type: Any
WRONG_FIELD_TERMINATORS = ... # type: Any
BLOBS_AND_NO_TERMINATED = ... # type: Any
TEXTFILE_NOT_READABLE = ... # type: Any
FILE_EXISTS_ERROR = ... # type: Any
LOAD_INFO = ... # type: Any
ALTER_INFO = ... # type: Any
WRONG_SUB_KEY = ... # type: Any
CANT_REMOVE_ALL_FIELDS = ... # type: Any
CANT_DROP_FIELD_OR_KEY = ... # type: Any
INSERT_INFO = ... # type: Any
UPDATE_TABLE_USED = ... # type: Any
NO_SUCH_THREAD = ... # type: Any
KILL_DENIED_ERROR = ... # type: Any
NO_TABLES_USED = ... # type: Any
TOO_BIG_SET = ... # type: Any
NO_UNIQUE_LOGFILE = ... # type: Any
TABLE_NOT_LOCKED_FOR_WRITE = ... # type: Any
TABLE_NOT_LOCKED = ... # type: Any
BLOB_CANT_HAVE_DEFAULT = ... # type: Any
WRONG_DB_NAME = ... # type: Any
WRONG_TABLE_NAME = ... # type: Any
TOO_BIG_SELECT = ... # type: Any
UNKNOWN_ERROR = ... # type: Any
UNKNOWN_PROCEDURE = ... # type: Any
WRONG_PARAMCOUNT_TO_PROCEDURE = ... # type: Any
WRONG_PARAMETERS_TO_PROCEDURE = ... # type: Any
UNKNOWN_TABLE = ... # type: Any
FIELD_SPECIFIED_TWICE = ... # type: Any
INVALID_GROUP_FUNC_USE = ... # type: Any
UNSUPPORTED_EXTENSION = ... # type: Any
TABLE_MUST_HAVE_COLUMNS = ... # type: Any
RECORD_FILE_FULL = ... # type: Any
UNKNOWN_CHARACTER_SET = ... # type: Any
TOO_MANY_TABLES = ... # type: Any
TOO_MANY_FIELDS = ... # type: Any
TOO_BIG_ROWSIZE = ... # type: Any
STACK_OVERRUN = ... # type: Any
WRONG_OUTER_JOIN = ... # type: Any
NULL_COLUMN_IN_INDEX = ... # type: Any
CANT_FIND_UDF = ... # type: Any
CANT_INITIALIZE_UDF = ... # type: Any
UDF_NO_PATHS = ... # type: Any
UDF_EXISTS = ... # type: Any
CANT_OPEN_LIBRARY = ... # type: Any
CANT_FIND_DL_ENTRY = ... # type: Any
FUNCTION_NOT_DEFINED = ... # type: Any
HOST_IS_BLOCKED = ... # type: Any
HOST_NOT_PRIVILEGED = ... # type: Any
PASSWORD_ANONYMOUS_USER = ... # type: Any
PASSWORD_NOT_ALLOWED = ... # type: Any
PASSWORD_NO_MATCH = ... # type: Any
UPDATE_INFO = ... # type: Any
CANT_CREATE_THREAD = ... # type: Any
WRONG_VALUE_COUNT_ON_ROW = ... # type: Any
CANT_REOPEN_TABLE = ... # type: Any
INVALID_USE_OF_NULL = ... # type: Any
REGEXP_ERROR = ... # type: Any
MIX_OF_GROUP_FUNC_AND_FIELDS = ... # type: Any
NONEXISTING_GRANT = ... # type: Any
TABLEACCESS_DENIED_ERROR = ... # type: Any
COLUMNACCESS_DENIED_ERROR = ... # type: Any
ILLEGAL_GRANT_FOR_TABLE = ... # type: Any
GRANT_WRONG_HOST_OR_USER = ... # type: Any
NO_SUCH_TABLE = ... # type: Any
NONEXISTING_TABLE_GRANT = ... # type: Any
NOT_ALLOWED_COMMAND = ... # type: Any
SYNTAX_ERROR = ... # type: Any
DELAYED_CANT_CHANGE_LOCK = ... # type: Any
TOO_MANY_DELAYED_THREADS = ... # type: Any
ABORTING_CONNECTION = ... # type: Any
NET_PACKET_TOO_LARGE = ... # type: Any
NET_READ_ERROR_FROM_PIPE = ... # type: Any
NET_FCNTL_ERROR = ... # type: Any
NET_PACKETS_OUT_OF_ORDER = ... # type: Any
NET_UNCOMPRESS_ERROR = ... # type: Any
NET_READ_ERROR = ... # type: Any
NET_READ_INTERRUPTED = ... # type: Any
NET_ERROR_ON_WRITE = ... # type: Any
NET_WRITE_INTERRUPTED = ... # type: Any
TOO_LONG_STRING = ... # type: Any
TABLE_CANT_HANDLE_BLOB = ... # type: Any
TABLE_CANT_HANDLE_AUTO_INCREMENT = ... # type: Any
DELAYED_INSERT_TABLE_LOCKED = ... # type: Any
WRONG_COLUMN_NAME = ... # type: Any
WRONG_KEY_COLUMN = ... # type: Any
WRONG_MRG_TABLE = ... # type: Any
DUP_UNIQUE = ... # type: Any
BLOB_KEY_WITHOUT_LENGTH = ... # type: Any
PRIMARY_CANT_HAVE_NULL = ... # type: Any
TOO_MANY_ROWS = ... # type: Any
REQUIRES_PRIMARY_KEY = ... # type: Any
NO_RAID_COMPILED = ... # type: Any
UPDATE_WITHOUT_KEY_IN_SAFE_MODE = ... # type: Any
KEY_DOES_NOT_EXITS = ... # type: Any
CHECK_NO_SUCH_TABLE = ... # type: Any
CHECK_NOT_IMPLEMENTED = ... # type: Any
CANT_DO_THIS_DURING_AN_TRANSACTION = ... # type: Any
ERROR_DURING_COMMIT = ... # type: Any
ERROR_DURING_ROLLBACK = ... # type: Any
ERROR_DURING_FLUSH_LOGS = ... # type: Any
ERROR_DURING_CHECKPOINT = ... # type: Any
NEW_ABORTING_CONNECTION = ... # type: Any
DUMP_NOT_IMPLEMENTED = ... # type: Any
FLUSH_MASTER_BINLOG_CLOSED = ... # type: Any
INDEX_REBUILD = ... # type: Any
MASTER = ... # type: Any
MASTER_NET_READ = ... # type: Any
MASTER_NET_WRITE = ... # type: Any
FT_MATCHING_KEY_NOT_FOUND = ... # type: Any
LOCK_OR_ACTIVE_TRANSACTION = ... # type: Any
UNKNOWN_SYSTEM_VARIABLE = ... # type: Any
CRASHED_ON_USAGE = ... # type: Any
CRASHED_ON_REPAIR = ... # type: Any
WARNING_NOT_COMPLETE_ROLLBACK = ... # type: Any
TRANS_CACHE_FULL = ... # type: Any
SLAVE_MUST_STOP = ... # type: Any
SLAVE_NOT_RUNNING = ... # type: Any
BAD_SLAVE = ... # type: Any
MASTER_INFO = ... # type: Any
SLAVE_THREAD = ... # type: Any
TOO_MANY_USER_CONNECTIONS = ... # type: Any
SET_CONSTANTS_ONLY = ... # type: Any
LOCK_WAIT_TIMEOUT = ... # type: Any
LOCK_TABLE_FULL = ... # type: Any
READ_ONLY_TRANSACTION = ... # type: Any
DROP_DB_WITH_READ_LOCK = ... # type: Any
CREATE_DB_WITH_READ_LOCK = ... # type: Any
WRONG_ARGUMENTS = ... # type: Any
NO_PERMISSION_TO_CREATE_USER = ... # type: Any
UNION_TABLES_IN_DIFFERENT_DIR = ... # type: Any
LOCK_DEADLOCK = ... # type: Any
TABLE_CANT_HANDLE_FT = ... # type: Any
CANNOT_ADD_FOREIGN = ... # type: Any
NO_REFERENCED_ROW = ... # type: Any
ROW_IS_REFERENCED = ... # type: Any
CONNECT_TO_MASTER = ... # type: Any
QUERY_ON_MASTER = ... # type: Any
ERROR_WHEN_EXECUTING_COMMAND = ... # type: Any
WRONG_USAGE = ... # type: Any
WRONG_NUMBER_OF_COLUMNS_IN_SELECT = ... # type: Any
CANT_UPDATE_WITH_READLOCK = ... # type: Any
MIXING_NOT_ALLOWED = ... # type: Any
DUP_ARGUMENT = ... # type: Any
USER_LIMIT_REACHED = ... # type: Any
SPECIFIC_ACCESS_DENIED_ERROR = ... # type: Any
LOCAL_VARIABLE = ... # type: Any
GLOBAL_VARIABLE = ... # type: Any
NO_DEFAULT = ... # type: Any
WRONG_VALUE_FOR_VAR = ... # type: Any
WRONG_TYPE_FOR_VAR = ... # type: Any
VAR_CANT_BE_READ = ... # type: Any
CANT_USE_OPTION_HERE = ... # type: Any
NOT_SUPPORTED_YET = ... # type: Any
MASTER_FATAL_ERROR_READING_BINLOG = ... # type: Any
SLAVE_IGNORED_TABLE = ... # type: Any
INCORRECT_GLOBAL_LOCAL_VAR = ... # type: Any
WRONG_FK_DEF = ... # type: Any
KEY_REF_DO_NOT_MATCH_TABLE_REF = ... # type: Any
OPERAND_COLUMNS = ... # type: Any
SUBQUERY_NO_1_ROW = ... # type: Any
UNKNOWN_STMT_HANDLER = ... # type: Any
CORRUPT_HELP_DB = ... # type: Any
CYCLIC_REFERENCE = ... # type: Any
AUTO_CONVERT = ... # type: Any
ILLEGAL_REFERENCE = ... # type: Any
DERIVED_MUST_HAVE_ALIAS = ... # type: Any
SELECT_REDUCED = ... # type: Any
TABLENAME_NOT_ALLOWED_HERE = ... # type: Any
NOT_SUPPORTED_AUTH_MODE = ... # type: Any
SPATIAL_CANT_HAVE_NULL = ... # type: Any
COLLATION_CHARSET_MISMATCH = ... # type: Any
SLAVE_WAS_RUNNING = ... # type: Any
SLAVE_WAS_NOT_RUNNING = ... # type: Any
TOO_BIG_FOR_UNCOMPRESS = ... # type: Any
ZLIB_Z_MEM_ERROR = ... # type: Any
ZLIB_Z_BUF_ERROR = ... # type: Any
ZLIB_Z_DATA_ERROR = ... # type: Any
CUT_VALUE_GROUP_CONCAT = ... # type: Any
WARN_TOO_FEW_RECORDS = ... # type: Any
WARN_TOO_MANY_RECORDS = ... # type: Any
WARN_NULL_TO_NOTNULL = ... # type: Any
WARN_DATA_OUT_OF_RANGE = ... # type: Any
WARN_DATA_TRUNCATED = ... # type: Any
WARN_USING_OTHER_HANDLER = ... # type: Any
CANT_AGGREGATE_2COLLATIONS = ... # type: Any
DROP_USER = ... # type: Any
REVOKE_GRANTS = ... # type: Any
CANT_AGGREGATE_3COLLATIONS = ... # type: Any
CANT_AGGREGATE_NCOLLATIONS = ... # type: Any
VARIABLE_IS_NOT_STRUCT = ... # type: Any
UNKNOWN_COLLATION = ... # type: Any
SLAVE_IGNORED_SSL_PARAMS = ... # type: Any
SERVER_IS_IN_SECURE_AUTH_MODE = ... # type: Any
WARN_FIELD_RESOLVED = ... # type: Any
BAD_SLAVE_UNTIL_COND = ... # type: Any
MISSING_SKIP_SLAVE = ... # type: Any
UNTIL_COND_IGNORED = ... # type: Any
WRONG_NAME_FOR_INDEX = ... # type: Any
WRONG_NAME_FOR_CATALOG = ... # type: Any
WARN_QC_RESIZE = ... # type: Any
BAD_FT_COLUMN = ... # type: Any
UNKNOWN_KEY_CACHE = ... # type: Any
WARN_HOSTNAME_WONT_WORK = ... # type: Any
UNKNOWN_STORAGE_ENGINE = ... # type: Any
WARN_DEPRECATED_SYNTAX = ... # type: Any
NON_UPDATABLE_TABLE = ... # type: Any
FEATURE_DISABLED = ... # type: Any
OPTION_PREVENTS_STATEMENT = ... # type: Any
DUPLICATED_VALUE_IN_TYPE = ... # type: Any
TRUNCATED_WRONG_VALUE = ... # type: Any
TOO_MUCH_AUTO_TIMESTAMP_COLS = ... # type: Any
INVALID_ON_UPDATE = ... # type: Any
UNSUPPORTED_PS = ... # type: Any
GET_ERRMSG = ... # type: Any
GET_TEMPORARY_ERRMSG = ... # type: Any
UNKNOWN_TIME_ZONE = ... # type: Any
WARN_INVALID_TIMESTAMP = ... # type: Any
INVALID_CHARACTER_STRING = ... # type: Any
WARN_ALLOWED_PACKET_OVERFLOWED = ... # type: Any
CONFLICTING_DECLARATIONS = ... # type: Any
SP_NO_RECURSIVE_CREATE = ... # type: Any
SP_ALREADY_EXISTS = ... # type: Any
SP_DOES_NOT_EXIST = ... # type: Any
SP_DROP_FAILED = ... # type: Any
SP_STORE_FAILED = ... # type: Any
SP_LILABEL_MISMATCH = ... # type: Any
SP_LABEL_REDEFINE = ... # type: Any
SP_LABEL_MISMATCH = ... # type: Any
SP_UNINIT_VAR = ... # type: Any
SP_BADSELECT = ... # type: Any
SP_BADRETURN = ... # type: Any
SP_BADSTATEMENT = ... # type: Any
UPDATE_LOG_DEPRECATED_IGNORED = ... # type: Any
UPDATE_LOG_DEPRECATED_TRANSLATED = ... # type: Any
QUERY_INTERRUPTED = ... # type: Any
SP_WRONG_NO_OF_ARGS = ... # type: Any
SP_COND_MISMATCH = ... # type: Any
SP_NORETURN = ... # type: Any
SP_NORETURNEND = ... # type: Any
SP_BAD_CURSOR_QUERY = ... # type: Any
SP_BAD_CURSOR_SELECT = ... # type: Any
SP_CURSOR_MISMATCH = ... # type: Any
SP_CURSOR_ALREADY_OPEN = ... # type: Any
SP_CURSOR_NOT_OPEN = ... # type: Any
SP_UNDECLARED_VAR = ... # type: Any
SP_WRONG_NO_OF_FETCH_ARGS = ... # type: Any
SP_FETCH_NO_DATA = ... # type: Any
SP_DUP_PARAM = ... # type: Any
SP_DUP_VAR = ... # type: Any
SP_DUP_COND = ... # type: Any
SP_DUP_CURS = ... # type: Any
SP_CANT_ALTER = ... # type: Any
SP_SUBSELECT_NYI = ... # type: Any
STMT_NOT_ALLOWED_IN_SF_OR_TRG = ... # type: Any
SP_VARCOND_AFTER_CURSHNDLR = ... # type: Any
SP_CURSOR_AFTER_HANDLER = ... # type: Any
SP_CASE_NOT_FOUND = ... # type: Any
FPARSER_TOO_BIG_FILE = ... # type: Any
FPARSER_BAD_HEADER = ... # type: Any
FPARSER_EOF_IN_COMMENT = ... # type: Any
FPARSER_ERROR_IN_PARAMETER = ... # type: Any
FPARSER_EOF_IN_UNKNOWN_PARAMETER = ... # type: Any
VIEW_NO_EXPLAIN = ... # type: Any
FRM_UNKNOWN_TYPE = ... # type: Any
WRONG_OBJECT = ... # type: Any
NONUPDATEABLE_COLUMN = ... # type: Any
VIEW_SELECT_DERIVED = ... # type: Any
VIEW_SELECT_CLAUSE = ... # type: Any
VIEW_SELECT_VARIABLE = ... # type: Any
VIEW_SELECT_TMPTABLE = ... # type: Any
VIEW_WRONG_LIST = ... # type: Any
WARN_VIEW_MERGE = ... # type: Any
WARN_VIEW_WITHOUT_KEY = ... # type: Any
VIEW_INVALID = ... # type: Any
SP_NO_DROP_SP = ... # type: Any
SP_GOTO_IN_HNDLR = ... # type: Any
TRG_ALREADY_EXISTS = ... # type: Any
TRG_DOES_NOT_EXIST = ... # type: Any
TRG_ON_VIEW_OR_TEMP_TABLE = ... # type: Any
TRG_CANT_CHANGE_ROW = ... # type: Any
TRG_NO_SUCH_ROW_IN_TRG = ... # type: Any
NO_DEFAULT_FOR_FIELD = ... # type: Any
DIVISION_BY_ZERO = ... # type: Any
TRUNCATED_WRONG_VALUE_FOR_FIELD = ... # type: Any
ILLEGAL_VALUE_FOR_TYPE = ... # type: Any
VIEW_NONUPD_CHECK = ... # type: Any
VIEW_CHECK_FAILED = ... # type: Any
PROCACCESS_DENIED_ERROR = ... # type: Any
RELAY_LOG_FAIL = ... # type: Any
PASSWD_LENGTH = ... # type: Any
UNKNOWN_TARGET_BINLOG = ... # type: Any
IO_ERR_LOG_INDEX_READ = ... # type: Any
BINLOG_PURGE_PROHIBITED = ... # type: Any
FSEEK_FAIL = ... # type: Any
BINLOG_PURGE_FATAL_ERR = ... # type: Any
LOG_IN_USE = ... # type: Any
LOG_PURGE_UNKNOWN_ERR = ... # type: Any
RELAY_LOG_INIT = ... # type: Any
NO_BINARY_LOGGING = ... # type: Any
RESERVED_SYNTAX = ... # type: Any
WSAS_FAILED = ... # type: Any
DIFF_GROUPS_PROC = ... # type: Any
NO_GROUP_FOR_PROC = ... # type: Any
ORDER_WITH_PROC = ... # type: Any
LOGGING_PROHIBIT_CHANGING_OF = ... # type: Any
NO_FILE_MAPPING = ... # type: Any
WRONG_MAGIC = ... # type: Any
PS_MANY_PARAM = ... # type: Any
KEY_PART_0 = ... # type: Any
VIEW_CHECKSUM = ... # type: Any
VIEW_MULTIUPDATE = ... # type: Any
VIEW_NO_INSERT_FIELD_LIST = ... # type: Any
VIEW_DELETE_MERGE_VIEW = ... # type: Any
CANNOT_USER = ... # type: Any
XAER_NOTA = ... # type: Any
XAER_INVAL = ... # type: Any
XAER_RMFAIL = ... # type: Any
XAER_OUTSIDE = ... # type: Any
XAER_RMERR = ... # type: Any
XA_RBROLLBACK = ... # type: Any
NONEXISTING_PROC_GRANT = ... # type: Any
PROC_AUTO_GRANT_FAIL = ... # type: Any
PROC_AUTO_REVOKE_FAIL = ... # type: Any
DATA_TOO_LONG = ... # type: Any
SP_BAD_SQLSTATE = ... # type: Any
STARTUP = ... # type: Any
LOAD_FROM_FIXED_SIZE_ROWS_TO_VAR = ... # type: Any
CANT_CREATE_USER_WITH_GRANT = ... # type: Any
WRONG_VALUE_FOR_TYPE = ... # type: Any
TABLE_DEF_CHANGED = ... # type: Any
SP_DUP_HANDLER = ... # type: Any
SP_NOT_VAR_ARG = ... # type: Any
SP_NO_RETSET = ... # type: Any
CANT_CREATE_GEOMETRY_OBJECT = ... # type: Any
FAILED_ROUTINE_BREAK_BINLOG = ... # type: Any
BINLOG_UNSAFE_ROUTINE = ... # type: Any
BINLOG_CREATE_ROUTINE_NEED_SUPER = ... # type: Any
EXEC_STMT_WITH_OPEN_CURSOR = ... # type: Any
STMT_HAS_NO_OPEN_CURSOR = ... # type: Any
COMMIT_NOT_ALLOWED_IN_SF_OR_TRG = ... # type: Any
NO_DEFAULT_FOR_VIEW_FIELD = ... # type: Any
SP_NO_RECURSION = ... # type: Any
TOO_BIG_SCALE = ... # type: Any
TOO_BIG_PRECISION = ... # type: Any
M_BIGGER_THAN_D = ... # type: Any
WRONG_LOCK_OF_SYSTEM_TABLE = ... # type: Any
CONNECT_TO_FOREIGN_DATA_SOURCE = ... # type: Any
QUERY_ON_FOREIGN_DATA_SOURCE = ... # type: Any
FOREIGN_DATA_SOURCE_DOESNT_EXIST = ... # type: Any
FOREIGN_DATA_STRING_INVALID_CANT_CREATE = ... # type: Any
FOREIGN_DATA_STRING_INVALID = ... # type: Any
CANT_CREATE_FEDERATED_TABLE = ... # type: Any
TRG_IN_WRONG_SCHEMA = ... # type: Any
STACK_OVERRUN_NEED_MORE = ... # type: Any
TOO_LONG_BODY = ... # type: Any
WARN_CANT_DROP_DEFAULT_KEYCACHE = ... # type: Any
TOO_BIG_DISPLAYWIDTH = ... # type: Any
XAER_DUPID = ... # type: Any
DATETIME_FUNCTION_OVERFLOW = ... # type: Any
CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG = ... # type: Any
VIEW_PREVENT_UPDATE = ... # type: Any
PS_NO_RECURSION = ... # type: Any
SP_CANT_SET_AUTOCOMMIT = ... # type: Any
MALFORMED_DEFINER = ... # type: Any
VIEW_FRM_NO_USER = ... # type: Any
VIEW_OTHER_USER = ... # type: Any
NO_SUCH_USER = ... # type: Any
FORBID_SCHEMA_CHANGE = ... # type: Any
ROW_IS_REFERENCED_2 = ... # type: Any
NO_REFERENCED_ROW_2 = ... # type: Any
SP_BAD_VAR_SHADOW = ... # type: Any
TRG_NO_DEFINER = ... # type: Any
OLD_FILE_FORMAT = ... # type: Any
SP_RECURSION_LIMIT = ... # type: Any
SP_PROC_TABLE_CORRUPT = ... # type: Any
SP_WRONG_NAME = ... # type: Any
TABLE_NEEDS_UPGRADE = ... # type: Any
SP_NO_AGGREGATE = ... # type: Any
MAX_PREPARED_STMT_COUNT_REACHED = ... # type: Any
VIEW_RECURSIVE = ... # type: Any
NON_GROUPING_FIELD_USED = ... # type: Any
TABLE_CANT_HANDLE_SPKEYS = ... # type: Any
NO_TRIGGERS_ON_SYSTEM_SCHEMA = ... # type: Any
USERNAME = ... # type: Any
HOSTNAME = ... # type: Any
WRONG_STRING_LENGTH = ... # type: Any
ERROR_LAST = ... # type: Any

View File

@@ -0,0 +1,35 @@
# Stubs for pymysql.constants.FIELD_TYPE (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
DECIMAL = ... # type: Any
TINY = ... # type: Any
SHORT = ... # type: Any
LONG = ... # type: Any
FLOAT = ... # type: Any
DOUBLE = ... # type: Any
NULL = ... # type: Any
TIMESTAMP = ... # type: Any
LONGLONG = ... # type: Any
INT24 = ... # type: Any
DATE = ... # type: Any
TIME = ... # type: Any
DATETIME = ... # type: Any
YEAR = ... # type: Any
NEWDATE = ... # type: Any
VARCHAR = ... # type: Any
BIT = ... # type: Any
NEWDECIMAL = ... # type: Any
ENUM = ... # type: Any
SET = ... # type: Any
TINY_BLOB = ... # type: Any
MEDIUM_BLOB = ... # type: Any
LONG_BLOB = ... # type: Any
BLOB = ... # type: Any
VAR_STRING = ... # type: Any
STRING = ... # type: Any
GEOMETRY = ... # type: Any
CHAR = ... # type: Any
INTERVAL = ... # type: Any

View File

@@ -0,0 +1,21 @@
# Stubs for pymysql.constants.FLAG (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
NOT_NULL = ... # type: Any
PRI_KEY = ... # type: Any
UNIQUE_KEY = ... # type: Any
MULTIPLE_KEY = ... # type: Any
BLOB = ... # type: Any
UNSIGNED = ... # type: Any
ZEROFILL = ... # type: Any
BINARY = ... # type: Any
ENUM = ... # type: Any
AUTO_INCREMENT = ... # type: Any
TIMESTAMP = ... # type: Any
SET = ... # type: Any
PART_KEY = ... # type: Any
GROUP = ... # type: Any
UNIQUE = ... # type: Any

View File

@@ -0,0 +1,16 @@
# Stubs for pymysql.constants.SERVER_STATUS (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
SERVER_STATUS_IN_TRANS = ... # type: Any
SERVER_STATUS_AUTOCOMMIT = ... # type: Any
SERVER_MORE_RESULTS_EXISTS = ... # type: Any
SERVER_QUERY_NO_GOOD_INDEX_USED = ... # type: Any
SERVER_QUERY_NO_INDEX_USED = ... # type: Any
SERVER_STATUS_CURSOR_EXISTS = ... # type: Any
SERVER_STATUS_LAST_ROW_SENT = ... # type: Any
SERVER_STATUS_DB_DROPPED = ... # type: Any
SERVER_STATUS_NO_BACKSLASH_ESCAPES = ... # type: Any
SERVER_STATUS_METADATA_CHANGED = ... # type: Any

View File

@@ -0,0 +1,3 @@
# Stubs for pymysql.constants (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

View File

@@ -0,0 +1,50 @@
# Stubs for pymysql.converters (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
from .constants import FIELD_TYPE as FIELD_TYPE, FLAG as FLAG
from .charset import charset_by_id as charset_by_id
PYTHON3 = ... # type: Any
ESCAPE_REGEX = ... # type: Any
ESCAPE_MAP = ... # type: Any
def escape_item(val, charset): ...
def escape_dict(val, charset): ...
def escape_sequence(val, charset): ...
def escape_set(val, charset): ...
def escape_bool(value): ...
def escape_object(value): ...
escape_int = ... # type: Any
escape_long = ... # type: Any
def escape_float(value): ...
def escape_string(value): ...
def escape_unicode(value): ...
def escape_None(value): ...
def escape_timedelta(obj): ...
def escape_time(obj): ...
def escape_datetime(obj): ...
def escape_date(obj): ...
def escape_struct_time(obj): ...
def convert_datetime(connection, field, obj): ...
def convert_timedelta(connection, field, obj): ...
def convert_time(connection, field, obj): ...
def convert_date(connection, field, obj): ...
def convert_mysql_timestamp(connection, field, timestamp): ...
def convert_set(s): ...
def convert_bit(connection, field, b): ...
def convert_characters(connection, field, data): ...
def convert_int(connection, field, data): ...
def convert_long(connection, field, data): ...
def convert_float(connection, field, data): ...
encoders = ... # type: Any
decoders = ... # type: Any
conversions = ... # type: Any
def convert_decimal(connection, field, data): ...
def escape_decimal(obj): ...

37
third_party/2and3/pymysql/cursors.pyi vendored Normal file
View File

@@ -0,0 +1,37 @@
# Stubs for pymysql.cursors (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Union, Tuple, Any, Dict, Optional, Text
from .connections import Connection
Gen = Union[Tuple[Any, ...], Dict[str, Any]]
class Cursor:
connection = ... # type: Connection
description = ... # type: Tuple[Text, ...]
rownumber = ... # type: int
rowcount = ... # type: int
arraysize = ... # type: int
messages = ... # type: Any
errorhandler = ... # type: Any
lastrowid = ... # type: int
def __init__(self, connection: Connection) -> None: ...
def __del__(self) -> None: ...
def close(self) -> None: ...
def setinputsizes(self, *args): ...
def setoutputsizes(self, *args): ...
def nextset(self): ...
def execute(self, query: str, args=None) -> int: ...
def executemany(self, query: str, args) -> int: ...
def callproc(self, procname, args=...): ...
def fetchone(self) -> Optional[Gen]: ...
def fetchmany(self, size: int = None) -> Optional[Gen]: ...
def fetchall(self) -> Optional[Tuple[Gen, ...]]: ...
def scroll(self, value, mode=''): ...
def __iter__(self): ...
class DictCursor(Cursor):
def fetchone(self) -> Optional[Dict[str, Any]]: ...
def fetchmany(self, size=None) -> Optional[Tuple[Dict[str, Any], ...]]: ...
def fetchall(self) -> Optional[Tuple[Dict[str, Any], ...]]: ...

22
third_party/2and3/pymysql/err.pyi vendored Normal file
View File

@@ -0,0 +1,22 @@
# Stubs for pymysql.err (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Dict
from .constants import ER as ER
class MySQLError(Exception): ...
class Warning(MySQLError): ...
class Error(MySQLError): ...
class InterfaceError(Error): ...
class DatabaseError(Error): ...
class DataError(DatabaseError): ...
class OperationalError(DatabaseError): ...
class IntegrityError(DatabaseError): ...
class InternalError(DatabaseError): ...
class ProgrammingError(DatabaseError): ...
class NotSupportedError(DatabaseError): ...
error_map = ... # type: Dict
def raise_mysql_exception(data) -> None: ...

14
third_party/2and3/pymysql/times.pyi vendored Normal file
View File

@@ -0,0 +1,14 @@
# Stubs for pymysql.times (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
Date = ... # type: Any
Time = ... # type: Any
TimeDelta = ... # type: Any
Timestamp = ... # type: Any
def DateFromTicks(ticks): ...
def TimeFromTicks(ticks): ...
def TimestampFromTicks(ticks): ...

7
third_party/2and3/pymysql/util.pyi vendored Normal file
View File

@@ -0,0 +1,7 @@
# Stubs for pymysql.util (Python 3.5)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
def byte2int(b): ...
def int2byte(i): ...
def join_bytes(bs): ...