diff --git a/.flake8 b/.flake8 index a011f30b4457..ee36a61d68ef 100644 --- a/.flake8 +++ b/.flake8 @@ -9,12 +9,15 @@ # 427 F811 redefinition # 356 E305 expected 2 blank lines +# Also ignored because stubs use a different style: +# E251 unexpected spaces around keyword / parameter equals + # Nice-to-haves ignored for now # 152 E128 continuation line under-indented for visual indent # 43 E127 continuation line over-indented for visual indent [flake8] -ignore = F401, F811, E127, E128, E301, E302, E305, E501, E701, E704, B303 +ignore = F401, F811, E127, E128, E301, E302, E305, E501, E701, E704, B303, E251 # We are checking with Python 3 but many of the stubs are Python 2 stubs. # A nice future improvement would be to provide separate .flake8 # configurations for Python 2 and Python 3 files. diff --git a/third_party/2and3/sqlalchemy/__init__.pyi b/third_party/2and3/sqlalchemy/__init__.pyi index 8d58e257929b..403b1c9b4cff 100644 --- a/third_party/2and3/sqlalchemy/__init__.pyi +++ b/third_party/2and3/sqlalchemy/__init__.pyi @@ -1,124 +1,149 @@ -# Stubs for sqlalchemy (Python 2) +# Stubs for sqlalchemy (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. from .sql import ( - alias, - and_, - asc, - between, - bindparam, - case, - cast, - collate, - column, - delete, - desc, - distinct, - except_, - except_all, - exists, - extract, - false, - func, - funcfilter, - insert, - intersect, - intersect_all, - join, - literal, - literal_column, - modifier, - not_, - null, - or_, - outerjoin, - outparam, - over, - select, - subquery, - table, - text, - true, - tuple_, - type_coerce, - union, - union_all, - update, + alias as alias, + all_ as all_, + and_ as and_, + any_ as any_, + asc as asc, + between as between, + bindparam as bindparam, + case as case, + cast as cast, + collate as collate, + column as column, + delete as delete, + desc as desc, + distinct as distinct, + except_ as except_, + except_all as except_all, + exists as exists, + extract as extract, + false as false, + func as func, + funcfilter as funcfilter, + insert as insert, + intersect as intersect, + intersect_all as intersect_all, + join as join, + lateral as lateral, + literal as literal, + literal_column as literal_column, + modifier as modifier, + not_ as not_, + null as null, + or_ as or_, + outerjoin as outerjoin, + outparam as outparam, + over as over, + select as select, + subquery as subquery, + table as table, + tablesample as tablesample, + text as text, + true as true, + tuple_ as tuple_, + type_coerce as type_coerce, + union as union, + union_all as union_all, + update as update, + within_group as within_group ) from .types import ( - BIGINT, - BINARY, - BLOB, - BOOLEAN, - BigInteger, - Binary, - Boolean, - CHAR, - CLOB, - DATE, - DATETIME, - DECIMAL, - Date, - DateTime, - Enum, - FLOAT, - Float, - INT, - INTEGER, - Integer, - Interval, - LargeBinary, - NCHAR, - NVARCHAR, - NUMERIC, - Numeric, - PickleType, - REAL, - SMALLINT, - SmallInteger, - String, - TEXT, - TIME, - TIMESTAMP, - Text, - Time, - TypeDecorator, - Unicode, - UnicodeText, - VARBINARY, - VARCHAR, + ARRAY as ARRAY, + BIGINT as BIGINT, + BINARY as BINARY, + BLOB as BLOB, + BOOLEAN as BOOLEAN, + BigInteger as BigInteger, + Binary as Binary, + Boolean as Boolean, + CHAR as CHAR, + CLOB as CLOB, + DATE as DATE, + DATETIME as DATETIME, + DECIMAL as DECIMAL, + Date as Date, + DateTime as DateTime, + Enum as Enum, + FLOAT as FLOAT, + Float as Float, + INT as INT, + INTEGER as INTEGER, + Integer as Integer, + Interval as Interval, + JSON as JSON, + LargeBinary as LargeBinary, + NCHAR as NCHAR, + NVARCHAR as NVARCHAR, + NUMERIC as NUMERIC, + Numeric as Numeric, + PickleType as PickleType, + REAL as REAL, + SMALLINT as SMALLINT, + SmallInteger as SmallInteger, + String as String, + TEXT as TEXT, + TIME as TIME, + TIMESTAMP as TIMESTAMP, + Text as Text, + Time as Time, + TypeDecorator as TypeDecorator, + Unicode as Unicode, + UnicodeText as UnicodeText, + VARBINARY as VARBINARY, + VARCHAR as VARCHAR ) from .schema import ( - CheckConstraint, - Column, - ColumnDefault, - Constraint, - DefaultClause, - FetchedValue, - ForeignKey, - ForeignKeyConstraint, - Index, - MetaData, - PassiveDefault, - PrimaryKeyConstraint, - Sequence, - Table, - ThreadLocalMetaData, - UniqueConstraint, - DDL, + CheckConstraint as CheckConstraint, + Column as Column, + ColumnDefault as ColumnDefault, + Constraint as Constraint, + DefaultClause as DefaultClause, + FetchedValue as FetchedValue, + ForeignKey as ForeignKey, + ForeignKeyConstraint as ForeignKeyConstraint, + Index as Index, + MetaData as MetaData, + PassiveDefault as PassiveDefault, + PrimaryKeyConstraint as PrimaryKeyConstraint, + Sequence as Sequence, + Table as Table, + ThreadLocalMetaData as ThreadLocalMetaData, + UniqueConstraint as UniqueConstraint, + DDL as DDL, + BLANK_SCHEMA as BLANK_SCHEMA ) +from .inspection import inspect as inspect + +from .engine import ( + create_engine as create_engine, + engine_from_config as engine_from_config +) + +from . import connectors as connectors +from . import databases as databases +from . import dialects as dialects +from . import engine as engine +from . import event as event +from . import ext as ext +from . import orm as orm from . import sql as sql -from . import schema as schema -from . import types as types +from . import util as util +from . import cprocessors as cprocessors +from . import cresultproxy as cresultproxy +from . import cutils as cutils +from . import events as events from . import exc as exc -from . import dialects as dialects +from . import inspection as inspection +from . import interfaces as interfaces +from . import log as log from . import pool as pool -# This should re-export orm but orm is totally broken right now -# from . import orm as orm - -from .inspection import inspect -from .engine import create_engine, engine_from_config - -__version__ = ... # type: int +from . import processors as processors +from . import schema as schema +from . import types as types diff --git a/third_party/2and3/sqlalchemy/connectors/__init__.pyi b/third_party/2and3/sqlalchemy/connectors/__init__.pyi new file mode 100644 index 000000000000..3141ed78c9b2 --- /dev/null +++ b/third_party/2and3/sqlalchemy/connectors/__init__.pyi @@ -0,0 +1,9 @@ +# Stubs for sqlalchemy.connectors (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from . import mxodbc as mxodbc +from . import pyodbc as pyodbc +from . import zxJDBC as zxJDBC + +class Connector(object): ... diff --git a/third_party/2and3/sqlalchemy/connectors/mxodbc.pyi b/third_party/2and3/sqlalchemy/connectors/mxodbc.pyi new file mode 100644 index 000000000000..e476e8bf95a5 --- /dev/null +++ b/third_party/2and3/sqlalchemy/connectors/mxodbc.pyi @@ -0,0 +1,20 @@ +# Stubs for sqlalchemy.connectors.mxodbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from . import Connector + +class MxODBCConnector(Connector): + driver = ... # type: str + supports_sane_multi_rowcount = ... # type: bool + supports_unicode_statements = ... # type: bool + supports_unicode_binds = ... # type: bool + supports_native_decimal = ... # type: bool + @classmethod + def dbapi(cls): ... + def on_connect(self): ... + def create_connect_args(self, url): ... + def is_disconnect(self, e, connection, cursor): ... + def do_executemany(self, cursor, statement, parameters, context: Optional[Any] = ...): ... + def do_execute(self, cursor, statement, parameters, context: Optional[Any] = ...): ... diff --git a/third_party/2and3/sqlalchemy/connectors/pyodbc.pyi b/third_party/2and3/sqlalchemy/connectors/pyodbc.pyi new file mode 100644 index 000000000000..1e37a552f595 --- /dev/null +++ b/third_party/2and3/sqlalchemy/connectors/pyodbc.pyi @@ -0,0 +1,25 @@ +# Stubs for sqlalchemy.connectors.pyodbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from . import Connector + +class PyODBCConnector(Connector): + driver = ... # type: str + supports_sane_multi_rowcount = ... # type: bool + supports_unicode = ... # type: Any + supports_unicode_statements = ... # type: Any + supports_native_decimal = ... # type: bool + default_paramstyle = ... # type: str + pyodbc_driver_name = ... # type: Any + freetds = ... # type: bool + freetds_driver_version = ... # type: Any + easysoft = ... # type: bool + def __init__(self, supports_unicode_binds: Optional[Any] = ..., **kw) -> None: ... + @classmethod + def dbapi(cls): ... + def create_connect_args(self, url): ... + def is_disconnect(self, e, connection, cursor): ... + supports_unicode_binds = ... # type: Any + def initialize(self, connection): ... diff --git a/third_party/2and3/sqlalchemy/connectors/zxJDBC.pyi b/third_party/2and3/sqlalchemy/connectors/zxJDBC.pyi new file mode 100644 index 000000000000..d647608e721a --- /dev/null +++ b/third_party/2and3/sqlalchemy/connectors/zxJDBC.pyi @@ -0,0 +1,21 @@ +# Stubs for sqlalchemy.connectors.zxJDBC (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from . import Connector + +class ZxJDBCConnector(Connector): + driver = ... # type: str + supports_sane_rowcount = ... # type: bool + supports_sane_multi_rowcount = ... # type: bool + supports_unicode_binds = ... # type: bool + supports_unicode_statements = ... # type: Any + description_encoding = ... # type: Any + default_paramstyle = ... # type: str + jdbc_db_name = ... # type: Any + jdbc_driver_name = ... # type: Any + @classmethod + def dbapi(cls): ... + def create_connect_args(self, url): ... + def is_disconnect(self, e, connection, cursor): ... diff --git a/third_party/2and3/sqlalchemy/cprocessors.pyi b/third_party/2and3/sqlalchemy/cprocessors.pyi new file mode 100644 index 000000000000..eaa758d943f5 --- /dev/null +++ b/third_party/2and3/sqlalchemy/cprocessors.pyi @@ -0,0 +1,19 @@ +# Stubs for sqlalchemy.cprocessors (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +def int_to_boolean(*args, **kwargs): ... +def str_to_date(*args, **kwargs): ... +def str_to_datetime(*args, **kwargs): ... +def str_to_time(*args, **kwargs): ... +def to_float(*args, **kwargs): ... +def to_str(*args, **kwargs): ... + +class DecimalResultProcessor(object): + def __init__(self, *args, **kwargs): ... + def process(self, *args, **kwargs): ... + +class UnicodeResultProcessor(object): + def __init__(self, *args, **kwargs): ... + def conditional_process(self, *args, **kwargs): ... + def process(self, *args, **kwargs): ... diff --git a/third_party/2and3/sqlalchemy/cresultproxy.pyi b/third_party/2and3/sqlalchemy/cresultproxy.pyi new file mode 100644 index 000000000000..3781b6eac344 --- /dev/null +++ b/third_party/2and3/sqlalchemy/cresultproxy.pyi @@ -0,0 +1,19 @@ +# Stubs for sqlalchemy.cresultproxy (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any + +def safe_rowproxy_reconstructor(*args, **kwargs): ... + +class BaseRowProxy(object): + _keymap = ... # type: Any + _parent = ... # type: Any + _processors = ... # type: Any + _row = ... # type: Any + def __init__(self, *args, **kwargs): ... + def values(self, *args, **kwargs): ... + def __getitem__(self, index): ... + def __iter__(self): ... + def __len__(self, *args, **kwargs): ... + def __reduce__(self): ... diff --git a/third_party/2and3/sqlalchemy/cutils.pyi b/third_party/2and3/sqlalchemy/cutils.pyi new file mode 100644 index 000000000000..1608e5ca399d --- /dev/null +++ b/third_party/2and3/sqlalchemy/cutils.pyi @@ -0,0 +1,5 @@ +# Stubs for sqlalchemy.cutils (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +def _distill_params(*args, **kwargs): ... diff --git a/third_party/2and3/sqlalchemy/databases/__init__.pyi b/third_party/2and3/sqlalchemy/databases/__init__.pyi index b1ac4a4d18a3..ed4e6b9fdc3e 100644 --- a/third_party/2and3/sqlalchemy/databases/__init__.pyi +++ b/third_party/2and3/sqlalchemy/databases/__init__.pyi @@ -1,7 +1,15 @@ -# Stubs for sqlalchemy.databases (Python 2) +# Stubs for sqlalchemy.databases (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. +from ..dialects.sqlite import base as sqlite +from ..dialects.postgresql import base as postgresql +from ..dialects.mysql import base as mysql +from ..dialects.oracle import base as oracle +from ..dialects.firebird import base as firebird +from ..dialects.mssql import base as mssql +from ..dialects.sybase import base as sybase + # Names in __all__ with no definition: # firebird # mssql diff --git a/third_party/2and3/sqlalchemy/dialects/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/__init__.pyi index 2d261de1b9ff..7408c700e89b 100644 --- a/third_party/2and3/sqlalchemy/dialects/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/__init__.pyi @@ -1,12 +1,9 @@ -# Stubs for sqlalchemy.dialects (Python 2) +# Stubs for sqlalchemy.dialects (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -# Names in __all__ with no definition: -# firebird -# mssql -# mysql -# oracle -# postgresql -# sqlite -# sybase +from . import firebird as firebird, mssql as mssql, mysql as mysql, oracle as oracle, postgresql as postgresql, sqlite as sqlite, sybase as sybase +from .. import util + +registry = ... # type: util.PluginLoader +plugins = ... # type: util.PluginLoader diff --git a/third_party/2and3/sqlalchemy/dialects/firebird/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/firebird/__init__.pyi new file mode 100644 index 000000000000..286593244f66 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/firebird/__init__.pyi @@ -0,0 +1,5 @@ +# Stubs for sqlalchemy.dialects.firebird (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from sqlalchemy.dialects.firebird.base import SMALLINT as SMALLINT, BIGINT as BIGINT, FLOAT as FLOAT, FLOAT as FLOAT, DATE as DATE, TIME as TIME, TEXT as TEXT, NUMERIC as NUMERIC, FLOAT as FLOAT, TIMESTAMP as TIMESTAMP, VARCHAR as VARCHAR, CHAR as CHAR, BLOB as BLOB diff --git a/third_party/2and3/sqlalchemy/dialects/firebird/base.pyi b/third_party/2and3/sqlalchemy/dialects/firebird/base.pyi new file mode 100644 index 000000000000..e9b74b2c4430 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/firebird/base.pyi @@ -0,0 +1,103 @@ +# Stubs for sqlalchemy.dialects.firebird.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from sqlalchemy import sql +from sqlalchemy.sql import compiler +from sqlalchemy.engine import default +from sqlalchemy import schema as sa_schema +from sqlalchemy import types as sqltypes + +from sqlalchemy.types import (BIGINT as BIGINT, BLOB as BLOB, DATE as DATE, FLOAT as FLOAT, INTEGER as INTEGER, NUMERIC as NUMERIC, + SMALLINT as SMALLINT, TEXT as TEXT, TIME as TIME, TIMESTAMP as TIMESTAMP, Integer as Integer) + +RESERVED_WORDS = ... # type: Any + +class _StringType(sqltypes.String): + charset = ... # type: Any + def __init__(self, charset: Optional[Any] = ..., **kw) -> None: ... + +class VARCHAR(_StringType, sqltypes.VARCHAR): + __visit_name__ = ... # type: str + def __init__(self, length: Optional[Any] = ..., **kwargs) -> None: ... + +class CHAR(_StringType, sqltypes.CHAR): + __visit_name__ = ... # type: str + def __init__(self, length: Optional[Any] = ..., **kwargs) -> None: ... + +class _FBDateTime(sqltypes.DateTime): + def bind_processor(self, dialect): ... + +colspecs = ... # type: Any +ischema_names = ... # type: Any + +class FBTypeCompiler(compiler.GenericTypeCompiler): + def visit_boolean(self, type_, **kw): ... + def visit_datetime(self, type_, **kw): ... + def visit_TEXT(self, type_, **kw): ... + def visit_BLOB(self, type_, **kw): ... + def visit_CHAR(self, type_, **kw): ... + def visit_VARCHAR(self, type_, **kw): ... + +class FBCompiler(sql.compiler.SQLCompiler): + ansi_bind_rules = ... # type: bool + def visit_now_func(self, fn, **kw): ... + def visit_startswith_op_binary(self, binary, operator, **kw): ... + def visit_notstartswith_op_binary(self, binary, operator, **kw): ... + def visit_mod_binary(self, binary, operator, **kw): ... + def visit_alias(self, *args, **kwargs): ... + def visit_substring_func(self, func, **kw): ... + def visit_length_func(self, function, **kw): ... + visit_char_length_func = ... # type: Any + def function_argspec(self, func, **kw): ... + def default_from(self): ... + def visit_sequence(self, seq): ... + def get_select_precolumns(self, select, **kw): ... + def limit_clause(self, select, **kw): ... + def returning_clause(self, stmt, returning_cols): ... + +class FBDDLCompiler(sql.compiler.DDLCompiler): + def visit_create_sequence(self, create): ... + def visit_drop_sequence(self, drop): ... + +class FBIdentifierPreparer(sql.compiler.IdentifierPreparer): + reserved_words = ... # type: Any + illegal_initial_characters = ... # type: Any + def __init__(self, dialect) -> None: ... + +class FBExecutionContext(default.DefaultExecutionContext): + def fire_sequence(self, seq, type_): ... + +class FBDialect(default.DefaultDialect): + name = ... # type: str + max_identifier_length = ... # type: int + supports_sequences = ... # type: bool + sequences_optional = ... # type: bool + supports_default_values = ... # type: bool + postfetch_lastrowid = ... # type: bool + supports_native_boolean = ... # type: bool + requires_name_normalize = ... # type: bool + supports_empty_insert = ... # type: bool + statement_compiler = ... # type: Any + ddl_compiler = ... # type: Any + preparer = ... # type: Any + type_compiler = ... # type: Any + execution_ctx_cls = ... # type: Any + colspecs = ... # type: Any + ischema_names = ... # type: Any + construct_arguments = ... # type: Any + implicit_returning = ... # type: Any + def initialize(self, connection): ... + def normalize_name(self, name): ... + def denormalize_name(self, name): ... + def has_table(self, connection, table_name, schema: Optional[Any] = ...): ... + def has_sequence(self, connection, sequence_name, schema: Optional[Any] = ...): ... + def get_table_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_view_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_view_definition(self, connection, view_name, schema: Optional[Any] = ..., **kw): ... + def get_pk_constraint(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_column_sequence(self, connection, table_name, column_name, schema: Optional[Any] = ..., **kw): ... + def get_columns(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_foreign_keys(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_indexes(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... diff --git a/third_party/2and3/sqlalchemy/dialects/firebird/fdb.pyi b/third_party/2and3/sqlalchemy/dialects/firebird/fdb.pyi new file mode 100644 index 000000000000..6b09ff41808e --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/firebird/fdb.pyi @@ -0,0 +1,14 @@ +# Stubs for sqlalchemy.dialects.firebird.fdb (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .kinterbasdb import FBDialect_kinterbasdb as FBDialect_kinterbasdb + +class FBDialect_fdb(FBDialect_kinterbasdb): + def __init__(self, enable_rowcount: bool = ..., retaining: bool = ..., **kwargs) -> None: ... + @classmethod + def dbapi(cls): ... + def create_connect_args(self, url): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi b/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi new file mode 100644 index 000000000000..41bd938f303a --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi @@ -0,0 +1,39 @@ +# Stubs for sqlalchemy.dialects.firebird.kinterbasdb (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .base import FBDialect as FBDialect, FBExecutionContext as FBExecutionContext +from ... import types as sqltypes + +class _kinterbasdb_numeric(object): + def bind_processor(self, dialect): ... + +class _FBNumeric_kinterbasdb(_kinterbasdb_numeric, sqltypes.Numeric): ... +class _FBFloat_kinterbasdb(_kinterbasdb_numeric, sqltypes.Float): ... + +class FBExecutionContext_kinterbasdb(FBExecutionContext): + @property + def rowcount(self): ... + +class FBDialect_kinterbasdb(FBDialect): + driver = ... # type: str + supports_sane_rowcount = ... # type: bool + supports_sane_multi_rowcount = ... # type: bool + execution_ctx_cls = ... # type: Any + supports_native_decimal = ... # type: bool + colspecs = ... # type: Any + enable_rowcount = ... # type: Any + type_conv = ... # type: Any + concurrency_level = ... # type: Any + retaining = ... # type: Any + def __init__(self, type_conv: int = ..., concurrency_level: int = ..., enable_rowcount: bool = ..., retaining: bool = ..., **kwargs) -> None: ... + @classmethod + def dbapi(cls): ... + def do_execute(self, cursor, statement, parameters, context: Optional[Any] = ...): ... + def do_rollback(self, dbapi_connection): ... + def do_commit(self, dbapi_connection): ... + def create_connect_args(self, url): ... + def is_disconnect(self, e, connection, cursor): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/__init__.pyi new file mode 100644 index 000000000000..36c7232df0b9 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mssql/__init__.pyi @@ -0,0 +1,5 @@ +# Stubs for sqlalchemy.dialects.mssql (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from sqlalchemy.dialects.mssql.base import INTEGER as INTEGER, BIGINT as BIGINT, SMALLINT as SMALLINT, TINYINT as TINYINT, VARCHAR as VARCHAR, NVARCHAR as NVARCHAR, CHAR as CHAR, NCHAR as NCHAR, TEXT as TEXT, NTEXT as NTEXT, DECIMAL as DECIMAL, NUMERIC as NUMERIC, FLOAT as FLOAT, DATETIME as DATETIME, DATETIME2 as DATETIME2, DATETIMEOFFSET as DATETIMEOFFSET, DATE as DATE, TIME as TIME, SMALLDATETIME as SMALLDATETIME, BINARY as BINARY, VARBINARY as VARBINARY, BIT as BIT, REAL as REAL, IMAGE as IMAGE, TIMESTAMP as TIMESTAMP, MONEY as MONEY, SMALLMONEY as SMALLMONEY, UNIQUEIDENTIFIER as UNIQUEIDENTIFIER, SQL_VARIANT as SQL_VARIANT diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/adodbapi.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/adodbapi.pyi new file mode 100644 index 000000000000..5a80ca0e3fb2 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mssql/adodbapi.pyi @@ -0,0 +1,24 @@ +# Stubs for sqlalchemy.dialects.mssql.adodbapi (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from sqlalchemy import types as sqltypes +from sqlalchemy.dialects.mssql.base import MSDateTime, MSDialect + +class MSDateTime_adodbapi(MSDateTime): + def result_processor(self, dialect, coltype): ... + +class MSDialect_adodbapi(MSDialect): + supports_sane_rowcount = ... # type: bool + supports_sane_multi_rowcount = ... # type: bool + supports_unicode = ... # type: Any + supports_unicode_statements = ... # type: bool + driver = ... # type: str + @classmethod + def import_dbapi(cls): ... + colspecs = ... # type: Any + def create_connect_args(self, url): ... + def is_disconnect(self, e, connection, cursor): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/base.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/base.pyi new file mode 100644 index 000000000000..770f16353dd3 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mssql/base.pyi @@ -0,0 +1,235 @@ +# Stubs for sqlalchemy.dialects.mssql.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from sqlalchemy.sql import compiler +from ... import schema as sa_schema +from ...sql import compiler as compiler, expression as expression +from ...sql import util as sql_util +from ...engine import reflection as reflection, default as default +from ... import types as sqltypes +from ...types import INTEGER as INTEGER, BIGINT as BIGINT, SMALLINT as SMALLINT, DECIMAL as DECIMAL, NUMERIC as NUMERIC, FLOAT as FLOAT, TIMESTAMP as TIMESTAMP, DATETIME as DATETIME, DATE as DATE, BINARY as BINARY, TEXT as TEXT, VARCHAR as VARCHAR, NVARCHAR as NVARCHAR, CHAR as CHAR, NCHAR as NCHAR +from . import information_schema as ischema + +MS_2016_VERSION = ... # type: Any +MS_2014_VERSION = ... # type: Any +MS_2012_VERSION = ... # type: Any +MS_2008_VERSION = ... # type: Any +MS_2005_VERSION = ... # type: Any +MS_2000_VERSION = ... # type: Any +RESERVED_WORDS = ... # type: Any + +class REAL(sqltypes.REAL): + __visit_name__ = ... # type: str + def __init__(self, **kw) -> None: ... + +class TINYINT(sqltypes.Integer): + __visit_name__ = ... # type: str + +class _MSDate(sqltypes.Date): + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class TIME(sqltypes.TIME): + precision = ... # type: Any + def __init__(self, precision: Optional[Any] = ..., **kwargs) -> None: ... + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +_MSTime = TIME + +class _DateTimeBase(object): + def bind_processor(self, dialect): ... + +class _MSDateTime(_DateTimeBase, sqltypes.DateTime): ... + +class SMALLDATETIME(_DateTimeBase, sqltypes.DateTime): + __visit_name__ = ... # type: str + +class DATETIME2(_DateTimeBase, sqltypes.DateTime): + __visit_name__ = ... # type: str + precision = ... # type: Any + def __init__(self, precision: Optional[Any] = ..., **kw) -> None: ... + +class DATETIMEOFFSET(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + precision = ... # type: Any + def __init__(self, precision: Optional[Any] = ..., **kwargs) -> None: ... + +class _StringType(object): + def __init__(self, collation: Optional[Any] = ...) -> None: ... + +class NTEXT(sqltypes.UnicodeText): + __visit_name__ = ... # type: str + +class VARBINARY(sqltypes.VARBINARY, sqltypes.LargeBinary): + __visit_name__ = ... # type: str + +class IMAGE(sqltypes.LargeBinary): + __visit_name__ = ... # type: str + +class BIT(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class MONEY(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class SMALLMONEY(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class UNIQUEIDENTIFIER(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class SQL_VARIANT(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +MSDateTime = ... # type: Any +MSDate = ... # type: Any +MSReal = ... # type: Any +MSTinyInteger = ... # type: Any +MSTime = ... # type: Any +MSSmallDateTime = ... # type: Any +MSDateTime2 = ... # type: Any +MSDateTimeOffset = ... # type: Any +MSText = ... # type: Any +MSNText = ... # type: Any +MSString = ... # type: Any +MSNVarchar = ... # type: Any +MSChar = ... # type: Any +MSNChar = ... # type: Any +MSBinary = ... # type: Any +MSVarBinary = ... # type: Any +MSImage = ... # type: Any +MSBit = ... # type: Any +MSMoney = ... # type: Any +MSSmallMoney = ... # type: Any +MSUniqueIdentifier = ... # type: Any +MSVariant = ... # type: Any +ischema_names = ... # type: Any + +class MSTypeCompiler(compiler.GenericTypeCompiler): + def visit_FLOAT(self, type_, **kw): ... + def visit_TINYINT(self, type_, **kw): ... + def visit_DATETIMEOFFSET(self, type_, **kw): ... + def visit_TIME(self, type_, **kw): ... + def visit_DATETIME2(self, type_, **kw): ... + def visit_SMALLDATETIME(self, type_, **kw): ... + def visit_unicode(self, type_, **kw): ... + def visit_text(self, type_, **kw): ... + def visit_unicode_text(self, type_, **kw): ... + def visit_NTEXT(self, type_, **kw): ... + def visit_TEXT(self, type_, **kw): ... + def visit_VARCHAR(self, type_, **kw): ... + def visit_CHAR(self, type_, **kw): ... + def visit_NCHAR(self, type_, **kw): ... + def visit_NVARCHAR(self, type_, **kw): ... + def visit_date(self, type_, **kw): ... + def visit_time(self, type_, **kw): ... + def visit_large_binary(self, type_, **kw): ... + def visit_IMAGE(self, type_, **kw): ... + def visit_VARBINARY(self, type_, **kw): ... + def visit_boolean(self, type_, **kw): ... + def visit_BIT(self, type_, **kw): ... + def visit_MONEY(self, type_, **kw): ... + def visit_SMALLMONEY(self, type_, **kw): ... + def visit_UNIQUEIDENTIFIER(self, type_, **kw): ... + def visit_SQL_VARIANT(self, type_, **kw): ... + +class MSExecutionContext(default.DefaultExecutionContext): + def pre_exec(self): ... + def post_exec(self): ... + def get_lastrowid(self): ... + def handle_dbapi_exception(self, e): ... + def get_result_proxy(self): ... + +class MSSQLCompiler(compiler.SQLCompiler): + returning_precedes_values = ... # type: bool + extract_map = ... # type: Any + tablealiases = ... # type: Any + def __init__(self, *args, **kwargs) -> None: ... + def visit_now_func(self, fn, **kw): ... + def visit_current_date_func(self, fn, **kw): ... + def visit_length_func(self, fn, **kw): ... + def visit_char_length_func(self, fn, **kw): ... + def visit_concat_op_binary(self, binary, operator, **kw): ... + def visit_true(self, expr, **kw): ... + def visit_false(self, expr, **kw): ... + def visit_match_op_binary(self, binary, operator, **kw): ... + def get_select_precolumns(self, select, **kw): ... + def get_from_hint_text(self, table, text): ... + def get_crud_hint_text(self, table, text): ... + def limit_clause(self, select, **kw): ... + def visit_select(self, select, **kwargs): ... + def visit_table(self, *args, **kwargs): ... + def visit_alias(self, alias, **kw): ... + def visit_column(self, *args, **kw): ... + def visit_extract(self, extract, **kw): ... + def visit_savepoint(self, savepoint_stmt): ... + def visit_rollback_to_savepoint(self, savepoint_stmt): ... + def visit_binary(self, binary, **kwargs): ... + def returning_clause(self, stmt, returning_cols): ... + def get_cte_preamble(self, recursive): ... + def label_select_column(self, select, column, asfrom): ... + def for_update_clause(self, select): ... + def order_by_clause(self, select, **kw): ... + def update_from_clause(self, update_stmt, from_table, extra_froms, from_hints, **kw): ... + +class MSSQLStrictCompiler(MSSQLCompiler): + ansi_bind_rules = ... # type: bool + def visit_in_op_binary(self, binary, operator, **kw): ... + def visit_notin_op_binary(self, binary, operator, **kw): ... + def render_literal_value(self, value, type_): ... + +class MSDDLCompiler(compiler.DDLCompiler): + def get_column_specification(self, column, **kwargs): ... + def visit_create_index(self, *args, **kwargs): ... + def visit_drop_index(self, drop): ... + def visit_primary_key_constraint(self, constraint): ... + def visit_unique_constraint(self, constraint): ... + +class MSIdentifierPreparer(compiler.IdentifierPreparer): + reserved_words = ... # type: Any + def __init__(self, dialect) -> None: ... + def quote_schema(self, schema, force: Optional[Any] = ...): ... + +class MSDialect(default.DefaultDialect): + name = ... # type: str + supports_default_values = ... # type: bool + supports_empty_insert = ... # type: bool + execution_ctx_cls = ... # type: Any + use_scope_identity = ... # type: bool + max_identifier_length = ... # type: int + schema_name = ... # type: str + colspecs = ... # type: Any + engine_config_types = ... # type: Any + ischema_names = ... # type: Any + supports_native_boolean = ... # type: bool + supports_unicode_binds = ... # type: bool + postfetch_lastrowid = ... # type: bool + server_version_info = ... # type: Any + statement_compiler = ... # type: Any + ddl_compiler = ... # type: Any + type_compiler = ... # type: Any + preparer = ... # type: Any + construct_arguments = ... # type: Any + query_timeout = ... # type: Any + deprecate_large_types = ... # type: Any + legacy_schema_aliasing = ... # type: Any + isolation_level = ... # type: Any + def __init__(self, query_timeout: Optional[Any] = ..., use_scope_identity: bool = ..., max_identifier_length: Optional[Any] = ..., schema_name: str = ..., isolation_level: Optional[Any] = ..., deprecate_large_types: Optional[Any] = ..., legacy_schema_aliasing: bool = ..., **opts) -> None: ... + def do_savepoint(self, connection, name): ... + def do_release_savepoint(self, connection, name): ... + def set_isolation_level(self, connection, level): ... + def get_isolation_level(self, connection): ... + def initialize(self, connection): ... + def on_connect(self): ... + def has_table(self, connection, tablename, dbname, owner, schema): ... + def get_schema_names(self, connection, **kw): ... + def get_table_names(self, connection, dbname, owner, schema, **kw): ... + def get_view_names(self, connection, dbname, owner, schema, **kw): ... + def get_indexes(self, connection, tablename, dbname, owner, schema, **kw): ... + def get_view_definition(self, connection, viewname, dbname, owner, schema, **kw): ... + def get_columns(self, connection, tablename, dbname, owner, schema, **kw): ... + def get_pk_constraint(self, connection, tablename, dbname, owner, schema, **kw): ... + def get_foreign_keys(self, connection, tablename, dbname, owner, schema, **kw): ... diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/information_schema.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/information_schema.pyi new file mode 100644 index 000000000000..4e20d673c6af --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mssql/information_schema.pyi @@ -0,0 +1,28 @@ +# Stubs for sqlalchemy.dialects.mssql.information_schema (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from ...types import String as String, Unicode as Unicode, UnicodeText as UnicodeText, Integer as Integer, TypeDecorator as TypeDecorator +from ...sql import expression as expression +from ...ext.compiler import compiles as compiles + +ischema = ... # type: Any + +class CoerceUnicode(TypeDecorator): + impl = ... # type: Any + def process_bind_param(self, value, dialect): ... + def bind_expression(self, bindvalue): ... + +class _cast_on_2005(expression.ColumnElement): + bindvalue = ... # type: Any + def __init__(self, bindvalue) -> None: ... + +schemata = ... # type: Any +tables = ... # type: Any +columns = ... # type: Any +constraints = ... # type: Any +column_constraints = ... # type: Any +key_constraints = ... # type: Any +ref_constraints = ... # type: Any +views = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/mxodbc.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/mxodbc.pyi new file mode 100644 index 000000000000..fd588d00cf7d --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mssql/mxodbc.pyi @@ -0,0 +1,30 @@ +# Stubs for sqlalchemy.dialects.mssql.mxodbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ... import types as sqltypes +from ...connectors.mxodbc import MxODBCConnector as MxODBCConnector +from .pyodbc import MSExecutionContext_pyodbc as MSExecutionContext_pyodbc, _MSNumeric_pyodbc as _MSNumeric_pyodbc +from .base import MSDialect as MSDialect, MSSQLStrictCompiler as MSSQLStrictCompiler, VARBINARY as VARBINARY, _MSDateTime as _MSDateTime, _MSDate as _MSDate, _MSTime as _MSTime + +class _MSNumeric_mxodbc(_MSNumeric_pyodbc): ... + +class _MSDate_mxodbc(_MSDate): + def bind_processor(self, dialect): ... + +class _MSTime_mxodbc(_MSTime): + def bind_processor(self, dialect): ... + +class _VARBINARY_mxodbc(VARBINARY): + def bind_processor(self, dialect): ... + +class MSExecutionContext_mxodbc(MSExecutionContext_pyodbc): ... + +class MSDialect_mxodbc(MxODBCConnector, MSDialect): + execution_ctx_cls = ... # type: Any + colspecs = ... # type: Any + description_encoding = ... # type: Any + def __init__(self, description_encoding: Optional[Any] = ..., **params) -> None: ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/pymssql.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/pymssql.pyi new file mode 100644 index 000000000000..aeaa55c937b7 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mssql/pymssql.pyi @@ -0,0 +1,23 @@ +# Stubs for sqlalchemy.dialects.mssql.pymssql (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .base import MSDialect as MSDialect +from ... import types as sqltypes + +class _MSNumeric_pymssql(sqltypes.Numeric): + def result_processor(self, dialect, type_): ... + +class MSDialect_pymssql(MSDialect): + supports_sane_rowcount = ... # type: bool + driver = ... # type: str + colspecs = ... # type: Any + @classmethod + def dbapi(cls): ... + use_scope_identity = ... # type: bool + def __init__(self, **params) -> None: ... + def create_connect_args(self, url): ... + def is_disconnect(self, e, connection, cursor): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi new file mode 100644 index 000000000000..2d65adfd4743 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi @@ -0,0 +1,30 @@ +# Stubs for sqlalchemy.dialects.mssql.pyodbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .base import MSExecutionContext as MSExecutionContext, MSDialect as MSDialect, VARBINARY as VARBINARY +from ...connectors.pyodbc import PyODBCConnector as PyODBCConnector +from ... import types as sqltypes + +class _ms_numeric_pyodbc(object): + def bind_processor(self, dialect): ... + +class _MSNumeric_pyodbc(_ms_numeric_pyodbc, sqltypes.Numeric): ... +class _MSFloat_pyodbc(_ms_numeric_pyodbc, sqltypes.Float): ... + +class _VARBINARY_pyodbc(VARBINARY): + def bind_processor(self, dialect): ... + +class MSExecutionContext_pyodbc(MSExecutionContext): + def pre_exec(self): ... + def post_exec(self): ... + +class MSDialect_pyodbc(PyODBCConnector, MSDialect): + execution_ctx_cls = ... # type: Any + colspecs = ... # type: Any + description_encoding = ... # type: Any + use_scope_identity = ... # type: Any + def __init__(self, description_encoding: Optional[Any] = ..., **params) -> None: ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/zxjdbc.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/zxjdbc.pyi new file mode 100644 index 000000000000..621e9debf625 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mssql/zxjdbc.pyi @@ -0,0 +1,18 @@ +# Stubs for sqlalchemy.dialects.mssql.zxjdbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from ...connectors.zxJDBC import ZxJDBCConnector as ZxJDBCConnector +from .base import MSDialect as MSDialect, MSExecutionContext as MSExecutionContext + +class MSExecutionContext_zxjdbc(MSExecutionContext): + def pre_exec(self): ... + def post_exec(self): ... + +class MSDialect_zxjdbc(ZxJDBCConnector, MSDialect): + jdbc_db_name = ... # type: str + jdbc_driver_name = ... # type: str + execution_ctx_cls = ... # type: Any + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/__init__.pyi index 5a0a4bf8b6a8..3652fa28cda5 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/__init__.pyi @@ -1,40 +1,42 @@ -# Stubs for sqlalchemy.dialects.mysql (Python 2) +# Stubs for sqlalchemy.dialects.mysql (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from . import base - -BIGINT = base.BIGINT -BINARY = base.BINARY -BIT = base.BIT -BLOB = base.BLOB -BOOLEAN = base.BOOLEAN -CHAR = base.CHAR -DATE = base.DATE -DATETIME = base.DATETIME -DECIMAL = base.DECIMAL -DOUBLE = base.DOUBLE -ENUM = base.ENUM -FLOAT = base.FLOAT -INTEGER = base.INTEGER -LONGBLOB = base.LONGBLOB -LONGTEXT = base.LONGTEXT -MEDIUMBLOB = base.MEDIUMBLOB -MEDIUMINT = base.MEDIUMINT -MEDIUMTEXT = base.MEDIUMTEXT -NCHAR = base.NCHAR -NVARCHAR = base.NVARCHAR -NUMERIC = base.NUMERIC -SET = base.SET -SMALLINT = base.SMALLINT -REAL = base.REAL -TEXT = base.TEXT -TIME = base.TIME -TIMESTAMP = base.TIMESTAMP -TINYBLOB = base.TINYBLOB -TINYINT = base.TINYINT -TINYTEXT = base.TINYTEXT -VARBINARY = base.VARBINARY -VARCHAR = base.VARCHAR -YEAR = base.YEAR -# dialect = base.dialect +from .base import ( + BIGINT as BIGINT, + BINARY as BINARY, + BIT as BIT, + BLOB as BLOB, + BOOLEAN as BOOLEAN, + CHAR as CHAR, + DATE as DATE, + DATETIME as DATETIME, + DECIMAL as DECIMAL, + DOUBLE as DOUBLE, + ENUM as ENUM, + DECIMAL as DECIMAL, + FLOAT as FLOAT, + INTEGER as INTEGER, + INTEGER as INTEGER, + JSON as JSON, + LONGBLOB as LONGBLOB, + LONGTEXT as LONGTEXT, + MEDIUMBLOB as MEDIUMBLOB, + MEDIUMINT as MEDIUMINT, + MEDIUMTEXT as MEDIUMTEXT, + NCHAR as NCHAR, + NVARCHAR as NVARCHAR, + NUMERIC as NUMERIC, + SET as SET, + SMALLINT as SMALLINT, + REAL as REAL, + TEXT as TEXT, + TIME as TIME, + TIMESTAMP as TIMESTAMP, + TINYBLOB as TINYBLOB, + TINYINT as TINYINT, + TINYTEXT as TINYTEXT, + VARBINARY as VARBINARY, + VARCHAR as VARCHAR, + YEAR as YEAR, +) diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi index 51b8b26c6a98..75bb4397b66b 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi @@ -1,231 +1,26 @@ -# Stubs for sqlalchemy.dialects.mysql.base (Python 2) +# Stubs for sqlalchemy.dialects.mysql.base (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any -from ... import sql -from ... import engine -from ... import util -from ... import types - -sqltypes = sql.sqltypes -# compiler = sql.compiler -# reflection = engine.reflection -# default = engine.default -# topological = util.topological -DATE = types.DATE -BOOLEAN = types.BOOLEAN -BLOB = types.BLOB -BINARY = types.BINARY -VARBINARY = types.VARBINARY +from typing import Any, Optional +from sqlalchemy.sql import compiler +from ... import schema as sa_schema +from ...sql import compiler as compiler, elements as elements +from array import array as _array +from ...engine import reflection as reflection +from ...engine import default as default +from ... import types as sqltypes +from ...util import topological as topological +from ...types import DATE as DATE, BOOLEAN as BOOLEAN, BLOB as BLOB, BINARY as BINARY, VARBINARY as VARBINARY +from . import reflection as _reflection +from .types import BIGINT as BIGINT, BIT as BIT, CHAR as CHAR, DECIMAL as DECIMAL, DATETIME as DATETIME, DOUBLE as DOUBLE, FLOAT as FLOAT, INTEGER as INTEGER, LONGBLOB as LONGBLOB, LONGTEXT as LONGTEXT, MEDIUMBLOB as MEDIUMBLOB, MEDIUMINT as MEDIUMINT, MEDIUMTEXT as MEDIUMTEXT, NCHAR as NCHAR, NUMERIC as NUMERIC, NVARCHAR as NVARCHAR, REAL as REAL, SMALLINT as SMALLINT, TEXT as TEXT, TIME as TIME, TIMESTAMP as TIMESTAMP, TINYBLOB as TINYBLOB, TINYINT as TINYINT, TINYTEXT as TINYTEXT, VARCHAR as VARCHAR, YEAR as YEAR +from .types import _StringType as _StringType, _IntegerType as _IntegerType, _NumericType as _NumericType, _FloatType as _FloatType, _MatchType as _MatchType +from .enumerated import ENUM as ENUM, SET as SET +from .json import JSON as JSON, JSONIndexType as JSONIndexType, JSONPathType as JSONPathType RESERVED_WORDS = ... # type: Any AUTOCOMMIT_RE = ... # type: Any SET_RE = ... # type: Any - -class _NumericType: - unsigned = ... # type: Any - zerofill = ... # type: Any - def __init__(self, unsigned=..., zerofill=..., **kw) -> None: ... - -class _FloatType(_NumericType, - # sqltypes.Float - ): - scale = ... # type: Any - def __init__(self, precision=..., scale=..., asdecimal=..., **kw) -> None: ... - -class _IntegerType(_NumericType, - # sqltypes.Integer - ): - display_width = ... # type: Any - def __init__(self, display_width=..., **kw) -> None: ... - -class _StringType(object, - # sqltypes.String - ): - charset = ... # type: Any - ascii = ... # type: Any - unicode = ... # type: Any - binary = ... # type: Any - national = ... # type: Any - def __init__(self, charset=..., collation=..., ascii=..., binary=..., unicode=..., national=..., **kw) -> None: ... - -class _MatchType(object, - # sqltypes.Float, - # sqltypes.MatchType - ): - def __init__(self, **kw) -> None: ... - -class NUMERIC(_NumericType, - # sqltypes.NUMERIC - ): - __visit_name__ = ... # type: Any - def __init__(self, precision=..., scale=..., asdecimal=..., **kw) -> None: ... - -class DECIMAL(_NumericType, - # sqltypes.DECIMAL - ): - __visit_name__ = ... # type: Any - def __init__(self, precision=..., scale=..., asdecimal=..., **kw) -> None: ... - -class DOUBLE(_FloatType): - __visit_name__ = ... # type: Any - def __init__(self, precision=..., scale=..., asdecimal=..., **kw) -> None: ... - -class REAL(_FloatType, - # sqltypes.REAL - ): - __visit_name__ = ... # type: Any - def __init__(self, precision=..., scale=..., asdecimal=..., **kw) -> None: ... - -class FLOAT(_FloatType, - # sqltypes.FLOAT - ): - __visit_name__ = ... # type: Any - def __init__(self, precision=..., scale=..., asdecimal=..., **kw) -> None: ... - def bind_processor(self, dialect): ... - -class INTEGER(_IntegerType, - # sqltypes.INTEGER - ): - __visit_name__ = ... # type: Any - def __init__(self, display_width=..., **kw) -> None: ... - -class BIGINT(_IntegerType, - # sqltypes.BIGINT - ): - __visit_name__ = ... # type: Any - def __init__(self, display_width=..., **kw) -> None: ... - -class MEDIUMINT(_IntegerType): - __visit_name__ = ... # type: Any - def __init__(self, display_width=..., **kw) -> None: ... - -class TINYINT(_IntegerType): - __visit_name__ = ... # type: Any - def __init__(self, display_width=..., **kw) -> None: ... - -class SMALLINT(_IntegerType, - # sqltypes.SMALLINT - ): - __visit_name__ = ... # type: Any - def __init__(self, display_width=..., **kw) -> None: ... - -class BIT(object, - # sqltypes.TypeEngine - ): - __visit_name__ = ... # type: Any - length = ... # type: Any - def __init__(self, length=...) -> None: ... - def result_processor(self, dialect, coltype): ... - -class TIME(object, - # sqltypes.TIME - ): - __visit_name__ = ... # type: Any - fsp = ... # type: Any - def __init__(self, timezone=..., fsp=...) -> None: ... - def result_processor(self, dialect, coltype): ... - -class TIMESTAMP(object, - # sqltypes.TIMESTAMP - ): - __visit_name__ = ... # type: Any - fsp = ... # type: Any - def __init__(self, timezone=..., fsp=...) -> None: ... - -class DATETIME(object, - # sqltypes.DATETIME - ): - __visit_name__ = ... # type: Any - fsp = ... # type: Any - def __init__(self, timezone=..., fsp=...) -> None: ... - -class YEAR(object, - # sqltypes.TypeEngine - ): - __visit_name__ = ... # type: Any - display_width = ... # type: Any - def __init__(self, display_width=...) -> None: ... - -class TEXT(_StringType, - # sqltypes.TEXT - ): - __visit_name__ = ... # type: Any - def __init__(self, length=..., **kw) -> None: ... - -class TINYTEXT(_StringType): - __visit_name__ = ... # type: Any - def __init__(self, **kwargs) -> None: ... - -class MEDIUMTEXT(_StringType): - __visit_name__ = ... # type: Any - def __init__(self, **kwargs) -> None: ... - -class LONGTEXT(_StringType): - __visit_name__ = ... # type: Any - def __init__(self, **kwargs) -> None: ... - -class VARCHAR(_StringType, - # sqltypes.VARCHAR - ): - __visit_name__ = ... # type: Any - def __init__(self, length=..., **kwargs) -> None: ... - -class CHAR(_StringType, - # sqltypes.CHAR - ): - __visit_name__ = ... # type: Any - def __init__(self, length=..., **kwargs) -> None: ... - -class NVARCHAR(_StringType, - # sqltypes.NVARCHAR - ): - __visit_name__ = ... # type: Any - def __init__(self, length=..., **kwargs) -> None: ... - -class NCHAR(_StringType, - # sqltypes.NCHAR - ): - __visit_name__ = ... # type: Any - def __init__(self, length=..., **kwargs) -> None: ... - -class TINYBLOB(object, - # sqltypes._Binary - ): - __visit_name__ = ... # type: Any - -class MEDIUMBLOB(object, - # sqltypes._Binary - ): - __visit_name__ = ... # type: Any - -class LONGBLOB(object, - # sqltypes._Binary - ): - __visit_name__ = ... # type: Any - -class _EnumeratedValues(_StringType): ... - -class ENUM( # sqltypes.Enum, - _EnumeratedValues -): - __visit_name__ = ... # type: Any - strict = ... # type: Any - def __init__(self, *enums, **kw) -> None: ... - def bind_processor(self, dialect): ... - def adapt(self, cls, **kw): ... - -class SET(_EnumeratedValues): - __visit_name__ = ... # type: Any - retrieve_as_bitwise = ... # type: Any - values = ... # type: Any - def __init__(self, *values, **kw) -> None: ... - def column_expression(self, colexpr): ... - def result_processor(self, dialect, coltype): ... - def bind_processor(self, dialect): ... - def adapt(self, impltype, **kw): ... - MSTime = ... # type: Any MSSet = ... # type: Any MSEnum = ... # type: Any @@ -259,39 +54,35 @@ MSInteger = ... # type: Any colspecs = ... # type: Any ischema_names = ... # type: Any -class MySQLExecutionContext(object, - # default.DefaultExecutionContext - ): +class MySQLExecutionContext(default.DefaultExecutionContext): def should_autocommit_text(self, statement): ... + def create_server_side_cursor(self): ... -class MySQLCompiler(object, - # compiler.SQLCompiler - ): - render_table_with_column_in_update_from = ... # type: Any +class MySQLCompiler(compiler.SQLCompiler): + render_table_with_column_in_update_from = ... # type: bool extract_map = ... # type: Any def visit_random_func(self, fn, **kw): ... def visit_utc_timestamp_func(self, fn, **kw): ... def visit_sysdate_func(self, fn, **kw): ... + def visit_json_getitem_op_binary(self, binary, operator, **kw): ... + def visit_json_path_getitem_op_binary(self, binary, operator, **kw): ... def visit_concat_op_binary(self, binary, operator, **kw): ... def visit_match_op_binary(self, binary, operator, **kw): ... def get_from_hint_text(self, table, text): ... - def visit_typeclause(self, typeclause, type_=...): ... - def visit_cast(self, cast, **kwargs): ... + def visit_typeclause(self, *args, **kw): ... + def visit_cast(self, cast, **kw): ... def render_literal_value(self, value, type_): ... def visit_true(self, element, **kw): ... def visit_false(self, element, **kw): ... def get_select_precolumns(self, select, **kw): ... - def visit_join(self, join, asfrom=..., **kwargs): ... + def visit_join(self, join, asfrom: bool = ..., **kwargs): ... def for_update_clause(self, select, **kw): ... def limit_clause(self, select, **kw): ... def update_limit_clause(self, update_stmt): ... def update_tables_clause(self, update_stmt, from_table, extra_froms, **kw): ... def update_from_clause(self, update_stmt, from_table, extra_froms, from_hints, **kw): ... -class MySQLDDLCompiler(object, - # compiler.DDLCompiler - ): - def create_table_constraints(self, table, **kw): ... +class MySQLDDLCompiler(compiler.DDLCompiler): def get_column_specification(self, column, **kw): ... def post_create_table(self, table): ... def visit_create_index(self, create): ... @@ -300,9 +91,7 @@ class MySQLDDLCompiler(object, def visit_drop_constraint(self, drop): ... def define_constraint_match(self, constraint): ... -class MySQLTypeCompiler(object, - # compiler.GenericTypeCompiler - ): +class MySQLTypeCompiler(compiler.GenericTypeCompiler): def visit_NUMERIC(self, type_, **kw): ... def visit_DECIMAL(self, type_, **kw): ... def visit_DOUBLE(self, type_, **kw): ... @@ -328,6 +117,7 @@ class MySQLTypeCompiler(object, def visit_NVARCHAR(self, type_, **kw): ... def visit_NCHAR(self, type_, **kw): ... def visit_VARBINARY(self, type_, **kw): ... + def visit_JSON(self, type_, **kw): ... def visit_large_binary(self, type_, **kw): ... def visit_enum(self, type_, **kw): ... def visit_BLOB(self, type_, **kw): ... @@ -338,25 +128,21 @@ class MySQLTypeCompiler(object, def visit_SET(self, type_, **kw): ... def visit_BOOLEAN(self, type, **kw): ... -class MySQLIdentifierPreparer(object, - # compiler.IdentifierPreparer - ): +class MySQLIdentifierPreparer(compiler.IdentifierPreparer): reserved_words = ... # type: Any - def __init__(self, dialect, server_ansiquotes=..., **kw) -> None: ... - -class MySQLDialect(object, - # default.DefaultDialect - ): - name = ... # type: Any - supports_alter = ... # type: Any - supports_native_boolean = ... # type: Any - max_identifier_length = ... # type: Any - max_index_name_length = ... # type: Any - supports_native_enum = ... # type: Any - supports_sane_rowcount = ... # type: Any - supports_sane_multi_rowcount = ... # type: Any - supports_multivalues_insert = ... # type: Any - default_paramstyle = ... # type: Any + def __init__(self, dialect, server_ansiquotes: bool = ..., **kw) -> None: ... + +class MySQLDialect(default.DefaultDialect): + name = ... # type: str + supports_alter = ... # type: bool + supports_native_boolean = ... # type: bool + max_identifier_length = ... # type: int + max_index_name_length = ... # type: int + supports_native_enum = ... # type: bool + supports_sane_rowcount = ... # type: bool + supports_sane_multi_rowcount = ... # type: bool + supports_multivalues_insert = ... # type: bool + default_paramstyle = ... # type: str colspecs = ... # type: Any statement_compiler = ... # type: Any ddl_compiler = ... # type: Any @@ -365,7 +151,7 @@ class MySQLDialect(object, preparer = ... # type: Any construct_arguments = ... # type: Any isolation_level = ... # type: Any - def __init__(self, isolation_level=..., **kwargs) -> None: ... + def __init__(self, isolation_level: Optional[Any] = ..., json_serializer: Optional[Any] = ..., json_deserializer: Optional[Any] = ..., **kwargs) -> None: ... def on_connect(self): ... def set_isolation_level(self, connection, level): ... def get_isolation_level(self, connection): ... @@ -373,39 +159,25 @@ class MySQLDialect(object, def do_rollback(self, dbapi_connection): ... def do_begin_twophase(self, connection, xid): ... def do_prepare_twophase(self, connection, xid): ... - def do_rollback_twophase(self, connection, xid, is_prepared=..., recover=...): ... - def do_commit_twophase(self, connection, xid, is_prepared=..., recover=...): ... + def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...): ... + def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...): ... def do_recover_twophase(self, connection): ... def is_disconnect(self, e, connection, cursor): ... - def has_table(self, connection, table_name, schema=...): ... + def has_table(self, connection, table_name, schema: Optional[Any] = ...): ... identifier_preparer = ... # type: Any def initialize(self, connection): ... def get_schema_names(self, connection, **kw): ... - def get_table_names(self, connection, schema=..., **kw): ... - def get_view_names(self, connection, schema=..., **kw): ... - def get_table_options(self, connection, table_name, schema=..., **kw): ... - def get_columns(self, connection, table_name, schema=..., **kw): ... - def get_pk_constraint(self, connection, table_name, schema=..., **kw): ... - def get_foreign_keys(self, connection, table_name, schema=..., **kw): ... - def get_indexes(self, connection, table_name, schema=..., **kw): ... - def get_unique_constraints(self, connection, table_name, schema=..., **kw): ... - def get_view_definition(self, connection, view_name, schema=..., **kw): ... - -class ReflectedState: - columns = ... # type: Any - table_options = ... # type: Any - table_name = ... # type: Any - keys = ... # type: Any - constraints = ... # type: Any - def __init__(self) -> None: ... - -class MySQLTableDefinitionParser: - dialect = ... # type: Any - preparer = ... # type: Any - def __init__(self, dialect, preparer) -> None: ... - def parse(self, show_create, charset): ... - -class _DecodingRowProxy: + def get_table_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_view_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_table_options(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_columns(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_pk_constraint(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_foreign_keys(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_indexes(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_unique_constraints(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_view_definition(self, connection, view_name, schema: Optional[Any] = ..., **kw): ... + +class _DecodingRowProxy(object): rowproxy = ... # type: Any charset = ... # type: Any def __init__(self, rowproxy, charset) -> None: ... diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/cymysql.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/cymysql.pyi new file mode 100644 index 000000000000..1fa560d853f5 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/cymysql.pyi @@ -0,0 +1,23 @@ +# Stubs for sqlalchemy.dialects.mysql.cymysql (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .mysqldb import MySQLDialect_mysqldb as MySQLDialect_mysqldb +from .base import BIT as BIT, MySQLDialect as MySQLDialect + +class _cymysqlBIT(BIT): + def result_processor(self, dialect, coltype): ... + +class MySQLDialect_cymysql(MySQLDialect_mysqldb): + driver = ... # type: str + description_encoding = ... # type: Any + supports_sane_rowcount = ... # type: bool + supports_sane_multi_rowcount = ... # type: bool + supports_unicode_statements = ... # type: bool + colspecs = ... # type: Any + @classmethod + def dbapi(cls): ... + def is_disconnect(self, e, connection, cursor): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/enumerated.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/enumerated.pyi new file mode 100644 index 000000000000..995ab57e064f --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/enumerated.pyi @@ -0,0 +1,24 @@ +# Stubs for sqlalchemy.dialects.mysql.enumerated (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .types import _StringType as _StringType +from ... import types as sqltypes + +class _EnumeratedValues(_StringType): ... + +class ENUM(sqltypes.Enum, _EnumeratedValues): + __visit_name__ = ... # type: str + def __init__(self, *enums, **kw) -> None: ... + def adapt(self, cls, **kw): ... + +class SET(_EnumeratedValues): + __visit_name__ = ... # type: str + retrieve_as_bitwise = ... # type: Any + values = ... # type: Any + def __init__(self, *values, **kw) -> None: ... + def column_expression(self, colexpr): ... + def result_processor(self, dialect, coltype): ... + def bind_processor(self, dialect): ... + def adapt(self, impltype, **kw): ... diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/gaerdbms.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/gaerdbms.pyi new file mode 100644 index 000000000000..a2cf6a1e3160 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/gaerdbms.pyi @@ -0,0 +1,16 @@ +# Stubs for sqlalchemy.dialects.mysql.gaerdbms (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .mysqldb import MySQLDialect_mysqldb as MySQLDialect_mysqldb +from ...pool import NullPool as NullPool + +class MySQLDialect_gaerdbms(MySQLDialect_mysqldb): + @classmethod + def dbapi(cls): ... + @classmethod + def get_pool_class(cls, url): ... + def create_connect_args(self, url): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi new file mode 100644 index 000000000000..5cbc2f60bfc9 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi @@ -0,0 +1,15 @@ +# Stubs for sqlalchemy.dialects.mysql.json (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from ...sql import elements as elements +from ... import types as sqltypes + +class JSON(sqltypes.JSON): ... + +class _FormatTypeMixin(object): + def bind_processor(self, dialect): ... + def literal_processor(self, dialect): ... + +class JSONIndexType(_FormatTypeMixin, sqltypes.JSON.JSONIndexType): ... +class JSONPathType(_FormatTypeMixin, sqltypes.JSON.JSONPathType): ... diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/mysqlconnector.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/mysqlconnector.pyi new file mode 100644 index 000000000000..a95c300e504e --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/mysqlconnector.pyi @@ -0,0 +1,39 @@ +# Stubs for sqlalchemy.dialects.mysql.mysqlconnector (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .base import MySQLDialect as MySQLDialect, MySQLExecutionContext as MySQLExecutionContext, MySQLCompiler as MySQLCompiler, MySQLIdentifierPreparer as MySQLIdentifierPreparer, BIT as BIT + +class MySQLExecutionContext_mysqlconnector(MySQLExecutionContext): + def get_lastrowid(self): ... + +class MySQLCompiler_mysqlconnector(MySQLCompiler): + def visit_mod_binary(self, binary, operator, **kw): ... + def post_process_text(self, text): ... + def escape_literal_column(self, text): ... + +class MySQLIdentifierPreparer_mysqlconnector(MySQLIdentifierPreparer): ... + +class _myconnpyBIT(BIT): + def result_processor(self, dialect, coltype): ... + +class MySQLDialect_mysqlconnector(MySQLDialect): + driver = ... # type: str + supports_unicode_binds = ... # type: bool + supports_sane_rowcount = ... # type: bool + supports_sane_multi_rowcount = ... # type: bool + supports_native_decimal = ... # type: bool + default_paramstyle = ... # type: str + execution_ctx_cls = ... # type: Any + statement_compiler = ... # type: Any + preparer = ... # type: Any + colspecs = ... # type: Any + @property + def supports_unicode_statements(self): ... + @classmethod + def dbapi(cls): ... + def create_connect_args(self, url): ... + def is_disconnect(self, e, connection, cursor): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/mysqldb.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/mysqldb.pyi new file mode 100644 index 000000000000..2b193a56821b --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/mysqldb.pyi @@ -0,0 +1,37 @@ +# Stubs for sqlalchemy.dialects.mysql.mysqldb (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .base import MySQLDialect as MySQLDialect, MySQLExecutionContext as MySQLExecutionContext, MySQLCompiler as MySQLCompiler, MySQLIdentifierPreparer as MySQLIdentifierPreparer +from .base import TEXT as TEXT + +class MySQLExecutionContext_mysqldb(MySQLExecutionContext): + @property + def rowcount(self): ... + +class MySQLCompiler_mysqldb(MySQLCompiler): + def visit_mod_binary(self, binary, operator, **kw): ... + def post_process_text(self, text): ... + +class MySQLIdentifierPreparer_mysqldb(MySQLIdentifierPreparer): ... + +class MySQLDialect_mysqldb(MySQLDialect): + driver = ... # type: str + supports_unicode_statements = ... # type: bool + supports_sane_rowcount = ... # type: bool + supports_sane_multi_rowcount = ... # type: bool + supports_native_decimal = ... # type: bool + default_paramstyle = ... # type: str + execution_ctx_cls = ... # type: Any + statement_compiler = ... # type: Any + preparer = ... # type: Any + server_side_cursors = ... # type: Any + def __init__(self, server_side_cursors: bool = ..., **kwargs) -> None: ... + def supports_server_side_cursors(self): ... + @classmethod + def dbapi(cls): ... + def do_executemany(self, cursor, statement, parameters, context: Optional[Any] = ...): ... + def create_connect_args(self, url): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/oursql.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/oursql.pyi new file mode 100644 index 000000000000..2a744d75602d --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/oursql.pyi @@ -0,0 +1,43 @@ +# Stubs for sqlalchemy.dialects.mysql.oursql (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .base import BIT as BIT, MySQLDialect as MySQLDialect, MySQLExecutionContext as MySQLExecutionContext +from ... import types as sqltypes + +class _oursqlBIT(BIT): + def result_processor(self, dialect, coltype): ... + +class MySQLExecutionContext_oursql(MySQLExecutionContext): + @property + def plain_query(self): ... + +class MySQLDialect_oursql(MySQLDialect): + driver = ... # type: str + supports_unicode_binds = ... # type: bool + supports_unicode_statements = ... # type: bool + supports_native_decimal = ... # type: bool + supports_sane_rowcount = ... # type: bool + supports_sane_multi_rowcount = ... # type: bool + execution_ctx_cls = ... # type: Any + colspecs = ... # type: Any + @classmethod + def dbapi(cls): ... + def do_execute(self, cursor, statement, parameters, context: Optional[Any] = ...): ... + def do_begin(self, connection): ... + def do_begin_twophase(self, connection, xid): ... + def do_prepare_twophase(self, connection, xid): ... + def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...): ... + def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...): ... + def has_table(self, connection, table_name, schema: Optional[Any] = ...): ... + def get_table_options(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_columns(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_view_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_table_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_schema_names(self, connection, **kw): ... + def initialize(self, connection): ... + def is_disconnect(self, e, connection, cursor): ... + def create_connect_args(self, url): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/pymysql.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/pymysql.pyi new file mode 100644 index 000000000000..41d588b1fbd2 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/pymysql.pyi @@ -0,0 +1,20 @@ +# Stubs for sqlalchemy.dialects.mysql.pymysql (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .mysqldb import MySQLDialect_mysqldb as MySQLDialect_mysqldb +from ...util import langhelpers as langhelpers, py3k as py3k + +class MySQLDialect_pymysql(MySQLDialect_mysqldb): + driver = ... # type: str + description_encoding = ... # type: Any + supports_unicode_statements = ... # type: bool + supports_unicode_binds = ... # type: bool + server_side_cursors = ... # type: Any + def __init__(self, server_side_cursors: bool = ..., **kwargs) -> None: ... + def supports_server_side_cursors(self): ... + @classmethod + def dbapi(cls): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/pyodbc.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/pyodbc.pyi new file mode 100644 index 000000000000..24a884c50fd3 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/pyodbc.pyi @@ -0,0 +1,18 @@ +# Stubs for sqlalchemy.dialects.mysql.pyodbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .base import MySQLDialect as MySQLDialect, MySQLExecutionContext as MySQLExecutionContext +from ...connectors.pyodbc import PyODBCConnector as PyODBCConnector + +class MySQLExecutionContext_pyodbc(MySQLExecutionContext): + def get_lastrowid(self): ... + +class MySQLDialect_pyodbc(PyODBCConnector, MySQLDialect): + supports_unicode_statements = ... # type: bool + execution_ctx_cls = ... # type: Any + pyodbc_driver_name = ... # type: str + def __init__(self, **kw) -> None: ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/reflection.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/reflection.pyi new file mode 100644 index 000000000000..5c8bb3aa569e --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/reflection.pyi @@ -0,0 +1,22 @@ +# Stubs for sqlalchemy.dialects.mysql.reflection (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from ... import types as sqltypes +from .enumerated import _EnumeratedValues as _EnumeratedValues, SET as SET +from .types import DATETIME as DATETIME, TIME as TIME, TIMESTAMP as TIMESTAMP + +class ReflectedState(object): + columns = ... # type: Any + table_options = ... # type: Any + table_name = ... # type: Any + keys = ... # type: Any + constraints = ... # type: Any + def __init__(self) -> None: ... + +class MySQLTableDefinitionParser(object): + dialect = ... # type: Any + preparer = ... # type: Any + def __init__(self, dialect, preparer) -> None: ... + def parse(self, show_create, charset): ... diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi new file mode 100644 index 000000000000..a218ee8d380f --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi @@ -0,0 +1,139 @@ +# Stubs for sqlalchemy.dialects.mysql.types (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ... import types as sqltypes + +class _NumericType(object): + unsigned = ... # type: Any + zerofill = ... # type: Any + def __init__(self, unsigned: bool = ..., zerofill: bool = ..., **kw) -> None: ... + +class _FloatType(_NumericType, sqltypes.Float): + scale = ... # type: Any + def __init__(self, precision: Optional[Any] = ..., scale: Optional[Any] = ..., asdecimal: bool = ..., **kw) -> None: ... + +class _IntegerType(_NumericType, sqltypes.Integer): + display_width = ... # type: Any + def __init__(self, display_width: Optional[Any] = ..., **kw) -> None: ... + +class _StringType(sqltypes.String): + charset = ... # type: Any + ascii = ... # type: Any + unicode = ... # type: Any + binary = ... # type: Any + national = ... # type: Any + def __init__(self, charset: Optional[Any] = ..., collation: Optional[Any] = ..., ascii: bool = ..., binary: bool = ..., unicode: bool = ..., national: bool = ..., **kw) -> None: ... + +class _MatchType(sqltypes.Float, sqltypes.MatchType): + def __init__(self, **kw) -> None: ... + +class NUMERIC(_NumericType, sqltypes.NUMERIC): + __visit_name__ = ... # type: str + def __init__(self, precision: Optional[Any] = ..., scale: Optional[Any] = ..., asdecimal: bool = ..., **kw) -> None: ... + +class DECIMAL(_NumericType, sqltypes.DECIMAL): + __visit_name__ = ... # type: str + def __init__(self, precision: Optional[Any] = ..., scale: Optional[Any] = ..., asdecimal: bool = ..., **kw) -> None: ... + +class DOUBLE(_FloatType): + __visit_name__ = ... # type: str + def __init__(self, precision: Optional[Any] = ..., scale: Optional[Any] = ..., asdecimal: bool = ..., **kw) -> None: ... + +class REAL(_FloatType, sqltypes.REAL): + __visit_name__ = ... # type: str + def __init__(self, precision: Optional[Any] = ..., scale: Optional[Any] = ..., asdecimal: bool = ..., **kw) -> None: ... + +class FLOAT(_FloatType, sqltypes.FLOAT): + __visit_name__ = ... # type: str + def __init__(self, precision: Optional[Any] = ..., scale: Optional[Any] = ..., asdecimal: bool = ..., **kw) -> None: ... + def bind_processor(self, dialect): ... + +class INTEGER(_IntegerType, sqltypes.INTEGER): + __visit_name__ = ... # type: str + def __init__(self, display_width: Optional[Any] = ..., **kw) -> None: ... + +class BIGINT(_IntegerType, sqltypes.BIGINT): + __visit_name__ = ... # type: str + def __init__(self, display_width: Optional[Any] = ..., **kw) -> None: ... + +class MEDIUMINT(_IntegerType): + __visit_name__ = ... # type: str + def __init__(self, display_width: Optional[Any] = ..., **kw) -> None: ... + +class TINYINT(_IntegerType): + __visit_name__ = ... # type: str + def __init__(self, display_width: Optional[Any] = ..., **kw) -> None: ... + +class SMALLINT(_IntegerType, sqltypes.SMALLINT): + __visit_name__ = ... # type: str + def __init__(self, display_width: Optional[Any] = ..., **kw) -> None: ... + +class BIT(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + length = ... # type: Any + def __init__(self, length: Optional[Any] = ...) -> None: ... + def result_processor(self, dialect, coltype): ... + +class TIME(sqltypes.TIME): + __visit_name__ = ... # type: str + fsp = ... # type: Any + def __init__(self, timezone: bool = ..., fsp: Optional[Any] = ...) -> None: ... + def result_processor(self, dialect, coltype): ... + +class TIMESTAMP(sqltypes.TIMESTAMP): + __visit_name__ = ... # type: str + fsp = ... # type: Any + def __init__(self, timezone: bool = ..., fsp: Optional[Any] = ...) -> None: ... + +class DATETIME(sqltypes.DATETIME): + __visit_name__ = ... # type: str + fsp = ... # type: Any + def __init__(self, timezone: bool = ..., fsp: Optional[Any] = ...) -> None: ... + +class YEAR(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + display_width = ... # type: Any + def __init__(self, display_width: Optional[Any] = ...) -> None: ... + +class TEXT(_StringType, sqltypes.TEXT): + __visit_name__ = ... # type: str + def __init__(self, length: Optional[Any] = ..., **kw) -> None: ... + +class TINYTEXT(_StringType): + __visit_name__ = ... # type: str + def __init__(self, **kwargs) -> None: ... + +class MEDIUMTEXT(_StringType): + __visit_name__ = ... # type: str + def __init__(self, **kwargs) -> None: ... + +class LONGTEXT(_StringType): + __visit_name__ = ... # type: str + def __init__(self, **kwargs) -> None: ... + +class VARCHAR(_StringType, sqltypes.VARCHAR): + __visit_name__ = ... # type: str + def __init__(self, length: Optional[Any] = ..., **kwargs) -> None: ... + +class CHAR(_StringType, sqltypes.CHAR): + __visit_name__ = ... # type: str + def __init__(self, length: Optional[Any] = ..., **kwargs) -> None: ... + +class NVARCHAR(_StringType, sqltypes.NVARCHAR): + __visit_name__ = ... # type: str + def __init__(self, length: Optional[Any] = ..., **kwargs) -> None: ... + +class NCHAR(_StringType, sqltypes.NCHAR): + __visit_name__ = ... # type: str + def __init__(self, length: Optional[Any] = ..., **kwargs) -> None: ... + +class TINYBLOB(sqltypes._Binary): + __visit_name__ = ... # type: str + +class MEDIUMBLOB(sqltypes._Binary): + __visit_name__ = ... # type: str + +class LONGBLOB(sqltypes._Binary): + __visit_name__ = ... # type: str diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/zxjdbc.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/zxjdbc.pyi new file mode 100644 index 000000000000..dd2d70482a1a --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/zxjdbc.pyi @@ -0,0 +1,22 @@ +# Stubs for sqlalchemy.dialects.mysql.zxjdbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from ... import types as sqltypes +from ...connectors.zxJDBC import ZxJDBCConnector as ZxJDBCConnector +from .base import BIT as BIT, MySQLDialect as MySQLDialect, MySQLExecutionContext as MySQLExecutionContext + +class _ZxJDBCBit(BIT): + def result_processor(self, dialect, coltype): ... + +class MySQLExecutionContext_zxjdbc(MySQLExecutionContext): + def get_lastrowid(self): ... + +class MySQLDialect_zxjdbc(ZxJDBCConnector, MySQLDialect): + jdbc_db_name = ... # type: str + jdbc_driver_name = ... # type: str + execution_ctx_cls = ... # type: Any + colspecs = ... # type: Any + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/oracle/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/oracle/__init__.pyi new file mode 100644 index 000000000000..b5f8d15c393b --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/oracle/__init__.pyi @@ -0,0 +1,5 @@ +# Stubs for sqlalchemy.dialects.oracle (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from sqlalchemy.dialects.oracle.base import VARCHAR as VARCHAR, NVARCHAR as NVARCHAR, CHAR as CHAR, DATE as DATE, NUMBER as NUMBER, BLOB as BLOB, BFILE as BFILE, CLOB as CLOB, NCLOB as NCLOB, TIMESTAMP as TIMESTAMP, RAW as RAW, FLOAT as FLOAT, DOUBLE_PRECISION as DOUBLE_PRECISION, LONG as LONG, INTERVAL as INTERVAL, VARCHAR2 as VARCHAR2, NVARCHAR2 as NVARCHAR2, ROWID as ROWID diff --git a/third_party/2and3/sqlalchemy/dialects/oracle/base.pyi b/third_party/2and3/sqlalchemy/dialects/oracle/base.pyi new file mode 100644 index 000000000000..d487e45cd5d6 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/oracle/base.pyi @@ -0,0 +1,171 @@ +# Stubs for sqlalchemy.dialects.oracle.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from sqlalchemy.sql import compiler, elements +from sqlalchemy.engine import default +from sqlalchemy.sql import util as sql_util +from sqlalchemy.sql import operators as sql_operators +from sqlalchemy import types as sqltypes, schema as sa_schema +from sqlalchemy.types import VARCHAR as VARCHAR, NVARCHAR as NVARCHAR, CHAR as CHAR, \ + BLOB as BLOB, CLOB as CLOB, TIMESTAMP as TIMESTAMP, FLOAT as FLOAT + +RESERVED_WORDS = ... # type: Any +NO_ARG_FNS = ... # type: Any + +class RAW(sqltypes._Binary): + __visit_name__ = ... # type: str + +OracleRaw = ... # type: Any + +class NCLOB(sqltypes.Text): + __visit_name__ = ... # type: str + +class VARCHAR2(VARCHAR): + __visit_name__ = ... # type: str + +NVARCHAR2 = ... # type: Any + +class NUMBER(sqltypes.Numeric, sqltypes.Integer): + __visit_name__ = ... # type: str + def __init__(self, precision: Optional[Any] = ..., scale: Optional[Any] = ..., asdecimal: Optional[Any] = ...) -> None: ... + def adapt(self, impltype): ... + +class DOUBLE_PRECISION(sqltypes.Numeric): + __visit_name__ = ... # type: str + def __init__(self, precision: Optional[Any] = ..., scale: Optional[Any] = ..., asdecimal: Optional[Any] = ...) -> None: ... + +class BFILE(sqltypes.LargeBinary): + __visit_name__ = ... # type: str + +class LONG(sqltypes.Text): + __visit_name__ = ... # type: str + +class DATE(sqltypes.DateTime): + __visit_name__ = ... # type: str + +class INTERVAL(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + day_precision = ... # type: Any + second_precision = ... # type: Any + def __init__(self, day_precision: Optional[Any] = ..., second_precision: Optional[Any] = ...) -> None: ... + +class ROWID(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class _OracleBoolean(sqltypes.Boolean): + def get_dbapi_type(self, dbapi): ... + +colspecs = ... # type: Any +ischema_names = ... # type: Any + +class OracleTypeCompiler(compiler.GenericTypeCompiler): + def visit_datetime(self, type_, **kw): ... + def visit_float(self, type_, **kw): ... + def visit_unicode(self, type_, **kw): ... + def visit_INTERVAL(self, type_, **kw): ... + def visit_LONG(self, type_, **kw): ... + def visit_TIMESTAMP(self, type_, **kw): ... + def visit_DOUBLE_PRECISION(self, type_, **kw): ... + def visit_NUMBER(self, type_, **kw): ... + def visit_string(self, type_, **kw): ... + def visit_VARCHAR2(self, type_, **kw): ... + def visit_NVARCHAR2(self, type_, **kw): ... + visit_NVARCHAR = ... # type: Any + def visit_VARCHAR(self, type_, **kw): ... + def visit_text(self, type_, **kw): ... + def visit_unicode_text(self, type_, **kw): ... + def visit_large_binary(self, type_, **kw): ... + def visit_big_integer(self, type_, **kw): ... + def visit_boolean(self, type_, **kw): ... + def visit_RAW(self, type_, **kw): ... + def visit_ROWID(self, type_, **kw): ... + +class OracleCompiler(compiler.SQLCompiler): + compound_keywords = ... # type: Any + def __init__(self, *args, **kwargs) -> None: ... + def visit_mod_binary(self, binary, operator, **kw): ... + def visit_now_func(self, fn, **kw): ... + def visit_char_length_func(self, fn, **kw): ... + def visit_match_op_binary(self, binary, operator, **kw): ... + def visit_true(self, expr, **kw): ... + def visit_false(self, expr, **kw): ... + def get_cte_preamble(self, recursive): ... + def get_select_hint_text(self, byfroms): ... + def function_argspec(self, fn, **kw): ... + def default_from(self): ... + def visit_join(self, join, **kwargs): ... + def visit_outer_join_column(self, vc, **kw): ... + def visit_sequence(self, seq): ... + def get_render_as_alias_suffix(self, alias_name_text): ... + def returning_clause(self, stmt, returning_cols): ... + def visit_select(self, select, **kwargs): ... + def limit_clause(self, select, **kw): ... + def for_update_clause(self, select, **kw): ... + +class OracleDDLCompiler(compiler.DDLCompiler): + def define_constraint_cascades(self, constraint): ... + def visit_create_index(self, create): ... + def post_create_table(self, table): ... + +class OracleIdentifierPreparer(compiler.IdentifierPreparer): + reserved_words = ... # type: Any + illegal_initial_characters = ... # type: Any + def format_savepoint(self, savepoint): ... + +class OracleExecutionContext(default.DefaultExecutionContext): + def fire_sequence(self, seq, type_): ... + +class OracleDialect(default.DefaultDialect): + name = ... # type: str + supports_alter = ... # type: bool + supports_unicode_statements = ... # type: bool + supports_unicode_binds = ... # type: bool + max_identifier_length = ... # type: int + supports_sane_rowcount = ... # type: bool + supports_sane_multi_rowcount = ... # type: bool + supports_simple_order_by_label = ... # type: bool + supports_sequences = ... # type: bool + sequences_optional = ... # type: bool + postfetch_lastrowid = ... # type: bool + default_paramstyle = ... # type: str + colspecs = ... # type: Any + ischema_names = ... # type: Any + requires_name_normalize = ... # type: bool + supports_default_values = ... # type: bool + supports_empty_insert = ... # type: bool + statement_compiler = ... # type: Any + ddl_compiler = ... # type: Any + type_compiler = ... # type: Any + preparer = ... # type: Any + execution_ctx_cls = ... # type: Any + reflection_options = ... # type: Any + construct_arguments = ... # type: Any + use_ansi = ... # type: Any + optimize_limits = ... # type: Any + use_binds_for_limits = ... # type: Any + exclude_tablespaces = ... # type: Any + def __init__(self, use_ansi: bool = ..., optimize_limits: bool = ..., use_binds_for_limits: bool = ..., exclude_tablespaces: Any = ..., **kwargs) -> None: ... + implicit_returning = ... # type: Any + def initialize(self, connection): ... + def do_release_savepoint(self, connection, name): ... + def has_table(self, connection, table_name, schema: Optional[Any] = ...): ... + def has_sequence(self, connection, sequence_name, schema: Optional[Any] = ...): ... + def normalize_name(self, name): ... + def denormalize_name(self, name): ... + def get_schema_names(self, connection, **kw): ... + def get_table_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_temp_table_names(self, connection, **kw): ... + def get_view_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_table_options(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_columns(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_indexes(self, connection, table_name, schema: Optional[Any] = ..., resolve_synonyms: bool = ..., dblink: str = ..., **kw): ... + def get_pk_constraint(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_foreign_keys(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_view_definition(self, connection, view_name, schema: Optional[Any] = ..., resolve_synonyms: bool = ..., dblink: str = ..., **kw): ... + +class _OuterJoinColumn(elements.ClauseElement): + __visit_name__ = ... # type: str + column = ... # type: Any + def __init__(self, column) -> None: ... diff --git a/third_party/2and3/sqlalchemy/dialects/oracle/cx_oracle.pyi b/third_party/2and3/sqlalchemy/dialects/oracle/cx_oracle.pyi new file mode 100644 index 000000000000..782cb2fc2e50 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/oracle/cx_oracle.pyi @@ -0,0 +1,111 @@ +# Stubs for sqlalchemy.dialects.oracle.cx_oracle (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from sqlalchemy.sql import sqltypes +from .base import OracleCompiler as OracleCompiler, OracleDialect as OracleDialect, OracleExecutionContext as OracleExecutionContext +from . import base as oracle +from ...engine import result as _result + +class _OracleNumeric(sqltypes.Numeric): + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class _OracleDate(sqltypes.Date): + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class _LOBMixin(object): + def result_processor(self, dialect, coltype): ... + +class _NativeUnicodeMixin(object): + def bind_processor(self, dialect): ... + +class _OracleChar(_NativeUnicodeMixin, sqltypes.CHAR): + def get_dbapi_type(self, dbapi): ... + +class _OracleNVarChar(_NativeUnicodeMixin, sqltypes.NVARCHAR): + def get_dbapi_type(self, dbapi): ... + +class _OracleText(_LOBMixin, sqltypes.Text): + def get_dbapi_type(self, dbapi): ... + +class _OracleLong(oracle.LONG): + def get_dbapi_type(self, dbapi): ... + +class _OracleString(_NativeUnicodeMixin, sqltypes.String): ... + +class _OracleEnum(_NativeUnicodeMixin, sqltypes.Enum): + def bind_processor(self, dialect): ... + +class _OracleUnicodeText(_LOBMixin, _NativeUnicodeMixin, sqltypes.UnicodeText): + def get_dbapi_type(self, dbapi): ... + def result_processor(self, dialect, coltype): ... + +class _OracleInteger(sqltypes.Integer): + def result_processor(self, dialect, coltype): ... + +class _OracleBinary(_LOBMixin, sqltypes.LargeBinary): + def get_dbapi_type(self, dbapi): ... + def bind_processor(self, dialect): ... + +class _OracleInterval(oracle.INTERVAL): + def get_dbapi_type(self, dbapi): ... + +class _OracleRaw(oracle.RAW): ... + +class _OracleRowid(oracle.ROWID): + def get_dbapi_type(self, dbapi): ... + +class OracleCompiler_cx_oracle(OracleCompiler): + def bindparam_string(self, name, **kw): ... + +class OracleExecutionContext_cx_oracle(OracleExecutionContext): + out_parameters = ... # type: Any + def pre_exec(self): ... + def create_cursor(self): ... + def get_result_proxy(self): ... + +class OracleExecutionContext_cx_oracle_with_unicode(OracleExecutionContext_cx_oracle): + statement = ... # type: Any + def __init__(self, *arg, **kw) -> None: ... + +class ReturningResultProxy(_result.FullyBufferedResultProxy): + def __init__(self, context, returning_params) -> None: ... + +class OracleDialect_cx_oracle(OracleDialect): + execution_ctx_cls = ... # type: Any + statement_compiler = ... # type: Any + driver = ... # type: str + colspecs = ... # type: Any + execute_sequence_format = ... # type: Any + threaded = ... # type: Any + arraysize = ... # type: Any + allow_twophase = ... # type: Any + supports_timestamp = ... # type: Any + auto_setinputsizes = ... # type: Any + auto_convert_lobs = ... # type: Any + cx_oracle_ver = ... # type: Any + exclude_setinputsizes = ... # type: Any + supports_unicode_binds = ... # type: Any + coerce_to_unicode = ... # type: Any + supports_native_decimal = ... # type: Any + supports_unicode_statements = ... # type: bool + dbapi_type_map = ... # type: Any + def __init__(self, auto_setinputsizes: bool = ..., exclude_setinputsizes: Any = ..., auto_convert_lobs: bool = ..., threaded: bool = ..., allow_twophase: bool = ..., coerce_to_decimal: bool = ..., coerce_to_unicode: bool = ..., arraysize: int = ..., **kwargs) -> None: ... + @classmethod + def dbapi(cls): ... + def initialize(self, connection): ... + def on_connect(self): ... + def create_connect_args(self, url): ... + def is_disconnect(self, e, connection, cursor): ... + def create_xid(self): ... + def do_executemany(self, cursor, statement, parameters, context: Optional[Any] = ...): ... + def do_begin_twophase(self, connection, xid): ... + def do_prepare_twophase(self, connection, xid): ... + def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...): ... + def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...): ... + def do_recover_twophase(self, connection): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/oracle/zxjdbc.pyi b/third_party/2and3/sqlalchemy/dialects/oracle/zxjdbc.pyi new file mode 100644 index 000000000000..881f7311510a --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/oracle/zxjdbc.pyi @@ -0,0 +1,51 @@ +# Stubs for sqlalchemy.dialects.oracle.zxjdbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from sqlalchemy.sql import sqltypes +from sqlalchemy.connectors.zxJDBC import ZxJDBCConnector +from sqlalchemy.dialects.oracle.base import OracleCompiler, OracleDialect, OracleExecutionContext +from sqlalchemy.engine import result as _result + +SQLException = ... # type: Any +zxJDBC = ... # type: Any + +class _ZxJDBCDate(sqltypes.Date): + def result_processor(self, dialect, coltype): ... + +class _ZxJDBCNumeric(sqltypes.Numeric): + def result_processor(self, dialect, coltype): ... + +class OracleCompiler_zxjdbc(OracleCompiler): + returning_cols = ... # type: Any + returning_parameters = ... # type: Any + def returning_clause(self, stmt, returning_cols): ... + +class OracleExecutionContext_zxjdbc(OracleExecutionContext): + statement = ... # type: Any + def pre_exec(self): ... + def get_result_proxy(self): ... + def create_cursor(self): ... + +class ReturningResultProxy(_result.FullyBufferedResultProxy): + def __init__(self, context, returning_row) -> None: ... + +class ReturningParam(object): + type = ... # type: Any + def __init__(self, type) -> None: ... + def __eq__(self, other): ... + def __ne__(self, other): ... + +class OracleDialect_zxjdbc(ZxJDBCConnector, OracleDialect): + jdbc_db_name = ... # type: str + jdbc_driver_name = ... # type: str + statement_compiler = ... # type: Any + execution_ctx_cls = ... # type: Any + colspecs = ... # type: Any + DataHandler = ... # type: Any + def __init__(self, *args, **kwargs) -> None: ... + implicit_returning = ... # type: Any + def initialize(self, connection): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/__init__.pyi new file mode 100644 index 000000000000..04e072adbf34 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/__init__.pyi @@ -0,0 +1,14 @@ +# Stubs for sqlalchemy.dialects.postgresql (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from .base import INTEGER as INTEGER, BIGINT as BIGINT, SMALLINT as SMALLINT, VARCHAR as VARCHAR, CHAR as CHAR, TEXT as TEXT, NUMERIC as NUMERIC, FLOAT as FLOAT, REAL as REAL, INET as INET, CIDR as CIDR, UUID as UUID, BIT as BIT, MACADDR as MACADDR, OID as OID, DOUBLE_PRECISION as DOUBLE_PRECISION, TIMESTAMP as TIMESTAMP, TIME as TIME, DATE as DATE, BYTEA as BYTEA, BOOLEAN as BOOLEAN, INTERVAL as INTERVAL, ENUM as ENUM, DropEnumType as DropEnumType, CreateEnumType as CreateEnumType +from .hstore import HSTORE as HSTORE, hstore as hstore +from .json import JSON as JSON, JSONB as JSONB +from .array import array as array, ARRAY as ARRAY, Any as Any, All as All +from .ext import aggregate_order_by as aggregate_order_by, ExcludeConstraint as ExcludeConstraint, array_agg as array_agg +from .dml import insert as insert, Insert as Insert +from .ranges import INT4RANGE as INT4RANGE, INT8RANGE as INT8RANGE, NUMRANGE as NUMRANGE, DATERANGE as DATERANGE, TSRANGE as TSRANGE, TSTZRANGE as TSTZRANGE + +# Names in __all__ with no definition: +# json diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/array.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/array.pyi new file mode 100644 index 000000000000..beb9a5da5c67 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/array.pyi @@ -0,0 +1,42 @@ +# Stubs for sqlalchemy.dialects.postgresql.array (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .base import ischema_names as ischema_names +from ...sql import expression as expression, operators as operators +from ...sql.base import SchemaEventTarget as SchemaEventTarget +from ... import types as sqltypes +from uuid import UUID as _python_UUID + +def Any(other, arrexpr, operator: Any = ...): ... +def All(other, arrexpr, operator: Any = ...): ... + +class array(expression.Tuple): + __visit_name__ = ... # type: str + type = ... # type: Any + def __init__(self, clauses, **kw) -> None: ... + def self_group(self, against: Optional[Any] = ...): ... + +CONTAINS = ... # type: Any +CONTAINED_BY = ... # type: Any +OVERLAP = ... # type: Any + +class ARRAY(SchemaEventTarget, sqltypes.ARRAY): + class Comparator(sqltypes.ARRAY.Comparator): + def contains(self, other, **kwargs): ... + def contained_by(self, other): ... + def overlap(self, other): ... + comparator_factory = ... # type: Any + item_type = ... # type: Any + as_tuple = ... # type: Any + dimensions = ... # type: Any + zero_indexes = ... # type: Any + def __init__(self, item_type, as_tuple: bool = ..., dimensions: Optional[Any] = ..., zero_indexes: bool = ...) -> None: ... + @property + def hashable(self): ... + @property + def python_type(self): ... + def compare_values(self, x, y): ... + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/base.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/base.pyi new file mode 100644 index 000000000000..297eb4fce32f --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/base.pyi @@ -0,0 +1,224 @@ +# Stubs for sqlalchemy.dialects.postgresql.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from sqlalchemy.sql import compiler +from sqlalchemy import schema +from ...engine import default as default, reflection as reflection +from ...sql import compiler as compiler, expression as expression +from ... import types as sqltypes +from uuid import UUID as _python_UUID + +from sqlalchemy.types import INTEGER as INTEGER, BIGINT as BIGINT, SMALLINT as SMALLINT, VARCHAR as VARCHAR, \ + CHAR as CHAR, TEXT as TEXT, FLOAT as FLOAT, NUMERIC as NUMERIC, \ + DATE as DATE, BOOLEAN as BOOLEAN, REAL as REAL + +AUTOCOMMIT_REGEXP = ... # type: Any +RESERVED_WORDS = ... # type: Any + +class BYTEA(sqltypes.LargeBinary): + __visit_name__ = ... # type: str + +class DOUBLE_PRECISION(sqltypes.Float): + __visit_name__ = ... # type: str + +class INET(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +PGInet = ... # type: Any + +class CIDR(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +PGCidr = ... # type: Any + +class MACADDR(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +PGMacAddr = ... # type: Any + +class OID(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class TIMESTAMP(sqltypes.TIMESTAMP): + precision = ... # type: Any + def __init__(self, timezone: bool = ..., precision: Optional[Any] = ...) -> None: ... + +class TIME(sqltypes.TIME): + precision = ... # type: Any + def __init__(self, timezone: bool = ..., precision: Optional[Any] = ...) -> None: ... + +class INTERVAL(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + precision = ... # type: Any + def __init__(self, precision: Optional[Any] = ...) -> None: ... + @property + def python_type(self): ... + +PGInterval = ... # type: Any + +class BIT(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + length = ... # type: Any + varying = ... # type: Any + def __init__(self, length: Optional[Any] = ..., varying: bool = ...) -> None: ... + +PGBit = ... # type: Any + +class UUID(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + as_uuid = ... # type: Any + def __init__(self, as_uuid: bool = ...) -> None: ... + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +PGUuid = ... # type: Any + +class TSVECTOR(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class ENUM(sqltypes.Enum): + create_type = ... # type: Any + def __init__(self, *enums, **kw) -> None: ... + def create(self, bind: Optional[Any] = ..., checkfirst: bool = ...): ... + def drop(self, bind: Optional[Any] = ..., checkfirst: bool = ...): ... + +colspecs = ... # type: Any +ischema_names = ... # type: Any + +class PGCompiler(compiler.SQLCompiler): + def visit_array(self, element, **kw): ... + def visit_slice(self, element, **kw): ... + def visit_json_getitem_op_binary(self, binary, operator, **kw): ... + def visit_json_path_getitem_op_binary(self, binary, operator, **kw): ... + def visit_getitem_binary(self, binary, operator, **kw): ... + def visit_aggregate_order_by(self, element, **kw): ... + def visit_match_op_binary(self, binary, operator, **kw): ... + def visit_ilike_op_binary(self, binary, operator, **kw): ... + def visit_notilike_op_binary(self, binary, operator, **kw): ... + def render_literal_value(self, value, type_): ... + def visit_sequence(self, seq): ... + def limit_clause(self, select, **kw): ... + def format_from_hint_text(self, sqltext, table, hint, iscrud): ... + def get_select_precolumns(self, select, **kw): ... + def for_update_clause(self, select, **kw): ... + def returning_clause(self, stmt, returning_cols): ... + def visit_substring_func(self, func, **kw): ... + def visit_on_conflict_do_nothing(self, on_conflict, **kw): ... + def visit_on_conflict_do_update(self, on_conflict, **kw): ... + +class PGDDLCompiler(compiler.DDLCompiler): + def get_column_specification(self, column, **kwargs): ... + def visit_create_enum_type(self, create): ... + def visit_drop_enum_type(self, drop): ... + def visit_create_index(self, create): ... + def visit_drop_index(self, drop): ... + def visit_exclude_constraint(self, constraint, **kw): ... + def post_create_table(self, table): ... + +class PGTypeCompiler(compiler.GenericTypeCompiler): + def visit_TSVECTOR(self, type, **kw): ... + def visit_INET(self, type_, **kw): ... + def visit_CIDR(self, type_, **kw): ... + def visit_MACADDR(self, type_, **kw): ... + def visit_OID(self, type_, **kw): ... + def visit_FLOAT(self, type_, **kw): ... + def visit_DOUBLE_PRECISION(self, type_, **kw): ... + def visit_BIGINT(self, type_, **kw): ... + def visit_HSTORE(self, type_, **kw): ... + def visit_JSON(self, type_, **kw): ... + def visit_JSONB(self, type_, **kw): ... + def visit_INT4RANGE(self, type_, **kw): ... + def visit_INT8RANGE(self, type_, **kw): ... + def visit_NUMRANGE(self, type_, **kw): ... + def visit_DATERANGE(self, type_, **kw): ... + def visit_TSRANGE(self, type_, **kw): ... + def visit_TSTZRANGE(self, type_, **kw): ... + def visit_datetime(self, type_, **kw): ... + def visit_enum(self, type_, **kw): ... + def visit_ENUM(self, type_, **kw): ... + def visit_TIMESTAMP(self, type_, **kw): ... + def visit_TIME(self, type_, **kw): ... + def visit_INTERVAL(self, type_, **kw): ... + def visit_BIT(self, type_, **kw): ... + def visit_UUID(self, type_, **kw): ... + def visit_large_binary(self, type_, **kw): ... + def visit_BYTEA(self, type_, **kw): ... + def visit_ARRAY(self, type_, **kw): ... + +class PGIdentifierPreparer(compiler.IdentifierPreparer): + reserved_words = ... # type: Any + def format_type(self, type_, use_schema: bool = ...): ... + +class PGInspector(reflection.Inspector): + def __init__(self, conn) -> None: ... + def get_table_oid(self, table_name, schema: Optional[Any] = ...): ... + def get_enums(self, schema: Optional[Any] = ...): ... + def get_foreign_table_names(self, schema: Optional[Any] = ...): ... + def get_view_names(self, schema: Optional[Any] = ..., include: Any = ...): ... + +class CreateEnumType(schema._CreateDropBase): + __visit_name__ = ... # type: str + +class DropEnumType(schema._CreateDropBase): + __visit_name__ = ... # type: str + +class PGExecutionContext(default.DefaultExecutionContext): + def fire_sequence(self, seq, type_): ... + def get_insert_default(self, column): ... + def should_autocommit_text(self, statement): ... + +class PGDialect(default.DefaultDialect): + name = ... # type: str + supports_alter = ... # type: bool + max_identifier_length = ... # type: int + supports_sane_rowcount = ... # type: bool + supports_native_enum = ... # type: bool + supports_native_boolean = ... # type: bool + supports_smallserial = ... # type: bool + supports_sequences = ... # type: bool + sequences_optional = ... # type: bool + preexecute_autoincrement_sequences = ... # type: bool + postfetch_lastrowid = ... # type: bool + supports_default_values = ... # type: bool + supports_empty_insert = ... # type: bool + supports_multivalues_insert = ... # type: bool + default_paramstyle = ... # type: str + ischema_names = ... # type: Any + colspecs = ... # type: Any + statement_compiler = ... # type: Any + ddl_compiler = ... # type: Any + type_compiler = ... # type: Any + preparer = ... # type: Any + execution_ctx_cls = ... # type: Any + inspector = ... # type: Any + isolation_level = ... # type: Any + construct_arguments = ... # type: Any + reflection_options = ... # type: Any + def __init__(self, isolation_level: Optional[Any] = ..., json_serializer: Optional[Any] = ..., json_deserializer: Optional[Any] = ..., **kwargs) -> None: ... + implicit_returning = ... # type: Any + def initialize(self, connection): ... + def on_connect(self): ... + def set_isolation_level(self, connection, level): ... + def get_isolation_level(self, connection): ... + def do_begin_twophase(self, connection, xid): ... + def do_prepare_twophase(self, connection, xid): ... + def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...): ... + def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...): ... + def do_recover_twophase(self, connection): ... + def has_schema(self, connection, schema): ... + def has_table(self, connection, table_name, schema: Optional[Any] = ...): ... + def has_sequence(self, connection, sequence_name, schema: Optional[Any] = ...): ... + def has_type(self, connection, type_name, schema: Optional[Any] = ...): ... + def get_table_oid(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_schema_names(self, connection, **kw): ... + def get_table_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_view_names(self, connection, schema: Optional[Any] = ..., include: Any = ..., **kw): ... + def get_view_definition(self, connection, view_name, schema: Optional[Any] = ..., **kw): ... + def get_columns(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_pk_constraint(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_foreign_keys(self, connection, table_name, schema: Optional[Any] = ..., postgresql_ignore_search_path: bool = ..., **kw): ... + def get_indexes(self, connection, table_name, schema, **kw): ... + def get_unique_constraints(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_check_constraints(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/dml.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/dml.pyi new file mode 100644 index 000000000000..e97ec99d1a5c --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/dml.pyi @@ -0,0 +1,30 @@ +# Stubs for sqlalchemy.dialects.postgresql.dml (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ...sql.elements import ClauseElement +from ...sql.dml import Insert as StandardInsert + +class Insert(StandardInsert): + @property + def excluded(self): ... + def on_conflict_do_update(self, constraint: Optional[Any] = ..., index_elements: Optional[Any] = ..., index_where: Optional[Any] = ..., set_: Optional[Any] = ..., where: Optional[Any] = ...): ... + def on_conflict_do_nothing(self, constraint: Optional[Any] = ..., index_elements: Optional[Any] = ..., index_where: Optional[Any] = ...): ... + +insert = ... # type: Any + +class OnConflictClause(ClauseElement): + constraint_target = ... # type: Any + inferred_target_elements = ... # type: Any + inferred_target_whereclause = ... # type: Any + def __init__(self, constraint: Optional[Any] = ..., index_elements: Optional[Any] = ..., index_where: Optional[Any] = ...) -> None: ... + +class OnConflictDoNothing(OnConflictClause): + __visit_name__ = ... # type: str + +class OnConflictDoUpdate(OnConflictClause): + __visit_name__ = ... # type: str + update_values_to_set = ... # type: Any + update_whereclause = ... # type: Any + def __init__(self, constraint: Optional[Any] = ..., index_elements: Optional[Any] = ..., index_where: Optional[Any] = ..., set_: Optional[Any] = ..., where: Optional[Any] = ...) -> None: ... diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/ext.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/ext.pyi new file mode 100644 index 000000000000..2b8f3c3f7c5c --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/ext.pyi @@ -0,0 +1,28 @@ +# Stubs for sqlalchemy.dialects.postgresql.ext (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ...sql import expression as expression +from ...sql import elements as elements +from ...sql import functions as functions +from ...sql.schema import ColumnCollectionConstraint as ColumnCollectionConstraint +from .array import ARRAY as ARRAY + +class aggregate_order_by(expression.ColumnElement): + __visit_name__ = ... # type: str + target = ... # type: Any + order_by = ... # type: Any + def __init__(self, target, order_by) -> None: ... + def self_group(self, against: Optional[Any] = ...): ... + def get_children(self, **kwargs): ... + +class ExcludeConstraint(ColumnCollectionConstraint): + __visit_name__ = ... # type: str + where = ... # type: Any + operators = ... # type: Any + using = ... # type: Any + def __init__(self, *elements, **kw) -> None: ... + def copy(self, **kw): ... + +def array_agg(*arg, **kw): ... diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/hstore.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/hstore.pyi new file mode 100644 index 000000000000..5b72db9ba5a7 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/hstore.pyi @@ -0,0 +1,48 @@ +# Stubs for sqlalchemy.dialects.postgresql.hstore (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ... import types as sqltypes +from ...sql import functions as sqlfunc + +class HSTORE(sqltypes.Indexable, sqltypes.Concatenable, sqltypes.TypeEngine): + __visit_name__ = ... # type: str + hashable = ... # type: bool + text_type = ... # type: Any + def __init__(self, text_type: Optional[Any] = ...) -> None: ... + comparator_factory = ... # type: Any + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class hstore(sqlfunc.GenericFunction): + type = ... # type: Any + name = ... # type: str + +class _HStoreDefinedFunction(sqlfunc.GenericFunction): + type = ... # type: Any + name = ... # type: str + +class _HStoreDeleteFunction(sqlfunc.GenericFunction): + type = ... # type: Any + name = ... # type: str + +class _HStoreSliceFunction(sqlfunc.GenericFunction): + type = ... # type: Any + name = ... # type: str + +class _HStoreKeysFunction(sqlfunc.GenericFunction): + type = ... # type: Any + name = ... # type: str + +class _HStoreValsFunction(sqlfunc.GenericFunction): + type = ... # type: Any + name = ... # type: str + +class _HStoreArrayFunction(sqlfunc.GenericFunction): + type = ... # type: Any + name = ... # type: str + +class _HStoreMatrixFunction(sqlfunc.GenericFunction): + type = ... # type: Any + name = ... # type: str diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/json.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/json.pyi new file mode 100644 index 000000000000..914fa00189e8 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/json.pyi @@ -0,0 +1,28 @@ +# Stubs for sqlalchemy.dialects.postgresql.json (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ... import types as sqltypes + +class JSONPathType(sqltypes.JSON.JSONPathType): + def bind_processor(self, dialect): ... + def literal_processor(self, dialect): ... + +class JSON(sqltypes.JSON): + astext_type = ... # type: Any + def __init__(self, none_as_null: bool = ..., astext_type: Optional[Any] = ...) -> None: ... + class Comparator(sqltypes.JSON.Comparator): + @property + def astext(self): ... + comparator_factory = ... # type: Any + +class JSONB(JSON): + __visit_name__ = ... # type: str + class Comparator(JSON.Comparator): + def has_key(self, other): ... + def has_all(self, other): ... + def has_any(self, other): ... + def contains(self, other, **kwargs): ... + def contained_by(self, other): ... + comparator_factory = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/pg8000.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/pg8000.pyi new file mode 100644 index 000000000000..06e197bf7d69 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/pg8000.pyi @@ -0,0 +1,54 @@ +# Stubs for sqlalchemy.dialects.postgresql.pg8000 (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ... import types as sqltypes +from .base import PGDialect as PGDialect, PGCompiler as PGCompiler, PGIdentifierPreparer as PGIdentifierPreparer, PGExecutionContext as PGExecutionContext +from sqlalchemy.dialects.postgresql.json import JSON + +class _PGNumeric(sqltypes.Numeric): + def result_processor(self, dialect, coltype): ... + +class _PGNumericNoBind(_PGNumeric): + def bind_processor(self, dialect): ... + +class _PGJSON(JSON): + def result_processor(self, dialect, coltype): ... + +class PGExecutionContext_pg8000(PGExecutionContext): ... + +class PGCompiler_pg8000(PGCompiler): + def visit_mod_binary(self, binary, operator, **kw): ... + def post_process_text(self, text): ... + +class PGIdentifierPreparer_pg8000(PGIdentifierPreparer): ... + +class PGDialect_pg8000(PGDialect): + driver = ... # type: str + supports_unicode_statements = ... # type: bool + supports_unicode_binds = ... # type: bool + default_paramstyle = ... # type: str + supports_sane_multi_rowcount = ... # type: bool + execution_ctx_cls = ... # type: Any + statement_compiler = ... # type: Any + preparer = ... # type: Any + description_encoding = ... # type: str + colspecs = ... # type: Any + client_encoding = ... # type: Any + def __init__(self, client_encoding: Optional[Any] = ..., **kwargs) -> None: ... + def initialize(self, connection): ... + @classmethod + def dbapi(cls): ... + def create_connect_args(self, url): ... + def is_disconnect(self, e, connection, cursor): ... + def set_isolation_level(self, connection, level): ... + def set_client_encoding(self, connection, client_encoding): ... + def do_begin_twophase(self, connection, xid): ... + def do_prepare_twophase(self, connection, xid): ... + def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...): ... + def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...): ... + def do_recover_twophase(self, connection): ... + def on_connect(self): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2.pyi new file mode 100644 index 000000000000..8ed09276d955 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2.pyi @@ -0,0 +1,76 @@ +# Stubs for sqlalchemy.dialects.postgresql.psycopg2 (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ...engine import result as _result +from ...sql import expression as expression +from ... import types as sqltypes +from .base import PGDialect as PGDialect, PGCompiler as PGCompiler, PGIdentifierPreparer as PGIdentifierPreparer, PGExecutionContext as PGExecutionContext, ENUM as ENUM, UUID as UUID +from .hstore import HSTORE as HSTORE +from .json import JSON as JSON, JSONB as JSONB +from uuid import UUID as _python_UUID + +logger = ... # type: Any + +class _PGNumeric(sqltypes.Numeric): + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class _PGEnum(ENUM): + convert_unicode = ... # type: str + def result_processor(self, dialect, coltype): ... + +class _PGHStore(HSTORE): + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class _PGJSON(JSON): + def result_processor(self, dialect, coltype): ... + +class _PGJSONB(JSONB): + def result_processor(self, dialect, coltype): ... + +class _PGUUID(UUID): + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class PGExecutionContext_psycopg2(PGExecutionContext): + def create_server_side_cursor(self): ... + def get_result_proxy(self): ... + +class PGCompiler_psycopg2(PGCompiler): + def visit_mod_binary(self, binary, operator, **kw): ... + def post_process_text(self, text): ... + +class PGIdentifierPreparer_psycopg2(PGIdentifierPreparer): ... + +class PGDialect_psycopg2(PGDialect): + driver = ... # type: str + supports_unicode_statements = ... # type: bool + supports_server_side_cursors = ... # type: bool + default_paramstyle = ... # type: str + supports_sane_multi_rowcount = ... # type: bool + execution_ctx_cls = ... # type: Any + statement_compiler = ... # type: Any + preparer = ... # type: Any + psycopg2_version = ... # type: Any + FEATURE_VERSION_MAP = ... # type: Any + engine_config_types = ... # type: Any + colspecs = ... # type: Any + server_side_cursors = ... # type: Any + use_native_unicode = ... # type: Any + use_native_hstore = ... # type: Any + use_native_uuid = ... # type: Any + supports_unicode_binds = ... # type: Any + client_encoding = ... # type: Any + def __init__(self, server_side_cursors: bool = ..., use_native_unicode: bool = ..., client_encoding: Optional[Any] = ..., use_native_hstore: bool = ..., use_native_uuid: bool = ..., **kwargs) -> None: ... + def initialize(self, connection): ... + @classmethod + def dbapi(cls): ... + def set_isolation_level(self, connection, level): ... + def on_connect(self): ... + def create_connect_args(self, url): ... + def is_disconnect(self, e, connection, cursor): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2cffi.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2cffi.pyi new file mode 100644 index 000000000000..da1d5b2bf9aa --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2cffi.pyi @@ -0,0 +1,15 @@ +# Stubs for sqlalchemy.dialects.postgresql.psycopg2cffi (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .psycopg2 import PGDialect_psycopg2 as PGDialect_psycopg2 + +class PGDialect_psycopg2cffi(PGDialect_psycopg2): + driver = ... # type: str + supports_unicode_statements = ... # type: bool + FEATURE_VERSION_MAP = ... # type: Any + @classmethod + def dbapi(cls): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/pygresql.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/pygresql.pyi new file mode 100644 index 000000000000..66e6f290f08b --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/pygresql.pyi @@ -0,0 +1,56 @@ +# Stubs for sqlalchemy.dialects.postgresql.pygresql (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from ...types import Numeric as Numeric +from ...types import JSON as Json +from ...sql.elements import Null as Null +from .base import PGDialect as PGDialect, PGCompiler as PGCompiler, PGIdentifierPreparer as PGIdentifierPreparer, UUID as UUID +from .hstore import HSTORE as HSTORE +from .json import JSON as JSON, JSONB as JSONB + +class _PGNumeric(Numeric): + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class _PGHStore(HSTORE): + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class _PGJSON(JSON): + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class _PGJSONB(JSONB): + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class _PGUUID(UUID): + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class _PGCompiler(PGCompiler): + def visit_mod_binary(self, binary, operator, **kw): ... + def post_process_text(self, text): ... + +class _PGIdentifierPreparer(PGIdentifierPreparer): ... + +class PGDialect_pygresql(PGDialect): + driver = ... # type: str + statement_compiler = ... # type: Any + preparer = ... # type: Any + @classmethod + def dbapi(cls): ... + colspecs = ... # type: Any + dbapi_version = ... # type: Any + supports_unicode_statements = ... # type: bool + supports_unicode_binds = ... # type: bool + has_native_hstore = ... # type: Any + has_native_json = ... # type: Any + has_native_uuid = ... # type: Any + def __init__(self, **kwargs) -> None: ... + def create_connect_args(self, url): ... + def is_disconnect(self, e, connection, cursor): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi new file mode 100644 index 000000000000..20889e53374f --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi @@ -0,0 +1,32 @@ +# Stubs for sqlalchemy.dialects.postgresql.pypostgresql (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from ... import types as sqltypes +from .base import PGDialect as PGDialect, PGExecutionContext as PGExecutionContext + +class PGNumeric(sqltypes.Numeric): + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class PGExecutionContext_pypostgresql(PGExecutionContext): ... + +class PGDialect_pypostgresql(PGDialect): + driver = ... # type: str + supports_unicode_statements = ... # type: bool + supports_unicode_binds = ... # type: bool + description_encoding = ... # type: Any + default_paramstyle = ... # type: str + supports_sane_rowcount = ... # type: bool + supports_sane_multi_rowcount = ... # type: bool + execution_ctx_cls = ... # type: Any + colspecs = ... # type: Any + @classmethod + def dbapi(cls): ... + @property + def dbapi_exception_translation_map(self): ... + def create_connect_args(self, url): ... + def is_disconnect(self, e, connection, cursor): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi new file mode 100644 index 000000000000..e787406496b0 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi @@ -0,0 +1,27 @@ +# Stubs for sqlalchemy.dialects.postgresql.ranges (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from ... import types as sqltypes + +class RangeOperators(object): + comparator_factory = ... # type: Any + +class INT4RANGE(RangeOperators, sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class INT8RANGE(RangeOperators, sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class NUMRANGE(RangeOperators, sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class DATERANGE(RangeOperators, sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class TSRANGE(RangeOperators, sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class TSTZRANGE(RangeOperators, sqltypes.TypeEngine): + __visit_name__ = ... # type: str diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/zxjdbc.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/zxjdbc.pyi new file mode 100644 index 000000000000..ce4c8cfa1c9f --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/zxjdbc.pyi @@ -0,0 +1,20 @@ +# Stubs for sqlalchemy.dialects.postgresql.zxjdbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from ...connectors.zxJDBC import ZxJDBCConnector as ZxJDBCConnector +from .base import PGDialect as PGDialect, PGExecutionContext as PGExecutionContext + +class PGExecutionContext_zxjdbc(PGExecutionContext): + def create_cursor(self): ... + +class PGDialect_zxjdbc(ZxJDBCConnector, PGDialect): + jdbc_db_name = ... # type: str + jdbc_driver_name = ... # type: str + execution_ctx_cls = ... # type: Any + supports_native_decimal = ... # type: bool + DataHandler = ... # type: Any + def __init__(self, *args, **kwargs) -> None: ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/sqlite/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/sqlite/__init__.pyi new file mode 100644 index 000000000000..3514fe981027 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/sqlite/__init__.pyi @@ -0,0 +1,5 @@ +# Stubs for sqlalchemy.dialects.sqlite (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from sqlalchemy.dialects.sqlite.base import BLOB as BLOB, BOOLEAN as BOOLEAN, CHAR as CHAR, DATE as DATE, DATETIME as DATETIME, DECIMAL as DECIMAL, FLOAT as FLOAT, INTEGER as INTEGER, REAL as REAL, NUMERIC as NUMERIC, SMALLINT as SMALLINT, TEXT as TEXT, TIME as TIME, TIMESTAMP as TIMESTAMP, VARCHAR as VARCHAR diff --git a/third_party/2and3/sqlalchemy/dialects/sqlite/base.pyi b/third_party/2and3/sqlalchemy/dialects/sqlite/base.pyi new file mode 100644 index 000000000000..e278395411d9 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/sqlite/base.pyi @@ -0,0 +1,106 @@ +# Stubs for sqlalchemy.dialects.sqlite.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from sqlalchemy.sql import compiler +from ... import types as sqltypes, schema as sa_schema +from ...engine import default as default, reflection as reflection +from ...sql import compiler as compiler +from ...types import BLOB as BLOB, BOOLEAN as BOOLEAN, CHAR as CHAR, DECIMAL as DECIMAL, FLOAT as FLOAT, INTEGER as INTEGER, REAL as REAL, NUMERIC as NUMERIC, SMALLINT as SMALLINT, TEXT as TEXT, TIMESTAMP as TIMESTAMP, VARCHAR as VARCHAR + +class _DateTimeMixin(object): + def __init__(self, storage_format: Optional[Any] = ..., regexp: Optional[Any] = ..., **kw) -> None: ... + @property + def format_is_text_affinity(self): ... + def adapt(self, *args, **kw): ... + def literal_processor(self, dialect): ... + +class DATETIME(_DateTimeMixin, sqltypes.DateTime): + def __init__(self, *args, **kwargs) -> None: ... + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class DATE(_DateTimeMixin, sqltypes.Date): + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class TIME(_DateTimeMixin, sqltypes.Time): + def __init__(self, *args, **kwargs) -> None: ... + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +colspecs = ... # type: Any +ischema_names = ... # type: Any + +class SQLiteCompiler(compiler.SQLCompiler): + extract_map = ... # type: Any + def visit_now_func(self, fn, **kw): ... + def visit_localtimestamp_func(self, func, **kw): ... + def visit_true(self, expr, **kw): ... + def visit_false(self, expr, **kw): ... + def visit_char_length_func(self, fn, **kw): ... + def visit_cast(self, cast, **kwargs): ... + def visit_extract(self, extract, **kw): ... + def limit_clause(self, select, **kw): ... + def for_update_clause(self, select, **kw): ... + def visit_is_distinct_from_binary(self, binary, operator, **kw): ... + def visit_isnot_distinct_from_binary(self, binary, operator, **kw): ... + +class SQLiteDDLCompiler(compiler.DDLCompiler): + def get_column_specification(self, column, **kwargs): ... + def visit_primary_key_constraint(self, constraint): ... + def visit_foreign_key_constraint(self, constraint): ... + def define_constraint_remote_table(self, constraint, table, preparer): ... + def visit_create_index(self, create, include_schema: bool = ..., include_table_schema: bool = ...): ... + +class SQLiteTypeCompiler(compiler.GenericTypeCompiler): + def visit_large_binary(self, type_, **kw): ... + def visit_DATETIME(self, type_, **kw): ... + def visit_DATE(self, type_, **kw): ... + def visit_TIME(self, type_, **kw): ... + +class SQLiteIdentifierPreparer(compiler.IdentifierPreparer): + reserved_words = ... # type: Any + def format_index(self, index, use_schema: bool = ..., name: Optional[Any] = ...): ... + +class SQLiteExecutionContext(default.DefaultExecutionContext): ... + +class SQLiteDialect(default.DefaultDialect): + name = ... # type: str + supports_alter = ... # type: bool + supports_unicode_statements = ... # type: bool + supports_unicode_binds = ... # type: bool + supports_default_values = ... # type: bool + supports_empty_insert = ... # type: bool + supports_cast = ... # type: bool + supports_multivalues_insert = ... # type: bool + default_paramstyle = ... # type: str + execution_ctx_cls = ... # type: Any + statement_compiler = ... # type: Any + ddl_compiler = ... # type: Any + type_compiler = ... # type: Any + preparer = ... # type: Any + ischema_names = ... # type: Any + colspecs = ... # type: Any + isolation_level = ... # type: Any + construct_arguments = ... # type: Any + native_datetime = ... # type: Any + supports_right_nested_joins = ... # type: Any + def __init__(self, isolation_level: Optional[Any] = ..., native_datetime: bool = ..., **kwargs) -> None: ... + def set_isolation_level(self, connection, level): ... + def get_isolation_level(self, connection): ... + def on_connect(self): ... + def get_schema_names(self, connection, **kw): ... + def get_table_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_temp_table_names(self, connection, **kw): ... + def get_temp_view_names(self, connection, **kw): ... + def has_table(self, connection, table_name, schema: Optional[Any] = ...): ... + def get_view_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_view_definition(self, connection, view_name, schema: Optional[Any] = ..., **kw): ... + def get_columns(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_pk_constraint(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_foreign_keys(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_unique_constraints(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_check_constraints(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_indexes(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... diff --git a/third_party/2and3/sqlalchemy/dialects/sqlite/pysqlcipher.pyi b/third_party/2and3/sqlalchemy/dialects/sqlite/pysqlcipher.pyi new file mode 100644 index 000000000000..470783db5823 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/sqlite/pysqlcipher.pyi @@ -0,0 +1,19 @@ +# Stubs for sqlalchemy.dialects.sqlite.pysqlcipher (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .pysqlite import SQLiteDialect_pysqlite as SQLiteDialect_pysqlite +from ...engine import url as _url + +class SQLiteDialect_pysqlcipher(SQLiteDialect_pysqlite): + driver = ... # type: str + pragmas = ... # type: Any + @classmethod + def dbapi(cls): ... + @classmethod + def get_pool_class(cls, url): ... + def connect(self, *cargs, **cparams): ... + def create_connect_args(self, url): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/sqlite/pysqlite.pyi b/third_party/2and3/sqlalchemy/dialects/sqlite/pysqlite.pyi new file mode 100644 index 000000000000..44e1e7024d16 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/sqlite/pysqlite.pyi @@ -0,0 +1,30 @@ +# Stubs for sqlalchemy.dialects.sqlite.pysqlite (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from sqlalchemy.dialects.sqlite.base import SQLiteDialect, DATETIME, DATE +from sqlalchemy import types as sqltypes + +class _SQLite_pysqliteTimeStamp(DATETIME): + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class _SQLite_pysqliteDate(DATE): + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class SQLiteDialect_pysqlite(SQLiteDialect): + default_paramstyle = ... # type: str + colspecs = ... # type: Any + description_encoding = ... # type: Any + driver = ... # type: str + def __init__(self, **kwargs) -> None: ... + @classmethod + def dbapi(cls): ... + @classmethod + def get_pool_class(cls, url): ... + def create_connect_args(self, url): ... + def is_disconnect(self, e, connection, cursor): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/sybase/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/sybase/__init__.pyi new file mode 100644 index 000000000000..103cebc51705 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/sybase/__init__.pyi @@ -0,0 +1,5 @@ +# Stubs for sqlalchemy.dialects.sybase (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from .base import CHAR as CHAR, VARCHAR as VARCHAR, TIME as TIME, NCHAR as NCHAR, NVARCHAR as NVARCHAR, TEXT as TEXT, DATE as DATE, DATETIME as DATETIME, FLOAT as FLOAT, NUMERIC as NUMERIC, BIGINT as BIGINT, INT as INT, INTEGER as INTEGER, SMALLINT as SMALLINT, BINARY as BINARY, VARBINARY as VARBINARY, UNITEXT as UNITEXT, UNICHAR as UNICHAR, UNIVARCHAR as UNIVARCHAR, IMAGE as IMAGE, BIT as BIT, MONEY as MONEY, SMALLMONEY as SMALLMONEY, TINYINT as TINYINT diff --git a/third_party/2and3/sqlalchemy/dialects/sybase/base.pyi b/third_party/2and3/sqlalchemy/dialects/sybase/base.pyi new file mode 100644 index 000000000000..a44d057ba4f5 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/sybase/base.pyi @@ -0,0 +1,120 @@ +# Stubs for sqlalchemy.dialects.sybase.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from sqlalchemy.sql import compiler +from sqlalchemy.engine import default, reflection +from sqlalchemy import types as sqltypes +from sqlalchemy.sql import operators as sql_operators +from sqlalchemy import schema as sa_schema +from sqlalchemy.types import CHAR as CHAR, VARCHAR as VARCHAR, TIME as TIME, NCHAR as NCHAR, NVARCHAR as NVARCHAR,\ + TEXT as TEXT, DATE as DATE, DATETIME as DATETIME, FLOAT as FLOAT, NUMERIC as NUMERIC,\ + BIGINT as BIGINT, INT as INT, INTEGER as INTEGER, SMALLINT as SMALLINT, BINARY as BINARY,\ + VARBINARY as VARBINARY, DECIMAL as DECIMAL, TIMESTAMP as TIMESTAMP, Unicode,\ + UnicodeText, REAL as REAL + +RESERVED_WORDS = ... # type: Any + +class _SybaseUnitypeMixin(object): + def result_processor(self, dialect, coltype): ... + +class UNICHAR(_SybaseUnitypeMixin, sqltypes.Unicode): + __visit_name__ = ... # type: str + +class UNIVARCHAR(_SybaseUnitypeMixin, sqltypes.Unicode): + __visit_name__ = ... # type: str + +class UNITEXT(_SybaseUnitypeMixin, sqltypes.UnicodeText): + __visit_name__ = ... # type: str + +class TINYINT(sqltypes.Integer): + __visit_name__ = ... # type: str + +class BIT(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class MONEY(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class SMALLMONEY(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class UNIQUEIDENTIFIER(sqltypes.TypeEngine): + __visit_name__ = ... # type: str + +class IMAGE(sqltypes.LargeBinary): + __visit_name__ = ... # type: str + +class SybaseTypeCompiler(compiler.GenericTypeCompiler): + def visit_large_binary(self, type_, **kw): ... + def visit_boolean(self, type_, **kw): ... + def visit_unicode(self, type_, **kw): ... + def visit_UNICHAR(self, type_, **kw): ... + def visit_UNIVARCHAR(self, type_, **kw): ... + def visit_UNITEXT(self, type_, **kw): ... + def visit_TINYINT(self, type_, **kw): ... + def visit_IMAGE(self, type_, **kw): ... + def visit_BIT(self, type_, **kw): ... + def visit_MONEY(self, type_, **kw): ... + def visit_SMALLMONEY(self, type_, **kw): ... + def visit_UNIQUEIDENTIFIER(self, type_, **kw): ... + +ischema_names = ... # type: Any + +class SybaseInspector(reflection.Inspector): + def __init__(self, conn) -> None: ... + def get_table_id(self, table_name, schema: Optional[Any] = ...): ... + +class SybaseExecutionContext(default.DefaultExecutionContext): + def set_ddl_autocommit(self, connection, value): ... + def pre_exec(self): ... + def post_exec(self): ... + def get_lastrowid(self): ... + +class SybaseSQLCompiler(compiler.SQLCompiler): + ansi_bind_rules = ... # type: bool + extract_map = ... # type: Any + def get_select_precolumns(self, select, **kw): ... + def get_from_hint_text(self, table, text): ... + def limit_clause(self, select, **kw): ... + def visit_extract(self, extract, **kw): ... + def visit_now_func(self, fn, **kw): ... + def for_update_clause(self, select): ... + def order_by_clause(self, select, **kw): ... + +class SybaseDDLCompiler(compiler.DDLCompiler): + def get_column_specification(self, column, **kwargs): ... + def visit_drop_index(self, drop): ... + +class SybaseIdentifierPreparer(compiler.IdentifierPreparer): + reserved_words = ... # type: Any + +class SybaseDialect(default.DefaultDialect): + name = ... # type: str + supports_unicode_statements = ... # type: bool + supports_sane_rowcount = ... # type: bool + supports_sane_multi_rowcount = ... # type: bool + supports_native_boolean = ... # type: bool + supports_unicode_binds = ... # type: bool + postfetch_lastrowid = ... # type: bool + colspecs = ... # type: Any + ischema_names = ... # type: Any + type_compiler = ... # type: Any + statement_compiler = ... # type: Any + ddl_compiler = ... # type: Any + preparer = ... # type: Any + inspector = ... # type: Any + construct_arguments = ... # type: Any + max_identifier_length = ... # type: int + def initialize(self, connection): ... + def get_table_id(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_columns(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_foreign_keys(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_indexes(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_pk_constraint(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_schema_names(self, connection, **kw): ... + def get_table_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_view_definition(self, connection, view_name, schema: Optional[Any] = ..., **kw): ... + def get_view_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def has_table(self, connection, table_name, schema: Optional[Any] = ...): ... diff --git a/third_party/2and3/sqlalchemy/dialects/sybase/mxodbc.pyi b/third_party/2and3/sqlalchemy/dialects/sybase/mxodbc.pyi new file mode 100644 index 000000000000..14ca51609a0b --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/sybase/mxodbc.pyi @@ -0,0 +1,15 @@ +# Stubs for sqlalchemy.dialects.sybase.mxodbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from sqlalchemy.dialects.sybase.base import SybaseDialect +from sqlalchemy.dialects.sybase.base import SybaseExecutionContext +from sqlalchemy.connectors.mxodbc import MxODBCConnector + +class SybaseExecutionContext_mxodbc(SybaseExecutionContext): ... + +class SybaseDialect_mxodbc(MxODBCConnector, SybaseDialect): + execution_ctx_cls = ... # type: Any + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/sybase/pyodbc.pyi b/third_party/2and3/sqlalchemy/dialects/sybase/pyodbc.pyi new file mode 100644 index 000000000000..e770c34f1f5b --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/sybase/pyodbc.pyi @@ -0,0 +1,20 @@ +# Stubs for sqlalchemy.dialects.sybase.pyodbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from sqlalchemy.dialects.sybase.base import SybaseDialect, SybaseExecutionContext +from sqlalchemy.connectors.pyodbc import PyODBCConnector +from sqlalchemy import types as sqltypes + +class _SybNumeric_pyodbc(sqltypes.Numeric): + def bind_processor(self, dialect): ... + +class SybaseExecutionContext_pyodbc(SybaseExecutionContext): + def set_ddl_autocommit(self, connection, value): ... + +class SybaseDialect_pyodbc(PyODBCConnector, SybaseDialect): + execution_ctx_cls = ... # type: Any + colspecs = ... # type: Any + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/sybase/pysybase.pyi b/third_party/2and3/sqlalchemy/dialects/sybase/pysybase.pyi new file mode 100644 index 000000000000..aa244a664863 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/sybase/pysybase.pyi @@ -0,0 +1,30 @@ +# Stubs for sqlalchemy.dialects.sybase.pysybase (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from sqlalchemy import types as sqltypes +from sqlalchemy.dialects.sybase.base import SybaseDialect, SybaseExecutionContext, SybaseSQLCompiler + +class _SybNumeric(sqltypes.Numeric): + def result_processor(self, dialect, type_): ... + +class SybaseExecutionContext_pysybase(SybaseExecutionContext): + def set_ddl_autocommit(self, dbapi_connection, value): ... + def pre_exec(self): ... + +class SybaseSQLCompiler_pysybase(SybaseSQLCompiler): + def bindparam_string(self, name, **kw): ... + +class SybaseDialect_pysybase(SybaseDialect): + driver = ... # type: str + execution_ctx_cls = ... # type: Any + statement_compiler = ... # type: Any + colspecs = ... # type: Any + @classmethod + def dbapi(cls): ... + def create_connect_args(self, url): ... + def do_executemany(self, cursor, statement, parameters, context: Optional[Any] = ...): ... + def is_disconnect(self, e, connection, cursor): ... + +dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/engine/__init__.pyi b/third_party/2and3/sqlalchemy/engine/__init__.pyi index 396cac5ca32c..319811e31350 100644 --- a/third_party/2and3/sqlalchemy/engine/__init__.pyi +++ b/third_party/2and3/sqlalchemy/engine/__init__.pyi @@ -1,11 +1,40 @@ -# Stubs for sqlalchemy.engine (Python 2) +# Stubs for sqlalchemy.engine (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. +from .interfaces import ( + Connectable as Connectable, + CreateEnginePlugin as CreateEnginePlugin, + Dialect as Dialect, + ExecutionContext as ExecutionContext, + ExceptionContext as ExceptionContext, + Compiled as Compiled, + TypeCompiler as TypeCompiler +) -from .base import Connection as Connection -from .base import Engine as Engine -from .base import Transaction as Transaction -from .result import RowProxy as RowProxy +from .base import ( + Connection as Connection, + Engine as Engine, + NestedTransaction as NestedTransaction, + RootTransaction as RootTransaction, + Transaction as Transaction, + TwoPhaseTransaction as TwoPhaseTransaction, +) + +from .result import ( + BaseRowProxy as BaseRowProxy, + BufferedColumnResultProxy as BufferedColumnResultProxy, + BufferedColumnRow as BufferedColumnRow, + BufferedRowResultProxy as BufferedRowResultProxy, + FullyBufferedResultProxy as FullyBufferedResultProxy, + ResultProxy as ResultProxy, + RowProxy as RowProxy, +) + +from .util import ( + connection_memoize as connection_memoize +) + +from . import util as util, strategies as strategies def create_engine(*args, **kwargs): ... -def engine_from_config(configuration, prefix=..., **kwargs): ... +def engine_from_config(configuration, prefix: str = ..., **kwargs): ... diff --git a/third_party/2and3/sqlalchemy/engine/base.pyi b/third_party/2and3/sqlalchemy/engine/base.pyi index af3cf8c5454a..b3068b02674b 100644 --- a/third_party/2and3/sqlalchemy/engine/base.pyi +++ b/third_party/2and3/sqlalchemy/engine/base.pyi @@ -1,10 +1,123 @@ -from .interfaces import Connectable +# Stubs for sqlalchemy.engine.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from sqlalchemy import log +from ..sql import util as sql_util +from ..sql import schema as schema +from .interfaces import Connectable as Connectable, ExceptionContext as ExceptionContext class Connection(Connectable): + schema_for_object = ... # type: Any + engine = ... # type: Any + dialect = ... # type: Any + should_close_with_result = ... # type: bool + dispatch = ... # type: Any + def __init__(self, engine, connection: Optional[Any] = ..., close_with_result: bool = ..., _branch_from: Optional[Any] = ..., _execution_options: Optional[Any] = ..., _dispatch: Optional[Any] = ..., _has_events: Optional[Any] = ...) -> None: ... + def __enter__(self): ... + def __exit__(self, type, value, traceback): ... + def execution_options(self, **opt): ... + @property + def closed(self): ... + @property + def invalidated(self): ... + @property + def connection(self): ... + def get_isolation_level(self): ... + @property + def default_isolation_level(self): ... + @property + def info(self): ... + def connect(self): ... + def contextual_connect(self, **kwargs): ... + def invalidate(self, exception: Optional[Any] = ...): ... + def detach(self): ... def begin(self): ... + def begin_nested(self): ... + def begin_twophase(self, xid: Optional[Any] = ...): ... + def recover_twophase(self): ... + def rollback_prepared(self, xid, recover: bool = ...): ... + def commit_prepared(self, xid, recover: bool = ...): ... + def in_transaction(self): ... + def close(self): ... + def scalar(self, object, *multiparams, **params): ... + def execute(self, object, *multiparams, **params): ... + def transaction(self, callable_, *args, **kwargs): ... + def run_callable(self, callable_, *args, **kwargs): ... -class Engine(Connectable): ... +class ExceptionContextImpl(ExceptionContext): + engine = ... # type: Any + connection = ... # type: Any + sqlalchemy_exception = ... # type: Any + original_exception = ... # type: Any + execution_context = ... # type: Any + statement = ... # type: Any + parameters = ... # type: Any + is_disconnect = ... # type: Any + invalidate_pool_on_disconnect = ... # type: Any + def __init__(self, exception, sqlalchemy_exception, engine, connection, cursor, statement, parameters, context, is_disconnect, invalidate_pool_on_disconnect) -> None: ... -class Transaction: - def commit(self): ... +class Transaction(object): + connection = ... # type: Any + is_active = ... # type: bool + def __init__(self, connection, parent) -> None: ... + def close(self): ... def rollback(self): ... + def commit(self): ... + def __enter__(self): ... + def __exit__(self, type, value, traceback): ... + +class RootTransaction(Transaction): + def __init__(self, connection) -> None: ... + +class NestedTransaction(Transaction): + def __init__(self, connection, parent) -> None: ... + +class TwoPhaseTransaction(Transaction): + xid = ... # type: Any + def __init__(self, connection, xid) -> None: ... + def prepare(self): ... + +class Engine(Connectable, log.Identified): + schema_for_object = ... # type: Any + pool = ... # type: Any + url = ... # type: Any + dialect = ... # type: Any + logging_name = ... # type: Any + echo = ... # type: Any + engine = ... # type: Any + def __init__(self, pool, dialect, url, logging_name: Optional[Any] = ..., echo: Optional[Any] = ..., proxy: Optional[Any] = ..., execution_options: Optional[Any] = ...) -> None: ... + def update_execution_options(self, **opt): ... + def execution_options(self, **opt): ... + @property + def name(self): ... + @property + def driver(self): ... + def dispose(self): ... + class _trans_ctx(object): + conn = ... # type: Any + transaction = ... # type: Any + close_with_result = ... # type: Any + def __init__(self, conn, transaction, close_with_result) -> None: ... + def __enter__(self): ... + def __exit__(self, type, value, traceback): ... + def begin(self, close_with_result: bool = ...): ... + def transaction(self, callable_, *args, **kwargs): ... + def run_callable(self, callable_, *args, **kwargs): ... + def execute(self, statement, *multiparams, **params): ... + def scalar(self, statement, *multiparams, **params): ... + def connect(self, **kwargs): ... + def contextual_connect(self, close_with_result: bool = ..., **kwargs): ... + def table_names(self, schema: Optional[Any] = ..., connection: Optional[Any] = ...): ... + def has_table(self, table_name, schema: Optional[Any] = ...): ... + def raw_connection(self, _connection: Optional[Any] = ...): ... + +class OptionEngine(Engine): + url = ... # type: Any + dialect = ... # type: Any + logging_name = ... # type: Any + echo = ... # type: Any + dispatch = ... # type: Any + def __init__(self, proxied, execution_options) -> None: ... + pool = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/engine/default.pyi b/third_party/2and3/sqlalchemy/engine/default.pyi new file mode 100644 index 000000000000..d999ade7154c --- /dev/null +++ b/third_party/2and3/sqlalchemy/engine/default.pyi @@ -0,0 +1,148 @@ +# Stubs for sqlalchemy.engine.default (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from . import interfaces +from ..sql import compiler as compiler, expression as expression, schema as schema +from .. import types as sqltypes + +AUTOCOMMIT_REGEXP = ... # type: Any +SERVER_SIDE_CURSOR_RE = ... # type: Any + +class DefaultDialect(interfaces.Dialect): + statement_compiler = ... # type: Any + ddl_compiler = ... # type: Any + type_compiler = ... # type: Any + preparer = ... # type: Any + supports_alter = ... # type: bool + default_sequence_base = ... # type: int + execute_sequence_format = ... # type: Any + supports_views = ... # type: bool + supports_sequences = ... # type: bool + sequences_optional = ... # type: bool + preexecute_autoincrement_sequences = ... # type: bool + postfetch_lastrowid = ... # type: bool + implicit_returning = ... # type: bool + supports_right_nested_joins = ... # type: bool + supports_native_enum = ... # type: bool + supports_native_boolean = ... # type: bool + supports_simple_order_by_label = ... # type: bool + engine_config_types = ... # type: Any + supports_native_decimal = ... # type: bool + supports_unicode_statements = ... # type: bool + supports_unicode_binds = ... # type: bool + returns_unicode_strings = ... # type: bool + description_encoding = ... # type: Any + name = ... # type: str + max_identifier_length = ... # type: int + max_index_name_length = ... # type: Any + supports_sane_rowcount = ... # type: bool + supports_sane_multi_rowcount = ... # type: bool + dbapi_type_map = ... # type: Any + colspecs = ... # type: Any + default_paramstyle = ... # type: str + supports_default_values = ... # type: bool + supports_empty_insert = ... # type: bool + supports_multivalues_insert = ... # type: bool + supports_server_side_cursors = ... # type: bool + server_version_info = ... # type: Any + construct_arguments = ... # type: Any + requires_name_normalize = ... # type: bool + reflection_options = ... # type: Any + dbapi_exception_translation_map = ... # type: Any + convert_unicode = ... # type: Any + encoding = ... # type: Any + positional = ... # type: bool + dbapi = ... # type: Any + paramstyle = ... # type: Any + identifier_preparer = ... # type: Any + case_sensitive = ... # type: Any + label_length = ... # type: Any + def __init__(self, convert_unicode: bool = ..., encoding: str = ..., paramstyle: Optional[Any] = ..., dbapi: Optional[Any] = ..., implicit_returning: Optional[Any] = ..., supports_right_nested_joins: Optional[Any] = ..., case_sensitive: bool = ..., supports_native_boolean: Optional[Any] = ..., label_length: Optional[Any] = ..., **kwargs) -> None: ... + @property + def dialect_description(self): ... + @classmethod + def get_pool_class(cls, url): ... + default_schema_name = ... # type: Any + default_isolation_level = ... # type: Any + def initialize(self, connection): ... + def on_connect(self): ... + def type_descriptor(self, typeobj): ... + def reflecttable(self, connection, table, include_columns, exclude_columns, **opts): ... + # Should be conn but using connection so mypy doesn't complain about superclass incompatibility + def get_pk_constraint(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def validate_identifier(self, ident): ... + def connect(self, *cargs, **cparams): ... + def create_connect_args(self, url): ... + def set_engine_execution_options(self, engine, opts): ... + def set_connection_execution_options(self, connection, opts): ... + def do_begin(self, dbapi_connection): ... + def do_rollback(self, dbapi_connection): ... + def do_commit(self, dbapi_connection): ... + def do_close(self, dbapi_connection): ... + def create_xid(self): ... + def do_savepoint(self, connection, name): ... + def do_rollback_to_savepoint(self, connection, name): ... + def do_release_savepoint(self, connection, name): ... + def do_executemany(self, cursor, statement, parameters, context: Optional[Any] = ...): ... + def do_execute(self, cursor, statement, parameters, context: Optional[Any] = ...): ... + def do_execute_no_params(self, *args, **kwargs): ... + def is_disconnect(self, e, connection, cursor): ... + def reset_isolation_level(self, dbapi_conn): ... + +class StrCompileDialect(DefaultDialect): + statement_compiler = ... # type: Any + ddl_compiler = ... # type: Any + type_compiler = ... # type: Any + preparer = ... # type: Any + supports_sequences = ... # type: bool + sequences_optional = ... # type: bool + preexecute_autoincrement_sequences = ... # type: bool + implicit_returning = ... # type: bool + supports_native_boolean = ... # type: bool + supports_simple_order_by_label = ... # type: bool + +class DefaultExecutionContext(interfaces.ExecutionContext): + isinsert = ... # type: bool + isupdate = ... # type: bool + isdelete = ... # type: bool + is_crud = ... # type: bool + is_text = ... # type: bool + isddl = ... # type: bool + executemany = ... # type: bool + compiled = ... # type: Any + statement = ... # type: Any + result_column_struct = ... # type: Any + returned_defaults = ... # type: Any + @property + def engine(self): ... + @property + def postfetch_cols(self): ... + @property + def prefetch_cols(self): ... + @property + def returning_cols(self): ... + @property + def no_parameters(self): ... + @property + def should_autocommit(self): ... + @property + def connection(self): ... + def should_autocommit_text(self, statement): ... + def create_cursor(self): ... + def create_server_side_cursor(self): ... + def pre_exec(self): ... + def post_exec(self): ... + def get_result_processor(self, type_, colname, coltype): ... + def get_lastrowid(self): ... + def handle_dbapi_exception(self, e): ... + def get_result_proxy(self): ... + @property + def rowcount(self): ... + def supports_sane_rowcount(self): ... + def supports_sane_multi_rowcount(self): ... + def lastrow_has_defaults(self): ... + def set_input_sizes(self, translate: Optional[Any] = ..., exclude_types: Optional[Any] = ...): ... + def get_insert_default(self, column): ... + def get_update_default(self, column): ... diff --git a/third_party/2and3/sqlalchemy/engine/interfaces.pyi b/third_party/2and3/sqlalchemy/engine/interfaces.pyi index 0c6a43223098..0fbbb906c930 100644 --- a/third_party/2and3/sqlalchemy/engine/interfaces.pyi +++ b/third_party/2and3/sqlalchemy/engine/interfaces.pyi @@ -1,11 +1,96 @@ -from typing import Any, TYPE_CHECKING -from .result import ResultProxy +# Stubs for sqlalchemy.engine.interfaces (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ..sql.compiler import Compiled as Compiled, TypeCompiler as TypeCompiler from .base import Connection +from .result import ResultProxy -class Connectable: - def execute(self, object, *multiparams: Any, **params: Any) -> ResultProxy: ... +class Dialect(object): + def create_connect_args(self, url): ... + @classmethod + def type_descriptor(cls, typeobj): ... + def initialize(self, connection): ... + def reflecttable(self, connection, table, include_columns, exclude_columns): ... + def get_columns(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_primary_keys(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_pk_constraint(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_foreign_keys(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_table_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_temp_table_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_view_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_temp_view_names(self, connection, schema: Optional[Any] = ..., **kw): ... + def get_view_definition(self, connection, view_name, schema: Optional[Any] = ..., **kw): ... + def get_indexes(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_unique_constraints(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def get_check_constraints(self, connection, table_name, schema: Optional[Any] = ..., **kw): ... + def normalize_name(self, name): ... + def denormalize_name(self, name): ... + def has_table(self, connection, table_name, schema: Optional[Any] = ...): ... + def has_sequence(self, connection, sequence_name, schema: Optional[Any] = ...): ... + def do_begin(self, dbapi_connection): ... + def do_rollback(self, dbapi_connection): ... + def do_commit(self, dbapi_connection): ... + def do_close(self, dbapi_connection): ... + def create_xid(self): ... + def do_savepoint(self, connection, name): ... + def do_rollback_to_savepoint(self, connection, name): ... + def do_release_savepoint(self, connection, name): ... + def do_begin_twophase(self, connection, xid): ... + def do_prepare_twophase(self, connection, xid): ... + def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...): ... + def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...): ... + def do_recover_twophase(self, connection): ... + def do_executemany(self, cursor, statement, parameters, context: Optional[Any] = ...): ... + def do_execute(self, cursor, statement, parameters, context: Optional[Any] = ...): ... + def do_execute_no_params(self, cursor, statement, parameters, context: Optional[Any] = ...): ... + def is_disconnect(self, e, connection, cursor): ... + def connect(self): ... + def reset_isolation_level(self, dbapi_conn): ... + def set_isolation_level(self, dbapi_conn, level): ... + def get_isolation_level(self, dbapi_conn): ... + @classmethod + def get_dialect_cls(cls, url): ... + @classmethod + def engine_created(cls, engine): ... + +class CreateEnginePlugin(object): + url = ... # type: Any + def __init__(self, url, kwargs) -> None: ... + def handle_dialect_kwargs(self, dialect_cls, dialect_args): ... + def handle_pool_kwargs(self, pool_cls, pool_args): ... + def engine_created(self, engine): ... + +class ExecutionContext(object): + exception = ... # type: Any + is_disconnect = ... # type: Any + def create_cursor(self): ... + def pre_exec(self): ... + def post_exec(self): ... + def result(self): ... + def handle_dbapi_exception(self, e): ... + def should_autocommit_text(self, statement): ... + def lastrow_has_defaults(self): ... + def get_rowcount(self): ... + +class Connectable(object): def connect(self, **kwargs: Any) -> Connection: ... def contextual_connect(self) -> Connection: ... - # Note: The return type `Any` should be a DB API 2 value type once defined - # TODO: See #1037 + def create(self, entity, **kwargs): ... + def drop(self, entity, **kwargs): ... + def execute(self, object, *multiparams: Any, **params: Any) -> ResultProxy: ... def scalar(self, object, *multiparams: Any, **params: Any) -> Any: ... + +class ExceptionContext(object): + connection = ... # type: Any + engine = ... # type: Any + cursor = ... # type: Any + statement = ... # type: Any + parameters = ... # type: Any + original_exception = ... # type: Any + sqlalchemy_exception = ... # type: Any + chained_exception = ... # type: Any + execution_context = ... # type: Any + is_disconnect = ... # type: Any + invalidate_pool_on_disconnect = ... # type: bool diff --git a/third_party/2and3/sqlalchemy/engine/reflection.pyi b/third_party/2and3/sqlalchemy/engine/reflection.pyi new file mode 100644 index 000000000000..99e557a4dbdb --- /dev/null +++ b/third_party/2and3/sqlalchemy/engine/reflection.pyi @@ -0,0 +1,39 @@ +# Stubs for sqlalchemy.engine.reflection (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ..sql import schema as sa_schema +from ..sql.type_api import TypeEngine as TypeEngine +from ..util import deprecated as deprecated +from ..util import topological as topological +from .base import Connectable as Connectable + +def cache(fn, self, con, *args, **kw): ... + +class Inspector(object): + bind = ... # type: Any + engine = ... # type: Any + dialect = ... # type: Any + info_cache = ... # type: Any + def __init__(self, bind) -> None: ... + @classmethod + def from_engine(cls, bind): ... + @property + def default_schema_name(self): ... + def get_schema_names(self): ... + def get_table_names(self, schema: Optional[Any] = ..., order_by: Optional[Any] = ...): ... + def get_sorted_table_and_fkc_names(self, schema: Optional[Any] = ...): ... + def get_temp_table_names(self): ... + def get_temp_view_names(self): ... + def get_table_options(self, table_name, schema: Optional[Any] = ..., **kw): ... + def get_view_names(self, schema: Optional[Any] = ...): ... + def get_view_definition(self, view_name, schema: Optional[Any] = ...): ... + def get_columns(self, table_name, schema: Optional[Any] = ..., **kw): ... + def get_primary_keys(self, table_name, schema: Optional[Any] = ..., **kw): ... + def get_pk_constraint(self, table_name, schema: Optional[Any] = ..., **kw): ... + def get_foreign_keys(self, table_name, schema: Optional[Any] = ..., **kw): ... + def get_indexes(self, table_name, schema: Optional[Any] = ..., **kw): ... + def get_unique_constraints(self, table_name, schema: Optional[Any] = ..., **kw): ... + def get_check_constraints(self, table_name, schema: Optional[Any] = ..., **kw): ... + def reflecttable(self, table, include_columns, exclude_columns: Any = ..., _extend_on: Optional[Any] = ...): ... diff --git a/third_party/2and3/sqlalchemy/engine/result.pyi b/third_party/2and3/sqlalchemy/engine/result.pyi index 0361ee05ec32..e317a5bcaba5 100644 --- a/third_party/2and3/sqlalchemy/engine/result.pyi +++ b/third_party/2and3/sqlalchemy/engine/result.pyi @@ -1,22 +1,92 @@ -from typing import Any, Iterator, List, Mapping, Optional +# Stubs for sqlalchemy.engine.result (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. # Note: The value type `Any` should be a DB API 2 value type once defined # TODO: See #1037 -class RowProxy(Mapping[str, Any]): ... +from typing import Any, Iterator, List, Mapping, Optional +from ..sql import expression as expression, sqltypes as sqltypes +from ..sql import util as sql_util + +def rowproxy_reconstructor(cls, state): ... + +class BaseRowProxy(Mapping[str, Any]): + def __init__(self, parent, row, processors, keymap) -> None: ... + def __reduce__(self): ... + def values(self): ... + def __iter__(self): ... + def __len__(self): ... + def __getitem__(self, key): ... + def __getattr__(self, name): ... + +class RowProxy(BaseRowProxy): + def __contains__(self, key): ... + __hash__ = ... # type: Any + def __lt__(self, other): ... + def __le__(self, other): ... + def __ge__(self, other): ... + def __gt__(self, other): ... + def __eq__(self, other): ... + def __ne__(self, other): ... + def has_key(self, key): ... + def items(self): ... + def keys(self): ... + def iterkeys(self): ... + def itervalues(self): ... -class ResultProxy(Iterator[RowProxy]): - def keys(self) -> List[str]: ... +class ResultMetaData(object): + case_sensitive = ... # type: Any + matched_on_name = ... # type: bool + def __init__(self, parent, cursor_description) -> None: ... + +class ResultProxy(Mapping[str, Any]): + out_parameters = ... # type: Any + closed = ... # type: bool + context = ... # type: Any + dialect = ... # type: Any + cursor = ... # type: Any + connection = ... # type: Any + def __init__(self, context) -> None: ... + def keys(self): ... + @property + def rowcount(self) -> int: ... + @property + def lastrowid(self): ... + @property + def returns_rows(self): ... + @property + def is_insert(self): ... def close(self) -> None: ... - def __iter__(self) -> Iterator[RowProxy]: ... + def __iter__(self): ... + @property + def inserted_primary_key(self): ... + def last_updated_params(self): ... + def last_inserted_params(self): ... + @property + def returned_defaults(self): ... + def lastrow_has_defaults(self): ... + def postfetch_cols(self): ... + def prefetch_cols(self): ... + def supports_sane_rowcount(self): ... + def supports_sane_multi_rowcount(self): ... + def process_rows(self, rows): ... def fetchall(self) -> Iterator[RowProxy]: ... - def fetchmany(self, size: Optional[int]=None) -> Iterator[RowProxy]: ... + def fetchmany(self, size: Optional[int] = ...) -> Iterator[RowProxy]: ... def fetchone(self) -> Optional[RowProxy]: ... def first(self) -> Optional[RowProxy]: ... - # Note: The return type `Any` should be a DB API 2 value type once defined # TODO: See #1037 def scalar(self) -> Any: ... - @property - def rowcount(self) -> int: ... +class BufferedRowResultProxy(ResultProxy): + size_growth = ... # type: Any + +class FullyBufferedResultProxy(ResultProxy): ... + +class BufferedColumnRow(RowProxy): + def __init__(self, parent, row, processors, keymap) -> None: ... + +class BufferedColumnResultProxy(ResultProxy): + def fetchall(self): ... + def fetchmany(self, size: Optional[Any] = ...): ... diff --git a/third_party/2and3/sqlalchemy/engine/strategies.pyi b/third_party/2and3/sqlalchemy/engine/strategies.pyi index 06c2f00767ea..def4b3f6ef8f 100644 --- a/third_party/2and3/sqlalchemy/engine/strategies.pyi +++ b/third_party/2and3/sqlalchemy/engine/strategies.pyi @@ -1,14 +1,14 @@ -# Stubs for sqlalchemy.engine.strategies (Python 2) +# Stubs for sqlalchemy.engine.strategies (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any - +from sqlalchemy import pool as poollib from . import base strategies = ... # type: Any -class EngineStrategy: +class EngineStrategy(object): def __init__(self) -> None: ... def create(self, *args, **kwargs): ... @@ -16,24 +16,25 @@ class DefaultEngineStrategy(EngineStrategy): def create(self, name_or_url, **kwargs): ... class PlainEngineStrategy(DefaultEngineStrategy): - name = ... # type: Any + name = ... # type: str engine_cls = ... # type: Any class ThreadLocalEngineStrategy(DefaultEngineStrategy): - name = ... # type: Any + name = ... # type: str engine_cls = ... # type: Any class MockEngineStrategy(EngineStrategy): - name = ... # type: Any + name = ... # type: str def create(self, name_or_url, executor, **kwargs): ... class MockConnection(base.Connectable): + execute = ... # type: Any def __init__(self, dialect, execute) -> None: ... engine = ... # type: Any dialect = ... # type: Any name = ... # type: Any + schema_for_object = ... # type: Any def contextual_connect(self, **kwargs): ... def execution_options(self, **kw): ... def compiler(self, statement, parameters, **kwargs): ... def create(self, entity, **kwargs): ... def drop(self, entity, **kwargs): ... - def execute(self, object, *multiparams, **params): ... diff --git a/third_party/2and3/sqlalchemy/engine/threadlocal.pyi b/third_party/2and3/sqlalchemy/engine/threadlocal.pyi new file mode 100644 index 000000000000..926ae5d0daf0 --- /dev/null +++ b/third_party/2and3/sqlalchemy/engine/threadlocal.pyi @@ -0,0 +1,26 @@ +# Stubs for sqlalchemy.engine.threadlocal (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from . import base + +class TLConnection(base.Connection): + def __init__(self, *arg, **kw) -> None: ... + def close(self): ... + +class TLEngine(base.Engine): + def __init__(self, *args, **kwargs) -> None: ... + def contextual_connect(self, **kw): ... + def begin_twophase(self, xid: Optional[Any] = ...): ... + def begin_nested(self): ... + def begin(self): ... + def __enter__(self): ... + def __exit__(self, type, value, traceback): ... + def prepare(self): ... + def commit(self): ... + def rollback(self): ... + def dispose(self): ... + @property + def closed(self): ... + def close(self): ... diff --git a/third_party/2and3/sqlalchemy/engine/url.pyi b/third_party/2and3/sqlalchemy/engine/url.pyi index 76dd1efc787c..fddaa5479c1e 100644 --- a/third_party/2and3/sqlalchemy/engine/url.pyi +++ b/third_party/2and3/sqlalchemy/engine/url.pyi @@ -1,13 +1,11 @@ -# Stubs for sqlalchemy.engine.url (Python 2) +# Stubs for sqlalchemy.engine.url (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any -from .. import dialects +from typing import Any, Optional +from ..dialects import registry as registry, plugins as plugins -# registry = dialects.registry - -class URL: +class URL(object): drivername = ... # type: Any username = ... # type: Any password = ... # type: Any @@ -15,13 +13,13 @@ class URL: port = ... # type: Any database = ... # type: Any query = ... # type: Any - def __init__(self, drivername, username=..., password=..., host=..., port=..., database=..., query=...) -> None: ... - def __to_string__(self, hide_password=...): ... + def __init__(self, drivername, username: Optional[Any] = ..., password: Optional[Any] = ..., host: Optional[Any] = ..., port: Optional[Any] = ..., database: Optional[Any] = ..., query: Optional[Any] = ...) -> None: ... + def __to_string__(self, hide_password: bool = ...): ... def __hash__(self): ... def __eq__(self, other): ... def get_backend_name(self): ... def get_driver_name(self): ... def get_dialect(self): ... - def translate_connect_args(self, names=..., **kw): ... + def translate_connect_args(self, names: Any = ..., **kw): ... def make_url(name_or_url): ... diff --git a/third_party/2and3/sqlalchemy/engine/util.pyi b/third_party/2and3/sqlalchemy/engine/util.pyi new file mode 100644 index 000000000000..ec21db4a9b4b --- /dev/null +++ b/third_party/2and3/sqlalchemy/engine/util.pyi @@ -0,0 +1,6 @@ +# Stubs for sqlalchemy.engine.util (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +def connection_memoize(key): ... +def py_fallback(): ... diff --git a/third_party/2and3/sqlalchemy/event/__init__.pyi b/third_party/2and3/sqlalchemy/event/__init__.pyi new file mode 100644 index 000000000000..d71f05eee62b --- /dev/null +++ b/third_party/2and3/sqlalchemy/event/__init__.pyi @@ -0,0 +1,7 @@ +# Stubs for sqlalchemy.event (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from .api import CANCEL as CANCEL, NO_RETVAL as NO_RETVAL, listen as listen, listens_for as listens_for, remove as remove, contains as contains +from .base import Events as Events, dispatcher as dispatcher +from .attr import RefCollection as RefCollection diff --git a/third_party/2and3/sqlalchemy/event/api.pyi b/third_party/2and3/sqlalchemy/event/api.pyi new file mode 100644 index 000000000000..9ad11dc351cc --- /dev/null +++ b/third_party/2and3/sqlalchemy/event/api.pyi @@ -0,0 +1,14 @@ +# Stubs for sqlalchemy.event.api (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .registry import _EventKey as _EventKey + +CANCEL = ... # type: Any +NO_RETVAL = ... # type: Any + +def listen(target, identifier, fn, *args, **kw): ... +def listens_for(target, identifier, *args, **kw): ... +def remove(target, identifier, fn): ... +def contains(target, identifier, fn): ... diff --git a/third_party/2and3/sqlalchemy/event/attr.pyi b/third_party/2and3/sqlalchemy/event/attr.pyi new file mode 100644 index 000000000000..0e532c614e6c --- /dev/null +++ b/third_party/2and3/sqlalchemy/event/attr.pyi @@ -0,0 +1,78 @@ +# Stubs for sqlalchemy.event.attr (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .. import util +from ..util import threading as threading + +class RefCollection(util.MemoizedSlots): ... + +class _ClsLevelDispatch(RefCollection): + name = ... # type: Any + arg_names = ... # type: Any + has_kw = ... # type: Any + legacy_signatures = ... # type: Any + def __init__(self, parent_dispatch_cls, fn) -> None: ... + def insert(self, event_key, propagate): ... + def append(self, event_key, propagate): ... + def update_subclass(self, target): ... + def remove(self, event_key): ... + def clear(self): ... + def for_modify(self, obj): ... + +class _InstanceLevelDispatch(RefCollection): ... + +class _EmptyListener(_InstanceLevelDispatch): + propagate = ... # type: Any + listeners = ... # type: Any + parent = ... # type: Any + parent_listeners = ... # type: Any + name = ... # type: Any + def __init__(self, parent, target_cls) -> None: ... + def for_modify(self, obj): ... + exec_once = ... # type: Any + insert = ... # type: Any + append = ... # type: Any + remove = ... # type: Any + clear = ... # type: Any + def __call__(self, *args, **kw): ... + def __len__(self): ... + def __iter__(self): ... + def __bool__(self): ... + __nonzero__ = ... # type: Any + +class _CompoundListener(_InstanceLevelDispatch): + def exec_once(self, *args, **kw): ... + def __call__(self, *args, **kw): ... + def __len__(self): ... + def __iter__(self): ... + def __bool__(self): ... + __nonzero__ = ... # type: Any + +class _ListenerCollection(_CompoundListener): + parent_listeners = ... # type: Any + parent = ... # type: Any + name = ... # type: Any + listeners = ... # type: Any + propagate = ... # type: Any + def __init__(self, parent, target_cls) -> None: ... + def for_modify(self, obj): ... + def insert(self, event_key, propagate): ... + def append(self, event_key, propagate): ... + def remove(self, event_key): ... + def clear(self): ... + +class _JoinedListener(_CompoundListener): + parent = ... # type: Any + name = ... # type: Any + local = ... # type: Any + parent_listeners = ... # type: Any + def __init__(self, parent, name, local) -> None: ... + @property + def listeners(self): ... + def for_modify(self, obj): ... + def insert(self, event_key, propagate): ... + def append(self, event_key, propagate): ... + def remove(self, event_key): ... + def clear(self): ... diff --git a/third_party/2and3/sqlalchemy/event/base.pyi b/third_party/2and3/sqlalchemy/event/base.pyi new file mode 100644 index 000000000000..6064dfdfb53e --- /dev/null +++ b/third_party/2and3/sqlalchemy/event/base.pyi @@ -0,0 +1,31 @@ +# Stubs for sqlalchemy.event.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .attr import _JoinedListener as _JoinedListener, _EmptyListener as _EmptyListener, _ClsLevelDispatch as _ClsLevelDispatch + +class _UnpickleDispatch(object): + def __call__(self, _instance_cls): ... + +class _Dispatch(object): + def __init__(self, parent, instance_cls: Optional[Any] = ...) -> None: ... + def __getattr__(self, name): ... + def __reduce__(self): ... + +class _EventMeta(type): + def __init__(cls, classname, bases, dict_) -> None: ... + +class Events(metaclass=_EventMeta): ... + +class _JoinedDispatcher(object): + local = ... # type: Any + parent = ... # type: Any + def __init__(self, local, parent) -> None: ... + def __getattr__(self, name): ... + +class dispatcher(object): + dispatch_cls = ... # type: Any + events = ... # type: Any + def __init__(self, events) -> None: ... + def __get__(self, obj, cls): ... diff --git a/third_party/2and3/sqlalchemy/event/legacy.pyi b/third_party/2and3/sqlalchemy/event/legacy.pyi new file mode 100644 index 000000000000..8ef449c1a028 --- /dev/null +++ b/third_party/2and3/sqlalchemy/event/legacy.pyi @@ -0,0 +1,3 @@ +# Stubs for sqlalchemy.event.legacy (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. diff --git a/third_party/2and3/sqlalchemy/event/registry.pyi b/third_party/2and3/sqlalchemy/event/registry.pyi new file mode 100644 index 000000000000..aa1c9445feee --- /dev/null +++ b/third_party/2and3/sqlalchemy/event/registry.pyi @@ -0,0 +1,23 @@ +# Stubs for sqlalchemy.event.registry (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional + +class _EventKey(object): + target = ... # type: Any + identifier = ... # type: Any + fn = ... # type: Any + fn_key = ... # type: Any + fn_wrap = ... # type: Any + dispatch_target = ... # type: Any + def __init__(self, target, identifier, fn, dispatch_target, _fn_wrap: Optional[Any] = ...) -> None: ... + def with_wrapper(self, fn_wrap): ... + def with_dispatch_target(self, dispatch_target): ... + def listen(self, *args, **kw): ... + def remove(self): ... + def contains(self): ... + def base_listen(self, propagate: bool = ..., insert: bool = ..., named: bool = ...): ... + def append_to_list(self, owner, list_): ... + def remove_from_list(self, owner, list_): ... + def prepend_to_list(self, owner, list_): ... diff --git a/third_party/2and3/sqlalchemy/events.pyi b/third_party/2and3/sqlalchemy/events.pyi new file mode 100644 index 000000000000..0c8199598dec --- /dev/null +++ b/third_party/2and3/sqlalchemy/events.pyi @@ -0,0 +1,57 @@ +# Stubs for sqlalchemy.events (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from . import event +from .pool import Pool as Pool +from .engine import Connectable as Connectable, Engine as Engine, Dialect as Dialect +from .sql.base import SchemaEventTarget as SchemaEventTarget + +class DDLEvents(event.Events): + def before_create(self, target, connection, **kw): ... + def after_create(self, target, connection, **kw): ... + def before_drop(self, target, connection, **kw): ... + def after_drop(self, target, connection, **kw): ... + def before_parent_attach(self, target, parent): ... + def after_parent_attach(self, target, parent): ... + def column_reflect(self, inspector, table, column_info): ... + +class PoolEvents(event.Events): + def connect(self, dbapi_connection, connection_record): ... + def first_connect(self, dbapi_connection, connection_record): ... + def checkout(self, dbapi_connection, connection_record, connection_proxy): ... + def checkin(self, dbapi_connection, connection_record): ... + def reset(self, dbapi_connection, connection_record): ... + def invalidate(self, dbapi_connection, connection_record, exception): ... + def soft_invalidate(self, dbapi_connection, connection_record, exception): ... + def close(self, dbapi_connection, connection_record): ... + def detach(self, dbapi_connection, connection_record): ... + def close_detached(self, dbapi_connection): ... + +class ConnectionEvents(event.Events): + def before_execute(self, conn, clauseelement, multiparams, params): ... + def after_execute(self, conn, clauseelement, multiparams, params, result): ... + def before_cursor_execute(self, conn, cursor, statement, parameters, context, executemany): ... + def after_cursor_execute(self, conn, cursor, statement, parameters, context, executemany): ... + def dbapi_error(self, conn, cursor, statement, parameters, context, exception): ... + def handle_error(self, exception_context): ... + def engine_connect(self, conn, branch): ... + def set_connection_execution_options(self, conn, opts): ... + def set_engine_execution_options(self, engine, opts): ... + def engine_disposed(self, engine): ... + def begin(self, conn): ... + def rollback(self, conn): ... + def commit(self, conn): ... + def savepoint(self, conn, name): ... + def rollback_savepoint(self, conn, name, context): ... + def release_savepoint(self, conn, name, context): ... + def begin_twophase(self, conn, xid): ... + def prepare_twophase(self, conn, xid): ... + def rollback_twophase(self, conn, xid, is_prepared): ... + def commit_twophase(self, conn, xid, is_prepared): ... + +class DialectEvents(event.Events): + def do_connect(self, dialect, conn_rec, cargs, cparams): ... + def do_executemany(self, cursor, statement, parameters, context): ... + def do_execute_no_params(self, cursor, statement, context): ... + def do_execute(self, cursor, statement, parameters, context): ... diff --git a/third_party/2and3/sqlalchemy/exc.pyi b/third_party/2and3/sqlalchemy/exc.pyi index b87b9cdcf96e..df89f5249bbd 100644 --- a/third_party/2and3/sqlalchemy/exc.pyi +++ b/third_party/2and3/sqlalchemy/exc.pyi @@ -1,11 +1,15 @@ -# Stubs for sqlalchemy.exc (Python 2) +# Stubs for sqlalchemy.exc (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any +from typing import Any, Optional class SQLAlchemyError(Exception): ... class ArgumentError(SQLAlchemyError): ... + +class ObjectNotExecutableError(ArgumentError): + def __init__(self, target) -> None: ... + class NoSuchModuleError(ArgumentError): ... class NoForeignKeysError(ArgumentError): ... class AmbiguousForeignKeysError(ArgumentError): ... @@ -13,7 +17,7 @@ class AmbiguousForeignKeysError(ArgumentError): ... class CircularDependencyError(SQLAlchemyError): cycles = ... # type: Any edges = ... # type: Any - def __init__(self, message, cycles, edges, msg=...) -> None: ... + def __init__(self, message, cycles, edges, msg: Optional[Any] = ...) -> None: ... def __reduce__(self): ... class CompileError(SQLAlchemyError): ... @@ -43,7 +47,7 @@ class NoReferencedColumnError(NoReferenceError): class NoSuchTableError(InvalidRequestError): ... class UnboundExecutionError(InvalidRequestError): ... -class DontWrapMixin: ... +class DontWrapMixin(object): ... UnmappedColumnError = ... # type: Any @@ -59,10 +63,10 @@ class StatementError(SQLAlchemyError): class DBAPIError(StatementError): @classmethod - def instance(cls, statement, params, orig, dbapi_base_err, connection_invalidated=..., dialect=...): ... + def instance(cls, statement, params, orig, dbapi_base_err, connection_invalidated: bool = ..., dialect: Optional[Any] = ...): ... def __reduce__(self): ... connection_invalidated = ... # type: Any - def __init__(self, statement, params, orig, connection_invalidated=...) -> None: ... + def __init__(self, statement, params, orig, connection_invalidated: bool = ...) -> None: ... class InterfaceError(DBAPIError): ... class DatabaseError(DBAPIError): ... diff --git a/third_party/2and3/sqlalchemy/ext/__init__.pyi b/third_party/2and3/sqlalchemy/ext/__init__.pyi new file mode 100644 index 000000000000..c6442a865d22 --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/__init__.pyi @@ -0,0 +1,7 @@ +# Stubs for sqlalchemy.ext (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from .. import util as _sa_util + +from . import declarative as declarative, associationproxy as associationproxy, automap as automap, baked as baked, compiler as compiler, horizontal_shard as horizontal_shard, hybrid as hybrid, indexable as indexable, instrumentation as instrumentation, mutable as mutable, orderinglist as orderinglist, serializer as serializer diff --git a/third_party/2and3/sqlalchemy/ext/associationproxy.pyi b/third_party/2and3/sqlalchemy/ext/associationproxy.pyi new file mode 100644 index 000000000000..5ddce10fc07d --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/associationproxy.pyi @@ -0,0 +1,163 @@ +# Stubs for sqlalchemy.ext.associationproxy (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ..orm import collections as collections, interfaces as interfaces +from ..sql import not_ as not_, or_ as or_ + +def association_proxy(target_collection, attr, **kw): ... + +ASSOCIATION_PROXY = ... # type: Any + +class AssociationProxy(interfaces.InspectionAttrInfo): + is_attribute = ... # type: bool + extension_type = ... # type: Any + target_collection = ... # type: Any + value_attr = ... # type: Any + creator = ... # type: Any + getset_factory = ... # type: Any + proxy_factory = ... # type: Any + proxy_bulk_set = ... # type: Any + owning_class = ... # type: Any + key = ... # type: Any + collection_class = ... # type: Any + info = ... # type: Any + def __init__(self, target_collection, attr, creator: Optional[Any] = ..., getset_factory: Optional[Any] = ..., proxy_factory: Optional[Any] = ..., proxy_bulk_set: Optional[Any] = ..., info: Optional[Any] = ...) -> None: ... + @property + def remote_attr(self): ... + @property + def local_attr(self): ... + @property + def attr(self): ... + @property + def target_class(self): ... + @property + def scalar(self): ... + def __get__(self, obj, class_): ... + def __set__(self, obj, values): ... + def __delete__(self, obj): ... + def any(self, criterion: Optional[Any] = ..., **kwargs): ... + def has(self, criterion: Optional[Any] = ..., **kwargs): ... + def contains(self, obj): ... + def __eq__(self, obj): ... + def __ne__(self, obj): ... + +class _lazy_collection(object): + ref = ... # type: Any + target = ... # type: Any + def __init__(self, obj, target) -> None: ... + def __call__(self): ... + +class _AssociationCollection(object): + lazy_collection = ... # type: Any + creator = ... # type: Any + getter = ... # type: Any + setter = ... # type: Any + parent = ... # type: Any + def __init__(self, lazy_collection, creator, getter, setter, parent) -> None: ... + col = ... # type: Any + def __len__(self): ... + def __bool__(self): ... + __nonzero__ = ... # type: Any + +class _AssociationList(_AssociationCollection): + def __getitem__(self, index): ... + def __setitem__(self, index, value): ... + def __delitem__(self, index): ... + def __contains__(self, value): ... + def __getslice__(self, start, end): ... + def __setslice__(self, start, end, values): ... + def __delslice__(self, start, end): ... + def __iter__(self): ... + def append(self, value): ... + def count(self, value): ... + def extend(self, values): ... + def insert(self, index, value): ... + def pop(self, index: int = ...): ... + def remove(self, value): ... + def reverse(self): ... + def sort(self): ... + def clear(self): ... + def __eq__(self, other): ... + def __ne__(self, other): ... + def __lt__(self, other): ... + def __le__(self, other): ... + def __gt__(self, other): ... + def __ge__(self, other): ... + def __cmp__(self, other): ... + def __add__(self, iterable): ... + def __radd__(self, iterable): ... + def __mul__(self, n): ... + __rmul__ = ... # type: Any + def __iadd__(self, iterable): ... + def __imul__(self, n): ... + def copy(self): ... + def __hash__(self): ... + +class _AssociationDict(_AssociationCollection): + def __getitem__(self, key): ... + def __setitem__(self, key, value): ... + def __delitem__(self, key): ... + def __contains__(self, key): ... + def has_key(self, key): ... + def __iter__(self): ... + def clear(self): ... + def __eq__(self, other): ... + def __ne__(self, other): ... + def __lt__(self, other): ... + def __le__(self, other): ... + def __gt__(self, other): ... + def __ge__(self, other): ... + def __cmp__(self, other): ... + def get(self, key, default: Optional[Any] = ...): ... + def setdefault(self, key, default: Optional[Any] = ...): ... + def keys(self): ... + def iteritems(self): ... + def itervalues(self): ... + def iterkeys(self): ... + def values(self): ... + def items(self): ... + def pop(self, key, default: Any = ...): ... + def popitem(self): ... + def update(self, *a, **kw): ... + def copy(self): ... + def __hash__(self): ... + +class _AssociationSet(_AssociationCollection): + def __len__(self): ... + def __bool__(self): ... + def __nonzero__(self): ... + def __contains__(self, value): ... + def __iter__(self): ... + def add(self, value): ... + def discard(self, value): ... + def remove(self, value): ... + def pop(self): ... + def update(self, other): ... + def __ior__(self, other): ... + def union(self, other): ... + def __or__(self, other): ... + def difference(self, other): ... + def __sub__(self, other): ... + def difference_update(self, other): ... + def __isub__(self, other): ... + def intersection(self, other): ... + def __and__(self, other): ... + def intersection_update(self, other): ... + def __iand__(self, other): ... + def symmetric_difference(self, other): ... + def __xor__(self, other): ... + def symmetric_difference_update(self, other): ... + def __ixor__(self, other): ... + def issubset(self, other): ... + def issuperset(self, other): ... + def clear(self): ... + def copy(self): ... + def __eq__(self, other): ... + def __ne__(self, other): ... + def __lt__(self, other): ... + def __le__(self, other): ... + def __gt__(self, other): ... + def __ge__(self, other): ... + def __hash__(self): ... diff --git a/third_party/2and3/sqlalchemy/ext/automap.pyi b/third_party/2and3/sqlalchemy/ext/automap.pyi new file mode 100644 index 000000000000..df473225e470 --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/automap.pyi @@ -0,0 +1,23 @@ +# Stubs for sqlalchemy.ext.automap (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .declarative import declarative_base as _declarative_base +from .declarative.base import _DeferredMapperConfig as _DeferredMapperConfig +from ..sql import and_ as and_ +from ..schema import ForeignKeyConstraint as ForeignKeyConstraint +from ..orm import relationship as relationship, backref as backref, interfaces as interfaces + +def classname_for_table(base, tablename, table): ... +def name_for_scalar_relationship(base, local_cls, referred_cls, constraint): ... +def name_for_collection_relationship(base, local_cls, referred_cls, constraint): ... +def generate_relationship(base, direction, return_fn, attrname, local_cls, referred_cls, **kw): ... + +class AutomapBase(object): + __abstract__ = ... # type: bool + classes = ... # type: Any + @classmethod + def prepare(cls, engine: Optional[Any] = ..., reflect: bool = ..., schema: Optional[Any] = ..., classname_for_table: Any = ..., collection_class: Any = ..., name_for_scalar_relationship: Any = ..., name_for_collection_relationship: Any = ..., generate_relationship: Any = ...): ... + +def automap_base(declarative_base: Optional[Any] = ..., **kw): ... diff --git a/third_party/2and3/sqlalchemy/ext/baked.pyi b/third_party/2and3/sqlalchemy/ext/baked.pyi new file mode 100644 index 000000000000..c2faf288afcb --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/baked.pyi @@ -0,0 +1,52 @@ +# Stubs for sqlalchemy.ext.baked (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from ..orm.query import Query as Query +from ..orm import strategies as strategies, attributes as attributes, properties as properties, strategy_options as strategy_options, interfaces as interfaces +from ..orm import util as orm_util +from .. import log as sqla_log +from ..sql import func as func, literal_column as literal_column +from ..sql import util as sql_util +from ..orm import exc as orm_exc +from .. import exc as sa_exc + +log = ... # type: Any + +class BakedQuery(object): + steps = ... # type: Any + def __init__(self, bakery, initial_fn, args: Any = ...) -> None: ... + @classmethod + def bakery(cls, size: int = ...): ... + def __iadd__(self, other): ... + def __add__(self, other): ... + def add_criteria(self, fn, *args): ... + def with_criteria(self, fn, *args): ... + def for_session(self, session): ... + def __call__(self, session): ... + def spoil(self, full: bool = ...): ... + +class Result(object): + bq = ... # type: Any + session = ... # type: Any + def __init__(self, bq, session) -> None: ... + def params(self, *args, **kw): ... + def __iter__(self): ... + def count(self): ... + def scalar(self): ... + def first(self): ... + def one(self): ... + def one_or_none(self): ... + def all(self): ... + def get(self, ident): ... + +def bake_lazy_loaders(): ... +def unbake_lazy_loaders(): ... + +class BakedLazyLoader(strategies.LazyLoader): ... + +def baked_lazyload(loadopt, attr): ... +def baked_lazyload_all(*keys): ... + +bakery = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/ext/compiler.pyi b/third_party/2and3/sqlalchemy/ext/compiler.pyi new file mode 100644 index 000000000000..34cd887b0a79 --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/compiler.pyi @@ -0,0 +1,14 @@ +# Stubs for sqlalchemy.ext.compiler (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from ..sql import visitors as visitors + +def compiles(class_, *specs): ... +def deregister(class_): ... + +class _dispatcher(object): + specs = ... # type: Any + def __init__(self) -> None: ... + def __call__(self, element, compiler, **kw): ... diff --git a/third_party/2and3/sqlalchemy/ext/declarative/__init__.pyi b/third_party/2and3/sqlalchemy/ext/declarative/__init__.pyi new file mode 100644 index 000000000000..6767b43279d7 --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/declarative/__init__.pyi @@ -0,0 +1,5 @@ +# Stubs for sqlalchemy.ext.declarative (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from .api import declarative_base as declarative_base, synonym_for as synonym_for, comparable_using as comparable_using, instrument_declarative as instrument_declarative, ConcreteBase as ConcreteBase, AbstractConcreteBase as AbstractConcreteBase, DeclarativeMeta as DeclarativeMeta, DeferredReflection as DeferredReflection, has_inherited_table as has_inherited_table, declared_attr as declared_attr, as_declarative as as_declarative diff --git a/third_party/2and3/sqlalchemy/ext/declarative/api.pyi b/third_party/2and3/sqlalchemy/ext/declarative/api.pyi new file mode 100644 index 000000000000..87045c36ba4b --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/declarative/api.pyi @@ -0,0 +1,48 @@ +# Stubs for sqlalchemy.ext.declarative.api (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ...schema import Table as Table, MetaData as MetaData, Column as Column +from ...orm import comparable_property as comparable_property, interfaces as interfaces, properties as properties, attributes as attributes +from ...orm import synonym as _orm_synonym +from ...orm.util import polymorphic_union as polymorphic_union +from ...util import OrderedDict as OrderedDict, hybridmethod as hybridmethod, hybridproperty as hybridproperty +from .clsregistry import _class_resolver as _class_resolver + +def instrument_declarative(cls, registry, metadata): ... +def has_inherited_table(cls): ... + +class DeclarativeMeta(type): + def __init__(cls, classname, bases, dict_) -> None: ... + def __setattr__(cls, key, value): ... + +def synonym_for(name, map_column: bool = ...): ... +def comparable_using(comparator_factory): ... + +class declared_attr(interfaces._MappedAttribute, property): + __doc__ = ... # type: Any + def __init__(self, fget, cascading: bool = ...) -> None: ... + def __get__(desc, self, cls): ... + def cascading(cls): ... + +class _stateful_declared_attr(declared_attr): + kw = ... # type: Any + def __init__(self, **kw) -> None: ... + def __call__(self, fn): ... + +def declarative_base(bind: Optional[Any] = ..., metadata: Optional[Any] = ..., mapper: Optional[Any] = ..., cls: Any = ..., name: str = ..., constructor: Any = ..., class_registry: Optional[Any] = ..., metaclass: Any = ...): ... +def as_declarative(**kw): ... + +class ConcreteBase(object): + @classmethod + def __declare_first__(cls): ... + +class AbstractConcreteBase(ConcreteBase): + __no_table__ = ... # type: bool + @classmethod + def __declare_first__(cls): ... + +class DeferredReflection(object): + @classmethod + def prepare(cls, engine): ... diff --git a/third_party/2and3/sqlalchemy/ext/declarative/base.pyi b/third_party/2and3/sqlalchemy/ext/declarative/base.pyi new file mode 100644 index 000000000000..636ed25a7754 --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/declarative/base.pyi @@ -0,0 +1,41 @@ +# Stubs for sqlalchemy.ext.declarative.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from ...schema import Table as Table, Column as Column +from ...orm import mapper as mapper, class_mapper as class_mapper, synonym as synonym +from ...orm.interfaces import MapperProperty as MapperProperty +from ...orm.properties import ColumnProperty as ColumnProperty +from ...orm.attributes import QueryableAttribute as QueryableAttribute +from ...util import topological as topological +from ...sql import expression as expression + +declared_attr = ... # type: Any +declarative_props = ... # type: Any + +class _MapperConfig(object): + @classmethod + def setup_mapping(cls, cls_, classname, dict_): ... + cls = ... # type: Any + dict_ = ... # type: Any + classname = ... # type: Any + mapped_table = ... # type: Any + properties = ... # type: Any + declared_columns = ... # type: Any + column_copies = ... # type: Any + def __init__(self, cls_, classname, dict_) -> None: ... + def map(self): ... + +class _DeferredMapperConfig(_MapperConfig): + @property + def cls(self): ... + @cls.setter + def cls(self, class_): ... + @classmethod + def has_cls(cls, class_): ... + @classmethod + def config_for_cls(cls, class_): ... + @classmethod + def classes_for_base(cls, base_cls, sort: bool = ...): ... + def map(self): ... diff --git a/third_party/2and3/sqlalchemy/ext/declarative/clsregistry.pyi b/third_party/2and3/sqlalchemy/ext/declarative/clsregistry.pyi new file mode 100644 index 000000000000..93d40b4eb3c2 --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/declarative/clsregistry.pyi @@ -0,0 +1,53 @@ +# Stubs for sqlalchemy.ext.declarative.clsregistry (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ...orm.properties import ColumnProperty as ColumnProperty +from ...orm import class_mapper as class_mapper, interfaces as interfaces + +def add_class(classname, cls): ... + +class _MultipleClassMarker(object): + on_remove = ... # type: Any + contents = ... # type: Any + def __init__(self, classes, on_remove: Optional[Any] = ...) -> None: ... + def __iter__(self): ... + def attempt_get(self, path, key): ... + def add_item(self, item): ... + +class _ModuleMarker(object): + parent = ... # type: Any + name = ... # type: Any + contents = ... # type: Any + mod_ns = ... # type: Any + path = ... # type: Any + def __init__(self, name, parent) -> None: ... + def __contains__(self, name): ... + def __getitem__(self, name): ... + def resolve_attr(self, key): ... + def get_module(self, name): ... + def add_class(self, name, cls): ... + +class _ModNS(object): + def __init__(self, parent) -> None: ... + def __getattr__(self, key): ... + +class _GetColumns(object): + cls = ... # type: Any + def __init__(self, cls) -> None: ... + def __getattr__(self, key): ... + +class _GetTable(object): + key = ... # type: Any + metadata = ... # type: Any + def __init__(self, key, metadata) -> None: ... + def __getattr__(self, key): ... + +class _class_resolver(object): + cls = ... # type: Any + prop = ... # type: Any + arg = ... # type: Any + fallback = ... # type: Any + def __init__(self, cls, prop, fallback, arg) -> None: ... + def __call__(self): ... diff --git a/third_party/2and3/sqlalchemy/ext/horizontal_shard.pyi b/third_party/2and3/sqlalchemy/ext/horizontal_shard.pyi new file mode 100644 index 000000000000..4d0c9a87f01b --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/horizontal_shard.pyi @@ -0,0 +1,24 @@ +# Stubs for sqlalchemy.ext.horizontal_shard (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ..orm.session import Session +from ..orm.query import Query + +class ShardedQuery(Query): + id_chooser = ... # type: Any + query_chooser = ... # type: Any + def __init__(self, *args, **kwargs) -> None: ... + def set_shard(self, shard_id): ... + def get(self, ident, **kwargs): ... + +class ShardedSession(Session): + shard_chooser = ... # type: Any + id_chooser = ... # type: Any + query_chooser = ... # type: Any + connection_callable = ... # type: Any + def __init__(self, shard_chooser, id_chooser, query_chooser, shards: Optional[Any] = ..., query_cls: Any = ..., **kwargs) -> None: ... + def connection(self, *args, **kwargs): ... + def get_bind(self, *args, **kw): ... + def bind_shard(self, shard_id, bind): ... diff --git a/third_party/2and3/sqlalchemy/ext/hybrid.pyi b/third_party/2and3/sqlalchemy/ext/hybrid.pyi new file mode 100644 index 000000000000..312d77a4d472 --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/hybrid.pyi @@ -0,0 +1,53 @@ +# Stubs for sqlalchemy.ext.hybrid (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ..orm import attributes as attributes, interfaces as interfaces + +HYBRID_METHOD = ... # type: Any +HYBRID_PROPERTY = ... # type: Any + +class hybrid_method(interfaces.InspectionAttrInfo): + is_attribute = ... # type: bool + extension_type = ... # type: Any + func = ... # type: Any + def __init__(self, func, expr: Optional[Any] = ...) -> None: ... + def __get__(self, instance, owner): ... + expr = ... # type: Any + def expression(self, expr): ... + +class hybrid_property(interfaces.InspectionAttrInfo): + is_attribute = ... # type: bool + extension_type = ... # type: Any + fget = ... # type: Any + fset = ... # type: Any + fdel = ... # type: Any + def __init__(self, fget, fset: Optional[Any] = ..., fdel: Optional[Any] = ..., expr: Optional[Any] = ...) -> None: ... + def __get__(self, instance, owner): ... + def __set__(self, instance, value): ... + def __delete__(self, instance): ... + def setter(self, fset): ... + def deleter(self, fdel): ... + expr = ... # type: Any + def expression(self, expr): ... + def comparator(self, comparator): ... + +class Comparator(interfaces.PropComparator): + property = ... # type: Any + expression = ... # type: Any + def __init__(self, expression) -> None: ... + def __clause_element__(self): ... + def adapt_to_entity(self, adapt_to_entity): ... + +class ExprComparator(Comparator): + expression = ... # type: Any + hybrid = ... # type: Any + def __init__(self, expression, hybrid) -> None: ... + def __getattr__(self, key): ... + @property + def info(self): ... + @property + def property(self): ... + def operate(self, op, *other, **kwargs): ... + def reverse_operate(self, op, other, **kwargs): ... diff --git a/third_party/2and3/sqlalchemy/ext/indexable.pyi b/third_party/2and3/sqlalchemy/ext/indexable.pyi new file mode 100644 index 000000000000..5a9f16a0846e --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/indexable.pyi @@ -0,0 +1,18 @@ +# Stubs for sqlalchemy.ext.indexable (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ..ext.hybrid import hybrid_property + +class index_property(hybrid_property): + attr_name = ... # type: Any + index = ... # type: Any + default = ... # type: Any + datatype = ... # type: Any + onebased = ... # type: Any + def __init__(self, attr_name, index, default: Any = ..., datatype: Optional[Any] = ..., mutable: bool = ..., onebased: bool = ...) -> None: ... + def fget(self, instance): ... + def fset(self, instance, value): ... + def fdel(self, instance): ... + def expr(self, model): ... diff --git a/third_party/2and3/sqlalchemy/ext/instrumentation.pyi b/third_party/2and3/sqlalchemy/ext/instrumentation.pyi new file mode 100644 index 000000000000..805253ec1602 --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/instrumentation.pyi @@ -0,0 +1,61 @@ +# Stubs for sqlalchemy.ext.instrumentation (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ..orm import instrumentation as orm_instrumentation +from ..orm.instrumentation import ClassManager as ClassManager, InstrumentationFactory as InstrumentationFactory +from ..orm import attributes as attributes, collections as collections +from ..orm import base as orm_base +from ..orm import exc as orm_exc + +INSTRUMENTATION_MANAGER = ... # type: str + +def find_native_user_instrumentation_hook(cls): ... + +instrumentation_finders = ... # type: Any + +class ExtendedInstrumentationRegistry(InstrumentationFactory): + def unregister(self, class_): ... + def manager_of_class(self, cls): ... + def state_of(self, instance): ... + def dict_of(self, instance): ... + +class InstrumentationManager(object): + def __init__(self, class_) -> None: ... + def manage(self, class_, manager): ... + def dispose(self, class_, manager): ... + def manager_getter(self, class_): ... + def instrument_attribute(self, class_, key, inst): ... + def post_configure_attribute(self, class_, key, inst): ... + def install_descriptor(self, class_, key, inst): ... + def uninstall_descriptor(self, class_, key): ... + def install_member(self, class_, key, implementation): ... + def uninstall_member(self, class_, key): ... + def instrument_collection_class(self, class_, key, collection_class): ... + def get_instance_dict(self, class_, instance): ... + def initialize_instance_dict(self, class_, instance): ... + def install_state(self, class_, instance, state): ... + def remove_state(self, class_, instance): ... + def state_getter(self, class_): ... + def dict_getter(self, class_): ... + +class _ClassInstrumentationAdapter(ClassManager): + def __init__(self, class_, override) -> None: ... + def manage(self): ... + def dispose(self): ... + def manager_getter(self): ... + def instrument_attribute(self, key, inst, propagated: bool = ...): ... + def post_configure_attribute(self, key): ... + def install_descriptor(self, key, inst): ... + def uninstall_descriptor(self, key): ... + def install_member(self, key, implementation): ... + def uninstall_member(self, key): ... + def instrument_collection_class(self, key, collection_class): ... + def initialize_collection(self, key, state, factory): ... + def new_instance(self, state: Optional[Any] = ...): ... + def setup_instance(self, instance, state: Optional[Any] = ...): ... + def teardown_instance(self, instance): ... + def has_state(self, instance): ... + def state_getter(self): ... + def dict_getter(self): ... diff --git a/third_party/2and3/sqlalchemy/ext/mutable.pyi b/third_party/2and3/sqlalchemy/ext/mutable.pyi new file mode 100644 index 000000000000..5bdd7cdb0f68 --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/mutable.pyi @@ -0,0 +1,64 @@ +# Stubs for sqlalchemy.ext.mutable (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from ..orm.attributes import flag_modified as flag_modified +from ..orm import mapper as mapper, object_mapper as object_mapper, Mapper as Mapper +from ..util import memoized_property as memoized_property + +class MutableBase(object): + @classmethod + def coerce(cls, key, value): ... + +class Mutable(MutableBase): + def changed(self): ... + @classmethod + def associate_with_attribute(cls, attribute): ... + @classmethod + def associate_with(cls, sqltype): ... + @classmethod + def as_mutable(cls, sqltype): ... + +class MutableComposite(MutableBase): + def changed(self): ... + +class MutableDict(Mutable, dict): + def __setitem__(self, key, value): ... + def setdefault(self, key, value): ... + def __delitem__(self, key): ... + def update(self, *a, **kw): ... + def pop(self, *arg): ... + def popitem(self): ... + def clear(self): ... + @classmethod + def coerce(cls, key, value): ... + +class MutableList(Mutable, list): + def __setitem__(self, index, value): ... + def __setslice__(self, start, end, value): ... + def __delitem__(self, index): ... + def __delslice__(self, start, end): ... + def pop(self, *arg): ... + def append(self, x): ... + def extend(self, x): ... + def insert(self, i, x): ... + def remove(self, i): ... + def clear(self): ... + def sort(self): ... + def reverse(self): ... + @classmethod + def coerce(cls, index, value): ... + +class MutableSet(Mutable, set): + def update(self, *arg): ... + def intersection_update(self, *arg): ... + def difference_update(self, *arg): ... + def symmetric_difference_update(self, *arg): ... + def add(self, elem): ... + def remove(self, elem): ... + def discard(self, elem): ... + def pop(self, *arg): ... + def clear(self): ... + @classmethod + def coerce(cls, index, value): ... + def __reduce_ex__(self, proto): ... diff --git a/third_party/2and3/sqlalchemy/ext/orderinglist.pyi b/third_party/2and3/sqlalchemy/ext/orderinglist.pyi new file mode 100644 index 000000000000..595f095011b8 --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/orderinglist.pyi @@ -0,0 +1,23 @@ +# Stubs for sqlalchemy.ext.orderinglist (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional + +def ordering_list(attr, count_from: Optional[Any] = ..., **kw): ... + +class OrderingList(list): + ordering_attr = ... # type: Any + ordering_func = ... # type: Any + reorder_on_append = ... # type: Any + def __init__(self, ordering_attr: Optional[Any] = ..., ordering_func: Optional[Any] = ..., reorder_on_append: bool = ...) -> None: ... + def reorder(self): ... + def append(self, entity): ... + def insert(self, index, entity): ... + def remove(self, entity): ... + def pop(self, index: int = ...): ... + def __setitem__(self, index, entity): ... + def __delitem__(self, index): ... + def __setslice__(self, start, end, values): ... + def __delslice__(self, start, end): ... + def __reduce__(self): ... diff --git a/third_party/2and3/sqlalchemy/ext/serializer.pyi b/third_party/2and3/sqlalchemy/ext/serializer.pyi new file mode 100644 index 000000000000..46aaf6c4b972 --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/serializer.pyi @@ -0,0 +1,10 @@ +# Stubs for sqlalchemy.ext.serializer (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional + +def Serializer(*args, **kw): ... +def Deserializer(file, metadata: Optional[Any] = ..., scoped_session: Optional[Any] = ..., engine: Optional[Any] = ...): ... +def dumps(obj, protocol: int = ...): ... +def loads(data, metadata: Optional[Any] = ..., scoped_session: Optional[Any] = ..., engine: Optional[Any] = ...): ... diff --git a/third_party/2and3/sqlalchemy/inspection.pyi b/third_party/2and3/sqlalchemy/inspection.pyi index 2d550cd06a34..b0c1807fa076 100644 --- a/third_party/2and3/sqlalchemy/inspection.pyi +++ b/third_party/2and3/sqlalchemy/inspection.pyi @@ -1,5 +1,5 @@ -# Stubs for sqlalchemy.inspection (Python 2) +# Stubs for sqlalchemy.inspection (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -def inspect(subject, raiseerr=...): ... +def inspect(subject, raiseerr: bool = ...): ... diff --git a/third_party/2and3/sqlalchemy/interfaces.pyi b/third_party/2and3/sqlalchemy/interfaces.pyi new file mode 100644 index 000000000000..2bfc59a0318a --- /dev/null +++ b/third_party/2and3/sqlalchemy/interfaces.pyi @@ -0,0 +1,25 @@ +# Stubs for sqlalchemy.interfaces (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional + +class PoolListener(object): + def connect(self, dbapi_con, con_record): ... + def first_connect(self, dbapi_con, con_record): ... + def checkout(self, dbapi_con, con_record, con_proxy): ... + def checkin(self, dbapi_con, con_record): ... + +class ConnectionProxy(object): + def execute(self, conn, execute, clauseelement, *multiparams, **params): ... + def cursor_execute(self, execute, cursor, statement, parameters, context, executemany): ... + def begin(self, conn, begin): ... + def rollback(self, conn, rollback): ... + def commit(self, conn, commit): ... + def savepoint(self, conn, savepoint, name: Optional[Any] = ...): ... + def rollback_savepoint(self, conn, rollback_savepoint, name, context): ... + def release_savepoint(self, conn, release_savepoint, name, context): ... + def begin_twophase(self, conn, begin_twophase, xid): ... + def prepare_twophase(self, conn, prepare_twophase, xid): ... + def rollback_twophase(self, conn, rollback_twophase, xid, is_prepared): ... + def commit_twophase(self, conn, commit_twophase, xid, is_prepared): ... diff --git a/third_party/2and3/sqlalchemy/log.pyi b/third_party/2and3/sqlalchemy/log.pyi index 9e73bd961e2d..9d4876d26e85 100644 --- a/third_party/2and3/sqlalchemy/log.pyi +++ b/third_party/2and3/sqlalchemy/log.pyi @@ -1,14 +1,36 @@ -import logging -from typing import Any +# Stubs for sqlalchemy.log (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional rootlogger = ... # type: Any +def class_logger(cls): ... + class Identified(object): + logging_name = ... # type: Any def _should_log_debug(self) -> bool: ... def _should_log_info(self) -> bool: ... -class InstanceLogger(object): ... +class InstanceLogger(object): + echo = ... # type: Any + logger = ... # type: Any + def __init__(self, echo, name) -> None: ... + def debug(self, msg, *args, **kwargs): ... + def info(self, msg, *args, **kwargs): ... + def warning(self, msg, *args, **kwargs): ... + warn = ... # type: Any + def error(self, msg, *args, **kwargs): ... + def exception(self, msg, *args, **kwargs): ... + def critical(self, msg, *args, **kwargs): ... + def log(self, level, msg, *args, **kwargs): ... + def isEnabledFor(self, level): ... + def getEffectiveLevel(self): ... -def instance_logger(instance, echoflag) -> None: ... +def instance_logger(instance, echoflag: Optional[Any] = ...): ... -class echo_property(object): ... +class echo_property(object): + __doc__ = ... # type: str + def __get__(self, instance, owner): ... + def __set__(self, instance, value): ... diff --git a/third_party/2and3/sqlalchemy/orm/__init__.pyi b/third_party/2and3/sqlalchemy/orm/__init__.pyi index 2abfdfc3e74a..641349803dae 100644 --- a/third_party/2and3/sqlalchemy/orm/__init__.pyi +++ b/third_party/2and3/sqlalchemy/orm/__init__.pyi @@ -1,59 +1,26 @@ -# Stubs for sqlalchemy.orm (Python 2 and 3) +# Stubs for sqlalchemy.orm (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any -# from . import mapper -# from . import interfaces -# from . import deprecated_interfaces -from . import util -# from . import properties -# from . import relationships -# from . import descriptor_props -from . import session -# from . import scoping -# from . import query -from ..util import langhelpers -# from . import strategy_options - -# Mapper = mapper.Mapper -# class_mapper = mapper.class_mapper -# configure_mappers = mapper.configure_mappers -# reconstructor = mapper.reconstructor -# validates = mapper.validates -# EXT_CONTINUE = interfaces.EXT_CONTINUE -# EXT_STOP = interfaces.EXT_STOP -# PropComparator = interfaces.PropComparator -# MapperExtension = deprecated_interfaces.MapperExtension -# SessionExtension = deprecated_interfaces.SessionExtension -# AttributeExtension = deprecated_interfaces.AttributeExtension -aliased = util.aliased -# join = util.join -# object_mapper = util.object_mapper -# outerjoin = util.outerjoin -# polymorphic_union = util.polymorphic_union -# was_deleted = util.was_deleted -# with_parent = util.with_parent -# with_polymorphic = util.with_polymorphic -# ColumnProperty = properties.ColumnProperty -# RelationshipProperty = relationships.RelationshipProperty -# ComparableProperty = descriptor_props.ComparableProperty -# CompositeProperty = descriptor_props.CompositeProperty -# SynonymProperty = descriptor_props.SynonymProperty -# foreign = relationships.foreign -# remote = relationships.remote -Session = session.Session -object_session = Session.object_session -sessionmaker = session.sessionmaker -# make_transient = session.make_transient -# make_transient_to_detached = session.make_transient_to_detached -# scoped_session = scoping.scoped_session -# AliasOption = query.AliasOption -# Query = query.Query -# Bundle = query.Bundle -public_factory = langhelpers.public_factory - -def create_session(bind=..., **kwargs): ... +from typing import Any, Optional +from .mapper import Mapper as Mapper, class_mapper as class_mapper, configure_mappers as configure_mappers, reconstructor as reconstructor, validates as validates +from .interfaces import EXT_CONTINUE as EXT_CONTINUE, EXT_STOP as EXT_STOP, PropComparator as PropComparator +from .deprecated_interfaces import MapperExtension as MapperExtension, SessionExtension as SessionExtension, AttributeExtension as AttributeExtension +from .util import aliased as aliased, join as join, object_mapper as object_mapper, outerjoin as outerjoin, polymorphic_union as polymorphic_union, was_deleted as was_deleted, with_parent as with_parent, with_polymorphic as with_polymorphic +from .properties import ColumnProperty as ColumnProperty +from .relationships import RelationshipProperty as RelationshipProperty +from .descriptor_props import ComparableProperty as ComparableProperty, CompositeProperty as CompositeProperty, SynonymProperty as SynonymProperty +from .relationships import foreign as foreign, remote as remote +from .session import Session as Session, object_session as object_session, sessionmaker as sessionmaker, make_transient as make_transient, make_transient_to_detached as make_transient_to_detached +from .scoping import scoped_session as scoped_session +from . import mapper as mapperlib +from .query import AliasOption as AliasOption, Query as Query, Bundle as Bundle +from ..util.langhelpers import public_factory as public_factory +from .. import util as _sa_util +from . import strategies as _strategies +from .strategy_options import Load as Load + +def create_session(bind: Optional[Any] = ..., **kwargs): ... relationship = ... # type: Any @@ -66,6 +33,7 @@ composite = ... # type: Any def backref(name, **kwargs): ... def deferred(*columns, **kw): ... +mapper = ... # type: Any synonym = ... # type: Any comparable_property = ... # type: Any @@ -85,10 +53,9 @@ subqueryload = ... # type: Any subqueryload_all = ... # type: Any immediateload = ... # type: Any noload = ... # type: Any +raiseload = ... # type: Any defaultload = ... # type: Any -# Load = strategy_options.Load - def eagerload(*args, **kwargs): ... def eagerload_all(*args, **kwargs): ... diff --git a/third_party/2and3/sqlalchemy/orm/attributes.pyi b/third_party/2and3/sqlalchemy/orm/attributes.pyi new file mode 100644 index 000000000000..df6ffd581419 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/attributes.pyi @@ -0,0 +1,168 @@ +# Stubs for sqlalchemy.orm.attributes (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from . import interfaces +from . import exc as orm_exc +from .base import instance_state as instance_state, instance_dict as instance_dict, manager_of_class as manager_of_class +from .base import PASSIVE_NO_RESULT as PASSIVE_NO_RESULT, ATTR_WAS_SET as ATTR_WAS_SET, ATTR_EMPTY as ATTR_EMPTY, NO_VALUE as NO_VALUE, NEVER_SET as NEVER_SET, NO_CHANGE as NO_CHANGE, CALLABLES_OK as CALLABLES_OK, SQL_OK as SQL_OK, RELATED_OBJECT_OK as RELATED_OBJECT_OK, INIT_OK as INIT_OK, NON_PERSISTENT_OK as NON_PERSISTENT_OK, LOAD_AGAINST_COMMITTED as LOAD_AGAINST_COMMITTED, PASSIVE_OFF as PASSIVE_OFF, PASSIVE_RETURN_NEVER_SET as PASSIVE_RETURN_NEVER_SET, PASSIVE_NO_INITIALIZE as PASSIVE_NO_INITIALIZE, PASSIVE_NO_FETCH as PASSIVE_NO_FETCH, PASSIVE_NO_FETCH_RELATED as PASSIVE_NO_FETCH_RELATED, PASSIVE_ONLY_PERSISTENT as PASSIVE_ONLY_PERSISTENT, NO_AUTOFLUSH as NO_AUTOFLUSH +from .base import state_str as state_str, instance_str as instance_str +from collections import namedtuple + +class QueryableAttribute(interfaces._MappedAttribute, interfaces.InspectionAttr, interfaces.PropComparator): + is_attribute = ... # type: bool + class_ = ... # type: Any + key = ... # type: Any + impl = ... # type: Any + comparator = ... # type: Any + def __init__(self, class_, key, impl: Optional[Any] = ..., comparator: Optional[Any] = ..., parententity: Optional[Any] = ..., of_type: Optional[Any] = ...) -> None: ... + def get_history(self, instance, passive: Any = ...): ... + def __selectable__(self): ... + @property + def info(self): ... + @property + def parent(self): ... + @property + def expression(self): ... + def __clause_element__(self): ... + def adapt_to_entity(self, adapt_to_entity): ... + def of_type(self, cls): ... + def label(self, name): ... + def operate(self, op, *other, **kwargs): ... + def reverse_operate(self, op, other, **kwargs): ... + def hasparent(self, state, optimistic: bool = ...): ... + def __getattr__(self, key): ... + @property + def property(self): ... + +class InstrumentedAttribute(QueryableAttribute): + def __set__(self, instance, value): ... + def __delete__(self, instance): ... + def __get__(self, instance, owner): ... + +def create_proxied_attribute(descriptor): ... + +OP_REMOVE = ... # type: Any +OP_APPEND = ... # type: Any +OP_REPLACE = ... # type: Any + +class Event(object): + impl = ... # type: Any + op = ... # type: Any + parent_token = ... # type: Any + def __init__(self, attribute_impl, op) -> None: ... + def __eq__(self, other): ... + @property + def key(self): ... + def hasparent(self, state): ... + +class AttributeImpl(object): + class_ = ... # type: Any + key = ... # type: Any + callable_ = ... # type: Any + dispatch = ... # type: Any + trackparent = ... # type: Any + parent_token = ... # type: Any + send_modified_events = ... # type: Any + is_equal = ... # type: Any + expire_missing = ... # type: Any + def __init__(self, class_, key, callable_, dispatch, trackparent: bool = ..., extension: Optional[Any] = ..., compare_function: Optional[Any] = ..., active_history: bool = ..., parent_token: Optional[Any] = ..., expire_missing: bool = ..., send_modified_events: bool = ..., **kwargs) -> None: ... + active_history = ... # type: Any + def hasparent(self, state, optimistic: bool = ...): ... + def sethasparent(self, state, parent_state, value): ... + def get_history(self, state, dict_, passive: Any = ...): ... + def get_all_pending(self, state, dict_, passive: Any = ...): ... + def initialize(self, state, dict_): ... + def get(self, state, dict_, passive: Any = ...): ... + def append(self, state, dict_, value, initiator, passive: Any = ...): ... + def remove(self, state, dict_, value, initiator, passive: Any = ...): ... + def pop(self, state, dict_, value, initiator, passive: Any = ...): ... + def set(self, state, dict_, value, initiator, passive: Any = ..., check_old: Optional[Any] = ..., pop: bool = ...): ... + def get_committed_value(self, state, dict_, passive: Any = ...): ... + def set_committed_value(self, state, dict_, value): ... + +class ScalarAttributeImpl(AttributeImpl): + accepts_scalar_loader = ... # type: bool + uses_objects = ... # type: bool + supports_population = ... # type: bool + collection = ... # type: bool + def __init__(self, *arg, **kw) -> None: ... + def delete(self, state, dict_): ... + def get_history(self, state, dict_, passive: Any = ...): ... + def set(self, state, dict_, value, initiator, passive: Any = ..., check_old: Optional[Any] = ..., pop: bool = ...): ... + def fire_replace_event(self, state, dict_, value, previous, initiator): ... + def fire_remove_event(self, state, dict_, value, initiator): ... + @property + def type(self): ... + +class ScalarObjectAttributeImpl(ScalarAttributeImpl): + accepts_scalar_loader = ... # type: bool + uses_objects = ... # type: bool + supports_population = ... # type: bool + collection = ... # type: bool + def delete(self, state, dict_): ... + def get_history(self, state, dict_, passive: Any = ...): ... + def get_all_pending(self, state, dict_, passive: Any = ...): ... + def set(self, state, dict_, value, initiator, passive: Any = ..., check_old: Optional[Any] = ..., pop: bool = ...): ... + def fire_remove_event(self, state, dict_, value, initiator): ... + def fire_replace_event(self, state, dict_, value, previous, initiator): ... + +class CollectionAttributeImpl(AttributeImpl): + accepts_scalar_loader = ... # type: bool + uses_objects = ... # type: bool + supports_population = ... # type: bool + collection = ... # type: bool + copy = ... # type: Any + collection_factory = ... # type: Any + def __init__(self, class_, key, callable_, dispatch, typecallable: Optional[Any] = ..., trackparent: bool = ..., extension: Optional[Any] = ..., copy_function: Optional[Any] = ..., compare_function: Optional[Any] = ..., **kwargs) -> None: ... + def get_history(self, state, dict_, passive: Any = ...): ... + def get_all_pending(self, state, dict_, passive: Any = ...): ... + def fire_append_event(self, state, dict_, value, initiator): ... + def fire_pre_remove_event(self, state, dict_, initiator): ... + def fire_remove_event(self, state, dict_, value, initiator): ... + def delete(self, state, dict_): ... + def initialize(self, state, dict_): ... + def append(self, state, dict_, value, initiator, passive: Any = ...): ... + def remove(self, state, dict_, value, initiator, passive: Any = ...): ... + def pop(self, state, dict_, value, initiator, passive: Any = ...): ... + def set(self, *args, **kwargs): ... + def set_committed_value(self, state, dict_, value): ... + def get_collection(self, state, dict_, user_data: Optional[Any] = ..., passive: Any = ...): ... + +def backref_listeners(attribute, key, uselist): ... + +_History = namedtuple('_History', ['added', 'unchanged', 'deleted']) + +class History(_History): + def __bool__(self): ... + __nonzero__ = ... # type: Any + def empty(self): ... + def sum(self): ... + def non_deleted(self): ... + def non_added(self): ... + def has_changes(self): ... + def as_state(self): ... + @classmethod + def from_scalar_attribute(cls, attribute, state, current): ... + @classmethod + def from_object_attribute(cls, attribute, state, current): ... + @classmethod + def from_collection(cls, attribute, state, current): ... + +HISTORY_BLANK = ... # type: Any + +def get_history(obj, key, passive: Any = ...): ... +def get_state_history(state, key, passive: Any = ...): ... +def has_parent(cls, obj, key, optimistic: bool = ...): ... +def register_attribute(class_, key, **kw): ... +def register_attribute_impl(class_, key, uselist: bool = ..., callable_: Optional[Any] = ..., useobject: bool = ..., impl_class: Optional[Any] = ..., backref: Optional[Any] = ..., **kw): ... +def register_descriptor(class_, key, comparator: Optional[Any] = ..., parententity: Optional[Any] = ..., doc: Optional[Any] = ...): ... +def unregister_attribute(class_, key): ... +def init_collection(obj, key): ... +def init_state_collection(state, dict_, key): ... +def set_committed_value(instance, key, value): ... +def set_attribute(instance, key, value): ... +def get_attribute(instance, key): ... +def del_attribute(instance, key): ... +def flag_modified(instance, key): ... diff --git a/third_party/2and3/sqlalchemy/orm/base.pyi b/third_party/2and3/sqlalchemy/orm/base.pyi new file mode 100644 index 000000000000..1a6252f98032 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/base.pyi @@ -0,0 +1,65 @@ +# Stubs for sqlalchemy.orm.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .. import exc as sa_exc +from ..sql import expression as expression + +PASSIVE_NO_RESULT = ... # type: Any +ATTR_WAS_SET = ... # type: Any +ATTR_EMPTY = ... # type: Any +NO_VALUE = ... # type: Any +NEVER_SET = ... # type: Any +NO_CHANGE = ... # type: Any +CALLABLES_OK = ... # type: Any +SQL_OK = ... # type: Any +RELATED_OBJECT_OK = ... # type: Any +INIT_OK = ... # type: Any +NON_PERSISTENT_OK = ... # type: Any +LOAD_AGAINST_COMMITTED = ... # type: Any +NO_AUTOFLUSH = ... # type: Any +PASSIVE_OFF = ... # type: Any +PASSIVE_RETURN_NEVER_SET = ... # type: Any +PASSIVE_NO_INITIALIZE = ... # type: Any +PASSIVE_NO_FETCH = ... # type: Any +PASSIVE_NO_FETCH_RELATED = ... # type: Any +PASSIVE_ONLY_PERSISTENT = ... # type: Any +DEFAULT_MANAGER_ATTR = ... # type: str +DEFAULT_STATE_ATTR = ... # type: str +EXT_CONTINUE = ... # type: Any +EXT_STOP = ... # type: Any +ONETOMANY = ... # type: Any +MANYTOONE = ... # type: Any +MANYTOMANY = ... # type: Any +NOT_EXTENSION = ... # type: Any + +def manager_of_class(cls): ... + +instance_state = ... # type: Any +instance_dict = ... # type: Any + +def instance_str(instance): ... +def state_str(state): ... +def state_class_str(state): ... +def attribute_str(instance, attribute): ... +def state_attribute_str(state, attribute): ... +def object_mapper(instance): ... +def object_state(instance): ... +def class_mapper(class_, configure: bool = ...): ... + +class InspectionAttr(object): + is_selectable = ... # type: bool + is_aliased_class = ... # type: bool + is_instance = ... # type: bool + is_mapper = ... # type: bool + is_property = ... # type: bool + is_attribute = ... # type: bool + is_clause_element = ... # type: bool + extension_type = ... # type: Any + +class InspectionAttrInfo(InspectionAttr): + @property + def info(self): ... + +class _MappedAttribute(object): ... diff --git a/third_party/2and3/sqlalchemy/orm/collections.pyi b/third_party/2and3/sqlalchemy/orm/collections.pyi new file mode 100644 index 000000000000..6a7aea50df47 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/collections.pyi @@ -0,0 +1,97 @@ +# Stubs for sqlalchemy.orm.collections (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .. import exc as sa_exc + +class _PlainColumnGetter(object): + cols = ... # type: Any + composite = ... # type: Any + def __init__(self, cols) -> None: ... + def __reduce__(self): ... + def __call__(self, value): ... + +class _SerializableColumnGetter(object): + colkeys = ... # type: Any + composite = ... # type: Any + def __init__(self, colkeys) -> None: ... + def __reduce__(self): ... + def __call__(self, value): ... + +class _SerializableColumnGetterV2(_PlainColumnGetter): + colkeys = ... # type: Any + composite = ... # type: Any + def __init__(self, colkeys) -> None: ... + def __reduce__(self): ... + +def column_mapped_collection(mapping_spec): ... + +class _SerializableAttrGetter(object): + name = ... # type: Any + getter = ... # type: Any + def __init__(self, name) -> None: ... + def __call__(self, target): ... + def __reduce__(self): ... + +def attribute_mapped_collection(attr_name): ... +def mapped_collection(keyfunc): ... + +class collection(object): + @staticmethod + def appender(fn): ... + @staticmethod + def remover(fn): ... + @staticmethod + def iterator(fn): ... + @staticmethod + def internally_instrumented(fn): ... + @staticmethod + def linker(fn): ... + link = ... # type: Any + @staticmethod + def converter(fn): ... + @staticmethod + def adds(arg): ... + @staticmethod + def replaces(arg): ... + @staticmethod + def removes(arg): ... + @staticmethod + def removes_return(): ... + +collection_adapter = ... # type: Any + +class CollectionAdapter(object): + attr = ... # type: Any + owner_state = ... # type: Any + invalidated = ... # type: bool + def __init__(self, attr, owner_state, data) -> None: ... + @property + def data(self): ... + def bulk_appender(self): ... + def append_with_event(self, item, initiator: Optional[Any] = ...): ... + def append_without_event(self, item): ... + def append_multiple_without_event(self, items): ... + def bulk_remover(self): ... + def remove_with_event(self, item, initiator: Optional[Any] = ...): ... + def remove_without_event(self, item): ... + def clear_with_event(self, initiator: Optional[Any] = ...): ... + def clear_without_event(self): ... + def __iter__(self): ... + def __len__(self): ... + def __bool__(self): ... + __nonzero__ = ... # type: Any + def fire_append_event(self, item, initiator: Optional[Any] = ...): ... + def fire_remove_event(self, item, initiator: Optional[Any] = ...): ... + def fire_pre_remove_event(self, initiator: Optional[Any] = ...): ... + +class InstrumentedList(list): ... +class InstrumentedSet(set): ... +class InstrumentedDict(dict): ... + +class MappedCollection(dict): + keyfunc = ... # type: Any + def __init__(self, keyfunc) -> None: ... + def set(self, value, _sa_initiator: Optional[Any] = ...): ... + def remove(self, value, _sa_initiator: Optional[Any] = ...): ... diff --git a/third_party/2and3/sqlalchemy/orm/dependency.pyi b/third_party/2and3/sqlalchemy/orm/dependency.pyi new file mode 100644 index 000000000000..96178e7f708f --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/dependency.pyi @@ -0,0 +1,68 @@ +# Stubs for sqlalchemy.orm.dependency (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .. import exc as sa_exc +from . import util as mapperutil +from .interfaces import ONETOMANY as ONETOMANY, MANYTOONE as MANYTOONE, MANYTOMANY as MANYTOMANY + +class DependencyProcessor(object): + prop = ... # type: Any + cascade = ... # type: Any + mapper = ... # type: Any + parent = ... # type: Any + secondary = ... # type: Any + direction = ... # type: Any + post_update = ... # type: Any + passive_deletes = ... # type: Any + passive_updates = ... # type: Any + enable_typechecks = ... # type: Any + key = ... # type: Any + def __init__(self, prop) -> None: ... + @classmethod + def from_relationship(cls, prop): ... + def hasparent(self, state): ... + def per_property_preprocessors(self, uow): ... + def per_property_flush_actions(self, uow): ... + def per_state_flush_actions(self, uow, states, isdelete): ... + def presort_deletes(self, uowcommit, states): ... + def presort_saves(self, uowcommit, states): ... + def process_deletes(self, uowcommit, states): ... + def process_saves(self, uowcommit, states): ... + def prop_has_changes(self, uowcommit, states, isdelete): ... + +class OneToManyDP(DependencyProcessor): + def per_property_dependencies(self, uow, parent_saves, child_saves, parent_deletes, child_deletes, after_save, before_delete): ... + def per_state_dependencies(self, uow, save_parent, delete_parent, child_action, after_save, before_delete, isdelete, childisdelete): ... + def presort_deletes(self, uowcommit, states): ... + def presort_saves(self, uowcommit, states): ... + def process_deletes(self, uowcommit, states): ... + def process_saves(self, uowcommit, states): ... + +class ManyToOneDP(DependencyProcessor): + def __init__(self, prop) -> None: ... + def per_property_dependencies(self, uow, parent_saves, child_saves, parent_deletes, child_deletes, after_save, before_delete): ... + def per_state_dependencies(self, uow, save_parent, delete_parent, child_action, after_save, before_delete, isdelete, childisdelete): ... + def presort_deletes(self, uowcommit, states): ... + def presort_saves(self, uowcommit, states): ... + def process_deletes(self, uowcommit, states): ... + def process_saves(self, uowcommit, states): ... + +class DetectKeySwitch(DependencyProcessor): + def per_property_preprocessors(self, uow): ... + def per_property_flush_actions(self, uow): ... + def per_state_flush_actions(self, uow, states, isdelete): ... + def presort_deletes(self, uowcommit, states): ... + def presort_saves(self, uow, states): ... + def prop_has_changes(self, uow, states, isdelete): ... + def process_deletes(self, uowcommit, states): ... + def process_saves(self, uowcommit, states): ... + +class ManyToManyDP(DependencyProcessor): + def per_property_dependencies(self, uow, parent_saves, child_saves, parent_deletes, child_deletes, after_save, before_delete): ... + def per_state_dependencies(self, uow, save_parent, delete_parent, child_action, after_save, before_delete, isdelete, childisdelete): ... + def presort_deletes(self, uowcommit, states): ... + def presort_saves(self, uowcommit, states): ... + def process_deletes(self, uowcommit, states): ... + def process_saves(self, uowcommit, states): ... diff --git a/third_party/2and3/sqlalchemy/orm/deprecated_interfaces.pyi b/third_party/2and3/sqlalchemy/orm/deprecated_interfaces.pyi new file mode 100644 index 000000000000..e08c3d82951b --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/deprecated_interfaces.pyi @@ -0,0 +1,35 @@ +# Stubs for sqlalchemy.orm.deprecated_interfaces (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from .interfaces import EXT_CONTINUE as EXT_CONTINUE + +class MapperExtension(object): + def instrument_class(self, mapper, class_): ... + def init_instance(self, mapper, class_, oldinit, instance, args, kwargs): ... + def init_failed(self, mapper, class_, oldinit, instance, args, kwargs): ... + def reconstruct_instance(self, mapper, instance): ... + def before_insert(self, mapper, connection, instance): ... + def after_insert(self, mapper, connection, instance): ... + def before_update(self, mapper, connection, instance): ... + def after_update(self, mapper, connection, instance): ... + def before_delete(self, mapper, connection, instance): ... + def after_delete(self, mapper, connection, instance): ... + +class SessionExtension(object): + def before_commit(self, session): ... + def after_commit(self, session): ... + def after_rollback(self, session): ... + def before_flush(self, session, flush_context, instances): ... + def after_flush(self, session, flush_context): ... + def after_flush_postexec(self, session, flush_context): ... + def after_begin(self, session, transaction, connection): ... + def after_attach(self, session, instance): ... + def after_bulk_update(self, session, query, query_context, result): ... + def after_bulk_delete(self, session, query, query_context, result): ... + +class AttributeExtension(object): + active_history = ... # type: bool + def append(self, state, value, initiator): ... + def remove(self, state, value, initiator): ... + def set(self, state, value, oldvalue, initiator): ... diff --git a/third_party/2and3/sqlalchemy/orm/descriptor_props.pyi b/third_party/2and3/sqlalchemy/orm/descriptor_props.pyi new file mode 100644 index 000000000000..44d27dea8b12 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/descriptor_props.pyi @@ -0,0 +1,65 @@ +# Stubs for sqlalchemy.orm.descriptor_props (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .interfaces import MapperProperty as MapperProperty, PropComparator as PropComparator +from .. import exc as sa_exc +from ..sql import expression as expression +from . import query + +class DescriptorProperty(MapperProperty): + doc = ... # type: Any + key = ... # type: Any + descriptor = ... # type: Any + def instrument_class(self, mapper): ... + +class CompositeProperty(DescriptorProperty): + attrs = ... # type: Any + composite_class = ... # type: Any + active_history = ... # type: Any + deferred = ... # type: Any + group = ... # type: Any + comparator_factory = ... # type: Any + info = ... # type: Any + def __init__(self, class_, *attrs, **kwargs) -> None: ... + def instrument_class(self, mapper): ... + def do_init(self): ... + @property + def props(self): ... + @property + def columns(self): ... + def get_history(self, state, dict_, passive: Any = ...): ... + class CompositeBundle(query.Bundle): + property = ... # type: Any + def __init__(self, property, expr) -> None: ... + def create_row_processor(self, query, procs, labels): ... + class Comparator(PropComparator): + __hash__ = ... # type: Any + @property + def clauses(self): ... + def __clause_element__(self): ... + def __eq__(self, other): ... + def __ne__(self, other): ... + +class ConcreteInheritedProperty(DescriptorProperty): + descriptor = ... # type: Any + def __init__(self) -> None: ... + +class SynonymProperty(DescriptorProperty): + name = ... # type: Any + map_column = ... # type: Any + descriptor = ... # type: Any + comparator_factory = ... # type: Any + doc = ... # type: Any + info = ... # type: Any + def __init__(self, name, map_column: Optional[Any] = ..., descriptor: Optional[Any] = ..., comparator_factory: Optional[Any] = ..., doc: Optional[Any] = ..., info: Optional[Any] = ...) -> None: ... + parent = ... # type: Any + def set_parent(self, parent, init): ... + +class ComparableProperty(DescriptorProperty): + descriptor = ... # type: Any + comparator_factory = ... # type: Any + doc = ... # type: Any + info = ... # type: Any + def __init__(self, comparator_factory, descriptor: Optional[Any] = ..., doc: Optional[Any] = ..., info: Optional[Any] = ...) -> None: ... diff --git a/third_party/2and3/sqlalchemy/orm/dynamic.pyi b/third_party/2and3/sqlalchemy/orm/dynamic.pyi new file mode 100644 index 000000000000..9f80c0edf66a --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/dynamic.pyi @@ -0,0 +1,67 @@ +# Stubs for sqlalchemy.orm.dynamic (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from . import strategies +from . import attributes +from ..sql import operators as operators +from . import util as orm_util, exc as orm_exc +from .query import Query as Query + +class DynaLoader(strategies.AbstractRelationshipLoader): + is_class_level = ... # type: bool + def init_class_attribute(self, mapper): ... + +class DynamicAttributeImpl(attributes.AttributeImpl): + uses_objects = ... # type: bool + accepts_scalar_loader = ... # type: bool + supports_population = ... # type: bool + collection = ... # type: bool + target_mapper = ... # type: Any + order_by = ... # type: Any + query_class = ... # type: Any + def __init__(self, class_, key, typecallable, dispatch, target_mapper, order_by, query_class: Optional[Any] = ..., **kw) -> None: ... + def get(self, state, dict_, passive: Any = ...): ... + def get_collection(self, state, dict_, user_data: Optional[Any] = ..., passive: Any = ...): ... + def fire_append_event(self, state, dict_, value, initiator, collection_history: Optional[Any] = ...): ... + def fire_remove_event(self, state, dict_, value, initiator, collection_history: Optional[Any] = ...): ... + def set(self, state, dict_, value, initiator: Optional[Any] = ..., passive: Any = ..., check_old: Optional[Any] = ..., pop: bool = ..., _adapt: bool = ...): ... + def delete(self, *args, **kwargs): ... + def set_committed_value(self, state, dict_, value): ... + def get_history(self, state, dict_, passive: Any = ...): ... + def get_all_pending(self, state, dict_, passive: Any = ...): ... + def append(self, state, dict_, value, initiator, passive: Any = ...): ... + def remove(self, state, dict_, value, initiator, passive: Any = ...): ... + def pop(self, state, dict_, value, initiator, passive: Any = ...): ... + +class AppenderMixin(object): + query_class = ... # type: Any + instance = ... # type: Any + attr = ... # type: Any + def __init__(self, attr, state) -> None: ... + session = ... # type: Any + def __iter__(self): ... + def __getitem__(self, index): ... + def count(self): ... + def extend(self, iterator): ... + def append(self, item): ... + def remove(self, item): ... + +class AppenderQuery(AppenderMixin, Query): ... + +def mixin_user_query(cls): ... + +class CollectionHistory(object): + unchanged_items = ... # type: Any + added_items = ... # type: Any + deleted_items = ... # type: Any + def __init__(self, attr, state, apply_to: Optional[Any] = ...) -> None: ... + @property + def added_plus_unchanged(self): ... + @property + def all_items(self): ... + def as_history(self): ... + def indexed(self, index): ... + def add_added(self, value): ... + def add_removed(self, value): ... diff --git a/third_party/2and3/sqlalchemy/orm/evaluator.pyi b/third_party/2and3/sqlalchemy/orm/evaluator.pyi new file mode 100644 index 000000000000..8e55bcf46997 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/evaluator.pyi @@ -0,0 +1,22 @@ +# Stubs for sqlalchemy.orm.evaluator (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ..sql import operators as operators + +class UnevaluatableError(Exception): ... + +class EvaluatorCompiler(object): + target_cls = ... # type: Any + def __init__(self, target_cls: Optional[Any] = ...) -> None: ... + def process(self, clause): ... + def visit_grouping(self, clause): ... + def visit_null(self, clause): ... + def visit_false(self, clause): ... + def visit_true(self, clause): ... + def visit_column(self, clause): ... + def visit_clauselist(self, clause): ... + def visit_binary(self, clause): ... + def visit_unary(self, clause): ... + def visit_bindparam(self, clause): ... diff --git a/third_party/2and3/sqlalchemy/orm/events.pyi b/third_party/2and3/sqlalchemy/orm/events.pyi new file mode 100644 index 000000000000..3195c965cc03 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/events.pyi @@ -0,0 +1,100 @@ +# Stubs for sqlalchemy.orm.events (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .. import event +from .session import Session as Session, sessionmaker as sessionmaker +from .scoping import scoped_session as scoped_session +from .attributes import QueryableAttribute as QueryableAttribute +from .query import Query as Query + +class InstrumentationEvents(event.Events): + def class_instrument(self, cls): ... + def class_uninstrument(self, cls): ... + def attribute_instrument(self, cls, key, inst): ... + +class _InstrumentationEventsHold(object): + class_ = ... # type: Any + def __init__(self, class_) -> None: ... + dispatch = ... # type: Any + +class InstanceEvents(event.Events): + def first_init(self, manager, cls): ... + def init(self, target, args, kwargs): ... + def init_failure(self, target, args, kwargs): ... + def load(self, target, context): ... + def refresh(self, target, context, attrs): ... + def refresh_flush(self, target, flush_context, attrs): ... + def expire(self, target, attrs): ... + def pickle(self, target, state_dict): ... + def unpickle(self, target, state_dict): ... + +class _EventsHold(event.RefCollection): + class_ = ... # type: Any + def __init__(self, class_) -> None: ... + class HoldEvents(object): ... + def remove(self, event_key): ... + @classmethod + def populate(cls, class_, subject): ... + +class _InstanceEventsHold(_EventsHold): + all_holds = ... # type: Any + def resolve(self, class_): ... + class HoldInstanceEvents(_EventsHold.HoldEvents, InstanceEvents): ... + dispatch = ... # type: Any + +class MapperEvents(event.Events): + def instrument_class(self, mapper, class_): ... + def mapper_configured(self, mapper, class_): ... + def before_configured(self): ... + def after_configured(self): ... + def before_insert(self, mapper, connection, target): ... + def after_insert(self, mapper, connection, target): ... + def before_update(self, mapper, connection, target): ... + def after_update(self, mapper, connection, target): ... + def before_delete(self, mapper, connection, target): ... + def after_delete(self, mapper, connection, target): ... + +class _MapperEventsHold(_EventsHold): + all_holds = ... # type: Any + def resolve(self, class_): ... + class HoldMapperEvents(_EventsHold.HoldEvents, MapperEvents): ... + dispatch = ... # type: Any + +class SessionEvents(event.Events): + def after_transaction_create(self, session, transaction): ... + def after_transaction_end(self, session, transaction): ... + def before_commit(self, session): ... + def after_commit(self, session): ... + def after_rollback(self, session): ... + def after_soft_rollback(self, session, previous_transaction): ... + def before_flush(self, session, flush_context, instances): ... + def after_flush(self, session, flush_context): ... + def after_flush_postexec(self, session, flush_context): ... + def after_begin(self, session, transaction, connection): ... + def before_attach(self, session, instance): ... + def after_attach(self, session, instance): ... + def after_bulk_update(self, update_context): ... + def after_bulk_delete(self, delete_context): ... + def transient_to_pending(self, session, instance): ... + def pending_to_transient(self, session, instance): ... + def persistent_to_transient(self, session, instance): ... + def pending_to_persistent(self, session, instance): ... + def detached_to_persistent(self, session, instance): ... + def loaded_as_persistent(self, session, instance): ... + def persistent_to_deleted(self, session, instance): ... + def deleted_to_persistent(self, session, instance): ... + def deleted_to_detached(self, session, instance): ... + def persistent_to_detached(self, session, instance): ... + +class AttributeEvents(event.Events): + def append(self, target, value, initiator): ... + def remove(self, target, value, initiator): ... + def set(self, target, value, oldvalue, initiator): ... + def init_scalar(self, target, value, dict_): ... + def init_collection(self, target, collection, collection_adapter): ... + def dispose_collection(self, target, collection, collection_adpater): ... + +class QueryEvents(event.Events): + def before_compile(self, query): ... diff --git a/third_party/2and3/sqlalchemy/orm/exc.pyi b/third_party/2and3/sqlalchemy/orm/exc.pyi new file mode 100644 index 000000000000..cdfef480efa3 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/exc.pyi @@ -0,0 +1,33 @@ +# Stubs for sqlalchemy.orm.exc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .. import exc as sa_exc + +NO_STATE = ... # type: Any + +class StaleDataError(sa_exc.SQLAlchemyError): ... + +ConcurrentModificationError = ... # type: Any + +class FlushError(sa_exc.SQLAlchemyError): ... +class UnmappedError(sa_exc.InvalidRequestError): ... +class ObjectDereferencedError(sa_exc.SQLAlchemyError): ... +class DetachedInstanceError(sa_exc.SQLAlchemyError): ... + +class UnmappedInstanceError(UnmappedError): + def __init__(self, obj, msg: Optional[Any] = ...) -> None: ... + def __reduce__(self): ... + +class UnmappedClassError(UnmappedError): + def __init__(self, cls, msg: Optional[Any] = ...) -> None: ... + def __reduce__(self): ... + +class ObjectDeletedError(sa_exc.InvalidRequestError): + def __init__(self, state, msg: Optional[Any] = ...) -> None: ... + def __reduce__(self): ... + +class UnmappedColumnError(sa_exc.InvalidRequestError): ... +class NoResultFound(sa_exc.InvalidRequestError): ... +class MultipleResultsFound(sa_exc.InvalidRequestError): ... diff --git a/third_party/2and3/sqlalchemy/orm/identity.pyi b/third_party/2and3/sqlalchemy/orm/identity.pyi new file mode 100644 index 000000000000..59dc8c6c3184 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/identity.pyi @@ -0,0 +1,59 @@ +# Stubs for sqlalchemy.orm.identity (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .. import exc as sa_exc +from . import util as orm_util + +class IdentityMap(object): + def __init__(self) -> None: ... + def keys(self): ... + def replace(self, state): ... + def add(self, state): ... + def update(self, dict): ... + def clear(self): ... + def check_modified(self): ... + def has_key(self, key): ... + def popitem(self): ... + def pop(self, key, *args): ... + def setdefault(self, key, default: Optional[Any] = ...): ... + def __len__(self): ... + def copy(self): ... + def __setitem__(self, key, value): ... + def __delitem__(self, key): ... + +class WeakInstanceDict(IdentityMap): + def __getitem__(self, key): ... + def __contains__(self, key): ... + def contains_state(self, state): ... + def replace(self, state): ... + def add(self, state): ... + def get(self, key, default: Optional[Any] = ...): ... + def items(self): ... + def values(self): ... + def __iter__(self): ... + def iteritems(self): ... + def itervalues(self): ... + def all_states(self): ... + def discard(self, state): ... + def safe_discard(self, state): ... + def prune(self): ... + +class StrongInstanceDict(IdentityMap): + def itervalues(self): ... + def iteritems(self): ... + def __iter__(self): ... + def __getitem__(self, key): ... + def __contains__(self, key): ... + def get(self, key, default: Optional[Any] = ...): ... + def values(self): ... + def items(self): ... + def all_states(self): ... + def contains_state(self, state): ... + def replace(self, state): ... + def add(self, state): ... + def discard(self, state): ... + def safe_discard(self, state): ... + modified = ... # type: Any + def prune(self): ... diff --git a/third_party/2and3/sqlalchemy/orm/instrumentation.pyi b/third_party/2and3/sqlalchemy/orm/instrumentation.pyi new file mode 100644 index 000000000000..6aae1a308a40 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/instrumentation.pyi @@ -0,0 +1,69 @@ +# Stubs for sqlalchemy.orm.instrumentation (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional + +class ClassManager(dict): + MANAGER_ATTR = ... # type: Any + STATE_ATTR = ... # type: Any + deferred_scalar_loader = ... # type: Any + original_init = ... # type: Any + factory = ... # type: Any + class_ = ... # type: Any + info = ... # type: Any + new_init = ... # type: Any + local_attrs = ... # type: Any + originals = ... # type: Any + def __init__(self, class_) -> None: ... + def __hash__(self): ... + def __eq__(self, other): ... + @property + def is_mapped(self): ... + def manage(self): ... + def dispose(self): ... + def manager_getter(self): ... + def state_getter(self): ... + def dict_getter(self): ... + def instrument_attribute(self, key, inst, propagated: bool = ...): ... + def subclass_managers(self, recursive): ... + def post_configure_attribute(self, key): ... + def uninstrument_attribute(self, key, propagated: bool = ...): ... + mapper = ... # type: Any + def unregister(self): ... + def install_descriptor(self, key, inst): ... + def uninstall_descriptor(self, key): ... + def install_member(self, key, implementation): ... + def uninstall_member(self, key): ... + def instrument_collection_class(self, key, collection_class): ... + def initialize_collection(self, key, state, factory): ... + def is_instrumented(self, key, search: bool = ...): ... + def get_impl(self, key): ... + @property + def attributes(self): ... + def new_instance(self, state: Optional[Any] = ...): ... + def setup_instance(self, instance, state: Optional[Any] = ...): ... + def teardown_instance(self, instance): ... + def has_state(self, instance): ... + def has_parent(self, state, key, optimistic: bool = ...): ... + def __bool__(self): ... + __nonzero__ = ... # type: Any + +class _SerializeManager(object): + class_ = ... # type: Any + def __init__(self, state, d) -> None: ... + def __call__(self, state, inst, state_dict): ... + +class InstrumentationFactory(object): + def create_manager_for_cls(self, class_): ... + def unregister(self, class_): ... + +instance_state = ... # type: Any + +instance_dict = ... # type: Any + +manager_of_class = ... # type: Any + +def register_class(class_): ... +def unregister_class(class_): ... +def is_instrumented(instance, key): ... diff --git a/third_party/2and3/sqlalchemy/orm/interfaces.pyi b/third_party/2and3/sqlalchemy/orm/interfaces.pyi new file mode 100644 index 000000000000..212685bc3a22 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/interfaces.pyi @@ -0,0 +1,76 @@ +# Stubs for sqlalchemy.orm.interfaces (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .. import util +from ..sql import operators +from .base import ONETOMANY as ONETOMANY, MANYTOONE as MANYTOONE, MANYTOMANY as MANYTOMANY, EXT_CONTINUE as EXT_CONTINUE, EXT_STOP as EXT_STOP, NOT_EXTENSION as NOT_EXTENSION, InspectionAttrInfo as InspectionAttrInfo +from .base import InspectionAttr, _MappedAttribute + +MapperExtension = ... # type: Any +SessionExtension = ... # type: Any +AttributeExtension = ... # type: Any + +class MapperProperty(_MappedAttribute, InspectionAttr, util.MemoizedSlots): + cascade = ... # type: Any + is_property = ... # type: bool + def setup(self, context, entity, path, adapter, **kwargs): ... + def create_row_processor(self, context, path, mapper, result, adapter, populators): ... + def cascade_iterator(self, type_, state, visited_instances: Optional[Any] = ..., halt_on: Optional[Any] = ...): ... + parent = ... # type: Any + def set_parent(self, parent, init): ... + def instrument_class(self, mapper): ... + def __init__(self) -> None: ... + def init(self): ... + @property + def class_attribute(self): ... + def do_init(self): ... + def post_instrument_class(self, mapper): ... + def merge(self, session, source_state, source_dict, dest_state, dest_dict, load, _recursive, _resolve_conflict_map): ... + +class PropComparator(operators.ColumnOperators): + prop = ... # type: Any + def __init__(self, prop, parentmapper, adapt_to_entity: Optional[Any] = ...) -> None: ... + def __clause_element__(self): ... + def adapt_to_entity(self, adapt_to_entity): ... + @property + def adapter(self): ... + @property + def info(self): ... + @staticmethod + def any_op(a, b, **kwargs): ... + @staticmethod + def has_op(a, b, **kwargs): ... + @staticmethod + def of_type_op(a, class_): ... + def of_type(self, class_): ... + def any(self, criterion: Optional[Any] = ..., **kwargs): ... + def has(self, criterion: Optional[Any] = ..., **kwargs): ... + +class StrategizedProperty(MapperProperty): + strategy_wildcard_key = ... # type: Any + def setup(self, context, entity, path, adapter, **kwargs): ... + def create_row_processor(self, context, path, mapper, result, adapter, populators): ... + strategy = ... # type: Any + def do_init(self): ... + def post_instrument_class(self, mapper): ... + @classmethod + def strategy_for(cls, **kw): ... + +class MapperOption(object): + propagate_to_loaders = ... # type: bool + def process_query(self, query): ... + def process_query_conditionally(self, query): ... + +class LoaderStrategy(object): + parent_property = ... # type: Any + is_class_level = ... # type: bool + parent = ... # type: Any + key = ... # type: Any + strategy_key = ... # type: Any + strategy_opts = ... # type: Any + def __init__(self, parent, strategy_key) -> None: ... + def init_class_attribute(self, mapper): ... + def setup_query(self, context, entity, path, loadopt, adapter, **kwargs): ... + def create_row_processor(self, context, path, loadopt, mapper, result, adapter, populators): ... diff --git a/third_party/2and3/sqlalchemy/orm/loading.pyi b/third_party/2and3/sqlalchemy/orm/loading.pyi new file mode 100644 index 000000000000..51f0738b9e9f --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/loading.pyi @@ -0,0 +1,15 @@ +# Stubs for sqlalchemy.orm.loading (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from . import exc as orm_exc +from ..sql import util as sql_util +from .util import state_str as state_str +from .. import exc as sa_exc + +def instances(query, cursor, context): ... +def merge_result(query, iterator, load: bool = ...): ... +def get_from_identity(session, key, passive): ... +def load_on_ident(query, key, refresh_state: Optional[Any] = ..., lockmode: Optional[Any] = ..., only_load_props: Optional[Any] = ...): ... +def load_scalar_attributes(mapper, state, attribute_names): ... diff --git a/third_party/2and3/sqlalchemy/orm/mapper.pyi b/third_party/2and3/sqlalchemy/orm/mapper.pyi new file mode 100644 index 000000000000..5097b84f6bde --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/mapper.pyi @@ -0,0 +1,98 @@ +# Stubs for sqlalchemy.orm.mapper (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .. import exc as sa_exc +from ..sql import expression as expression, visitors as visitors, operators as operators +from ..sql import util as sql_util +from . import exc as orm_exc +from . import util as orm_util +from .interfaces import MapperProperty as MapperProperty, InspectionAttr as InspectionAttr +from .base import class_mapper as class_mapper, state_str as state_str +from .path_registry import PathRegistry as PathRegistry + +NO_ATTRIBUTE = ... # type: Any + +class Mapper(InspectionAttr): + class_ = ... # type: Any + class_manager = ... # type: Any + non_primary = ... # type: Any + order_by = ... # type: Any + always_refresh = ... # type: Any + version_id_prop = ... # type: Any + version_id_col = ... # type: Any + version_id_generator = ... # type: bool + concrete = ... # type: Any + single = ... # type: bool + inherits = ... # type: Any + local_table = ... # type: Any + inherit_condition = ... # type: Any + inherit_foreign_keys = ... # type: Any + batch = ... # type: Any + eager_defaults = ... # type: Any + column_prefix = ... # type: Any + polymorphic_on = ... # type: Any + validators = ... # type: Any + passive_updates = ... # type: Any + passive_deletes = ... # type: Any + legacy_is_orphan = ... # type: Any + allow_partial_pks = ... # type: Any + confirm_deleted_rows = ... # type: bool + with_polymorphic = ... # type: Any + polymorphic_identity = ... # type: Any + polymorphic_map = ... # type: Any + include_properties = ... # type: Any + exclude_properties = ... # type: Any + configured = ... # type: bool + def __init__(self, class_, local_table: Optional[Any] = ..., properties: Optional[Any] = ..., primary_key: Optional[Any] = ..., non_primary: bool = ..., inherits: Optional[Any] = ..., inherit_condition: Optional[Any] = ..., inherit_foreign_keys: Optional[Any] = ..., extension: Optional[Any] = ..., order_by: bool = ..., always_refresh: bool = ..., version_id_col: Optional[Any] = ..., version_id_generator: Optional[Any] = ..., polymorphic_on: Optional[Any] = ..., _polymorphic_map: Optional[Any] = ..., polymorphic_identity: Optional[Any] = ..., concrete: bool = ..., with_polymorphic: Optional[Any] = ..., allow_partial_pks: bool = ..., batch: bool = ..., column_prefix: Optional[Any] = ..., include_properties: Optional[Any] = ..., exclude_properties: Optional[Any] = ..., passive_updates: bool = ..., passive_deletes: bool = ..., confirm_deleted_rows: bool = ..., eager_defaults: bool = ..., legacy_is_orphan: bool = ..., _compiled_cache_size: int = ...) -> None: ... + is_mapper = ... # type: bool + @property + def mapper(self): ... + @property + def entity(self): ... + mapped_table = ... # type: Any + tables = ... # type: Any + primary_key = ... # type: Any + base_mapper = ... # type: Any + columns = ... # type: Any + c = ... # type: Any + def dispose(self): ... + def add_properties(self, dict_of_properties): ... + def add_property(self, key, prop): ... + def has_property(self, key): ... + def get_property(self, key, _configure_mappers: bool = ...): ... + def get_property_by_column(self, column): ... + @property + def iterate_properties(self): ... + with_polymorphic_mappers = ... # type: Any + @property + def selectable(self): ... + def attrs(self): ... + def all_orm_descriptors(self): ... + def synonyms(self): ... + def column_attrs(self): ... + def relationships(self): ... + def composites(self): ... + def common_parent(self, other): ... + def isa(self, other): ... + def iterate_to_root(self): ... + def self_and_descendants(self): ... + def polymorphic_iterator(self): ... + def primary_mapper(self): ... + @property + def primary_base_mapper(self): ... + def identity_key_from_row(self, row, adapter: Optional[Any] = ...): ... + def identity_key_from_primary_key(self, primary_key): ... + def identity_key_from_instance(self, instance): ... + def primary_key_from_instance(self, instance): ... + def cascade_iterator(self, type_, state, halt_on: Optional[Any] = ...): ... + +def configure_mappers(): ... +def reconstructor(fn): ... +def validates(*names, **kw): ... + +class _ColumnMapping(dict): + mapper = ... # type: Any + def __init__(self, mapper) -> None: ... + def __missing__(self, column): ... diff --git a/third_party/2and3/sqlalchemy/orm/path_registry.pyi b/third_party/2and3/sqlalchemy/orm/path_registry.pyi new file mode 100644 index 000000000000..f8224af89c70 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/path_registry.pyi @@ -0,0 +1,80 @@ +# Stubs for sqlalchemy.orm.path_registry (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .base import class_mapper as class_mapper + +log = ... # type: Any + +class PathRegistry(object): + is_token = ... # type: bool + is_root = ... # type: bool + def __eq__(self, other): ... + def set(self, attributes, key, value): ... + def setdefault(self, *args, **kwargs): ... + def get(self, *args, **kwargs): ... + def __len__(self): ... + @property + def length(self): ... + def pairs(self): ... + def contains_mapper(self, mapper): ... + def contains(self, attributes, key): ... + def __reduce__(self): ... + def serialize(self): ... + @classmethod + def deserialize(cls, path): ... + @classmethod + def per_mapper(cls, mapper): ... + @classmethod + def coerce(cls, raw): ... + def token(self, token): ... + def __add__(self, other): ... + +class RootRegistry(PathRegistry): + path = ... # type: Any + has_entity = ... # type: bool + is_aliased_class = ... # type: bool + is_root = ... # type: bool + def __getitem__(self, entity): ... + +class TokenRegistry(PathRegistry): + token = ... # type: Any + parent = ... # type: Any + path = ... # type: Any + def __init__(self, parent, token) -> None: ... + has_entity = ... # type: bool + is_token = ... # type: bool + def generate_for_superclasses(self): ... + def __getitem__(self, entity): ... + +class PropRegistry(PathRegistry): + prop = ... # type: Any + parent = ... # type: Any + path = ... # type: Any + def __init__(self, parent, prop) -> None: ... + @property + def has_entity(self): ... + @property + def entity(self): ... + @property + def mapper(self): ... + @property + def entity_path(self): ... + def __getitem__(self, entity): ... + +class EntityRegistry(PathRegistry, dict): + is_aliased_class = ... # type: bool + has_entity = ... # type: bool + key = ... # type: Any + parent = ... # type: Any + entity = ... # type: Any + path = ... # type: Any + entity_path = ... # type: Any + def __init__(self, parent, entity) -> None: ... + @property + def mapper(self): ... + def __bool__(self): ... + __nonzero__ = ... # type: Any + def __getitem__(self, entity): ... + def __missing__(self, key): ... diff --git a/third_party/2and3/sqlalchemy/orm/persistence.pyi b/third_party/2and3/sqlalchemy/orm/persistence.pyi new file mode 100644 index 000000000000..a478e16e712a --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/persistence.pyi @@ -0,0 +1,41 @@ +# Stubs for sqlalchemy.orm.persistence (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .. import exc as sa_exc +from . import exc as orm_exc +from .base import state_str as state_str +from ..sql import expression as expression + +def save_obj(base_mapper, states, uowtransaction, single: bool = ...): ... +def post_update(base_mapper, states, uowtransaction, post_update_cols): ... +def delete_obj(base_mapper, states, uowtransaction): ... + +class BulkUD(object): + query = ... # type: Any + mapper = ... # type: Any + def __init__(self, query) -> None: ... + @property + def session(self): ... + def exec_(self): ... + +class BulkEvaluate(BulkUD): ... +class BulkFetch(BulkUD): ... + +class BulkUpdate(BulkUD): + values = ... # type: Any + update_kwargs = ... # type: Any + def __init__(self, query, values, update_kwargs) -> None: ... + @classmethod + def factory(cls, query, synchronize_session, values, update_kwargs): ... + +class BulkDelete(BulkUD): + def __init__(self, query) -> None: ... + @classmethod + def factory(cls, query, synchronize_session): ... + +class BulkUpdateEvaluate(BulkEvaluate, BulkUpdate): ... +class BulkDeleteEvaluate(BulkEvaluate, BulkDelete): ... +class BulkUpdateFetch(BulkFetch, BulkUpdate): ... +class BulkDeleteFetch(BulkFetch, BulkDelete): ... diff --git a/third_party/2and3/sqlalchemy/orm/properties.pyi b/third_party/2and3/sqlalchemy/orm/properties.pyi new file mode 100644 index 000000000000..d5f0255b2fa7 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/properties.pyi @@ -0,0 +1,39 @@ +# Stubs for sqlalchemy.orm.properties (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .interfaces import StrategizedProperty, PropComparator +from .. import util + +class ColumnProperty(StrategizedProperty): + strategy_wildcard_key = ... # type: str + columns = ... # type: Any + group = ... # type: Any + deferred = ... # type: Any + instrument = ... # type: Any + comparator_factory = ... # type: Any + descriptor = ... # type: Any + extension = ... # type: Any + active_history = ... # type: Any + expire_on_flush = ... # type: Any + info = ... # type: Any + doc = ... # type: Any + strategy_key = ... # type: Any + def __init__(self, *columns, **kwargs) -> None: ... + @property + def expression(self): ... + def instrument_class(self, mapper): ... + def do_init(self): ... + def copy(self): ... + def merge(self, session, source_state, source_dict, dest_state, dest_dict, load, _recursive, _resolve_conflict_map): ... + class Comparator(util.MemoizedSlots, PropComparator): + def _memoized_method___clause_element__(self): ... + def operate(self, op, *other, **kwargs): ... + def reverse_operate(self, op, other, **kwargs): ... + +# Names in __all__ with no definition: +# ComparableProperty +# CompositeProperty +# RelationshipProperty +# SynonymProperty diff --git a/third_party/2and3/sqlalchemy/orm/query.pyi b/third_party/2and3/sqlalchemy/orm/query.pyi new file mode 100644 index 000000000000..d94a1ead22c0 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/query.pyi @@ -0,0 +1,208 @@ +# Stubs for sqlalchemy.orm.query (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from . import interfaces +from . import exc as orm_exc +from .base import InspectionAttr +from .util import aliased as aliased +from .util import join as orm_join +from .. import exc as sa_exc +from ..sql import util as sql_util +from ..sql.selectable import ForUpdateArg + +class Query(object): + session = ... # type: Any + def __init__(self, entities, session: Optional[Any] = ...) -> None: ... + @property + def statement(self): ... + def subquery(self, name: Optional[Any] = ..., with_labels: bool = ..., reduce_columns: bool = ...): ... + def cte(self, name: Optional[Any] = ..., recursive: bool = ...): ... + def label(self, name): ... + def as_scalar(self): ... + @property + def selectable(self): ... + def __clause_element__(self): ... + def enable_eagerloads(self, value): ... + def with_labels(self): ... + def enable_assertions(self, value): ... + @property + def whereclause(self): ... + def with_polymorphic(self, cls_or_mappers, selectable: Optional[Any] = ..., polymorphic_on: Optional[Any] = ...): ... + def yield_per(self, count): ... + def get(self, ident): ... + def correlate(self, *args): ... + def autoflush(self, setting): ... + def populate_existing(self): ... + def with_parent(self, instance, property: Optional[Any] = ...): ... + def add_entity(self, entity, alias: Optional[Any] = ...): ... + def with_session(self, session): ... + def from_self(self, *entities): ... + def values(self, *columns): ... + def value(self, column): ... + def with_entities(self, *entities): ... + def add_columns(self, *column): ... + def add_column(self, column): ... + def options(self, *args): ... + def with_transformation(self, fn): ... + def with_hint(self, selectable, text, dialect_name: str = ...): ... + def with_statement_hint(self, text, dialect_name: str = ...): ... + def execution_options(self, **kwargs): ... + def with_lockmode(self, mode): ... + def with_for_update(self, read: bool = ..., nowait: bool = ..., of: Optional[Any] = ..., skip_locked: bool = ..., key_share: bool = ...): ... + def params(self, *args, **kwargs): ... + def filter(self, *criterion): ... + def filter_by(self, **kwargs): ... + def order_by(self, *criterion): ... + def group_by(self, *criterion): ... + def having(self, criterion): ... + def union(self, *q): ... + def union_all(self, *q): ... + def intersect(self, *q): ... + def intersect_all(self, *q): ... + def except_(self, *q): ... + def except_all(self, *q): ... + def join(self, *props, **kwargs): ... + def outerjoin(self, *props, **kwargs): ... + def reset_joinpoint(self): ... + def select_from(self, *from_obj): ... + def select_entity_from(self, from_obj): ... + def __getitem__(self, item): ... + def slice(self, start, stop): ... + def limit(self, limit): ... + def offset(self, offset): ... + def distinct(self, *criterion): ... + def prefix_with(self, *prefixes): ... + def suffix_with(self, *suffixes): ... + def all(self): ... + def from_statement(self, statement): ... + def first(self): ... + def one_or_none(self): ... + def one(self): ... + def scalar(self): ... + def __iter__(self): ... + @property + def column_descriptions(self): ... + def instances(self, cursor, __context: Optional[Any] = ...): ... + def merge_result(self, iterator, load: bool = ...): ... + def exists(self): ... + def count(self): ... + def delete(self, synchronize_session: str = ...): ... + def update(self, values, synchronize_session: str = ..., update_args: Optional[Any] = ...): ... + +class LockmodeArg(ForUpdateArg): + @classmethod + def parse_legacy_query(self, mode): ... + +class _QueryEntity(object): + def __new__(cls, *args, **kwargs): ... + +class _MapperEntity(_QueryEntity): + entities = ... # type: Any + expr = ... # type: Any + def __init__(self, query, entity) -> None: ... + supports_single_entity = ... # type: bool + use_id_for_hash = ... # type: bool + mapper = ... # type: Any + aliased_adapter = ... # type: Any + selectable = ... # type: Any + is_aliased_class = ... # type: Any + entity_zero = ... # type: Any + path = ... # type: Any + def setup_entity(self, ext_info, aliased_adapter): ... + def set_with_polymorphic(self, query, cls_or_mappers, selectable, polymorphic_on): ... + @property + def type(self): ... + @property + def entity_zero_or_selectable(self): ... + def corresponds_to(self, entity): ... + def adapt_to_selectable(self, query, sel): ... + def row_processor(self, query, context, result): ... + def setup_context(self, query, context): ... + +class Bundle(InspectionAttr): + single_entity = ... # type: bool + is_clause_element = ... # type: bool + is_mapper = ... # type: bool + is_aliased_class = ... # type: bool + name = ... # type: Any + exprs = ... # type: Any + c = ... # type: Any + def __init__(self, name, *exprs, **kw) -> None: ... + columns = ... # type: Any + def __clause_element__(self): ... + @property + def clauses(self): ... + def label(self, name): ... + def create_row_processor(self, query, procs, labels): ... + +class _BundleEntity(_QueryEntity): + use_id_for_hash = ... # type: bool + bundle = ... # type: Any + type = ... # type: Any + supports_single_entity = ... # type: Any + def __init__(self, query, bundle, setup_entities: bool = ...) -> None: ... + @property + def entities(self): ... + @property + def entity_zero(self): ... + def corresponds_to(self, entity): ... + @property + def entity_zero_or_selectable(self): ... + def adapt_to_selectable(self, query, sel): ... + def setup_entity(self, ext_info, aliased_adapter): ... + def setup_context(self, query, context): ... + def row_processor(self, query, context, result): ... + +class _ColumnEntity(_QueryEntity): + expr = ... # type: Any + namespace = ... # type: Any + type = ... # type: Any + use_id_for_hash = ... # type: Any + column = ... # type: Any + froms = ... # type: Any + actual_froms = ... # type: Any + entity_zero = ... # type: Any + entities = ... # type: Any + mapper = ... # type: Any + def __init__(self, query, column, namespace: Optional[Any] = ...) -> None: ... + supports_single_entity = ... # type: bool + @property + def entity_zero_or_selectable(self): ... + def adapt_to_selectable(self, query, sel): ... + selectable = ... # type: Any + def setup_entity(self, ext_info, aliased_adapter): ... + def corresponds_to(self, entity): ... + def row_processor(self, query, context, result): ... + def setup_context(self, query, context): ... + +class QueryContext(object): + statement = ... # type: Any + from_clause = ... # type: Any + whereclause = ... # type: Any + order_by = ... # type: Any + multi_row_eager_loaders = ... # type: bool + adapter = ... # type: Any + froms = ... # type: Any + for_update = ... # type: Any + query = ... # type: Any + session = ... # type: Any + autoflush = ... # type: Any + populate_existing = ... # type: Any + invoke_all_eagers = ... # type: Any + version_check = ... # type: Any + refresh_state = ... # type: Any + primary_columns = ... # type: Any + secondary_columns = ... # type: Any + eager_order_by = ... # type: Any + eager_joins = ... # type: Any + create_eager_joins = ... # type: Any + propagate_options = ... # type: Any + attributes = ... # type: Any + def __init__(self, query) -> None: ... + +class AliasOption(interfaces.MapperOption): + alias = ... # type: Any + def __init__(self, alias) -> None: ... + def process_query(self, query): ... diff --git a/third_party/2and3/sqlalchemy/orm/relationships.pyi b/third_party/2and3/sqlalchemy/orm/relationships.pyi new file mode 100644 index 000000000000..445865d59359 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/relationships.pyi @@ -0,0 +1,114 @@ +# Stubs for sqlalchemy.orm.relationships (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .. import exc as sa_exc +from .util import CascadeOptions as CascadeOptions +from ..sql.util import ClauseAdapter as ClauseAdapter, join_condition as join_condition, visit_binary_product as visit_binary_product, selectables_overlap as selectables_overlap, adapt_criterion_to_null as adapt_criterion_to_null +from ..sql import operators as operators, expression as expression, visitors as visitors +from .interfaces import MANYTOMANY as MANYTOMANY, MANYTOONE as MANYTOONE, ONETOMANY as ONETOMANY, StrategizedProperty as StrategizedProperty, PropComparator as PropComparator +from ..inspection import inspect as inspect +from . import mapper as mapperlib + +def remote(expr): ... +def foreign(expr): ... + +class RelationshipProperty(StrategizedProperty): + strategy_wildcard_key = ... # type: str + uselist = ... # type: Any + argument = ... # type: Any + secondary = ... # type: Any + primaryjoin = ... # type: Any + secondaryjoin = ... # type: Any + post_update = ... # type: Any + direction = ... # type: Any + viewonly = ... # type: Any + lazy = ... # type: Any + single_parent = ... # type: Any + collection_class = ... # type: Any + passive_deletes = ... # type: Any + cascade_backrefs = ... # type: Any + passive_updates = ... # type: Any + remote_side = ... # type: Any + enable_typechecks = ... # type: Any + query_class = ... # type: Any + innerjoin = ... # type: Any + distinct_target_key = ... # type: Any + doc = ... # type: Any + active_history = ... # type: Any + join_depth = ... # type: Any + local_remote_pairs = ... # type: Any + extension = ... # type: Any + bake_queries = ... # type: Any + load_on_pending = ... # type: Any + comparator_factory = ... # type: Any + comparator = ... # type: Any + info = ... # type: Any + strategy_key = ... # type: Any + cascade = ... # type: Any + order_by = ... # type: Any + back_populates = ... # type: Any + backref = ... # type: Any + def __init__(self, argument, secondary: Optional[Any] = ..., primaryjoin: Optional[Any] = ..., secondaryjoin: Optional[Any] = ..., foreign_keys: Optional[Any] = ..., uselist: Optional[Any] = ..., order_by: bool = ..., backref: Optional[Any] = ..., back_populates: Optional[Any] = ..., post_update: bool = ..., cascade: bool = ..., extension: Optional[Any] = ..., viewonly: bool = ..., lazy: bool = ..., collection_class: Optional[Any] = ..., passive_deletes: bool = ..., passive_updates: bool = ..., remote_side: Optional[Any] = ..., enable_typechecks: bool = ..., join_depth: Optional[Any] = ..., comparator_factory: Optional[Any] = ..., single_parent: bool = ..., innerjoin: bool = ..., distinct_target_key: Optional[Any] = ..., doc: Optional[Any] = ..., active_history: bool = ..., cascade_backrefs: bool = ..., load_on_pending: bool = ..., bake_queries: bool = ..., _local_remote_pairs: Optional[Any] = ..., query_class: Optional[Any] = ..., info: Optional[Any] = ...) -> None: ... + def instrument_class(self, mapper): ... + class Comparator(PropComparator): + prop = ... # type: Any + def __init__(self, prop, parentmapper, adapt_to_entity: Optional[Any] = ..., of_type: Optional[Any] = ...) -> None: ... + def adapt_to_entity(self, adapt_to_entity): ... + def mapper(self): ... + def __clause_element__(self): ... + def of_type(self, cls): ... + def in_(self, other): ... + __hash__ = ... # type: Any + def __eq__(self, other): ... + def any(self, criterion: Optional[Any] = ..., **kwargs): ... + def has(self, criterion: Optional[Any] = ..., **kwargs): ... + def contains(self, other, **kwargs): ... + def __ne__(self, other): ... + @property + def property(self): ... + def merge(self, session, source_state, source_dict, dest_state, dest_dict, load, _recursive, _resolve_conflict_map): ... + def cascade_iterator(self, *args, **kwargs): ... + @property + def mapper(self): ... + def table(self): ... + def do_init(self): ... + +class JoinCondition(object): + parent_selectable = ... # type: Any + parent_local_selectable = ... # type: Any + child_selectable = ... # type: Any + child_local_selectable = ... # type: Any + parent_equivalents = ... # type: Any + child_equivalents = ... # type: Any + primaryjoin = ... # type: Any + secondaryjoin = ... # type: Any + secondary = ... # type: Any + consider_as_foreign_keys = ... # type: Any + prop = ... # type: Any + self_referential = ... # type: Any + support_sync = ... # type: Any + can_be_synced_fn = ... # type: Any + def __init__(self, parent_selectable, child_selectable, parent_local_selectable, child_local_selectable, primaryjoin: Optional[Any] = ..., secondary: Optional[Any] = ..., secondaryjoin: Optional[Any] = ..., parent_equivalents: Optional[Any] = ..., child_equivalents: Optional[Any] = ..., consider_as_foreign_keys: Optional[Any] = ..., local_remote_pairs: Optional[Any] = ..., remote_side: Optional[Any] = ..., self_referential: bool = ..., prop: Optional[Any] = ..., support_sync: bool = ..., can_be_synced_fn: Any = ...) -> None: ... + @property + def primaryjoin_minus_local(self): ... + @property + def secondaryjoin_minus_local(self): ... + @property + def primaryjoin_reverse_remote(self): ... + @property + def remote_columns(self): ... + @property + def local_columns(self): ... + @property + def foreign_key_columns(self): ... + def deannotated_primaryjoin(self): ... + def deannotated_secondaryjoin(self): ... + def join_targets(self, source_selectable, dest_selectable, aliased, single_crit: Optional[Any] = ...): ... + def create_lazy_clause(self, reverse_direction: bool = ...): ... + +class _ColInAnnotations(object): + name = ... # type: Any + def __init__(self, name) -> None: ... + def __call__(self, c): ... diff --git a/third_party/2and3/sqlalchemy/orm/scoping.pyi b/third_party/2and3/sqlalchemy/orm/scoping.pyi new file mode 100644 index 000000000000..846ff3f4a1f1 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/scoping.pyi @@ -0,0 +1,16 @@ +# Stubs for sqlalchemy.orm.scoping (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .. import exc as sa_exc +from . import exc as orm_exc + +class scoped_session(object): + session_factory = ... # type: Any + registry = ... # type: Any + def __init__(self, session_factory, scopefunc: Optional[Any] = ...) -> None: ... + def __call__(self, **kw): ... + def remove(self): ... + def configure(self, **kwargs): ... + def query_property(self, query_cls: Optional[Any] = ...): ... diff --git a/third_party/2and3/sqlalchemy/orm/session.pyi b/third_party/2and3/sqlalchemy/orm/session.pyi index 8e7d3964f5a1..0504ccd1d66e 100644 --- a/third_party/2and3/sqlalchemy/orm/session.pyi +++ b/third_party/2and3/sqlalchemy/orm/session.pyi @@ -1,28 +1,33 @@ -# Stubs for sqlalchemy.orm.session (Python 2 and 3) +# Stubs for sqlalchemy.orm.session (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any +from typing import Any, Optional +from .. import exc as sa_exc +from ..sql import util as sql_util +from . import state as statelib -class _SessionClassMethods: +class _SessionClassMethods(object): @classmethod def close_all(cls): ... @classmethod - def identity_key(cls, orm_util, *args, **kwargs): ... + def identity_key(cls, *args, **kwargs): ... @classmethod def object_session(cls, instance): ... -class SessionTransaction: +class SessionTransaction(object): session = ... # type: Any nested = ... # type: Any - def __init__(self, session, parent=..., nested=...) -> None: ... + def __init__(self, session, parent: Optional[Any] = ..., nested: bool = ...) -> None: ... + @property + def parent(self): ... @property def is_active(self): ... - def connection(self, bindkey, execution_options=..., **kwargs): ... + def connection(self, bindkey, execution_options: Optional[Any] = ..., **kwargs): ... def prepare(self): ... def commit(self): ... - def rollback(self, _capture_exception=...): ... - def close(self, invalidate=...): ... + def rollback(self, _capture_exception: bool = ...): ... + def close(self, invalidate: bool = ...): ... def __enter__(self): ... def __exit__(self, type, value, traceback): ... @@ -36,43 +41,44 @@ class Session(_SessionClassMethods): autocommit = ... # type: Any expire_on_commit = ... # type: Any twophase = ... # type: Any - def __init__(self, bind=..., autoflush=..., expire_on_commit=..., _enable_transaction_accounting=..., autocommit=..., twophase=..., weak_identity_map=..., binds=..., extension=..., info=..., query_cls=...) -> None: ... + def __init__(self, bind: Optional[Any] = ..., autoflush: bool = ..., expire_on_commit: bool = ..., _enable_transaction_accounting: bool = ..., autocommit: bool = ..., twophase: bool = ..., weak_identity_map: bool = ..., binds: Optional[Any] = ..., extension: Optional[Any] = ..., info: Optional[Any] = ..., query_cls: Any = ...) -> None: ... connection_callable = ... # type: Any + @property def info(self): ... - def begin(self, subtransactions=..., nested=...): ... + def begin(self, subtransactions: bool = ..., nested: bool = ...): ... def begin_nested(self): ... def rollback(self): ... def commit(self): ... def prepare(self): ... - def connection(self, mapper=..., clause=..., bind=..., close_with_result=..., execution_options=..., **kw): ... - def execute(self, clause, params=..., mapper=..., bind=..., **kw): ... - def scalar(self, clause, params=..., mapper=..., bind=..., **kw): ... + def connection(self, mapper: Optional[Any] = ..., clause: Optional[Any] = ..., bind: Optional[Any] = ..., close_with_result: bool = ..., execution_options: Optional[Any] = ..., **kw): ... + def execute(self, clause, params: Optional[Any] = ..., mapper: Optional[Any] = ..., bind: Optional[Any] = ..., **kw): ... + def scalar(self, clause, params: Optional[Any] = ..., mapper: Optional[Any] = ..., bind: Optional[Any] = ..., **kw): ... def close(self): ... def invalidate(self): ... def expunge_all(self): ... def bind_mapper(self, mapper, bind): ... def bind_table(self, table, bind): ... - def get_bind(self, mapper=..., clause=...): ... + def get_bind(self, mapper: Optional[Any] = ..., clause: Optional[Any] = ...): ... def query(self, *entities, **kwargs): ... @property def no_autoflush(self): ... - def refresh(self, instance, attribute_names=..., lockmode=...): ... + def refresh(self, instance, attribute_names: Optional[Any] = ..., lockmode: Optional[Any] = ...): ... def expire_all(self): ... - def expire(self, instance, attribute_names=...): ... + def expire(self, instance, attribute_names: Optional[Any] = ...): ... def prune(self): ... def expunge(self, instance): ... - def add(self, instance, _warn=...): ... + def add(self, instance, _warn: bool = ...): ... def add_all(self, instances): ... def delete(self, instance): ... - def merge(self, instance, load=...): ... + def merge(self, instance, load: bool = ...): ... def enable_relationship_loading(self, obj): ... def __contains__(self, instance): ... def __iter__(self): ... - def flush(self, objects=...): ... - def bulk_save_objects(self, objects, return_defaults=..., update_changed_only=...): ... - def bulk_insert_mappings(self, mapper, mappings, return_defaults=...): ... + def flush(self, objects: Optional[Any] = ...): ... + def bulk_save_objects(self, objects, return_defaults: bool = ..., update_changed_only: bool = ...): ... + def bulk_insert_mappings(self, mapper, mappings, return_defaults: bool = ..., render_nulls: bool = ...): ... def bulk_update_mappings(self, mapper, mappings): ... - def is_modified(self, instance, include_collections=..., passive=...): ... + def is_modified(self, instance, include_collections: bool = ..., passive: bool = ...): ... @property def is_active(self): ... @property @@ -85,9 +91,13 @@ class Session(_SessionClassMethods): class sessionmaker(_SessionClassMethods): kw = ... # type: Any class_ = ... # type: Any - def __init__(self, bind=..., class_=..., autoflush=..., autocommit=..., expire_on_commit=..., info=..., **kw) -> None: ... + def __init__(self, bind: Optional[Any] = ..., class_: Any = ..., autoflush: bool = ..., autocommit: bool = ..., expire_on_commit: bool = ..., info: Optional[Any] = ..., **kw) -> None: ... def __call__(self, **local_kw): ... def configure(self, **new_kw): ... # Names in __all__ with no definition: # SessionExtension + +def make_transient(instance) -> None: ... +def make_transient_to_detached(instance) -> None: ... +def object_session(instance): ... diff --git a/third_party/2and3/sqlalchemy/orm/state.pyi b/third_party/2and3/sqlalchemy/orm/state.pyi new file mode 100644 index 000000000000..88b2122a481b --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/state.pyi @@ -0,0 +1,83 @@ +# Stubs for sqlalchemy.orm.state (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from . import interfaces +from . import exc as orm_exc +from .path_registry import PathRegistry as PathRegistry +from .base import PASSIVE_NO_RESULT as PASSIVE_NO_RESULT, SQL_OK as SQL_OK, NEVER_SET as NEVER_SET, ATTR_WAS_SET as ATTR_WAS_SET, NO_VALUE as NO_VALUE, PASSIVE_NO_INITIALIZE as PASSIVE_NO_INITIALIZE, INIT_OK as INIT_OK, PASSIVE_OFF as PASSIVE_OFF + +class InstanceState(interfaces.InspectionAttr): + session_id = ... # type: Any + key = ... # type: Any + runid = ... # type: Any + load_options = ... # type: Any + load_path = ... # type: Any + insert_order = ... # type: Any + modified = ... # type: bool + expired = ... # type: bool + is_instance = ... # type: bool + callables = ... # type: Any + class_ = ... # type: Any + manager = ... # type: Any + obj = ... # type: Any + committed_state = ... # type: Any + expired_attributes = ... # type: Any + def __init__(self, obj, manager) -> None: ... + @property + def attrs(self): ... + @property + def transient(self): ... + @property + def pending(self): ... + @property + def deleted(self): ... + @property + def was_deleted(self): ... + @property + def persistent(self): ... + @property + def detached(self): ... + @property + def session(self): ... + @property + def object(self): ... + @property + def identity(self): ... + @property + def identity_key(self): ... + @property + def parents(self): ... + @property + def mapper(self): ... + @property + def has_identity(self): ... + @property + def dict(self): ... + def get_history(self, key, passive): ... + def get_impl(self, key): ... + @property + def unmodified(self): ... + def unmodified_intersection(self, keys): ... + @property + def unloaded(self): ... + +class AttributeState(object): + state = ... # type: Any + key = ... # type: Any + def __init__(self, state, key) -> None: ... + @property + def loaded_value(self): ... + @property + def value(self): ... + @property + def history(self): ... + def load_history(self): ... + +class PendingCollection(object): + deleted_items = ... # type: Any + added_items = ... # type: Any + def __init__(self) -> None: ... + def append(self, value): ... + def remove(self, value): ... diff --git a/third_party/2and3/sqlalchemy/orm/strategies.pyi b/third_party/2and3/sqlalchemy/orm/strategies.pyi new file mode 100644 index 000000000000..7ef78e99cd38 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/strategies.pyi @@ -0,0 +1,91 @@ +# Stubs for sqlalchemy.orm.strategies (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .. import util +from .. import exc as sa_exc +from ..sql import visitors as visitors +from ..sql import util as sql_util +from . import exc as orm_exc, util as orm_util +from .state import InstanceState as InstanceState +from .interfaces import LoaderStrategy as LoaderStrategy, StrategizedProperty as StrategizedProperty + +class UninstrumentedColumnLoader(LoaderStrategy): + columns = ... # type: Any + def __init__(self, parent, strategy_key) -> None: ... + def setup_query(self, context, entity, path, loadopt, adapter, column_collection: Optional[Any] = ..., **kwargs): ... + def create_row_processor(self, context, path, loadopt, mapper, result, adapter, populators): ... + +class ColumnLoader(LoaderStrategy): + columns = ... # type: Any + is_composite = ... # type: Any + def __init__(self, parent, strategy_key) -> None: ... + def setup_query(self, context, entity, path, loadopt, adapter, column_collection, memoized_populators, **kwargs): ... + is_class_level = ... # type: bool + def init_class_attribute(self, mapper): ... + def create_row_processor(self, context, path, loadopt, mapper, result, adapter, populators): ... + +class DeferredColumnLoader(LoaderStrategy): + columns = ... # type: Any + group = ... # type: Any + def __init__(self, parent, strategy_key) -> None: ... + def create_row_processor(self, context, path, loadopt, mapper, result, adapter, populators): ... + is_class_level = ... # type: bool + def init_class_attribute(self, mapper): ... + def setup_query(self, *args, **kw): ... + +class LoadDeferredColumns(object): + key = ... # type: Any + def __init__(self, key) -> None: ... + def __call__(self, state, passive: Any = ...): ... + +class AbstractRelationshipLoader(LoaderStrategy): + mapper = ... # type: Any + target = ... # type: Any + uselist = ... # type: Any + def __init__(self, parent, strategy_key) -> None: ... + +class NoLoader(AbstractRelationshipLoader): + is_class_level = ... # type: bool + def init_class_attribute(self, mapper): ... + def create_row_processor(self, context, path, loadopt, mapper, result, adapter, populators): ... + +class LazyLoader(AbstractRelationshipLoader, util.MemoizedSlots): + use_get = ... # type: Any + def __init__(self, parent, strategy_key) -> None: ... + is_class_level = ... # type: bool + def init_class_attribute(self, mapper): ... + def create_row_processor(self, context, path, loadopt, mapper, result, adapter, populators): ... + +class LoadLazyAttribute(object): + key = ... # type: Any + strategy_key = ... # type: Any + def __init__(self, key, initiating_strategy) -> None: ... + def __call__(self, state, passive: Any = ...): ... + +class ImmediateLoader(AbstractRelationshipLoader): + def init_class_attribute(self, mapper): ... + def setup_query(self, context, entity, path, loadopt, adapter, column_collection: Optional[Any] = ..., parentmapper: Optional[Any] = ..., **kwargs): ... + def create_row_processor(self, context, path, loadopt, mapper, result, adapter, populators): ... + +class SubqueryLoader(AbstractRelationshipLoader): + join_depth = ... # type: Any + def __init__(self, parent, strategy_key) -> None: ... + def init_class_attribute(self, mapper): ... + def setup_query(self, context, entity, path, loadopt, adapter, column_collection: Optional[Any] = ..., parentmapper: Optional[Any] = ..., **kwargs): ... + class _SubqCollections(object): + subq = ... # type: Any + def __init__(self, subq) -> None: ... + def get(self, key, default): ... + def loader(self, state, dict_, row): ... + def create_row_processor(self, context, path, loadopt, mapper, result, adapter, populators): ... + +class JoinedLoader(AbstractRelationshipLoader): + join_depth = ... # type: Any + def __init__(self, parent, strategy_key) -> None: ... + def init_class_attribute(self, mapper): ... + def setup_query(self, context, entity, path, loadopt, adapter, column_collection: Optional[Any] = ..., parentmapper: Optional[Any] = ..., chained_from_outerjoin: bool = ..., **kwargs): ... + def create_row_processor(self, context, path, loadopt, mapper, result, adapter, populators): ... + +def single_parent_validator(desc, prop): ... diff --git a/third_party/2and3/sqlalchemy/orm/strategy_options.pyi b/third_party/2and3/sqlalchemy/orm/strategy_options.pyi new file mode 100644 index 000000000000..c3adffeb0c6e --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/strategy_options.pyi @@ -0,0 +1,52 @@ +# Stubs for sqlalchemy.orm.strategy_options (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .interfaces import MapperOption as MapperOption, PropComparator as PropComparator +from ..sql.base import Generative as Generative +from .. import exc as sa_exc +from . import util as orm_util +from .path_registry import PathRegistry as PathRegistry, TokenRegistry as TokenRegistry + +class Load(Generative, MapperOption): + path = ... # type: Any + context = ... # type: Any + local_opts = ... # type: Any + def __init__(self, entity) -> None: ... + @classmethod + def for_existing_path(cls, path): ... + is_opts_only = ... # type: bool + strategy = ... # type: Any + propagate_to_loaders = ... # type: bool + def process_query(self, query): ... + def process_query_conditionally(self, query): ... + def set_relationship_strategy(self, attr, strategy, propagate_to_loaders: bool = ...): ... + def set_column_strategy(self, attrs, strategy, opts: Optional[Any] = ..., opts_only: bool = ...): ... + +class _UnboundLoad(Load): + path = ... # type: Any + local_opts = ... # type: Any + def __init__(self) -> None: ... + +class loader_option(object): + def __init__(self) -> None: ... + name = ... # type: Any + fn = ... # type: Any + def __call__(self, fn): ... + +def contains_eager(loadopt, attr, alias: Optional[Any] = ...): ... +def load_only(loadopt, *attrs): ... +def joinedload(loadopt, attr, innerjoin: Optional[Any] = ...): ... +def joinedload_all(*keys, **kw): ... +def subqueryload(loadopt, attr): ... +def subqueryload_all(*keys): ... +def lazyload(loadopt, attr): ... +def lazyload_all(*keys): ... +def immediateload(loadopt, attr): ... +def noload(loadopt, attr): ... +def raiseload(loadopt, attr, sql_only: bool = ...): ... +def defaultload(loadopt, attr): ... +def defer(loadopt, key): ... +def undefer(loadopt, key): ... +def undefer_group(loadopt, name): ... diff --git a/third_party/2and3/sqlalchemy/orm/sync.pyi b/third_party/2and3/sqlalchemy/orm/sync.pyi new file mode 100644 index 000000000000..4e9ea8abab52 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/sync.pyi @@ -0,0 +1,12 @@ +# Stubs for sqlalchemy.orm.sync (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from . import util as orm_util + +def populate(source, source_mapper, dest, dest_mapper, synchronize_pairs, uowcommit, flag_cascaded_pks): ... +def bulk_populate_inherit_keys(source_dict, source_mapper, synchronize_pairs): ... +def clear(dest, dest_mapper, synchronize_pairs): ... +def update(source, source_mapper, dest, old_prefix, synchronize_pairs): ... +def populate_dict(source, source_mapper, dict_, synchronize_pairs): ... +def source_modified(uowcommit, source, source_mapper, synchronize_pairs): ... diff --git a/third_party/2and3/sqlalchemy/orm/unitofwork.pyi b/third_party/2and3/sqlalchemy/orm/unitofwork.pyi new file mode 100644 index 000000000000..736a58277806 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/unitofwork.pyi @@ -0,0 +1,97 @@ +# Stubs for sqlalchemy.orm.unitofwork (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ..util import topological as topological +from . import util as orm_util +from . import exc as orm_exc + +def track_cascade_events(descriptor, prop): ... + +class UOWTransaction(object): + session = ... # type: Any + attributes = ... # type: Any + deps = ... # type: Any + mappers = ... # type: Any + presort_actions = ... # type: Any + postsort_actions = ... # type: Any + dependencies = ... # type: Any + states = ... # type: Any + post_update_states = ... # type: Any + def __init__(self, session) -> None: ... + @property + def has_work(self): ... + def was_already_deleted(self, state): ... + def is_deleted(self, state): ... + def memo(self, key, callable_): ... + def remove_state_actions(self, state): ... + def get_attribute_history(self, state, key, passive: Any = ...): ... + def has_dep(self, processor): ... + def register_preprocessor(self, processor, fromparent): ... + def register_object(self, state, isdelete: bool = ..., listonly: bool = ..., cancel_delete: bool = ..., operation: Optional[Any] = ..., prop: Optional[Any] = ...): ... + def issue_post_update(self, state, post_update_cols): ... + def filter_states_for_dep(self, dep, states): ... + def states_for_mapper_hierarchy(self, mapper, isdelete, listonly): ... + def execute(self): ... + def finalize_flush_changes(self): ... + +class IterateMappersMixin(object): ... + +class Preprocess(IterateMappersMixin): + dependency_processor = ... # type: Any + fromparent = ... # type: Any + processed = ... # type: Any + setup_flush_actions = ... # type: bool + def __init__(self, dependency_processor, fromparent) -> None: ... + def execute(self, uow): ... + +class PostSortRec(object): + disabled = ... # type: bool + def __new__(cls, uow, *args): ... + def execute_aggregate(self, uow, recs): ... + +class ProcessAll(IterateMappersMixin, PostSortRec): + dependency_processor = ... # type: Any + delete = ... # type: Any + fromparent = ... # type: Any + def __init__(self, uow, dependency_processor, delete, fromparent) -> None: ... + def execute(self, uow): ... + def per_state_flush_actions(self, uow): ... + +class IssuePostUpdate(PostSortRec): + mapper = ... # type: Any + isdelete = ... # type: Any + def __init__(self, uow, mapper, isdelete) -> None: ... + def execute(self, uow): ... + +class SaveUpdateAll(PostSortRec): + mapper = ... # type: Any + def __init__(self, uow, mapper) -> None: ... + def execute(self, uow): ... + def per_state_flush_actions(self, uow): ... + +class DeleteAll(PostSortRec): + mapper = ... # type: Any + def __init__(self, uow, mapper) -> None: ... + def execute(self, uow): ... + def per_state_flush_actions(self, uow): ... + +class ProcessState(PostSortRec): + dependency_processor = ... # type: Any + delete = ... # type: Any + state = ... # type: Any + def __init__(self, uow, dependency_processor, delete, state) -> None: ... + def execute_aggregate(self, uow, recs): ... + +class SaveUpdateState(PostSortRec): + state = ... # type: Any + mapper = ... # type: Any + def __init__(self, uow, state, mapper) -> None: ... + def execute_aggregate(self, uow, recs): ... + +class DeleteState(PostSortRec): + state = ... # type: Any + mapper = ... # type: Any + def __init__(self, uow, state, mapper) -> None: ... + def execute_aggregate(self, uow, recs): ... diff --git a/third_party/2and3/sqlalchemy/orm/util.pyi b/third_party/2and3/sqlalchemy/orm/util.pyi index d3c000c3e479..d5b25c7e2524 100644 --- a/third_party/2and3/sqlalchemy/orm/util.pyi +++ b/third_party/2and3/sqlalchemy/orm/util.pyi @@ -1,12 +1,71 @@ -# Stubs for sqlalchemy.orm.session (Python 2 and 3) -from typing import Optional, Any, Text +# Stubs for sqlalchemy.orm.util (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. +from typing import Any, Optional, Text from ..sql.selectable import FromClause +from .. import exc as sa_exc +from ..sql import expression as expression, operators as operators +from ..sql import util as sql_util +from .interfaces import PropComparator as PropComparator, MapperProperty as MapperProperty +from .base import instance_str as instance_str, state_str as state_str, state_class_str as state_class_str, attribute_str as attribute_str, state_attribute_str as state_attribute_str, object_mapper as object_mapper, object_state as object_state +from .base import class_mapper as class_mapper +from .base import InspectionAttr as InspectionAttr +from .path_registry import PathRegistry as PathRegistry + + +all_cascades = ... # type: Any + +class CascadeOptions(frozenset): + save_update = ... # type: Any + delete = ... # type: Any + refresh_expire = ... # type: Any + merge = ... # type: Any + expunge = ... # type: Any + delete_orphan = ... # type: Any + def __new__(cls, value_list): ... + @classmethod + def from_string(cls, arg): ... + +def polymorphic_union(table_map, typecolname, aliasname: str = ..., cast_nulls: bool = ...): ... +def identity_key(*args, **kwargs): ... + +class ORMAdapter(sql_util.ColumnAdapter): + mapper = ... # type: Any + aliased_class = ... # type: Any + def __init__(self, entity, equivalents: Optional[Any] = ..., adapt_required: bool = ..., chain_to: Optional[Any] = ..., allow_label_resolve: bool = ..., anonymize_labels: bool = ...) -> None: ... + class AliasedClass(object): - def __init__(self, cls: Any, alias: Optional[FromClause] =None, name: Optional[Text] =None, flat: bool =False, adapt_on_names: bool =False, - with_polymorphic_mappers: Any =(), with_polymorphic_discriminator: Any =None, base_alias: Any =None, use_mapper_path: bool =False) -> None: ... + __name__ = ... # type: Any + def __init__(self, cls: Any, alias: Optional[FromClause] = ..., name: Optional[Text] = ..., flat: bool = ..., adapt_on_names: bool = ..., with_polymorphic_mappers: Any = ..., with_polymorphic_discriminator: Optional[Any] = ..., base_alias: Optional[Any] = ..., use_mapper_path: bool = ...) -> None: ... def __getattr__(self, key): ... - def __repr__(self): ... -def aliased(element: Any, alias: Optional[FromClause] =None, name: Optional[Text] =None, flat: bool =False, adapt_on_names: bool =False) -> AliasedClass: ... +class AliasedInsp(InspectionAttr): + entity = ... # type: Any + mapper = ... # type: Any + selectable = ... # type: Any + name = ... # type: Any + with_polymorphic_mappers = ... # type: Any + polymorphic_on = ... # type: Any + def __init__(self, entity, mapper, selectable, name, with_polymorphic_mappers, polymorphic_on, _base_alias, _use_mapper_path, adapt_on_names) -> None: ... + is_aliased_class = ... # type: bool + @property + def class_(self): ... + +def aliased(element: Any, alias: Optional[FromClause] = ..., name: Optional[Text] = ..., flat: bool = ..., adapt_on_names: bool = ...) -> AliasedClass: ... +def with_polymorphic(base, classes, selectable: bool = ..., flat: bool = ..., polymorphic_on: Optional[Any] = ..., aliased: bool = ..., innerjoin: bool = ..., _use_mapper_path: bool = ..., _existing_alias: Optional[Any] = ...): ... + +class _ORMJoin(expression.Join): + __visit_name__ = ... # type: Any + onclause = ... # type: Any + def __init__(self, left, right, onclause: Optional[Any] = ..., isouter: bool = ..., full: bool = ..., _left_memo: Optional[Any] = ..., _right_memo: Optional[Any] = ...) -> None: ... + def join(self, right, onclause: Optional[Any] = ..., isouter: bool = ..., full: bool = ..., join_to_left: Optional[Any] = ...): ... + def outerjoin(self, right, onclause: Optional[Any] = ..., full: bool = ..., join_to_left: Optional[Any] = ...): ... + +def join(left, right, onclause: Optional[Any] = ..., isouter: bool = ..., full: bool = ..., join_to_left: Optional[Any] = ...): ... +def outerjoin(left, right, onclause: Optional[Any] = ..., full: bool = ..., join_to_left: Optional[Any] = ...): ... +def with_parent(instance, prop): ... +def has_identity(object): ... +def was_deleted(object): ... +def randomize_unitofwork(): ... diff --git a/third_party/2and3/sqlalchemy/pool.pyi b/third_party/2and3/sqlalchemy/pool.pyi index a278d6e1a2d5..d329247ee3f4 100644 --- a/third_party/2and3/sqlalchemy/pool.pyi +++ b/third_party/2and3/sqlalchemy/pool.pyi @@ -1,14 +1,11 @@ -# Stubs for sqlalchemy.pool (Python 2) +# Stubs for sqlalchemy.pool (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any +from typing import Any, Optional from . import log -from . import util - -threading = util.threading -memoized_property = util.memoized_property -chop_traceback = util.chop_traceback +from .util import queue as sqla_queue +from .util import threading as threading, memoized_property as memoized_property, chop_traceback as chop_traceback proxies = ... # type: Any @@ -19,7 +16,7 @@ reset_rollback = ... # type: Any reset_commit = ... # type: Any reset_none = ... # type: Any -class _ConnDialect: +class _ConnDialect(object): def do_rollback(self, dbapi_connection): ... def do_commit(self, dbapi_connection): ... def do_close(self, dbapi_connection): ... @@ -27,7 +24,7 @@ class _ConnDialect: class Pool(log.Identified): logging_name = ... # type: Any echo = ... # type: Any - def __init__(self, creator, recycle=..., echo=..., use_threadlocal=..., logging_name=..., reset_on_return=..., listeners=..., events=..., _dispatch=..., _dialect=...) -> None: ... + def __init__(self, creator, recycle: int = ..., echo: Optional[Any] = ..., use_threadlocal: bool = ..., logging_name: Optional[Any] = ..., reset_on_return: bool = ..., listeners: Optional[Any] = ..., events: Optional[Any] = ..., dialect: Optional[Any] = ..., _dispatch: Optional[Any] = ...) -> None: ... def add_listener(self, listener): ... def unique_connection(self): ... def recreate(self): ... @@ -35,50 +32,50 @@ class Pool(log.Identified): def connect(self): ... def status(self): ... - _threadconns = ... # type: Any - _creator = ... # type: Any - _recycle = ... # type: Any - _invalidate_time = ... # type: Any - dispatch = ... # type: Any - _dialect = ... # type: Any - _orig_logging_name = ... # type: Any - _reset_on_return = ... # type: Any - _use_threadlocal = ... # type: Any - -class _ConnectionRecord: - connection = ... # type: Any +class _ConnectionRecord(object): finalize_callback = ... # type: Any - def __init__(self, pool) -> None: ... + def __init__(self, pool, connect: bool = ...) -> None: ... + fairy_ref = ... # type: Any + starttime = ... # type: Any + connection = ... # type: Any + @property def info(self): ... + @property + def record_info(self): ... @classmethod def checkout(cls, pool): ... - fairy_ref = ... # type: Any def checkin(self): ... + @property + def in_use(self): ... + @property + def last_connect_time(self): ... def close(self): ... - def invalidate(self, e=..., soft=...): ... + def invalidate(self, e: Optional[Any] = ..., soft: bool = ...): ... def get_connection(self): ... -class _ConnectionFairy: +class _ConnectionFairy(object): connection = ... # type: Any def __init__(self, dbapi_connection, connection_record, echo) -> None: ... @property def is_valid(self): ... - def info(self): ... - def invalidate(self, e=..., soft=...): ... + @property + def record_info(self): ... + def invalidate(self, e: Optional[Any] = ..., soft: bool = ...): ... def cursor(self, *args, **kwargs): ... def __getattr__(self, key): ... + info = ... # type: Any def detach(self): ... def close(self): ... class SingletonThreadPool(Pool): size = ... # type: Any - def __init__(self, creator, pool_size=..., **kw) -> None: ... + def __init__(self, creator, pool_size: int = ..., **kw) -> None: ... def recreate(self): ... def dispose(self): ... def status(self): ... class QueuePool(Pool): - def __init__(self, creator, pool_size=..., max_overflow=..., timeout=..., **kw) -> None: ... + def __init__(self, creator, pool_size: int = ..., max_overflow: int = ..., timeout: int = ..., **kw) -> None: ... def recreate(self): ... def dispose(self): ... def status(self): ... @@ -104,12 +101,12 @@ class AssertionPool(Pool): def dispose(self): ... def recreate(self): ... -class _DBProxy: +class _DBProxy(object): module = ... # type: Any kw = ... # type: Any poolclass = ... # type: Any pools = ... # type: Any - def __init__(self, module, poolclass=..., **kw) -> None: ... + def __init__(self, module, poolclass: Any = ..., **kw) -> None: ... def close(self): ... def __del__(self): ... def __getattr__(self, key): ... diff --git a/third_party/2and3/sqlalchemy/processors.pyi b/third_party/2and3/sqlalchemy/processors.pyi new file mode 100644 index 000000000000..8befd16584c0 --- /dev/null +++ b/third_party/2and3/sqlalchemy/processors.pyi @@ -0,0 +1,12 @@ +# Stubs for sqlalchemy.processors (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional + +def str_to_datetime_processor_factory(regexp, type_): ... +def boolean_to_int(value): ... +def py_fallback(): ... +def to_unicode_processor_factory(encoding, errors: Optional[Any] = ...): ... +def to_conditional_unicode_processor_factory(encoding, errors: Optional[Any] = ...): ... +def to_decimal_processor_factory(target_class, scale): ... diff --git a/third_party/2and3/sqlalchemy/schema.pyi b/third_party/2and3/sqlalchemy/schema.pyi index f788897337c0..46af2832c42a 100644 --- a/third_party/2and3/sqlalchemy/schema.pyi +++ b/third_party/2and3/sqlalchemy/schema.pyi @@ -1,50 +1,8 @@ -# Stubs for sqlalchemy.schema (Python 2) +# Stubs for sqlalchemy.schema (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. -from .sql import base -from .sql import schema -from .sql import naming -from .sql import ddl -from .sql import elements - -SchemaVisitor = base.SchemaVisitor -CheckConstraint = schema.CheckConstraint -Column = schema.Column -ColumnDefault = schema.ColumnDefault -Constraint = schema.Constraint -DefaultClause = schema.DefaultClause -DefaultGenerator = schema.DefaultGenerator -FetchedValue = schema.FetchedValue -ForeignKey = schema.ForeignKey -ForeignKeyConstraint = schema.ForeignKeyConstraint -Index = schema.Index -MetaData = schema.MetaData -PassiveDefault = schema.PassiveDefault -PrimaryKeyConstraint = schema.PrimaryKeyConstraint -SchemaItem = schema.SchemaItem -Sequence = schema.Sequence -Table = schema.Table -ThreadLocalMetaData = schema.ThreadLocalMetaData -UniqueConstraint = schema.UniqueConstraint -_get_table_key = schema._get_table_key -ColumnCollectionConstraint = schema.ColumnCollectionConstraint -ColumnCollectionMixin = schema.ColumnCollectionMixin -conv = elements.conv -DDL = ddl.DDL -CreateTable = ddl.CreateTable -DropTable = ddl.DropTable -CreateSequence = ddl.CreateSequence -DropSequence = ddl.DropSequence -CreateIndex = ddl.CreateIndex -DropIndex = ddl.DropIndex -CreateSchema = ddl.CreateSchema -DropSchema = ddl.DropSchema -_DropView = ddl._DropView -CreateColumn = ddl.CreateColumn -AddConstraint = ddl.AddConstraint -DropConstraint = ddl.DropConstraint -DDLBase = ddl.DDLBase -DDLElement = ddl.DDLElement -_CreateDropBase = ddl._CreateDropBase -_DDLCompiles = ddl._DDLCompiles -sort_tables = ddl.sort_tables -sort_tables_and_constraints = ddl.sort_tables_and_constraints +from .sql.base import SchemaVisitor as SchemaVisitor +from .sql.schema import BLANK_SCHEMA as BLANK_SCHEMA, CheckConstraint as CheckConstraint, Column as Column, ColumnDefault as ColumnDefault, Constraint as Constraint, DefaultClause as DefaultClause, DefaultGenerator as DefaultGenerator, FetchedValue as FetchedValue, ForeignKey as ForeignKey, ForeignKeyConstraint as ForeignKeyConstraint, Index as Index, MetaData as MetaData, PassiveDefault as PassiveDefault, PrimaryKeyConstraint as PrimaryKeyConstraint, SchemaItem as SchemaItem, Sequence as Sequence, Table as Table, ThreadLocalMetaData as ThreadLocalMetaData, UniqueConstraint as UniqueConstraint, ColumnCollectionConstraint as ColumnCollectionConstraint, ColumnCollectionMixin as ColumnCollectionMixin +from .sql.naming import conv as conv +from .sql.ddl import DDL as DDL, CreateTable as CreateTable, DropTable as DropTable, CreateSequence as CreateSequence, DropSequence as DropSequence, CreateIndex as CreateIndex, DropIndex as DropIndex, CreateSchema as CreateSchema, DropSchema as DropSchema, _DropView as _DropView, CreateColumn as CreateColumn, AddConstraint as AddConstraint, DropConstraint as DropConstraint, DDLBase as DDLBase, DDLElement as DDLElement, _CreateDropBase as _CreateDropBase, _DDLCompiles as _DDLCompiles, sort_tables as sort_tables, sort_tables_and_constraints as sort_tables_and_constraints diff --git a/third_party/2and3/sqlalchemy/sql/__init__.pyi b/third_party/2and3/sqlalchemy/sql/__init__.pyi index 91d06d82e238..ef7ebe5db684 100644 --- a/third_party/2and3/sqlalchemy/sql/__init__.pyi +++ b/third_party/2and3/sqlalchemy/sql/__init__.pyi @@ -1,66 +1,6 @@ -# Stubs for sqlalchemy.sql (Python 2) +# Stubs for sqlalchemy.sql (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from . import expression -from . import visitors - -Alias = expression.Alias -ClauseElement = expression.ClauseElement -ColumnCollection = expression.ColumnCollection -ColumnElement = expression.ColumnElement -CompoundSelect = expression.CompoundSelect -Delete = expression.Delete -FromClause = expression.FromClause -Insert = expression.Insert -Join = expression.Join -Select = expression.Select -Selectable = expression.Selectable -TableClause = expression.TableClause -Update = expression.Update -alias = expression.alias -and_ = expression.and_ -asc = expression.asc -between = expression.between -bindparam = expression.bindparam -case = expression.case -cast = expression.cast -collate = expression.collate -column = expression.column -delete = expression.delete -desc = expression.desc -distinct = expression.distinct -except_ = expression.except_ -except_all = expression.except_all -exists = expression.exists -extract = expression.extract -false = expression.false -False_ = expression.False_ -func = expression.func -funcfilter = expression.funcfilter -insert = expression.insert -intersect = expression.intersect -intersect_all = expression.intersect_all -join = expression.join -label = expression.label -literal = expression.literal -literal_column = expression.literal_column -modifier = expression.modifier -not_ = expression.not_ -null = expression.null -or_ = expression.or_ -outerjoin = expression.outerjoin -outparam = expression.outparam -over = expression.over -select = expression.select -subquery = expression.subquery -table = expression.table -text = expression.text -true = expression.true -True_ = expression.True_ -tuple_ = expression.tuple_ -type_coerce = expression.type_coerce -union = expression.union -union_all = expression.union_all -update = expression.update -ClauseVisitor = visitors.ClauseVisitor +from .expression import Alias as Alias, ClauseElement as ClauseElement, ColumnCollection as ColumnCollection, ColumnElement as ColumnElement, CompoundSelect as CompoundSelect, Delete as Delete, FromClause as FromClause, Insert as Insert, Join as Join, Select as Select, Selectable as Selectable, TableClause as TableClause, TableSample as TableSample, Update as Update, alias as alias, and_ as and_, any_ as any_, all_ as all_, asc as asc, between as between, bindparam as bindparam, case as case, cast as cast, collate as collate, column as column, delete as delete, desc as desc, distinct as distinct, except_ as except_, except_all as except_all, exists as exists, extract as extract, false as false, False_ as False_, func as func, funcfilter as funcfilter, insert as insert, intersect as intersect, intersect_all as intersect_all, join as join, label as label, lateral as lateral, literal as literal, literal_column as literal_column, modifier as modifier, not_ as not_, null as null, or_ as or_, outerjoin as outerjoin, outparam as outparam, over as over, select as select, subquery as subquery, table as table, tablesample as tablesample, text as text, true as true, True_ as True_, tuple_ as tuple_, type_coerce as type_coerce, union as union, union_all as union_all, update as update, within_group as within_group, false as false, true as true, funcfilter as funcfilter +from .visitors import ClauseVisitor as ClauseVisitor diff --git a/third_party/2and3/sqlalchemy/sql/annotation.pyi b/third_party/2and3/sqlalchemy/sql/annotation.pyi index ba0aba4378dd..23729e005425 100644 --- a/third_party/2and3/sqlalchemy/sql/annotation.pyi +++ b/third_party/2and3/sqlalchemy/sql/annotation.pyi @@ -1,11 +1,20 @@ +# Stubs for sqlalchemy.sql.annotation (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any + class Annotated(object): def __new__(cls, *args): ... - def __init__(self, element, values): ... + __dict__ = ... # type: Any + def __init__(self, element, values) -> None: ... + def __hash__(self): ... + def __eq__(self, other): ... def _annotate(self, values): ... def _with_annotations(self, values): ... - def _deannotate(self, values=..., clone: bool=...): ... + def _deannotate(self, values = ..., clone: bool = ...): ... def _compiler_dispatch(self, visitor, **kw): ... def _constructor(self): ... def _clone(self): ... - def __hash__(self): ... - def __eq__(self): ... + +annotated_classes = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/base.pyi b/third_party/2and3/sqlalchemy/sql/base.pyi index 48e68c70fdbd..a34161bd8eb1 100644 --- a/third_party/2and3/sqlalchemy/sql/base.pyi +++ b/third_party/2and3/sqlalchemy/sql/base.pyi @@ -1,42 +1,87 @@ -from typing import Any, Iterable +# Stubs for sqlalchemy.sql.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. -from .visitors import ClauseVisitor -from .. import util +from typing import Any +import collections +from sqlalchemy import util +from .visitors import ClauseVisitor as ClauseVisitor + +PARSE_AUTOCOMMIT = ... # type: Any +NO_ARG = ... # type: Any class Immutable(object): def unique_params(self, *optionaldict, **kwargs): ... def params(self, *optionaldict, **kwargs): ... def _clone(self) -> Immutable: ... +class _DialectArgView(collections.MutableMapping): + obj = ... # type: Any + def __init__(self, obj) -> None: ... + def __getitem__(self, key): ... + def __setitem__(self, key, value): ... + def __delitem__(self, key): ... + def __len__(self): ... + def __iter__(self): ... + +class _DialectArgDict(collections.MutableMapping): + def __init__(self) -> None: ... + def __len__(self): ... + def __iter__(self): ... + def __getitem__(self, key): ... + def __setitem__(self, key, value): ... + def __delitem__(self, key): ... + class DialectKWArgs(object): + @classmethod def argument_for(cls, dialect_name, argument_name, default): ... + @property + def dialect_kwargs(self): ... + @property def kwargs(self): ... + @property def dialect_options(self): ... class Generative(object): ... class Executable(Generative): + supports_execution = ... # type: bool def execution_options(self, **kw): ... def execute(self, *multiparams, **params): ... def scalar(self, *multiparams, **params): ... - @property def bind(self): ... class SchemaEventTarget(object): ... -class SchemaVisitor(ClauseVisitor): ... + +class SchemaVisitor(ClauseVisitor): + __traverse_options__ = ... # type: Any + class ColumnCollection(util.OrderedProperties): + def __init__(self, *columns) -> None: ... def replace(self, column): ... def add(self, column): ... + def __delitem__(self, key): ... + def __setattr__(self, key, object): ... + def __setitem__(self, key, value): ... def clear(self): ... def remove(self, column): ... - def update(self, iter: Iterable[Any]): ... - def extend(self, iter: Iterable[Any]): ... + def update(self, iter): ... + def extend(self, iter): ... + __hash__ = ... # type: Any + def __eq__(self, other): ... + def __contains__(self, other): ... def contains_column(self, col): ... def as_immutable(self): ... -class ImmutableColumnCollection(util.ImmutableProperties, ColumnCollection): ... +class ImmutableColumnCollection(util.ImmutableProperties, ColumnCollection): + def __init__(self, data, all_columns) -> None: ... + extend = ... # type: Any + remove = ... # type: Any -class ColumnSet(util.ordered_column_set): ... - -def _bind_or_error(schemaitem, msg): ... +class ColumnSet(util.ordered_column_set): + def contains_column(self, col): ... + def extend(self, cols): ... + def __add__(self, other): ... + def __eq__(self, other): ... + def __hash__(self): ... diff --git a/third_party/2and3/sqlalchemy/sql/compiler.pyi b/third_party/2and3/sqlalchemy/sql/compiler.pyi new file mode 100644 index 000000000000..80d73ef23bb1 --- /dev/null +++ b/third_party/2and3/sqlalchemy/sql/compiler.pyi @@ -0,0 +1,284 @@ +# Stubs for sqlalchemy.sql.compiler (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from . import visitors +from .. import util + +RESERVED_WORDS = ... # type: Any +LEGAL_CHARACTERS = ... # type: Any +ILLEGAL_INITIAL_CHARACTERS = ... # type: Any +BIND_PARAMS = ... # type: Any +BIND_PARAMS_ESC = ... # type: Any +BIND_TEMPLATES = ... # type: Any +OPERATORS = ... # type: Any +FUNCTIONS = ... # type: Any +EXTRACT_MAP = ... # type: Any +COMPOUND_KEYWORDS = ... # type: Any + +class Compiled(object): + execution_options = ... # type: Any + dialect = ... # type: Any + bind = ... # type: Any + preparer = ... # type: Any + statement = ... # type: Any + can_execute = ... # type: Any + string = ... # type: Any + def __init__(self, dialect, statement, bind: Optional[Any] = ..., schema_translate_map: Optional[Any] = ..., compile_kwargs: Any = ...) -> None: ... + def compile(self): ... + @property + def sql_compiler(self): ... + def process(self, obj, **kwargs): ... + def construct_params(self, params: Optional[Any] = ...): ... + @property + def params(self): ... + def execute(self, *multiparams, **params): ... + def scalar(self, *multiparams, **params): ... + +class TypeCompiler(metaclass=util.EnsureKWArgType): + ensure_kwarg = ... # type: str + dialect = ... # type: Any + def __init__(self, dialect) -> None: ... + def process(self, type_, **kw): ... + +class _CompileLabel(visitors.Visitable): + __visit_name__ = ... # type: str + element = ... # type: Any + name = ... # type: Any + def __init__(self, col, name, alt_names: Any = ...) -> None: ... + @property + def proxy_set(self): ... + @property + def type(self): ... + def self_group(self, **kw): ... + +class SQLCompiler(Compiled): + extract_map = ... # type: Any + compound_keywords = ... # type: Any + isdelete = ... # type: bool + isinsert = ... # type: bool + isupdate = ... # type: bool + isplaintext = ... # type: bool + returning = ... # type: Any + returning_precedes_values = ... # type: bool + render_table_with_column_in_update_from = ... # type: bool + ansi_bind_rules = ... # type: bool + insert_prefetch = ... # type: Any + update_prefetch = ... # type: Any + column_keys = ... # type: Any + inline = ... # type: Any + binds = ... # type: Any + bind_names = ... # type: Any + stack = ... # type: Any + positional = ... # type: Any + positiontup = ... # type: Any + bindtemplate = ... # type: Any + ctes = ... # type: Any + label_length = ... # type: Any + anon_map = ... # type: Any + truncated_names = ... # type: Any + def __init__(self, dialect, statement, column_keys: Optional[Any] = ..., inline: bool = ..., **kwargs) -> None: ... + @property + def prefetch(self): ... + def is_subquery(self): ... + @property + def sql_compiler(self): ... + def construct_params(self, params: Optional[Any] = ..., _group_number: Optional[Any] = ..., _check: bool = ...): ... + @property + def params(self): ... + def default_from(self): ... + def visit_grouping(self, grouping, asfrom: bool = ..., **kwargs): ... + def visit_label_reference(self, element, within_columns_clause: bool = ..., **kwargs): ... + def visit_textual_label_reference(self, element, within_columns_clause: bool = ..., **kwargs): ... + def visit_label(self, label, add_to_result_map: Optional[Any] = ..., within_label_clause: bool = ..., within_columns_clause: bool = ..., render_label_as_label: Optional[Any] = ..., **kw): ... + def visit_column(self, column, add_to_result_map: Optional[Any] = ..., include_table: bool = ..., **kwargs): ... + def escape_literal_column(self, text): ... + def visit_fromclause(self, fromclause, **kwargs): ... + def visit_index(self, index, **kwargs): ... + def visit_typeclause(self, typeclause, **kw): ... + def post_process_text(self, text): ... + def visit_textclause(self, textclause, **kw): ... + def visit_text_as_from(self, taf, compound_index: Optional[Any] = ..., asfrom: bool = ..., parens: bool = ..., **kw): ... + def visit_null(self, expr, **kw): ... + def visit_true(self, expr, **kw): ... + def visit_false(self, expr, **kw): ... + def visit_clauselist(self, clauselist, **kw): ... + def visit_case(self, clause, **kwargs): ... + def visit_type_coerce(self, type_coerce, **kw): ... + def visit_cast(self, cast, **kwargs): ... + def visit_over(self, over, **kwargs): ... + def visit_withingroup(self, withingroup, **kwargs): ... + def visit_funcfilter(self, funcfilter, **kwargs): ... + def visit_extract(self, extract, **kwargs): ... + def visit_function(self, func, add_to_result_map: Optional[Any] = ..., **kwargs): ... + def visit_next_value_func(self, next_value, **kw): ... + def visit_sequence(self, sequence): ... + def function_argspec(self, func, **kwargs): ... + def visit_compound_select(self, cs, asfrom: bool = ..., parens: bool = ..., compound_index: int = ..., **kwargs): ... + def visit_unary(self, unary, **kw): ... + def visit_istrue_unary_operator(self, element, operator, **kw): ... + def visit_isfalse_unary_operator(self, element, operator, **kw): ... + def visit_notmatch_op_binary(self, binary, operator, **kw): ... + def visit_binary(self, binary, override_operator: Optional[Any] = ..., eager_grouping: bool = ..., **kw): ... + def visit_custom_op_binary(self, element, operator, **kw): ... + def visit_custom_op_unary_operator(self, element, operator, **kw): ... + def visit_custom_op_unary_modifier(self, element, operator, **kw): ... + def visit_contains_op_binary(self, binary, operator, **kw): ... + def visit_notcontains_op_binary(self, binary, operator, **kw): ... + def visit_startswith_op_binary(self, binary, operator, **kw): ... + def visit_notstartswith_op_binary(self, binary, operator, **kw): ... + def visit_endswith_op_binary(self, binary, operator, **kw): ... + def visit_notendswith_op_binary(self, binary, operator, **kw): ... + def visit_like_op_binary(self, binary, operator, **kw): ... + def visit_notlike_op_binary(self, binary, operator, **kw): ... + def visit_ilike_op_binary(self, binary, operator, **kw): ... + def visit_notilike_op_binary(self, binary, operator, **kw): ... + def visit_between_op_binary(self, binary, operator, **kw): ... + def visit_notbetween_op_binary(self, binary, operator, **kw): ... + def visit_bindparam(self, bindparam, within_columns_clause: bool = ..., literal_binds: bool = ..., skip_bind_expression: bool = ..., **kwargs): ... + def render_literal_bindparam(self, bindparam, **kw): ... + def render_literal_value(self, value, type_): ... + def bindparam_string(self, name, positional_names: Optional[Any] = ..., **kw): ... + execution_options = ... # type: Any + ctes_recursive = ... # type: bool + def visit_cte(self, cte, asfrom: bool = ..., ashint: bool = ..., fromhints: Optional[Any] = ..., **kwargs): ... + def visit_alias(self, alias, asfrom: bool = ..., ashint: bool = ..., iscrud: bool = ..., fromhints: Optional[Any] = ..., **kwargs): ... + def visit_lateral(self, lateral, **kw): ... + def visit_tablesample(self, tablesample, asfrom: bool = ..., **kw): ... + def get_render_as_alias_suffix(self, alias_name_text): ... + def format_from_hint_text(self, sqltext, table, hint, iscrud): ... + def get_select_hint_text(self, byfroms): ... + def get_from_hint_text(self, table, text): ... + def get_crud_hint_text(self, table, text): ... + def get_statement_hint_text(self, hint_texts): ... + def visit_select(self, select, asfrom: bool = ..., parens: bool = ..., fromhints: Optional[Any] = ..., compound_index: int = ..., nested_join_translation: bool = ..., select_wraps_for: Optional[Any] = ..., lateral: bool = ..., **kwargs): ... + def get_cte_preamble(self, recursive): ... + def get_select_precolumns(self, select, **kw): ... + def order_by_clause(self, select, **kw): ... + def for_update_clause(self, select, **kw): ... + def returning_clause(self, stmt, returning_cols): ... + def limit_clause(self, select, **kw): ... + def visit_table(self, table, asfrom: bool = ..., iscrud: bool = ..., ashint: bool = ..., fromhints: Optional[Any] = ..., use_schema: bool = ..., **kwargs): ... + def visit_join(self, join, asfrom: bool = ..., **kwargs): ... + def visit_insert(self, insert_stmt, asfrom: bool = ..., **kw): ... + def update_limit_clause(self, update_stmt): ... + def update_tables_clause(self, update_stmt, from_table, extra_froms, **kw): ... + def update_from_clause(self, update_stmt, from_table, extra_froms, from_hints, **kw): ... + def visit_update(self, update_stmt, asfrom: bool = ..., **kw): ... + def visit_delete(self, delete_stmt, asfrom: bool = ..., **kw): ... + def visit_savepoint(self, savepoint_stmt): ... + def visit_rollback_to_savepoint(self, savepoint_stmt): ... + def visit_release_savepoint(self, savepoint_stmt): ... + +class StrSQLCompiler(SQLCompiler): + def visit_getitem_binary(self, binary, operator, **kw): ... + def visit_json_getitem_op_binary(self, binary, operator, **kw): ... + def visit_json_path_getitem_op_binary(self, binary, operator, **kw): ... + def returning_clause(self, stmt, returning_cols): ... + +class DDLCompiler(Compiled): + @property + def sql_compiler(self): ... + @property + def type_compiler(self): ... + def construct_params(self, params: Optional[Any] = ...): ... + def visit_ddl(self, ddl, **kwargs): ... + def visit_create_schema(self, create): ... + def visit_drop_schema(self, drop): ... + def visit_create_table(self, create): ... + def visit_create_column(self, create, first_pk: bool = ...): ... + def create_table_constraints(self, table, _include_foreign_key_constraints: Optional[Any] = ...): ... + def visit_drop_table(self, drop): ... + def visit_drop_view(self, drop): ... + def visit_create_index(self, create, include_schema: bool = ..., include_table_schema: bool = ...): ... + def visit_drop_index(self, drop): ... + def visit_add_constraint(self, create): ... + def visit_create_sequence(self, create): ... + def visit_drop_sequence(self, drop): ... + def visit_drop_constraint(self, drop): ... + def get_column_specification(self, column, **kwargs): ... + def create_table_suffix(self, table): ... + def post_create_table(self, table): ... + def get_column_default_string(self, column): ... + def visit_check_constraint(self, constraint): ... + def visit_column_check_constraint(self, constraint): ... + def visit_primary_key_constraint(self, constraint): ... + def visit_foreign_key_constraint(self, constraint): ... + def define_constraint_remote_table(self, constraint, table, preparer): ... + def visit_unique_constraint(self, constraint): ... + def define_constraint_cascades(self, constraint): ... + def define_constraint_deferrability(self, constraint): ... + def define_constraint_match(self, constraint): ... + +class GenericTypeCompiler(TypeCompiler): + def visit_FLOAT(self, type_, **kw): ... + def visit_REAL(self, type_, **kw): ... + def visit_NUMERIC(self, type_, **kw): ... + def visit_DECIMAL(self, type_, **kw): ... + def visit_INTEGER(self, type_, **kw): ... + def visit_SMALLINT(self, type_, **kw): ... + def visit_BIGINT(self, type_, **kw): ... + def visit_TIMESTAMP(self, type_, **kw): ... + def visit_DATETIME(self, type_, **kw): ... + def visit_DATE(self, type_, **kw): ... + def visit_TIME(self, type_, **kw): ... + def visit_CLOB(self, type_, **kw): ... + def visit_NCLOB(self, type_, **kw): ... + def visit_CHAR(self, type_, **kw): ... + def visit_NCHAR(self, type_, **kw): ... + def visit_VARCHAR(self, type_, **kw): ... + def visit_NVARCHAR(self, type_, **kw): ... + def visit_TEXT(self, type_, **kw): ... + def visit_BLOB(self, type_, **kw): ... + def visit_BINARY(self, type_, **kw): ... + def visit_VARBINARY(self, type_, **kw): ... + def visit_BOOLEAN(self, type_, **kw): ... + def visit_large_binary(self, type_, **kw): ... + def visit_boolean(self, type_, **kw): ... + def visit_time(self, type_, **kw): ... + def visit_datetime(self, type_, **kw): ... + def visit_date(self, type_, **kw): ... + def visit_big_integer(self, type_, **kw): ... + def visit_small_integer(self, type_, **kw): ... + def visit_integer(self, type_, **kw): ... + def visit_real(self, type_, **kw): ... + def visit_float(self, type_, **kw): ... + def visit_numeric(self, type_, **kw): ... + def visit_string(self, type_, **kw): ... + def visit_unicode(self, type_, **kw): ... + def visit_text(self, type_, **kw): ... + def visit_unicode_text(self, type_, **kw): ... + def visit_enum(self, type_, **kw): ... + def visit_null(self, type_, **kw): ... + def visit_type_decorator(self, type_, **kw): ... + def visit_user_defined(self, type_, **kw): ... + +class StrSQLTypeCompiler(GenericTypeCompiler): + def __getattr__(self, key): ... + +class IdentifierPreparer(object): + reserved_words = ... # type: Any + legal_characters = ... # type: Any + illegal_initial_characters = ... # type: Any + schema_for_object = ... # type: Any + dialect = ... # type: Any + initial_quote = ... # type: Any + final_quote = ... # type: Any + escape_quote = ... # type: Any + escape_to_quote = ... # type: Any + omit_schema = ... # type: Any + def __init__(self, dialect, initial_quote: str = ..., final_quote: Optional[Any] = ..., escape_quote: str = ..., omit_schema: bool = ...) -> None: ... + def quote_identifier(self, value): ... + def quote_schema(self, schema, force: Optional[Any] = ...): ... + def quote(self, ident, force: Optional[Any] = ...): ... + def format_sequence(self, sequence, use_schema: bool = ...): ... + def format_label(self, label, name: Optional[Any] = ...): ... + def format_alias(self, alias, name: Optional[Any] = ...): ... + def format_savepoint(self, savepoint, name: Optional[Any] = ...): ... + def format_constraint(self, constraint): ... + def format_table(self, table, use_schema: bool = ..., name: Optional[Any] = ...): ... + def format_schema(self, name, quote: Optional[Any] = ...): ... + def format_column(self, column, use_table: bool = ..., name: Optional[Any] = ..., table_name: Optional[Any] = ...): ... + def format_table_seq(self, table, use_schema: bool = ...): ... + def unformat_identifiers(self, identifiers): ... diff --git a/third_party/2and3/sqlalchemy/sql/crud.pyi b/third_party/2and3/sqlalchemy/sql/crud.pyi new file mode 100644 index 000000000000..1986e0623567 --- /dev/null +++ b/third_party/2and3/sqlalchemy/sql/crud.pyi @@ -0,0 +1,19 @@ +# Stubs for sqlalchemy.sql.crud (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from . import elements + +REQUIRED = ... # type: Any +ISINSERT = ... # type: Any +ISUPDATE = ... # type: Any +ISDELETE = ... # type: Any + +class _multiparam_column(elements.ColumnElement): + key = ... # type: Any + original = ... # type: Any + default = ... # type: Any + type = ... # type: Any + def __init__(self, original, index) -> None: ... + def __eq__(self, other): ... diff --git a/third_party/2and3/sqlalchemy/sql/ddl.pyi b/third_party/2and3/sqlalchemy/sql/ddl.pyi index 06ac96a8ac1f..14da1ad76974 100644 --- a/third_party/2and3/sqlalchemy/sql/ddl.pyi +++ b/third_party/2and3/sqlalchemy/sql/ddl.pyi @@ -1,25 +1,118 @@ -from .elements import ClauseElement -from .base import Executable, SchemaVisitor +# Stubs for sqlalchemy.sql.ddl (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .elements import ClauseElement as ClauseElement +from .base import Executable as Executable, SchemaVisitor as SchemaVisitor +from ..util import topological as topological class _DDLCompiles(ClauseElement): ... -class DDLElement(Executable, _DDLCompiles): ... -class DDL(DDLElement): ... -class _CreateDropBase(DDLElement): ... -class CreateSchema(_CreateDropBase): ... -class DropSchema(_CreateDropBase): ... -class CreateTable(_CreateDropBase): ... -class _DropView(_CreateDropBase): ... -class CreateColumn(_DDLCompiles): ... -class DropTable(_CreateDropBase): ... -class CreateSequence(_CreateDropBase): ... -class DropSequence(_CreateDropBase): ... -class CreateIndex(_CreateDropBase): ... -class DropIndex(_CreateDropBase): ... -class AddConstraint(_CreateDropBase): ... -class DropConstraint(_CreateDropBase): ... -class DDLBase(SchemaVisitor): ... -class SchemaGenerator(DDLBase): ... -class SchemaDropper(DDLBase): ... - -def sort_tables(tables, skip_fn=..., extra_dependencies=...): ... -def sort_tables_and_constraints(tables, filter_fn=..., extra_dependencies=...): ... + +class DDLElement(Executable, _DDLCompiles): + target = ... # type: Any + on = ... # type: Any + dialect = ... # type: Any + callable_ = ... # type: Any + def execute(self, *multiparams, **params): ... + def execute_at(self, event_name, target): ... + def against(self, target): ... + state = ... # type: Any + def execute_if(self, dialect: Optional[Any] = ..., callable_: Optional[Any] = ..., state: Optional[Any] = ...): ... + def __call__(self, target, bind, **kw): ... + def bind(self): ... + +class DDL(DDLElement): + __visit_name__ = ... # type: str + statement = ... # type: Any + context = ... # type: Any + on = ... # type: Any + def __init__(self, statement, on: Optional[Any] = ..., context: Optional[Any] = ..., bind: Optional[Any] = ...) -> None: ... + +class _CreateDropBase(DDLElement): + element = ... # type: Any + on = ... # type: Any + bind = ... # type: Any + def __init__(self, element, on: Optional[Any] = ..., bind: Optional[Any] = ...) -> None: ... + +class CreateSchema(_CreateDropBase): + __visit_name__ = ... # type: str + quote = ... # type: Any + def __init__(self, name, quote: Optional[Any] = ..., **kw) -> None: ... + +class DropSchema(_CreateDropBase): + __visit_name__ = ... # type: str + quote = ... # type: Any + cascade = ... # type: Any + def __init__(self, name, quote: Optional[Any] = ..., cascade: bool = ..., **kw) -> None: ... + +class CreateTable(_CreateDropBase): + __visit_name__ = ... # type: str + columns = ... # type: Any + include_foreign_key_constraints = ... # type: Any + def __init__(self, element, on: Optional[Any] = ..., bind: Optional[Any] = ..., include_foreign_key_constraints: Optional[Any] = ...) -> None: ... + +class _DropView(_CreateDropBase): + __visit_name__ = ... # type: str + +class CreateColumn(_DDLCompiles): + __visit_name__ = ... # type: str + element = ... # type: Any + def __init__(self, element) -> None: ... + +class DropTable(_CreateDropBase): + __visit_name__ = ... # type: str + +class CreateSequence(_CreateDropBase): + __visit_name__ = ... # type: str + +class DropSequence(_CreateDropBase): + __visit_name__ = ... # type: str + +class CreateIndex(_CreateDropBase): + __visit_name__ = ... # type: str + +class DropIndex(_CreateDropBase): + __visit_name__ = ... # type: str + +class AddConstraint(_CreateDropBase): + __visit_name__ = ... # type: str + def __init__(self, element, *args, **kw) -> None: ... + +class DropConstraint(_CreateDropBase): + __visit_name__ = ... # type: str + cascade = ... # type: Any + def __init__(self, element, cascade: bool = ..., **kw) -> None: ... + +class DDLBase(SchemaVisitor): + connection = ... # type: Any + def __init__(self, connection) -> None: ... + +class SchemaGenerator(DDLBase): + checkfirst = ... # type: Any + tables = ... # type: Any + preparer = ... # type: Any + dialect = ... # type: Any + memo = ... # type: Any + def __init__(self, dialect, connection, checkfirst: bool = ..., tables: Optional[Any] = ..., **kwargs) -> None: ... + def visit_metadata(self, metadata): ... + def visit_table(self, table, create_ok: bool = ..., include_foreign_key_constraints: Optional[Any] = ..., _is_metadata_operation: bool = ...): ... + def visit_foreign_key_constraint(self, constraint): ... + def visit_sequence(self, sequence, create_ok: bool = ...): ... + def visit_index(self, index): ... + +class SchemaDropper(DDLBase): + checkfirst = ... # type: Any + tables = ... # type: Any + preparer = ... # type: Any + dialect = ... # type: Any + memo = ... # type: Any + def __init__(self, dialect, connection, checkfirst: bool = ..., tables: Optional[Any] = ..., **kwargs) -> None: ... + def visit_metadata(self, metadata): ... + def visit_index(self, index): ... + def visit_table(self, table, drop_ok: bool = ..., _is_metadata_operation: bool = ...): ... + def visit_foreign_key_constraint(self, constraint): ... + def visit_sequence(self, sequence, drop_ok: bool = ...): ... + +def sort_tables(tables, skip_fn: Optional[Any] = ..., extra_dependencies: Optional[Any] = ...): ... +def sort_tables_and_constraints(tables, filter_fn: Optional[Any] = ..., extra_dependencies: Optional[Any] = ...): ... diff --git a/third_party/2and3/sqlalchemy/sql/default_comparator.pyi b/third_party/2and3/sqlalchemy/sql/default_comparator.pyi new file mode 100644 index 000000000000..eba9d0525e3b --- /dev/null +++ b/third_party/2and3/sqlalchemy/sql/default_comparator.pyi @@ -0,0 +1,9 @@ +# Stubs for sqlalchemy.sql.default_comparator (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .elements import BindParameter as BindParameter, True_ as True_, False_ as False_, BinaryExpression as BinaryExpression, Null as Null, ClauseList as ClauseList, ColumnElement as ColumnElement, TextClause as TextClause, UnaryExpression as UnaryExpression, collate as collate, ClauseElement as ClauseElement, and_ as and_, or_ as or_, Slice as Slice, Visitable as Visitable +from .selectable import SelectBase as SelectBase, Alias as Alias, Selectable as Selectable, ScalarSelect as ScalarSelect + +operator_lookup = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/dml.pyi b/third_party/2and3/sqlalchemy/sql/dml.pyi index 79cb201d22b4..64c3f8e36b72 100644 --- a/third_party/2and3/sqlalchemy/sql/dml.pyi +++ b/third_party/2and3/sqlalchemy/sql/dml.pyi @@ -1,20 +1,49 @@ -from typing import AnyStr +# Stubs for sqlalchemy.sql.dml (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. -from .base import Executable, DialectKWArgs -from .elements import ClauseElement -from .selectable import HasPrefixes +from typing import Any, Optional +from .base import Executable as Executable, DialectKWArgs as DialectKWArgs, ColumnCollection as ColumnCollection +from .elements import ClauseElement as ClauseElement, Null as Null, and_ as and_ +from .selectable import HasPrefixes as HasPrefixes, HasCTE as HasCTE -class UpdateBase(DialectKWArgs, HasPrefixes, Executable, ClauseElement): +class UpdateBase(HasCTE, DialectKWArgs, HasPrefixes, Executable, ClauseElement): + __visit_name__ = ... # type: str + named_with_column = ... # type: bool def params(self, *arg, **kw): ... - @property - def bind(self): ... + bind = ... # type: Any def returning(self, *cols): ... - def with_hint(self, text, selectable=..., dialect_name: AnyStr=...): ... + def with_hint(self, text, selectable: Optional[Any] = ..., dialect_name: str = ...): ... class ValuesBase(UpdateBase): + __visit_name__ = ... # type: str + select = ... # type: Any + table = ... # type: Any + def __init__(self, table, values, prefixes) -> None: ... + parameters = ... # type: Any def values(self, *args, **kwargs): ... def return_defaults(self, *cols): ... -class Insert(ValuesBase): ... -class Update(ValuesBase): ... -class Delete(UpdateBase): ... +class Insert(ValuesBase): + __visit_name__ = ... # type: str + select = ... # type: Any + include_insert_from_select_defaults = ... # type: bool + inline = ... # type: Any + def __init__(self, table, values: Optional[Any] = ..., inline: bool = ..., bind: Optional[Any] = ..., prefixes: Optional[Any] = ..., returning: Optional[Any] = ..., return_defaults: bool = ..., **dialect_kw) -> None: ... + def get_children(self, **kwargs): ... + select_names = ... # type: Any + def from_select(self, names, select, include_defaults: bool = ...): ... + +class Update(ValuesBase): + __visit_name__ = ... # type: str + inline = ... # type: Any + def __init__(self, table, whereclause: Optional[Any] = ..., values: Optional[Any] = ..., inline: bool = ..., bind: Optional[Any] = ..., prefixes: Optional[Any] = ..., returning: Optional[Any] = ..., return_defaults: bool = ..., preserve_parameter_order: bool = ..., **dialect_kw) -> None: ... + def get_children(self, **kwargs): ... + def where(self, whereclause): ... + +class Delete(UpdateBase): + __visit_name__ = ... # type: str + table = ... # type: Any + def __init__(self, table, whereclause: Optional[Any] = ..., bind: Optional[Any] = ..., returning: Optional[Any] = ..., prefixes: Optional[Any] = ..., **dialect_kw) -> None: ... + def get_children(self, **kwargs): ... + def where(self, whereclause): ... diff --git a/third_party/2and3/sqlalchemy/sql/elements.pyi b/third_party/2and3/sqlalchemy/sql/elements.pyi index 4b585c676ae5..8a94af8ecae2 100644 --- a/third_party/2and3/sqlalchemy/sql/elements.pyi +++ b/third_party/2and3/sqlalchemy/sql/elements.pyi @@ -1,93 +1,371 @@ -# Stubs for sqlalchemy.sql.elements (Python 2 and 3) -from typing import Text, Any - -from .visitors import Visitable -from .annotation import Annotated -from .base import Executable, Immutable -from .operators import ColumnOperators -from .. import util - -class ClauseElement(Visitable): ... - -class ColumnElement(ColumnOperators, ClauseElement): - __visit_name__ = 'column' # type: Text - primary_key = False # type: Any - foreign_keys = [] # type: Any - _label = None # type: Any - _key_label = key = None # type: Any - _alt_names = () # type: Any - def self_group(self, against=None): ... - def _negate(self): ... - @util.memoized_property +# Stubs for sqlalchemy.sql.elements (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from . import operators +from sqlalchemy import util +from .visitors import Visitable as Visitable, cloned_traverse as cloned_traverse, traverse as traverse +from .annotation import Annotated as Annotated +from .base import Executable as Executable, PARSE_AUTOCOMMIT as PARSE_AUTOCOMMIT, Immutable as Immutable, NO_ARG as NO_ARG + +def collate(expression, collation): ... +def between(expr, lower_bound, upper_bound, symmetric: bool = ...): ... +def literal(value, type_: Optional[Any] = ...): ... +def outparam(key, type_: Optional[Any] = ...): ... +def not_(clause): ... + +class ClauseElement(Visitable): + __visit_name__ = ... # type: str + supports_execution = ... # type: bool + bind = ... # type: Any + is_selectable = ... # type: bool + is_clause_element = ... # type: bool + description = ... # type: Any + def unique_params(self, *optionaldict, **kwargs): ... + def params(self, *optionaldict, **kwargs): ... + def compare(self, other, **kw): ... + def get_children(self, **kwargs): ... + def self_group(self, against: Optional[Any] = ...): ... + def compile(self, bind: Optional[Any] = ..., dialect: Optional[Any] = ..., **kw): ... + def __and__(self, other): ... + def __or__(self, other): ... + def __invert__(self): ... + def __bool__(self): ... + __nonzero__ = ... # type: Any + +class ColumnElement(operators.ColumnOperators, ClauseElement): + __visit_name__ = ... # type: str + primary_key = ... # type: Any + foreign_keys = ... # type: Any + key = ... # type: Any + def self_group(self, against: Optional[Any] = ...): ... + @property def type(self): ... - @util.memoized_property def comparator(self): ... def __getattr__(self, key): ... def operate(self, op, *other, **kwargs): ... def reverse_operate(self, op, other, **kwargs): ... - def _bind_param(self, operator, obj): ... @property def expression(self): ... - @property - def _select_iterable(self): ... - @util.memoized_property def base_columns(self): ... - @util.memoized_property def proxy_set(self): ... def shares_lineage(self, othercolumn): ... - def _compare_name_for_result(self, other): ... - def _make_proxy(self, selectable, name=None, name_is_truncatable=False, **kw): ... - def compare(self, other, use_proxies=False, equivalents=None, **kw): ... + def compare(self, other, **kw): ... + def cast(self, type_): ... def label(self, name): ... - @util.memoized_property def anon_label(self): ... -class BindParameter(ColumnElement): ... -class BinaryExpression(ColumnElement): ... - -class TypeClause(ClauseElement): ... -class TextClause(Executable, ClauseElement): ... - -class Null(ColumnElement): ... -class False_(ColumnElement): ... -class True_(ColumnElement): ... - -class ClauseList(ClauseElement): ... -class BooleanClauseList(ClauseList, ColumnElement): ... -class Tuple(ClauseList, ColumnElement): ... -class Case(ColumnElement): ... -class Cast(ColumnElement): ... -class Extract(ColumnElement): ... -class _label_reference(ColumnElement): ... - -class _textual_label_reference(ColumnElement): ... -class UnaryExpression(ColumnElement): ... -class AsBoolean(UnaryExpression): ... -class Grouping(ColumnElement): ... -class Over(ColumnElement): ... -class FunctionFilter(ColumnElement): ... -class Label(ColumnElement): ... -class ColumnClause(Immutable, ColumnElement): ... -class _IdentifiedClause(Executable, ClauseElement): ... -class SavepointClause(_IdentifiedClause): ... -class RollbackToSavepointClause(_IdentifiedClause): ... -class ReleaseSavepointClause(_IdentifiedClause): ... -class quoted_name(util.MemoizedSlots, util.text_type): ... -class _truncated_label(quoted_name): ... +class BindParameter(ColumnElement): + __visit_name__ = ... # type: str + key = ... # type: Any + unique = ... # type: Any + value = ... # type: Any + callable = ... # type: Any + isoutparam = ... # type: Any + required = ... # type: Any + type = ... # type: Any + def __init__(self, key, value: Any = ..., type_: Optional[Any] = ..., unique: bool = ..., required: Any = ..., quote: Optional[Any] = ..., callable_: Optional[Any] = ..., isoutparam: bool = ..., _compared_to_operator: Optional[Any] = ..., _compared_to_type: Optional[Any] = ...) -> None: ... + @property + def effective_value(self): ... + def compare(self, other, **kw): ... + +class TypeClause(ClauseElement): + __visit_name__ = ... # type: str + type = ... # type: Any + def __init__(self, type) -> None: ... + +class TextClause(Executable, ClauseElement): + __visit_name__ = ... # type: str + @property + def selectable(self): ... + key = ... # type: Any + text = ... # type: Any + def __init__(self, text, bind: Optional[Any] = ...) -> None: ... + def bindparams(self, *binds, **names_to_values): ... + def columns(self, *cols, **types): ... + @property + def type(self): ... + @property + def comparator(self): ... + def self_group(self, against: Optional[Any] = ...): ... + def get_children(self, **kwargs): ... + def compare(self, other): ... + +class Null(ColumnElement): + __visit_name__ = ... # type: str + @property + def type(self): ... + def compare(self, other): ... + +class False_(ColumnElement): + __visit_name__ = ... # type: str + @property + def type(self): ... + def compare(self, other): ... + +class True_(ColumnElement): + __visit_name__ = ... # type: str + @property + def type(self): ... + def compare(self, other): ... + +class ClauseList(ClauseElement): + __visit_name__ = ... # type: str + operator = ... # type: Any + group = ... # type: Any + group_contents = ... # type: Any + clauses = ... # type: Any + def __init__(self, *clauses, **kwargs) -> None: ... + def __iter__(self): ... + def __len__(self): ... + def append(self, clause): ... + def get_children(self, **kwargs): ... + def self_group(self, against: Optional[Any] = ...): ... + def compare(self, other, **kw): ... + +class BooleanClauseList(ClauseList, ColumnElement): + __visit_name__ = ... # type: str + def __init__(self, *arg, **kw) -> None: ... + @classmethod + def and_(cls, *clauses): ... + @classmethod + def or_(cls, *clauses): ... + def self_group(self, against: Optional[Any] = ...): ... + +and_ = ... # type: Any +or_ = ... # type: Any + +class Tuple(ClauseList, ColumnElement): + type = ... # type: Any + def __init__(self, *clauses, **kw) -> None: ... + +class Case(ColumnElement): + __visit_name__ = ... # type: str + value = ... # type: Any + type = ... # type: Any + whens = ... # type: Any + else_ = ... # type: Any + def __init__(self, whens, value: Optional[Any] = ..., else_: Optional[Any] = ...) -> None: ... + def get_children(self, **kwargs): ... + +def literal_column(text, type_: Optional[Any] = ...): ... + +class Cast(ColumnElement): + __visit_name__ = ... # type: str + type = ... # type: Any + clause = ... # type: Any + typeclause = ... # type: Any + def __init__(self, expression, type_) -> None: ... + def get_children(self, **kwargs): ... + +class TypeCoerce(ColumnElement): + __visit_name__ = ... # type: str + type = ... # type: Any + clause = ... # type: Any + def __init__(self, expression, type_) -> None: ... + def get_children(self, **kwargs): ... + @property + def typed_expression(self): ... + +class Extract(ColumnElement): + __visit_name__ = ... # type: str + type = ... # type: Any + field = ... # type: Any + expr = ... # type: Any + def __init__(self, field, expr, **kwargs) -> None: ... + def get_children(self, **kwargs): ... + +class _label_reference(ColumnElement): + __visit_name__ = ... # type: str + element = ... # type: Any + def __init__(self, element) -> None: ... + +class _textual_label_reference(ColumnElement): + __visit_name__ = ... # type: str + element = ... # type: Any + def __init__(self, element) -> None: ... + +class UnaryExpression(ColumnElement): + __visit_name__ = ... # type: str + operator = ... # type: Any + modifier = ... # type: Any + element = ... # type: Any + type = ... # type: Any + negate = ... # type: Any + wraps_column_expression = ... # type: Any + def __init__(self, element, operator: Optional[Any] = ..., modifier: Optional[Any] = ..., type_: Optional[Any] = ..., negate: Optional[Any] = ..., wraps_column_expression: bool = ...) -> None: ... + def get_children(self, **kwargs): ... + def compare(self, other, **kw): ... + def self_group(self, against: Optional[Any] = ...): ... + +class CollectionAggregate(UnaryExpression): + def operate(self, op, *other, **kwargs): ... + def reverse_operate(self, op, other, **kwargs): ... + +class AsBoolean(UnaryExpression): + element = ... # type: Any + type = ... # type: Any + operator = ... # type: Any + negate = ... # type: Any + modifier = ... # type: Any + wraps_column_expression = ... # type: bool + def __init__(self, element, operator, negate) -> None: ... + def self_group(self, against: Optional[Any] = ...): ... + +class BinaryExpression(ColumnElement): + __visit_name__ = ... # type: str + left = ... # type: Any + right = ... # type: Any + operator = ... # type: Any + type = ... # type: Any + negate = ... # type: Any + modifiers = ... # type: Any + def __init__(self, left, right, operator, type_: Optional[Any] = ..., negate: Optional[Any] = ..., modifiers: Optional[Any] = ...) -> None: ... + def __bool__(self): ... + __nonzero__ = ... # type: Any + @property + def is_comparison(self): ... + def get_children(self, **kwargs): ... + def compare(self, other, **kw): ... + def self_group(self, against: Optional[Any] = ...): ... + +class Slice(ColumnElement): + __visit_name__ = ... # type: str + start = ... # type: Any + stop = ... # type: Any + step = ... # type: Any + type = ... # type: Any + def __init__(self, start, stop, step) -> None: ... + def self_group(self, against: Optional[Any] = ...): ... + +class IndexExpression(BinaryExpression): ... + +class Grouping(ColumnElement): + __visit_name__ = ... # type: str + element = ... # type: Any + type = ... # type: Any + def __init__(self, element) -> None: ... + def self_group(self, against: Optional[Any] = ...): ... + def get_children(self, **kwargs): ... + def __getattr__(self, attr): ... + def compare(self, other, **kw): ... + +RANGE_UNBOUNDED = ... # type: Any +RANGE_CURRENT = ... # type: Any + +class Over(ColumnElement): + __visit_name__ = ... # type: str + order_by = ... # type: Any + partition_by = ... # type: Any + element = ... # type: Any + range_ = ... # type: Any + rows = ... # type: Any + def __init__(self, element, partition_by: Optional[Any] = ..., order_by: Optional[Any] = ..., range_: Optional[Any] = ..., rows: Optional[Any] = ...) -> None: ... + @property + def func(self): ... + @property + def type(self): ... + def get_children(self, **kwargs): ... + +class WithinGroup(ColumnElement): + __visit_name__ = ... # type: str + order_by = ... # type: Any + element = ... # type: Any + def __init__(self, element, *order_by) -> None: ... + def over(self, partition_by: Optional[Any] = ..., order_by: Optional[Any] = ...): ... + @property + def type(self): ... + def get_children(self, **kwargs): ... + +class FunctionFilter(ColumnElement): + __visit_name__ = ... # type: str + criterion = ... # type: Any + func = ... # type: Any + def __init__(self, func, *criterion) -> None: ... + def filter(self, *criterion): ... + def over(self, partition_by: Optional[Any] = ..., order_by: Optional[Any] = ...): ... + @property + def type(self): ... + def get_children(self, **kwargs): ... + +class Label(ColumnElement): + __visit_name__ = ... # type: str + name = ... # type: Any + key = ... # type: Any + def __init__(self, name, element, type_: Optional[Any] = ...) -> None: ... + def __reduce__(self): ... + @property + def type(self): ... + @property + def element(self): ... + def self_group(self, against: Optional[Any] = ...): ... + @property + def primary_key(self): ... + @property + def foreign_keys(self): ... + def get_children(self, **kwargs): ... + +class ColumnClause(Immutable, ColumnElement): + __visit_name__ = ... # type: str + onupdate = ... # type: Any + default = ... # type: Any + server_default = ... # type: Any + server_onupdate = ... # type: Any + key = ... # type: Any + table = ... # type: Any + type = ... # type: Any + is_literal = ... # type: Any + def __init__(self, text, type_: Optional[Any] = ..., is_literal: bool = ..., _selectable: Optional[Any] = ...) -> None: ... + @property + def description(self): ... + +class _IdentifiedClause(Executable, ClauseElement): + __visit_name__ = ... # type: str + ident = ... # type: Any + def __init__(self, ident) -> None: ... + +class SavepointClause(_IdentifiedClause): + __visit_name__ = ... # type: str + +class RollbackToSavepointClause(_IdentifiedClause): + __visit_name__ = ... # type: str + +class ReleaseSavepointClause(_IdentifiedClause): + __visit_name__ = ... # type: str + +class quoted_name(util.MemoizedSlots, util.text_type): + quote = ... # type: Any + def __new__(cls, value, quote): ... + def __reduce__(self): ... + +class _truncated_label(quoted_name): + def __new__(cls, value, quote: Optional[Any] = ...): ... + def __reduce__(self): ... + def apply_map(self, map_): ... + class conv(_truncated_label): ... -class _defer_name(_truncated_label): ... + +class _defer_name(_truncated_label): + def __new__(cls, value): ... + def __reduce__(self): ... + class _defer_none_name(_defer_name): ... -class _anonymous_label(_truncated_label): ... -class AnnotatedColumnElement(Annotated): ... - -def _clone(element, **kw): ... -def _type_from_args(args): ... -def _literal_as_binds(element, name, type_=None): ... - -def collate(expression, collation) -> BinaryExpression: ... -def between(expr, lower_bound, upper_bound, symmetric: bool=...): ... -def literal(value, type_=None) -> BindParameter: ... -def outparam(key, type_=None) -> BindParameter: ... -def type_coerce(expression, type_): ... -def not_(clause): ... -def literal_column(text, type_=None): ... + +class _anonymous_label(_truncated_label): + def __add__(self, other): ... + def __radd__(self, other): ... + def apply_map(self, map_): ... + +class AnnotatedColumnElement(Annotated): + def __init__(self, element, values) -> None: ... + @property + def name(self): ... + @property + def table(self): ... + @property + def key(self): ... + @property + def info(self): ... + @property + def anon_label(self): ... diff --git a/third_party/2and3/sqlalchemy/sql/expression.pyi b/third_party/2and3/sqlalchemy/sql/expression.pyi index 48fc3b89659a..94013f16dd32 100644 --- a/third_party/2and3/sqlalchemy/sql/expression.pyi +++ b/third_party/2and3/sqlalchemy/sql/expression.pyi @@ -1,33 +1,72 @@ -# Stubs for sqlalchemy.sql.expression (Python 2) +# Stubs for sqlalchemy.sql.expression (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -from . import functions -from . import elements -from . import base -from . import selectable -from . import dml +from .functions import func as func, modifier as modifier, Function as Function +from .elements import ( + ClauseElement as ClauseElement, + ColumnElement as ColumnElement, + BindParameter as BindParameter, + CollectionAggregate as CollectionAggregate, + UnaryExpression as UnaryExpression, + BooleanClauseList as BooleanClauseList, + Label as Label, + Cast as Cast, + Case as Case, + ColumnClause as ColumnClause, + TextClause as TextClause, + Over as Over, + Null as Null, + BinaryExpression as BinaryExpression, + Tuple as Tuple, + TypeClause as TypeClause, + Extract as Extract, + WithinGroup as WithinGroup, + TypeCoerce as TypeCoerce, + ClauseList as ClauseList, + not_ as not_, + collate as collate, + literal_column as literal_column, + between as between, + literal as literal, + outparam as outparam, + FunctionFilter as FunctionFilter, + True_ as True_, + False_ as False_, + Grouping as Grouping, +) +from .base import ColumnCollection as ColumnCollection, Generative as Generative, Executable as Executable +from .selectable import ( + Alias as Alias, + Join as Join, + Select as Select, + Selectable as Selectable, + TableClause as TableClause, + CompoundSelect as CompoundSelect, + CTE as CTE, + FromClause as FromClause, + Lateral as Lateral, + alias as alias, + subquery as subquery, + lateral as lateral, + TableSample as TableSample, + tablesample as tablesample, + ScalarSelect as ScalarSelect, + FromGrouping as FromGrouping, + Exists as Exists, + SelectBase as SelectBase, + GenerativeSelect as GenerativeSelect, + HasCTE as HasCTE, + HasPrefixes as HasPrefixes, + HasSuffixes as HasSuffixes, + TextAsFrom as TextAsFrom, +) +from .dml import Insert as Insert, Update as Update, Delete as Delete -from .visitors import Visitable - -from .elements import ClauseElement, ColumnElement,\ - BindParameter, UnaryExpression, BooleanClauseList, \ - Label, Cast, Case, ColumnClause, TextClause, Over, Null, \ - True_, False_, BinaryExpression, Tuple, TypeClause, Extract, \ - Grouping, not_, \ - collate, literal_column, between,\ - literal, outparam, type_coerce, ClauseList, FunctionFilter -from .elements import SavepointClause, RollbackToSavepointClause, \ - ReleaseSavepointClause -from .base import ColumnCollection, Generative, Executable -from .selectable import Alias, Join, Select, Selectable, TableClause, \ - CompoundSelect, CTE, FromClause, FromGrouping, SelectBase, \ - alias, GenerativeSelect, \ - subquery, HasPrefixes, HasSuffixes, Exists, ScalarSelect, TextAsFrom -from .dml import Insert, Update, Delete, UpdateBase, ValuesBase - -func = functions.func # type: functions._FunctionGenerator -modifier = functions.modifier # type: functions._FunctionGenerator +all_ = ... # type: Any +any_ = ... # type: Any and_ = ... # type: Any or_ = ... # type: Any bindparam = ... # type: Any @@ -36,6 +75,7 @@ text = ... # type: Any table = ... # type: Any column = ... # type: Any over = ... # type: Any +within_group = ... # type: Any label = ... # type: Any case = ... # type: Any cast = ... # type: Any @@ -53,15 +93,17 @@ nullslast = ... # type: Any asc = ... # type: Any desc = ... # type: Any distinct = ... # type: Any -true = ... # type: Any -false = ... # type: Any +type_coerce = ... # type: Any null = ... # type: Any join = ... # type: Any outerjoin = ... # type: Any insert = ... # type: Any update = ... # type: Any delete = ... # type: Any -funcfilter = ... # type: Any + +def false() -> False_: ... +def true() -> True_: ... +def funcfilter(func, *criterion) -> FunctionFilter: ... # old names for compatibility _Executable = Executable diff --git a/third_party/2and3/sqlalchemy/sql/functions.pyi b/third_party/2and3/sqlalchemy/sql/functions.pyi index b65645610afe..9a55026ead50 100644 --- a/third_party/2and3/sqlalchemy/sql/functions.pyi +++ b/third_party/2and3/sqlalchemy/sql/functions.pyi @@ -1,47 +1,145 @@ +# Stubs for sqlalchemy.sql.functions (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. -from .base import Executable, ColumnCollection -from .elements import ClauseList, Cast, Extract, _literal_as_binds, \ - literal_column, _type_from_args, ColumnElement, _clone,\ - Over, BindParameter, FunctionFilter -from .selectable import FromClause, Select, Alias -from .visitors import VisitableType +from typing import Any, Optional +from .base import Executable as Executable, ColumnCollection as ColumnCollection +from .elements import ClauseList as ClauseList, Cast as Cast, Extract as Extract, literal_column as literal_column, ColumnElement as ColumnElement, Over as Over, BindParameter as BindParameter, FunctionFilter as FunctionFilter, Grouping as Grouping, WithinGroup as WithinGroup +from .selectable import FromClause as FromClause, Select as Select, Alias as Alias +from . import util as sqlutil +from .visitors import VisitableType as VisitableType -class FunctionElement(Executable, ColumnElement, FromClause): ... +def register_function(identifier, fn, package: str = ...): ... + +class FunctionElement(Executable, ColumnElement, FromClause): + packagenames = ... # type: Any + clause_expr = ... # type: Any + def __init__(self, *clauses, **kwargs) -> None: ... + @property + def columns(self): ... + @property + def clauses(self): ... + def over(self, partition_by: Optional[Any] = ..., order_by: Optional[Any] = ..., rows: Optional[Any] = ..., range_: Optional[Any] = ...): ... + def within_group(self, *order_by): ... + def filter(self, *criterion): ... + def get_children(self, **kwargs): ... + def within_group_type(self, within_group): ... + def alias(self, name: Optional[Any] = ..., flat: bool = ...): ... + def select(self): ... + def scalar(self): ... + def execute(self): ... + def self_group(self, against: Optional[Any] = ...): ... class _FunctionGenerator(object): - def __init__(self, **opts): ... + opts = ... # type: Any + def __init__(self, **opts) -> None: ... def __getattr__(self, name): ... - def __call__(self, *c, **kwargs) -> Function: ... + def __call__(self, *c, **kwargs): ... + +func = ... # type: Any +modifier = ... # type: Any + +class Function(FunctionElement): + __visit_name__ = ... # type: str + packagenames = ... # type: Any + name = ... # type: Any + type = ... # type: Any + def __init__(self, name, *clauses, **kw) -> None: ... + +class _GenericMeta(VisitableType): + def __init__(cls, clsname, bases, clsdict) -> None: ... -func = ... # type: _FunctionGenerator -modifier = ... # type: _FunctionGenerator +class GenericFunction(Function, metaclass=_GenericMeta): + coerce_arguments = ... # type: bool + packagenames = ... # type: Any + clause_expr = ... # type: Any + type = ... # type: Any + def __init__(self, *args, **kwargs) -> None: ... -class Function(FunctionElement): ... +class next_value(GenericFunction): + type = ... # type: Any + name = ... # type: str + sequence = ... # type: Any + def __init__(self, seq, **kw) -> None: ... -class _GenericMeta(VisitableType): ... -# TODO: Use GenericFunction(util.with_metaclass(_GenericMeta, Function)) -class GenericFunction(_GenericMeta, Function): ... -class next_value(GenericFunction): ... +class AnsiFunction(GenericFunction): + def __init__(self, **kwargs) -> None: ... -class AnsiFunction(GenericFunction): ... -class ReturnTypeFromArgs(GenericFunction): ... +class ReturnTypeFromArgs(GenericFunction): + def __init__(self, *args, **kwargs) -> None: ... class coalesce(ReturnTypeFromArgs): ... class max(ReturnTypeFromArgs): ... class min(ReturnTypeFromArgs): ... class sum(ReturnTypeFromArgs): ... -class now(GenericFunction): ... -class concat(GenericFunction): ... -class char_length(GenericFunction): ... +class now(GenericFunction): + type = ... # type: Any + +class concat(GenericFunction): + type = ... # type: Any + +class char_length(GenericFunction): + type = ... # type: Any + def __init__(self, arg, **kwargs) -> None: ... + class random(GenericFunction): ... -class count(GenericFunction): ... -class current_date(AnsiFunction): ... -class current_time(AnsiFunction): ... -class current_timestamp(AnsiFunction): ... -class current_user(AnsiFunction): ... -class localtime(AnsiFunction): ... -class localtimestamp(AnsiFunction): ... -class session_user(AnsiFunction): ... -class sysdate(AnsiFunction): ... -class user(AnsiFunction): ... + +class count(GenericFunction): + type = ... # type: Any + def __init__(self, expression: Optional[Any] = ..., **kwargs) -> None: ... + +class current_date(AnsiFunction): + type = ... # type: Any + +class current_time(AnsiFunction): + type = ... # type: Any + +class current_timestamp(AnsiFunction): + type = ... # type: Any + +class current_user(AnsiFunction): + type = ... # type: Any + +class localtime(AnsiFunction): + type = ... # type: Any + +class localtimestamp(AnsiFunction): + type = ... # type: Any + +class session_user(AnsiFunction): + type = ... # type: Any + +class sysdate(AnsiFunction): + type = ... # type: Any + +class user(AnsiFunction): + type = ... # type: Any + +class array_agg(GenericFunction): + type = ... # type: Any + def __init__(self, *args, **kwargs) -> None: ... + +class OrderedSetAgg(GenericFunction): + array_for_multi_clause = ... # type: bool + def within_group_type(self, within_group): ... + +class mode(OrderedSetAgg): ... + +class percentile_cont(OrderedSetAgg): + array_for_multi_clause = ... # type: bool + +class percentile_disc(OrderedSetAgg): + array_for_multi_clause = ... # type: bool + +class rank(GenericFunction): + type = ... # type: Any + +class dense_rank(GenericFunction): + type = ... # type: Any + +class percent_rank(GenericFunction): + type = ... # type: Any + +class cume_dist(GenericFunction): + type = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/naming.pyi b/third_party/2and3/sqlalchemy/sql/naming.pyi index d9172c48037b..aa206490a65a 100644 --- a/third_party/2and3/sqlalchemy/sql/naming.pyi +++ b/third_party/2and3/sqlalchemy/sql/naming.pyi @@ -1 +1,14 @@ -class ConventionDict(object): ... +# Stubs for sqlalchemy.sql.naming (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .schema import Constraint as Constraint, ForeignKeyConstraint as ForeignKeyConstraint, PrimaryKeyConstraint as PrimaryKeyConstraint, UniqueConstraint as UniqueConstraint, CheckConstraint as CheckConstraint, Index as Index, Table as Table, Column as Column +from .elements import _truncated_label as _truncated_label, _defer_name as _defer_name, _defer_none_name as _defer_none_name, conv as conv + +class ConventionDict(object): + const = ... # type: Any + table = ... # type: Any + convention = ... # type: Any + def __init__(self, const, table, convention) -> None: ... + def __getitem__(self, key): ... diff --git a/third_party/2and3/sqlalchemy/sql/operators.pyi b/third_party/2and3/sqlalchemy/sql/operators.pyi index 5ae39cd502c5..8f0990383b35 100644 --- a/third_party/2and3/sqlalchemy/sql/operators.pyi +++ b/third_party/2and3/sqlalchemy/sql/operators.pyi @@ -1,23 +1,65 @@ -from typing import Any, AnyStr, Callable +# Stubs for sqlalchemy.sql.operators (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +import sys +from typing import Any, Optional + +from operator import ( + and_ as and_, or_ as or_, inv as inv, add as add, mul as mul, sub as sub, mod as mod, truediv as truediv, lt as lt, le as le, ne as ne, gt as gt, ge as ge, eq as eq, neg as neg, + getitem as getitem, lshift as lshift, rshift as rshift, contains as contains +) + +if sys.version_info < (3, 0): + from operator import div as div +else: + div = truediv class Operators(object): - def op(self, opstring: AnyStr, precedence: int, is_comparison: bool): ... - def operate(self, op: Callable[[Any], Any], *other, **kwargs): ... - def reverse_operator(self, op: Callable[[Any], Any], *other, **kwargs): ... def __and__(self, other): ... def __or__(self, other): ... def __invert__(self): ... + def op(self, opstring, precedence: int = ..., is_comparison: bool = ...): ... + def operate(self, op, *other, **kwargs): ... + def reverse_operate(self, op, other, **kwargs): ... +class custom_op(object): + __name__ = ... # type: str + opstring = ... # type: Any + precedence = ... # type: Any + is_comparison = ... # type: Any + natural_self_precedent = ... # type: Any + eager_grouping = ... # type: Any + def __init__(self, opstring, precedence: int = ..., is_comparison: bool = ..., natural_self_precedent: bool = ..., eager_grouping: bool = ...) -> None: ... + def __eq__(self, other): ... + def __hash__(self): ... + def __call__(self, left, right, **kw): ... class ColumnOperators(Operators): + timetuple = ... # type: Any + def __lt__(self, other): ... + def __le__(self, other): ... + __hash__ = ... # type: Any + def __eq__(self, other): ... + def __ne__(self, other): ... + def is_distinct_from(self, other): ... + def isnot_distinct_from(self, other): ... + def __gt__(self, other): ... + def __ge__(self, other): ... + def __neg__(self): ... + def __contains__(self, other): ... + def __getitem__(self, index): ... + def __lshift__(self, other): ... + def __rshift__(self, other): ... def concat(self, other): ... - def like(self, other, escape=None): ... - def ilike(self, other, escape=None): ... - def notlike(self, other, escape=None): ... - def notilike(self, other, escape=None): ... + def like(self, other, escape: Optional[Any] = ...): ... + def ilike(self, other, escape: Optional[Any] = ...): ... def in_(self, other): ... def notin_(self, other): ... + def notlike(self, other, escape: Optional[Any] = ...): ... + def notilike(self, other, escape: Optional[Any] = ...): ... def is_(self, other): ... + def isnot(self, other): ... def startswith(self, other, **kwargs): ... def endswith(self, other, **kwargs): ... def contains(self, other, **kwargs): ... @@ -27,25 +69,15 @@ class ColumnOperators(Operators): def nullsfirst(self): ... def nullslast(self): ... def collate(self, collation): ... - def between(self, cleft, cright, symmetric: bool = ...): ... - def distinct(self): ... - - def __lt__(self, other): ... - def __le__(self, other): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - def __gt__(self, other): ... - def __ge__(self, other): ... - def __neg__(self, other): ... - def __getitem__(self, index): ... - def __lshift__(self, other): ... - def __rshift__(self, other): ... - def __radd__(self, other): ... def __rsub__(self, other): ... def __rmul__(self, other): ... def __rdiv__(self, other): ... def __rmod__(self, other): ... + def between(self, cleft, cright, symmetric: bool = ...): ... + def distinct(self): ... + def any_(self): ... + def all_(self): ... def __add__(self, other): ... def __sub__(self, other): ... def __mul__(self, other): ... @@ -59,41 +91,42 @@ def as_(): ... def exists(): ... def istrue(a): ... def isfalse(a): ... +def is_distinct_from(a, b): ... +def isnot_distinct_from(a, b): ... def is_(a, b): ... def isnot(a, b): ... def collate(a, b): ... def op(a, opstring, b): ... - -def like_op(a, b, escape=None): ... -def notlike_op(a, b, escape=None): ... -def ilike_op(a, b, escape=None): ... -def notilike_op(a, b, escape=None): ... -def between_op(a, b, symmetric: bool): ... -def notbetween_(a, b, symmetric: bool): ... - +def like_op(a, b, escape: Optional[Any] = ...): ... +def notlike_op(a, b, escape: Optional[Any] = ...): ... +def ilike_op(a, b, escape: Optional[Any] = ...): ... +def notilike_op(a, b, escape: Optional[Any] = ...): ... +def between_op(a, b, c, symmetric: bool = ...): ... +def notbetween_op(a, b, c, symmetric: bool = ...): ... def in_op(a, b): ... def notin_op(a, b): ... def distinct_op(a): ... - -def startswith_op(a, b, escape=None): ... -def notstartswith_op(a, b, escape=None): ... -def endswith_op(a, b, escape=None): ... -def notendswith_op(a, b, escape=None): ... -def contains_op(a, b, escape=None): ... -def notcontains_op(a, b, escape=None): ... - +def any_op(a): ... +def all_op(a): ... +def startswith_op(a, b, escape: Optional[Any] = ...): ... +def notstartswith_op(a, b, escape: Optional[Any] = ...): ... +def endswith_op(a, b, escape: Optional[Any] = ...): ... +def notendswith_op(a, b, escape: Optional[Any] = ...): ... +def contains_op(a, b, escape: Optional[Any] = ...): ... +def notcontains_op(a, b, escape: Optional[Any] = ...): ... def match_op(a, b, **kw): ... def notmatch_op(a, b, **kw): ... - def comma_op(a, b): ... def concat_op(a, b): ... - def desc_op(a): ... def asc_op(a): ... def nullsfirst_op(a): ... def nullslast_op(a): ... - +def json_getitem_op(a, b): ... +def json_path_getitem_op(a, b): ... def is_comparison(op): ... def is_commutative(op): ... -def is_ordering_modified(op): ... +def is_ordering_modifier(op): ... +def is_natural_self_precedent(op): ... +def mirror(op): ... def is_precedent(operator, against): ... diff --git a/third_party/2and3/sqlalchemy/sql/schema.pyi b/third_party/2and3/sqlalchemy/sql/schema.pyi index a0f4b576db9a..a71805898611 100644 --- a/third_party/2and3/sqlalchemy/sql/schema.pyi +++ b/third_party/2and3/sqlalchemy/sql/schema.pyi @@ -1,126 +1,264 @@ -from typing import Any, AnyStr, Set - -from .base import SchemaEventTarget, DialectKWArgs -from .base import ColumnCollection -from .elements import ClauseElement, ColumnClause, TextClause, \ - ColumnElement -from .selectable import TableClause +# Stubs for sqlalchemy.sql.schema (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. +from typing import Any, Optional, Set from . import visitors +from .base import SchemaEventTarget as SchemaEventTarget, DialectKWArgs as DialectKWArgs +from .base import ColumnCollection as ColumnCollection +from .elements import ClauseElement as ClauseElement, ColumnClause as ColumnClause, TextClause as TextClause, ColumnElement as ColumnElement, quoted_name as quoted_name +from .selectable import TableClause as TableClause + +RETAIN_SCHEMA = ... # type: Any +BLANK_SCHEMA = ... # type: Any class SchemaItem(SchemaEventTarget, visitors.Visitable): - def _execute_on_connection(self, connection, multiparams, params): ... - @property - def info(self): ... + __visit_name__ = ... # type: str + def get_children(self, **kwargs): ... @property def quote(self): ... - def get_children(self, **kwargs): ... - def _init_items(self, *args): ... - def _schema_item_copy(self, schema_item): ... - def __repr__(self): ... - + @property + def info(self): ... class Table(DialectKWArgs, SchemaItem, TableClause): - def __init__(self, name, metadata, *args, **kwargs): ... + __visit_name__: str + metadata: Any + schema: Any + indexes: Set[Any] + constraints: Set[Any] + foreign_keys: Set[Any] + fullname: str + implicit_returning: bool + comment: Any + def __new__(cls, *args, **kw): ... + @property + def quote_schema(self): ... + def __init__(self, *args, **kw) -> None: ... + @property + def foreign_key_constraints(self): ... @property def key(self): ... @property - def primary_key(self): ... - def __repr__(self): ... - def __str__(self): ... + def bind(self): ... + def add_is_dependent_on(self, table): ... def append_column(self, column): ... def append_constraint(self, constraint): ... - def append_ddl_listener(self, event, listener): ... - def get_children(self, column_collections=True, schema_visitor=False, **kwargs): ... - def exists(self, bind=None): ... - def create(self, bind=None, checkfirst=False): ... - def drop(self, bind=None, checkfirst=False): ... - def tometadata(self, metadata, schema=None): ... - c = ... # type: ColumnCollection - constraints = ... # type: Set[Constraint] - + def append_ddl_listener(self, event_name, listener): ... + def get_children(self, column_collections: bool = ..., schema_visitor: bool = ..., **kw): ... + def exists(self, bind: Optional[Any] = ...): ... + def create(self, bind: Optional[Any] = ..., checkfirst: bool = ...): ... + def drop(self, bind: Optional[Any] = ..., checkfirst: bool = ...): ... + def tometadata(self, metadata, schema: Any = ..., referred_schema_fn: Optional[Any] = ..., name: Optional[Any] = ...): ... class Column(SchemaItem, ColumnClause): + __visit_name__ = ... # type: str + key = ... # type: Any primary_key = ... # type: Any - def __init__(self, *args, **kwargs): ... + nullable = ... # type: Any + default = ... # type: Any + server_default = ... # type: Any + server_onupdate = ... # type: Any + index = ... # type: Any + unique = ... # type: Any + system = ... # type: Any + doc = ... # type: Any + onupdate = ... # type: Any + autoincrement = ... # type: Any + constraints = ... # type: Any + foreign_keys = ... # type: Any + info = ... # type: Any + def __init__(self, *args, **kwargs) -> None: ... def references(self, column): ... def append_foreign_key(self, fk): ... - def __repr__(self): ... - def _set_parent(self, table): ... - def _setup_on_memoized_fks(self, fn): ... - def _on_table_attach(self, fn): ... def copy(self, **kw): ... - def _make_proxy(self, selectable, name=None, key=None, - name_is_truncatable=False, **kw): ... - def get_children(self, schema_visitor=False, **kwargs): ... - + def get_children(self, schema_visitor: bool = ..., **kwargs): ... class ForeignKey(DialectKWArgs, SchemaItem): - def __init__(self, column, _constraint=None, use_alter=False, name=None, - onupdate=None, ondelete=None, deferrable=None, - initially=None, link_to_name=False, match=None, - info=None, **dialect_kw) -> None: ... - def __repr__(self): ... - def copy(self, schema=None): ... - def _get_colspec(self, schema=None, table_name=None): ... - @property - def _referred_schema(self): ... - def _table_key(self): ... + __visit_name__ = ... # type: str + constraint = ... # type: Any + parent = ... # type: Any + use_alter = ... # type: Any + name = ... # type: Any + onupdate = ... # type: Any + ondelete = ... # type: Any + deferrable = ... # type: Any + initially = ... # type: Any + link_to_name = ... # type: Any + match = ... # type: Any + info = ... # type: Any + def __init__(self, column, _constraint: Optional[Any] = ..., use_alter: bool = ..., name: Optional[Any] = ..., onupdate: Optional[Any] = ..., ondelete: Optional[Any] = ..., deferrable: Optional[Any] = ..., initially: Optional[Any] = ..., link_to_name: bool = ..., match: Optional[Any] = ..., info: Optional[Any] = ..., **dialect_kw) -> None: ... + def copy(self, schema: Optional[Any] = ...): ... + target_fullname = ... # type: Any def references(self, table): ... def get_referent(self, table): ... @property - def _column_tokens(self): ... - def _resolve_col_tokens(self): ... - def _link_to_col_by_colstring(self, parenttable, table, colname): ... - def _set_target_column(self, column): ... - @property def column(self): ... - def _set_parent(self, column): ... - def _set_remote_table(self, table): ... - def _remove_from_metadata(self, metadata): ... - def _set_table(self, column, table): ... - -class _NotAColumnExpr(object): ... -class DefaultGenerator(_NotAColumnExpr, SchemaItem): ... -class ColumnDefault(DefaultGenerator): ... -class Sequence(DefaultGenerator): ... -class FetchedValue(_NotAColumnExpr, SchemaEventTarget): ... -class DefaultClause(FetchedValue): ... -class PassiveDefault(DefaultClause): ... + +class _NotAColumnExpr(object): + __clause_element__ = ... # type: Any + self_group = ... # type: Any + +class DefaultGenerator(_NotAColumnExpr, SchemaItem): + __visit_name__ = ... # type: str + is_sequence = ... # type: bool + is_server_default = ... # type: bool + column = ... # type: Any + for_update = ... # type: Any + def __init__(self, for_update: bool = ...) -> None: ... + def execute(self, bind: Optional[Any] = ..., **kwargs): ... + @property + def bind(self): ... + +class ColumnDefault(DefaultGenerator): + arg = ... # type: Any + def __init__(self, arg, **kwargs) -> None: ... + @property + def is_callable(self): ... + @property + def is_clause_element(self): ... + @property + def is_scalar(self): ... + __visit_name__ = ... # type: Any + +class Sequence(DefaultGenerator): + __visit_name__ = ... # type: str + is_sequence = ... # type: bool + name = ... # type: Any + start = ... # type: Any + increment = ... # type: Any + minvalue = ... # type: Any + maxvalue = ... # type: Any + nominvalue = ... # type: Any + nomaxvalue = ... # type: Any + cycle = ... # type: Any + optional = ... # type: Any + schema = ... # type: Any + metadata = ... # type: Any + def __init__(self, name, start: Optional[Any] = ..., increment: Optional[Any] = ..., minvalue: Optional[Any] = ..., maxvalue: Optional[Any] = ..., nominvalue: Optional[Any] = ..., nomaxvalue: Optional[Any] = ..., cycle: Optional[Any] = ..., schema: Optional[Any] = ..., optional: bool = ..., quote: Optional[Any] = ..., metadata: Optional[Any] = ..., quote_schema: Optional[Any] = ..., for_update: bool = ...) -> None: ... + @property + def is_callable(self): ... + @property + def is_clause_element(self): ... + def next_value(self): ... + @property + def bind(self): ... + def create(self, bind: Optional[Any] = ..., checkfirst: bool = ...): ... + def drop(self, bind: Optional[Any] = ..., checkfirst: bool = ...): ... + +class FetchedValue(_NotAColumnExpr, SchemaEventTarget): + is_server_default = ... # type: bool + reflected = ... # type: bool + has_argument = ... # type: bool + for_update = ... # type: Any + def __init__(self, for_update: bool = ...) -> None: ... + +class DefaultClause(FetchedValue): + has_argument = ... # type: bool + arg = ... # type: Any + reflected = ... # type: Any + def __init__(self, arg, for_update: bool = ..., _reflected: bool = ...) -> None: ... + +class PassiveDefault(DefaultClause): + def __init__(self, *arg, **kw) -> None: ... class Constraint(DialectKWArgs, SchemaItem): - def __init__(self, name=None, deferrable=None, initially=None): ... - def __contains__(self, x): ... - def contains_column(self, col): ... - def keys(self): ... - def __add__(self, other): ... - def __iter__(self): ... - def __len__(self): ... + __visit_name__ = ... # type: str + name = ... # type: Any + deferrable = ... # type: Any + initially = ... # type: Any + info = ... # type: Any + def __init__(self, name: Optional[Any] = ..., deferrable: Optional[Any] = ..., initially: Optional[Any] = ..., _create_rule: Optional[Any] = ..., info: Optional[Any] = ..., _type_bound: bool = ..., **dialect_kw) -> None: ... + @property + def table(self): ... def copy(self, **kw): ... class ColumnCollectionMixin(object): columns = ... # type: Any - def __init__(self, *columns, **kw): ... - @classmethod - def _extract_col_expression_collection(cls, expressions): ... - def _check_attach(self, evt=False): ... - def _set_parent(self, table): ... + def __init__(self, *columns, **kw) -> None: ... class ColumnCollectionConstraint(ColumnCollectionMixin, Constraint): - def __init__(self, *columns, **kw): ... - def _set_parent(self, table): ... + def __init__(self, *columns, **kw) -> None: ... def __contains__(self, x): ... def copy(self, **kw): ... def contains_column(self, col): ... def __iter__(self): ... def __len__(self): ... -class CheckConstraint(ColumnCollectionConstraint): ... -class ForeignKeyConstraint(ColumnCollectionConstraint): ... -class PrimaryKeyConstraint(ColumnCollectionConstraint): ... -class UniqueConstraint(ColumnCollectionConstraint): ... -class Index(DialectKWArgs, ColumnCollectionMixin, SchemaItem): ... -class MetaData(SchemaItem): ... -class ThreadLocalMetaData(MetaData): ... +class CheckConstraint(ColumnCollectionConstraint): + sqltext = ... # type: Any + def __init__(self, sqltext, name: Optional[Any] = ..., deferrable: Optional[Any] = ..., initially: Optional[Any] = ..., table: Optional[Any] = ..., info: Optional[Any] = ..., _create_rule: Optional[Any] = ..., _autoattach: bool = ..., _type_bound: bool = ...) -> None: ... + __visit_name__ = ... # type: Any + def copy(self, target_table: Optional[Any] = ..., **kw): ... + +class ForeignKeyConstraint(ColumnCollectionConstraint): + __visit_name__ = ... # type: str + onupdate = ... # type: Any + ondelete = ... # type: Any + link_to_name = ... # type: Any + use_alter = ... # type: Any + match = ... # type: Any + elements = ... # type: Any + def __init__(self, columns, refcolumns, name: Optional[Any] = ..., onupdate: Optional[Any] = ..., ondelete: Optional[Any] = ..., deferrable: Optional[Any] = ..., initially: Optional[Any] = ..., use_alter: bool = ..., link_to_name: bool = ..., match: Optional[Any] = ..., table: Optional[Any] = ..., info: Optional[Any] = ..., **dialect_kw) -> None: ... + @property + def referred_table(self): ... + @property + def column_keys(self): ... + def copy(self, schema: Optional[Any] = ..., target_table: Optional[Any] = ..., **kw): ... + +class PrimaryKeyConstraint(ColumnCollectionConstraint): + __visit_name__ = ... # type: str + def __init__(self, *columns, **kw) -> None: ... + @property + def columns_autoinc_first(self): ... + +class UniqueConstraint(ColumnCollectionConstraint): + __visit_name__ = ... # type: str + +class Index(DialectKWArgs, ColumnCollectionMixin, SchemaItem): + __visit_name__ = ... # type: str + table = ... # type: Any + expressions = ... # type: Any + name = ... # type: Any + unique = ... # type: Any + info = ... # type: Any + def __init__(self, name, *expressions, **kw) -> None: ... + @property + def bind(self): ... + def create(self, bind: Optional[Any] = ...): ... + def drop(self, bind: Optional[Any] = ...): ... + +DEFAULT_NAMING_CONVENTION = ... # type: Any + +class MetaData(SchemaItem): + __visit_name__ = ... # type: str + tables = ... # type: Any + schema = ... # type: Any + naming_convention = ... # type: Any + info = ... # type: Any + def __init__(self, bind: Optional[Any] = ..., reflect: bool = ..., schema: Optional[Any] = ..., quote_schema: Optional[Any] = ..., naming_convention: Any = ..., info: Optional[Any] = ...) -> None: ... + def __contains__(self, table_or_key): ... + def is_bound(self): ... + def bind(self): ... + def clear(self): ... + def remove(self, table): ... + @property + def sorted_tables(self): ... + def reflect(self, bind: Optional[Any] = ..., schema: Optional[Any] = ..., views: bool = ..., only: Optional[Any] = ..., extend_existing: bool = ..., autoload_replace: bool = ..., **dialect_kwargs): ... + def append_ddl_listener(self, event_name, listener): ... + def create_all(self, bind: Optional[Any] = ..., tables: Optional[Any] = ..., checkfirst: bool = ...): ... + def drop_all(self, bind: Optional[Any] = ..., tables: Optional[Any] = ..., checkfirst: bool = ...): ... + +class ThreadLocalMetaData(MetaData): + __visit_name__ = ... # type: str + context = ... # type: Any + def __init__(self) -> None: ... + def bind(self): ... + def is_bound(self): ... + def dispose(self): ... -def _get_table_key(name: AnyStr, schema: AnyStr): ... +class _SchemaTranslateMap(object): + map_ = ... # type: Any + __call__ = ... # type: Any + hash_key = ... # type: Any + is_default = ... # type: bool + def __init__(self, map_) -> None: ... diff --git a/third_party/2and3/sqlalchemy/sql/selectable.pyi b/third_party/2and3/sqlalchemy/sql/selectable.pyi index b12feb47eaa4..7fcd104e5b1a 100644 --- a/third_party/2and3/sqlalchemy/sql/selectable.pyi +++ b/third_party/2and3/sqlalchemy/sql/selectable.pyi @@ -1,17 +1,23 @@ -from typing import Any +# Stubs for sqlalchemy.sql.selectable (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. -from .base import Immutable, Executable, \ - ColumnCollection, ColumnSet, Generative -from .elements import ClauseElement, TextClause, ClauseList, \ - Grouping, UnaryExpression, BindParameter -from .annotation import Annotated -from .visitors import Visitable -from .. import util +from typing import Any, Optional +from .elements import ClauseElement as ClauseElement, TextClause as TextClause, ClauseList as ClauseList, and_ as and_, Grouping as Grouping, UnaryExpression as UnaryExpression, literal_column as literal_column, BindParameter as BindParameter +from .base import Immutable as Immutable, Executable as Executable, ColumnCollection as ColumnCollection, ColumnSet as ColumnSet, Generative as Generative +from .annotation import Annotated as Annotated + +class _OffsetLimitParam(BindParameter): ... def subquery(alias, *args, **kwargs): ... -def alias(selectable, name=..., flat: bool=...): ... +def alias(selectable, name: Optional[Any] = ..., flat: bool = ...): ... +def lateral(selectable, name: Optional[Any] = ...): ... +def tablesample(selectable, sampling, name: Optional[Any] = ..., seed: Optional[Any] = ...): ... class Selectable(ClauseElement): + __visit_name__ = ... # type: str + is_selectable = ... # type: bool + @property def selectable(self): ... class HasPrefixes(object): @@ -21,62 +27,230 @@ class HasSuffixes(object): def suffix_with(self, *expr, **kw): ... class FromClause(Selectable): - def count(self, functions, whereclause=None, **params): ... - def select(self, whereclause=None, **params): ... - def join(self, right, onclause=None, isouter: bool=False): ... - def outerjoin(self, right, onclause=None): ... - def alias(self, name=None, flat: bool=False): ... + __visit_name__ = ... # type: str + named_with_column = ... # type: bool + schema = ... # type: Any + def count(self, whereclause: Optional[Any] = ..., **params): ... + def select(self, whereclause: Optional[Any] = ..., **params): ... + def join(self, right, onclause: Optional[Any] = ..., isouter: bool = ..., full: bool = ...): ... + def outerjoin(self, right, onclause: Optional[Any] = ..., full: bool = ...): ... + def alias(self, name: Optional[Any] = ..., flat: bool = ...): ... + def lateral(self, name: Optional[Any] = ...): ... + def tablesample(self, sampling, name: Optional[Any] = ..., seed: Optional[Any] = ...): ... def is_derived_from(self, fromclause): ... - def _is_lexical_equivalent(self, other): ... - def replace_selectable(self, sqlutil, old, alias): ... + def replace_selectable(self, old, alias): ... def correspond_on_equivalents(self, column, equivalents): ... - def corresponding_column(self, column, require_embedded: bool=False): ... + def corresponding_column(self, column, require_embedded: bool = ...): ... @property def description(self): ... - def _reset_exported(self): ... @property def columns(self): ... @property - def primary_key(self) -> Any: ... + def primary_key(self): ... @property - def foreign_keys(self) -> Any: ... - def _init_collections(self): ... + def foreign_keys(self): ... + c = ... # type: Any + +class Join(FromClause): + __visit_name__ = ... # type: str + left = ... # type: Any + right = ... # type: Any + onclause = ... # type: Any + isouter = ... # type: Any + full = ... # type: Any + def __init__(self, left, right, onclause: Optional[Any] = ..., isouter: bool = ..., full: bool = ...) -> None: ... + @property + def description(self): ... + def is_derived_from(self, fromclause): ... + def self_group(self, against: Optional[Any] = ...): ... + def get_children(self, **kwargs): ... + def select(self, whereclause: Optional[Any] = ..., **kwargs): ... @property - def _cols_populated(self): ... - def _populate_column_collection(self): ... - def _refresh_for_new_column(self, column): ... + def bind(self): ... + def alias(self, *args, **kwargs): ... -class Join(FromClause): ... -class Alias(FromClause): ... -class CTE(Generative, HasSuffixes, Alias): ... -class FromGrouping(FromClause): ... +class Alias(FromClause): + __visit_name__ = ... # type: str + named_with_column = ... # type: bool + original = ... # type: Any + supports_execution = ... # type: Any + element = ... # type: Any + name = ... # type: Any + def __init__(self, selectable, name: Optional[Any] = ...) -> None: ... + def self_group(self, target: Optional[Any] = ...): ... + @property + def description(self): ... + def as_scalar(self): ... + def is_derived_from(self, fromclause): ... + def get_children(self, column_collections: bool = ..., **kw): ... + @property + def bind(self): ... + +class Lateral(Alias): + __visit_name__ = ... # type: str + +class TableSample(Alias): + __visit_name__ = ... # type: str + sampling = ... # type: Any + seed = ... # type: Any + def __init__(self, selectable, sampling, name: Optional[Any] = ..., seed: Optional[Any] = ...) -> None: ... + +class CTE(Generative, HasSuffixes, Alias): + __visit_name__ = ... # type: str + recursive = ... # type: Any + def __init__(self, selectable, name: Optional[Any] = ..., recursive: bool = ..., _cte_alias: Optional[Any] = ..., _restates: Any = ..., _suffixes: Optional[Any] = ...) -> None: ... + def alias(self, name: Optional[Any] = ..., flat: bool = ...): ... + def union(self, other): ... + def union_all(self, other): ... + +class HasCTE(object): + def cte(self, name: Optional[Any] = ..., recursive: bool = ...): ... + +class FromGrouping(FromClause): + __visit_name__ = ... # type: str + element = ... # type: Any + def __init__(self, element) -> None: ... + @property + def columns(self): ... + @property + def primary_key(self): ... + @property + def foreign_keys(self): ... + def is_derived_from(self, element): ... + def alias(self, **kw): ... + def get_children(self, **kwargs): ... + def __getattr__(self, attr): ... class TableClause(Immutable, FromClause): - def __init__(self, name, *columns): ... - def _export_columns(self): ... - @util.memoized_property + __visit_name__ = ... # type: str + named_with_column = ... # type: bool + implicit_returning = ... # type: bool + name = ... # type: Any + primary_key = ... # type: Any + foreign_keys = ... # type: Any + def __init__(self, name, *columns) -> None: ... + @property def description(self): ... def append_column(self, c): ... def get_children(self, **kwargs): ... - def count(self, whereclause=None, **params): ... - def insert(self, values=None, inline=False, **kwargs): ... - def update(self, whereclause=None, values=None, inline=False, **kwargs): ... - def delete(self, whereclause=None, **kwargs): ... + def insert(self, values: Optional[Any] = ..., inline: bool = ..., **kwargs): ... + def update(self, whereclause: Optional[Any] = ..., values: Optional[Any] = ..., inline: bool = ..., **kwargs): ... + def delete(self, whereclause: Optional[Any] = ..., **kwargs): ... + +class ForUpdateArg(ClauseElement): + @classmethod + def parse_legacy_select(self, arg): ... + @property + def legacy_for_update_value(self): ... + nowait = ... # type: Any + read = ... # type: Any + skip_locked = ... # type: Any + key_share = ... # type: Any + of = ... # type: Any + def __init__(self, nowait: bool = ..., read: bool = ..., of: Optional[Any] = ..., skip_locked: bool = ..., key_share: bool = ...) -> None: ... + +class SelectBase(HasCTE, Executable, FromClause): + def as_scalar(self): ... + def label(self, name): ... + def autocommit(self): ... + +class GenerativeSelect(SelectBase): + use_labels = ... # type: Any + def __init__(self, use_labels: bool = ..., for_update: bool = ..., limit: Optional[Any] = ..., offset: Optional[Any] = ..., order_by: Optional[Any] = ..., group_by: Optional[Any] = ..., bind: Optional[Any] = ..., autocommit: Optional[Any] = ...) -> None: ... @property - def _from_objects(self): ... + def for_update(self): ... + @for_update.setter + def for_update(self, value): ... + def with_for_update(self, nowait: bool = ..., read: bool = ..., of: Optional[Any] = ..., skip_locked: bool = ..., key_share: bool = ...): ... + def apply_labels(self): ... + def limit(self, limit): ... + def offset(self, offset): ... + def order_by(self, *clauses): ... + def group_by(self, *clauses): ... + def append_order_by(self, *clauses): ... + def append_group_by(self, *clauses): ... -class ForUpdateArg(ClauseElement): ... -class SelectBase(Executable, FromClause): ... -class GenerativeSelect(SelectBase): ... -class CompoundSelect(GenerativeSelect): ... +class CompoundSelect(GenerativeSelect): + __visit_name__ = ... # type: str + UNION = ... # type: Any + UNION_ALL = ... # type: Any + EXCEPT = ... # type: Any + EXCEPT_ALL = ... # type: Any + INTERSECT = ... # type: Any + INTERSECT_ALL = ... # type: Any + keyword = ... # type: Any + selects = ... # type: Any + def __init__(self, keyword, *selects, **kwargs) -> None: ... + def self_group(self, against: Optional[Any] = ...): ... + def is_derived_from(self, fromclause): ... + def get_children(self, column_collections: bool = ..., **kwargs): ... + def bind(self): ... class Select(HasPrefixes, HasSuffixes, GenerativeSelect): - def where(self, whereclause) -> Select: ... - def group_by(self, *clauses) -> Select: ... - def order_by(self, *clauses) -> Select: ... - def limit(self, limit: int) -> Select: ... - -class ScalarSelect(Generative, Grouping): ... -class Exists(UnaryExpression): ... -class TextAsFrom(SelectBase): ... -class AnnotatedFromClause(Annotated): ... + __visit_name__ = ... # type: str + def __init__(self, columns: Optional[Any] = ..., whereclause: Optional[Any] = ..., from_obj: Optional[Any] = ..., distinct: bool = ..., having: Optional[Any] = ..., correlate: bool = ..., prefixes: Optional[Any] = ..., suffixes: Optional[Any] = ..., **kwargs) -> None: ... + @property + def froms(self): ... + def with_statement_hint(self, text, dialect_name: str = ...): ... + def with_hint(self, selectable, text, dialect_name: str = ...): ... + @property + def type(self): ... + @property + def locate_all_froms(self): ... + @property + def inner_columns(self): ... + def is_derived_from(self, fromclause): ... + def get_children(self, column_collections: bool = ..., **kwargs): ... + def column(self, column): ... + def reduce_columns(self, only_synonyms: bool = ...): ... + def with_only_columns(self, columns): ... + def where(self, whereclause): ... + def having(self, having): ... + def distinct(self, *expr): ... + def select_from(self, fromclause): ... + def correlate(self, *fromclauses): ... + def correlate_except(self, *fromclauses): ... + def append_correlation(self, fromclause): ... + def append_column(self, column): ... + def append_prefix(self, clause): ... + def append_whereclause(self, whereclause): ... + def append_having(self, having): ... + def append_from(self, fromclause): ... + def self_group(self, against: Optional[Any] = ...): ... + def union(self, other, **kwargs): ... + def union_all(self, other, **kwargs): ... + def except_(self, other, **kwargs): ... + def except_all(self, other, **kwargs): ... + def intersect(self, other, **kwargs): ... + def intersect_all(self, other, **kwargs): ... + def bind(self): ... + +class ScalarSelect(Generative, Grouping): + element = ... # type: Any + type = ... # type: Any + def __init__(self, element) -> None: ... + @property + def columns(self): ... + c = ... # type: Any + def where(self, crit): ... + def self_group(self, **kwargs): ... + +class Exists(UnaryExpression): + __visit_name__ = ... # type: Any + def __init__(self, *args, **kwargs) -> None: ... + def select(self, whereclause: Optional[Any] = ..., **params): ... + def correlate(self, *fromclause): ... + def correlate_except(self, *fromclause): ... + def select_from(self, clause): ... + def where(self, clause): ... + +class TextAsFrom(SelectBase): + __visit_name__ = ... # type: str + element = ... # type: Any + column_args = ... # type: Any + positional = ... # type: Any + def __init__(self, text, columns, positional: bool = ...) -> None: ... + def bindparams(self, *binds, **bind_as_values): ... + +class AnnotatedFromClause(Annotated): + def __init__(self, element, values) -> None: ... diff --git a/third_party/2and3/sqlalchemy/sql/sqltypes.pyi b/third_party/2and3/sqlalchemy/sql/sqltypes.pyi index 6c51ef7d813f..9cd1a2d51b28 100644 --- a/third_party/2and3/sqlalchemy/sql/sqltypes.pyi +++ b/third_party/2and3/sqlalchemy/sql/sqltypes.pyi @@ -1,57 +1,301 @@ -from .type_api import TypeEngine, TypeDecorator -from .base import SchemaEventTarget - -class _DateAffinity(object): ... -class Concatenable(object): ... -class String(TypeEngine, Concatenable): - def __init__(self, length=None, collation=None, - convert_unicode=False, - unicode_error=None, - _warn_on_bytestring=False): ... - -class Text(String): ... -class Unicode(String): ... -class UnicodeText(Text): ... -class Integer(TypeEngine, _DateAffinity): ... -class SmallInteger(Integer): ... -class BigInteger(Integer): ... -class Numeric(TypeEngine, _DateAffinity): ... -class Float(Numeric): ... -class DateTime(TypeEngine, _DateAffinity): - def __init__(self, timezone=None): ... -class Date(TypeEngine, _DateAffinity): ... -class Time(TypeEngine, _DateAffinity): ... -class _Binary(TypeEngine): ... -class LargeBinary(_Binary): ... -class Binary(LargeBinary): ... -class SchemaType(SchemaEventTarget): ... -class Enum(String, SchemaType): ... -class PickleType(TypeDecorator): ... -class Boolean(TypeEngine, SchemaType): ... -class Interval(_DateAffinity, TypeDecorator): ... - -class REAL(Float): ... -class FLOAT(Float): ... -class NUMERIC(Numeric): ... -class DECIMAL(Numeric): ... -class INTEGER(Integer): ... -# In code it's INT=INTEGER -class INT(Integer): ... -class SMALLINT(SmallInteger): ... -class BIGINT(BigInteger): ... -class TIMESTAMP(DateTime): ... -class DATETIME(DateTime): ... -class DATE(Date): ... -class TIME(Time): ... -class TEXT(Text): ... -class CLOB(Text): ... -class VARCHAR(String): ... -class NVARCHAR(Unicode): ... -class CHAR(String): ... -class NCHAR(Unicode): ... -class BLOB(LargeBinary): ... -class BINARY(_Binary): ... -class VARBINARY(_Binary): ... -class BOOLEAN(Boolean): ... -class NullType(TypeEngine): ... +# Stubs for sqlalchemy.sql.sqltypes (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .type_api import TypeEngine as TypeEngine, TypeDecorator as TypeDecorator, to_instance as to_instance +from .elements import quoted_name as quoted_name, _defer_name as _defer_name, Slice as Slice +from .elements import TypeCoerce as type_coerce +from .base import SchemaEventTarget as SchemaEventTarget +from ..util import pickle as pickle +from ..util import compat as compat + +class _DateAffinity(object): + comparator_factory = ... # type: Any + +class Concatenable(object): + comparator_factory = ... # type: Any + +class Indexable(object): + comparator_factory = ... # type: Any + +class String(Concatenable, TypeEngine): + __visit_name__ = ... # type: str + length = ... # type: Any + collation = ... # type: Any + convert_unicode = ... # type: Any + unicode_error = ... # type: Any + def __init__(self, length: Optional[Any] = ..., collation: Optional[Any] = ..., convert_unicode: bool = ..., unicode_error: Optional[Any] = ..., _warn_on_bytestring: bool = ...) -> None: ... + def literal_processor(self, dialect): ... + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + @property + def python_type(self): ... + def get_dbapi_type(self, dbapi): ... + +class Text(String): + __visit_name__ = ... # type: str + +class Unicode(String): + __visit_name__ = ... # type: str + def __init__(self, length: Optional[Any] = ..., **kwargs) -> None: ... + +class UnicodeText(Text): + __visit_name__ = ... # type: str + def __init__(self, length: Optional[Any] = ..., **kwargs) -> None: ... + +class Integer(_DateAffinity, TypeEngine): + __visit_name__ = ... # type: str + def get_dbapi_type(self, dbapi): ... + @property + def python_type(self): ... + def literal_processor(self, dialect): ... + +class SmallInteger(Integer): + __visit_name__ = ... # type: str + +class BigInteger(Integer): + __visit_name__ = ... # type: str + +class Numeric(_DateAffinity, TypeEngine): + __visit_name__ = ... # type: str + precision = ... # type: Any + scale = ... # type: Any + decimal_return_scale = ... # type: Any + asdecimal = ... # type: Any + def __init__(self, precision: Optional[Any] = ..., scale: Optional[Any] = ..., decimal_return_scale: Optional[Any] = ..., asdecimal: bool = ...) -> None: ... + def get_dbapi_type(self, dbapi): ... + def literal_processor(self, dialect): ... + @property + def python_type(self): ... + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class Float(Numeric): + __visit_name__ = ... # type: str + scale = ... # type: Any + precision = ... # type: Any + asdecimal = ... # type: Any + decimal_return_scale = ... # type: Any + def __init__(self, precision: Optional[Any] = ..., asdecimal: bool = ..., decimal_return_scale: Optional[Any] = ..., **kwargs) -> None: ... + def result_processor(self, dialect, coltype): ... + +class DateTime(_DateAffinity, TypeEngine): + __visit_name__ = ... # type: str + timezone = ... # type: Any + def __init__(self, timezone: bool = ...) -> None: ... + def get_dbapi_type(self, dbapi): ... + @property + def python_type(self): ... + +class Date(_DateAffinity, TypeEngine): + __visit_name__ = ... # type: str + def get_dbapi_type(self, dbapi): ... + @property + def python_type(self): ... + +class Time(_DateAffinity, TypeEngine): + __visit_name__ = ... # type: str + timezone = ... # type: Any + def __init__(self, timezone: bool = ...) -> None: ... + def get_dbapi_type(self, dbapi): ... + @property + def python_type(self): ... + +class _Binary(TypeEngine): + length = ... # type: Any + def __init__(self, length: Optional[Any] = ...) -> None: ... + def literal_processor(self, dialect): ... + @property + def python_type(self): ... + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + def coerce_compared_value(self, op, value): ... + def get_dbapi_type(self, dbapi): ... + +class LargeBinary(_Binary): + __visit_name__ = ... # type: str + def __init__(self, length: Optional[Any] = ...) -> None: ... + +class Binary(LargeBinary): + def __init__(self, *arg, **kw) -> None: ... + +class SchemaType(SchemaEventTarget): + name = ... # type: Any + schema = ... # type: Any + metadata = ... # type: Any + inherit_schema = ... # type: Any + def __init__(self, name: Optional[Any] = ..., schema: Optional[Any] = ..., metadata: Optional[Any] = ..., inherit_schema: bool = ..., quote: Optional[Any] = ..., _create_events: bool = ...) -> None: ... + def copy(self, **kw): ... + def adapt(self, *args, **kw): ... + @property + def bind(self): ... + def create(self, bind: Optional[Any] = ..., checkfirst: bool = ...): ... + def drop(self, bind: Optional[Any] = ..., checkfirst: bool = ...): ... + +class Enum(String, SchemaType): + __visit_name__ = ... # type: str + native_enum = ... # type: Any + create_constraint = ... # type: Any + validate_strings = ... # type: Any + def __init__(self, *enums, **kw) -> None: ... + comparator_factory = ... # type: Any + def copy(self, **kw): ... + def adapt(self, *args, **kw): ... + def literal_processor(self, dialect): ... + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + @property + def python_type(self): ... + +class PickleType(TypeDecorator): + impl = ... # type: Any + protocol = ... # type: Any + pickler = ... # type: Any + comparator = ... # type: Any + def __init__(self, protocol: Any = ..., pickler: Optional[Any] = ..., comparator: Optional[Any] = ...) -> None: ... + def __reduce__(self): ... + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + def compare_values(self, x, y): ... + +class Boolean(TypeEngine, SchemaType): + __visit_name__ = ... # type: str + create_constraint = ... # type: Any + name = ... # type: Any + def __init__(self, create_constraint: bool = ..., name: Optional[Any] = ..., _create_events: bool = ...) -> None: ... + @property + def python_type(self): ... + def literal_processor(self, dialect): ... + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class Interval(_DateAffinity, TypeDecorator): + impl = ... # type: Any + epoch = ... # type: Any + native = ... # type: Any + second_precision = ... # type: Any + day_precision = ... # type: Any + def __init__(self, native: bool = ..., second_precision: Optional[Any] = ..., day_precision: Optional[Any] = ...) -> None: ... + def adapt(self, cls, **kw): ... + @property + def python_type(self): ... + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + def coerce_compared_value(self, op, value): ... + +class JSON(Indexable, TypeEngine): + __visit_name__ = ... # type: str + hashable = ... # type: bool + NULL = ... # type: Any + none_as_null = ... # type: Any + def __init__(self, none_as_null: bool = ...) -> None: ... + class JSONElementType(TypeEngine): + def string_bind_processor(self, dialect): ... + def string_literal_processor(self, dialect): ... + def bind_processor(self, dialect): ... + def literal_processor(self, dialect): ... + class JSONIndexType(JSONElementType): ... + class JSONPathType(JSONElementType): ... + comparator_factory = ... # type: Any + @property + def python_type(self): ... + @property + def should_evaluate_none(self): ... + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + +class ARRAY(Indexable, Concatenable, TypeEngine): + __visit_name__ = ... # type: str + zero_indexes = ... # type: bool + comparator_factory = ... # type: Any + item_type = ... # type: Any + as_tuple = ... # type: Any + dimensions = ... # type: Any + def __init__(self, item_type, as_tuple: bool = ..., dimensions: Optional[Any] = ..., zero_indexes: bool = ...) -> None: ... + @property + def hashable(self): ... + @property + def python_type(self): ... + def compare_values(self, x, y): ... + +class REAL(Float): + __visit_name__ = ... # type: str + +class FLOAT(Float): + __visit_name__ = ... # type: str + +class NUMERIC(Numeric): + __visit_name__ = ... # type: str + +class DECIMAL(Numeric): + __visit_name__ = ... # type: str + +class INTEGER(Integer): + __visit_name__ = ... # type: str + +INT = ... # type: Any + +class SMALLINT(SmallInteger): + __visit_name__ = ... # type: str + +class BIGINT(BigInteger): + __visit_name__ = ... # type: str + +class TIMESTAMP(DateTime): + __visit_name__ = ... # type: str + def __init__(self, timezone: bool = ...) -> None: ... + def get_dbapi_type(self, dbapi): ... + +class DATETIME(DateTime): + __visit_name__ = ... # type: str + +class DATE(Date): + __visit_name__ = ... # type: str + +class TIME(Time): + __visit_name__ = ... # type: str + +class TEXT(Text): + __visit_name__ = ... # type: str + +class CLOB(Text): + __visit_name__ = ... # type: str + +class VARCHAR(String): + __visit_name__ = ... # type: str + +class NVARCHAR(Unicode): + __visit_name__ = ... # type: str + +class CHAR(String): + __visit_name__ = ... # type: str + +class NCHAR(Unicode): + __visit_name__ = ... # type: str + +class BLOB(LargeBinary): + __visit_name__ = ... # type: str + +class BINARY(_Binary): + __visit_name__ = ... # type: str + +class VARBINARY(_Binary): + __visit_name__ = ... # type: str + +class BOOLEAN(Boolean): + __visit_name__ = ... # type: str + +class NullType(TypeEngine): + __visit_name__ = ... # type: str + hashable = ... # type: bool + def literal_processor(self, dialect): ... + comparator_factory = ... # type: Any + class MatchType(Boolean): ... + +NULLTYPE = ... # type: Any +BOOLEANTYPE = ... # type: Any +STRINGTYPE = ... # type: Any +INTEGERTYPE = ... # type: Any +MATCHTYPE = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/type_api.pyi b/third_party/2and3/sqlalchemy/sql/type_api.pyi index 9b8d0e87ee5a..c88668e76fc7 100644 --- a/third_party/2and3/sqlalchemy/sql/type_api.pyi +++ b/third_party/2and3/sqlalchemy/sql/type_api.pyi @@ -1,16 +1,93 @@ +# Stubs for sqlalchemy.sql.type_api (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional from .. import util -from .visitors import Visitable, VisitableType +from .visitors import Visitable as Visitable, VisitableType as VisitableType +from .base import SchemaEventTarget as SchemaEventTarget +from . import operators + +BOOLEANTYPE = ... # type: Any +INTEGERTYPE = ... # type: Any +NULLTYPE = ... # type: Any +STRINGTYPE = ... # type: Any +MATCHTYPE = ... # type: Any +INDEXABLE = ... # type: Any class TypeEngine(Visitable): + class Comparator(operators.ColumnOperators): + default_comparator = ... # type: Any + expr = ... # type: Any + type = ... # type: Any + def __init__(self, expr) -> None: ... + def operate(self, op, *other, **kwargs): ... + def reverse_operate(self, op, other, **kwargs): ... + def __reduce__(self): ... + hashable = ... # type: bool + comparator_factory = ... # type: Any + should_evaluate_none = ... # type: bool + def evaluates_none(self): ... + def copy(self, **kw): ... + def compare_against_backend(self, dialect, conn_type): ... + def copy_value(self, value): ... + def literal_processor(self, dialect): ... + def bind_processor(self, dialect): ... + def result_processor(self, dialect, coltype): ... + def column_expression(self, colexpr): ... + def bind_expression(self, bindvalue): ... + def compare_values(self, x, y): ... + def get_dbapi_type(self, dbapi): ... @property def python_type(self): ... - def get_dbapi_type(self, dbapi): ... + def with_variant(self, type_, dialect_name): ... + def dialect_impl(self, dialect): ... + def adapt(self, *args, **kw): ... + def coerce_compared_value(self, op, value): ... + def compile(self, dialect: Optional[Any] = ...): ... + +class VisitableCheckKWArg(util.EnsureKWArgType, VisitableType): ... + +class UserDefinedType(TypeEngine, metaclass=VisitableCheckKWArg): + __visit_name__ = ... # type: str + ensure_kwarg = ... # type: str + class Comparator(TypeEngine.Comparator): ... + comparator_factory = ... # type: Any + def coerce_compared_value(self, op, value): ... + +class TypeDecorator(SchemaEventTarget, TypeEngine): + __visit_name__ = ... # type: str + impl = ... # type: Any + def __init__(self, *args, **kwargs) -> None: ... + coerce_to_is_types = ... # type: Any + class Comparator(TypeEngine.Comparator): + def operate(self, op, *other, **kwargs): ... + def reverse_operate(self, op, other, **kwargs): ... + @property + def comparator_factory(self): ... + def type_engine(self, dialect): ... + def load_dialect_impl(self, dialect): ... + def __getattr__(self, key): ... + def process_literal_param(self, value, dialect): ... + def process_bind_param(self, value, dialect): ... + def process_result_value(self, value, dialect): ... def literal_processor(self, dialect): ... def bind_processor(self, dialect): ... def result_processor(self, dialect, coltype): ... + def coerce_compared_value(self, op, value): ... + def copy(self, **kw): ... + def get_dbapi_type(self, dbapi): ... + def compare_values(self, x, y): ... -class VisitableCheckKWArg(util.EnsureKWArgType, VisitableType): ... -# TODO: class UserDefinedType(util.with_metaclass(VisitableCheckKWArg, TypeEngine)): -class UserDefinedType(VisitableCheckKWArg, TypeEngine): ... -class TypeDecorator(TypeEngine): ... -class Variant(TypeDecorator): ... +class Variant(TypeDecorator): + impl = ... # type: Any + mapping = ... # type: Any + def __init__(self, base, mapping) -> None: ... + def coerce_compared_value(self, operator, value): ... + def load_dialect_impl(self, dialect): ... + def with_variant(self, type_, dialect_name): ... + @property + def comparator_factory(self): ... + +def to_instance(typeobj, *arg, **kw): ... +def adapt_type(typeobj, colspecs): ... diff --git a/third_party/2and3/sqlalchemy/sql/util.pyi b/third_party/2and3/sqlalchemy/sql/util.pyi new file mode 100644 index 000000000000..b3101f49a431 --- /dev/null +++ b/third_party/2and3/sqlalchemy/sql/util.pyi @@ -0,0 +1,69 @@ +# Stubs for sqlalchemy.sql.util (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from . import visitors +from .base import ColumnSet as ColumnSet +from .elements import BindParameter as BindParameter, ColumnClause as ColumnClause, ColumnElement as ColumnElement, Null as Null, UnaryExpression as UnaryExpression, literal_column as literal_column, Label as Label, _label_reference as _label_reference, _textual_label_reference as _textual_label_reference +from .selectable import ScalarSelect as ScalarSelect, Join as Join, FromClause as FromClause, FromGrouping as FromGrouping +from .schema import Column as Column +from .ddl import sort_tables as sort_tables + +join_condition = ... # type: Any + +def find_join_source(clauses, join_to): ... +def visit_binary_product(fn, expr): ... +def find_tables(clause, check_columns: bool = ..., include_aliases: bool = ..., include_joins: bool = ..., include_selects: bool = ..., include_crud: bool = ...): ... +def unwrap_order_by(clause): ... +def unwrap_label_reference(element): ... +def expand_column_list_from_order_by(collist, order_by): ... +def clause_is_present(clause, search): ... +def surface_selectables(clause): ... +def surface_column_elements(clause): ... +def selectables_overlap(left, right): ... +def bind_values(clause): ... + +class _repr_base(object): + def trunc(self, value): ... + +class _repr_row(_repr_base): + row = ... # type: Any + max_chars = ... # type: Any + def __init__(self, row, max_chars: int = ...) -> None: ... + +class _repr_params(_repr_base): + params = ... # type: Any + batches = ... # type: Any + max_chars = ... # type: Any + def __init__(self, params, batches, max_chars: int = ...) -> None: ... + +def adapt_criterion_to_null(crit, nulls): ... +def splice_joins(left, right, stop_on: Optional[Any] = ...): ... +def reduce_columns(columns, *clauses, **kw): ... +def criterion_as_pairs(expression, consider_as_foreign_keys: Optional[Any] = ..., consider_as_referenced_keys: Optional[Any] = ..., any_operator: bool = ...): ... + +class ClauseAdapter(visitors.ReplacingCloningVisitor): + __traverse_options__ = ... # type: Any + selectable = ... # type: Any + include_fn = ... # type: Any + exclude_fn = ... # type: Any + equivalents = ... # type: Any + adapt_on_names = ... # type: Any + def __init__(self, selectable, equivalents: Optional[Any] = ..., include_fn: Optional[Any] = ..., exclude_fn: Optional[Any] = ..., adapt_on_names: bool = ..., anonymize_labels: bool = ...) -> None: ... + def replace(self, col): ... + +class ColumnAdapter(ClauseAdapter): + columns = ... # type: Any + adapt_required = ... # type: Any + allow_label_resolve = ... # type: Any + def __init__(self, selectable, equivalents: Optional[Any] = ..., chain_to: Optional[Any] = ..., adapt_required: bool = ..., include_fn: Optional[Any] = ..., exclude_fn: Optional[Any] = ..., adapt_on_names: bool = ..., allow_label_resolve: bool = ..., anonymize_labels: bool = ...) -> None: ... + class _IncludeExcludeMapping(object): + parent = ... # type: Any + columns = ... # type: Any + def __init__(self, parent, columns) -> None: ... + def __getitem__(self, key): ... + def wrap(self, adapter): ... + def traverse(self, obj): ... + adapt_clause = ... # type: Any + adapt_list = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/visitors.pyi b/third_party/2and3/sqlalchemy/sql/visitors.pyi index 6fc58e7e03bf..eb4b7be72614 100644 --- a/third_party/2and3/sqlalchemy/sql/visitors.pyi +++ b/third_party/2and3/sqlalchemy/sql/visitors.pyi @@ -1,4 +1,4 @@ -# Stubs for sqlalchemy.sql.visitors (Python 2) +# Stubs for sqlalchemy.sql.visitors (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. @@ -7,9 +7,9 @@ from typing import Any class VisitableType(type): def __init__(cls, clsname, bases, clsdict) -> None: ... -class Visitable: ... +class Visitable(object, metaclass=VisitableType): ... -class ClauseVisitor: +class ClauseVisitor(object): __traverse_options__ = ... # type: Any def traverse_single(self, obj, **kw): ... def iterate(self, obj): ... diff --git a/third_party/2and3/sqlalchemy/types.pyi b/third_party/2and3/sqlalchemy/types.pyi index 7aa160cab678..f8f27d686f8b 100644 --- a/third_party/2and3/sqlalchemy/types.pyi +++ b/third_party/2and3/sqlalchemy/types.pyi @@ -1,51 +1,6 @@ -# Stubs for sqlalchemy.types (Python 2) +# Stubs for sqlalchemy.types (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from .sql import type_api -from .sql import sqltypes - -TypeEngine = type_api.TypeEngine -TypeDecorator = type_api.TypeDecorator -UserDefinedType = type_api.UserDefinedType -BIGINT = sqltypes.BIGINT -BINARY = sqltypes.BINARY -BLOB = sqltypes.BLOB -BOOLEAN = sqltypes.BOOLEAN -BigInteger = sqltypes.BigInteger -Binary = sqltypes.Binary -Boolean = sqltypes.Boolean -CHAR = sqltypes.CHAR -CLOB = sqltypes.CLOB -Concatenable = sqltypes.Concatenable -DATE = sqltypes.DATE -DATETIME = sqltypes.DATETIME -DECIMAL = sqltypes.DECIMAL -Date = sqltypes.Date -DateTime = sqltypes.DateTime -Enum = sqltypes.Enum -FLOAT = sqltypes.FLOAT -Float = sqltypes.Float -INT = sqltypes.INT -INTEGER = sqltypes.INTEGER -Integer = sqltypes.Integer -Interval = sqltypes.Interval -LargeBinary = sqltypes.LargeBinary -NCHAR = sqltypes.NCHAR -NVARCHAR = sqltypes.NVARCHAR -NUMERIC = sqltypes.NUMERIC -Numeric = sqltypes.Numeric -PickleType = sqltypes.PickleType -REAL = sqltypes.REAL -SMALLINT = sqltypes.SMALLINT -SmallInteger = sqltypes.SmallInteger -String = sqltypes.String -TEXT = sqltypes.TEXT -TIME = sqltypes.TIME -TIMESTAMP = sqltypes.TIMESTAMP -Text = sqltypes.Text -Time = sqltypes.Time -Unicode = sqltypes.Unicode -UnicodeText = sqltypes.UnicodeText -VARBINARY = sqltypes.VARBINARY -VARCHAR = sqltypes.VARCHAR +from .sql.type_api import TypeEngine as TypeEngine, TypeDecorator as TypeDecorator, UserDefinedType as UserDefinedType +from .sql.sqltypes import ARRAY as ARRAY, BIGINT as BIGINT, BINARY as BINARY, BLOB as BLOB, BOOLEAN as BOOLEAN, BigInteger as BigInteger, Binary as Binary, Boolean as Boolean, CHAR as CHAR, CLOB as CLOB, Concatenable as Concatenable, DATE as DATE, DATETIME as DATETIME, DECIMAL as DECIMAL, Date as Date, DateTime as DateTime, Enum as Enum, FLOAT as FLOAT, Float as Float, Indexable as Indexable, INT as INT, INTEGER as INTEGER, Integer as Integer, Interval as Interval, JSON as JSON, LargeBinary as LargeBinary, NCHAR as NCHAR, NVARCHAR as NVARCHAR, NUMERIC as NUMERIC, Numeric as Numeric, PickleType as PickleType, REAL as REAL, SMALLINT as SMALLINT, SmallInteger as SmallInteger, String as String, TEXT as TEXT, TIME as TIME, TIMESTAMP as TIMESTAMP, Text as Text, Time as Time, Unicode as Unicode, UnicodeText as UnicodeText, VARBINARY as VARBINARY, VARCHAR as VARCHAR, _Binary as _Binary, MatchType as MatchType diff --git a/third_party/2and3/sqlalchemy/util/__init__.pyi b/third_party/2and3/sqlalchemy/util/__init__.pyi index a42c2ce0d533..85dcc364e8f1 100644 --- a/third_party/2and3/sqlalchemy/util/__init__.pyi +++ b/third_party/2and3/sqlalchemy/util/__init__.pyi @@ -1,133 +1,8 @@ -# Stubs for sqlalchemy.util (Python 2) +# Stubs for sqlalchemy.util (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from . import compat -from . import _collections -from . import langhelpers -from . import deprecations - -callable = compat.callable -cmp = compat.cmp -reduce = compat.reduce -threading = compat.threading -py3k = compat.py3k -py33 = compat.py33 -py2k = compat.py2k -jython = compat.jython -pypy = compat.pypy -cpython = compat.cpython -win32 = compat.win32 -pickle = compat.pickle -dottedgetter = compat.dottedgetter -parse_qsl = compat.parse_qsl -namedtuple = compat.namedtuple -next = compat.next -reraise = compat.reraise -raise_from_cause = compat.raise_from_cause -text_type = compat.text_type -safe_kwarg = compat.safe_kwarg -string_types = compat.string_types -int_types = compat.int_types -binary_type = compat.binary_type -nested = compat.nested -quote_plus = compat.quote_plus -with_metaclass = compat.with_metaclass -print_ = compat.print_ -itertools_filterfalse = compat.itertools_filterfalse -u = compat.u -ue = compat.ue -b = compat.b -unquote_plus = compat.unquote_plus -unquote = compat.unquote -b64decode = compat.b64decode -b64encode = compat.b64encode -byte_buffer = compat.byte_buffer -itertools_filter = compat.itertools_filter -iterbytes = compat.iterbytes -StringIO = compat.StringIO -inspect_getargspec = compat.inspect_getargspec -zip_longest = compat.zip_longest -KeyedTuple = _collections.KeyedTuple -ImmutableContainer = _collections.ImmutableContainer -immutabledict = _collections.immutabledict -Properties = _collections.Properties -OrderedProperties = _collections.OrderedProperties -ImmutableProperties = _collections.ImmutableProperties -OrderedDict = _collections.OrderedDict -OrderedSet = _collections.OrderedSet -IdentitySet = _collections.IdentitySet -OrderedIdentitySet = _collections.OrderedIdentitySet -column_set = _collections.column_set -column_dict = _collections.column_dict -ordered_column_set = _collections.ordered_column_set -populate_column_dict = _collections.populate_column_dict -unique_list = _collections.unique_list -UniqueAppender = _collections.UniqueAppender -PopulateDict = _collections.PopulateDict -EMPTY_SET = _collections.EMPTY_SET -to_list = _collections.to_list -to_set = _collections.to_set -to_column_set = _collections.to_column_set -update_copy = _collections.update_copy -flatten_iterator = _collections.flatten_iterator -has_intersection = _collections.has_intersection -LRUCache = _collections.LRUCache -ScopedRegistry = _collections.ScopedRegistry -ThreadLocalRegistry = _collections.ThreadLocalRegistry -WeakSequence = _collections.WeakSequence -coerce_generator_arg = _collections.coerce_generator_arg -lightweight_named_tuple = _collections.lightweight_named_tuple -iterate_attributes = langhelpers.iterate_attributes -class_hierarchy = langhelpers.class_hierarchy -portable_instancemethod = langhelpers.portable_instancemethod -unbound_method_to_callable = langhelpers.unbound_method_to_callable -getargspec_init = langhelpers.getargspec_init -format_argspec_init = langhelpers.format_argspec_init -format_argspec_plus = langhelpers.format_argspec_plus -get_func_kwargs = langhelpers.get_func_kwargs -get_cls_kwargs = langhelpers.get_cls_kwargs -decorator = langhelpers.decorator -as_interface = langhelpers.as_interface -memoized_property = langhelpers.memoized_property -memoized_instancemethod = langhelpers.memoized_instancemethod -md5_hex = langhelpers.md5_hex -group_expirable_memoized_property = langhelpers.group_expirable_memoized_property -dependencies = langhelpers.dependencies -decode_slice = langhelpers.decode_slice -monkeypatch_proxied_specials = langhelpers.monkeypatch_proxied_specials -asbool = langhelpers.asbool -bool_or_str = langhelpers.bool_or_str -coerce_kw_type = langhelpers.coerce_kw_type -duck_type_collection = langhelpers.duck_type_collection -assert_arg_type = langhelpers.assert_arg_type -symbol = langhelpers.symbol -dictlike_iteritems = langhelpers.dictlike_iteritems -classproperty = langhelpers.classproperty -set_creation_order = langhelpers.set_creation_order -warn_exception = langhelpers.warn_exception -warn = langhelpers.warn -NoneType = langhelpers.NoneType -constructor_copy = langhelpers.constructor_copy -methods_equivalent = langhelpers.methods_equivalent -chop_traceback = langhelpers.chop_traceback -asint = langhelpers.asint -generic_repr = langhelpers.generic_repr -counter = langhelpers.counter -PluginLoader = langhelpers.PluginLoader -hybridproperty = langhelpers.hybridproperty -hybridmethod = langhelpers.hybridmethod -safe_reraise = langhelpers.safe_reraise -get_callable_argspec = langhelpers.get_callable_argspec -only_once = langhelpers.only_once -attrsetter = langhelpers.attrsetter -ellipses_string = langhelpers.ellipses_string -warn_limited = langhelpers.warn_limited -map_bits = langhelpers.map_bits -MemoizedSlots = langhelpers.MemoizedSlots -EnsureKWArgType = langhelpers.EnsureKWArgType -warn_deprecated = deprecations.warn_deprecated -warn_pending_deprecation = deprecations.warn_pending_deprecation -deprecated = deprecations.deprecated -pending_deprecation = deprecations.pending_deprecation -inject_docstring_text = deprecations.inject_docstring_text +from .compat import callable as callable, cmp as cmp, reduce as reduce, threading as threading, py3k as py3k, py33 as py33, py36 as py36, py2k as py2k, jython as jython, pypy as pypy, cpython as cpython, win32 as win32, pickle as pickle, dottedgetter as dottedgetter, parse_qsl as parse_qsl, namedtuple as namedtuple, next as next, reraise as reraise, raise_from_cause as raise_from_cause, text_type as text_type, safe_kwarg as safe_kwarg, string_types as string_types, int_types as int_types, binary_type as binary_type, nested as nested, quote_plus as quote_plus, with_metaclass as with_metaclass, print_ as print_, itertools_filterfalse as itertools_filterfalse, u as u, ue as ue, b as b, unquote_plus as unquote_plus, unquote as unquote, b64decode as b64decode, b64encode as b64encode, byte_buffer as byte_buffer, itertools_filter as itertools_filter, iterbytes as iterbytes, StringIO as StringIO, inspect_getargspec as inspect_getargspec, zip_longest as zip_longest +from ._collections import KeyedTuple as KeyedTuple, ImmutableContainer as ImmutableContainer, immutabledict as immutabledict, Properties as Properties, OrderedProperties as OrderedProperties, ImmutableProperties as ImmutableProperties, OrderedDict as OrderedDict, OrderedSet as OrderedSet, IdentitySet as IdentitySet, OrderedIdentitySet as OrderedIdentitySet, column_set as column_set, column_dict as column_dict, ordered_column_set as ordered_column_set, populate_column_dict as populate_column_dict, unique_list as unique_list, UniqueAppender as UniqueAppender, PopulateDict as PopulateDict, EMPTY_SET as EMPTY_SET, to_list as to_list, to_set as to_set, to_column_set as to_column_set, update_copy as update_copy, flatten_iterator as flatten_iterator, has_intersection as has_intersection, LRUCache as LRUCache, ScopedRegistry as ScopedRegistry, ThreadLocalRegistry as ThreadLocalRegistry, WeakSequence as WeakSequence, coerce_generator_arg as coerce_generator_arg, lightweight_named_tuple as lightweight_named_tuple +from .langhelpers import iterate_attributes as iterate_attributes, class_hierarchy as class_hierarchy, portable_instancemethod as portable_instancemethod, unbound_method_to_callable as unbound_method_to_callable, getargspec_init as getargspec_init, format_argspec_init as format_argspec_init, format_argspec_plus as format_argspec_plus, get_func_kwargs as get_func_kwargs, get_cls_kwargs as get_cls_kwargs, decorator as decorator, as_interface as as_interface, memoized_property as memoized_property, memoized_instancemethod as memoized_instancemethod, md5_hex as md5_hex, group_expirable_memoized_property as group_expirable_memoized_property, dependencies as dependencies, decode_slice as decode_slice, monkeypatch_proxied_specials as monkeypatch_proxied_specials, asbool as asbool, bool_or_str as bool_or_str, coerce_kw_type as coerce_kw_type, duck_type_collection as duck_type_collection, assert_arg_type as assert_arg_type, symbol as symbol, dictlike_iteritems as dictlike_iteritems, classproperty as classproperty, set_creation_order as set_creation_order, warn_exception as warn_exception, warn as warn, NoneType as NoneType, constructor_copy as constructor_copy, methods_equivalent as methods_equivalent, chop_traceback as chop_traceback, asint as asint, generic_repr as generic_repr, counter as counter, PluginLoader as PluginLoader, hybridproperty as hybridproperty, hybridmethod as hybridmethod, safe_reraise as safe_reraise, get_callable_argspec as get_callable_argspec, only_once as only_once, attrsetter as attrsetter, ellipses_string as ellipses_string, warn_limited as warn_limited, map_bits as map_bits, MemoizedSlots as MemoizedSlots, EnsureKWArgType as EnsureKWArgType, wrap_callable as wrap_callable +from .deprecations import warn_deprecated as warn_deprecated, warn_pending_deprecation as warn_pending_deprecation, deprecated as deprecated, pending_deprecation as pending_deprecation, inject_docstring_text as inject_docstring_text diff --git a/third_party/2and3/sqlalchemy/util/_collections.pyi b/third_party/2and3/sqlalchemy/util/_collections.pyi index 58ca80af4696..d99a8f6e7015 100644 --- a/third_party/2and3/sqlalchemy/util/_collections.pyi +++ b/third_party/2and3/sqlalchemy/util/_collections.pyi @@ -1,13 +1,9 @@ -# Stubs for sqlalchemy.util._collections (Python 2) +# Stubs for sqlalchemy.util._collections (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any -from . import compat - -threading = compat.threading -itertools_filterfalse = compat.itertools_filterfalse -string_types = compat.string_types +from typing import Any, Optional +from .compat import threading as threading, itertools_filterfalse as itertools_filterfalse, string_types as string_types, binary_types as binary_types EMPTY_SET = ... # type: Any @@ -15,24 +11,30 @@ class AbstractKeyedTuple(tuple): def keys(self): ... class KeyedTuple(AbstractKeyedTuple): - def __new__(cls, vals, labels=...): ... + def __new__(cls, vals, labels: Optional[Any] = ...): ... def __setattr__(self, key, value): ... class _LW(AbstractKeyedTuple): def __new__(cls, vals): ... def __reduce__(self): ... -class ImmutableContainer: +class ImmutableContainer(object): __delitem__ = ... # type: Any + __setitem__ = ... # type: Any + __setattr__ = ... # type: Any class immutabledict(ImmutableContainer, dict): clear = ... # type: Any + pop = ... # type: Any + popitem = ... # type: Any + setdefault = ... # type: Any + update = ... # type: Any def __new__(cls, *args): ... def __init__(self, *args) -> None: ... def __reduce__(self): ... def union(self, d): ... -class Properties: +class Properties(object): def __init__(self, data) -> None: ... def __len__(self): ... def __iter__(self): ... @@ -45,7 +47,7 @@ class Properties: def __contains__(self, key): ... def as_immutable(self): ... def update(self, value): ... - def get(self, key, default=...): ... + def get(self, key, default: Optional[Any] = ...): ... def keys(self): ... def values(self): ... def items(self): ... @@ -59,12 +61,12 @@ class ImmutableProperties(ImmutableContainer, Properties): ... class OrderedDict(dict): def __reduce__(self): ... - def __init__(self, ____sequence=..., **kwargs) -> None: ... + def __init__(self, ____sequence: Optional[Any] = ..., **kwargs) -> None: ... def clear(self): ... def copy(self): ... def __copy__(self): ... def sort(self, *arg, **kw): ... - def update(self, ____sequence=..., **kwargs): ... + def update(self, ____sequence: Optional[Any] = ..., **kwargs): ... def setdefault(self, key, value): ... def __iter__(self): ... def keys(self): ... @@ -79,7 +81,7 @@ class OrderedDict(dict): def popitem(self): ... class OrderedSet(set): - def __init__(self, d=...) -> None: ... + def __init__(self, d: Optional[Any] = ...) -> None: ... def add(self, element): ... def remove(self, element): ... def insert(self, pos, element): ... @@ -105,8 +107,8 @@ class OrderedSet(set): def difference_update(self, other): ... __isub__ = ... # type: Any -class IdentitySet: - def __init__(self, iterable=...) -> None: ... +class IdentitySet(object): + def __init__(self, iterable: Optional[Any] = ...) -> None: ... def add(self, value): ... def __contains__(self, value): ... def remove(self, value): ... @@ -144,8 +146,8 @@ class IdentitySet: def __iter__(self): ... def __hash__(self): ... -class WeakSequence: - def __init__(self, __elements=...) -> None: ... +class WeakSequence(object): + def __init__(self, __elements: Any = ...) -> None: ... def append(self, item): ... def __len__(self): ... def __iter__(self): ... @@ -153,8 +155,8 @@ class WeakSequence: class OrderedIdentitySet(IdentitySet): class _working_set(OrderedSet): - __sa_hash_exempt__ = ... # type: Any - def __init__(self, iterable=...) -> None: ... + __sa_hash_exempt__ = ... # type: bool + def __init__(self, iterable: Optional[Any] = ...) -> None: ... class PopulateDict(dict): creator = ... # type: Any @@ -166,27 +168,27 @@ column_dict = dict ordered_column_set = OrderedSet populate_column_dict = PopulateDict -def unique_list(seq, hashfunc=...): ... +def unique_list(seq, hashfunc: Optional[Any] = ...): ... -class UniqueAppender: +class UniqueAppender(object): data = ... # type: Any - def __init__(self, data, via=...) -> None: ... + def __init__(self, data, via: Optional[Any] = ...) -> None: ... def append(self, item): ... def __iter__(self): ... def coerce_generator_arg(arg): ... -def to_list(x, default=...): ... +def to_list(x, default: Optional[Any] = ...): ... def has_intersection(set_, iterable): ... def to_set(x): ... def to_column_set(x): ... -def update_copy(d, _new=..., **kw): ... +def update_copy(d, _new: Optional[Any] = ..., **kw): ... def flatten_iterator(x): ... class LRUCache(dict): capacity = ... # type: Any threshold = ... # type: Any - def __init__(self, capacity=..., threshold=...) -> None: ... - def get(self, key, default=...): ... + def __init__(self, capacity: int = ..., threshold: float = ...) -> None: ... + def get(self, key, default: Optional[Any] = ...): ... def __getitem__(self, key): ... def values(self): ... def setdefault(self, key, value): ... @@ -194,7 +196,7 @@ class LRUCache(dict): def lightweight_named_tuple(name, fields): ... -class ScopedRegistry: +class ScopedRegistry(object): createfunc = ... # type: Any scopefunc = ... # type: Any registry = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/util/compat.pyi b/third_party/2and3/sqlalchemy/util/compat.pyi index 191222ccfb96..44783681545f 100644 --- a/third_party/2and3/sqlalchemy/util/compat.pyi +++ b/third_party/2and3/sqlalchemy/util/compat.pyi @@ -1,21 +1,27 @@ -# Stubs for sqlalchemy.util.compat (Python 2) +# Stubs for sqlalchemy.util.compat (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any, Text +import sys +from typing import Any, Optional, Text +import threading as threading from collections import namedtuple - -import threading -import pickle -from six.moves.urllib.parse import (quote_plus, unquote_plus, - parse_qsl, quote, unquote) -# import configparser -from six.moves import StringIO - from io import BytesIO as byte_buffer - +from io import StringIO +from inspect import getargspec as inspect_getfullargspec from operator import attrgetter as dottedgetter - -from six.moves import zip_longest - +if sys.version_info < (3, 0): + from itertools import izip_longest as zip_longest + import cPickle as pickle + from urllib import quote_plus as quote_plus, unquote_plus as unquote_plus, quote as quote, unquote as unquote + from urlparse import parse_qsl as parse_qsl +else: + from itertools import zip_longest as zip_longest + import pickle as pickle + from urllib.parse import (quote_plus as quote_plus, unquote_plus as unquote_plus, + parse_qsl as parse_qsl, quote as quote, unquote as unquote) + +py36 = ... # type: Any py33 = ... # type: Any py32 = ... # type: Any py3k = ... # type: Any @@ -33,13 +39,22 @@ ArgSpec = namedtuple('ArgSpec', ['args', 'varargs', 'keywords', 'defaults']) def inspect_getargspec(func): ... string_types = ... # type: Any +binary_types = ... # type: Any binary_type = ... # type: Any text_type = Text int_types = ... # type: Any +iterbytes = ... # type: Any + +def u(s): ... +def ue(s): ... +def b(s): ... + +callable = ... # type: Any -def callable(fn): ... def cmp(a, b): ... +print_ = ... # type: Any +import_ = ... # type: Any itertools_filterfalse = ... # type: Any itertools_filter = ... # type: Any itertools_imap = ... # type: Any @@ -47,21 +62,13 @@ itertools_imap = ... # type: Any def b64encode(x): ... def b64decode(x): ... -def iterbytes(buf): ... -def u(s): ... -def ue(s): ... -def b(s): ... -def import_(*args): ... - reduce = ... # type: Any - -def print_(*args, **kwargs): ... - time_func = ... # type: Any -def reraise(tp, value, tb=..., cause=...): ... -def raise_from_cause(exception, exc_info=...): ... +def reraise(tp, value, tb: Optional[Any] = ..., cause: Optional[Any] = ...): ... +def raise_from_cause(exception, exc_info: Optional[Any] = ...): ... + +exec_ = ... # type: Any -def exec_(func_text, globals_, lcl=...): ... def with_metaclass(meta, *bases): ... def nested(*managers): ... diff --git a/third_party/2and3/sqlalchemy/util/deprecations.pyi b/third_party/2and3/sqlalchemy/util/deprecations.pyi index 49940cf6bdc9..cade3de2b7fe 100644 --- a/third_party/2and3/sqlalchemy/util/deprecations.pyi +++ b/third_party/2and3/sqlalchemy/util/deprecations.pyi @@ -1,13 +1,12 @@ -# Stubs for sqlalchemy.util.deprecations (Python 2) +# Stubs for sqlalchemy.util.deprecations (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from . import langhelpers +from typing import Any, Optional +from .langhelpers import decorator as decorator -decorator = langhelpers.decorator - -def warn_deprecated(msg, stacklevel=...): ... -def warn_pending_deprecation(msg, stacklevel=...): ... -def deprecated(version, message=..., add_deprecation_to_docstring=...): ... -def pending_deprecation(version, message=..., add_deprecation_to_docstring=...): ... +def warn_deprecated(msg, stacklevel: int = ...): ... +def warn_pending_deprecation(msg, stacklevel: int = ...): ... +def deprecated(version, message: Optional[Any] = ..., add_deprecation_to_docstring: bool = ...): ... +def pending_deprecation(version, message: Optional[Any] = ..., add_deprecation_to_docstring: bool = ...): ... def inject_docstring_text(doctext, injecttext, pos): ... diff --git a/third_party/2and3/sqlalchemy/util/langhelpers.pyi b/third_party/2and3/sqlalchemy/util/langhelpers.pyi index 2dadc07db55d..0a7d4c07e214 100644 --- a/third_party/2and3/sqlalchemy/util/langhelpers.pyi +++ b/third_party/2and3/sqlalchemy/util/langhelpers.pyi @@ -1,13 +1,13 @@ -# Stubs for sqlalchemy.util.langhelpers (Python 2) +# Stubs for sqlalchemy.util.langhelpers (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any +from typing import Any, Optional from . import compat def md5_hex(x): ... -class safe_reraise: +class safe_reraise(object): def __enter__(self): ... def __exit__(self, type_, value, traceback): ... @@ -16,25 +16,25 @@ def map_bits(fn, n): ... def decorator(target): ... def public_factory(target, location): ... -class PluginLoader: +class PluginLoader(object): group = ... # type: Any impls = ... # type: Any auto_fn = ... # type: Any - def __init__(self, group, auto_fn=...) -> None: ... + def __init__(self, group, auto_fn: Optional[Any] = ...) -> None: ... def load(self, name): ... def register(self, name, modulepath, objname): ... -def get_cls_kwargs(cls, _set=...): ... +def get_cls_kwargs(cls, _set: Optional[Any] = ...): ... def inspect_func_args(fn): ... def get_func_kwargs(func): ... -def get_callable_argspec(fn, no_self=..., _is_init=...): ... -def format_argspec_plus(fn, grouped=...): ... -def format_argspec_init(method, grouped=...): ... +def get_callable_argspec(fn, no_self: bool = ..., _is_init: bool = ...): ... +def format_argspec_plus(fn, grouped: bool = ...): ... +def format_argspec_init(method, grouped: bool = ...): ... def getargspec_init(method): ... def unbound_method_to_callable(func_or_cls): ... -def generic_repr(obj, additional_kw=..., to_inspect=..., omit_kwarg=...): ... +def generic_repr(obj, additional_kw: Any = ..., to_inspect: Optional[Any] = ..., omit_kwarg: Any = ...): ... -class portable_instancemethod: +class portable_instancemethod(object): target = ... # type: Any name = ... # type: Any def __init__(self, meth) -> None: ... @@ -42,39 +42,40 @@ class portable_instancemethod: def class_hierarchy(cls): ... def iterate_attributes(cls): ... -def monkeypatch_proxied_specials(into_cls, from_cls, skip=..., only=..., name=..., from_instance=...): ... +def monkeypatch_proxied_specials(into_cls, from_cls, skip: Optional[Any] = ..., only: Optional[Any] = ..., name: str = ..., from_instance: Optional[Any] = ...): ... def methods_equivalent(meth1, meth2): ... -def as_interface(obj, cls=..., methods=..., required=...): ... +def as_interface(obj, cls: Optional[Any] = ..., methods: Optional[Any] = ..., required: Optional[Any] = ...): ... -class memoized_property: +class memoized_property(object): fget = ... # type: Any + __doc__ = ... # type: Any __name__ = ... # type: Any - def __init__(self, fget, doc=...) -> None: ... + def __init__(self, fget, doc: Optional[Any] = ...) -> None: ... def __get__(self, obj, cls): ... @classmethod def reset(cls, obj, name): ... def memoized_instancemethod(fn): ... -class group_expirable_memoized_property: +class group_expirable_memoized_property(object): attributes = ... # type: Any - def __init__(self, attributes=...) -> None: ... + def __init__(self, attributes: Any = ...) -> None: ... def expire_instance(self, instance): ... def __call__(self, fn): ... def method(self, fn): ... -class MemoizedSlots: +class MemoizedSlots(object): def __getattr__(self, key): ... def dependency_for(modulename): ... -class dependencies: +class dependencies(object): import_deps = ... # type: Any def __init__(self, *deps) -> None: ... def __call__(self, fn): ... @classmethod def resolve_all(cls, path): ... - class _importlater: + class _importlater(object): def __new__(cls, path, addtl): ... def __init__(self, path, addtl) -> None: ... def module(self): ... @@ -83,38 +84,39 @@ class dependencies: def asbool(obj): ... def bool_or_str(*text): ... def asint(value): ... -def coerce_kw_type(kw, key, type_, flexi_bool=...): ... +def coerce_kw_type(kw, key, type_, flexi_bool: bool = ...): ... def constructor_copy(obj, cls, *args, **kw): ... def counter(): ... -def duck_type_collection(specimen, default=...): ... +def duck_type_collection(specimen, default: Optional[Any] = ...): ... def assert_arg_type(arg, argtype, name): ... def dictlike_iteritems(dictlike): ... -class classproperty: +class classproperty(property): + __doc__ = ... # type: Any def __init__(self, fget, *arg, **kw) -> None: ... def __get__(desc, self, cls): ... -class hybridproperty: +class hybridproperty(object): func = ... # type: Any def __init__(self, func) -> None: ... def __get__(self, instance, owner): ... -class hybridmethod: +class hybridmethod(object): func = ... # type: Any def __init__(self, func) -> None: ... def __get__(self, instance, owner): ... class _symbol(int): - def __new__(self, name, doc=..., canonical=...): ... + def __new__(self, name, doc: Optional[Any] = ..., canonical: Optional[Any] = ...): ... def __reduce__(self): ... -class symbol: +class symbol(object): symbols = ... # type: Any - def __new__(cls, name, doc=..., canonical=...): ... + def __new__(cls, name, doc: Optional[Any] = ..., canonical: Optional[Any] = ...): ... def set_creation_order(instance): ... def warn_exception(func, *args, **kwargs): ... -def ellipses_string(value, len_=...): ... +def ellipses_string(value, len_: int = ...): ... class _hash_limit_string(compat.text_type): def __new__(cls, value, num, args): ... @@ -124,7 +126,7 @@ class _hash_limit_string(compat.text_type): def warn(msg): ... def warn_limited(msg, args): ... def only_once(fn): ... -def chop_traceback(tb, exclude_prefix=..., exclude_suffix=...): ... +def chop_traceback(tb, exclude_prefix: Any = ..., exclude_suffix: Any = ...): ... NoneType = ... # type: Any @@ -132,3 +134,5 @@ def attrsetter(attrname): ... class EnsureKWArgType(type): def __init__(cls, clsname, bases, clsdict) -> None: ... + +def wrap_callable(wrapper, fn): ... diff --git a/third_party/2and3/sqlalchemy/util/queue.pyi b/third_party/2and3/sqlalchemy/util/queue.pyi new file mode 100644 index 000000000000..2da0bdae7873 --- /dev/null +++ b/third_party/2and3/sqlalchemy/util/queue.pyi @@ -0,0 +1,25 @@ +# Stubs for sqlalchemy.util.queue (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Deque, Optional +import threading +from time import time as _time + +class Empty(Exception): ... +class Full(Exception): ... + +class Queue(object): + mutex: threading.RLock + not_empty: threading.Condition + not_full: threading.Condition + maxsize: int + queue: Deque[Any] + def __init__(self, maxsize: int = ...) -> None: ... + def qsize(self): ... + def empty(self): ... + def full(self): ... + def put(self, item, block: bool = ..., timeout: Optional[Any] = ...): ... + def put_nowait(self, item): ... + def get(self, block: bool = ..., timeout: Optional[Any] = ...): ... + def get_nowait(self): ... diff --git a/third_party/2and3/sqlalchemy/util/topological.pyi b/third_party/2and3/sqlalchemy/util/topological.pyi new file mode 100644 index 000000000000..ce537f8dba5f --- /dev/null +++ b/third_party/2and3/sqlalchemy/util/topological.pyi @@ -0,0 +1,7 @@ +# Stubs for sqlalchemy.util.topological (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +def sort_as_subsets(tuples, allitems, deterministic_order: bool = ...): ... +def sort(tuples, allitems, deterministic_order: bool = ...): ... +def find_cycles(tuples, allitems): ...