From 711fb12e4e1ede47d71f5d9a330b2abd1bd0e60c Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Wed, 22 Mar 2017 22:09:14 -0700 Subject: [PATCH 01/16] sqlalchemy: stubgen-generated stubs Work towards fixing #974 --- third_party/2and3/sqlalchemy/__init__.pyi | 133 +----- .../2and3/sqlalchemy/connectors/__init__.pyi | 5 + .../2and3/sqlalchemy/connectors/mxodbc.pyi | 19 + .../2and3/sqlalchemy/connectors/pyodbc.pyi | 24 + .../2and3/sqlalchemy/connectors/zxJDBC.pyi | 20 + third_party/2and3/sqlalchemy/cprocessors.pyi | 19 + third_party/2and3/sqlalchemy/cresultproxy.pyi | 19 + third_party/2and3/sqlalchemy/cutils.pyi | 5 + .../2and3/sqlalchemy/databases/__init__.pyi | 10 +- .../2and3/sqlalchemy/dialects/__init__.pyi | 2 +- .../sqlalchemy/dialects/firebird/__init__.pyi | 5 + .../sqlalchemy/dialects/firebird/base.pyi | 101 +++++ .../sqlalchemy/dialects/firebird/fdb.pyi | 14 + .../dialects/firebird/kinterbasdb.pyi | 40 ++ .../sqlalchemy/dialects/mssql/__init__.pyi | 5 + .../sqlalchemy/dialects/mssql/adodbapi.pyi | 24 + .../2and3/sqlalchemy/dialects/mssql/base.pyi | 236 ++++++++++ .../dialects/mssql/information_schema.pyi | 29 ++ .../sqlalchemy/dialects/mssql/mxodbc.pyi | 30 ++ .../sqlalchemy/dialects/mssql/pymssql.pyi | 24 + .../sqlalchemy/dialects/mssql/pyodbc.pyi | 31 ++ .../sqlalchemy/dialects/mssql/zxjdbc.pyi | 18 + .../sqlalchemy/dialects/mysql/__init__.pyi | 39 +- .../2and3/sqlalchemy/dialects/mysql/base.pyi | 339 +++----------- .../sqlalchemy/dialects/mysql/cymysql.pyi | 23 + .../sqlalchemy/dialects/mysql/enumerated.pyi | 25 ++ .../sqlalchemy/dialects/mysql/gaerdbms.pyi | 16 + .../2and3/sqlalchemy/dialects/mysql/json.pyi | 17 + .../dialects/mysql/mysqlconnector.pyi | 38 ++ .../sqlalchemy/dialects/mysql/mysqldb.pyi | 37 ++ .../sqlalchemy/dialects/mysql/oursql.pyi | 43 ++ .../sqlalchemy/dialects/mysql/pymysql.pyi | 20 + .../sqlalchemy/dialects/mysql/pyodbc.pyi | 18 + .../sqlalchemy/dialects/mysql/reflection.pyi | 22 + .../2and3/sqlalchemy/dialects/mysql/types.pyi | 140 ++++++ .../sqlalchemy/dialects/mysql/zxjdbc.pyi | 22 + .../sqlalchemy/dialects/oracle/__init__.pyi | 5 + .../2and3/sqlalchemy/dialects/oracle/base.pyi | 172 +++++++ .../sqlalchemy/dialects/oracle/cx_oracle.pyi | 114 +++++ .../sqlalchemy/dialects/oracle/zxjdbc.pyi | 53 +++ .../dialects/postgresql/__init__.pyi | 14 + .../sqlalchemy/dialects/postgresql/array.pyi | 45 ++ .../sqlalchemy/dialects/postgresql/base.pyi | 223 ++++++++++ .../sqlalchemy/dialects/postgresql/dml.pyi | 29 ++ .../sqlalchemy/dialects/postgresql/ext.pyi | 29 ++ .../sqlalchemy/dialects/postgresql/hstore.pyi | 65 +++ .../sqlalchemy/dialects/postgresql/json.pyi | 31 ++ .../sqlalchemy/dialects/postgresql/pg8000.pyi | 55 +++ .../dialects/postgresql/psycopg2.pyi | 77 ++++ .../dialects/postgresql/psycopg2cffi.pyi | 15 + .../dialects/postgresql/pygresql.pyi | 56 +++ .../dialects/postgresql/pypostgresql.pyi | 32 ++ .../sqlalchemy/dialects/postgresql/ranges.pyi | 41 ++ .../sqlalchemy/dialects/postgresql/zxjdbc.pyi | 20 + .../sqlalchemy/dialects/sqlite/__init__.pyi | 5 + .../2and3/sqlalchemy/dialects/sqlite/base.pyi | 108 +++++ .../dialects/sqlite/pysqlcipher.pyi | 19 + .../sqlalchemy/dialects/sqlite/pysqlite.pyi | 30 ++ .../sqlalchemy/dialects/sybase/__init__.pyi | 5 + .../2and3/sqlalchemy/dialects/sybase/base.pyi | 117 +++++ .../sqlalchemy/dialects/sybase/mxodbc.pyi | 15 + .../sqlalchemy/dialects/sybase/pyodbc.pyi | 21 + .../sqlalchemy/dialects/sybase/pysybase.pyi | 31 ++ .../2and3/sqlalchemy/engine/__init__.pyi | 9 +- third_party/2and3/sqlalchemy/engine/base.pyi | 120 ++++- .../2and3/sqlalchemy/engine/default.pyi | 141 ++++++ .../2and3/sqlalchemy/engine/interfaces.pyi | 101 ++++- .../2and3/sqlalchemy/engine/reflection.pyi | 39 ++ .../2and3/sqlalchemy/engine/result.pyi | 96 +++- .../2and3/sqlalchemy/engine/strategies.pyi | 14 +- .../2and3/sqlalchemy/engine/threadlocal.pyi | 26 ++ third_party/2and3/sqlalchemy/engine/url.pyi | 14 +- third_party/2and3/sqlalchemy/engine/util.pyi | 6 + .../2and3/sqlalchemy/event/__init__.pyi | 8 + third_party/2and3/sqlalchemy/event/api.pyi | 15 + third_party/2and3/sqlalchemy/event/attr.pyi | 78 ++++ third_party/2and3/sqlalchemy/event/base.pyi | 31 ++ third_party/2and3/sqlalchemy/event/legacy.pyi | 4 + .../2and3/sqlalchemy/event/registry.pyi | 23 + third_party/2and3/sqlalchemy/events.pyi | 57 +++ third_party/2and3/sqlalchemy/exc.pyi | 14 +- third_party/2and3/sqlalchemy/ext/__init__.pyi | 5 + .../2and3/sqlalchemy/ext/associationproxy.pyi | 164 +++++++ third_party/2and3/sqlalchemy/ext/automap.pyi | 23 + third_party/2and3/sqlalchemy/ext/baked.pyi | 55 +++ third_party/2and3/sqlalchemy/ext/compiler.pyi | 14 + .../sqlalchemy/ext/declarative/__init__.pyi | 5 + .../2and3/sqlalchemy/ext/declarative/api.pyi | 51 +++ .../2and3/sqlalchemy/ext/declarative/base.pyi | 42 ++ .../ext/declarative/clsregistry.pyi | 54 +++ .../2and3/sqlalchemy/ext/horizontal_shard.pyi | 24 + third_party/2and3/sqlalchemy/ext/hybrid.pyi | 54 +++ .../2and3/sqlalchemy/ext/indexable.pyi | 18 + .../2and3/sqlalchemy/ext/instrumentation.pyi | 61 +++ third_party/2and3/sqlalchemy/ext/mutable.pyi | 64 +++ .../2and3/sqlalchemy/ext/orderinglist.pyi | 23 + .../2and3/sqlalchemy/ext/serializer.pyi | 10 + third_party/2and3/sqlalchemy/inspection.pyi | 4 +- third_party/2and3/sqlalchemy/interfaces.pyi | 25 ++ third_party/2and3/sqlalchemy/log.pyi | 36 +- third_party/2and3/sqlalchemy/orm/__init__.pyi | 77 +--- .../2and3/sqlalchemy/orm/attributes.pyi | 165 +++++++ third_party/2and3/sqlalchemy/orm/base.pyi | 64 +++ .../2and3/sqlalchemy/orm/collections.pyi | 97 ++++ .../2and3/sqlalchemy/orm/dependency.pyi | 68 +++ .../sqlalchemy/orm/deprecated_interfaces.pyi | 35 ++ .../2and3/sqlalchemy/orm/descriptor_props.pyi | 65 +++ third_party/2and3/sqlalchemy/orm/dynamic.pyi | 68 +++ .../2and3/sqlalchemy/orm/evaluator.pyi | 22 + third_party/2and3/sqlalchemy/orm/events.pyi | 102 +++++ third_party/2and3/sqlalchemy/orm/exc.pyi | 34 ++ third_party/2and3/sqlalchemy/orm/identity.pyi | 59 +++ .../2and3/sqlalchemy/orm/instrumentation.pyi | 70 +++ .../2and3/sqlalchemy/orm/interfaces.pyi | 76 ++++ third_party/2and3/sqlalchemy/orm/loading.pyi | 16 + third_party/2and3/sqlalchemy/orm/mapper.pyi | 98 ++++ .../2and3/sqlalchemy/orm/path_registry.pyi | 78 ++++ .../2and3/sqlalchemy/orm/persistence.pyi | 42 ++ .../2and3/sqlalchemy/orm/properties.pyi | 39 ++ third_party/2and3/sqlalchemy/orm/query.pyi | 208 +++++++++ .../2and3/sqlalchemy/orm/relationships.pyi | 108 +++++ third_party/2and3/sqlalchemy/orm/scoping.pyi | 16 + third_party/2and3/sqlalchemy/orm/session.pyi | 47 +- third_party/2and3/sqlalchemy/orm/state.pyi | 81 ++++ .../2and3/sqlalchemy/orm/strategies.pyi | 94 ++++ .../2and3/sqlalchemy/orm/strategy_options.pyi | 53 +++ third_party/2and3/sqlalchemy/orm/sync.pyi | 12 + .../2and3/sqlalchemy/orm/unitofwork.pyi | 97 ++++ third_party/2and3/sqlalchemy/orm/util.pyi | 74 +++- third_party/2and3/sqlalchemy/pool.pyi | 50 +-- third_party/2and3/sqlalchemy/processors.pyi | 12 + third_party/2and3/sqlalchemy/schema.pyi | 56 +-- third_party/2and3/sqlalchemy/sql/__init__.pyi | 66 +-- .../2and3/sqlalchemy/sql/annotation.pyi | 21 +- third_party/2and3/sqlalchemy/sql/base.pyi | 74 +++- third_party/2and3/sqlalchemy/sql/compiler.pyi | 281 ++++++++++++ third_party/2and3/sqlalchemy/sql/crud.pyi | 19 + third_party/2and3/sqlalchemy/sql/ddl.pyi | 140 +++++- .../sqlalchemy/sql/default_comparator.pyi | 9 + third_party/2and3/sqlalchemy/sql/dml.pyi | 50 ++- third_party/2and3/sqlalchemy/sql/elements.pyi | 419 ++++++++++++++---- .../2and3/sqlalchemy/sql/expression.pyi | 65 +-- .../2and3/sqlalchemy/sql/functions.pyi | 161 +++++-- third_party/2and3/sqlalchemy/sql/naming.pyi | 15 +- .../2and3/sqlalchemy/sql/operators.pyi | 110 +++-- third_party/2and3/sqlalchemy/sql/schema.pyi | 300 +++++++++---- .../2and3/sqlalchemy/sql/selectable.pyi | 276 +++++++++--- third_party/2and3/sqlalchemy/sql/sqltypes.pyi | 371 +++++++++++++--- third_party/2and3/sqlalchemy/sql/type_api.pyi | 94 +++- third_party/2and3/sqlalchemy/sql/util.pyi | 71 +++ third_party/2and3/sqlalchemy/sql/visitors.pyi | 2 +- .../2and3/sqlalchemy/testing/__init__.pyi | 16 + .../2and3/sqlalchemy/testing/assertions.pyi | 50 +++ .../2and3/sqlalchemy/testing/assertsql.pyi | 76 ++++ .../2and3/sqlalchemy/testing/config.pyi | 40 ++ .../2and3/sqlalchemy/testing/engines.pyi | 60 +++ .../2and3/sqlalchemy/testing/entities.pyi | 13 + .../2and3/sqlalchemy/testing/exclusions.pyi | 80 ++++ .../2and3/sqlalchemy/testing/fixtures.pyi | 78 ++++ third_party/2and3/sqlalchemy/testing/mock.pyi | 5 + .../2and3/sqlalchemy/testing/pickleable.pyi | 65 +++ .../sqlalchemy/testing/plugin/__init__.pyi | 4 + .../sqlalchemy/testing/plugin/noseplugin.pyi | 25 ++ .../sqlalchemy/testing/plugin/plugin_base.pyi | 46 ++ .../testing/plugin/pytestplugin.pyi | 20 + .../2and3/sqlalchemy/testing/profiling.pyi | 25 ++ .../2and3/sqlalchemy/testing/provision.pyi | 23 + .../sqlalchemy/testing/replay_fixture.pyi | 31 ++ .../2and3/sqlalchemy/testing/requirements.pyi | 211 +++++++++ .../2and3/sqlalchemy/testing/runner.pyi | 8 + .../2and3/sqlalchemy/testing/schema.pyi | 6 + third_party/2and3/sqlalchemy/testing/util.pyi | 41 ++ .../2and3/sqlalchemy/testing/warnings.pyi | 8 + third_party/2and3/sqlalchemy/types.pyi | 51 +-- .../2and3/sqlalchemy/util/__init__.pyi | 135 +----- .../2and3/sqlalchemy/util/_collections.pyi | 54 +-- third_party/2and3/sqlalchemy/util/compat.pyi | 55 +-- .../2and3/sqlalchemy/util/deprecations.pyi | 15 +- .../2and3/sqlalchemy/util/langhelpers.pyi | 44 +- third_party/2and3/sqlalchemy/util/queue.pyi | 22 + .../2and3/sqlalchemy/util/topological.pyi | 7 + 181 files changed, 9147 insertions(+), 1461 deletions(-) create mode 100644 third_party/2and3/sqlalchemy/connectors/__init__.pyi create mode 100644 third_party/2and3/sqlalchemy/connectors/mxodbc.pyi create mode 100644 third_party/2and3/sqlalchemy/connectors/pyodbc.pyi create mode 100644 third_party/2and3/sqlalchemy/connectors/zxJDBC.pyi create mode 100644 third_party/2and3/sqlalchemy/cprocessors.pyi create mode 100644 third_party/2and3/sqlalchemy/cresultproxy.pyi create mode 100644 third_party/2and3/sqlalchemy/cutils.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/firebird/__init__.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/firebird/base.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/firebird/fdb.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mssql/__init__.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mssql/adodbapi.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mssql/base.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mssql/information_schema.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mssql/mxodbc.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mssql/pymssql.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mssql/zxjdbc.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mysql/cymysql.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mysql/enumerated.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mysql/gaerdbms.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mysql/json.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mysql/mysqlconnector.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mysql/mysqldb.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mysql/oursql.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mysql/pymysql.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mysql/pyodbc.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mysql/reflection.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mysql/types.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/mysql/zxjdbc.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/oracle/__init__.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/oracle/base.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/oracle/cx_oracle.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/oracle/zxjdbc.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/postgresql/__init__.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/postgresql/array.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/postgresql/base.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/postgresql/dml.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/postgresql/ext.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/postgresql/hstore.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/postgresql/json.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/postgresql/pg8000.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2cffi.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/postgresql/pygresql.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/postgresql/zxjdbc.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/sqlite/__init__.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/sqlite/base.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/sqlite/pysqlcipher.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/sqlite/pysqlite.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/sybase/__init__.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/sybase/base.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/sybase/mxodbc.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/sybase/pyodbc.pyi create mode 100644 third_party/2and3/sqlalchemy/dialects/sybase/pysybase.pyi create mode 100644 third_party/2and3/sqlalchemy/engine/default.pyi create mode 100644 third_party/2and3/sqlalchemy/engine/reflection.pyi create mode 100644 third_party/2and3/sqlalchemy/engine/threadlocal.pyi create mode 100644 third_party/2and3/sqlalchemy/engine/util.pyi create mode 100644 third_party/2and3/sqlalchemy/event/__init__.pyi create mode 100644 third_party/2and3/sqlalchemy/event/api.pyi create mode 100644 third_party/2and3/sqlalchemy/event/attr.pyi create mode 100644 third_party/2and3/sqlalchemy/event/base.pyi create mode 100644 third_party/2and3/sqlalchemy/event/legacy.pyi create mode 100644 third_party/2and3/sqlalchemy/event/registry.pyi create mode 100644 third_party/2and3/sqlalchemy/events.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/__init__.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/associationproxy.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/automap.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/baked.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/compiler.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/declarative/__init__.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/declarative/api.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/declarative/base.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/declarative/clsregistry.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/horizontal_shard.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/hybrid.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/indexable.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/instrumentation.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/mutable.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/orderinglist.pyi create mode 100644 third_party/2and3/sqlalchemy/ext/serializer.pyi create mode 100644 third_party/2and3/sqlalchemy/interfaces.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/attributes.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/base.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/collections.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/dependency.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/deprecated_interfaces.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/descriptor_props.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/dynamic.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/evaluator.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/events.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/exc.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/identity.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/instrumentation.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/interfaces.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/loading.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/mapper.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/path_registry.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/persistence.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/properties.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/query.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/relationships.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/scoping.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/state.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/strategies.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/strategy_options.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/sync.pyi create mode 100644 third_party/2and3/sqlalchemy/orm/unitofwork.pyi create mode 100644 third_party/2and3/sqlalchemy/processors.pyi create mode 100644 third_party/2and3/sqlalchemy/sql/compiler.pyi create mode 100644 third_party/2and3/sqlalchemy/sql/crud.pyi create mode 100644 third_party/2and3/sqlalchemy/sql/default_comparator.pyi create mode 100644 third_party/2and3/sqlalchemy/sql/util.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/__init__.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/assertions.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/assertsql.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/config.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/engines.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/entities.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/exclusions.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/fixtures.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/mock.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/pickleable.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/plugin/__init__.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/plugin/noseplugin.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/plugin/plugin_base.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/plugin/pytestplugin.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/profiling.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/provision.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/replay_fixture.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/requirements.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/runner.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/schema.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/util.pyi create mode 100644 third_party/2and3/sqlalchemy/testing/warnings.pyi create mode 100644 third_party/2and3/sqlalchemy/util/queue.pyi create mode 100644 third_party/2and3/sqlalchemy/util/topological.pyi diff --git a/third_party/2and3/sqlalchemy/__init__.pyi b/third_party/2and3/sqlalchemy/__init__.pyi index 8d58e257929b..e6d116f3cf7d 100644 --- a/third_party/2and3/sqlalchemy/__init__.pyi +++ b/third_party/2and3/sqlalchemy/__init__.pyi @@ -1,124 +1,9 @@ -# Stubs for sqlalchemy (Python 2) - -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, -) - -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, -) - -from .schema import ( - CheckConstraint, - Column, - ColumnDefault, - Constraint, - DefaultClause, - FetchedValue, - ForeignKey, - ForeignKeyConstraint, - Index, - MetaData, - PassiveDefault, - PrimaryKeyConstraint, - Sequence, - Table, - ThreadLocalMetaData, - UniqueConstraint, - DDL, -) - -from . import sql as sql -from . import schema as schema -from . import types as types -from . import exc as exc -from . import dialects as dialects -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 +# Stubs for sqlalchemy (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from .sql import 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 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 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 diff --git a/third_party/2and3/sqlalchemy/connectors/__init__.pyi b/third_party/2and3/sqlalchemy/connectors/__init__.pyi new file mode 100644 index 000000000000..cf9ae2a31ee6 --- /dev/null +++ b/third_party/2and3/sqlalchemy/connectors/__init__.pyi @@ -0,0 +1,5 @@ +# Stubs for sqlalchemy.connectors (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +class Connector: ... diff --git a/third_party/2and3/sqlalchemy/connectors/mxodbc.pyi b/third_party/2and3/sqlalchemy/connectors/mxodbc.pyi new file mode 100644 index 000000000000..efe482bdb9fb --- /dev/null +++ b/third_party/2and3/sqlalchemy/connectors/mxodbc.pyi @@ -0,0 +1,19 @@ +# Stubs for sqlalchemy.connectors.mxodbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional + +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..9eeb6164cc2d --- /dev/null +++ b/third_party/2and3/sqlalchemy/connectors/pyodbc.pyi @@ -0,0 +1,24 @@ +# Stubs for sqlalchemy.connectors.pyodbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional + +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..9efdc943e6ea --- /dev/null +++ b/third_party/2and3/sqlalchemy/connectors/zxJDBC.pyi @@ -0,0 +1,20 @@ +# Stubs for sqlalchemy.connectors.zxJDBC (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any + +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..48e8654cb2c2 --- /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: + def __init__(self, *args, **kwargs): ... + def process(self, *args, **kwargs): ... + +class UnicodeResultProcessor: + 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..46c0f18ca818 --- /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: + _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..8c64af41ff15 100644 --- a/third_party/2and3/sqlalchemy/dialects/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/__init__.pyi @@ -1,4 +1,4 @@ -# Stubs for sqlalchemy.dialects (Python 2) +# Stubs for sqlalchemy.dialects (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. 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..1d148e4d4d7a --- /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, dialect as dialect 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..056c0794252e --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/firebird/base.pyi @@ -0,0 +1,101 @@ +# Stubs for sqlalchemy.dialects.firebird.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import sqltypes +import compiler +import sql.compiler +import default +from sqlalchemy import schema as sa_schema +from sqlalchemy import types as sqltypes + +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, alias, asfrom: bool = ..., **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..19aba9d36eca --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi @@ -0,0 +1,40 @@ +# Stubs for sqlalchemy.dialects.firebird.kinterbasdb (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import sqltypes +from .base import FBDialect as FBDialect, FBExecutionContext as FBExecutionContext +from ... import types as sqltypes + +class _kinterbasdb_numeric: + 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..77a8e0c2b085 --- /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, dialect as dialect 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..c64ecafd3f16 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mssql/base.pyi @@ -0,0 +1,236 @@ +# Stubs for sqlalchemy.dialects.mssql.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import sqltypes +import compiler +import default +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 ...util import update_wrapper as update_wrapper +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): ... + +class _DateTimeBase: + 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: + 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, table, mssql_aliased: bool = ..., iscrud: bool = ..., **kwargs): ... + def visit_alias(self, alias, **kw): ... + def visit_column(self, column, add_to_result_map: Optional[Any] = ..., **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, create, include_schema: bool = ...): ... + 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..a4517666985e --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mssql/information_schema.pyi @@ -0,0 +1,29 @@ +# Stubs for sqlalchemy.dialects.mssql.information_schema (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +import expression +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..5a3a165f9afd --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mssql/pymssql.pyi @@ -0,0 +1,24 @@ +# Stubs for sqlalchemy.dialects.mssql.pymssql (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +import sqltypes +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..cc71f7266185 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi @@ -0,0 +1,31 @@ +# Stubs for sqlalchemy.dialects.mssql.pyodbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import sqltypes +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: + 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..76a94c19f77a 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/__init__.pyi @@ -1,40 +1,5 @@ -# 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, dialect as dialect diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi index 51b8b26c6a98..dfa79b7e8d3f 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi @@ -1,231 +1,27 @@ -# 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 +import default +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 +55,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, typeclause, type_: Optional[Any] = ...): ... + 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 +92,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 +118,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 +129,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 +152,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,37 +160,23 @@ 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): ... + 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: rowproxy = ... # type: Any 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..b5bc3719172d --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/enumerated.pyi @@ -0,0 +1,25 @@ +# Stubs for sqlalchemy.dialects.mysql.enumerated (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +import sqltypes +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..a9f001ba18d1 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi @@ -0,0 +1,17 @@ +# Stubs for sqlalchemy.dialects.mysql.json (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +import sqltypes +import sqltypes.JSON +from ...sql import elements as elements +from ... import types as sqltypes + +class JSON(sqltypes.JSON): ... + +class _FormatTypeMixin: + 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..9e9954f0e465 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/mysqlconnector.pyi @@ -0,0 +1,38 @@ +# 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 + 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..9461bf1b0238 --- /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: + 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): ... 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..f0916b66d5c3 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi @@ -0,0 +1,140 @@ +# Stubs for sqlalchemy.dialects.mysql.types (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import sqltypes +from ... import types as sqltypes + +class _NumericType: + 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..1b0bfdda89eb --- /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, dialect as dialect, INTERVAL as INTERVAL, VARCHAR2 as VARCHAR2, NVARCHAR2 as NVARCHAR2, ROWID as ROWID, dialect as dialect 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..2c27dffd3f7c --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/oracle/base.pyi @@ -0,0 +1,172 @@ +# Stubs for sqlalchemy.dialects.oracle.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import sqltypes +import compiler +import default +import sql +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 + +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(sql.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..33f5e01a5020 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/oracle/cx_oracle.pyi @@ -0,0 +1,114 @@ +# 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 +import sqltypes +import oracle +import _result +from .base import OracleCompiler as OracleCompiler, OracleDialect as OracleDialect, OracleExecutionContext as OracleExecutionContext +from . import base as oracle +from ...engine import result as _result +from sqlalchemy import types as sqltypes + +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: + def result_processor(self, dialect, coltype): ... + +class _NativeUnicodeMixin: + 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..ad7b4c0955ca --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/oracle/zxjdbc.pyi @@ -0,0 +1,53 @@ +# Stubs for sqlalchemy.dialects.oracle.zxjdbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +import sqltypes +import _result +from sqlalchemy import types as 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: + 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..72029b2f86cc --- /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, dialect as dialect, 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..bee3077e028a --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/array.pyi @@ -0,0 +1,45 @@ +# Stubs for sqlalchemy.dialects.postgresql.array (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import expression +import sqltypes +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 +import sqltypes.ARRAY + +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..359404135341 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/base.pyi @@ -0,0 +1,223 @@ +# Stubs for sqlalchemy.dialects.postgresql.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import sqltypes +import compiler +import reflection +import schema +import default +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 + +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..9dce6771ab4f --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/dml.pyi @@ -0,0 +1,29 @@ +# 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): + 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..d3b12d1a152b --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/ext.pyi @@ -0,0 +1,29 @@ +# Stubs for sqlalchemy.dialects.postgresql.ext (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import expression +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..171df239e167 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/hstore.pyi @@ -0,0 +1,65 @@ +# Stubs for sqlalchemy.dialects.postgresql.hstore (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import sqltypes +import sqlfunc +from ... import types as sqltypes +from ...sql import functions as sqlfunc +import sqltypes.Indexable +import sqltypes.Concatenable + +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: ... + class Comparator(sqltypes.Indexable.Comparator, sqltypes.Concatenable.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): ... + def defined(self, key): ... + def delete(self, key): ... + def slice(self, array): ... + def keys(self): ... + def vals(self): ... + def array(self): ... + def matrix(self): ... + 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..bac8d8e24dac --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/json.pyi @@ -0,0 +1,31 @@ +# Stubs for sqlalchemy.dialects.postgresql.json (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import sqltypes.JSON +import sqltypes +from ... import types as sqltypes +import JSON + +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..ae4dfb097cfe --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/pg8000.pyi @@ -0,0 +1,55 @@ +# Stubs for sqlalchemy.dialects.postgresql.pg8000 (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import sqltypes +from ... import types as sqltypes +from .base import PGDialect as PGDialect, PGCompiler as PGCompiler, PGIdentifierPreparer as PGIdentifierPreparer, PGExecutionContext as PGExecutionContext, _DECIMAL_TYPES as _DECIMAL_TYPES, _FLOAT_TYPES as _FLOAT_TYPES, _INT_TYPES as _INT_TYPES +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..28ef2f2b6acb --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2.pyi @@ -0,0 +1,77 @@ +# Stubs for sqlalchemy.dialects.postgresql.psycopg2 (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import sqltypes +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, _DECIMAL_TYPES as _DECIMAL_TYPES, _FLOAT_TYPES as _FLOAT_TYPES, _INT_TYPES as _INT_TYPES, 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..cdabfde90f4c --- /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, _DECIMAL_TYPES as _DECIMAL_TYPES, _FLOAT_TYPES as _FLOAT_TYPES, _INT_TYPES as _INT_TYPES, 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..849efc9653f3 --- /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 +import sqltypes +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): ... + 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..8d41e32cbd4d --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi @@ -0,0 +1,41 @@ +# Stubs for sqlalchemy.dialects.postgresql.ranges (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +import sqltypes +from ... import types as sqltypes +import sqltypes.Concatenable + +class RangeOperators: + class comparator_factory(sqltypes.Concatenable.Comparator): + def __ne__(self, other): ... + def contains(self, other, **kw): ... + def contained_by(self, other): ... + def overlaps(self, other): ... + def strictly_left_of(self, other): ... + __lshift__ = ... # type: Any + def strictly_right_of(self, other): ... + __rshift__ = ... # type: Any + def not_extend_right_of(self, other): ... + def not_extend_left_of(self, other): ... + def adjacent_to(self, other): ... + def __add__(self, other): ... + +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..575b6ae56c20 --- /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, dialect as dialect 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..5df7966d6000 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/sqlite/base.pyi @@ -0,0 +1,108 @@ +# Stubs for sqlalchemy.dialects.sqlite.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import sqltypes +import compiler +import default +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: + def __init__(self, storage_format: Optional[Any] = ..., regexp: Optional[Any] = ..., **kw) -> None: ... + @property + def format_is_text_affinity(self): ... + def adapt(self, cls, **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..cc6255601e4a --- /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, dialect as dialect 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..c13be57eb3e7 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/sybase/base.pyi @@ -0,0 +1,117 @@ +# Stubs for sqlalchemy.dialects.sybase.base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import sqltypes +import compiler +import reflection +import default +from sqlalchemy import types as sqltypes +from sqlalchemy.sql import operators as sql_operators +from sqlalchemy import schema as sa_schema + +RESERVED_WORDS = ... # type: Any + +class _SybaseUnitypeMixin: + 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..344a1af9b310 --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/sybase/pyodbc.pyi @@ -0,0 +1,21 @@ +# Stubs for sqlalchemy.dialects.sybase.pyodbc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +import sqltypes +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..fada5f84208c --- /dev/null +++ b/third_party/2and3/sqlalchemy/dialects/sybase/pysybase.pyi @@ -0,0 +1,31 @@ +# Stubs for sqlalchemy.dialects.sybase.pysybase (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import sqltypes +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..4636eb865901 100644 --- a/third_party/2and3/sqlalchemy/engine/__init__.pyi +++ b/third_party/2and3/sqlalchemy/engine/__init__.pyi @@ -1,11 +1,6 @@ -# Stubs for sqlalchemy.engine (Python 2) +# Stubs for sqlalchemy.engine (Python 3.6) # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from .base import Connection as Connection -from .base import Engine as Engine -from .base import Transaction as Transaction -from .result import RowProxy as RowProxy - 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..b3c99e98147b 100644 --- a/third_party/2and3/sqlalchemy/engine/base.pyi +++ b/third_party/2and3/sqlalchemy/engine/base.pyi @@ -1,10 +1,124 @@ -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 +import log +from ..sql import util as sql_util +from ..sql import schema as schema +from .interfaces import Connectable as Connectable, ExceptionContext as ExceptionContext +from .util import _distill_params as _distill_params 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): ... + 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: + 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..7170004e6932 --- /dev/null +++ b/third_party/2and3/sqlalchemy/engine/default.pyi @@ -0,0 +1,141 @@ +# Stubs for sqlalchemy.engine.default (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +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): ... + def get_pk_constraint(self, conn, 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, cursor, statement, context: Optional[Any] = ...): ... + 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 + def engine(self): ... + def postfetch_cols(self): ... + def prefetch_cols(self): ... + def returning_cols(self): ... + def no_parameters(self): ... + 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..a6cd99ff6f45 100644 --- a/third_party/2and3/sqlalchemy/engine/interfaces.pyi +++ b/third_party/2and3/sqlalchemy/engine/interfaces.pyi @@ -1,11 +1,94 @@ -from typing import Any, TYPE_CHECKING -from .result import ResultProxy -from .base import Connection +# 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 + +class Dialect: + 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: + 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: + 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: - def execute(self, object, *multiparams: Any, **params: Any) -> ResultProxy: ... - 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 scalar(self, object, *multiparams: Any, **params: Any) -> Any: ... + def connect(self, **kwargs): ... + def contextual_connect(self): ... + def create(self, entity, **kwargs): ... + def drop(self, entity, **kwargs): ... + def execute(self, object, *multiparams, **params): ... + def scalar(self, object, *multiparams, **params): ... + +class ExceptionContext: + 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..1f0c8749c00c --- /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: + 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..e4bb5f194d0d 100644 --- a/third_party/2and3/sqlalchemy/engine/result.pyi +++ b/third_party/2and3/sqlalchemy/engine/result.pyi @@ -1,22 +1,86 @@ -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 +from typing import Any, Optional +from ..sql import expression as expression, sqltypes as sqltypes +from ..sql import util as sql_util +from sqlalchemy.cresultproxy import BaseRowProxy -class RowProxy(Mapping[str, Any]): ... +def rowproxy_reconstructor(cls, state): ... -class ResultProxy(Iterator[RowProxy]): - def keys(self) -> List[str]: ... - def close(self) -> None: ... - def __iter__(self) -> Iterator[RowProxy]: ... - def fetchall(self) -> Iterator[RowProxy]: ... - def fetchmany(self, size: Optional[int]=None) -> Iterator[RowProxy]: ... - def fetchone(self) -> Optional[RowProxy]: ... - def first(self) -> Optional[RowProxy]: ... +class BaseRowProxy: + 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): ... - # Note: The return type `Any` should be a DB API 2 value type once defined - # TODO: See #1037 - def scalar(self) -> Any: ... +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 ResultMetaData: + case_sensitive = ... # type: Any + matched_on_name = ... # type: bool + def __init__(self, parent, cursor_description) -> None: ... + +class ResultProxy: + 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): ... + def rowcount(self): ... + @property + def lastrowid(self): ... + @property + def returns_rows(self): ... + @property + def is_insert(self): ... + def close(self): ... + def __iter__(self): ... + def inserted_primary_key(self): ... + def last_updated_params(self): ... + def last_inserted_params(self): ... @property - def rowcount(self) -> int: ... + 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): ... + def fetchmany(self, size: Optional[Any] = ...): ... + def fetchone(self): ... + def first(self): ... + def scalar(self): ... + +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..9d0e7a1c53c2 100644 --- a/third_party/2and3/sqlalchemy/engine/strategies.pyi +++ b/third_party/2and3/sqlalchemy/engine/strategies.pyi @@ -1,10 +1,10 @@ -# 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 . import base +from sqlalchemy import pool as poollib +import base strategies = ... # type: Any @@ -16,21 +16,23 @@ 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): ... diff --git a/third_party/2and3/sqlalchemy/engine/threadlocal.pyi b/third_party/2and3/sqlalchemy/engine/threadlocal.pyi new file mode 100644 index 000000000000..d9efaf649ea9 --- /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 +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..2d3a91b9810c 100644 --- a/third_party/2and3/sqlalchemy/engine/url.pyi +++ b/third_party/2and3/sqlalchemy/engine/url.pyi @@ -1,11 +1,9 @@ -# 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 - -# registry = dialects.registry +from typing import Any, Optional +from ..dialects import registry as registry, plugins as plugins class URL: drivername = ... # 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..b785eef2bd82 --- /dev/null +++ b/third_party/2and3/sqlalchemy/event/__init__.pyi @@ -0,0 +1,8 @@ +# 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 +from .legacy import _legacy_signature as _legacy_signature diff --git a/third_party/2and3/sqlalchemy/event/api.pyi b/third_party/2and3/sqlalchemy/event/api.pyi new file mode 100644 index 000000000000..582c4c85c4a4 --- /dev/null +++ b/third_party/2and3/sqlalchemy/event/api.pyi @@ -0,0 +1,15 @@ +# Stubs for sqlalchemy.event.api (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .base import _registrars as _registrars +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..e6982e9cd286 --- /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 +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..3ce3d13295b5 --- /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: + def __call__(self, _instance_cls): ... + +class _Dispatch: + 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: ... + +class _JoinedDispatcher: + local = ... # type: Any + parent = ... # type: Any + def __init__(self, local, parent) -> None: ... + def __getattr__(self, name): ... + +class dispatcher: + 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..7e7a5fe659c1 --- /dev/null +++ b/third_party/2and3/sqlalchemy/event/legacy.pyi @@ -0,0 +1,4 @@ +# 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..7509270566d1 --- /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: + 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..84bb9b652319 --- /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. + +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..d70b85766eac 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): ... @@ -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..9d13f3e2fe5e --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/__init__.pyi @@ -0,0 +1,5 @@ +# Stubs for sqlalchemy.ext (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from .. import util as _sa_util diff --git a/third_party/2and3/sqlalchemy/ext/associationproxy.pyi b/third_party/2and3/sqlalchemy/ext/associationproxy.pyi new file mode 100644 index 000000000000..6e269c80e7e2 --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/associationproxy.pyi @@ -0,0 +1,164 @@ +# Stubs for sqlalchemy.ext.associationproxy (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import interfaces +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): ... + def target_class(self): ... + 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: + ref = ... # type: Any + target = ... # type: Any + def __init__(self, obj, target) -> None: ... + def __call__(self): ... + +class _AssociationCollection: + 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 items(self): ... + def values(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): ... + __nonzero__ = ... # type: Any + 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): ... + __or__ = ... # type: Any + def difference(self, other): ... + __sub__ = ... # type: Any + def difference_update(self, other): ... + def __isub__(self, other): ... + def intersection(self, other): ... + __and__ = ... # type: Any + def intersection_update(self, other): ... + def __iand__(self, other): ... + def symmetric_difference(self, other): ... + __xor__ = ... # type: Any + 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..466a780bcb87 --- /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: + __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..b77d79005d9e --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/baked.pyi @@ -0,0 +1,55 @@ +# Stubs for sqlalchemy.ext.baked (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +import strategies +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: + 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: + 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): ... + +baked_lazyload = ... # type: Any +baked_lazyload_all = ... # type: Any +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..c858a399e41e --- /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: + 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..342ae4e7955b --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/declarative/api.pyi @@ -0,0 +1,51 @@ +# Stubs for sqlalchemy.ext.declarative.api (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import interfaces +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 ...orm.base import _mapper_or_none as _mapper_or_none +from ...util import OrderedDict as OrderedDict, hybridmethod as hybridmethod, hybridproperty as hybridproperty +from .base import _as_declarative as _as_declarative, _declarative_constructor as _declarative_constructor, _DeferredMapperConfig as _DeferredMapperConfig, _add_attribute as _add_attribute +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: + @classmethod + def __declare_first__(cls): ... + +class AbstractConcreteBase(ConcreteBase): + __no_table__ = ... # type: bool + @classmethod + def __declare_first__(cls): ... + +class DeferredReflection: + @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..b4746d625109 --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/declarative/base.pyi @@ -0,0 +1,42 @@ +# 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, CompositeProperty as CompositeProperty +from ...orm.attributes import QueryableAttribute as QueryableAttribute +from ...orm.base import _is_mapped_class as _is_mapped_class +from ...util import topological as topological +from ...sql import expression as expression + +declared_attr = ... # type: Any +declarative_props = ... # type: Any + +class _MapperConfig: + @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..f6e8fc88b298 --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/declarative/clsregistry.pyi @@ -0,0 +1,54 @@ +# 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, RelationshipProperty as RelationshipProperty, SynonymProperty as SynonymProperty +from ...schema import _get_table_key as _get_table_key +from ...orm import class_mapper as class_mapper, interfaces as interfaces + +def add_class(classname, cls): ... + +class _MultipleClassMarker: + 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: + 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: + def __init__(self, parent) -> None: ... + def __getattr__(self, key): ... + +class _GetColumns: + cls = ... # type: Any + def __init__(self, cls) -> None: ... + def __getattr__(self, key): ... + +class _GetTable: + key = ... # type: Any + metadata = ... # type: Any + def __init__(self, key, metadata) -> None: ... + def __getattr__(self, key): ... + +class _class_resolver: + 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..88bddc140e6e --- /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, mapper: Optional[Any] = ..., instance: Optional[Any] = ..., shard_id: Optional[Any] = ..., **kwargs): ... + def get_bind(self, mapper, shard_id: Optional[Any] = ..., instance: Optional[Any] = ..., clause: Optional[Any] = ..., **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..79b8379501c3 --- /dev/null +++ b/third_party/2and3/sqlalchemy/ext/hybrid.pyi @@ -0,0 +1,54 @@ +# Stubs for sqlalchemy.ext.hybrid (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import interfaces +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..90a88ca8ccdc --- /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, _default_state_getter as _default_state_getter, _default_dict_getter as _default_dict_getter, _default_manager_getter as _default_manager_getter +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: + 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..49429b70765f --- /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: + @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..3f3370526185 --- /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: + 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: + 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..4c6c61617ea1 100644 --- a/third_party/2and3/sqlalchemy/log.pyi +++ b/third_party/2and3/sqlalchemy/log.pyi @@ -1,14 +1,34 @@ -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 -class Identified(object): - def _should_log_debug(self) -> bool: ... - def _should_log_info(self) -> bool: ... +def class_logger(cls): ... + +class Identified: + logging_name = ... # type: Any -class InstanceLogger(object): ... +class InstanceLogger: + 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: + __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..03af41953b12 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/attributes.pyi @@ -0,0 +1,165 @@ +# Stubs for sqlalchemy.orm.attributes (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +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): ... + def info(self): ... + 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): ... + 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: + 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: + 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, state, dict_, value, initiator: Optional[Any] = ..., passive: Any = ..., pop: bool = ..., _adapt: bool = ...): ... + 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..0ac2c805f424 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/base.pyi @@ -0,0 +1,64 @@ +# 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: + 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): + def info(self): ... + +class _MappedAttribute: ... diff --git a/third_party/2and3/sqlalchemy/orm/collections.pyi b/third_party/2and3/sqlalchemy/orm/collections.pyi new file mode 100644 index 000000000000..cb7ece7e0669 --- /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: + cols = ... # type: Any + composite = ... # type: Any + def __init__(self, cols) -> None: ... + def __reduce__(self): ... + def __call__(self, value): ... + +class _SerializableColumnGetter: + 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: + 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: + @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: + 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..a1c9da1fd83c --- /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: + 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..71a8e16a2b02 --- /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: + 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: + 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: + 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..633b78f8b938 --- /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 .util import _none_set as _none_set +from .. import exc as sa_exc +from ..sql import expression as expression +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): ... + 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..4095226b23e1 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/dynamic.pyi @@ -0,0 +1,68 @@ +# Stubs for sqlalchemy.orm.dynamic (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import strategies +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: + query_class = ... # type: Any + instance = ... # type: Any + attr = ... # type: Any + def __init__(self, attr, state) -> None: ... + def session(self): ... + 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: + 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..4eb0bbf4a976 --- /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: + 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..f2e9d77a8a75 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/events.pyi @@ -0,0 +1,102 @@ +# Stubs for sqlalchemy.orm.events (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +import event +from .base import _mapper_or_none as _mapper_or_none +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 +import _EventsHold + +class InstrumentationEvents(event.Events): + def class_instrument(self, cls): ... + def class_uninstrument(self, cls): ... + def attribute_instrument(self, cls, key, inst): ... + +class _InstrumentationEventsHold: + 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: ... + 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..8c7d190b6e0a --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/exc.pyi @@ -0,0 +1,34 @@ +# Stubs for sqlalchemy.orm.exc (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import sa_exc +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, base, 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, base, 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..bf8083093829 --- /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: + 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..5a3eb7a7467b --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/instrumentation.pyi @@ -0,0 +1,70 @@ +# 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 mapper(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: + class_ = ... # type: Any + def __init__(self, state, d) -> None: ... + def __call__(self, state, inst, state_dict): ... + +class InstrumentationFactory: + 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..6f1a200a062e --- /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 +import util +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 +from .base import InspectionAttr, 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: + propagate_to_loaders = ... # type: bool + def process_query(self, query): ... + def process_query_conditionally(self, query): ... + +class LoaderStrategy: + 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..6fe2a8f92435 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/loading.pyi @@ -0,0 +1,16 @@ +# 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 _none_set as _none_set, state_str as state_str +from .base import _SET_DEFERRED_EXPIRED as _SET_DEFERRED_EXPIRED, _DEFER_FOR_STATE as _DEFER_FOR_STATE +from .. import exc as sa_exc + +def instances(query, cursor, context): ... +def merge_result(querylib, 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..b5f080fb07db --- /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, _MappedAttribute as _MappedAttribute +from .base import _class_to_mapper as _class_to_mapper, _state_mapper as _state_mapper, class_mapper as class_mapper, state_str as state_str, _INSTRUMENTOR as _INSTRUMENTOR +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..71fb22ad76e3 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/path_registry.pyi @@ -0,0 +1,78 @@ +# 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: + is_token = ... # type: bool + is_root = ... # type: bool + def __eq__(self, other): ... + def set(self, attributes, key, value): ... + def setdefault(self, attributes, key, value): ... + def get(self, attributes, key, value: Optional[Any] = ...): ... + 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: ... + def has_entity(self): ... + 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..37720f0e7cc4 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/persistence.pyi @@ -0,0 +1,42 @@ +# 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, _attr_as_key as _attr_as_key, _entity_descriptor as _entity_descriptor +from ..sql import expression as expression +from ..sql.base import _from_objects as _from_objects + +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: + 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..e3f7f88a12de --- /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 +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..ab95cddaa9e0 --- /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 +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: + 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: + 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: + 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..2d0933bd7a38 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/relationships.pyi @@ -0,0 +1,108 @@ +# 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, _orm_annotate as _orm_annotate, _orm_deannotate as _orm_deannotate +from ..sql.util import ClauseAdapter as ClauseAdapter, join_condition as join_condition, _shallow_annotate as _shallow_annotate, visit_binary_product as visit_binary_product, _deep_deannotate as _deep_deannotate, 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): ... + def property(self): ... + def merge(self, session, source_state, source_dict, dest_state, dest_dict, load, _recursive, _resolve_conflict_map): ... + def cascade_iterator(self, type_, state, dict_, visited_states, halt_on: Optional[Any] = ...): ... + def mapper(self): ... + def table(self): ... + def do_init(self): ... + +class JoinCondition: + 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): ... + def primaryjoin_reverse_remote(self): ... + def remote_columns(self): ... + def local_columns(self): ... + 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: + 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..ee23e17285dd --- /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: + 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..00d4e751cc89 100644 --- a/third_party/2and3/sqlalchemy/orm/session.pyi +++ b/third_party/2and3/sqlalchemy/orm/session.pyi @@ -1,8 +1,11 @@ -# 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: @classmethod @@ -15,14 +18,16 @@ class _SessionClassMethods: class SessionTransaction: 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,43 @@ 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 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,7 +90,7 @@ 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): ... diff --git a/third_party/2and3/sqlalchemy/orm/state.pyi b/third_party/2and3/sqlalchemy/orm/state.pyi new file mode 100644 index 000000000000..babb1b1829bf --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/state.pyi @@ -0,0 +1,81 @@ +# Stubs for sqlalchemy.orm.state (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +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: ... + 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, sessionlib): ... + @property + def object(self): ... + @property + def identity(self): ... + @property + def identity_key(self): ... + def parents(self): ... + def mapper(self): ... + @property + def has_identity(self): ... + def obj(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: + 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: + 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..893c48950987 --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/strategies.pyi @@ -0,0 +1,94 @@ +# Stubs for sqlalchemy.orm.strategies (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +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 .util import _none_set as _none_set +from .interfaces import LoaderStrategy as LoaderStrategy, StrategizedProperty as StrategizedProperty +from .base import _SET_DEFERRED_EXPIRED as _SET_DEFERRED_EXPIRED, _DEFER_FOR_STATE as _DEFER_FOR_STATE +from .session import _state_session as _state_session + +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, context, entity, path, loadopt, adapter, column_collection, memoized_populators, only_load_props: Optional[Any] = ..., **kw): ... + +class LoadDeferredColumns: + 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: + 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: + 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..31531dd3560e --- /dev/null +++ b/third_party/2and3/sqlalchemy/orm/strategy_options.pyi @@ -0,0 +1,53 @@ +# 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, Generative as Generative +from .. import exc as sa_exc +from .base import _is_aliased_class as _is_aliased_class, _class_to_mapper as _class_to_mapper +from . import util as orm_util +from .path_registry import PathRegistry as PathRegistry, TokenRegistry as TokenRegistry, _WILDCARD_TOKEN as _WILDCARD_TOKEN, _DEFAULT_TOKEN as _DEFAULT_TOKEN + +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: + 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..06193532a727 --- /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: + 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: ... + +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: + 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..3c8e3daf0a7a 100644 --- a/third_party/2and3/sqlalchemy/orm/util.pyi +++ b/third_party/2and3/sqlalchemy/orm/util.pyi @@ -1,12 +1,70 @@ -# 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 ..sql.selectable import FromClause +from typing import Any, Optional +import sql_util +import expression +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, _none_set as _none_set, _never_set as _never_set +from .base import class_mapper as class_mapper, _class_to_mapper as _class_to_mapper +from .base import InspectionAttr as InspectionAttr +from .path_registry import PathRegistry as PathRegistry -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: ... +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: + __name__ = ... # type: Any + def __init__(self, cls, alias: Optional[Any] = ..., name: Optional[Any] = ..., 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, alias: Optional[Any] = ..., name: Optional[Any] = ..., flat: bool = ..., adapt_on_names: bool = ...): ... +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..019df048f3c0 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 . import log -from . import util - -threading = util.threading -memoized_property = util.memoized_property -chop_traceback = util.chop_traceback +from typing import Any, Optional +import log +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 @@ -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,27 +32,23 @@ 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 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 def info(self): ... + 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: @@ -64,21 +57,24 @@ class _ConnectionFairy: @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): ... @@ -109,7 +105,7 @@ class _DBProxy: 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..7ed4f66dc11b 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, _get_table_key as _get_table_key, 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..d7d45fac1b14 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 +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..afb8104b7771 100644 --- a/third_party/2and3/sqlalchemy/sql/annotation.pyi +++ b/third_party/2and3/sqlalchemy/sql/annotation.pyi @@ -1,11 +1,14 @@ -class Annotated(object): +# Stubs for sqlalchemy.sql.annotation (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any + +class Annotated: def __new__(cls, *args): ... - def __init__(self, element, values): ... - def _annotate(self, values): ... - def _with_annotations(self, values): ... - def _deannotate(self, values=..., clone: bool=...): ... - def _compiler_dispatch(self, visitor, **kw): ... - def _constructor(self): ... - def _clone(self): ... + __dict__ = ... # type: Any + def __init__(self, element, values) -> None: ... def __hash__(self): ... - def __eq__(self): ... + def __eq__(self, other): ... + +annotated_classes = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/base.pyi b/third_party/2and3/sqlalchemy/sql/base.pyi index 48e68c70fdbd..353f881c1c77 100644 --- a/third_party/2and3/sqlalchemy/sql/base.pyi +++ b/third_party/2and3/sqlalchemy/sql/base.pyi @@ -1,42 +1,84 @@ -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 +import util +from .visitors import ClauseVisitor as ClauseVisitor -class Immutable(object): +PARSE_AUTOCOMMIT = ... # type: Any +NO_ARG = ... # type: Any + +class Immutable: def unique_params(self, *optionaldict, **kwargs): ... def params(self, *optionaldict, **kwargs): ... - def _clone(self) -> Immutable: ... -class DialectKWArgs(object): +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: + @classmethod def argument_for(cls, dialect_name, argument_name, default): ... + def dialect_kwargs(self): ... + @property def kwargs(self): ... def dialect_options(self): ... -class Generative(object): ... +class Generative: ... 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 SchemaEventTarget: ... + +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, elements, 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, elements, 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..1de26e272f3a --- /dev/null +++ b/third_party/2and3/sqlalchemy/sql/compiler.pyi @@ -0,0 +1,281 @@ +# Stubs for sqlalchemy.sql.compiler (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import visitors + +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: + 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: + 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): + def sql_compiler(self): ... + 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: + 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, naming, 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..59c7b100cb49 --- /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 +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..304deeb7aec6 100644 --- a/third_party/2and3/sqlalchemy/sql/ddl.pyi +++ b/third_party/2and3/sqlalchemy/sql/ddl.pyi @@ -1,25 +1,119 @@ -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, _generative as _generative, SchemaVisitor as SchemaVisitor, _bind_or_error as _bind_or_error +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, bind: Optional[Any] = ..., target: Optional[Any] = ...): ... + 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): ... + bind = ... # type: Any + +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..c11c09eb3a33 --- /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, _const_expr as _const_expr, _clause_element_as_expr as _clause_element_as_expr, ClauseList as ClauseList, ColumnElement as ColumnElement, TextClause as TextClause, UnaryExpression as UnaryExpression, collate as collate, _is_literal as _is_literal, _literal_as_text as _literal_as_text, ClauseElement as ClauseElement, and_ as and_, or_ as or_, Slice as Slice, Visitable as Visitable, _literal_as_binds as _literal_as_binds +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..84e6e509eeca 100644 --- a/third_party/2and3/sqlalchemy/sql/dml.pyi +++ b/third_party/2and3/sqlalchemy/sql/dml.pyi @@ -1,20 +1,50 @@ -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, _generative as _generative, _from_objects as _from_objects, DialectKWArgs as DialectKWArgs, ColumnCollection as ColumnCollection +from .elements import ClauseElement as ClauseElement, _literal_as_text as _literal_as_text, Null as Null, and_ as and_, _clone as _clone, _column_as_key as _column_as_key +from .selectable import _interpret_as_from as _interpret_as_from, _interpret_as_select as _interpret_as_select, 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..d087565528f6 100644 --- a/third_party/2and3/sqlalchemy/sql/elements.pyi +++ b/third_party/2and3/sqlalchemy/sql/elements.pyi @@ -1,93 +1,356 @@ -# 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 +import operators +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 +from .base import _generative as _generative + +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, default, 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: bool + foreign_keys = ... # type: Any + key = ... # type: Any + def self_group(self, against: Optional[Any] = ...): ... 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, use_proxies: bool = ..., equivalents: Optional[Any] = ..., **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, selectable, *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 + def type(self): ... + def compare(self, other): ... + +class False_(ColumnElement): + __visit_name__ = ... # type: str + def type(self): ... + def compare(self, other): ... + +class True_(ColumnElement): + __visit_name__ = ... # type: str + 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): ... + 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): ... + 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] = ...): ... + 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] = ...): ... + 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): ... + def type(self): ... + 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: ... + 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: ... + def name(self): ... + def table(self): ... + def key(self): ... + def info(self): ... + def anon_label(self): ... diff --git a/third_party/2and3/sqlalchemy/sql/expression.pyi b/third_party/2and3/sqlalchemy/sql/expression.pyi index 48fc3b89659a..3396ccc9f19a 100644 --- a/third_party/2and3/sqlalchemy/sql/expression.pyi +++ b/third_party/2and3/sqlalchemy/sql/expression.pyi @@ -1,33 +1,16 @@ -# 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 .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 +from .functions import func as func, modifier as modifier +from .elements import ClauseElement as ClauseElement, ColumnElement as ColumnElement, not_ as not_, collate as collate, literal_column as literal_column, between as between, literal as literal, outparam as outparam +from .base import ColumnCollection as ColumnCollection +from .selectable import Alias as Alias, Join as Join, Select as Select, Selectable as Selectable, TableClause as TableClause, CompoundSelect as CompoundSelect, FromClause as FromClause, Lateral as Lateral, alias as alias, subquery as subquery, lateral as lateral, TableSample as TableSample, tablesample as tablesample +from .dml import Insert as Insert, Update as Update, Delete as Delete +all_ = ... # type: Any +any_ = ... # type: Any and_ = ... # type: Any or_ = ... # type: Any bindparam = ... # type: Any @@ -36,6 +19,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,35 +37,10 @@ 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 - -# old names for compatibility -_Executable = Executable -_BindParamClause = BindParameter -_Label = Label -_SelectBase = SelectBase -_BinaryExpression = BinaryExpression -_Cast = Cast -_Null = Null -_False = False_ -_True = True_ -_TextClause = TextClause -_UnaryExpression = UnaryExpression -_Case = Case -_Tuple = Tuple -_Over = Over -_Generative = Generative -_TypeClause = TypeClause -_Extract = Extract -_Exists = Exists -_Grouping = Grouping -_FromGrouping = FromGrouping -_ScalarSelect = ScalarSelect diff --git a/third_party/2and3/sqlalchemy/sql/functions.pyi b/third_party/2and3/sqlalchemy/sql/functions.pyi index b65645610afe..129bfd573f0c 100644 --- a/third_party/2and3/sqlalchemy/sql/functions.pyi +++ b/third_party/2and3/sqlalchemy/sql/functions.pyi @@ -1,47 +1,144 @@ +# 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_as_binds as _literal_as_binds, literal_column as literal_column, _type_from_args as _type_from_args, ColumnElement as ColumnElement, _clone as _clone, 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 _FunctionGenerator(object): - def __init__(self, **opts): ... +class FunctionElement(Executable, ColumnElement, FromClause): + packagenames = ... # type: Any + clause_expr = ... # type: Any + def __init__(self, *clauses, **kwargs) -> None: ... + @property + def columns(self): ... + 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: + 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: + 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..5aa358c41c79 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: + 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..5465f9be9603 100644 --- a/third_party/2and3/sqlalchemy/sql/operators.pyi +++ b/third_party/2and3/sqlalchemy/sql/operators.pyi @@ -1,23 +1,56 @@ -from typing import Any, AnyStr, Callable +# Stubs for sqlalchemy.sql.operators (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. -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): ... +from typing import Any, Optional + +div = ... # type: Any + +class Operators: 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: + __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 +60,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 +82,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..b3889324ba1a 100644 --- a/third_party/2and3/sqlalchemy/sql/schema.pyi +++ b/third_party/2and3/sqlalchemy/sql/schema.pyi @@ -1,126 +1,252 @@ -from typing import Any, AnyStr, Set +# Stubs for sqlalchemy.sql.schema (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. -from .base import SchemaEventTarget, DialectKWArgs -from .base import ColumnCollection -from .elements import ClauseElement, ColumnClause, TextClause, \ - ColumnElement -from .selectable import TableClause +from typing import Any, Optional +import visitors +from .base import SchemaEventTarget as SchemaEventTarget, DialectKWArgs as DialectKWArgs +from .base import _bind_or_error as _bind_or_error, ColumnCollection as ColumnCollection +from .elements import ClauseElement as ClauseElement, ColumnClause as ColumnClause, _as_truncated as _as_truncated, TextClause as TextClause, _literal_as_text as _literal_as_text, ColumnElement as ColumnElement, quoted_name as quoted_name +from .selectable import TableClause as TableClause -from . import visitors +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): ... - + def info(self): ... class Table(DialectKWArgs, SchemaItem, TableClause): - def __init__(self, name, metadata, *args, **kwargs): ... + __visit_name__ = ... # type: str + 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): ... + def column(self): ... + +class _NotAColumnExpr: + __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 _column_tokens(self): ... - def _resolve_col_tokens(self): ... - def _link_to_col_by_colstring(self, parenttable, table, colname): ... - def _set_target_column(self, column): ... + def bind(self): ... + +class ColumnDefault(DefaultGenerator): + arg = ... # type: Any + def __init__(self, arg, **kwargs) -> None: ... + def is_callable(self): ... + def is_clause_element(self): ... + 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: ... + def is_callable(self): ... + def is_clause_element(self): ... + def next_value(self, func): ... @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): ... + 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): +class ColumnCollectionMixin: 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: ... + def __visit_name__(self): ... + __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 + bind = ... # 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): ... + bind = ... # type: Any + def is_bound(self): ... + def dispose(self): ... -def _get_table_key(name: AnyStr, schema: AnyStr): ... +class _SchemaTranslateMap: + 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..fe6d6a4a545e 100644 --- a/third_party/2and3/sqlalchemy/sql/selectable.pyi +++ b/third_party/2and3/sqlalchemy/sql/selectable.pyi @@ -1,82 +1,254 @@ -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 .elements import _clone as _clone, _literal_as_text as _literal_as_text, _interpret_as_column_or_from as _interpret_as_column_or_from, _expand_cloned as _expand_cloned, _select_iterables as _select_iterables, _anonymous_label as _anonymous_label, _clause_element_as_expr as _clause_element_as_expr, _cloned_intersection as _cloned_intersection, _cloned_difference as _cloned_difference, True_ as True_, _literal_as_label_reference as _literal_as_label_reference, _literal_and_labels_as_label_reference as _literal_and_labels_as_label_reference +from .base import Immutable as Immutable, Executable as Executable, _generative as _generative, ColumnCollection as ColumnCollection, ColumnSet as ColumnSet, _from_objects as _from_objects, 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): +class HasPrefixes: def prefix_with(self, *expr, **kw): ... -class HasSuffixes(object): +class HasSuffixes: 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, functions, 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 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): ... + def primary_key(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 primary_key(self) -> Any: ... + 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 bind(self): ... + def alias(self, sqlutil, name: Optional[Any] = ..., flat: bool = ...): ... + +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 foreign_keys(self) -> Any: ... - def _init_collections(self): ... + def description(self): ... + def as_scalar(self): ... + def is_derived_from(self, fromclause): ... + def get_children(self, column_collections: bool = ..., **kw): ... @property - def _cols_populated(self): ... - def _populate_column_collection(self): ... - def _refresh_for_new_column(self, column): ... + 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 Join(FromClause): ... -class Alias(FromClause): ... -class CTE(Generative, HasSuffixes, Alias): ... -class FromGrouping(FromClause): ... +class HasCTE: + 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: ... 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 get_children(self, column_collections: bool = ..., **kwargs): ... + def insert(self, dml, values: Optional[Any] = ..., inline: bool = ..., **kwargs): ... + def update(self, dml, whereclause: Optional[Any] = ..., values: Optional[Any] = ..., inline: bool = ..., **kwargs): ... + def delete(self, dml, whereclause: Optional[Any] = ..., **kwargs): ... + +class ForUpdateArg(ClauseElement): + @classmethod + def parse_legacy_select(self, arg): ... @property - def _from_objects(self): ... + 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 ForUpdateArg(ClauseElement): ... -class SelectBase(Executable, FromClause): ... -class GenerativeSelect(SelectBase): ... -class CompoundSelect(GenerativeSelect): ... +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 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 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): ... + bind = ... # type: Any 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): ... + 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, sqlutil, 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): ... + bind = ... # type: Any + +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..8c5ade9e2ad2 100644 --- a/third_party/2and3/sqlalchemy/sql/sqltypes.pyi +++ b/third_party/2and3/sqlalchemy/sql/sqltypes.pyi @@ -1,57 +1,316 @@ -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, _literal_as_binds as _literal_as_binds +from .elements import TypeCoerce as type_coerce +from .base import _bind_or_error as _bind_or_error, SchemaEventTarget as SchemaEventTarget +from ..util import pickle as pickle +from ..util import compat as compat +import TypeEngine +import String +import Indexable +import Concatenable + +class _DateAffinity: + class Comparator(TypeEngine.Comparator): ... + comparator_factory = ... # type: Any + +class Concatenable: + class Comparator(TypeEngine.Comparator): ... + comparator_factory = ... # type: Any + +class Indexable: + class Comparator(TypeEngine.Comparator): + def __getitem__(self, index): ... + 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 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, impltype, **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: ... + class Comparator(String.Comparator): ... + comparator_factory = ... # type: Any + def copy(self, **kw): ... + def adapt(self, impltype, **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): ... + class Comparator(Indexable.Comparator, Concatenable.Comparator): ... + 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 + class Comparator(Indexable.Comparator, Concatenable.Comparator): + def any(self, elements, other, operator: Optional[Any] = ...): ... + def all(self, elements, other, operator: Optional[Any] = ...): ... + 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): ... + class Comparator(TypeEngine.Comparator): ... + 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..1e114d579e88 100644 --- a/third_party/2and3/sqlalchemy/sql/type_api.pyi +++ b/third_party/2and3/sqlalchemy/sql/type_api.pyi @@ -1,16 +1,94 @@ -from .. import util -from .visitors import Visitable, VisitableType +# Stubs for sqlalchemy.sql.type_api (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import util +from .visitors import Visitable as Visitable, VisitableType as VisitableType +from .base import SchemaEventTarget as SchemaEventTarget +import operators +import TypeEngine + +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, default_comparator, op, *other, **kwargs): ... + def reverse_operate(self, default_comparator, 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, cls, **kw): ... + def coerce_compared_value(self, op, value): ... + def compile(self, dialect: Optional[Any] = ...): ... + +class VisitableCheckKWArg(util.EnsureKWArgType, VisitableType): ... + +class UserDefinedType: + __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..3b1b89a5d4bd --- /dev/null +++ b/third_party/2and3/sqlalchemy/sql/util.pyi @@ -0,0 +1,71 @@ +# Stubs for sqlalchemy.sql.util (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import visitors +from .base import _from_objects as _from_objects, 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 .annotation import _shallow_annotate as _shallow_annotate, _deep_annotate as _deep_annotate, _deep_deannotate as _deep_deannotate +from .elements import _find_columns as _find_columns +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: + 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: + 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..e7c100344401 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. diff --git a/third_party/2and3/sqlalchemy/testing/__init__.pyi b/third_party/2and3/sqlalchemy/testing/__init__.pyi new file mode 100644 index 000000000000..0b46b2c05f4b --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/__init__.pyi @@ -0,0 +1,16 @@ +# Stubs for sqlalchemy.testing (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .warnings import assert_warnings as assert_warnings +from .exclusions import db_spec as db_spec, _is_excluded as _is_excluded, fails_if as fails_if, skip_if as skip_if, future as future, fails_on as fails_on, fails_on_everything_except as fails_on_everything_except, skip as skip, only_on as only_on, exclude as exclude, _server_version as _server_version, only_if as only_if, fails as fails +from .exclusions import against as _against +from .assertions import emits_warning as emits_warning, emits_warning_on as emits_warning_on, uses_deprecated as uses_deprecated, eq_ as eq_, ne_ as ne_, le_ as le_, is_ as is_, is_not_ as is_not_, startswith_ as startswith_, assert_raises as assert_raises, assert_raises_message as assert_raises_message, AssertsCompiledSQL as AssertsCompiledSQL, ComparesTables as ComparesTables, AssertsExecutionResults as AssertsExecutionResults, expect_deprecated as expect_deprecated, expect_warnings as expect_warnings, in_ as in_, not_in_ as not_in_, eq_ignore_whitespace as eq_ignore_whitespace, eq_regex as eq_regex, is_true as is_true, is_false as is_false +from .util import run_as_contextmanager as run_as_contextmanager, rowset as rowset, fail as fail, provide_metadata as provide_metadata, adict as adict, force_drop_names as force_drop_names, teardown_events as teardown_events +from .config import db as db +from .config import requirements as requires + +def against(*queries): ... + +crashes = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/testing/assertions.pyi b/third_party/2and3/sqlalchemy/testing/assertions.pyi new file mode 100644 index 000000000000..be63707acbb7 --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/assertions.pyi @@ -0,0 +1,50 @@ +# Stubs for sqlalchemy.testing.assertions (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from . import util as testutil +from sqlalchemy import types as sqltypes, exc as sa_exc +from .exclusions import db_spec as db_spec, _is_excluded as _is_excluded +from .util import fail as fail + +def expect_warnings(*messages, **kw): ... +def expect_warnings_on(db, *messages, **kw): ... +def emits_warning(*messages): ... +def expect_deprecated(*messages, **kw): ... +def emits_warning_on(db, *messages): ... +def uses_deprecated(*messages): ... +def global_cleanup_assertions(): ... +def eq_regex(a, b, msg: Optional[Any] = ...): ... +def eq_(a, b, msg: Optional[Any] = ...): ... +def ne_(a, b, msg: Optional[Any] = ...): ... +def le_(a, b, msg: Optional[Any] = ...): ... +def is_true(a, msg: Optional[Any] = ...): ... +def is_false(a, msg: Optional[Any] = ...): ... +def is_(a, b, msg: Optional[Any] = ...): ... +def is_not_(a, b, msg: Optional[Any] = ...): ... +def in_(a, b, msg: Optional[Any] = ...): ... +def not_in_(a, b, msg: Optional[Any] = ...): ... +def startswith_(a, fragment, msg: Optional[Any] = ...): ... +def eq_ignore_whitespace(a, b, msg: Optional[Any] = ...): ... +def assert_raises(except_cls, callable_, *args, **kw): ... +def assert_raises_message(except_cls, msg, callable_, *args, **kwargs): ... + +class AssertsCompiledSQL: + def assert_compile(self, clause, result, params: Optional[Any] = ..., checkparams: Optional[Any] = ..., dialect: Optional[Any] = ..., checkpositional: Optional[Any] = ..., check_prefetch: Optional[Any] = ..., use_default_dialect: bool = ..., allow_dialect_select: bool = ..., literal_binds: bool = ..., schema_translate_map: Optional[Any] = ...): ... + +class ComparesTables: + def assert_tables_equal(self, table, reflected_table, strict_types: bool = ...): ... + def assert_types_base(self, c1, c2): ... + +class AssertsExecutionResults: + def assert_result(self, result, class_, *objects): ... + def assert_list(self, result, class_, list): ... + def assert_row(self, class_, rowobj, desc): ... + def assert_unordered_result(self, result, cls, *expected): ... + def sql_execution_asserter(self, db: Optional[Any] = ...): ... + def assert_sql_execution(self, db, callable_, *rules): ... + def assert_sql(self, db, callable_, rules): ... + def assert_sql_count(self, db, callable_, count): ... + def assert_execution(self, *rules): ... + def assert_statement_count(self, count): ... diff --git a/third_party/2and3/sqlalchemy/testing/assertsql.pyi b/third_party/2and3/sqlalchemy/testing/assertsql.pyi new file mode 100644 index 000000000000..d16970e14edf --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/assertsql.pyi @@ -0,0 +1,76 @@ +# Stubs for sqlalchemy.testing.assertsql (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ..engine.default import DefaultDialect as DefaultDialect + +class AssertRule: + is_consumed = ... # type: bool + errormessage = ... # type: Any + consume_statement = ... # type: bool + def process_statement(self, execute_observed): ... + def no_more_statements(self): ... + +class SQLMatchRule(AssertRule): ... + +class CursorSQL(SQLMatchRule): + consume_statement = ... # type: bool + statement = ... # type: Any + params = ... # type: Any + def __init__(self, statement, params: Optional[Any] = ...) -> None: ... + errormessage = ... # type: Any + is_consumed = ... # type: bool + def process_statement(self, execute_observed): ... + +class CompiledSQL(SQLMatchRule): + statement = ... # type: Any + params = ... # type: Any + dialect = ... # type: Any + def __init__(self, statement, params: Optional[Any] = ..., dialect: str = ...) -> None: ... + is_consumed = ... # type: bool + errormessage = ... # type: Any + def process_statement(self, execute_observed): ... + +class RegexSQL(CompiledSQL): + regex = ... # type: Any + orig_regex = ... # type: Any + params = ... # type: Any + dialect = ... # type: str + def __init__(self, regex, params: Optional[Any] = ...) -> None: ... + +class DialectSQL(CompiledSQL): ... + +class CountStatements(AssertRule): + count = ... # type: Any + def __init__(self, count) -> None: ... + def process_statement(self, execute_observed): ... + def no_more_statements(self): ... + +class AllOf(AssertRule): + rules = ... # type: Any + def __init__(self, *rules) -> None: ... + is_consumed = ... # type: bool + errormessage = ... # type: Any + def process_statement(self, execute_observed): ... + +class Or(AllOf): + is_consumed = ... # type: bool + errormessage = ... # type: Any + def process_statement(self, execute_observed): ... + +class SQLExecuteObserved: + context = ... # type: Any + clauseelement = ... # type: Any + parameters = ... # type: Any + statements = ... # type: Any + def __init__(self, context, clauseelement, multiparams, params) -> None: ... + +class SQLCursorExecuteObserved: ... + +class SQLAsserter: + accumulated = ... # type: Any + def __init__(self) -> None: ... + def assert_(self, *rules): ... + +def assert_engine(engine): ... diff --git a/third_party/2and3/sqlalchemy/testing/config.pyi b/third_party/2and3/sqlalchemy/testing/config.pyi new file mode 100644 index 000000000000..aa1bcb710b97 --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/config.pyi @@ -0,0 +1,40 @@ +# Stubs for sqlalchemy.testing.config (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from unittest import SkipTest as _skip_test_exception + +requirements = ... # type: Any +db = ... # type: Any +db_url = ... # type: Any +db_opts = ... # type: Any +file_config = ... # type: Any +test_schema = ... # type: Any +test_schema_2 = ... # type: Any + +class Config: + db = ... # type: Any + db_opts = ... # type: Any + options = ... # type: Any + file_config = ... # type: Any + test_schema = ... # type: str + test_schema_2 = ... # type: str + def __init__(self, db, db_opts, options, file_config) -> None: ... + @classmethod + def register(cls, db, db_opts, options, file_config): ... + @classmethod + def set_as_current(cls, config, namespace): ... + @classmethod + def push_engine(cls, db, namespace): ... + @classmethod + def push(cls, config, namespace): ... + @classmethod + def reset(cls, namespace): ... + @classmethod + def all_configs(cls): ... + @classmethod + def all_dbs(cls): ... + def skip_test(self, msg): ... + +def skip_test(msg): ... diff --git a/third_party/2and3/sqlalchemy/testing/engines.pyi b/third_party/2and3/sqlalchemy/testing/engines.pyi new file mode 100644 index 000000000000..067d2d74429d --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/engines.pyi @@ -0,0 +1,60 @@ +# Stubs for sqlalchemy.testing.engines (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from .util import decorator as decorator + +class ConnectionKiller: + proxy_refs = ... # type: Any + testing_engines = ... # type: Any + conns = ... # type: Any + def __init__(self) -> None: ... + def add_engine(self, engine): ... + def connect(self, dbapi_conn, con_record): ... + def checkout(self, dbapi_con, con_record, con_proxy): ... + def invalidate(self, dbapi_con, con_record, exception): ... + def rollback_all(self): ... + def close_all(self): ... + def assert_all_closed(self): ... + +testing_reaper = ... # type: Any + +def drop_all_tables(metadata, bind): ... +def assert_conns_closed(fn, *args, **kw): ... +def rollback_open_connections(fn, *args, **kw): ... +def close_first(fn, *args, **kw): ... +def close_open_connections(fn, *args, **kw): ... +def all_dialects(exclude: Optional[Any] = ...): ... + +class ReconnectFixture: + dbapi = ... # type: Any + connections = ... # type: Any + def __init__(self, dbapi) -> None: ... + def __getattr__(self, key): ... + def connect(self, *args, **kwargs): ... + def shutdown(self): ... + +def reconnecting_engine(url: Optional[Any] = ..., options: Optional[Any] = ...): ... +def testing_engine(url: Optional[Any] = ..., options: Optional[Any] = ...): ... +def mock_engine(dialect_name: Optional[Any] = ...): ... + +class DBAPIProxyCursor: + engine = ... # type: Any + connection = ... # type: Any + cursor = ... # type: Any + def __init__(self, engine, conn, *args, **kwargs) -> None: ... + def execute(self, stmt, parameters: Optional[Any] = ..., **kw): ... + def executemany(self, stmt, params, **kw): ... + def __getattr__(self, key): ... + +class DBAPIProxyConnection: + conn = ... # type: Any + engine = ... # type: Any + cursor_cls = ... # type: Any + def __init__(self, engine, cursor_cls) -> None: ... + def cursor(self, *args, **kwargs): ... + def close(self): ... + def __getattr__(self, key): ... + +def proxying_engine(conn_cls: Any = ..., cursor_cls: Any = ...): ... diff --git a/third_party/2and3/sqlalchemy/testing/entities.pyi b/third_party/2and3/sqlalchemy/testing/entities.pyi new file mode 100644 index 000000000000..16484b13fcfb --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/entities.pyi @@ -0,0 +1,13 @@ +# Stubs for sqlalchemy.testing.entities (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from sqlalchemy import exc as sa_exc + +class BasicEntity: + def __init__(self, **kw) -> None: ... + +class ComparableEntity(BasicEntity): + def __hash__(self): ... + def __ne__(self, other): ... + def __eq__(self, other): ... diff --git a/third_party/2and3/sqlalchemy/testing/exclusions.pyi b/third_party/2and3/sqlalchemy/testing/exclusions.pyi new file mode 100644 index 000000000000..a8cda6aed7a2 --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/exclusions.pyi @@ -0,0 +1,80 @@ +# Stubs for sqlalchemy.testing.exclusions (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ..util import decorator as decorator + +def skip_if(predicate, reason: Optional[Any] = ...): ... +def fails_if(predicate, reason: Optional[Any] = ...): ... + +class compound: + fails = ... # type: Any + skips = ... # type: Any + tags = ... # type: Any + def __init__(self) -> None: ... + def __add__(self, other): ... + def add(self, *others): ... + def not_(self): ... + @property + def enabled(self): ... + def enabled_for_config(self, config): ... + def matching_config_reasons(self, config): ... + def include_test(self, include_tags, exclude_tags): ... + def __call__(self, fn): ... + def fail_if(self): ... + +def requires_tag(tagname): ... +def tags(tagnames): ... +def only_if(predicate, reason: Optional[Any] = ...): ... +def succeeds_if(predicate, reason: Optional[Any] = ...): ... + +class Predicate: + @classmethod + def as_predicate(cls, predicate, description: Optional[Any] = ...): ... + +class BooleanPredicate(Predicate): + value = ... # type: Any + description = ... # type: Any + def __init__(self, value, description: Optional[Any] = ...) -> None: ... + def __call__(self, config): ... + +class SpecPredicate(Predicate): + db = ... # type: Any + op = ... # type: Any + spec = ... # type: Any + description = ... # type: Any + def __init__(self, db, op: Optional[Any] = ..., spec: Optional[Any] = ..., description: Optional[Any] = ...) -> None: ... + def __call__(self, config): ... + +class LambdaPredicate(Predicate): + lambda_ = ... # type: Any + args = ... # type: Any + kw = ... # type: Any + description = ... # type: Any + def __init__(self, lambda_, description: Optional[Any] = ..., args: Optional[Any] = ..., kw: Optional[Any] = ...) -> None: ... + def __call__(self, config): ... + +class NotPredicate(Predicate): + predicate = ... # type: Any + description = ... # type: Any + def __init__(self, predicate, description: Optional[Any] = ...) -> None: ... + def __call__(self, config): ... + +class OrPredicate(Predicate): + predicates = ... # type: Any + description = ... # type: Any + def __init__(self, predicates, description: Optional[Any] = ...) -> None: ... + def __call__(self, config): ... + +def db_spec(*dbs): ... +def open(): ... +def closed(): ... +def fails(reason: Optional[Any] = ...): ... +def future(fn, *arg): ... +def fails_on(db, reason: Optional[Any] = ...): ... +def fails_on_everything_except(*dbs): ... +def skip(db, reason: Optional[Any] = ...): ... +def only_on(dbs, reason: Optional[Any] = ...): ... +def exclude(db, op, spec, reason: Optional[Any] = ...): ... +def against(config, *queries): ... diff --git a/third_party/2and3/sqlalchemy/testing/fixtures.pyi b/third_party/2and3/sqlalchemy/testing/fixtures.pyi new file mode 100644 index 000000000000..979872080e80 --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/fixtures.pyi @@ -0,0 +1,78 @@ +# Stubs for sqlalchemy.testing.fixtures (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import assertions +from .util import adict as adict +from .engines import drop_all_tables as drop_all_tables +from .entities import BasicEntity as BasicEntity, ComparableEntity as ComparableEntity + +class TestBase: + __whitelist__ = ... # type: Any + __requires__ = ... # type: Any + __unsupported_on__ = ... # type: Any + __only_on__ = ... # type: Any + __skip_if__ = ... # type: Any + def assert_(self, val, msg: Optional[Any] = ...): ... + def setup(self): ... + def teardown(self): ... + +class TablesTest(TestBase): + run_setup_bind = ... # type: str + run_define_tables = ... # type: str + run_create_tables = ... # type: str + run_inserts = ... # type: str + run_deletes = ... # type: str + run_dispose_bind = ... # type: Any + bind = ... # type: Any + metadata = ... # type: Any + tables = ... # type: Any + other = ... # type: Any + @classmethod + def setup_class(cls): ... + def setup(self): ... + def teardown(self): ... + @classmethod + def teardown_class(cls): ... + @classmethod + def setup_bind(cls): ... + @classmethod + def dispose_bind(cls, bind): ... + @classmethod + def define_tables(cls, metadata): ... + @classmethod + def fixtures(cls): ... + @classmethod + def insert_data(cls): ... + def sql_count_(self, count, fn): ... + def sql_eq_(self, callable_, statements): ... + +class RemovesEvents: + def event_listen(self, target, name, fn): ... + def teardown(self): ... + +class _ORMTest: + @classmethod + def teardown_class(cls): ... + +class ORMTest(_ORMTest, TestBase): ... + +class MappedTest(_ORMTest, TablesTest, assertions.AssertsExecutionResults): + run_setup_classes = ... # type: str + run_setup_mappers = ... # type: str + classes = ... # type: Any + @classmethod + def setup_class(cls): ... + @classmethod + def teardown_class(cls): ... + def setup(self): ... + def teardown(self): ... + @classmethod + def setup_classes(cls): ... + @classmethod + def setup_mappers(cls): ... + +class DeclarativeMappedTest(MappedTest): + run_setup_classes = ... # type: str + run_setup_mappers = ... # type: str diff --git a/third_party/2and3/sqlalchemy/testing/mock.pyi b/third_party/2and3/sqlalchemy/testing/mock.pyi new file mode 100644 index 000000000000..e5f9b0abf969 --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/mock.pyi @@ -0,0 +1,5 @@ +# Stubs for sqlalchemy.testing.mock (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from ..util import py33 as py33 diff --git a/third_party/2and3/sqlalchemy/testing/pickleable.pyi b/third_party/2and3/sqlalchemy/testing/pickleable.pyi new file mode 100644 index 000000000000..a8659c88ebd3 --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/pickleable.pyi @@ -0,0 +1,65 @@ +# Stubs for sqlalchemy.testing.pickleable (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +import fixtures + +class User(fixtures.ComparableEntity): ... +class Order(fixtures.ComparableEntity): ... +class Dingaling(fixtures.ComparableEntity): ... +class EmailUser(User): ... +class Address(fixtures.ComparableEntity): ... +class Child1(fixtures.ComparableEntity): ... +class Child2(fixtures.ComparableEntity): ... +class Parent(fixtures.ComparableEntity): ... + +class Screen: + obj = ... # type: Any + parent = ... # type: Any + def __init__(self, obj, parent: Optional[Any] = ...) -> None: ... + +class Foo: + data = ... # type: str + stuff = ... # type: str + moredata = ... # type: Any + def __init__(self, moredata) -> None: ... + __hash__ = ... # type: Any + def __eq__(self, other): ... + +class Bar: + x = ... # type: Any + y = ... # type: Any + def __init__(self, x, y) -> None: ... + __hash__ = ... # type: Any + def __eq__(self, other): ... + +class OldSchool: + x = ... # type: Any + y = ... # type: Any + def __init__(self, x, y) -> None: ... + def __eq__(self, other): ... + +class OldSchoolWithoutCompare: + x = ... # type: Any + y = ... # type: Any + def __init__(self, x, y) -> None: ... + +class BarWithoutCompare: + x = ... # type: Any + y = ... # type: Any + def __init__(self, x, y) -> None: ... + +class NotComparable: + data = ... # type: Any + def __init__(self, data) -> None: ... + def __hash__(self): ... + def __eq__(self, other): ... + def __ne__(self, other): ... + +class BrokenComparable: + data = ... # type: Any + def __init__(self, data) -> None: ... + def __hash__(self): ... + def __eq__(self, other): ... + def __ne__(self, other): ... diff --git a/third_party/2and3/sqlalchemy/testing/plugin/__init__.pyi b/third_party/2and3/sqlalchemy/testing/plugin/__init__.pyi new file mode 100644 index 000000000000..5ee33609f81c --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/plugin/__init__.pyi @@ -0,0 +1,4 @@ +# Stubs for sqlalchemy.testing.plugin (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + diff --git a/third_party/2and3/sqlalchemy/testing/plugin/noseplugin.pyi b/third_party/2and3/sqlalchemy/testing/plugin/noseplugin.pyi new file mode 100644 index 000000000000..caaff382585b --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/plugin/noseplugin.pyi @@ -0,0 +1,25 @@ +# Stubs for sqlalchemy.testing.plugin.noseplugin (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from nose.plugins import Plugin + +fixtures = ... # type: Any +py3k = ... # type: Any + +class NoseSQLAlchemy(Plugin): + enabled = ... # type: bool + name = ... # type: str + score = ... # type: int + def options(self, parser, env: Any = ...): ... + def configure(self, options, conf): ... + def begin(self): ... + def describeTest(self, test): ... + def wantFunction(self, fn): ... + def wantMethod(self, fn): ... + def wantClass(self, cls): ... + def beforeTest(self, test): ... + def afterTest(self, test): ... + def startContext(self, ctx): ... + def stopContext(self, ctx): ... diff --git a/third_party/2and3/sqlalchemy/testing/plugin/plugin_base.pyi b/third_party/2and3/sqlalchemy/testing/plugin/plugin_base.pyi new file mode 100644 index 000000000000..4a04bf3b4438 --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/plugin/plugin_base.pyi @@ -0,0 +1,46 @@ +# Stubs for sqlalchemy.testing.plugin.plugin_base (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any + +py3k = ... # type: Any +fixtures = ... # type: Any +engines = ... # type: Any +exclusions = ... # type: Any +warnings = ... # type: Any +profiling = ... # type: Any +assertions = ... # type: Any +requirements = ... # type: Any +config = ... # type: Any +testing = ... # type: Any +util = ... # type: Any +file_config = ... # type: Any +logging = ... # type: Any +include_tags = ... # type: Any +exclude_tags = ... # type: Any +options = ... # type: Any + +def setup_options(make_option): ... +def configure_follower(follower_ident): ... +def memoize_important_follower_config(dict_): ... +def restore_important_follower_config(dict_): ... +def read_config(): ... +def pre_begin(opt): ... +def set_coverage_flag(value): ... +def set_skip_test(exc): ... +def post_begin(): ... + +pre_configure = ... # type: Any +post_configure = ... # type: Any + +def pre(fn): ... +def post(fn): ... +def want_class(cls): ... +def want_method(cls, fn): ... +def generate_sub_tests(cls, module): ... +def start_test_class(cls): ... +def stop_test_class(cls): ... +def final_process_cleanup(): ... +def before_test(test, test_module_name, test_class, test_name): ... +def after_test(test): ... diff --git a/third_party/2and3/sqlalchemy/testing/plugin/pytestplugin.pyi b/third_party/2and3/sqlalchemy/testing/plugin/pytestplugin.pyi new file mode 100644 index 000000000000..68614093fe05 --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/plugin/pytestplugin.pyi @@ -0,0 +1,20 @@ +# Stubs for sqlalchemy.testing.plugin.pytestplugin (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +has_xdist = ... # type: bool + +def pytest_addoption(parser): ... +def pytest_configure(config): ... +def pytest_sessionstart(session): ... +def pytest_sessionfinish(session): ... +def pytest_configure_node(node): ... +def pytest_testnodedown(node, error): ... +def pytest_collection_modifyitems(session, config, items): ... +def pytest_pycollect_makeitem(collector, name, obj): ... +def pytest_runtest_setup(item): ... +def pytest_runtest_teardown(item): ... +def test_setup(item): ... +def test_teardown(item): ... +def class_setup(item): ... +def class_teardown(item): ... diff --git a/third_party/2and3/sqlalchemy/testing/profiling.pyi b/third_party/2and3/sqlalchemy/testing/profiling.pyi new file mode 100644 index 000000000000..c2081b9141d7 --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/profiling.pyi @@ -0,0 +1,25 @@ +# Stubs for sqlalchemy.testing.profiling (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from .util import gc_collect as gc_collect +from ..util import jython as jython, pypy as pypy, win32 as win32, update_wrapper as update_wrapper + +cProfile = ... # type: Any + +class ProfileStatsFile: + force_write = ... # type: Any + write = ... # type: Any + fname = ... # type: Any + short_fname = ... # type: Any + data = ... # type: Any + def __init__(self, filename) -> None: ... + @property + def platform_key(self): ... + def has_stats(self): ... + def result(self, callcount): ... + def replace(self, callcount): ... + +def function_call_count(variance: float = ...): ... +def count_functions(variance: float = ...): ... diff --git a/third_party/2and3/sqlalchemy/testing/provision.pyi b/third_party/2and3/sqlalchemy/testing/provision.pyi new file mode 100644 index 000000000000..7e33d374532a --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/provision.pyi @@ -0,0 +1,23 @@ +# Stubs for sqlalchemy.testing.provision (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +from sqlalchemy.engine import url as sa_url + +log = ... # type: Any +FOLLOWER_IDENT = ... # type: Any + +class register: + fns = ... # type: Any + def __init__(self) -> None: ... + @classmethod + def init(cls, fn): ... + def for_db(self, dbname): ... + def __call__(self, cfg, *arg): ... + +def create_follower_db(follower_ident): ... +def configure_follower(follower_ident): ... +def setup_config(db_url, options, file_config, follower_ident): ... +def drop_follower_db(follower_ident): ... +def reap_oracle_dbs(eng, idents_file): ... diff --git a/third_party/2and3/sqlalchemy/testing/replay_fixture.pyi b/third_party/2and3/sqlalchemy/testing/replay_fixture.pyi new file mode 100644 index 000000000000..76121ad6ebd4 --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/replay_fixture.pyi @@ -0,0 +1,31 @@ +# Stubs for sqlalchemy.testing.replay_fixture (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any +import fixtures + +class ReplayFixtureTest(fixtures.TestBase): + metadata = ... # type: Any + engine = ... # type: Any + session = ... # type: Any + def test_invocation(self): ... + def setup_engine(self): ... + def teardown_engine(self): ... + +class ReplayableSession: + Callable = ... # type: Any + NoAttribute = ... # type: Any + Natives = ... # type: Any + buffer = ... # type: Any + def __init__(self) -> None: ... + def recorder(self, base): ... + def player(self): ... + class Recorder: + def __init__(self, buffer, subject) -> None: ... + def __call__(self, *args, **kw): ... + def __getattribute__(self, key): ... + class Player: + def __init__(self, buffer) -> None: ... + def __call__(self, *args, **kw): ... + def __getattribute__(self, key): ... diff --git a/third_party/2and3/sqlalchemy/testing/requirements.pyi b/third_party/2and3/sqlalchemy/testing/requirements.pyi new file mode 100644 index 000000000000..0413f8bdd1cf --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/requirements.pyi @@ -0,0 +1,211 @@ +# Stubs for sqlalchemy.testing.requirements (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +class Requirements: ... + +class SuiteRequirements(Requirements): + @property + def create_table(self): ... + @property + def drop_table(self): ... + @property + def foreign_keys(self): ... + @property + def on_update_cascade(self): ... + @property + def non_updating_cascade(self): ... + @property + def deferrable_fks(self): ... + @property + def on_update_or_deferrable_fks(self): ... + @property + def self_referential_foreign_keys(self): ... + @property + def foreign_key_ddl(self): ... + @property + def named_constraints(self): ... + @property + def subqueries(self): ... + @property + def offset(self): ... + @property + def bound_limit_offset(self): ... + @property + def parens_in_union_contained_select_w_limit_offset(self): ... + @property + def parens_in_union_contained_select_wo_limit_offset(self): ... + @property + def boolean_col_expressions(self): ... + @property + def nullsordering(self): ... + @property + def standalone_binds(self): ... + @property + def intersect(self): ... + @property + def except_(self): ... + @property + def window_functions(self): ... + @property + def autoincrement_insert(self): ... + @property + def fetch_rows_post_commit(self): ... + @property + def empty_inserts(self): ... + @property + def insert_from_select(self): ... + @property + def returning(self): ... + @property + def duplicate_names_in_cursor_description(self): ... + @property + def denormalized_names(self): ... + @property + def multivalues_inserts(self): ... + @property + def implements_get_lastrowid(self): ... + @property + def emulated_lastrowid(self): ... + @property + def dbapi_lastrowid(self): ... + @property + def views(self): ... + @property + def schemas(self): ... + @property + def server_side_cursors(self): ... + @property + def sequences(self): ... + @property + def sequences_optional(self): ... + @property + def reflects_pk_names(self): ... + @property + def table_reflection(self): ... + @property + def view_column_reflection(self): ... + @property + def view_reflection(self): ... + @property + def schema_reflection(self): ... + @property + def primary_key_constraint_reflection(self): ... + @property + def foreign_key_constraint_reflection(self): ... + @property + def foreign_key_constraint_option_reflection(self): ... + @property + def temp_table_reflection(self): ... + @property + def temp_table_names(self): ... + @property + def temporary_tables(self): ... + @property + def temporary_views(self): ... + @property + def index_reflection(self): ... + @property + def unique_constraint_reflection(self): ... + @property + def duplicate_key_raises_integrity_error(self): ... + @property + def unbounded_varchar(self): ... + @property + def unicode_data(self): ... + @property + def unicode_ddl(self): ... + @property + def datetime_literals(self): ... + @property + def datetime(self): ... + @property + def datetime_microseconds(self): ... + @property + def datetime_historic(self): ... + @property + def date(self): ... + @property + def date_coerces_from_datetime(self): ... + @property + def date_historic(self): ... + @property + def time(self): ... + @property + def time_microseconds(self): ... + @property + def binary_comparisons(self): ... + @property + def binary_literals(self): ... + @property + def json_type(self): ... + @property + def json_array_indexes(self): ... + @property + def precision_numerics_general(self): ... + @property + def precision_numerics_enotation_small(self): ... + @property + def precision_numerics_enotation_large(self): ... + @property + def precision_numerics_many_significant_digits(self): ... + @property + def precision_numerics_retains_significant_digits(self): ... + @property + def precision_generic_float_type(self): ... + @property + def floats_to_four_decimals(self): ... + @property + def fetch_null_from_numeric(self): ... + @property + def text_type(self): ... + @property + def empty_strings_varchar(self): ... + @property + def empty_strings_text(self): ... + @property + def selectone(self): ... + @property + def savepoints(self): ... + @property + def two_phase_transactions(self): ... + @property + def update_from(self): ... + @property + def update_where_target_in_subquery(self): ... + @property + def mod_operator_as_percent_sign(self): ... + @property + def percent_schema_names(self): ... + @property + def order_by_label_with_expression(self): ... + @property + def unicode_connections(self): ... + @property + def graceful_disconnects(self): ... + @property + def skip_mysql_on_windows(self): ... + @property + def ad_hoc_engines(self): ... + @property + def timing_intensive(self): ... + @property + def memory_intensive(self): ... + @property + def threading_with_mock(self): ... + @property + def python2(self): ... + @property + def python3(self): ... + @property + def cpython(self): ... + @property + def non_broken_pickle(self): ... + @property + def predictable_gc(self): ... + @property + def no_coverage(self): ... + @property + def sqlite(self): ... + @property + def cextensions(self): ... diff --git a/third_party/2and3/sqlalchemy/testing/runner.pyi b/third_party/2and3/sqlalchemy/testing/runner.pyi new file mode 100644 index 000000000000..a4f200f657b5 --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/runner.pyi @@ -0,0 +1,8 @@ +# Stubs for sqlalchemy.testing.runner (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from .plugin.noseplugin import NoseSQLAlchemy as NoseSQLAlchemy + +def main(): ... +def setup_py_test(): ... diff --git a/third_party/2and3/sqlalchemy/testing/schema.pyi b/third_party/2and3/sqlalchemy/testing/schema.pyi new file mode 100644 index 000000000000..12930bbbe382 --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/schema.pyi @@ -0,0 +1,6 @@ +# Stubs for sqlalchemy.testing.schema (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +def Table(*args, **kw): ... +def Column(*args, **kw): ... diff --git a/third_party/2and3/sqlalchemy/testing/util.pyi b/third_party/2and3/sqlalchemy/testing/util.pyi new file mode 100644 index 000000000000..eeb76a344dfb --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/util.pyi @@ -0,0 +1,41 @@ +# Stubs for sqlalchemy.testing.util (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from ..util import jython as jython, pypy as pypy, defaultdict as defaultdict, decorator as decorator, py2k as py2k + +def jython_gc_collect(*args): ... + +gc_collect = ... # type: Any + +lazy_gc = ... # type: Any + +def pypy_gc_collect(*args): ... +def picklers(): ... +def round_decimal(value, prec): ... + +class RandomSet(set): + def __iter__(self): ... + def pop(self): ... + def union(self, other): ... + def difference(self, other): ... + def intersection(self, other): ... + def copy(self): ... + +def conforms_partial_ordering(tuples, sorted_elements): ... +def all_partial_orderings(tuples, elements): ... +def function_named(fn, name): ... +def run_as_contextmanager(ctx, fn, *arg, **kw): ... +def rowset(results): ... +def fail(msg): ... +def provide_metadata(fn, *args, **kw): ... +def force_drop_names(*names): ... + +class adict(dict): + def __getattribute__(self, key): ... + def __call__(self, *keys): ... + get_all = ... # type: Any + +def drop_all_tables(engine, inspector, schema: Optional[Any] = ..., include_names: Optional[Any] = ...): ... +def teardown_events(event_cls): ... diff --git a/third_party/2and3/sqlalchemy/testing/warnings.pyi b/third_party/2and3/sqlalchemy/testing/warnings.pyi new file mode 100644 index 000000000000..cc5b0a537b56 --- /dev/null +++ b/third_party/2and3/sqlalchemy/testing/warnings.pyi @@ -0,0 +1,8 @@ +# Stubs for sqlalchemy.testing.warnings (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from .. import exc as sa_exc + +def setup_filters(): ... +def assert_warnings(fn, warning_msgs, regex: bool = ...): ... diff --git a/third_party/2and3/sqlalchemy/types.pyi b/third_party/2and3/sqlalchemy/types.pyi index 7aa160cab678..e24b4fc635b3 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 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..b8129cefcaa1 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,7 +11,7 @@ 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): @@ -24,9 +20,15 @@ class _LW(AbstractKeyedTuple): class ImmutableContainer: __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): ... @@ -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): ... @@ -106,7 +108,7 @@ class OrderedSet(set): __isub__ = ... # type: Any class IdentitySet: - def __init__(self, iterable=...) -> None: ... + def __init__(self, iterable: Optional[Any] = ...) -> None: ... def add(self, value): ... def __contains__(self, value): ... def remove(self, value): ... @@ -145,7 +147,7 @@ class IdentitySet: def __hash__(self): ... class WeakSequence: - def __init__(self, __elements=...) -> None: ... + def __init__(self, __elements: Any = ...) -> None: ... def append(self, item): ... def __len__(self): ... def __iter__(self): ... @@ -153,40 +155,40 @@ 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 def __init__(self, creator) -> None: ... def __missing__(self, key): ... -column_set = set -column_dict = dict -ordered_column_set = OrderedSet -populate_column_dict = PopulateDict +column_set = ... # type: Any +column_dict = ... # type: Any +ordered_column_set = ... # type: Any +populate_column_dict = ... # type: Any -def unique_list(seq, hashfunc=...): ... +def unique_list(seq, hashfunc: Optional[Any] = ...): ... class UniqueAppender: 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): ... diff --git a/third_party/2and3/sqlalchemy/util/compat.pyi b/third_party/2and3/sqlalchemy/util/compat.pyi index 191222ccfb96..fda71e494b12 100644 --- a/third_party/2and3/sqlalchemy/util/compat.pyi +++ b/third_party/2and3/sqlalchemy/util/compat.pyi @@ -1,21 +1,17 @@ -# 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 +from typing import Any, Optional 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 inspect import getfullargspec as inspect_getfullargspec from io import BytesIO as byte_buffer - +from inspect import getargspec as inspect_getfullargspec +from cStringIO import StringIO as byte_buffer +from itertools import izip_longest as zip_longest from operator import attrgetter as dottedgetter -from six.moves import zip_longest - +py36 = ... # type: Any py33 = ... # type: Any py32 = ... # type: Any py3k = ... # type: Any @@ -33,13 +29,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 +text_type = ... # type: Any 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 +52,17 @@ 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): ... - +inspect_getargspec = ... # type: Any +cmp = ... # type: Any reduce = ... # type: Any - -def print_(*args, **kwargs): ... - +b64encode = ... # type: Any +b64decode = ... # type: Any 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..3b842a2524e8 100644 --- a/third_party/2and3/sqlalchemy/util/langhelpers.pyi +++ b/third_party/2and3/sqlalchemy/util/langhelpers.pyi @@ -1,9 +1,9 @@ -# 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 . import compat +from typing import Any, Optional +import compat def md5_hex(x): ... @@ -20,19 +20,19 @@ class PluginLoader: 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: target = ... # type: Any @@ -42,14 +42,15 @@ 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: 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): ... @@ -58,7 +59,7 @@ def memoized_instancemethod(fn): ... class group_expirable_memoized_property: 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): ... @@ -83,14 +84,15 @@ 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): ... @@ -105,16 +107,16 @@ class hybridmethod: 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: 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..1cb4fc6d47fb --- /dev/null +++ b/third_party/2and3/sqlalchemy/util/queue.pyi @@ -0,0 +1,22 @@ +# Stubs for sqlalchemy.util.queue (Python 3.6) +# +# NOTE: This dynamically typed stub was automatically generated by stubgen. + +from typing import Any, Optional +from time import time as _time + +class Empty(Exception): ... +class Full(Exception): ... + +class Queue: + mutex = ... # type: Any + not_empty = ... # type: Any + not_full = ... # type: 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): ... From 1468798a6ef30b89634c1fa7874757314166fd3c Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Wed, 22 Mar 2017 22:41:24 -0700 Subject: [PATCH 02/16] bring back improvements from the manually curated stubs Went over the diff between current typeshed and my regenerated stubs. --- third_party/2and3/sqlalchemy/__init__.pyi | 126 +++++++++++++++++- .../sqlalchemy/dialects/mysql/__init__.pyi | 40 +++++- .../2and3/sqlalchemy/engine/interfaces.pyi | 10 +- .../2and3/sqlalchemy/engine/result.pyi | 29 ++-- third_party/2and3/sqlalchemy/log.pyi | 2 + third_party/2and3/sqlalchemy/orm/util.pyi | 9 +- .../2and3/sqlalchemy/sql/annotation.pyi | 6 + third_party/2and3/sqlalchemy/sql/base.pyi | 1 + .../2and3/sqlalchemy/sql/expression.pyi | 23 ++++ .../2and3/sqlalchemy/util/_collections.pyi | 8 +- third_party/2and3/sqlalchemy/util/compat.pyi | 4 +- 11 files changed, 228 insertions(+), 30 deletions(-) diff --git a/third_party/2and3/sqlalchemy/__init__.pyi b/third_party/2and3/sqlalchemy/__init__.pyi index e6d116f3cf7d..f1852553663b 100644 --- a/third_party/2and3/sqlalchemy/__init__.pyi +++ b/third_party/2and3/sqlalchemy/__init__.pyi @@ -2,8 +2,126 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from .sql import 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 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 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 .sql import ( + 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 ( + 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 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 .engine import ( + create_engine as create_engine, + engine_from_config as engine_from_config +) diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/__init__.pyi index 76a94c19f77a..8e692cae226f 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/__init__.pyi @@ -2,4 +2,42 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -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, dialect as 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, + dialect as dialect +) diff --git a/third_party/2and3/sqlalchemy/engine/interfaces.pyi b/third_party/2and3/sqlalchemy/engine/interfaces.pyi index a6cd99ff6f45..a47b6cfb2f2e 100644 --- a/third_party/2and3/sqlalchemy/engine/interfaces.pyi +++ b/third_party/2and3/sqlalchemy/engine/interfaces.pyi @@ -4,6 +4,8 @@ from typing import Any, Optional from ..sql.compiler import Compiled as Compiled, TypeCompiler as TypeCompiler +from .base import Connection +from .result import ResultProxy class Dialect: def create_connect_args(self, url): ... @@ -73,12 +75,12 @@ class ExecutionContext: def get_rowcount(self): ... class Connectable: - def connect(self, **kwargs): ... - def contextual_connect(self): ... + def connect(self, **kwargs: Any) -> Connection: ... + def contextual_connect(self) -> Connection: ... def create(self, entity, **kwargs): ... def drop(self, entity, **kwargs): ... - def execute(self, object, *multiparams, **params): ... - def scalar(self, object, *multiparams, **params): ... + def execute(self, object, *multiparams: Any, **params: Any) -> ResultProxy: ... + def scalar(self, object, *multiparams: Any, **params: Any) -> Any: ... class ExceptionContext: connection = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/engine/result.pyi b/third_party/2and3/sqlalchemy/engine/result.pyi index e4bb5f194d0d..ec38aab84717 100644 --- a/third_party/2and3/sqlalchemy/engine/result.pyi +++ b/third_party/2and3/sqlalchemy/engine/result.pyi @@ -2,14 +2,17 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any, Optional +# Note: The value type `Any` should be a DB API 2 value type once defined +# TODO: See #1037 + +from typing import Any, Mapping, Optional from ..sql import expression as expression, sqltypes as sqltypes from ..sql import util as sql_util from sqlalchemy.cresultproxy import BaseRowProxy def rowproxy_reconstructor(cls, state): ... -class BaseRowProxy: +class BaseRowProxy(Mapping[str, Any]): def __init__(self, parent, row, processors, keymap) -> None: ... def __reduce__(self): ... def values(self): ... @@ -38,7 +41,7 @@ class ResultMetaData: matched_on_name = ... # type: bool def __init__(self, parent, cursor_description) -> None: ... -class ResultProxy: +class ResultProxy(Mapping[str, Any]): out_parameters = ... # type: Any closed = ... # type: bool context = ... # type: Any @@ -46,16 +49,16 @@ class ResultProxy: cursor = ... # type: Any connection = ... # type: Any def __init__(self, context) -> None: ... - def keys(self): ... - def rowcount(self): ... + def keys(self) -> List[str]: ... + def rowcount(self) -> int: ... @property def lastrowid(self): ... @property def returns_rows(self): ... @property def is_insert(self): ... - def close(self): ... - def __iter__(self): ... + def close(self) -> None: ... + def __iter__(self) -> Iterator[RowProxy]: ... def inserted_primary_key(self): ... def last_updated_params(self): ... def last_inserted_params(self): ... @@ -67,11 +70,13 @@ class ResultProxy: def supports_sane_rowcount(self): ... def supports_sane_multi_rowcount(self): ... def process_rows(self, rows): ... - def fetchall(self): ... - def fetchmany(self, size: Optional[Any] = ...): ... - def fetchone(self): ... - def first(self): ... - def scalar(self): ... + def fetchall(self) -> 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: ... class BufferedRowResultProxy(ResultProxy): size_growth = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/log.pyi b/third_party/2and3/sqlalchemy/log.pyi index 4c6c61617ea1..fcca2067c7ff 100644 --- a/third_party/2and3/sqlalchemy/log.pyi +++ b/third_party/2and3/sqlalchemy/log.pyi @@ -10,6 +10,8 @@ def class_logger(cls): ... class Identified: logging_name = ... # type: Any + def _should_log_debug(self) -> bool: ... + def _should_log_info(self) -> bool: ... class InstanceLogger: echo = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/orm/util.pyi b/third_party/2and3/sqlalchemy/orm/util.pyi index 3c8e3daf0a7a..c91395f17568 100644 --- a/third_party/2and3/sqlalchemy/orm/util.pyi +++ b/third_party/2and3/sqlalchemy/orm/util.pyi @@ -2,7 +2,9 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any, Optional +from typing import Any, Optional, Text +from ..sql.selectable import FromClause + import sql_util import expression from .. import exc as sa_exc @@ -14,6 +16,7 @@ from .base import class_mapper as class_mapper, _class_to_mapper as _class_to_ma from .base import InspectionAttr as InspectionAttr from .path_registry import PathRegistry as PathRegistry + all_cascades = ... # type: Any class CascadeOptions(frozenset): @@ -37,7 +40,7 @@ class ORMAdapter(sql_util.ColumnAdapter): class AliasedClass: __name__ = ... # type: Any - def __init__(self, cls, alias: Optional[Any] = ..., name: Optional[Any] = ..., 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 __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): ... class AliasedInsp(InspectionAttr): @@ -52,7 +55,7 @@ class AliasedInsp(InspectionAttr): @property def class_(self): ... -def aliased(element, alias: Optional[Any] = ..., name: Optional[Any] = ..., flat: bool = ..., adapt_on_names: bool = ...): ... +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): diff --git a/third_party/2and3/sqlalchemy/sql/annotation.pyi b/third_party/2and3/sqlalchemy/sql/annotation.pyi index afb8104b7771..357600ca1028 100644 --- a/third_party/2and3/sqlalchemy/sql/annotation.pyi +++ b/third_party/2and3/sqlalchemy/sql/annotation.pyi @@ -10,5 +10,11 @@ class Annotated: 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 _compiler_dispatch(self, visitor, **kw): ... + def _constructor(self): ... + def _clone(self): ... annotated_classes = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/base.pyi b/third_party/2and3/sqlalchemy/sql/base.pyi index 353f881c1c77..77ae48a4b6c8 100644 --- a/third_party/2and3/sqlalchemy/sql/base.pyi +++ b/third_party/2and3/sqlalchemy/sql/base.pyi @@ -13,6 +13,7 @@ NO_ARG = ... # type: Any class Immutable: def unique_params(self, *optionaldict, **kwargs): ... def params(self, *optionaldict, **kwargs): ... + def _clone(self) -> Immutable: ... class _DialectArgView(collections.MutableMapping): obj = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/expression.pyi b/third_party/2and3/sqlalchemy/sql/expression.pyi index 3396ccc9f19a..21e4cf110a55 100644 --- a/third_party/2and3/sqlalchemy/sql/expression.pyi +++ b/third_party/2and3/sqlalchemy/sql/expression.pyi @@ -44,3 +44,26 @@ outerjoin = ... # type: Any insert = ... # type: Any update = ... # type: Any delete = ... # type: Any + +# old names for compatibility +_Executable = Executable +_BindParamClause = BindParameter +_Label = Label +_SelectBase = SelectBase +_BinaryExpression = BinaryExpression +_Cast = Cast +_Null = Null +_False = False_ +_True = True_ +_TextClause = TextClause +_UnaryExpression = UnaryExpression +_Case = Case +_Tuple = Tuple +_Over = Over +_Generative = Generative +_TypeClause = TypeClause +_Extract = Extract +_Exists = Exists +_Grouping = Grouping +_FromGrouping = FromGrouping +_ScalarSelect = ScalarSelect diff --git a/third_party/2and3/sqlalchemy/util/_collections.pyi b/third_party/2and3/sqlalchemy/util/_collections.pyi index b8129cefcaa1..0b438decd1a7 100644 --- a/third_party/2and3/sqlalchemy/util/_collections.pyi +++ b/third_party/2and3/sqlalchemy/util/_collections.pyi @@ -163,10 +163,10 @@ class PopulateDict(dict): def __init__(self, creator) -> None: ... def __missing__(self, key): ... -column_set = ... # type: Any -column_dict = ... # type: Any -ordered_column_set = ... # type: Any -populate_column_dict = ... # type: Any +column_set = set +column_dict = dict +ordered_column_set = OrderedSet +populate_column_dict = PopulateDict def unique_list(seq, hashfunc: Optional[Any] = ...): ... diff --git a/third_party/2and3/sqlalchemy/util/compat.pyi b/third_party/2and3/sqlalchemy/util/compat.pyi index fda71e494b12..8598a6d9f388 100644 --- a/third_party/2and3/sqlalchemy/util/compat.pyi +++ b/third_party/2and3/sqlalchemy/util/compat.pyi @@ -2,7 +2,7 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any, Optional +from typing import Any, Optional, Text from collections import namedtuple from inspect import getfullargspec as inspect_getfullargspec from io import BytesIO as byte_buffer @@ -31,7 +31,7 @@ def inspect_getargspec(func): ... string_types = ... # type: Any binary_types = ... # type: Any binary_type = ... # type: Any -text_type = ... # type: Any +text_type = Text int_types = ... # type: Any iterbytes = ... # type: Any From 170b9d759dc5fc04826397175c8e9dcfcbc5d92b Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 24 Mar 2017 08:52:09 -0700 Subject: [PATCH 03/16] make mypy accept the stubs --- .../2and3/sqlalchemy/connectors/mxodbc.pyi | 1 + .../2and3/sqlalchemy/connectors/pyodbc.pyi | 1 + .../2and3/sqlalchemy/connectors/zxJDBC.pyi | 1 + .../2and3/sqlalchemy/dialects/__init__.pyi | 4 ++++ .../sqlalchemy/dialects/firebird/base.pyi | 10 ++++++---- .../dialects/firebird/kinterbasdb.pyi | 2 +- .../2and3/sqlalchemy/dialects/mssql/base.pyi | 5 ++--- .../dialects/mssql/information_schema.pyi | 1 - .../sqlalchemy/dialects/mssql/pymssql.pyi | 2 +- .../sqlalchemy/dialects/mssql/pyodbc.pyi | 2 +- .../2and3/sqlalchemy/dialects/mysql/base.pyi | 3 +-- .../sqlalchemy/dialects/mysql/enumerated.pyi | 2 +- .../2and3/sqlalchemy/dialects/mysql/json.pyi | 3 +-- .../2and3/sqlalchemy/dialects/mysql/types.pyi | 2 +- .../2and3/sqlalchemy/dialects/oracle/base.pyi | 10 +++++----- .../sqlalchemy/dialects/oracle/cx_oracle.pyi | 5 +---- .../sqlalchemy/dialects/oracle/zxjdbc.pyi | 4 +--- .../sqlalchemy/dialects/postgresql/array.pyi | 3 --- .../sqlalchemy/dialects/postgresql/base.pyi | 12 ++++++----- .../sqlalchemy/dialects/postgresql/ext.pyi | 1 - .../sqlalchemy/dialects/postgresql/hstore.pyi | 4 ---- .../sqlalchemy/dialects/postgresql/json.pyi | 4 +--- .../sqlalchemy/dialects/postgresql/pg8000.pyi | 2 +- .../dialects/postgresql/psycopg2.pyi | 2 +- .../dialects/postgresql/pypostgresql.pyi | 2 +- .../sqlalchemy/dialects/postgresql/ranges.pyi | 3 +-- .../2and3/sqlalchemy/dialects/sqlite/base.pyi | 5 ++--- .../2and3/sqlalchemy/dialects/sybase/base.pyi | 12 +++++++---- .../sqlalchemy/dialects/sybase/pyodbc.pyi | 2 +- .../sqlalchemy/dialects/sybase/pysybase.pyi | 2 +- third_party/2and3/sqlalchemy/engine/base.pyi | 2 +- .../2and3/sqlalchemy/engine/default.pyi | 2 +- .../2and3/sqlalchemy/engine/result.pyi | 1 - .../2and3/sqlalchemy/engine/strategies.pyi | 2 +- .../2and3/sqlalchemy/engine/threadlocal.pyi | 2 +- third_party/2and3/sqlalchemy/events.pyi | 2 +- .../2and3/sqlalchemy/ext/associationproxy.pyi | 2 +- third_party/2and3/sqlalchemy/ext/baked.pyi | 2 -- .../2and3/sqlalchemy/ext/declarative/api.pyi | 2 +- third_party/2and3/sqlalchemy/ext/hybrid.pyi | 2 +- .../2and3/sqlalchemy/orm/attributes.pyi | 6 +++--- .../2and3/sqlalchemy/orm/descriptor_props.pyi | 2 +- third_party/2and3/sqlalchemy/orm/dynamic.pyi | 4 ++-- third_party/2and3/sqlalchemy/orm/events.pyi | 3 +-- .../2and3/sqlalchemy/orm/interfaces.pyi | 2 +- third_party/2and3/sqlalchemy/orm/query.pyi | 2 +- third_party/2and3/sqlalchemy/orm/state.pyi | 2 +- .../2and3/sqlalchemy/orm/strategies.pyi | 2 +- third_party/2and3/sqlalchemy/pool.pyi | 2 +- third_party/2and3/sqlalchemy/sql/base.pyi | 2 +- third_party/2and3/sqlalchemy/sql/compiler.pyi | 2 +- third_party/2and3/sqlalchemy/sql/crud.pyi | 2 +- third_party/2and3/sqlalchemy/sql/ddl.pyi | 1 - third_party/2and3/sqlalchemy/sql/elements.pyi | 7 +++---- third_party/2and3/sqlalchemy/sql/schema.pyi | 4 +--- .../2and3/sqlalchemy/sql/selectable.pyi | 5 +---- third_party/2and3/sqlalchemy/sql/sqltypes.pyi | 4 ---- third_party/2and3/sqlalchemy/sql/type_api.pyi | 5 ++--- third_party/2and3/sqlalchemy/sql/util.pyi | 2 +- third_party/2and3/sqlalchemy/util/compat.pyi | 20 ++++++++++++------- .../2and3/sqlalchemy/util/langhelpers.pyi | 2 +- 61 files changed, 98 insertions(+), 114 deletions(-) diff --git a/third_party/2and3/sqlalchemy/connectors/mxodbc.pyi b/third_party/2and3/sqlalchemy/connectors/mxodbc.pyi index efe482bdb9fb..e476e8bf95a5 100644 --- a/third_party/2and3/sqlalchemy/connectors/mxodbc.pyi +++ b/third_party/2and3/sqlalchemy/connectors/mxodbc.pyi @@ -3,6 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional +from . import Connector class MxODBCConnector(Connector): driver = ... # type: str diff --git a/third_party/2and3/sqlalchemy/connectors/pyodbc.pyi b/third_party/2and3/sqlalchemy/connectors/pyodbc.pyi index 9eeb6164cc2d..1e37a552f595 100644 --- a/third_party/2and3/sqlalchemy/connectors/pyodbc.pyi +++ b/third_party/2and3/sqlalchemy/connectors/pyodbc.pyi @@ -3,6 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional +from . import Connector class PyODBCConnector(Connector): driver = ... # type: str diff --git a/third_party/2and3/sqlalchemy/connectors/zxJDBC.pyi b/third_party/2and3/sqlalchemy/connectors/zxJDBC.pyi index 9efdc943e6ea..d647608e721a 100644 --- a/third_party/2and3/sqlalchemy/connectors/zxJDBC.pyi +++ b/third_party/2and3/sqlalchemy/connectors/zxJDBC.pyi @@ -3,6 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any +from . import Connector class ZxJDBCConnector(Connector): driver = ... # type: str diff --git a/third_party/2and3/sqlalchemy/dialects/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/__init__.pyi index 8c64af41ff15..b104b7a129a0 100644 --- a/third_party/2and3/sqlalchemy/dialects/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/__init__.pyi @@ -10,3 +10,7 @@ # postgresql # sqlite # sybase +from . import util + +registry = ... # type: util.PluginLoader +plugins = ... # type: util.PluginLoader diff --git a/third_party/2and3/sqlalchemy/dialects/firebird/base.pyi b/third_party/2and3/sqlalchemy/dialects/firebird/base.pyi index 056c0794252e..45c23651ac66 100644 --- a/third_party/2and3/sqlalchemy/dialects/firebird/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/firebird/base.pyi @@ -3,13 +3,15 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sqltypes -import compiler -import sql.compiler -import default +from sqlalchemy.sql import sqltypes +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): diff --git a/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi b/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi index 19aba9d36eca..c6a8fd13fe5d 100644 --- a/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi +++ b/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sqltypes +from sqlalchemy.sql import sqltypes from .base import FBDialect as FBDialect, FBExecutionContext as FBExecutionContext from ... import types as sqltypes diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/base.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/base.pyi index c64ecafd3f16..b0193dc86242 100644 --- a/third_party/2and3/sqlalchemy/dialects/mssql/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mssql/base.pyi @@ -3,9 +3,8 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sqltypes -import compiler -import default +from sqlalchemy.sql import sqltypes +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 diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/information_schema.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/information_schema.pyi index a4517666985e..4e20d673c6af 100644 --- a/third_party/2and3/sqlalchemy/dialects/mssql/information_schema.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mssql/information_schema.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -import expression 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 diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/pymssql.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/pymssql.pyi index 5a3a165f9afd..2cb081366d4e 100644 --- a/third_party/2and3/sqlalchemy/dialects/mssql/pymssql.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mssql/pymssql.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -import sqltypes +from sqlalchemy.sql import sqltypes from .base import MSDialect as MSDialect from ... import types as sqltypes diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi index cc71f7266185..c06f16a1b7e1 100644 --- a/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sqltypes +from sqlalchemy.sql import sqltypes from .base import MSExecutionContext as MSExecutionContext, MSDialect as MSDialect, VARBINARY as VARBINARY from ...connectors.pyodbc import PyODBCConnector as PyODBCConnector from ... import types as sqltypes diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi index dfa79b7e8d3f..a49b402b50e7 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi @@ -3,8 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import default -import compiler +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 diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/enumerated.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/enumerated.pyi index b5bc3719172d..3df1a5a71423 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/enumerated.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/enumerated.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -import sqltypes +from sqlalchemy.sql import sqltypes from .types import _StringType as _StringType from ... import types as sqltypes diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi index a9f001ba18d1..fa673fdb6761 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi @@ -2,8 +2,7 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -import sqltypes -import sqltypes.JSON +from sqlalchemy.sql import sqltypes from ...sql import elements as elements from ... import types as sqltypes diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi index f0916b66d5c3..c7db07c002e7 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sqltypes +from sqlalchemy.sql import sqltypes from ... import types as sqltypes class _NumericType: diff --git a/third_party/2and3/sqlalchemy/dialects/oracle/base.pyi b/third_party/2and3/sqlalchemy/dialects/oracle/base.pyi index 2c27dffd3f7c..b11b5e9d2371 100644 --- a/third_party/2and3/sqlalchemy/dialects/oracle/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/oracle/base.pyi @@ -3,14 +3,14 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sqltypes -import compiler -import default -import sql +from sqlalchemy.sql import sqltypes +from sqlalchemy.sql import compiler +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 +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 diff --git a/third_party/2and3/sqlalchemy/dialects/oracle/cx_oracle.pyi b/third_party/2and3/sqlalchemy/dialects/oracle/cx_oracle.pyi index 33f5e01a5020..c72cc6155d93 100644 --- a/third_party/2and3/sqlalchemy/dialects/oracle/cx_oracle.pyi +++ b/third_party/2and3/sqlalchemy/dialects/oracle/cx_oracle.pyi @@ -3,13 +3,10 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sqltypes -import oracle -import _result +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 -from sqlalchemy import types as sqltypes class _OracleNumeric(sqltypes.Numeric): def bind_processor(self, dialect): ... diff --git a/third_party/2and3/sqlalchemy/dialects/oracle/zxjdbc.pyi b/third_party/2and3/sqlalchemy/dialects/oracle/zxjdbc.pyi index ad7b4c0955ca..7b71397f6fe6 100644 --- a/third_party/2and3/sqlalchemy/dialects/oracle/zxjdbc.pyi +++ b/third_party/2and3/sqlalchemy/dialects/oracle/zxjdbc.pyi @@ -3,9 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -import sqltypes -import _result -from sqlalchemy import types as sqltypes +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 diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/array.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/array.pyi index bee3077e028a..beb9a5da5c67 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/array.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/array.pyi @@ -3,14 +3,11 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import expression -import sqltypes 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 -import sqltypes.ARRAY def Any(other, arrexpr, operator: Any = ...): ... def All(other, arrexpr, operator: Any = ...): ... diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/base.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/base.pyi index 359404135341..d8af9b29f248 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/base.pyi @@ -3,16 +3,18 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sqltypes -import compiler -import reflection -import schema -import default +from sqlalchemy.sql import sqltypes +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 diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/ext.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/ext.pyi index d3b12d1a152b..2b8f3c3f7c5c 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/ext.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/ext.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import expression from ...sql import expression as expression from ...sql import elements as elements from ...sql import functions as functions diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/hstore.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/hstore.pyi index 171df239e167..2512f145b5bc 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/hstore.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/hstore.pyi @@ -3,12 +3,8 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sqltypes -import sqlfunc from ... import types as sqltypes from ...sql import functions as sqlfunc -import sqltypes.Indexable -import sqltypes.Concatenable class HSTORE(sqltypes.Indexable, sqltypes.Concatenable, sqltypes.TypeEngine): __visit_name__ = ... # type: str diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/json.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/json.pyi index bac8d8e24dac..f5d249c6e1d8 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/json.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/json.pyi @@ -3,10 +3,8 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sqltypes.JSON -import sqltypes +from sqlalchemy.sql import sqltypes from ... import types as sqltypes -import JSON class JSONPathType(sqltypes.JSON.JSONPathType): def bind_processor(self, dialect): ... diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/pg8000.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/pg8000.pyi index ae4dfb097cfe..da95df0a93e0 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/pg8000.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/pg8000.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sqltypes +from sqlalchemy.sql import sqltypes from ... import types as sqltypes from .base import PGDialect as PGDialect, PGCompiler as PGCompiler, PGIdentifierPreparer as PGIdentifierPreparer, PGExecutionContext as PGExecutionContext, _DECIMAL_TYPES as _DECIMAL_TYPES, _FLOAT_TYPES as _FLOAT_TYPES, _INT_TYPES as _INT_TYPES from sqlalchemy.dialects.postgresql.json import JSON diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2.pyi index 28ef2f2b6acb..9bcdfd1e8f36 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sqltypes +from sqlalchemy.sql import sqltypes from ...engine import result as _result from ...sql import expression as expression from ... import types as sqltypes diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi index 849efc9653f3..44d2e439cb7b 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -import sqltypes +from sqlalchemy.sql import sqltypes from ... import types as sqltypes from .base import PGDialect as PGDialect, PGExecutionContext as PGExecutionContext diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi index 8d41e32cbd4d..27de4b881530 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi @@ -3,9 +3,8 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -import sqltypes +from sqlalchemy.sql import sqltypes from ... import types as sqltypes -import sqltypes.Concatenable class RangeOperators: class comparator_factory(sqltypes.Concatenable.Comparator): diff --git a/third_party/2and3/sqlalchemy/dialects/sqlite/base.pyi b/third_party/2and3/sqlalchemy/dialects/sqlite/base.pyi index 5df7966d6000..fcbeffc76dad 100644 --- a/third_party/2and3/sqlalchemy/dialects/sqlite/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/sqlite/base.pyi @@ -3,9 +3,8 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sqltypes -import compiler -import default +from sqlalchemy.sql import sqltypes +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 diff --git a/third_party/2and3/sqlalchemy/dialects/sybase/base.pyi b/third_party/2and3/sqlalchemy/dialects/sybase/base.pyi index c13be57eb3e7..81231e2bd370 100644 --- a/third_party/2and3/sqlalchemy/dialects/sybase/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/sybase/base.pyi @@ -3,13 +3,17 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sqltypes -import compiler -import reflection -import default +from sqlalchemy.sql import sqltypes +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 diff --git a/third_party/2and3/sqlalchemy/dialects/sybase/pyodbc.pyi b/third_party/2and3/sqlalchemy/dialects/sybase/pyodbc.pyi index 344a1af9b310..d764af9e997f 100644 --- a/third_party/2and3/sqlalchemy/dialects/sybase/pyodbc.pyi +++ b/third_party/2and3/sqlalchemy/dialects/sybase/pyodbc.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -import sqltypes +from sqlalchemy.sql import sqltypes from sqlalchemy.dialects.sybase.base import SybaseDialect, SybaseExecutionContext from sqlalchemy.connectors.pyodbc import PyODBCConnector from sqlalchemy import types as sqltypes diff --git a/third_party/2and3/sqlalchemy/dialects/sybase/pysybase.pyi b/third_party/2and3/sqlalchemy/dialects/sybase/pysybase.pyi index fada5f84208c..d2a66853d0d5 100644 --- a/third_party/2and3/sqlalchemy/dialects/sybase/pysybase.pyi +++ b/third_party/2and3/sqlalchemy/dialects/sybase/pysybase.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sqltypes +from sqlalchemy.sql import sqltypes from sqlalchemy import types as sqltypes from sqlalchemy.dialects.sybase.base import SybaseDialect, SybaseExecutionContext, SybaseSQLCompiler diff --git a/third_party/2and3/sqlalchemy/engine/base.pyi b/third_party/2and3/sqlalchemy/engine/base.pyi index b3c99e98147b..1c30c88155d3 100644 --- a/third_party/2and3/sqlalchemy/engine/base.pyi +++ b/third_party/2and3/sqlalchemy/engine/base.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import log +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 diff --git a/third_party/2and3/sqlalchemy/engine/default.pyi b/third_party/2and3/sqlalchemy/engine/default.pyi index 7170004e6932..03b6cf6540d9 100644 --- a/third_party/2and3/sqlalchemy/engine/default.pyi +++ b/third_party/2and3/sqlalchemy/engine/default.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import interfaces +from . import interfaces from ..sql import compiler as compiler, expression as expression, schema as schema from .. import types as sqltypes diff --git a/third_party/2and3/sqlalchemy/engine/result.pyi b/third_party/2and3/sqlalchemy/engine/result.pyi index ec38aab84717..d969ad6ff3ff 100644 --- a/third_party/2and3/sqlalchemy/engine/result.pyi +++ b/third_party/2and3/sqlalchemy/engine/result.pyi @@ -8,7 +8,6 @@ from typing import Any, Mapping, Optional from ..sql import expression as expression, sqltypes as sqltypes from ..sql import util as sql_util -from sqlalchemy.cresultproxy import BaseRowProxy def rowproxy_reconstructor(cls, state): ... diff --git a/third_party/2and3/sqlalchemy/engine/strategies.pyi b/third_party/2and3/sqlalchemy/engine/strategies.pyi index 9d0e7a1c53c2..227cdda116a5 100644 --- a/third_party/2and3/sqlalchemy/engine/strategies.pyi +++ b/third_party/2and3/sqlalchemy/engine/strategies.pyi @@ -4,7 +4,7 @@ from typing import Any from sqlalchemy import pool as poollib -import base +from . import base strategies = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/engine/threadlocal.pyi b/third_party/2and3/sqlalchemy/engine/threadlocal.pyi index d9efaf649ea9..926ae5d0daf0 100644 --- a/third_party/2and3/sqlalchemy/engine/threadlocal.pyi +++ b/third_party/2and3/sqlalchemy/engine/threadlocal.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import base +from . import base class TLConnection(base.Connection): def __init__(self, *arg, **kw) -> None: ... diff --git a/third_party/2and3/sqlalchemy/events.pyi b/third_party/2and3/sqlalchemy/events.pyi index 84bb9b652319..0c8199598dec 100644 --- a/third_party/2and3/sqlalchemy/events.pyi +++ b/third_party/2and3/sqlalchemy/events.pyi @@ -2,7 +2,7 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -import event +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 diff --git a/third_party/2and3/sqlalchemy/ext/associationproxy.pyi b/third_party/2and3/sqlalchemy/ext/associationproxy.pyi index 6e269c80e7e2..828dd8be017e 100644 --- a/third_party/2and3/sqlalchemy/ext/associationproxy.pyi +++ b/third_party/2and3/sqlalchemy/ext/associationproxy.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import interfaces +from ..engine import interfaces from ..orm import collections as collections, interfaces as interfaces from ..sql import not_ as not_, or_ as or_ diff --git a/third_party/2and3/sqlalchemy/ext/baked.pyi b/third_party/2and3/sqlalchemy/ext/baked.pyi index b77d79005d9e..14649fa65666 100644 --- a/third_party/2and3/sqlalchemy/ext/baked.pyi +++ b/third_party/2and3/sqlalchemy/ext/baked.pyi @@ -50,6 +50,4 @@ class BakedLazyLoader(strategies.LazyLoader): ... def baked_lazyload(loadopt, attr): ... def baked_lazyload_all(*keys): ... -baked_lazyload = ... # type: Any -baked_lazyload_all = ... # type: Any bakery = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/ext/declarative/api.pyi b/third_party/2and3/sqlalchemy/ext/declarative/api.pyi index 342ae4e7955b..1a8475caafd7 100644 --- a/third_party/2and3/sqlalchemy/ext/declarative/api.pyi +++ b/third_party/2and3/sqlalchemy/ext/declarative/api.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import interfaces +from ...engine import interfaces 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 diff --git a/third_party/2and3/sqlalchemy/ext/hybrid.pyi b/third_party/2and3/sqlalchemy/ext/hybrid.pyi index 79b8379501c3..a2fa057ac43b 100644 --- a/third_party/2and3/sqlalchemy/ext/hybrid.pyi +++ b/third_party/2and3/sqlalchemy/ext/hybrid.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import interfaces +from ..engine import interfaces from ..orm import attributes as attributes, interfaces as interfaces HYBRID_METHOD = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/orm/attributes.pyi b/third_party/2and3/sqlalchemy/orm/attributes.pyi index 03af41953b12..324f25d7ed87 100644 --- a/third_party/2and3/sqlalchemy/orm/attributes.pyi +++ b/third_party/2and3/sqlalchemy/orm/attributes.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import interfaces +from ..engine 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 @@ -129,9 +129,9 @@ class CollectionAttributeImpl(AttributeImpl): def backref_listeners(attribute, key, uselist): ... -History = namedtuple('History', ['added', 'unchanged', 'deleted']) +_History = namedtuple('_History', ['added', 'unchanged', 'deleted']) -class History(History): +class History(_History): def __bool__(self): ... __nonzero__ = ... # type: Any def empty(self): ... diff --git a/third_party/2and3/sqlalchemy/orm/descriptor_props.pyi b/third_party/2and3/sqlalchemy/orm/descriptor_props.pyi index 633b78f8b938..1038edc8c556 100644 --- a/third_party/2and3/sqlalchemy/orm/descriptor_props.pyi +++ b/third_party/2and3/sqlalchemy/orm/descriptor_props.pyi @@ -7,7 +7,7 @@ from .interfaces import MapperProperty as MapperProperty, PropComparator as Prop from .util import _none_set as _none_set from .. import exc as sa_exc from ..sql import expression as expression -import query +from . import query class DescriptorProperty(MapperProperty): doc = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/orm/dynamic.pyi b/third_party/2and3/sqlalchemy/orm/dynamic.pyi index 4095226b23e1..d2acc02a1369 100644 --- a/third_party/2and3/sqlalchemy/orm/dynamic.pyi +++ b/third_party/2and3/sqlalchemy/orm/dynamic.pyi @@ -3,8 +3,8 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import strategies -import attributes +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 diff --git a/third_party/2and3/sqlalchemy/orm/events.pyi b/third_party/2and3/sqlalchemy/orm/events.pyi index f2e9d77a8a75..90d6e72ad398 100644 --- a/third_party/2and3/sqlalchemy/orm/events.pyi +++ b/third_party/2and3/sqlalchemy/orm/events.pyi @@ -3,13 +3,12 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -import event +from .. import event from .base import _mapper_or_none as _mapper_or_none 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 -import _EventsHold class InstrumentationEvents(event.Events): def class_instrument(self, cls): ... diff --git a/third_party/2and3/sqlalchemy/orm/interfaces.pyi b/third_party/2and3/sqlalchemy/orm/interfaces.pyi index 6f1a200a062e..3b0b144c7db5 100644 --- a/third_party/2and3/sqlalchemy/orm/interfaces.pyi +++ b/third_party/2and3/sqlalchemy/orm/interfaces.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import util +from . import util 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 from .base import InspectionAttr, InspectionAttr, _MappedAttribute diff --git a/third_party/2and3/sqlalchemy/orm/query.pyi b/third_party/2and3/sqlalchemy/orm/query.pyi index ab95cddaa9e0..d6a661c4feff 100644 --- a/third_party/2and3/sqlalchemy/orm/query.pyi +++ b/third_party/2and3/sqlalchemy/orm/query.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import interfaces +from . import interfaces from . import exc as orm_exc from .base import InspectionAttr from .util import aliased as aliased diff --git a/third_party/2and3/sqlalchemy/orm/state.pyi b/third_party/2and3/sqlalchemy/orm/state.pyi index babb1b1829bf..c41fbd10affb 100644 --- a/third_party/2and3/sqlalchemy/orm/state.pyi +++ b/third_party/2and3/sqlalchemy/orm/state.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -import interfaces +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 diff --git a/third_party/2and3/sqlalchemy/orm/strategies.pyi b/third_party/2and3/sqlalchemy/orm/strategies.pyi index 893c48950987..d35172b792b0 100644 --- a/third_party/2and3/sqlalchemy/orm/strategies.pyi +++ b/third_party/2and3/sqlalchemy/orm/strategies.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import util +from . import util from .. import exc as sa_exc from ..sql import visitors as visitors from ..sql import util as sql_util diff --git a/third_party/2and3/sqlalchemy/pool.pyi b/third_party/2and3/sqlalchemy/pool.pyi index 019df048f3c0..6d9c6487839c 100644 --- a/third_party/2and3/sqlalchemy/pool.pyi +++ b/third_party/2and3/sqlalchemy/pool.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import log +from . import log from .util import queue as sqla_queue from .util import threading as threading, memoized_property as memoized_property, chop_traceback as chop_traceback diff --git a/third_party/2and3/sqlalchemy/sql/base.pyi b/third_party/2and3/sqlalchemy/sql/base.pyi index 77ae48a4b6c8..9428ba2b3496 100644 --- a/third_party/2and3/sqlalchemy/sql/base.pyi +++ b/third_party/2and3/sqlalchemy/sql/base.pyi @@ -4,7 +4,7 @@ from typing import Any import collections -import util +from sqlalchemy import util from .visitors import ClauseVisitor as ClauseVisitor PARSE_AUTOCOMMIT = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/compiler.pyi b/third_party/2and3/sqlalchemy/sql/compiler.pyi index 1de26e272f3a..db207b5e9734 100644 --- a/third_party/2and3/sqlalchemy/sql/compiler.pyi +++ b/third_party/2and3/sqlalchemy/sql/compiler.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import visitors +from . import visitors RESERVED_WORDS = ... # type: Any LEGAL_CHARACTERS = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/crud.pyi b/third_party/2and3/sqlalchemy/sql/crud.pyi index 59c7b100cb49..1986e0623567 100644 --- a/third_party/2and3/sqlalchemy/sql/crud.pyi +++ b/third_party/2and3/sqlalchemy/sql/crud.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -import elements +from . import elements REQUIRED = ... # type: Any ISINSERT = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/ddl.pyi b/third_party/2and3/sqlalchemy/sql/ddl.pyi index 304deeb7aec6..ef75cc4108f9 100644 --- a/third_party/2and3/sqlalchemy/sql/ddl.pyi +++ b/third_party/2and3/sqlalchemy/sql/ddl.pyi @@ -21,7 +21,6 @@ class DDLElement(Executable, _DDLCompiles): def execute_if(self, dialect: Optional[Any] = ..., callable_: Optional[Any] = ..., state: Optional[Any] = ...): ... def __call__(self, target, bind, **kw): ... def bind(self): ... - bind = ... # type: Any class DDL(DDLElement): __visit_name__ = ... # type: str diff --git a/third_party/2and3/sqlalchemy/sql/elements.pyi b/third_party/2and3/sqlalchemy/sql/elements.pyi index d087565528f6..d0d902aab0b6 100644 --- a/third_party/2and3/sqlalchemy/sql/elements.pyi +++ b/third_party/2and3/sqlalchemy/sql/elements.pyi @@ -3,12 +3,11 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import operators -import util +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 -from .base import _generative as _generative def collate(expression, collation): ... def between(expr, lower_bound, upper_bound, symmetric: bool = ...): ... @@ -51,7 +50,7 @@ class ColumnElement(operators.ColumnOperators, ClauseElement): def base_columns(self): ... def proxy_set(self): ... def shares_lineage(self, othercolumn): ... - def compare(self, other, use_proxies: bool = ..., equivalents: Optional[Any] = ..., **kw): ... + def compare(self, other, **kw): ... def cast(self, type_): ... def label(self, name): ... def anon_label(self): ... diff --git a/third_party/2and3/sqlalchemy/sql/schema.pyi b/third_party/2and3/sqlalchemy/sql/schema.pyi index b3889324ba1a..22d60ff97bfd 100644 --- a/third_party/2and3/sqlalchemy/sql/schema.pyi +++ b/third_party/2and3/sqlalchemy/sql/schema.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import visitors +from . import visitors from .base import SchemaEventTarget as SchemaEventTarget, DialectKWArgs as DialectKWArgs from .base import _bind_or_error as _bind_or_error, ColumnCollection as ColumnCollection from .elements import ClauseElement as ClauseElement, ColumnClause as ColumnClause, _as_truncated as _as_truncated, TextClause as TextClause, _literal_as_text as _literal_as_text, ColumnElement as ColumnElement, quoted_name as quoted_name @@ -221,7 +221,6 @@ class MetaData(SchemaItem): schema = ... # type: Any naming_convention = ... # type: Any info = ... # type: Any - bind = ... # 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): ... @@ -240,7 +239,6 @@ class ThreadLocalMetaData(MetaData): context = ... # type: Any def __init__(self) -> None: ... def bind(self): ... - bind = ... # type: Any def is_bound(self): ... def dispose(self): ... diff --git a/third_party/2and3/sqlalchemy/sql/selectable.pyi b/third_party/2and3/sqlalchemy/sql/selectable.pyi index fe6d6a4a545e..e458595fa9ac 100644 --- a/third_party/2and3/sqlalchemy/sql/selectable.pyi +++ b/third_party/2and3/sqlalchemy/sql/selectable.pyi @@ -4,8 +4,7 @@ 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 .elements import _clone as _clone, _literal_as_text as _literal_as_text, _interpret_as_column_or_from as _interpret_as_column_or_from, _expand_cloned as _expand_cloned, _select_iterables as _select_iterables, _anonymous_label as _anonymous_label, _clause_element_as_expr as _clause_element_as_expr, _cloned_intersection as _cloned_intersection, _cloned_difference as _cloned_difference, True_ as True_, _literal_as_label_reference as _literal_as_label_reference, _literal_and_labels_as_label_reference as _literal_and_labels_as_label_reference -from .base import Immutable as Immutable, Executable as Executable, _generative as _generative, ColumnCollection as ColumnCollection, ColumnSet as ColumnSet, _from_objects as _from_objects, Generative as Generative +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): ... @@ -182,7 +181,6 @@ class CompoundSelect(GenerativeSelect): def is_derived_from(self, fromclause): ... def get_children(self, column_collections: bool = ..., **kwargs): ... def bind(self): ... - bind = ... # type: Any class Select(HasPrefixes, HasSuffixes, GenerativeSelect): __visit_name__ = ... # type: str @@ -221,7 +219,6 @@ class Select(HasPrefixes, HasSuffixes, GenerativeSelect): def intersect(self, other, **kwargs): ... def intersect_all(self, other, **kwargs): ... def bind(self): ... - bind = ... # type: Any class ScalarSelect(Generative, Grouping): element = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/sqltypes.pyi b/third_party/2and3/sqlalchemy/sql/sqltypes.pyi index 8c5ade9e2ad2..616085ee624c 100644 --- a/third_party/2and3/sqlalchemy/sql/sqltypes.pyi +++ b/third_party/2and3/sqlalchemy/sql/sqltypes.pyi @@ -9,10 +9,6 @@ from .elements import TypeCoerce as type_coerce from .base import _bind_or_error as _bind_or_error, SchemaEventTarget as SchemaEventTarget from ..util import pickle as pickle from ..util import compat as compat -import TypeEngine -import String -import Indexable -import Concatenable class _DateAffinity: class Comparator(TypeEngine.Comparator): ... diff --git a/third_party/2and3/sqlalchemy/sql/type_api.pyi b/third_party/2and3/sqlalchemy/sql/type_api.pyi index 1e114d579e88..2fdcb9616291 100644 --- a/third_party/2and3/sqlalchemy/sql/type_api.pyi +++ b/third_party/2and3/sqlalchemy/sql/type_api.pyi @@ -3,11 +3,10 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import util +from . import util from .visitors import Visitable as Visitable, VisitableType as VisitableType from .base import SchemaEventTarget as SchemaEventTarget -import operators -import TypeEngine +from . import operators BOOLEANTYPE = ... # type: Any INTEGERTYPE = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/util.pyi b/third_party/2and3/sqlalchemy/sql/util.pyi index 3b1b89a5d4bd..2e7227ce3a6d 100644 --- a/third_party/2and3/sqlalchemy/sql/util.pyi +++ b/third_party/2and3/sqlalchemy/sql/util.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import visitors +from . import visitors from .base import _from_objects as _from_objects, 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 diff --git a/third_party/2and3/sqlalchemy/util/compat.pyi b/third_party/2and3/sqlalchemy/util/compat.pyi index 8598a6d9f388..e5a285b5dcb0 100644 --- a/third_party/2and3/sqlalchemy/util/compat.pyi +++ b/third_party/2and3/sqlalchemy/util/compat.pyi @@ -2,13 +2,23 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. +import sys from typing import Any, Optional, Text +import threading as threading from collections import namedtuple -from inspect import getfullargspec as inspect_getfullargspec from io import BytesIO as byte_buffer +from io import StringIO from inspect import getargspec as inspect_getfullargspec -from cStringIO import StringIO as byte_buffer -from itertools import izip_longest as 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) from operator import attrgetter as dottedgetter py36 = ... # type: Any @@ -52,11 +62,7 @@ itertools_imap = ... # type: Any def b64encode(x): ... def b64decode(x): ... -inspect_getargspec = ... # type: Any -cmp = ... # type: Any reduce = ... # type: Any -b64encode = ... # type: Any -b64decode = ... # type: Any time_func = ... # type: Any def reraise(tp, value, tb: Optional[Any] = ..., cause: Optional[Any] = ...): ... diff --git a/third_party/2and3/sqlalchemy/util/langhelpers.pyi b/third_party/2and3/sqlalchemy/util/langhelpers.pyi index 3b842a2524e8..44b9b31d7529 100644 --- a/third_party/2and3/sqlalchemy/util/langhelpers.pyi +++ b/third_party/2and3/sqlalchemy/util/langhelpers.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import compat +from . import compat def md5_hex(x): ... From e3c22f5ed17e33f9f3e515361f0a7f5d54b6e296 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 24 Mar 2017 15:09:16 -0700 Subject: [PATCH 04/16] more fixes of mypy issues --- third_party/2and3/sqlalchemy/__init__.pyi | 2 +- third_party/2and3/sqlalchemy/sql/__init__.pyi | 2 +- third_party/2and3/sqlalchemy/sql/ddl.pyi | 4 +- .../sqlalchemy/sql/default_comparator.pyi | 2 +- third_party/2and3/sqlalchemy/sql/dml.pyi | 6 +- .../2and3/sqlalchemy/sql/expression.pyi | 68 +++++++++++++++++-- .../2and3/sqlalchemy/sql/functions.pyi | 2 +- third_party/2and3/sqlalchemy/sql/schema.pyi | 5 +- third_party/2and3/sqlalchemy/sql/sqltypes.pyi | 19 ++---- third_party/2and3/sqlalchemy/sql/type_api.pyi | 2 +- third_party/2and3/sqlalchemy/sql/util.pyi | 4 +- 11 files changed, 81 insertions(+), 35 deletions(-) diff --git a/third_party/2and3/sqlalchemy/__init__.pyi b/third_party/2and3/sqlalchemy/__init__.pyi index f1852553663b..527fd764afc4 100644 --- a/third_party/2and3/sqlalchemy/__init__.pyi +++ b/third_party/2and3/sqlalchemy/__init__.pyi @@ -49,7 +49,7 @@ from .sql import ( union as union, union_all as union_all, update as update, -within_group as within_group + within_group as within_group ) from .types import ( diff --git a/third_party/2and3/sqlalchemy/sql/__init__.pyi b/third_party/2and3/sqlalchemy/sql/__init__.pyi index d7d45fac1b14..ef7ebe5db684 100644 --- a/third_party/2and3/sqlalchemy/sql/__init__.pyi +++ b/third_party/2and3/sqlalchemy/sql/__init__.pyi @@ -2,5 +2,5 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -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 +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/ddl.pyi b/third_party/2and3/sqlalchemy/sql/ddl.pyi index ef75cc4108f9..14da1ad76974 100644 --- a/third_party/2and3/sqlalchemy/sql/ddl.pyi +++ b/third_party/2and3/sqlalchemy/sql/ddl.pyi @@ -4,7 +4,7 @@ from typing import Any, Optional from .elements import ClauseElement as ClauseElement -from .base import Executable as Executable, _generative as _generative, SchemaVisitor as SchemaVisitor, _bind_or_error as _bind_or_error +from .base import Executable as Executable, SchemaVisitor as SchemaVisitor from ..util import topological as topological class _DDLCompiles(ClauseElement): ... @@ -14,7 +14,7 @@ class DDLElement(Executable, _DDLCompiles): on = ... # type: Any dialect = ... # type: Any callable_ = ... # type: Any - def execute(self, bind: Optional[Any] = ..., target: Optional[Any] = ...): ... + def execute(self, *multiparams, **params): ... def execute_at(self, event_name, target): ... def against(self, target): ... state = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/default_comparator.pyi b/third_party/2and3/sqlalchemy/sql/default_comparator.pyi index c11c09eb3a33..eba9d0525e3b 100644 --- a/third_party/2and3/sqlalchemy/sql/default_comparator.pyi +++ b/third_party/2and3/sqlalchemy/sql/default_comparator.pyi @@ -3,7 +3,7 @@ # 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, _const_expr as _const_expr, _clause_element_as_expr as _clause_element_as_expr, ClauseList as ClauseList, ColumnElement as ColumnElement, TextClause as TextClause, UnaryExpression as UnaryExpression, collate as collate, _is_literal as _is_literal, _literal_as_text as _literal_as_text, ClauseElement as ClauseElement, and_ as and_, or_ as or_, Slice as Slice, Visitable as Visitable, _literal_as_binds as _literal_as_binds +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 84e6e509eeca..778ade3f2e51 100644 --- a/third_party/2and3/sqlalchemy/sql/dml.pyi +++ b/third_party/2and3/sqlalchemy/sql/dml.pyi @@ -3,9 +3,9 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from .base import Executable as Executable, _generative as _generative, _from_objects as _from_objects, DialectKWArgs as DialectKWArgs, ColumnCollection as ColumnCollection -from .elements import ClauseElement as ClauseElement, _literal_as_text as _literal_as_text, Null as Null, and_ as and_, _clone as _clone, _column_as_key as _column_as_key -from .selectable import _interpret_as_from as _interpret_as_from, _interpret_as_select as _interpret_as_select, HasPrefixes as HasPrefixes, HasCTE as HasCTE +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(HasCTE, DialectKWArgs, HasPrefixes, Executable, ClauseElement): __visit_name__ = ... # type: str diff --git a/third_party/2and3/sqlalchemy/sql/expression.pyi b/third_party/2and3/sqlalchemy/sql/expression.pyi index 21e4cf110a55..af36d50899c7 100644 --- a/third_party/2and3/sqlalchemy/sql/expression.pyi +++ b/third_party/2and3/sqlalchemy/sql/expression.pyi @@ -3,12 +3,68 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -from .functions import func as func, modifier as modifier -from .elements import ClauseElement as ClauseElement, ColumnElement as ColumnElement, not_ as not_, collate as collate, literal_column as literal_column, between as between, literal as literal, outparam as outparam -from .base import ColumnCollection as ColumnCollection -from .selectable import Alias as Alias, Join as Join, Select as Select, Selectable as Selectable, TableClause as TableClause, CompoundSelect as CompoundSelect, FromClause as FromClause, Lateral as Lateral, alias as alias, subquery as subquery, lateral as lateral, TableSample as TableSample, tablesample as tablesample +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 +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 + all_ = ... # type: Any any_ = ... # type: Any and_ = ... # type: Any @@ -45,6 +101,10 @@ insert = ... # type: Any update = ... # type: Any delete = ... # type: Any +def false() -> False_: ... +def true() -> True_: ... +def funcfilter(func, *criterion) -> FunctionFilter: ... + # old names for compatibility _Executable = Executable _BindParamClause = BindParameter diff --git a/third_party/2and3/sqlalchemy/sql/functions.pyi b/third_party/2and3/sqlalchemy/sql/functions.pyi index 129bfd573f0c..e7f0a1e4fa52 100644 --- a/third_party/2and3/sqlalchemy/sql/functions.pyi +++ b/third_party/2and3/sqlalchemy/sql/functions.pyi @@ -4,7 +4,7 @@ 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_as_binds as _literal_as_binds, literal_column as literal_column, _type_from_args as _type_from_args, ColumnElement as ColumnElement, _clone as _clone, Over as Over, BindParameter as BindParameter, FunctionFilter as FunctionFilter, Grouping as Grouping, WithinGroup as WithinGroup +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 diff --git a/third_party/2and3/sqlalchemy/sql/schema.pyi b/third_party/2and3/sqlalchemy/sql/schema.pyi index 22d60ff97bfd..b71eb5b6f139 100644 --- a/third_party/2and3/sqlalchemy/sql/schema.pyi +++ b/third_party/2and3/sqlalchemy/sql/schema.pyi @@ -5,8 +5,8 @@ from typing import Any, Optional from . import visitors from .base import SchemaEventTarget as SchemaEventTarget, DialectKWArgs as DialectKWArgs -from .base import _bind_or_error as _bind_or_error, ColumnCollection as ColumnCollection -from .elements import ClauseElement as ClauseElement, ColumnClause as ColumnClause, _as_truncated as _as_truncated, TextClause as TextClause, _literal_as_text as _literal_as_text, ColumnElement as ColumnElement, quoted_name as quoted_name +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 @@ -172,7 +172,6 @@ class ColumnCollectionConstraint(ColumnCollectionMixin, Constraint): 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: ... - def __visit_name__(self): ... __visit_name__ = ... # type: Any def copy(self, target_table: Optional[Any] = ..., **kw): ... diff --git a/third_party/2and3/sqlalchemy/sql/sqltypes.pyi b/third_party/2and3/sqlalchemy/sql/sqltypes.pyi index 616085ee624c..053da027aadd 100644 --- a/third_party/2and3/sqlalchemy/sql/sqltypes.pyi +++ b/third_party/2and3/sqlalchemy/sql/sqltypes.pyi @@ -4,23 +4,19 @@ 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, _literal_as_binds as _literal_as_binds +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 _bind_or_error as _bind_or_error, SchemaEventTarget as SchemaEventTarget +from .base import SchemaEventTarget as SchemaEventTarget from ..util import pickle as pickle from ..util import compat as compat class _DateAffinity: - class Comparator(TypeEngine.Comparator): ... comparator_factory = ... # type: Any class Concatenable: - class Comparator(TypeEngine.Comparator): ... comparator_factory = ... # type: Any class Indexable: - class Comparator(TypeEngine.Comparator): - def __getitem__(self, index): ... comparator_factory = ... # type: Any class String(Concatenable, TypeEngine): @@ -114,7 +110,6 @@ class _Binary(TypeEngine): def python_type(self): ... def bind_processor(self, dialect): ... def result_processor(self, dialect, coltype): ... - def result_processor(self, dialect, coltype): ... def coerce_compared_value(self, op, value): ... def get_dbapi_type(self, dbapi): ... @@ -132,7 +127,7 @@ class SchemaType(SchemaEventTarget): 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, impltype, **kw): ... + def adapt(self, *args, **kw): ... @property def bind(self): ... def create(self, bind: Optional[Any] = ..., checkfirst: bool = ...): ... @@ -144,10 +139,9 @@ class Enum(String, SchemaType): create_constraint = ... # type: Any validate_strings = ... # type: Any def __init__(self, *enums, **kw) -> None: ... - class Comparator(String.Comparator): ... comparator_factory = ... # type: Any def copy(self, **kw): ... - def adapt(self, impltype, **kw): ... + def adapt(self, *args, **kw): ... def literal_processor(self, dialect): ... def bind_processor(self, dialect): ... def result_processor(self, dialect, coltype): ... @@ -203,7 +197,6 @@ class JSON(Indexable, TypeEngine): def literal_processor(self, dialect): ... class JSONIndexType(JSONElementType): ... class JSONPathType(JSONElementType): ... - class Comparator(Indexable.Comparator, Concatenable.Comparator): ... comparator_factory = ... # type: Any @property def python_type(self): ... @@ -215,9 +208,6 @@ class JSON(Indexable, TypeEngine): class ARRAY(Indexable, Concatenable, TypeEngine): __visit_name__ = ... # type: str zero_indexes = ... # type: bool - class Comparator(Indexable.Comparator, Concatenable.Comparator): - def any(self, elements, other, operator: Optional[Any] = ...): ... - def all(self, elements, other, operator: Optional[Any] = ...): ... comparator_factory = ... # type: Any item_type = ... # type: Any as_tuple = ... # type: Any @@ -300,7 +290,6 @@ class NullType(TypeEngine): __visit_name__ = ... # type: str hashable = ... # type: bool def literal_processor(self, dialect): ... - class Comparator(TypeEngine.Comparator): ... comparator_factory = ... # type: Any class MatchType(Boolean): ... diff --git a/third_party/2and3/sqlalchemy/sql/type_api.pyi b/third_party/2and3/sqlalchemy/sql/type_api.pyi index 2fdcb9616291..01317f484b40 100644 --- a/third_party/2and3/sqlalchemy/sql/type_api.pyi +++ b/third_party/2and3/sqlalchemy/sql/type_api.pyi @@ -42,7 +42,7 @@ class TypeEngine(Visitable): def python_type(self): ... def with_variant(self, type_, dialect_name): ... def dialect_impl(self, dialect): ... - def adapt(self, cls, **kw): ... + def adapt(self, *args, **kw): ... def coerce_compared_value(self, op, value): ... def compile(self, dialect: Optional[Any] = ...): ... diff --git a/third_party/2and3/sqlalchemy/sql/util.pyi b/third_party/2and3/sqlalchemy/sql/util.pyi index 2e7227ce3a6d..09105776a7d9 100644 --- a/third_party/2and3/sqlalchemy/sql/util.pyi +++ b/third_party/2and3/sqlalchemy/sql/util.pyi @@ -4,12 +4,10 @@ from typing import Any, Optional from . import visitors -from .base import _from_objects as _from_objects, ColumnSet as ColumnSet +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 .annotation import _shallow_annotate as _shallow_annotate, _deep_annotate as _deep_annotate, _deep_deannotate as _deep_deannotate -from .elements import _find_columns as _find_columns from .ddl import sort_tables as sort_tables join_condition = ... # type: Any From 8efc8c3e14dd44fe92424e3545082c52ec2238cb Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 24 Mar 2017 18:23:47 -0700 Subject: [PATCH 05/16] sql and engine work --- third_party/2and3/sqlalchemy/dialects/__init__.pyi | 2 +- third_party/2and3/sqlalchemy/engine/base.pyi | 1 - third_party/2and3/sqlalchemy/engine/default.pyi | 5 +++-- third_party/2and3/sqlalchemy/engine/result.pyi | 6 +++--- third_party/2and3/sqlalchemy/engine/strategies.pyi | 1 - third_party/2and3/sqlalchemy/pool.pyi | 1 - third_party/2and3/sqlalchemy/schema.pyi | 2 +- third_party/2and3/sqlalchemy/sql/dml.pyi | 1 - third_party/2and3/sqlalchemy/sql/elements.pyi | 2 +- third_party/2and3/sqlalchemy/sql/expression.pyi | 2 +- third_party/2and3/sqlalchemy/sql/selectable.pyi | 5 +++-- third_party/2and3/sqlalchemy/sql/type_api.pyi | 2 +- 12 files changed, 14 insertions(+), 16 deletions(-) diff --git a/third_party/2and3/sqlalchemy/dialects/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/__init__.pyi index b104b7a129a0..2574a8d5a5e4 100644 --- a/third_party/2and3/sqlalchemy/dialects/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/__init__.pyi @@ -10,7 +10,7 @@ # postgresql # sqlite # sybase -from . import util +from .. import util registry = ... # type: util.PluginLoader plugins = ... # type: util.PluginLoader diff --git a/third_party/2and3/sqlalchemy/engine/base.pyi b/third_party/2and3/sqlalchemy/engine/base.pyi index 1c30c88155d3..1a05b9eb2972 100644 --- a/third_party/2and3/sqlalchemy/engine/base.pyi +++ b/third_party/2and3/sqlalchemy/engine/base.pyi @@ -7,7 +7,6 @@ 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 -from .util import _distill_params as _distill_params class Connection(Connectable): schema_for_object = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/engine/default.pyi b/third_party/2and3/sqlalchemy/engine/default.pyi index 03b6cf6540d9..11c67d45d28c 100644 --- a/third_party/2and3/sqlalchemy/engine/default.pyi +++ b/third_party/2and3/sqlalchemy/engine/default.pyi @@ -70,7 +70,8 @@ class DefaultDialect(interfaces.Dialect): def on_connect(self): ... def type_descriptor(self, typeobj): ... def reflecttable(self, connection, table, include_columns, exclude_columns, **opts): ... - def get_pk_constraint(self, conn, table_name, schema: Optional[Any] = ..., **kw): ... + # 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): ... @@ -86,7 +87,7 @@ class DefaultDialect(interfaces.Dialect): 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, cursor, statement, 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): ... diff --git a/third_party/2and3/sqlalchemy/engine/result.pyi b/third_party/2and3/sqlalchemy/engine/result.pyi index d969ad6ff3ff..0c6d78389b4a 100644 --- a/third_party/2and3/sqlalchemy/engine/result.pyi +++ b/third_party/2and3/sqlalchemy/engine/result.pyi @@ -5,7 +5,7 @@ # Note: The value type `Any` should be a DB API 2 value type once defined # TODO: See #1037 -from typing import Any, Mapping, Optional +from typing import Any, Iterator, List, Mapping, Optional from ..sql import expression as expression, sqltypes as sqltypes from ..sql import util as sql_util @@ -48,7 +48,7 @@ class ResultProxy(Mapping[str, Any]): cursor = ... # type: Any connection = ... # type: Any def __init__(self, context) -> None: ... - def keys(self) -> List[str]: ... + def keys(self): ... def rowcount(self) -> int: ... @property def lastrowid(self): ... @@ -57,7 +57,7 @@ class ResultProxy(Mapping[str, Any]): @property def is_insert(self): ... def close(self) -> None: ... - def __iter__(self) -> Iterator[RowProxy]: ... + def __iter__(self): ... def inserted_primary_key(self): ... def last_updated_params(self): ... def last_inserted_params(self): ... diff --git a/third_party/2and3/sqlalchemy/engine/strategies.pyi b/third_party/2and3/sqlalchemy/engine/strategies.pyi index 227cdda116a5..8d5b49f61061 100644 --- a/third_party/2and3/sqlalchemy/engine/strategies.pyi +++ b/third_party/2and3/sqlalchemy/engine/strategies.pyi @@ -38,4 +38,3 @@ class MockEngineStrategy(EngineStrategy): 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/pool.pyi b/third_party/2and3/sqlalchemy/pool.pyi index 6d9c6487839c..14031fbcb692 100644 --- a/third_party/2and3/sqlalchemy/pool.pyi +++ b/third_party/2and3/sqlalchemy/pool.pyi @@ -56,7 +56,6 @@ class _ConnectionFairy: def __init__(self, dbapi_connection, connection_record, echo) -> None: ... @property def is_valid(self): ... - def info(self): ... @property def record_info(self): ... def invalidate(self, e: Optional[Any] = ..., soft: bool = ...): ... diff --git a/third_party/2and3/sqlalchemy/schema.pyi b/third_party/2and3/sqlalchemy/schema.pyi index 7ed4f66dc11b..46af2832c42a 100644 --- a/third_party/2and3/sqlalchemy/schema.pyi +++ b/third_party/2and3/sqlalchemy/schema.pyi @@ -3,6 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. 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, _get_table_key as _get_table_key, ColumnCollectionConstraint as ColumnCollectionConstraint, ColumnCollectionMixin as ColumnCollectionMixin +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/dml.pyi b/third_party/2and3/sqlalchemy/sql/dml.pyi index 778ade3f2e51..64c3f8e36b72 100644 --- a/third_party/2and3/sqlalchemy/sql/dml.pyi +++ b/third_party/2and3/sqlalchemy/sql/dml.pyi @@ -11,7 +11,6 @@ class UpdateBase(HasCTE, DialectKWArgs, HasPrefixes, Executable, ClauseElement): __visit_name__ = ... # type: str named_with_column = ... # type: bool def params(self, *arg, **kw): ... - def bind(self): ... bind = ... # type: Any def returning(self, *cols): ... def with_hint(self, text, selectable: Optional[Any] = ..., dialect_name: str = ...): ... diff --git a/third_party/2and3/sqlalchemy/sql/elements.pyi b/third_party/2and3/sqlalchemy/sql/elements.pyi index d0d902aab0b6..80cbe2535058 100644 --- a/third_party/2and3/sqlalchemy/sql/elements.pyi +++ b/third_party/2and3/sqlalchemy/sql/elements.pyi @@ -36,7 +36,7 @@ class ClauseElement(Visitable): class ColumnElement(operators.ColumnOperators, ClauseElement): __visit_name__ = ... # type: str - primary_key = ... # type: bool + primary_key = ... # type: Any foreign_keys = ... # type: Any key = ... # type: Any def self_group(self, against: Optional[Any] = ...): ... diff --git a/third_party/2and3/sqlalchemy/sql/expression.pyi b/third_party/2and3/sqlalchemy/sql/expression.pyi index af36d50899c7..94013f16dd32 100644 --- a/third_party/2and3/sqlalchemy/sql/expression.pyi +++ b/third_party/2and3/sqlalchemy/sql/expression.pyi @@ -36,7 +36,7 @@ from .elements import ( False_ as False_, Grouping as Grouping, ) -from .base import ColumnCollection as ColumnCollection, Generative as Generative +from .base import ColumnCollection as ColumnCollection, Generative as Generative, Executable as Executable from .selectable import ( Alias as Alias, Join as Join, diff --git a/third_party/2and3/sqlalchemy/sql/selectable.pyi b/third_party/2and3/sqlalchemy/sql/selectable.pyi index e458595fa9ac..e1be31202182 100644 --- a/third_party/2and3/sqlalchemy/sql/selectable.pyi +++ b/third_party/2and3/sqlalchemy/sql/selectable.pyi @@ -44,6 +44,7 @@ class FromClause(Selectable): @property def description(self): ... def columns(self): ... + @property def primary_key(self): ... def foreign_keys(self): ... c = ... # type: Any @@ -64,7 +65,7 @@ class Join(FromClause): def select(self, whereclause: Optional[Any] = ..., **kwargs): ... @property def bind(self): ... - def alias(self, sqlutil, name: Optional[Any] = ..., flat: bool = ...): ... + def alias(self, *args, **kwargs): ... class Alias(FromClause): __visit_name__ = ... # type: str @@ -128,7 +129,7 @@ class TableClause(Immutable, FromClause): def __init__(self, name, *columns) -> None: ... def description(self): ... def append_column(self, c): ... - def get_children(self, column_collections: bool = ..., **kwargs): ... + def get_children(self, **kwargs): ... def insert(self, dml, values: Optional[Any] = ..., inline: bool = ..., **kwargs): ... def update(self, dml, whereclause: Optional[Any] = ..., values: Optional[Any] = ..., inline: bool = ..., **kwargs): ... def delete(self, dml, whereclause: Optional[Any] = ..., **kwargs): ... diff --git a/third_party/2and3/sqlalchemy/sql/type_api.pyi b/third_party/2and3/sqlalchemy/sql/type_api.pyi index 01317f484b40..b6db903ddb33 100644 --- a/third_party/2and3/sqlalchemy/sql/type_api.pyi +++ b/third_party/2and3/sqlalchemy/sql/type_api.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from . import util +from .. import util from .visitors import Visitable as Visitable, VisitableType as VisitableType from .base import SchemaEventTarget as SchemaEventTarget from . import operators From 3ba58db6be7dff3c393197b3d3223f1b3d2c119a Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 24 Mar 2017 19:14:23 -0700 Subject: [PATCH 06/16] fix remaining mypy errors outside testing --- .../sqlalchemy/dialects/firebird/__init__.pyi | 2 +- .../sqlalchemy/dialects/firebird/base.pyi | 4 +-- .../dialects/firebird/kinterbasdb.pyi | 1 - .../sqlalchemy/dialects/mssql/__init__.pyi | 2 +- .../2and3/sqlalchemy/dialects/mssql/base.pyi | 10 +++--- .../sqlalchemy/dialects/mssql/pymssql.pyi | 1 - .../sqlalchemy/dialects/mssql/pyodbc.pyi | 1 - .../sqlalchemy/dialects/mysql/__init__.pyi | 1 - .../2and3/sqlalchemy/dialects/mysql/base.pyi | 2 +- .../sqlalchemy/dialects/mysql/enumerated.pyi | 1 - .../2and3/sqlalchemy/dialects/mysql/json.pyi | 1 - .../2and3/sqlalchemy/dialects/mysql/types.pyi | 1 - .../sqlalchemy/dialects/oracle/__init__.pyi | 2 +- .../2and3/sqlalchemy/dialects/oracle/base.pyi | 5 ++- .../dialects/postgresql/__init__.pyi | 2 +- .../sqlalchemy/dialects/postgresql/base.pyi | 1 - .../sqlalchemy/dialects/postgresql/hstore.pyi | 13 ------- .../sqlalchemy/dialects/postgresql/json.pyi | 1 - .../sqlalchemy/dialects/postgresql/pg8000.pyi | 3 +- .../dialects/postgresql/psycopg2.pyi | 3 +- .../dialects/postgresql/pygresql.pyi | 2 +- .../dialects/postgresql/pypostgresql.pyi | 1 - .../sqlalchemy/dialects/postgresql/ranges.pyi | 15 +------- .../sqlalchemy/dialects/sqlite/__init__.pyi | 2 +- .../2and3/sqlalchemy/dialects/sqlite/base.pyi | 3 +- .../sqlalchemy/dialects/sybase/__init__.pyi | 2 +- .../2and3/sqlalchemy/dialects/sybase/base.pyi | 1 - .../sqlalchemy/dialects/sybase/pyodbc.pyi | 1 - .../sqlalchemy/dialects/sybase/pysybase.pyi | 1 - .../2and3/sqlalchemy/engine/__init__.pyi | 34 +++++++++++++++++++ .../2and3/sqlalchemy/event/__init__.pyi | 1 - third_party/2and3/sqlalchemy/event/api.pyi | 1 - third_party/2and3/sqlalchemy/event/attr.pyi | 2 +- .../2and3/sqlalchemy/ext/associationproxy.pyi | 13 +++---- third_party/2and3/sqlalchemy/ext/baked.pyi | 1 - .../2and3/sqlalchemy/ext/declarative/api.pyi | 3 -- .../2and3/sqlalchemy/ext/declarative/base.pyi | 3 +- .../ext/declarative/clsregistry.pyi | 3 +- .../2and3/sqlalchemy/ext/horizontal_shard.pyi | 4 +-- third_party/2and3/sqlalchemy/ext/hybrid.pyi | 1 - .../2and3/sqlalchemy/ext/instrumentation.pyi | 2 +- .../2and3/sqlalchemy/orm/attributes.pyi | 4 +-- .../2and3/sqlalchemy/orm/descriptor_props.pyi | 1 - third_party/2and3/sqlalchemy/orm/dynamic.pyi | 1 - third_party/2and3/sqlalchemy/orm/events.pyi | 1 - third_party/2and3/sqlalchemy/orm/exc.pyi | 1 - .../2and3/sqlalchemy/orm/instrumentation.pyi | 1 - .../2and3/sqlalchemy/orm/interfaces.pyi | 8 ++--- third_party/2and3/sqlalchemy/orm/loading.pyi | 3 +- third_party/2and3/sqlalchemy/orm/mapper.pyi | 4 +-- .../2and3/sqlalchemy/orm/path_registry.pyi | 4 +-- .../2and3/sqlalchemy/orm/persistence.pyi | 3 +- .../2and3/sqlalchemy/orm/properties.pyi | 4 +-- .../2and3/sqlalchemy/orm/relationships.pyi | 6 ++-- third_party/2and3/sqlalchemy/orm/session.pyi | 4 +++ third_party/2and3/sqlalchemy/orm/state.pyi | 4 +-- .../2and3/sqlalchemy/orm/strategies.pyi | 7 ++-- .../2and3/sqlalchemy/orm/strategy_options.pyi | 5 ++- third_party/2and3/sqlalchemy/orm/util.pyi | 6 ++-- third_party/2and3/sqlalchemy/types.pyi | 2 +- 60 files changed, 95 insertions(+), 127 deletions(-) diff --git a/third_party/2and3/sqlalchemy/dialects/firebird/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/firebird/__init__.pyi index 1d148e4d4d7a..286593244f66 100644 --- a/third_party/2and3/sqlalchemy/dialects/firebird/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/firebird/__init__.pyi @@ -2,4 +2,4 @@ # # 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, dialect as dialect +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 index 45c23651ac66..e9b74b2c4430 100644 --- a/third_party/2and3/sqlalchemy/dialects/firebird/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/firebird/base.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from sqlalchemy.sql import sqltypes +from sqlalchemy import sql from sqlalchemy.sql import compiler from sqlalchemy.engine import default from sqlalchemy import schema as sa_schema @@ -46,7 +46,7 @@ class FBCompiler(sql.compiler.SQLCompiler): 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, alias, asfrom: bool = ..., **kwargs): ... + 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 diff --git a/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi b/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi index c6a8fd13fe5d..c0dbd6f978f0 100644 --- a/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi +++ b/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi @@ -3,7 +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 FBDialect as FBDialect, FBExecutionContext as FBExecutionContext from ... import types as sqltypes diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/__init__.pyi index 77a8e0c2b085..36c7232df0b9 100644 --- a/third_party/2and3/sqlalchemy/dialects/mssql/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mssql/__init__.pyi @@ -2,4 +2,4 @@ # # 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, dialect as dialect +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/base.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/base.pyi index b0193dc86242..f18848839017 100644 --- a/third_party/2and3/sqlalchemy/dialects/mssql/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mssql/base.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from sqlalchemy.sql import sqltypes from sqlalchemy.sql import compiler from ... import schema as sa_schema from ...sql import compiler as compiler, expression as expression @@ -11,7 +10,6 @@ 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 ...util import update_wrapper as update_wrapper from . import information_schema as ischema MS_2016_VERSION = ... # type: Any @@ -39,6 +37,8 @@ class TIME(sqltypes.TIME): def bind_processor(self, dialect): ... def result_processor(self, dialect, coltype): ... +_MSTime = TIME + class _DateTimeBase: def bind_processor(self, dialect): ... @@ -161,9 +161,9 @@ class MSSQLCompiler(compiler.SQLCompiler): def get_crud_hint_text(self, table, text): ... def limit_clause(self, select, **kw): ... def visit_select(self, select, **kwargs): ... - def visit_table(self, table, mssql_aliased: bool = ..., iscrud: bool = ..., **kwargs): ... + def visit_table(self, *args, **kwargs): ... def visit_alias(self, alias, **kw): ... - def visit_column(self, column, add_to_result_map: Optional[Any] = ..., **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): ... @@ -183,7 +183,7 @@ class MSSQLStrictCompiler(MSSQLCompiler): class MSDDLCompiler(compiler.DDLCompiler): def get_column_specification(self, column, **kwargs): ... - def visit_create_index(self, create, include_schema: bool = ...): ... + 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): ... diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/pymssql.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/pymssql.pyi index 2cb081366d4e..aeaa55c937b7 100644 --- a/third_party/2and3/sqlalchemy/dialects/mssql/pymssql.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mssql/pymssql.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -from sqlalchemy.sql import sqltypes from .base import MSDialect as MSDialect from ... import types as sqltypes diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi index c06f16a1b7e1..d974b3b65728 100644 --- a/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi @@ -3,7 +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 MSExecutionContext as MSExecutionContext, MSDialect as MSDialect, VARBINARY as VARBINARY from ...connectors.pyodbc import PyODBCConnector as PyODBCConnector from ... import types as sqltypes diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/__init__.pyi index 8e692cae226f..3652fa28cda5 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/__init__.pyi @@ -39,5 +39,4 @@ from .base import ( VARBINARY as VARBINARY, VARCHAR as VARCHAR, YEAR as YEAR, - dialect as dialect ) diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi index a49b402b50e7..29336bfdf21c 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi @@ -69,7 +69,7 @@ class MySQLCompiler(compiler.SQLCompiler): 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_: Optional[Any] = ...): ... + 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): ... diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/enumerated.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/enumerated.pyi index 3df1a5a71423..995ab57e064f 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/enumerated.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/enumerated.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -from sqlalchemy.sql import sqltypes from .types import _StringType as _StringType from ... import types as sqltypes diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi index fa673fdb6761..07b8409679d1 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi @@ -2,7 +2,6 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from sqlalchemy.sql import sqltypes from ...sql import elements as elements from ... import types as sqltypes diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi index c7db07c002e7..a5fda1dc69a3 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from sqlalchemy.sql import sqltypes from ... import types as sqltypes class _NumericType: diff --git a/third_party/2and3/sqlalchemy/dialects/oracle/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/oracle/__init__.pyi index 1b0bfdda89eb..b5f8d15c393b 100644 --- a/third_party/2and3/sqlalchemy/dialects/oracle/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/oracle/__init__.pyi @@ -2,4 +2,4 @@ # # 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, dialect as dialect, INTERVAL as INTERVAL, VARCHAR2 as VARCHAR2, NVARCHAR2 as NVARCHAR2, ROWID as ROWID, dialect as dialect +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 index b11b5e9d2371..d487e45cd5d6 100644 --- a/third_party/2and3/sqlalchemy/dialects/oracle/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/oracle/base.pyi @@ -3,8 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from sqlalchemy.sql import sqltypes -from sqlalchemy.sql import compiler +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 @@ -166,7 +165,7 @@ class OracleDialect(default.DefaultDialect): 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(sql.ClauseElement): +class _OuterJoinColumn(elements.ClauseElement): __visit_name__ = ... # type: str column = ... # type: Any def __init__(self, column) -> None: ... diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/__init__.pyi index 72029b2f86cc..04e072adbf34 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/__init__.pyi @@ -2,7 +2,7 @@ # # 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, dialect as dialect, DropEnumType as DropEnumType, CreateEnumType as CreateEnumType +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 diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/base.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/base.pyi index d8af9b29f248..297eb4fce32f 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/base.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from sqlalchemy.sql import sqltypes from sqlalchemy.sql import compiler from sqlalchemy import schema from ...engine import default as default, reflection as reflection diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/hstore.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/hstore.pyi index 2512f145b5bc..5b72db9ba5a7 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/hstore.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/hstore.pyi @@ -11,19 +11,6 @@ class HSTORE(sqltypes.Indexable, sqltypes.Concatenable, sqltypes.TypeEngine): hashable = ... # type: bool text_type = ... # type: Any def __init__(self, text_type: Optional[Any] = ...) -> None: ... - class Comparator(sqltypes.Indexable.Comparator, sqltypes.Concatenable.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): ... - def defined(self, key): ... - def delete(self, key): ... - def slice(self, array): ... - def keys(self): ... - def vals(self): ... - def array(self): ... - def matrix(self): ... comparator_factory = ... # type: Any def bind_processor(self, dialect): ... def result_processor(self, dialect, coltype): ... diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/json.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/json.pyi index f5d249c6e1d8..914fa00189e8 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/json.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/json.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from sqlalchemy.sql import sqltypes from ... import types as sqltypes class JSONPathType(sqltypes.JSON.JSONPathType): diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/pg8000.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/pg8000.pyi index da95df0a93e0..06e197bf7d69 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/pg8000.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/pg8000.pyi @@ -3,9 +3,8 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from sqlalchemy.sql import sqltypes from ... import types as sqltypes -from .base import PGDialect as PGDialect, PGCompiler as PGCompiler, PGIdentifierPreparer as PGIdentifierPreparer, PGExecutionContext as PGExecutionContext, _DECIMAL_TYPES as _DECIMAL_TYPES, _FLOAT_TYPES as _FLOAT_TYPES, _INT_TYPES as _INT_TYPES +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): diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2.pyi index 9bcdfd1e8f36..8ed09276d955 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/psycopg2.pyi @@ -3,11 +3,10 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from sqlalchemy.sql import sqltypes 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, _DECIMAL_TYPES as _DECIMAL_TYPES, _FLOAT_TYPES as _FLOAT_TYPES, _INT_TYPES as _INT_TYPES, UUID as UUID +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 diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/pygresql.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/pygresql.pyi index cdabfde90f4c..66e6f290f08b 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/pygresql.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/pygresql.pyi @@ -6,7 +6,7 @@ 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, _DECIMAL_TYPES as _DECIMAL_TYPES, _FLOAT_TYPES as _FLOAT_TYPES, _INT_TYPES as _INT_TYPES, UUID as UUID +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 diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi index 44d2e439cb7b..8e411b7dcf39 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -from sqlalchemy.sql import sqltypes from ... import types as sqltypes from .base import PGDialect as PGDialect, PGExecutionContext as PGExecutionContext diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi index 27de4b881530..72f417fea762 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi @@ -3,23 +3,10 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -from sqlalchemy.sql import sqltypes from ... import types as sqltypes class RangeOperators: - class comparator_factory(sqltypes.Concatenable.Comparator): - def __ne__(self, other): ... - def contains(self, other, **kw): ... - def contained_by(self, other): ... - def overlaps(self, other): ... - def strictly_left_of(self, other): ... - __lshift__ = ... # type: Any - def strictly_right_of(self, other): ... - __rshift__ = ... # type: Any - def not_extend_right_of(self, other): ... - def not_extend_left_of(self, other): ... - def adjacent_to(self, other): ... - def __add__(self, other): ... + comparator_factory = ... # type: Any class INT4RANGE(RangeOperators, sqltypes.TypeEngine): __visit_name__ = ... # type: str diff --git a/third_party/2and3/sqlalchemy/dialects/sqlite/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/sqlite/__init__.pyi index 575b6ae56c20..3514fe981027 100644 --- a/third_party/2and3/sqlalchemy/dialects/sqlite/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/sqlite/__init__.pyi @@ -2,4 +2,4 @@ # # 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, dialect as dialect +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 index fcbeffc76dad..097e059c7b8a 100644 --- a/third_party/2and3/sqlalchemy/dialects/sqlite/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/sqlite/base.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from sqlalchemy.sql import sqltypes from sqlalchemy.sql import compiler from ... import types as sqltypes, schema as sa_schema from ...engine import default as default, reflection as reflection @@ -14,7 +13,7 @@ class _DateTimeMixin: def __init__(self, storage_format: Optional[Any] = ..., regexp: Optional[Any] = ..., **kw) -> None: ... @property def format_is_text_affinity(self): ... - def adapt(self, cls, **kw): ... + def adapt(self, *args, **kw): ... def literal_processor(self, dialect): ... class DATETIME(_DateTimeMixin, sqltypes.DateTime): diff --git a/third_party/2and3/sqlalchemy/dialects/sybase/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/sybase/__init__.pyi index cc6255601e4a..103cebc51705 100644 --- a/third_party/2and3/sqlalchemy/dialects/sybase/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/sybase/__init__.pyi @@ -2,4 +2,4 @@ # # 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, dialect as dialect +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 index 81231e2bd370..57eaa9ba635e 100644 --- a/third_party/2and3/sqlalchemy/dialects/sybase/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/sybase/base.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from sqlalchemy.sql import sqltypes from sqlalchemy.sql import compiler from sqlalchemy.engine import default, reflection from sqlalchemy import types as sqltypes diff --git a/third_party/2and3/sqlalchemy/dialects/sybase/pyodbc.pyi b/third_party/2and3/sqlalchemy/dialects/sybase/pyodbc.pyi index d764af9e997f..e770c34f1f5b 100644 --- a/third_party/2and3/sqlalchemy/dialects/sybase/pyodbc.pyi +++ b/third_party/2and3/sqlalchemy/dialects/sybase/pyodbc.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -from sqlalchemy.sql import sqltypes from sqlalchemy.dialects.sybase.base import SybaseDialect, SybaseExecutionContext from sqlalchemy.connectors.pyodbc import PyODBCConnector from sqlalchemy import types as sqltypes diff --git a/third_party/2and3/sqlalchemy/dialects/sybase/pysybase.pyi b/third_party/2and3/sqlalchemy/dialects/sybase/pysybase.pyi index d2a66853d0d5..aa244a664863 100644 --- a/third_party/2and3/sqlalchemy/dialects/sybase/pysybase.pyi +++ b/third_party/2and3/sqlalchemy/dialects/sybase/pysybase.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from sqlalchemy.sql import sqltypes from sqlalchemy import types as sqltypes from sqlalchemy.dialects.sybase.base import SybaseDialect, SybaseExecutionContext, SybaseSQLCompiler diff --git a/third_party/2and3/sqlalchemy/engine/__init__.pyi b/third_party/2and3/sqlalchemy/engine/__init__.pyi index 4636eb865901..319811e31350 100644 --- a/third_party/2and3/sqlalchemy/engine/__init__.pyi +++ b/third_party/2and3/sqlalchemy/engine/__init__.pyi @@ -1,6 +1,40 @@ # 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, + 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: str = ..., **kwargs): ... diff --git a/third_party/2and3/sqlalchemy/event/__init__.pyi b/third_party/2and3/sqlalchemy/event/__init__.pyi index b785eef2bd82..d71f05eee62b 100644 --- a/third_party/2and3/sqlalchemy/event/__init__.pyi +++ b/third_party/2and3/sqlalchemy/event/__init__.pyi @@ -5,4 +5,3 @@ 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 -from .legacy import _legacy_signature as _legacy_signature diff --git a/third_party/2and3/sqlalchemy/event/api.pyi b/third_party/2and3/sqlalchemy/event/api.pyi index 582c4c85c4a4..9ad11dc351cc 100644 --- a/third_party/2and3/sqlalchemy/event/api.pyi +++ b/third_party/2and3/sqlalchemy/event/api.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -from .base import _registrars as _registrars from .registry import _EventKey as _EventKey CANCEL = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/event/attr.pyi b/third_party/2and3/sqlalchemy/event/attr.pyi index e6982e9cd286..0e532c614e6c 100644 --- a/third_party/2and3/sqlalchemy/event/attr.pyi +++ b/third_party/2and3/sqlalchemy/event/attr.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -import util +from .. import util from ..util import threading as threading class RefCollection(util.MemoizedSlots): ... diff --git a/third_party/2and3/sqlalchemy/ext/associationproxy.pyi b/third_party/2and3/sqlalchemy/ext/associationproxy.pyi index 828dd8be017e..35d4c3268f0e 100644 --- a/third_party/2and3/sqlalchemy/ext/associationproxy.pyi +++ b/third_party/2and3/sqlalchemy/ext/associationproxy.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from ..engine import interfaces from ..orm import collections as collections, interfaces as interfaces from ..sql import not_ as not_, or_ as or_ @@ -117,8 +116,6 @@ class _AssociationDict(_AssociationCollection): def iterkeys(self): ... def values(self): ... def items(self): ... - def items(self): ... - def values(self): ... def pop(self, key, default: Any = ...): ... def popitem(self): ... def update(self, *a, **kw): ... @@ -128,7 +125,7 @@ class _AssociationDict(_AssociationCollection): class _AssociationSet(_AssociationCollection): def __len__(self): ... def __bool__(self): ... - __nonzero__ = ... # type: Any + def __nonzero__(self): ... def __contains__(self, value): ... def __iter__(self): ... def add(self, value): ... @@ -138,17 +135,17 @@ class _AssociationSet(_AssociationCollection): def update(self, other): ... def __ior__(self, other): ... def union(self, other): ... - __or__ = ... # type: Any + def __or__(self, other): ... def difference(self, other): ... - __sub__ = ... # type: Any + def __sub__(self, other): ... def difference_update(self, other): ... def __isub__(self, other): ... def intersection(self, other): ... - __and__ = ... # type: Any + def __and__(self, other): ... def intersection_update(self, other): ... def __iand__(self, other): ... def symmetric_difference(self, other): ... - __xor__ = ... # type: Any + def __xor__(self, other): ... def symmetric_difference_update(self, other): ... def __ixor__(self, other): ... def issubset(self, other): ... diff --git a/third_party/2and3/sqlalchemy/ext/baked.pyi b/third_party/2and3/sqlalchemy/ext/baked.pyi index 14649fa65666..8e98f5b4c3f4 100644 --- a/third_party/2and3/sqlalchemy/ext/baked.pyi +++ b/third_party/2and3/sqlalchemy/ext/baked.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -import strategies 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 diff --git a/third_party/2and3/sqlalchemy/ext/declarative/api.pyi b/third_party/2and3/sqlalchemy/ext/declarative/api.pyi index 1a8475caafd7..d03ae79507d3 100644 --- a/third_party/2and3/sqlalchemy/ext/declarative/api.pyi +++ b/third_party/2and3/sqlalchemy/ext/declarative/api.pyi @@ -3,14 +3,11 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from ...engine import interfaces 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 ...orm.base import _mapper_or_none as _mapper_or_none from ...util import OrderedDict as OrderedDict, hybridmethod as hybridmethod, hybridproperty as hybridproperty -from .base import _as_declarative as _as_declarative, _declarative_constructor as _declarative_constructor, _DeferredMapperConfig as _DeferredMapperConfig, _add_attribute as _add_attribute from .clsregistry import _class_resolver as _class_resolver def instrument_declarative(cls, registry, metadata): ... diff --git a/third_party/2and3/sqlalchemy/ext/declarative/base.pyi b/third_party/2and3/sqlalchemy/ext/declarative/base.pyi index b4746d625109..528b6f003198 100644 --- a/third_party/2and3/sqlalchemy/ext/declarative/base.pyi +++ b/third_party/2and3/sqlalchemy/ext/declarative/base.pyi @@ -6,9 +6,8 @@ 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, CompositeProperty as CompositeProperty +from ...orm.properties import ColumnProperty as ColumnProperty from ...orm.attributes import QueryableAttribute as QueryableAttribute -from ...orm.base import _is_mapped_class as _is_mapped_class from ...util import topological as topological from ...sql import expression as expression diff --git a/third_party/2and3/sqlalchemy/ext/declarative/clsregistry.pyi b/third_party/2and3/sqlalchemy/ext/declarative/clsregistry.pyi index f6e8fc88b298..ab3f2bfbb92f 100644 --- a/third_party/2and3/sqlalchemy/ext/declarative/clsregistry.pyi +++ b/third_party/2and3/sqlalchemy/ext/declarative/clsregistry.pyi @@ -3,8 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from ...orm.properties import ColumnProperty as ColumnProperty, RelationshipProperty as RelationshipProperty, SynonymProperty as SynonymProperty -from ...schema import _get_table_key as _get_table_key +from ...orm.properties import ColumnProperty as ColumnProperty from ...orm import class_mapper as class_mapper, interfaces as interfaces def add_class(classname, cls): ... diff --git a/third_party/2and3/sqlalchemy/ext/horizontal_shard.pyi b/third_party/2and3/sqlalchemy/ext/horizontal_shard.pyi index 88bddc140e6e..4d0c9a87f01b 100644 --- a/third_party/2and3/sqlalchemy/ext/horizontal_shard.pyi +++ b/third_party/2and3/sqlalchemy/ext/horizontal_shard.pyi @@ -19,6 +19,6 @@ class ShardedSession(Session): 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, mapper: Optional[Any] = ..., instance: Optional[Any] = ..., shard_id: Optional[Any] = ..., **kwargs): ... - def get_bind(self, mapper, shard_id: Optional[Any] = ..., instance: Optional[Any] = ..., clause: Optional[Any] = ..., **kw): ... + 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 index a2fa057ac43b..312d77a4d472 100644 --- a/third_party/2and3/sqlalchemy/ext/hybrid.pyi +++ b/third_party/2and3/sqlalchemy/ext/hybrid.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from ..engine import interfaces from ..orm import attributes as attributes, interfaces as interfaces HYBRID_METHOD = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/ext/instrumentation.pyi b/third_party/2and3/sqlalchemy/ext/instrumentation.pyi index 90a88ca8ccdc..8cbe324c6f7f 100644 --- a/third_party/2and3/sqlalchemy/ext/instrumentation.pyi +++ b/third_party/2and3/sqlalchemy/ext/instrumentation.pyi @@ -4,7 +4,7 @@ from typing import Any, Optional from ..orm import instrumentation as orm_instrumentation -from ..orm.instrumentation import ClassManager as ClassManager, InstrumentationFactory as InstrumentationFactory, _default_state_getter as _default_state_getter, _default_dict_getter as _default_dict_getter, _default_manager_getter as _default_manager_getter +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 diff --git a/third_party/2and3/sqlalchemy/orm/attributes.pyi b/third_party/2and3/sqlalchemy/orm/attributes.pyi index 324f25d7ed87..932863f2566f 100644 --- a/third_party/2and3/sqlalchemy/orm/attributes.pyi +++ b/third_party/2and3/sqlalchemy/orm/attributes.pyi @@ -3,7 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from ..engine import interfaces +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 @@ -123,7 +123,7 @@ class CollectionAttributeImpl(AttributeImpl): 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: Optional[Any] = ..., passive: Any = ..., pop: bool = ..., _adapt: bool = ...): ... + 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 = ...): ... diff --git a/third_party/2and3/sqlalchemy/orm/descriptor_props.pyi b/third_party/2and3/sqlalchemy/orm/descriptor_props.pyi index 1038edc8c556..23d43733166a 100644 --- a/third_party/2and3/sqlalchemy/orm/descriptor_props.pyi +++ b/third_party/2and3/sqlalchemy/orm/descriptor_props.pyi @@ -4,7 +4,6 @@ from typing import Any, Optional from .interfaces import MapperProperty as MapperProperty, PropComparator as PropComparator -from .util import _none_set as _none_set from .. import exc as sa_exc from ..sql import expression as expression from . import query diff --git a/third_party/2and3/sqlalchemy/orm/dynamic.pyi b/third_party/2and3/sqlalchemy/orm/dynamic.pyi index d2acc02a1369..317f322a10f6 100644 --- a/third_party/2and3/sqlalchemy/orm/dynamic.pyi +++ b/third_party/2and3/sqlalchemy/orm/dynamic.pyi @@ -40,7 +40,6 @@ class AppenderMixin: instance = ... # type: Any attr = ... # type: Any def __init__(self, attr, state) -> None: ... - def session(self): ... session = ... # type: Any def __iter__(self): ... def __getitem__(self, index): ... diff --git a/third_party/2and3/sqlalchemy/orm/events.pyi b/third_party/2and3/sqlalchemy/orm/events.pyi index 90d6e72ad398..7937f7e9c167 100644 --- a/third_party/2and3/sqlalchemy/orm/events.pyi +++ b/third_party/2and3/sqlalchemy/orm/events.pyi @@ -4,7 +4,6 @@ from typing import Any from .. import event -from .base import _mapper_or_none as _mapper_or_none from .session import Session as Session, sessionmaker as sessionmaker from .scoping import scoped_session as scoped_session from .attributes import QueryableAttribute as QueryableAttribute diff --git a/third_party/2and3/sqlalchemy/orm/exc.pyi b/third_party/2and3/sqlalchemy/orm/exc.pyi index 8c7d190b6e0a..667174829645 100644 --- a/third_party/2and3/sqlalchemy/orm/exc.pyi +++ b/third_party/2and3/sqlalchemy/orm/exc.pyi @@ -3,7 +3,6 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -import sa_exc from .. import exc as sa_exc NO_STATE = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/orm/instrumentation.pyi b/third_party/2and3/sqlalchemy/orm/instrumentation.pyi index 5a3eb7a7467b..7fe441de8d79 100644 --- a/third_party/2and3/sqlalchemy/orm/instrumentation.pyi +++ b/third_party/2and3/sqlalchemy/orm/instrumentation.pyi @@ -20,7 +20,6 @@ class ClassManager(dict): def __eq__(self, other): ... @property def is_mapped(self): ... - def mapper(self): ... def manage(self): ... def dispose(self): ... def manager_getter(self): ... diff --git a/third_party/2and3/sqlalchemy/orm/interfaces.pyi b/third_party/2and3/sqlalchemy/orm/interfaces.pyi index 3b0b144c7db5..4d15d58f2ddb 100644 --- a/third_party/2and3/sqlalchemy/orm/interfaces.pyi +++ b/third_party/2and3/sqlalchemy/orm/interfaces.pyi @@ -3,10 +3,10 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from . import util -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 -from .base import InspectionAttr, InspectionAttr, _MappedAttribute +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 diff --git a/third_party/2and3/sqlalchemy/orm/loading.pyi b/third_party/2and3/sqlalchemy/orm/loading.pyi index 6fe2a8f92435..e952882ab5d5 100644 --- a/third_party/2and3/sqlalchemy/orm/loading.pyi +++ b/third_party/2and3/sqlalchemy/orm/loading.pyi @@ -5,8 +5,7 @@ from typing import Any, Optional from . import exc as orm_exc from ..sql import util as sql_util -from .util import _none_set as _none_set, state_str as state_str -from .base import _SET_DEFERRED_EXPIRED as _SET_DEFERRED_EXPIRED, _DEFER_FOR_STATE as _DEFER_FOR_STATE +from .util import state_str as state_str from .. import exc as sa_exc def instances(query, cursor, context): ... diff --git a/third_party/2and3/sqlalchemy/orm/mapper.pyi b/third_party/2and3/sqlalchemy/orm/mapper.pyi index b5f080fb07db..5097b84f6bde 100644 --- a/third_party/2and3/sqlalchemy/orm/mapper.pyi +++ b/third_party/2and3/sqlalchemy/orm/mapper.pyi @@ -8,8 +8,8 @@ from ..sql import expression as expression, visitors as visitors, operators as o 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, _MappedAttribute as _MappedAttribute -from .base import _class_to_mapper as _class_to_mapper, _state_mapper as _state_mapper, class_mapper as class_mapper, state_str as state_str, _INSTRUMENTOR as _INSTRUMENTOR +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 diff --git a/third_party/2and3/sqlalchemy/orm/path_registry.pyi b/third_party/2and3/sqlalchemy/orm/path_registry.pyi index 71fb22ad76e3..cda9cc5d4a62 100644 --- a/third_party/2and3/sqlalchemy/orm/path_registry.pyi +++ b/third_party/2and3/sqlalchemy/orm/path_registry.pyi @@ -12,8 +12,8 @@ class PathRegistry: is_root = ... # type: bool def __eq__(self, other): ... def set(self, attributes, key, value): ... - def setdefault(self, attributes, key, value): ... - def get(self, attributes, key, value: Optional[Any] = ...): ... + def setdefault(self, *args, **kwargs): ... + def get(self, *args, **kwargs): ... def __len__(self): ... @property def length(self): ... diff --git a/third_party/2and3/sqlalchemy/orm/persistence.pyi b/third_party/2and3/sqlalchemy/orm/persistence.pyi index 37720f0e7cc4..55b7e9064620 100644 --- a/third_party/2and3/sqlalchemy/orm/persistence.pyi +++ b/third_party/2and3/sqlalchemy/orm/persistence.pyi @@ -5,9 +5,8 @@ from typing import Any from .. import exc as sa_exc from . import exc as orm_exc -from .base import state_str as state_str, _attr_as_key as _attr_as_key, _entity_descriptor as _entity_descriptor +from .base import state_str as state_str from ..sql import expression as expression -from ..sql.base import _from_objects as _from_objects def save_obj(base_mapper, states, uowtransaction, single: bool = ...): ... def post_update(base_mapper, states, uowtransaction, post_update_cols): ... diff --git a/third_party/2and3/sqlalchemy/orm/properties.pyi b/third_party/2and3/sqlalchemy/orm/properties.pyi index e3f7f88a12de..d5f0255b2fa7 100644 --- a/third_party/2and3/sqlalchemy/orm/properties.pyi +++ b/third_party/2and3/sqlalchemy/orm/properties.pyi @@ -3,8 +3,8 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any -from .interfaces import StrategizedProperty -import util +from .interfaces import StrategizedProperty, PropComparator +from .. import util class ColumnProperty(StrategizedProperty): strategy_wildcard_key = ... # type: str diff --git a/third_party/2and3/sqlalchemy/orm/relationships.pyi b/third_party/2and3/sqlalchemy/orm/relationships.pyi index 2d0933bd7a38..a42b01df6d25 100644 --- a/third_party/2and3/sqlalchemy/orm/relationships.pyi +++ b/third_party/2and3/sqlalchemy/orm/relationships.pyi @@ -4,8 +4,8 @@ from typing import Any, Optional from .. import exc as sa_exc -from .util import CascadeOptions as CascadeOptions, _orm_annotate as _orm_annotate, _orm_deannotate as _orm_deannotate -from ..sql.util import ClauseAdapter as ClauseAdapter, join_condition as join_condition, _shallow_annotate as _shallow_annotate, visit_binary_product as visit_binary_product, _deep_deannotate as _deep_deannotate, selectables_overlap as selectables_overlap, adapt_criterion_to_null as adapt_criterion_to_null +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 @@ -68,7 +68,7 @@ class RelationshipProperty(StrategizedProperty): def __ne__(self, other): ... def property(self): ... def merge(self, session, source_state, source_dict, dest_state, dest_dict, load, _recursive, _resolve_conflict_map): ... - def cascade_iterator(self, type_, state, dict_, visited_states, halt_on: Optional[Any] = ...): ... + def cascade_iterator(self, *args, **kwargs): ... def mapper(self): ... def table(self): ... def do_init(self): ... diff --git a/third_party/2and3/sqlalchemy/orm/session.pyi b/third_party/2and3/sqlalchemy/orm/session.pyi index 00d4e751cc89..97dc0a64418e 100644 --- a/third_party/2and3/sqlalchemy/orm/session.pyi +++ b/third_party/2and3/sqlalchemy/orm/session.pyi @@ -96,3 +96,7 @@ class sessionmaker(_SessionClassMethods): # 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 index c41fbd10affb..42d338fac8d0 100644 --- a/third_party/2and3/sqlalchemy/orm/state.pyi +++ b/third_party/2and3/sqlalchemy/orm/state.pyi @@ -38,8 +38,7 @@ class InstanceState(interfaces.InspectionAttr): def persistent(self): ... @property def detached(self): ... - @property - def session(self, sessionlib): ... + session = ... # type: Any @property def object(self): ... @property @@ -50,7 +49,6 @@ class InstanceState(interfaces.InspectionAttr): def mapper(self): ... @property def has_identity(self): ... - def obj(self): ... @property def dict(self): ... def get_history(self, key, passive): ... diff --git a/third_party/2and3/sqlalchemy/orm/strategies.pyi b/third_party/2and3/sqlalchemy/orm/strategies.pyi index d35172b792b0..70afcc72cff4 100644 --- a/third_party/2and3/sqlalchemy/orm/strategies.pyi +++ b/third_party/2and3/sqlalchemy/orm/strategies.pyi @@ -3,16 +3,13 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. from typing import Any, Optional -from . import util +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 .util import _none_set as _none_set from .interfaces import LoaderStrategy as LoaderStrategy, StrategizedProperty as StrategizedProperty -from .base import _SET_DEFERRED_EXPIRED as _SET_DEFERRED_EXPIRED, _DEFER_FOR_STATE as _DEFER_FOR_STATE -from .session import _state_session as _state_session class UninstrumentedColumnLoader(LoaderStrategy): columns = ... # type: Any @@ -36,7 +33,7 @@ class DeferredColumnLoader(LoaderStrategy): 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, context, entity, path, loadopt, adapter, column_collection, memoized_populators, only_load_props: Optional[Any] = ..., **kw): ... + def setup_query(self, *args, **kw): ... class LoadDeferredColumns: key = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/orm/strategy_options.pyi b/third_party/2and3/sqlalchemy/orm/strategy_options.pyi index 31531dd3560e..5388580e8786 100644 --- a/third_party/2and3/sqlalchemy/orm/strategy_options.pyi +++ b/third_party/2and3/sqlalchemy/orm/strategy_options.pyi @@ -4,11 +4,10 @@ from typing import Any, Optional from .interfaces import MapperOption as MapperOption, PropComparator as PropComparator -from ..sql.base import _generative as _generative, Generative as Generative +from ..sql.base import Generative as Generative from .. import exc as sa_exc -from .base import _is_aliased_class as _is_aliased_class, _class_to_mapper as _class_to_mapper from . import util as orm_util -from .path_registry import PathRegistry as PathRegistry, TokenRegistry as TokenRegistry, _WILDCARD_TOKEN as _WILDCARD_TOKEN, _DEFAULT_TOKEN as _DEFAULT_TOKEN +from .path_registry import PathRegistry as PathRegistry, TokenRegistry as TokenRegistry class Load(Generative, MapperOption): path = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/orm/util.pyi b/third_party/2and3/sqlalchemy/orm/util.pyi index c91395f17568..8272535467da 100644 --- a/third_party/2and3/sqlalchemy/orm/util.pyi +++ b/third_party/2and3/sqlalchemy/orm/util.pyi @@ -5,14 +5,12 @@ from typing import Any, Optional, Text from ..sql.selectable import FromClause -import sql_util -import expression 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, _none_set as _none_set, _never_set as _never_set -from .base import class_mapper as class_mapper, _class_to_mapper as _class_to_mapper +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 diff --git a/third_party/2and3/sqlalchemy/types.pyi b/third_party/2and3/sqlalchemy/types.pyi index e24b4fc635b3..f8f27d686f8b 100644 --- a/third_party/2and3/sqlalchemy/types.pyi +++ b/third_party/2and3/sqlalchemy/types.pyi @@ -3,4 +3,4 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. 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 +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 From bd5dc8433cf592ebf761b9adef15af3f81d57365 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 24 Mar 2017 19:37:37 -0700 Subject: [PATCH 07/16] remove stubs for sqlalchemy.testing This appears to be internal to sqlalchemy and just for testing. --- .../2and3/sqlalchemy/testing/__init__.pyi | 16 -- .../2and3/sqlalchemy/testing/assertions.pyi | 50 ----- .../2and3/sqlalchemy/testing/assertsql.pyi | 76 ------- .../2and3/sqlalchemy/testing/config.pyi | 40 ---- .../2and3/sqlalchemy/testing/engines.pyi | 60 ----- .../2and3/sqlalchemy/testing/entities.pyi | 13 -- .../2and3/sqlalchemy/testing/exclusions.pyi | 80 ------- .../2and3/sqlalchemy/testing/fixtures.pyi | 78 ------- third_party/2and3/sqlalchemy/testing/mock.pyi | 5 - .../2and3/sqlalchemy/testing/pickleable.pyi | 65 ------ .../sqlalchemy/testing/plugin/__init__.pyi | 4 - .../sqlalchemy/testing/plugin/noseplugin.pyi | 25 --- .../sqlalchemy/testing/plugin/plugin_base.pyi | 46 ---- .../testing/plugin/pytestplugin.pyi | 20 -- .../2and3/sqlalchemy/testing/profiling.pyi | 25 --- .../2and3/sqlalchemy/testing/provision.pyi | 23 -- .../sqlalchemy/testing/replay_fixture.pyi | 31 --- .../2and3/sqlalchemy/testing/requirements.pyi | 211 ------------------ .../2and3/sqlalchemy/testing/runner.pyi | 8 - .../2and3/sqlalchemy/testing/schema.pyi | 6 - third_party/2and3/sqlalchemy/testing/util.pyi | 41 ---- .../2and3/sqlalchemy/testing/warnings.pyi | 8 - 22 files changed, 931 deletions(-) delete mode 100644 third_party/2and3/sqlalchemy/testing/__init__.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/assertions.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/assertsql.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/config.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/engines.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/entities.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/exclusions.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/fixtures.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/mock.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/pickleable.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/plugin/__init__.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/plugin/noseplugin.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/plugin/plugin_base.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/plugin/pytestplugin.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/profiling.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/provision.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/replay_fixture.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/requirements.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/runner.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/schema.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/util.pyi delete mode 100644 third_party/2and3/sqlalchemy/testing/warnings.pyi diff --git a/third_party/2and3/sqlalchemy/testing/__init__.pyi b/third_party/2and3/sqlalchemy/testing/__init__.pyi deleted file mode 100644 index 0b46b2c05f4b..000000000000 --- a/third_party/2and3/sqlalchemy/testing/__init__.pyi +++ /dev/null @@ -1,16 +0,0 @@ -# Stubs for sqlalchemy.testing (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from .warnings import assert_warnings as assert_warnings -from .exclusions import db_spec as db_spec, _is_excluded as _is_excluded, fails_if as fails_if, skip_if as skip_if, future as future, fails_on as fails_on, fails_on_everything_except as fails_on_everything_except, skip as skip, only_on as only_on, exclude as exclude, _server_version as _server_version, only_if as only_if, fails as fails -from .exclusions import against as _against -from .assertions import emits_warning as emits_warning, emits_warning_on as emits_warning_on, uses_deprecated as uses_deprecated, eq_ as eq_, ne_ as ne_, le_ as le_, is_ as is_, is_not_ as is_not_, startswith_ as startswith_, assert_raises as assert_raises, assert_raises_message as assert_raises_message, AssertsCompiledSQL as AssertsCompiledSQL, ComparesTables as ComparesTables, AssertsExecutionResults as AssertsExecutionResults, expect_deprecated as expect_deprecated, expect_warnings as expect_warnings, in_ as in_, not_in_ as not_in_, eq_ignore_whitespace as eq_ignore_whitespace, eq_regex as eq_regex, is_true as is_true, is_false as is_false -from .util import run_as_contextmanager as run_as_contextmanager, rowset as rowset, fail as fail, provide_metadata as provide_metadata, adict as adict, force_drop_names as force_drop_names, teardown_events as teardown_events -from .config import db as db -from .config import requirements as requires - -def against(*queries): ... - -crashes = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/testing/assertions.pyi b/third_party/2and3/sqlalchemy/testing/assertions.pyi deleted file mode 100644 index be63707acbb7..000000000000 --- a/third_party/2and3/sqlalchemy/testing/assertions.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# Stubs for sqlalchemy.testing.assertions (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any, Optional -from . import util as testutil -from sqlalchemy import types as sqltypes, exc as sa_exc -from .exclusions import db_spec as db_spec, _is_excluded as _is_excluded -from .util import fail as fail - -def expect_warnings(*messages, **kw): ... -def expect_warnings_on(db, *messages, **kw): ... -def emits_warning(*messages): ... -def expect_deprecated(*messages, **kw): ... -def emits_warning_on(db, *messages): ... -def uses_deprecated(*messages): ... -def global_cleanup_assertions(): ... -def eq_regex(a, b, msg: Optional[Any] = ...): ... -def eq_(a, b, msg: Optional[Any] = ...): ... -def ne_(a, b, msg: Optional[Any] = ...): ... -def le_(a, b, msg: Optional[Any] = ...): ... -def is_true(a, msg: Optional[Any] = ...): ... -def is_false(a, msg: Optional[Any] = ...): ... -def is_(a, b, msg: Optional[Any] = ...): ... -def is_not_(a, b, msg: Optional[Any] = ...): ... -def in_(a, b, msg: Optional[Any] = ...): ... -def not_in_(a, b, msg: Optional[Any] = ...): ... -def startswith_(a, fragment, msg: Optional[Any] = ...): ... -def eq_ignore_whitespace(a, b, msg: Optional[Any] = ...): ... -def assert_raises(except_cls, callable_, *args, **kw): ... -def assert_raises_message(except_cls, msg, callable_, *args, **kwargs): ... - -class AssertsCompiledSQL: - def assert_compile(self, clause, result, params: Optional[Any] = ..., checkparams: Optional[Any] = ..., dialect: Optional[Any] = ..., checkpositional: Optional[Any] = ..., check_prefetch: Optional[Any] = ..., use_default_dialect: bool = ..., allow_dialect_select: bool = ..., literal_binds: bool = ..., schema_translate_map: Optional[Any] = ...): ... - -class ComparesTables: - def assert_tables_equal(self, table, reflected_table, strict_types: bool = ...): ... - def assert_types_base(self, c1, c2): ... - -class AssertsExecutionResults: - def assert_result(self, result, class_, *objects): ... - def assert_list(self, result, class_, list): ... - def assert_row(self, class_, rowobj, desc): ... - def assert_unordered_result(self, result, cls, *expected): ... - def sql_execution_asserter(self, db: Optional[Any] = ...): ... - def assert_sql_execution(self, db, callable_, *rules): ... - def assert_sql(self, db, callable_, rules): ... - def assert_sql_count(self, db, callable_, count): ... - def assert_execution(self, *rules): ... - def assert_statement_count(self, count): ... diff --git a/third_party/2and3/sqlalchemy/testing/assertsql.pyi b/third_party/2and3/sqlalchemy/testing/assertsql.pyi deleted file mode 100644 index d16970e14edf..000000000000 --- a/third_party/2and3/sqlalchemy/testing/assertsql.pyi +++ /dev/null @@ -1,76 +0,0 @@ -# Stubs for sqlalchemy.testing.assertsql (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any, Optional -from ..engine.default import DefaultDialect as DefaultDialect - -class AssertRule: - is_consumed = ... # type: bool - errormessage = ... # type: Any - consume_statement = ... # type: bool - def process_statement(self, execute_observed): ... - def no_more_statements(self): ... - -class SQLMatchRule(AssertRule): ... - -class CursorSQL(SQLMatchRule): - consume_statement = ... # type: bool - statement = ... # type: Any - params = ... # type: Any - def __init__(self, statement, params: Optional[Any] = ...) -> None: ... - errormessage = ... # type: Any - is_consumed = ... # type: bool - def process_statement(self, execute_observed): ... - -class CompiledSQL(SQLMatchRule): - statement = ... # type: Any - params = ... # type: Any - dialect = ... # type: Any - def __init__(self, statement, params: Optional[Any] = ..., dialect: str = ...) -> None: ... - is_consumed = ... # type: bool - errormessage = ... # type: Any - def process_statement(self, execute_observed): ... - -class RegexSQL(CompiledSQL): - regex = ... # type: Any - orig_regex = ... # type: Any - params = ... # type: Any - dialect = ... # type: str - def __init__(self, regex, params: Optional[Any] = ...) -> None: ... - -class DialectSQL(CompiledSQL): ... - -class CountStatements(AssertRule): - count = ... # type: Any - def __init__(self, count) -> None: ... - def process_statement(self, execute_observed): ... - def no_more_statements(self): ... - -class AllOf(AssertRule): - rules = ... # type: Any - def __init__(self, *rules) -> None: ... - is_consumed = ... # type: bool - errormessage = ... # type: Any - def process_statement(self, execute_observed): ... - -class Or(AllOf): - is_consumed = ... # type: bool - errormessage = ... # type: Any - def process_statement(self, execute_observed): ... - -class SQLExecuteObserved: - context = ... # type: Any - clauseelement = ... # type: Any - parameters = ... # type: Any - statements = ... # type: Any - def __init__(self, context, clauseelement, multiparams, params) -> None: ... - -class SQLCursorExecuteObserved: ... - -class SQLAsserter: - accumulated = ... # type: Any - def __init__(self) -> None: ... - def assert_(self, *rules): ... - -def assert_engine(engine): ... diff --git a/third_party/2and3/sqlalchemy/testing/config.pyi b/third_party/2and3/sqlalchemy/testing/config.pyi deleted file mode 100644 index aa1bcb710b97..000000000000 --- a/third_party/2and3/sqlalchemy/testing/config.pyi +++ /dev/null @@ -1,40 +0,0 @@ -# Stubs for sqlalchemy.testing.config (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from unittest import SkipTest as _skip_test_exception - -requirements = ... # type: Any -db = ... # type: Any -db_url = ... # type: Any -db_opts = ... # type: Any -file_config = ... # type: Any -test_schema = ... # type: Any -test_schema_2 = ... # type: Any - -class Config: - db = ... # type: Any - db_opts = ... # type: Any - options = ... # type: Any - file_config = ... # type: Any - test_schema = ... # type: str - test_schema_2 = ... # type: str - def __init__(self, db, db_opts, options, file_config) -> None: ... - @classmethod - def register(cls, db, db_opts, options, file_config): ... - @classmethod - def set_as_current(cls, config, namespace): ... - @classmethod - def push_engine(cls, db, namespace): ... - @classmethod - def push(cls, config, namespace): ... - @classmethod - def reset(cls, namespace): ... - @classmethod - def all_configs(cls): ... - @classmethod - def all_dbs(cls): ... - def skip_test(self, msg): ... - -def skip_test(msg): ... diff --git a/third_party/2and3/sqlalchemy/testing/engines.pyi b/third_party/2and3/sqlalchemy/testing/engines.pyi deleted file mode 100644 index 067d2d74429d..000000000000 --- a/third_party/2and3/sqlalchemy/testing/engines.pyi +++ /dev/null @@ -1,60 +0,0 @@ -# Stubs for sqlalchemy.testing.engines (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any, Optional -from .util import decorator as decorator - -class ConnectionKiller: - proxy_refs = ... # type: Any - testing_engines = ... # type: Any - conns = ... # type: Any - def __init__(self) -> None: ... - def add_engine(self, engine): ... - def connect(self, dbapi_conn, con_record): ... - def checkout(self, dbapi_con, con_record, con_proxy): ... - def invalidate(self, dbapi_con, con_record, exception): ... - def rollback_all(self): ... - def close_all(self): ... - def assert_all_closed(self): ... - -testing_reaper = ... # type: Any - -def drop_all_tables(metadata, bind): ... -def assert_conns_closed(fn, *args, **kw): ... -def rollback_open_connections(fn, *args, **kw): ... -def close_first(fn, *args, **kw): ... -def close_open_connections(fn, *args, **kw): ... -def all_dialects(exclude: Optional[Any] = ...): ... - -class ReconnectFixture: - dbapi = ... # type: Any - connections = ... # type: Any - def __init__(self, dbapi) -> None: ... - def __getattr__(self, key): ... - def connect(self, *args, **kwargs): ... - def shutdown(self): ... - -def reconnecting_engine(url: Optional[Any] = ..., options: Optional[Any] = ...): ... -def testing_engine(url: Optional[Any] = ..., options: Optional[Any] = ...): ... -def mock_engine(dialect_name: Optional[Any] = ...): ... - -class DBAPIProxyCursor: - engine = ... # type: Any - connection = ... # type: Any - cursor = ... # type: Any - def __init__(self, engine, conn, *args, **kwargs) -> None: ... - def execute(self, stmt, parameters: Optional[Any] = ..., **kw): ... - def executemany(self, stmt, params, **kw): ... - def __getattr__(self, key): ... - -class DBAPIProxyConnection: - conn = ... # type: Any - engine = ... # type: Any - cursor_cls = ... # type: Any - def __init__(self, engine, cursor_cls) -> None: ... - def cursor(self, *args, **kwargs): ... - def close(self): ... - def __getattr__(self, key): ... - -def proxying_engine(conn_cls: Any = ..., cursor_cls: Any = ...): ... diff --git a/third_party/2and3/sqlalchemy/testing/entities.pyi b/third_party/2and3/sqlalchemy/testing/entities.pyi deleted file mode 100644 index 16484b13fcfb..000000000000 --- a/third_party/2and3/sqlalchemy/testing/entities.pyi +++ /dev/null @@ -1,13 +0,0 @@ -# Stubs for sqlalchemy.testing.entities (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from sqlalchemy import exc as sa_exc - -class BasicEntity: - def __init__(self, **kw) -> None: ... - -class ComparableEntity(BasicEntity): - def __hash__(self): ... - def __ne__(self, other): ... - def __eq__(self, other): ... diff --git a/third_party/2and3/sqlalchemy/testing/exclusions.pyi b/third_party/2and3/sqlalchemy/testing/exclusions.pyi deleted file mode 100644 index a8cda6aed7a2..000000000000 --- a/third_party/2and3/sqlalchemy/testing/exclusions.pyi +++ /dev/null @@ -1,80 +0,0 @@ -# Stubs for sqlalchemy.testing.exclusions (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any, Optional -from ..util import decorator as decorator - -def skip_if(predicate, reason: Optional[Any] = ...): ... -def fails_if(predicate, reason: Optional[Any] = ...): ... - -class compound: - fails = ... # type: Any - skips = ... # type: Any - tags = ... # type: Any - def __init__(self) -> None: ... - def __add__(self, other): ... - def add(self, *others): ... - def not_(self): ... - @property - def enabled(self): ... - def enabled_for_config(self, config): ... - def matching_config_reasons(self, config): ... - def include_test(self, include_tags, exclude_tags): ... - def __call__(self, fn): ... - def fail_if(self): ... - -def requires_tag(tagname): ... -def tags(tagnames): ... -def only_if(predicate, reason: Optional[Any] = ...): ... -def succeeds_if(predicate, reason: Optional[Any] = ...): ... - -class Predicate: - @classmethod - def as_predicate(cls, predicate, description: Optional[Any] = ...): ... - -class BooleanPredicate(Predicate): - value = ... # type: Any - description = ... # type: Any - def __init__(self, value, description: Optional[Any] = ...) -> None: ... - def __call__(self, config): ... - -class SpecPredicate(Predicate): - db = ... # type: Any - op = ... # type: Any - spec = ... # type: Any - description = ... # type: Any - def __init__(self, db, op: Optional[Any] = ..., spec: Optional[Any] = ..., description: Optional[Any] = ...) -> None: ... - def __call__(self, config): ... - -class LambdaPredicate(Predicate): - lambda_ = ... # type: Any - args = ... # type: Any - kw = ... # type: Any - description = ... # type: Any - def __init__(self, lambda_, description: Optional[Any] = ..., args: Optional[Any] = ..., kw: Optional[Any] = ...) -> None: ... - def __call__(self, config): ... - -class NotPredicate(Predicate): - predicate = ... # type: Any - description = ... # type: Any - def __init__(self, predicate, description: Optional[Any] = ...) -> None: ... - def __call__(self, config): ... - -class OrPredicate(Predicate): - predicates = ... # type: Any - description = ... # type: Any - def __init__(self, predicates, description: Optional[Any] = ...) -> None: ... - def __call__(self, config): ... - -def db_spec(*dbs): ... -def open(): ... -def closed(): ... -def fails(reason: Optional[Any] = ...): ... -def future(fn, *arg): ... -def fails_on(db, reason: Optional[Any] = ...): ... -def fails_on_everything_except(*dbs): ... -def skip(db, reason: Optional[Any] = ...): ... -def only_on(dbs, reason: Optional[Any] = ...): ... -def exclude(db, op, spec, reason: Optional[Any] = ...): ... -def against(config, *queries): ... diff --git a/third_party/2and3/sqlalchemy/testing/fixtures.pyi b/third_party/2and3/sqlalchemy/testing/fixtures.pyi deleted file mode 100644 index 979872080e80..000000000000 --- a/third_party/2and3/sqlalchemy/testing/fixtures.pyi +++ /dev/null @@ -1,78 +0,0 @@ -# Stubs for sqlalchemy.testing.fixtures (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any, Optional -import assertions -from .util import adict as adict -from .engines import drop_all_tables as drop_all_tables -from .entities import BasicEntity as BasicEntity, ComparableEntity as ComparableEntity - -class TestBase: - __whitelist__ = ... # type: Any - __requires__ = ... # type: Any - __unsupported_on__ = ... # type: Any - __only_on__ = ... # type: Any - __skip_if__ = ... # type: Any - def assert_(self, val, msg: Optional[Any] = ...): ... - def setup(self): ... - def teardown(self): ... - -class TablesTest(TestBase): - run_setup_bind = ... # type: str - run_define_tables = ... # type: str - run_create_tables = ... # type: str - run_inserts = ... # type: str - run_deletes = ... # type: str - run_dispose_bind = ... # type: Any - bind = ... # type: Any - metadata = ... # type: Any - tables = ... # type: Any - other = ... # type: Any - @classmethod - def setup_class(cls): ... - def setup(self): ... - def teardown(self): ... - @classmethod - def teardown_class(cls): ... - @classmethod - def setup_bind(cls): ... - @classmethod - def dispose_bind(cls, bind): ... - @classmethod - def define_tables(cls, metadata): ... - @classmethod - def fixtures(cls): ... - @classmethod - def insert_data(cls): ... - def sql_count_(self, count, fn): ... - def sql_eq_(self, callable_, statements): ... - -class RemovesEvents: - def event_listen(self, target, name, fn): ... - def teardown(self): ... - -class _ORMTest: - @classmethod - def teardown_class(cls): ... - -class ORMTest(_ORMTest, TestBase): ... - -class MappedTest(_ORMTest, TablesTest, assertions.AssertsExecutionResults): - run_setup_classes = ... # type: str - run_setup_mappers = ... # type: str - classes = ... # type: Any - @classmethod - def setup_class(cls): ... - @classmethod - def teardown_class(cls): ... - def setup(self): ... - def teardown(self): ... - @classmethod - def setup_classes(cls): ... - @classmethod - def setup_mappers(cls): ... - -class DeclarativeMappedTest(MappedTest): - run_setup_classes = ... # type: str - run_setup_mappers = ... # type: str diff --git a/third_party/2and3/sqlalchemy/testing/mock.pyi b/third_party/2and3/sqlalchemy/testing/mock.pyi deleted file mode 100644 index e5f9b0abf969..000000000000 --- a/third_party/2and3/sqlalchemy/testing/mock.pyi +++ /dev/null @@ -1,5 +0,0 @@ -# Stubs for sqlalchemy.testing.mock (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from ..util import py33 as py33 diff --git a/third_party/2and3/sqlalchemy/testing/pickleable.pyi b/third_party/2and3/sqlalchemy/testing/pickleable.pyi deleted file mode 100644 index a8659c88ebd3..000000000000 --- a/third_party/2and3/sqlalchemy/testing/pickleable.pyi +++ /dev/null @@ -1,65 +0,0 @@ -# Stubs for sqlalchemy.testing.pickleable (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any, Optional -import fixtures - -class User(fixtures.ComparableEntity): ... -class Order(fixtures.ComparableEntity): ... -class Dingaling(fixtures.ComparableEntity): ... -class EmailUser(User): ... -class Address(fixtures.ComparableEntity): ... -class Child1(fixtures.ComparableEntity): ... -class Child2(fixtures.ComparableEntity): ... -class Parent(fixtures.ComparableEntity): ... - -class Screen: - obj = ... # type: Any - parent = ... # type: Any - def __init__(self, obj, parent: Optional[Any] = ...) -> None: ... - -class Foo: - data = ... # type: str - stuff = ... # type: str - moredata = ... # type: Any - def __init__(self, moredata) -> None: ... - __hash__ = ... # type: Any - def __eq__(self, other): ... - -class Bar: - x = ... # type: Any - y = ... # type: Any - def __init__(self, x, y) -> None: ... - __hash__ = ... # type: Any - def __eq__(self, other): ... - -class OldSchool: - x = ... # type: Any - y = ... # type: Any - def __init__(self, x, y) -> None: ... - def __eq__(self, other): ... - -class OldSchoolWithoutCompare: - x = ... # type: Any - y = ... # type: Any - def __init__(self, x, y) -> None: ... - -class BarWithoutCompare: - x = ... # type: Any - y = ... # type: Any - def __init__(self, x, y) -> None: ... - -class NotComparable: - data = ... # type: Any - def __init__(self, data) -> None: ... - def __hash__(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... - -class BrokenComparable: - data = ... # type: Any - def __init__(self, data) -> None: ... - def __hash__(self): ... - def __eq__(self, other): ... - def __ne__(self, other): ... diff --git a/third_party/2and3/sqlalchemy/testing/plugin/__init__.pyi b/third_party/2and3/sqlalchemy/testing/plugin/__init__.pyi deleted file mode 100644 index 5ee33609f81c..000000000000 --- a/third_party/2and3/sqlalchemy/testing/plugin/__init__.pyi +++ /dev/null @@ -1,4 +0,0 @@ -# Stubs for sqlalchemy.testing.plugin (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - diff --git a/third_party/2and3/sqlalchemy/testing/plugin/noseplugin.pyi b/third_party/2and3/sqlalchemy/testing/plugin/noseplugin.pyi deleted file mode 100644 index caaff382585b..000000000000 --- a/third_party/2and3/sqlalchemy/testing/plugin/noseplugin.pyi +++ /dev/null @@ -1,25 +0,0 @@ -# Stubs for sqlalchemy.testing.plugin.noseplugin (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from nose.plugins import Plugin - -fixtures = ... # type: Any -py3k = ... # type: Any - -class NoseSQLAlchemy(Plugin): - enabled = ... # type: bool - name = ... # type: str - score = ... # type: int - def options(self, parser, env: Any = ...): ... - def configure(self, options, conf): ... - def begin(self): ... - def describeTest(self, test): ... - def wantFunction(self, fn): ... - def wantMethod(self, fn): ... - def wantClass(self, cls): ... - def beforeTest(self, test): ... - def afterTest(self, test): ... - def startContext(self, ctx): ... - def stopContext(self, ctx): ... diff --git a/third_party/2and3/sqlalchemy/testing/plugin/plugin_base.pyi b/third_party/2and3/sqlalchemy/testing/plugin/plugin_base.pyi deleted file mode 100644 index 4a04bf3b4438..000000000000 --- a/third_party/2and3/sqlalchemy/testing/plugin/plugin_base.pyi +++ /dev/null @@ -1,46 +0,0 @@ -# Stubs for sqlalchemy.testing.plugin.plugin_base (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any - -py3k = ... # type: Any -fixtures = ... # type: Any -engines = ... # type: Any -exclusions = ... # type: Any -warnings = ... # type: Any -profiling = ... # type: Any -assertions = ... # type: Any -requirements = ... # type: Any -config = ... # type: Any -testing = ... # type: Any -util = ... # type: Any -file_config = ... # type: Any -logging = ... # type: Any -include_tags = ... # type: Any -exclude_tags = ... # type: Any -options = ... # type: Any - -def setup_options(make_option): ... -def configure_follower(follower_ident): ... -def memoize_important_follower_config(dict_): ... -def restore_important_follower_config(dict_): ... -def read_config(): ... -def pre_begin(opt): ... -def set_coverage_flag(value): ... -def set_skip_test(exc): ... -def post_begin(): ... - -pre_configure = ... # type: Any -post_configure = ... # type: Any - -def pre(fn): ... -def post(fn): ... -def want_class(cls): ... -def want_method(cls, fn): ... -def generate_sub_tests(cls, module): ... -def start_test_class(cls): ... -def stop_test_class(cls): ... -def final_process_cleanup(): ... -def before_test(test, test_module_name, test_class, test_name): ... -def after_test(test): ... diff --git a/third_party/2and3/sqlalchemy/testing/plugin/pytestplugin.pyi b/third_party/2and3/sqlalchemy/testing/plugin/pytestplugin.pyi deleted file mode 100644 index 68614093fe05..000000000000 --- a/third_party/2and3/sqlalchemy/testing/plugin/pytestplugin.pyi +++ /dev/null @@ -1,20 +0,0 @@ -# Stubs for sqlalchemy.testing.plugin.pytestplugin (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -has_xdist = ... # type: bool - -def pytest_addoption(parser): ... -def pytest_configure(config): ... -def pytest_sessionstart(session): ... -def pytest_sessionfinish(session): ... -def pytest_configure_node(node): ... -def pytest_testnodedown(node, error): ... -def pytest_collection_modifyitems(session, config, items): ... -def pytest_pycollect_makeitem(collector, name, obj): ... -def pytest_runtest_setup(item): ... -def pytest_runtest_teardown(item): ... -def test_setup(item): ... -def test_teardown(item): ... -def class_setup(item): ... -def class_teardown(item): ... diff --git a/third_party/2and3/sqlalchemy/testing/profiling.pyi b/third_party/2and3/sqlalchemy/testing/profiling.pyi deleted file mode 100644 index c2081b9141d7..000000000000 --- a/third_party/2and3/sqlalchemy/testing/profiling.pyi +++ /dev/null @@ -1,25 +0,0 @@ -# Stubs for sqlalchemy.testing.profiling (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from .util import gc_collect as gc_collect -from ..util import jython as jython, pypy as pypy, win32 as win32, update_wrapper as update_wrapper - -cProfile = ... # type: Any - -class ProfileStatsFile: - force_write = ... # type: Any - write = ... # type: Any - fname = ... # type: Any - short_fname = ... # type: Any - data = ... # type: Any - def __init__(self, filename) -> None: ... - @property - def platform_key(self): ... - def has_stats(self): ... - def result(self, callcount): ... - def replace(self, callcount): ... - -def function_call_count(variance: float = ...): ... -def count_functions(variance: float = ...): ... diff --git a/third_party/2and3/sqlalchemy/testing/provision.pyi b/third_party/2and3/sqlalchemy/testing/provision.pyi deleted file mode 100644 index 7e33d374532a..000000000000 --- a/third_party/2and3/sqlalchemy/testing/provision.pyi +++ /dev/null @@ -1,23 +0,0 @@ -# Stubs for sqlalchemy.testing.provision (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -from sqlalchemy.engine import url as sa_url - -log = ... # type: Any -FOLLOWER_IDENT = ... # type: Any - -class register: - fns = ... # type: Any - def __init__(self) -> None: ... - @classmethod - def init(cls, fn): ... - def for_db(self, dbname): ... - def __call__(self, cfg, *arg): ... - -def create_follower_db(follower_ident): ... -def configure_follower(follower_ident): ... -def setup_config(db_url, options, file_config, follower_ident): ... -def drop_follower_db(follower_ident): ... -def reap_oracle_dbs(eng, idents_file): ... diff --git a/third_party/2and3/sqlalchemy/testing/replay_fixture.pyi b/third_party/2and3/sqlalchemy/testing/replay_fixture.pyi deleted file mode 100644 index 76121ad6ebd4..000000000000 --- a/third_party/2and3/sqlalchemy/testing/replay_fixture.pyi +++ /dev/null @@ -1,31 +0,0 @@ -# Stubs for sqlalchemy.testing.replay_fixture (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any -import fixtures - -class ReplayFixtureTest(fixtures.TestBase): - metadata = ... # type: Any - engine = ... # type: Any - session = ... # type: Any - def test_invocation(self): ... - def setup_engine(self): ... - def teardown_engine(self): ... - -class ReplayableSession: - Callable = ... # type: Any - NoAttribute = ... # type: Any - Natives = ... # type: Any - buffer = ... # type: Any - def __init__(self) -> None: ... - def recorder(self, base): ... - def player(self): ... - class Recorder: - def __init__(self, buffer, subject) -> None: ... - def __call__(self, *args, **kw): ... - def __getattribute__(self, key): ... - class Player: - def __init__(self, buffer) -> None: ... - def __call__(self, *args, **kw): ... - def __getattribute__(self, key): ... diff --git a/third_party/2and3/sqlalchemy/testing/requirements.pyi b/third_party/2and3/sqlalchemy/testing/requirements.pyi deleted file mode 100644 index 0413f8bdd1cf..000000000000 --- a/third_party/2and3/sqlalchemy/testing/requirements.pyi +++ /dev/null @@ -1,211 +0,0 @@ -# Stubs for sqlalchemy.testing.requirements (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -class Requirements: ... - -class SuiteRequirements(Requirements): - @property - def create_table(self): ... - @property - def drop_table(self): ... - @property - def foreign_keys(self): ... - @property - def on_update_cascade(self): ... - @property - def non_updating_cascade(self): ... - @property - def deferrable_fks(self): ... - @property - def on_update_or_deferrable_fks(self): ... - @property - def self_referential_foreign_keys(self): ... - @property - def foreign_key_ddl(self): ... - @property - def named_constraints(self): ... - @property - def subqueries(self): ... - @property - def offset(self): ... - @property - def bound_limit_offset(self): ... - @property - def parens_in_union_contained_select_w_limit_offset(self): ... - @property - def parens_in_union_contained_select_wo_limit_offset(self): ... - @property - def boolean_col_expressions(self): ... - @property - def nullsordering(self): ... - @property - def standalone_binds(self): ... - @property - def intersect(self): ... - @property - def except_(self): ... - @property - def window_functions(self): ... - @property - def autoincrement_insert(self): ... - @property - def fetch_rows_post_commit(self): ... - @property - def empty_inserts(self): ... - @property - def insert_from_select(self): ... - @property - def returning(self): ... - @property - def duplicate_names_in_cursor_description(self): ... - @property - def denormalized_names(self): ... - @property - def multivalues_inserts(self): ... - @property - def implements_get_lastrowid(self): ... - @property - def emulated_lastrowid(self): ... - @property - def dbapi_lastrowid(self): ... - @property - def views(self): ... - @property - def schemas(self): ... - @property - def server_side_cursors(self): ... - @property - def sequences(self): ... - @property - def sequences_optional(self): ... - @property - def reflects_pk_names(self): ... - @property - def table_reflection(self): ... - @property - def view_column_reflection(self): ... - @property - def view_reflection(self): ... - @property - def schema_reflection(self): ... - @property - def primary_key_constraint_reflection(self): ... - @property - def foreign_key_constraint_reflection(self): ... - @property - def foreign_key_constraint_option_reflection(self): ... - @property - def temp_table_reflection(self): ... - @property - def temp_table_names(self): ... - @property - def temporary_tables(self): ... - @property - def temporary_views(self): ... - @property - def index_reflection(self): ... - @property - def unique_constraint_reflection(self): ... - @property - def duplicate_key_raises_integrity_error(self): ... - @property - def unbounded_varchar(self): ... - @property - def unicode_data(self): ... - @property - def unicode_ddl(self): ... - @property - def datetime_literals(self): ... - @property - def datetime(self): ... - @property - def datetime_microseconds(self): ... - @property - def datetime_historic(self): ... - @property - def date(self): ... - @property - def date_coerces_from_datetime(self): ... - @property - def date_historic(self): ... - @property - def time(self): ... - @property - def time_microseconds(self): ... - @property - def binary_comparisons(self): ... - @property - def binary_literals(self): ... - @property - def json_type(self): ... - @property - def json_array_indexes(self): ... - @property - def precision_numerics_general(self): ... - @property - def precision_numerics_enotation_small(self): ... - @property - def precision_numerics_enotation_large(self): ... - @property - def precision_numerics_many_significant_digits(self): ... - @property - def precision_numerics_retains_significant_digits(self): ... - @property - def precision_generic_float_type(self): ... - @property - def floats_to_four_decimals(self): ... - @property - def fetch_null_from_numeric(self): ... - @property - def text_type(self): ... - @property - def empty_strings_varchar(self): ... - @property - def empty_strings_text(self): ... - @property - def selectone(self): ... - @property - def savepoints(self): ... - @property - def two_phase_transactions(self): ... - @property - def update_from(self): ... - @property - def update_where_target_in_subquery(self): ... - @property - def mod_operator_as_percent_sign(self): ... - @property - def percent_schema_names(self): ... - @property - def order_by_label_with_expression(self): ... - @property - def unicode_connections(self): ... - @property - def graceful_disconnects(self): ... - @property - def skip_mysql_on_windows(self): ... - @property - def ad_hoc_engines(self): ... - @property - def timing_intensive(self): ... - @property - def memory_intensive(self): ... - @property - def threading_with_mock(self): ... - @property - def python2(self): ... - @property - def python3(self): ... - @property - def cpython(self): ... - @property - def non_broken_pickle(self): ... - @property - def predictable_gc(self): ... - @property - def no_coverage(self): ... - @property - def sqlite(self): ... - @property - def cextensions(self): ... diff --git a/third_party/2and3/sqlalchemy/testing/runner.pyi b/third_party/2and3/sqlalchemy/testing/runner.pyi deleted file mode 100644 index a4f200f657b5..000000000000 --- a/third_party/2and3/sqlalchemy/testing/runner.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for sqlalchemy.testing.runner (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from .plugin.noseplugin import NoseSQLAlchemy as NoseSQLAlchemy - -def main(): ... -def setup_py_test(): ... diff --git a/third_party/2and3/sqlalchemy/testing/schema.pyi b/third_party/2and3/sqlalchemy/testing/schema.pyi deleted file mode 100644 index 12930bbbe382..000000000000 --- a/third_party/2and3/sqlalchemy/testing/schema.pyi +++ /dev/null @@ -1,6 +0,0 @@ -# Stubs for sqlalchemy.testing.schema (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -def Table(*args, **kw): ... -def Column(*args, **kw): ... diff --git a/third_party/2and3/sqlalchemy/testing/util.pyi b/third_party/2and3/sqlalchemy/testing/util.pyi deleted file mode 100644 index eeb76a344dfb..000000000000 --- a/third_party/2and3/sqlalchemy/testing/util.pyi +++ /dev/null @@ -1,41 +0,0 @@ -# Stubs for sqlalchemy.testing.util (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from typing import Any, Optional -from ..util import jython as jython, pypy as pypy, defaultdict as defaultdict, decorator as decorator, py2k as py2k - -def jython_gc_collect(*args): ... - -gc_collect = ... # type: Any - -lazy_gc = ... # type: Any - -def pypy_gc_collect(*args): ... -def picklers(): ... -def round_decimal(value, prec): ... - -class RandomSet(set): - def __iter__(self): ... - def pop(self): ... - def union(self, other): ... - def difference(self, other): ... - def intersection(self, other): ... - def copy(self): ... - -def conforms_partial_ordering(tuples, sorted_elements): ... -def all_partial_orderings(tuples, elements): ... -def function_named(fn, name): ... -def run_as_contextmanager(ctx, fn, *arg, **kw): ... -def rowset(results): ... -def fail(msg): ... -def provide_metadata(fn, *args, **kw): ... -def force_drop_names(*names): ... - -class adict(dict): - def __getattribute__(self, key): ... - def __call__(self, *keys): ... - get_all = ... # type: Any - -def drop_all_tables(engine, inspector, schema: Optional[Any] = ..., include_names: Optional[Any] = ...): ... -def teardown_events(event_cls): ... diff --git a/third_party/2and3/sqlalchemy/testing/warnings.pyi b/third_party/2and3/sqlalchemy/testing/warnings.pyi deleted file mode 100644 index cc5b0a537b56..000000000000 --- a/third_party/2and3/sqlalchemy/testing/warnings.pyi +++ /dev/null @@ -1,8 +0,0 @@ -# Stubs for sqlalchemy.testing.warnings (Python 3.6) -# -# NOTE: This dynamically typed stub was automatically generated by stubgen. - -from .. import exc as sa_exc - -def setup_filters(): ... -def assert_warnings(fn, warning_msgs, regex: bool = ...): ... From 15429e82b21794ee25eb25ca6f087adbb76cc7b9 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 24 Mar 2017 19:49:50 -0700 Subject: [PATCH 08/16] fix a few flake errors --- third_party/2and3/sqlalchemy/cresultproxy.pyi | 8 ++++---- third_party/2and3/sqlalchemy/event/legacy.pyi | 1 - third_party/2and3/sqlalchemy/util/compat.pyi | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/third_party/2and3/sqlalchemy/cresultproxy.pyi b/third_party/2and3/sqlalchemy/cresultproxy.pyi index 46c0f18ca818..8a7bf95abc41 100644 --- a/third_party/2and3/sqlalchemy/cresultproxy.pyi +++ b/third_party/2and3/sqlalchemy/cresultproxy.pyi @@ -7,10 +7,10 @@ from typing import Any def safe_rowproxy_reconstructor(*args, **kwargs): ... class BaseRowProxy: - _keymap = ... # type: Any - _parent = ... # type: Any - _processors = ... # type: Any - _row = ... # type: Any + _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): ... diff --git a/third_party/2and3/sqlalchemy/event/legacy.pyi b/third_party/2and3/sqlalchemy/event/legacy.pyi index 7e7a5fe659c1..8ef449c1a028 100644 --- a/third_party/2and3/sqlalchemy/event/legacy.pyi +++ b/third_party/2and3/sqlalchemy/event/legacy.pyi @@ -1,4 +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/util/compat.pyi b/third_party/2and3/sqlalchemy/util/compat.pyi index e5a285b5dcb0..44783681545f 100644 --- a/third_party/2and3/sqlalchemy/util/compat.pyi +++ b/third_party/2and3/sqlalchemy/util/compat.pyi @@ -9,6 +9,7 @@ from collections import namedtuple from io import BytesIO as byte_buffer from io import StringIO from inspect import getargspec as inspect_getfullargspec +from operator import attrgetter as dottedgetter if sys.version_info < (3, 0): from itertools import izip_longest as zip_longest import cPickle as pickle @@ -19,7 +20,6 @@ else: 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) -from operator import attrgetter as dottedgetter py36 = ... # type: Any py33 = ... # type: Any From d48f79f69dd96080b373afa31c448d4be655bdcc Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 24 Mar 2017 19:51:42 -0700 Subject: [PATCH 09/16] make classes inherit from "object" for Python 2 compatibility This was just codemod. --- .../2and3/sqlalchemy/connectors/__init__.pyi | 2 +- third_party/2and3/sqlalchemy/cprocessors.pyi | 4 ++-- third_party/2and3/sqlalchemy/cresultproxy.pyi | 2 +- .../dialects/firebird/kinterbasdb.pyi | 2 +- .../2and3/sqlalchemy/dialects/mssql/base.pyi | 4 ++-- .../sqlalchemy/dialects/mssql/pyodbc.pyi | 2 +- .../2and3/sqlalchemy/dialects/mysql/base.pyi | 2 +- .../2and3/sqlalchemy/dialects/mysql/json.pyi | 2 +- .../sqlalchemy/dialects/mysql/reflection.pyi | 4 ++-- .../2and3/sqlalchemy/dialects/mysql/types.pyi | 2 +- .../sqlalchemy/dialects/oracle/cx_oracle.pyi | 4 ++-- .../sqlalchemy/dialects/oracle/zxjdbc.pyi | 2 +- .../sqlalchemy/dialects/postgresql/ranges.pyi | 2 +- .../2and3/sqlalchemy/dialects/sqlite/base.pyi | 2 +- .../2and3/sqlalchemy/dialects/sybase/base.pyi | 2 +- third_party/2and3/sqlalchemy/engine/base.pyi | 4 ++-- .../2and3/sqlalchemy/engine/interfaces.pyi | 10 ++++----- .../2and3/sqlalchemy/engine/reflection.pyi | 2 +- .../2and3/sqlalchemy/engine/result.pyi | 2 +- .../2and3/sqlalchemy/engine/strategies.pyi | 2 +- third_party/2and3/sqlalchemy/engine/url.pyi | 2 +- third_party/2and3/sqlalchemy/event/base.pyi | 10 ++++----- .../2and3/sqlalchemy/event/registry.pyi | 2 +- third_party/2and3/sqlalchemy/exc.pyi | 2 +- .../2and3/sqlalchemy/ext/associationproxy.pyi | 4 ++-- third_party/2and3/sqlalchemy/ext/automap.pyi | 2 +- third_party/2and3/sqlalchemy/ext/baked.pyi | 4 ++-- third_party/2and3/sqlalchemy/ext/compiler.pyi | 2 +- .../2and3/sqlalchemy/ext/declarative/api.pyi | 4 ++-- .../2and3/sqlalchemy/ext/declarative/base.pyi | 2 +- .../ext/declarative/clsregistry.pyi | 12 +++++----- .../2and3/sqlalchemy/ext/instrumentation.pyi | 2 +- third_party/2and3/sqlalchemy/ext/mutable.pyi | 2 +- third_party/2and3/sqlalchemy/interfaces.pyi | 4 ++-- third_party/2and3/sqlalchemy/log.pyi | 6 ++--- .../2and3/sqlalchemy/orm/attributes.pyi | 4 ++-- third_party/2and3/sqlalchemy/orm/base.pyi | 4 ++-- .../2and3/sqlalchemy/orm/collections.pyi | 10 ++++----- .../2and3/sqlalchemy/orm/dependency.pyi | 2 +- .../sqlalchemy/orm/deprecated_interfaces.pyi | 6 ++--- third_party/2and3/sqlalchemy/orm/dynamic.pyi | 4 ++-- .../2and3/sqlalchemy/orm/evaluator.pyi | 2 +- third_party/2and3/sqlalchemy/orm/events.pyi | 4 ++-- third_party/2and3/sqlalchemy/orm/identity.pyi | 2 +- .../2and3/sqlalchemy/orm/instrumentation.pyi | 4 ++-- .../2and3/sqlalchemy/orm/interfaces.pyi | 4 ++-- .../2and3/sqlalchemy/orm/path_registry.pyi | 2 +- .../2and3/sqlalchemy/orm/persistence.pyi | 2 +- third_party/2and3/sqlalchemy/orm/query.pyi | 6 ++--- .../2and3/sqlalchemy/orm/relationships.pyi | 4 ++-- third_party/2and3/sqlalchemy/orm/scoping.pyi | 2 +- third_party/2and3/sqlalchemy/orm/session.pyi | 4 ++-- third_party/2and3/sqlalchemy/orm/state.pyi | 4 ++-- .../2and3/sqlalchemy/orm/strategies.pyi | 6 ++--- .../2and3/sqlalchemy/orm/strategy_options.pyi | 2 +- .../2and3/sqlalchemy/orm/unitofwork.pyi | 6 ++--- third_party/2and3/sqlalchemy/orm/util.pyi | 2 +- third_party/2and3/sqlalchemy/pool.pyi | 8 +++---- .../2and3/sqlalchemy/sql/annotation.pyi | 2 +- third_party/2and3/sqlalchemy/sql/base.pyi | 8 +++---- third_party/2and3/sqlalchemy/sql/compiler.pyi | 6 ++--- .../2and3/sqlalchemy/sql/functions.pyi | 4 ++-- third_party/2and3/sqlalchemy/sql/naming.pyi | 2 +- .../2and3/sqlalchemy/sql/operators.pyi | 4 ++-- third_party/2and3/sqlalchemy/sql/schema.pyi | 6 ++--- .../2and3/sqlalchemy/sql/selectable.pyi | 6 ++--- third_party/2and3/sqlalchemy/sql/sqltypes.pyi | 6 ++--- third_party/2and3/sqlalchemy/sql/type_api.pyi | 2 +- third_party/2and3/sqlalchemy/sql/util.pyi | 4 ++-- third_party/2and3/sqlalchemy/sql/visitors.pyi | 4 ++-- .../2and3/sqlalchemy/util/_collections.pyi | 12 +++++----- .../2and3/sqlalchemy/util/langhelpers.pyi | 22 +++++++++---------- third_party/2and3/sqlalchemy/util/queue.pyi | 2 +- 73 files changed, 151 insertions(+), 151 deletions(-) diff --git a/third_party/2and3/sqlalchemy/connectors/__init__.pyi b/third_party/2and3/sqlalchemy/connectors/__init__.pyi index cf9ae2a31ee6..8eee07e7454e 100644 --- a/third_party/2and3/sqlalchemy/connectors/__init__.pyi +++ b/third_party/2and3/sqlalchemy/connectors/__init__.pyi @@ -2,4 +2,4 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -class Connector: ... +class Connector(object): ... diff --git a/third_party/2and3/sqlalchemy/cprocessors.pyi b/third_party/2and3/sqlalchemy/cprocessors.pyi index 48e8654cb2c2..eaa758d943f5 100644 --- a/third_party/2and3/sqlalchemy/cprocessors.pyi +++ b/third_party/2and3/sqlalchemy/cprocessors.pyi @@ -9,11 +9,11 @@ def str_to_time(*args, **kwargs): ... def to_float(*args, **kwargs): ... def to_str(*args, **kwargs): ... -class DecimalResultProcessor: +class DecimalResultProcessor(object): def __init__(self, *args, **kwargs): ... def process(self, *args, **kwargs): ... -class UnicodeResultProcessor: +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 index 8a7bf95abc41..3781b6eac344 100644 --- a/third_party/2and3/sqlalchemy/cresultproxy.pyi +++ b/third_party/2and3/sqlalchemy/cresultproxy.pyi @@ -6,7 +6,7 @@ from typing import Any def safe_rowproxy_reconstructor(*args, **kwargs): ... -class BaseRowProxy: +class BaseRowProxy(object): _keymap = ... # type: Any _parent = ... # type: Any _processors = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi b/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi index c0dbd6f978f0..41bd938f303a 100644 --- a/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi +++ b/third_party/2and3/sqlalchemy/dialects/firebird/kinterbasdb.pyi @@ -6,7 +6,7 @@ from typing import Any, Optional from .base import FBDialect as FBDialect, FBExecutionContext as FBExecutionContext from ... import types as sqltypes -class _kinterbasdb_numeric: +class _kinterbasdb_numeric(object): def bind_processor(self, dialect): ... class _FBNumeric_kinterbasdb(_kinterbasdb_numeric, sqltypes.Numeric): ... diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/base.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/base.pyi index f18848839017..770f16353dd3 100644 --- a/third_party/2and3/sqlalchemy/dialects/mssql/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mssql/base.pyi @@ -39,7 +39,7 @@ class TIME(sqltypes.TIME): _MSTime = TIME -class _DateTimeBase: +class _DateTimeBase(object): def bind_processor(self, dialect): ... class _MSDateTime(_DateTimeBase, sqltypes.DateTime): ... @@ -57,7 +57,7 @@ class DATETIMEOFFSET(sqltypes.TypeEngine): precision = ... # type: Any def __init__(self, precision: Optional[Any] = ..., **kwargs) -> None: ... -class _StringType: +class _StringType(object): def __init__(self, collation: Optional[Any] = ...) -> None: ... class NTEXT(sqltypes.UnicodeText): diff --git a/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi b/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi index d974b3b65728..2d65adfd4743 100644 --- a/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mssql/pyodbc.pyi @@ -7,7 +7,7 @@ from .base import MSExecutionContext as MSExecutionContext, MSDialect as MSDiale from ...connectors.pyodbc import PyODBCConnector as PyODBCConnector from ... import types as sqltypes -class _ms_numeric_pyodbc: +class _ms_numeric_pyodbc(object): def bind_processor(self, dialect): ... class _MSNumeric_pyodbc(_ms_numeric_pyodbc, sqltypes.Numeric): ... diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi index 29336bfdf21c..75bb4397b66b 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/base.pyi @@ -177,7 +177,7 @@ class MySQLDialect(default.DefaultDialect): 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: +class _DecodingRowProxy(object): rowproxy = ... # type: Any charset = ... # type: Any def __init__(self, rowproxy, charset) -> None: ... diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi index 07b8409679d1..5cbc2f60bfc9 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/json.pyi @@ -7,7 +7,7 @@ from ... import types as sqltypes class JSON(sqltypes.JSON): ... -class _FormatTypeMixin: +class _FormatTypeMixin(object): def bind_processor(self, dialect): ... def literal_processor(self, dialect): ... diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/reflection.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/reflection.pyi index 9461bf1b0238..5c8bb3aa569e 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/reflection.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/reflection.pyi @@ -7,7 +7,7 @@ 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: +class ReflectedState(object): columns = ... # type: Any table_options = ... # type: Any table_name = ... # type: Any @@ -15,7 +15,7 @@ class ReflectedState: constraints = ... # type: Any def __init__(self) -> None: ... -class MySQLTableDefinitionParser: +class MySQLTableDefinitionParser(object): dialect = ... # type: Any preparer = ... # type: Any def __init__(self, dialect, preparer) -> None: ... diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi index a5fda1dc69a3..a218ee8d380f 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/types.pyi @@ -5,7 +5,7 @@ from typing import Any, Optional from ... import types as sqltypes -class _NumericType: +class _NumericType(object): unsigned = ... # type: Any zerofill = ... # type: Any def __init__(self, unsigned: bool = ..., zerofill: bool = ..., **kw) -> None: ... diff --git a/third_party/2and3/sqlalchemy/dialects/oracle/cx_oracle.pyi b/third_party/2and3/sqlalchemy/dialects/oracle/cx_oracle.pyi index c72cc6155d93..782cb2fc2e50 100644 --- a/third_party/2and3/sqlalchemy/dialects/oracle/cx_oracle.pyi +++ b/third_party/2and3/sqlalchemy/dialects/oracle/cx_oracle.pyi @@ -16,10 +16,10 @@ class _OracleDate(sqltypes.Date): def bind_processor(self, dialect): ... def result_processor(self, dialect, coltype): ... -class _LOBMixin: +class _LOBMixin(object): def result_processor(self, dialect, coltype): ... -class _NativeUnicodeMixin: +class _NativeUnicodeMixin(object): def bind_processor(self, dialect): ... class _OracleChar(_NativeUnicodeMixin, sqltypes.CHAR): diff --git a/third_party/2and3/sqlalchemy/dialects/oracle/zxjdbc.pyi b/third_party/2and3/sqlalchemy/dialects/oracle/zxjdbc.pyi index 7b71397f6fe6..881f7311510a 100644 --- a/third_party/2and3/sqlalchemy/dialects/oracle/zxjdbc.pyi +++ b/third_party/2and3/sqlalchemy/dialects/oracle/zxjdbc.pyi @@ -31,7 +31,7 @@ class OracleExecutionContext_zxjdbc(OracleExecutionContext): class ReturningResultProxy(_result.FullyBufferedResultProxy): def __init__(self, context, returning_row) -> None: ... -class ReturningParam: +class ReturningParam(object): type = ... # type: Any def __init__(self, type) -> None: ... def __eq__(self, other): ... diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi index 72f417fea762..e787406496b0 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/ranges.pyi @@ -5,7 +5,7 @@ from typing import Any from ... import types as sqltypes -class RangeOperators: +class RangeOperators(object): comparator_factory = ... # type: Any class INT4RANGE(RangeOperators, sqltypes.TypeEngine): diff --git a/third_party/2and3/sqlalchemy/dialects/sqlite/base.pyi b/third_party/2and3/sqlalchemy/dialects/sqlite/base.pyi index 097e059c7b8a..e278395411d9 100644 --- a/third_party/2and3/sqlalchemy/dialects/sqlite/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/sqlite/base.pyi @@ -9,7 +9,7 @@ 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: +class _DateTimeMixin(object): def __init__(self, storage_format: Optional[Any] = ..., regexp: Optional[Any] = ..., **kw) -> None: ... @property def format_is_text_affinity(self): ... diff --git a/third_party/2and3/sqlalchemy/dialects/sybase/base.pyi b/third_party/2and3/sqlalchemy/dialects/sybase/base.pyi index 57eaa9ba635e..a44d057ba4f5 100644 --- a/third_party/2and3/sqlalchemy/dialects/sybase/base.pyi +++ b/third_party/2and3/sqlalchemy/dialects/sybase/base.pyi @@ -16,7 +16,7 @@ from sqlalchemy.types import CHAR as CHAR, VARCHAR as VARCHAR, TIME as TIME, NCH RESERVED_WORDS = ... # type: Any -class _SybaseUnitypeMixin: +class _SybaseUnitypeMixin(object): def result_processor(self, dialect, coltype): ... class UNICHAR(_SybaseUnitypeMixin, sqltypes.Unicode): diff --git a/third_party/2and3/sqlalchemy/engine/base.pyi b/third_party/2and3/sqlalchemy/engine/base.pyi index 1a05b9eb2972..b3068b02674b 100644 --- a/third_party/2and3/sqlalchemy/engine/base.pyi +++ b/third_party/2and3/sqlalchemy/engine/base.pyi @@ -58,7 +58,7 @@ class ExceptionContextImpl(ExceptionContext): 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: +class Transaction(object): connection = ... # type: Any is_active = ... # type: bool def __init__(self, connection, parent) -> None: ... @@ -95,7 +95,7 @@ class Engine(Connectable, log.Identified): @property def driver(self): ... def dispose(self): ... - class _trans_ctx: + class _trans_ctx(object): conn = ... # type: Any transaction = ... # type: Any close_with_result = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/engine/interfaces.pyi b/third_party/2and3/sqlalchemy/engine/interfaces.pyi index a47b6cfb2f2e..0fbbb906c930 100644 --- a/third_party/2and3/sqlalchemy/engine/interfaces.pyi +++ b/third_party/2and3/sqlalchemy/engine/interfaces.pyi @@ -7,7 +7,7 @@ from ..sql.compiler import Compiled as Compiled, TypeCompiler as TypeCompiler from .base import Connection from .result import ResultProxy -class Dialect: +class Dialect(object): def create_connect_args(self, url): ... @classmethod def type_descriptor(cls, typeobj): ... @@ -55,14 +55,14 @@ class Dialect: @classmethod def engine_created(cls, engine): ... -class CreateEnginePlugin: +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: +class ExecutionContext(object): exception = ... # type: Any is_disconnect = ... # type: Any def create_cursor(self): ... @@ -74,7 +74,7 @@ class ExecutionContext: def lastrow_has_defaults(self): ... def get_rowcount(self): ... -class Connectable: +class Connectable(object): def connect(self, **kwargs: Any) -> Connection: ... def contextual_connect(self) -> Connection: ... def create(self, entity, **kwargs): ... @@ -82,7 +82,7 @@ class Connectable: def execute(self, object, *multiparams: Any, **params: Any) -> ResultProxy: ... def scalar(self, object, *multiparams: Any, **params: Any) -> Any: ... -class ExceptionContext: +class ExceptionContext(object): connection = ... # type: Any engine = ... # type: Any cursor = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/engine/reflection.pyi b/third_party/2and3/sqlalchemy/engine/reflection.pyi index 1f0c8749c00c..99e557a4dbdb 100644 --- a/third_party/2and3/sqlalchemy/engine/reflection.pyi +++ b/third_party/2and3/sqlalchemy/engine/reflection.pyi @@ -11,7 +11,7 @@ from .base import Connectable as Connectable def cache(fn, self, con, *args, **kw): ... -class Inspector: +class Inspector(object): bind = ... # type: Any engine = ... # type: Any dialect = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/engine/result.pyi b/third_party/2and3/sqlalchemy/engine/result.pyi index 0c6d78389b4a..3e2acf60d0c5 100644 --- a/third_party/2and3/sqlalchemy/engine/result.pyi +++ b/third_party/2and3/sqlalchemy/engine/result.pyi @@ -35,7 +35,7 @@ class RowProxy(BaseRowProxy): def iterkeys(self): ... def itervalues(self): ... -class ResultMetaData: +class ResultMetaData(object): case_sensitive = ... # type: Any matched_on_name = ... # type: bool def __init__(self, parent, cursor_description) -> None: ... diff --git a/third_party/2and3/sqlalchemy/engine/strategies.pyi b/third_party/2and3/sqlalchemy/engine/strategies.pyi index 8d5b49f61061..def4b3f6ef8f 100644 --- a/third_party/2and3/sqlalchemy/engine/strategies.pyi +++ b/third_party/2and3/sqlalchemy/engine/strategies.pyi @@ -8,7 +8,7 @@ from . import base strategies = ... # type: Any -class EngineStrategy: +class EngineStrategy(object): def __init__(self) -> None: ... def create(self, *args, **kwargs): ... diff --git a/third_party/2and3/sqlalchemy/engine/url.pyi b/third_party/2and3/sqlalchemy/engine/url.pyi index 2d3a91b9810c..fddaa5479c1e 100644 --- a/third_party/2and3/sqlalchemy/engine/url.pyi +++ b/third_party/2and3/sqlalchemy/engine/url.pyi @@ -5,7 +5,7 @@ from typing import Any, Optional from ..dialects import registry as registry, plugins as plugins -class URL: +class URL(object): drivername = ... # type: Any username = ... # type: Any password = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/event/base.pyi b/third_party/2and3/sqlalchemy/event/base.pyi index 3ce3d13295b5..0cf00ab1be76 100644 --- a/third_party/2and3/sqlalchemy/event/base.pyi +++ b/third_party/2and3/sqlalchemy/event/base.pyi @@ -5,10 +5,10 @@ from typing import Any, Optional from .attr import _JoinedListener as _JoinedListener, _EmptyListener as _EmptyListener, _ClsLevelDispatch as _ClsLevelDispatch -class _UnpickleDispatch: +class _UnpickleDispatch(object): def __call__(self, _instance_cls): ... -class _Dispatch: +class _Dispatch(object): def __init__(self, parent, instance_cls: Optional[Any] = ...) -> None: ... def __getattr__(self, name): ... def __reduce__(self): ... @@ -16,15 +16,15 @@ class _Dispatch: class _EventMeta(type): def __init__(cls, classname, bases, dict_) -> None: ... -class Events: ... +class Events(object): ... -class _JoinedDispatcher: +class _JoinedDispatcher(object): local = ... # type: Any parent = ... # type: Any def __init__(self, local, parent) -> None: ... def __getattr__(self, name): ... -class dispatcher: +class dispatcher(object): dispatch_cls = ... # type: Any events = ... # type: Any def __init__(self, events) -> None: ... diff --git a/third_party/2and3/sqlalchemy/event/registry.pyi b/third_party/2and3/sqlalchemy/event/registry.pyi index 7509270566d1..aa1c9445feee 100644 --- a/third_party/2and3/sqlalchemy/event/registry.pyi +++ b/third_party/2and3/sqlalchemy/event/registry.pyi @@ -4,7 +4,7 @@ from typing import Any, Optional -class _EventKey: +class _EventKey(object): target = ... # type: Any identifier = ... # type: Any fn = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/exc.pyi b/third_party/2and3/sqlalchemy/exc.pyi index d70b85766eac..df89f5249bbd 100644 --- a/third_party/2and3/sqlalchemy/exc.pyi +++ b/third_party/2and3/sqlalchemy/exc.pyi @@ -47,7 +47,7 @@ class NoReferencedColumnError(NoReferenceError): class NoSuchTableError(InvalidRequestError): ... class UnboundExecutionError(InvalidRequestError): ... -class DontWrapMixin: ... +class DontWrapMixin(object): ... UnmappedColumnError = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/ext/associationproxy.pyi b/third_party/2and3/sqlalchemy/ext/associationproxy.pyi index 35d4c3268f0e..f71f7cce0673 100644 --- a/third_party/2and3/sqlalchemy/ext/associationproxy.pyi +++ b/third_party/2and3/sqlalchemy/ext/associationproxy.pyi @@ -41,13 +41,13 @@ class AssociationProxy(interfaces.InspectionAttrInfo): def __eq__(self, obj): ... def __ne__(self, obj): ... -class _lazy_collection: +class _lazy_collection(object): ref = ... # type: Any target = ... # type: Any def __init__(self, obj, target) -> None: ... def __call__(self): ... -class _AssociationCollection: +class _AssociationCollection(object): lazy_collection = ... # type: Any creator = ... # type: Any getter = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/ext/automap.pyi b/third_party/2and3/sqlalchemy/ext/automap.pyi index 466a780bcb87..df473225e470 100644 --- a/third_party/2and3/sqlalchemy/ext/automap.pyi +++ b/third_party/2and3/sqlalchemy/ext/automap.pyi @@ -14,7 +14,7 @@ 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: +class AutomapBase(object): __abstract__ = ... # type: bool classes = ... # type: Any @classmethod diff --git a/third_party/2and3/sqlalchemy/ext/baked.pyi b/third_party/2and3/sqlalchemy/ext/baked.pyi index 8e98f5b4c3f4..c2faf288afcb 100644 --- a/third_party/2and3/sqlalchemy/ext/baked.pyi +++ b/third_party/2and3/sqlalchemy/ext/baked.pyi @@ -14,7 +14,7 @@ from .. import exc as sa_exc log = ... # type: Any -class BakedQuery: +class BakedQuery(object): steps = ... # type: Any def __init__(self, bakery, initial_fn, args: Any = ...) -> None: ... @classmethod @@ -27,7 +27,7 @@ class BakedQuery: def __call__(self, session): ... def spoil(self, full: bool = ...): ... -class Result: +class Result(object): bq = ... # type: Any session = ... # type: Any def __init__(self, bq, session) -> None: ... diff --git a/third_party/2and3/sqlalchemy/ext/compiler.pyi b/third_party/2and3/sqlalchemy/ext/compiler.pyi index c858a399e41e..34cd887b0a79 100644 --- a/third_party/2and3/sqlalchemy/ext/compiler.pyi +++ b/third_party/2and3/sqlalchemy/ext/compiler.pyi @@ -8,7 +8,7 @@ from ..sql import visitors as visitors def compiles(class_, *specs): ... def deregister(class_): ... -class _dispatcher: +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/api.pyi b/third_party/2and3/sqlalchemy/ext/declarative/api.pyi index d03ae79507d3..87045c36ba4b 100644 --- a/third_party/2and3/sqlalchemy/ext/declarative/api.pyi +++ b/third_party/2and3/sqlalchemy/ext/declarative/api.pyi @@ -34,7 +34,7 @@ class _stateful_declared_attr(declared_attr): 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: +class ConcreteBase(object): @classmethod def __declare_first__(cls): ... @@ -43,6 +43,6 @@ class AbstractConcreteBase(ConcreteBase): @classmethod def __declare_first__(cls): ... -class DeferredReflection: +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 index 528b6f003198..636ed25a7754 100644 --- a/third_party/2and3/sqlalchemy/ext/declarative/base.pyi +++ b/third_party/2and3/sqlalchemy/ext/declarative/base.pyi @@ -14,7 +14,7 @@ from ...sql import expression as expression declared_attr = ... # type: Any declarative_props = ... # type: Any -class _MapperConfig: +class _MapperConfig(object): @classmethod def setup_mapping(cls, cls_, classname, dict_): ... cls = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/ext/declarative/clsregistry.pyi b/third_party/2and3/sqlalchemy/ext/declarative/clsregistry.pyi index ab3f2bfbb92f..93d40b4eb3c2 100644 --- a/third_party/2and3/sqlalchemy/ext/declarative/clsregistry.pyi +++ b/third_party/2and3/sqlalchemy/ext/declarative/clsregistry.pyi @@ -8,7 +8,7 @@ from ...orm import class_mapper as class_mapper, interfaces as interfaces def add_class(classname, cls): ... -class _MultipleClassMarker: +class _MultipleClassMarker(object): on_remove = ... # type: Any contents = ... # type: Any def __init__(self, classes, on_remove: Optional[Any] = ...) -> None: ... @@ -16,7 +16,7 @@ class _MultipleClassMarker: def attempt_get(self, path, key): ... def add_item(self, item): ... -class _ModuleMarker: +class _ModuleMarker(object): parent = ... # type: Any name = ... # type: Any contents = ... # type: Any @@ -29,22 +29,22 @@ class _ModuleMarker: def get_module(self, name): ... def add_class(self, name, cls): ... -class _ModNS: +class _ModNS(object): def __init__(self, parent) -> None: ... def __getattr__(self, key): ... -class _GetColumns: +class _GetColumns(object): cls = ... # type: Any def __init__(self, cls) -> None: ... def __getattr__(self, key): ... -class _GetTable: +class _GetTable(object): key = ... # type: Any metadata = ... # type: Any def __init__(self, key, metadata) -> None: ... def __getattr__(self, key): ... -class _class_resolver: +class _class_resolver(object): cls = ... # type: Any prop = ... # type: Any arg = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/ext/instrumentation.pyi b/third_party/2and3/sqlalchemy/ext/instrumentation.pyi index 8cbe324c6f7f..805253ec1602 100644 --- a/third_party/2and3/sqlalchemy/ext/instrumentation.pyi +++ b/third_party/2and3/sqlalchemy/ext/instrumentation.pyi @@ -21,7 +21,7 @@ class ExtendedInstrumentationRegistry(InstrumentationFactory): def state_of(self, instance): ... def dict_of(self, instance): ... -class InstrumentationManager: +class InstrumentationManager(object): def __init__(self, class_) -> None: ... def manage(self, class_, manager): ... def dispose(self, class_, manager): ... diff --git a/third_party/2and3/sqlalchemy/ext/mutable.pyi b/third_party/2and3/sqlalchemy/ext/mutable.pyi index 49429b70765f..5bdd7cdb0f68 100644 --- a/third_party/2and3/sqlalchemy/ext/mutable.pyi +++ b/third_party/2and3/sqlalchemy/ext/mutable.pyi @@ -6,7 +6,7 @@ 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: +class MutableBase(object): @classmethod def coerce(cls, key, value): ... diff --git a/third_party/2and3/sqlalchemy/interfaces.pyi b/third_party/2and3/sqlalchemy/interfaces.pyi index 3f3370526185..2bfc59a0318a 100644 --- a/third_party/2and3/sqlalchemy/interfaces.pyi +++ b/third_party/2and3/sqlalchemy/interfaces.pyi @@ -4,13 +4,13 @@ from typing import Any, Optional -class PoolListener: +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: +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): ... diff --git a/third_party/2and3/sqlalchemy/log.pyi b/third_party/2and3/sqlalchemy/log.pyi index fcca2067c7ff..9d4876d26e85 100644 --- a/third_party/2and3/sqlalchemy/log.pyi +++ b/third_party/2and3/sqlalchemy/log.pyi @@ -8,12 +8,12 @@ rootlogger = ... # type: Any def class_logger(cls): ... -class Identified: +class Identified(object): logging_name = ... # type: Any def _should_log_debug(self) -> bool: ... def _should_log_info(self) -> bool: ... -class InstanceLogger: +class InstanceLogger(object): echo = ... # type: Any logger = ... # type: Any def __init__(self, echo, name) -> None: ... @@ -30,7 +30,7 @@ class InstanceLogger: def instance_logger(instance, echoflag: Optional[Any] = ...): ... -class echo_property: +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/attributes.pyi b/third_party/2and3/sqlalchemy/orm/attributes.pyi index 932863f2566f..3cb41757fcf8 100644 --- a/third_party/2and3/sqlalchemy/orm/attributes.pyi +++ b/third_party/2and3/sqlalchemy/orm/attributes.pyi @@ -44,7 +44,7 @@ OP_REMOVE = ... # type: Any OP_APPEND = ... # type: Any OP_REPLACE = ... # type: Any -class Event: +class Event(object): impl = ... # type: Any op = ... # type: Any parent_token = ... # type: Any @@ -54,7 +54,7 @@ class Event: def key(self): ... def hasparent(self, state): ... -class AttributeImpl: +class AttributeImpl(object): class_ = ... # type: Any key = ... # type: Any callable_ = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/orm/base.pyi b/third_party/2and3/sqlalchemy/orm/base.pyi index 0ac2c805f424..01d55c2473cf 100644 --- a/third_party/2and3/sqlalchemy/orm/base.pyi +++ b/third_party/2and3/sqlalchemy/orm/base.pyi @@ -48,7 +48,7 @@ def object_mapper(instance): ... def object_state(instance): ... def class_mapper(class_, configure: bool = ...): ... -class InspectionAttr: +class InspectionAttr(object): is_selectable = ... # type: bool is_aliased_class = ... # type: bool is_instance = ... # type: bool @@ -61,4 +61,4 @@ class InspectionAttr: class InspectionAttrInfo(InspectionAttr): def info(self): ... -class _MappedAttribute: ... +class _MappedAttribute(object): ... diff --git a/third_party/2and3/sqlalchemy/orm/collections.pyi b/third_party/2and3/sqlalchemy/orm/collections.pyi index cb7ece7e0669..6a7aea50df47 100644 --- a/third_party/2and3/sqlalchemy/orm/collections.pyi +++ b/third_party/2and3/sqlalchemy/orm/collections.pyi @@ -5,14 +5,14 @@ from typing import Any, Optional from .. import exc as sa_exc -class _PlainColumnGetter: +class _PlainColumnGetter(object): cols = ... # type: Any composite = ... # type: Any def __init__(self, cols) -> None: ... def __reduce__(self): ... def __call__(self, value): ... -class _SerializableColumnGetter: +class _SerializableColumnGetter(object): colkeys = ... # type: Any composite = ... # type: Any def __init__(self, colkeys) -> None: ... @@ -27,7 +27,7 @@ class _SerializableColumnGetterV2(_PlainColumnGetter): def column_mapped_collection(mapping_spec): ... -class _SerializableAttrGetter: +class _SerializableAttrGetter(object): name = ... # type: Any getter = ... # type: Any def __init__(self, name) -> None: ... @@ -37,7 +37,7 @@ class _SerializableAttrGetter: def attribute_mapped_collection(attr_name): ... def mapped_collection(keyfunc): ... -class collection: +class collection(object): @staticmethod def appender(fn): ... @staticmethod @@ -62,7 +62,7 @@ class collection: collection_adapter = ... # type: Any -class CollectionAdapter: +class CollectionAdapter(object): attr = ... # type: Any owner_state = ... # type: Any invalidated = ... # type: bool diff --git a/third_party/2and3/sqlalchemy/orm/dependency.pyi b/third_party/2and3/sqlalchemy/orm/dependency.pyi index a1c9da1fd83c..96178e7f708f 100644 --- a/third_party/2and3/sqlalchemy/orm/dependency.pyi +++ b/third_party/2and3/sqlalchemy/orm/dependency.pyi @@ -7,7 +7,7 @@ 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: +class DependencyProcessor(object): prop = ... # type: Any cascade = ... # type: Any mapper = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/orm/deprecated_interfaces.pyi b/third_party/2and3/sqlalchemy/orm/deprecated_interfaces.pyi index 71a8e16a2b02..e08c3d82951b 100644 --- a/third_party/2and3/sqlalchemy/orm/deprecated_interfaces.pyi +++ b/third_party/2and3/sqlalchemy/orm/deprecated_interfaces.pyi @@ -4,7 +4,7 @@ from .interfaces import EXT_CONTINUE as EXT_CONTINUE -class MapperExtension: +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): ... @@ -16,7 +16,7 @@ class MapperExtension: def before_delete(self, mapper, connection, instance): ... def after_delete(self, mapper, connection, instance): ... -class SessionExtension: +class SessionExtension(object): def before_commit(self, session): ... def after_commit(self, session): ... def after_rollback(self, session): ... @@ -28,7 +28,7 @@ class SessionExtension: def after_bulk_update(self, session, query, query_context, result): ... def after_bulk_delete(self, session, query, query_context, result): ... -class AttributeExtension: +class AttributeExtension(object): active_history = ... # type: bool def append(self, state, value, initiator): ... def remove(self, state, value, initiator): ... diff --git a/third_party/2and3/sqlalchemy/orm/dynamic.pyi b/third_party/2and3/sqlalchemy/orm/dynamic.pyi index 317f322a10f6..9f80c0edf66a 100644 --- a/third_party/2and3/sqlalchemy/orm/dynamic.pyi +++ b/third_party/2and3/sqlalchemy/orm/dynamic.pyi @@ -35,7 +35,7 @@ class DynamicAttributeImpl(attributes.AttributeImpl): def remove(self, state, dict_, value, initiator, passive: Any = ...): ... def pop(self, state, dict_, value, initiator, passive: Any = ...): ... -class AppenderMixin: +class AppenderMixin(object): query_class = ... # type: Any instance = ... # type: Any attr = ... # type: Any @@ -52,7 +52,7 @@ class AppenderQuery(AppenderMixin, Query): ... def mixin_user_query(cls): ... -class CollectionHistory: +class CollectionHistory(object): unchanged_items = ... # type: Any added_items = ... # type: Any deleted_items = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/orm/evaluator.pyi b/third_party/2and3/sqlalchemy/orm/evaluator.pyi index 4eb0bbf4a976..8e55bcf46997 100644 --- a/third_party/2and3/sqlalchemy/orm/evaluator.pyi +++ b/third_party/2and3/sqlalchemy/orm/evaluator.pyi @@ -7,7 +7,7 @@ from ..sql import operators as operators class UnevaluatableError(Exception): ... -class EvaluatorCompiler: +class EvaluatorCompiler(object): target_cls = ... # type: Any def __init__(self, target_cls: Optional[Any] = ...) -> None: ... def process(self, clause): ... diff --git a/third_party/2and3/sqlalchemy/orm/events.pyi b/third_party/2and3/sqlalchemy/orm/events.pyi index 7937f7e9c167..3195c965cc03 100644 --- a/third_party/2and3/sqlalchemy/orm/events.pyi +++ b/third_party/2and3/sqlalchemy/orm/events.pyi @@ -14,7 +14,7 @@ class InstrumentationEvents(event.Events): def class_uninstrument(self, cls): ... def attribute_instrument(self, cls, key, inst): ... -class _InstrumentationEventsHold: +class _InstrumentationEventsHold(object): class_ = ... # type: Any def __init__(self, class_) -> None: ... dispatch = ... # type: Any @@ -33,7 +33,7 @@ class InstanceEvents(event.Events): class _EventsHold(event.RefCollection): class_ = ... # type: Any def __init__(self, class_) -> None: ... - class HoldEvents: ... + class HoldEvents(object): ... def remove(self, event_key): ... @classmethod def populate(cls, class_, subject): ... diff --git a/third_party/2and3/sqlalchemy/orm/identity.pyi b/third_party/2and3/sqlalchemy/orm/identity.pyi index bf8083093829..59dc8c6c3184 100644 --- a/third_party/2and3/sqlalchemy/orm/identity.pyi +++ b/third_party/2and3/sqlalchemy/orm/identity.pyi @@ -6,7 +6,7 @@ from typing import Any, Optional from .. import exc as sa_exc from . import util as orm_util -class IdentityMap: +class IdentityMap(object): def __init__(self) -> None: ... def keys(self): ... def replace(self, state): ... diff --git a/third_party/2and3/sqlalchemy/orm/instrumentation.pyi b/third_party/2and3/sqlalchemy/orm/instrumentation.pyi index 7fe441de8d79..6aae1a308a40 100644 --- a/third_party/2and3/sqlalchemy/orm/instrumentation.pyi +++ b/third_party/2and3/sqlalchemy/orm/instrumentation.pyi @@ -49,12 +49,12 @@ class ClassManager(dict): def __bool__(self): ... __nonzero__ = ... # type: Any -class _SerializeManager: +class _SerializeManager(object): class_ = ... # type: Any def __init__(self, state, d) -> None: ... def __call__(self, state, inst, state_dict): ... -class InstrumentationFactory: +class InstrumentationFactory(object): def create_manager_for_cls(self, class_): ... def unregister(self, class_): ... diff --git a/third_party/2and3/sqlalchemy/orm/interfaces.pyi b/third_party/2and3/sqlalchemy/orm/interfaces.pyi index 4d15d58f2ddb..212685bc3a22 100644 --- a/third_party/2and3/sqlalchemy/orm/interfaces.pyi +++ b/third_party/2and3/sqlalchemy/orm/interfaces.pyi @@ -58,12 +58,12 @@ class StrategizedProperty(MapperProperty): @classmethod def strategy_for(cls, **kw): ... -class MapperOption: +class MapperOption(object): propagate_to_loaders = ... # type: bool def process_query(self, query): ... def process_query_conditionally(self, query): ... -class LoaderStrategy: +class LoaderStrategy(object): parent_property = ... # type: Any is_class_level = ... # type: bool parent = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/orm/path_registry.pyi b/third_party/2and3/sqlalchemy/orm/path_registry.pyi index cda9cc5d4a62..f25f5a308f32 100644 --- a/third_party/2and3/sqlalchemy/orm/path_registry.pyi +++ b/third_party/2and3/sqlalchemy/orm/path_registry.pyi @@ -7,7 +7,7 @@ from .base import class_mapper as class_mapper log = ... # type: Any -class PathRegistry: +class PathRegistry(object): is_token = ... # type: bool is_root = ... # type: bool def __eq__(self, other): ... diff --git a/third_party/2and3/sqlalchemy/orm/persistence.pyi b/third_party/2and3/sqlalchemy/orm/persistence.pyi index 55b7e9064620..a478e16e712a 100644 --- a/third_party/2and3/sqlalchemy/orm/persistence.pyi +++ b/third_party/2and3/sqlalchemy/orm/persistence.pyi @@ -12,7 +12,7 @@ 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: +class BulkUD(object): query = ... # type: Any mapper = ... # type: Any def __init__(self, query) -> None: ... diff --git a/third_party/2and3/sqlalchemy/orm/query.pyi b/third_party/2and3/sqlalchemy/orm/query.pyi index d6a661c4feff..d94a1ead22c0 100644 --- a/third_party/2and3/sqlalchemy/orm/query.pyi +++ b/third_party/2and3/sqlalchemy/orm/query.pyi @@ -12,7 +12,7 @@ from .. import exc as sa_exc from ..sql import util as sql_util from ..sql.selectable import ForUpdateArg -class Query: +class Query(object): session = ... # type: Any def __init__(self, entities, session: Optional[Any] = ...) -> None: ... @property @@ -95,7 +95,7 @@ class LockmodeArg(ForUpdateArg): @classmethod def parse_legacy_query(self, mode): ... -class _QueryEntity: +class _QueryEntity(object): def __new__(cls, *args, **kwargs): ... class _MapperEntity(_QueryEntity): @@ -177,7 +177,7 @@ class _ColumnEntity(_QueryEntity): def row_processor(self, query, context, result): ... def setup_context(self, query, context): ... -class QueryContext: +class QueryContext(object): statement = ... # type: Any from_clause = ... # type: Any whereclause = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/orm/relationships.pyi b/third_party/2and3/sqlalchemy/orm/relationships.pyi index a42b01df6d25..64416aab19d3 100644 --- a/third_party/2and3/sqlalchemy/orm/relationships.pyi +++ b/third_party/2and3/sqlalchemy/orm/relationships.pyi @@ -73,7 +73,7 @@ class RelationshipProperty(StrategizedProperty): def table(self): ... def do_init(self): ... -class JoinCondition: +class JoinCondition(object): parent_selectable = ... # type: Any parent_local_selectable = ... # type: Any child_selectable = ... # type: Any @@ -102,7 +102,7 @@ class JoinCondition: def join_targets(self, source_selectable, dest_selectable, aliased, single_crit: Optional[Any] = ...): ... def create_lazy_clause(self, reverse_direction: bool = ...): ... -class _ColInAnnotations: +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 index ee23e17285dd..846ff3f4a1f1 100644 --- a/third_party/2and3/sqlalchemy/orm/scoping.pyi +++ b/third_party/2and3/sqlalchemy/orm/scoping.pyi @@ -6,7 +6,7 @@ from typing import Any, Optional from .. import exc as sa_exc from . import exc as orm_exc -class scoped_session: +class scoped_session(object): session_factory = ... # type: Any registry = ... # type: Any def __init__(self, session_factory, scopefunc: Optional[Any] = ...) -> None: ... diff --git a/third_party/2and3/sqlalchemy/orm/session.pyi b/third_party/2and3/sqlalchemy/orm/session.pyi index 97dc0a64418e..132935b964b2 100644 --- a/third_party/2and3/sqlalchemy/orm/session.pyi +++ b/third_party/2and3/sqlalchemy/orm/session.pyi @@ -7,7 +7,7 @@ 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 @@ -15,7 +15,7 @@ class _SessionClassMethods: @classmethod def object_session(cls, instance): ... -class SessionTransaction: +class SessionTransaction(object): session = ... # type: Any nested = ... # type: Any def __init__(self, session, parent: Optional[Any] = ..., nested: bool = ...) -> None: ... diff --git a/third_party/2and3/sqlalchemy/orm/state.pyi b/third_party/2and3/sqlalchemy/orm/state.pyi index 42d338fac8d0..4d74fb74b80d 100644 --- a/third_party/2and3/sqlalchemy/orm/state.pyi +++ b/third_party/2and3/sqlalchemy/orm/state.pyi @@ -59,7 +59,7 @@ class InstanceState(interfaces.InspectionAttr): @property def unloaded(self): ... -class AttributeState: +class AttributeState(object): state = ... # type: Any key = ... # type: Any def __init__(self, state, key) -> None: ... @@ -71,7 +71,7 @@ class AttributeState: def history(self): ... def load_history(self): ... -class PendingCollection: +class PendingCollection(object): deleted_items = ... # type: Any added_items = ... # type: Any def __init__(self) -> None: ... diff --git a/third_party/2and3/sqlalchemy/orm/strategies.pyi b/third_party/2and3/sqlalchemy/orm/strategies.pyi index 70afcc72cff4..7ef78e99cd38 100644 --- a/third_party/2and3/sqlalchemy/orm/strategies.pyi +++ b/third_party/2and3/sqlalchemy/orm/strategies.pyi @@ -35,7 +35,7 @@ class DeferredColumnLoader(LoaderStrategy): def init_class_attribute(self, mapper): ... def setup_query(self, *args, **kw): ... -class LoadDeferredColumns: +class LoadDeferredColumns(object): key = ... # type: Any def __init__(self, key) -> None: ... def __call__(self, state, passive: Any = ...): ... @@ -58,7 +58,7 @@ class LazyLoader(AbstractRelationshipLoader, util.MemoizedSlots): def init_class_attribute(self, mapper): ... def create_row_processor(self, context, path, loadopt, mapper, result, adapter, populators): ... -class LoadLazyAttribute: +class LoadLazyAttribute(object): key = ... # type: Any strategy_key = ... # type: Any def __init__(self, key, initiating_strategy) -> None: ... @@ -74,7 +74,7 @@ class SubqueryLoader(AbstractRelationshipLoader): 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: + class _SubqCollections(object): subq = ... # type: Any def __init__(self, subq) -> None: ... def get(self, key, default): ... diff --git a/third_party/2and3/sqlalchemy/orm/strategy_options.pyi b/third_party/2and3/sqlalchemy/orm/strategy_options.pyi index 5388580e8786..c3adffeb0c6e 100644 --- a/third_party/2and3/sqlalchemy/orm/strategy_options.pyi +++ b/third_party/2and3/sqlalchemy/orm/strategy_options.pyi @@ -29,7 +29,7 @@ class _UnboundLoad(Load): local_opts = ... # type: Any def __init__(self) -> None: ... -class loader_option: +class loader_option(object): def __init__(self) -> None: ... name = ... # type: Any fn = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/orm/unitofwork.pyi b/third_party/2and3/sqlalchemy/orm/unitofwork.pyi index 06193532a727..736a58277806 100644 --- a/third_party/2and3/sqlalchemy/orm/unitofwork.pyi +++ b/third_party/2and3/sqlalchemy/orm/unitofwork.pyi @@ -9,7 +9,7 @@ from . import exc as orm_exc def track_cascade_events(descriptor, prop): ... -class UOWTransaction: +class UOWTransaction(object): session = ... # type: Any attributes = ... # type: Any deps = ... # type: Any @@ -36,7 +36,7 @@ class UOWTransaction: def execute(self): ... def finalize_flush_changes(self): ... -class IterateMappersMixin: ... +class IterateMappersMixin(object): ... class Preprocess(IterateMappersMixin): dependency_processor = ... # type: Any @@ -46,7 +46,7 @@ class Preprocess(IterateMappersMixin): def __init__(self, dependency_processor, fromparent) -> None: ... def execute(self, uow): ... -class PostSortRec: +class PostSortRec(object): disabled = ... # type: bool def __new__(cls, uow, *args): ... 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 8272535467da..d5b25c7e2524 100644 --- a/third_party/2and3/sqlalchemy/orm/util.pyi +++ b/third_party/2and3/sqlalchemy/orm/util.pyi @@ -36,7 +36,7 @@ class ORMAdapter(sql_util.ColumnAdapter): 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: +class AliasedClass(object): __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): ... diff --git a/third_party/2and3/sqlalchemy/pool.pyi b/third_party/2and3/sqlalchemy/pool.pyi index 14031fbcb692..ecb05b5b6fe7 100644 --- a/third_party/2and3/sqlalchemy/pool.pyi +++ b/third_party/2and3/sqlalchemy/pool.pyi @@ -16,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): ... @@ -32,7 +32,7 @@ class Pool(log.Identified): def connect(self): ... def status(self): ... -class _ConnectionRecord: +class _ConnectionRecord(object): finalize_callback = ... # type: Any def __init__(self, pool, connect: bool = ...) -> None: ... fairy_ref = ... # type: Any @@ -51,7 +51,7 @@ class _ConnectionRecord: 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 @@ -99,7 +99,7 @@ class AssertionPool(Pool): def dispose(self): ... def recreate(self): ... -class _DBProxy: +class _DBProxy(object): module = ... # type: Any kw = ... # type: Any poolclass = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/annotation.pyi b/third_party/2and3/sqlalchemy/sql/annotation.pyi index 357600ca1028..23729e005425 100644 --- a/third_party/2and3/sqlalchemy/sql/annotation.pyi +++ b/third_party/2and3/sqlalchemy/sql/annotation.pyi @@ -4,7 +4,7 @@ from typing import Any -class Annotated: +class Annotated(object): def __new__(cls, *args): ... __dict__ = ... # type: Any def __init__(self, element, values) -> None: ... diff --git a/third_party/2and3/sqlalchemy/sql/base.pyi b/third_party/2and3/sqlalchemy/sql/base.pyi index 9428ba2b3496..130abae1cae3 100644 --- a/third_party/2and3/sqlalchemy/sql/base.pyi +++ b/third_party/2and3/sqlalchemy/sql/base.pyi @@ -10,7 +10,7 @@ from .visitors import ClauseVisitor as ClauseVisitor PARSE_AUTOCOMMIT = ... # type: Any NO_ARG = ... # type: Any -class Immutable: +class Immutable(object): def unique_params(self, *optionaldict, **kwargs): ... def params(self, *optionaldict, **kwargs): ... def _clone(self) -> Immutable: ... @@ -32,7 +32,7 @@ class _DialectArgDict(collections.MutableMapping): def __setitem__(self, key, value): ... def __delitem__(self, key): ... -class DialectKWArgs: +class DialectKWArgs(object): @classmethod def argument_for(cls, dialect_name, argument_name, default): ... def dialect_kwargs(self): ... @@ -40,7 +40,7 @@ class DialectKWArgs: def kwargs(self): ... def dialect_options(self): ... -class Generative: ... +class Generative(object): ... class Executable(Generative): supports_execution = ... # type: bool @@ -50,7 +50,7 @@ class Executable(Generative): @property def bind(self): ... -class SchemaEventTarget: ... +class SchemaEventTarget(object): ... class SchemaVisitor(ClauseVisitor): __traverse_options__ = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/compiler.pyi b/third_party/2and3/sqlalchemy/sql/compiler.pyi index db207b5e9734..58a7a72762e3 100644 --- a/third_party/2and3/sqlalchemy/sql/compiler.pyi +++ b/third_party/2and3/sqlalchemy/sql/compiler.pyi @@ -16,7 +16,7 @@ FUNCTIONS = ... # type: Any EXTRACT_MAP = ... # type: Any COMPOUND_KEYWORDS = ... # type: Any -class Compiled: +class Compiled(object): execution_options = ... # type: Any dialect = ... # type: Any bind = ... # type: Any @@ -35,7 +35,7 @@ class Compiled: def execute(self, *multiparams, **params): ... def scalar(self, *multiparams, **params): ... -class TypeCompiler: +class TypeCompiler(object): ensure_kwarg = ... # type: str dialect = ... # type: Any def __init__(self, dialect) -> None: ... @@ -254,7 +254,7 @@ class GenericTypeCompiler(TypeCompiler): class StrSQLTypeCompiler(GenericTypeCompiler): def __getattr__(self, key): ... -class IdentifierPreparer: +class IdentifierPreparer(object): reserved_words = ... # type: Any legal_characters = ... # type: Any illegal_initial_characters = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/functions.pyi b/third_party/2and3/sqlalchemy/sql/functions.pyi index e7f0a1e4fa52..51b0103595cd 100644 --- a/third_party/2and3/sqlalchemy/sql/functions.pyi +++ b/third_party/2and3/sqlalchemy/sql/functions.pyi @@ -29,7 +29,7 @@ class FunctionElement(Executable, ColumnElement, FromClause): def execute(self): ... def self_group(self, against: Optional[Any] = ...): ... -class _FunctionGenerator: +class _FunctionGenerator(object): opts = ... # type: Any def __init__(self, **opts) -> None: ... def __getattr__(self, name): ... @@ -48,7 +48,7 @@ class Function(FunctionElement): class _GenericMeta(VisitableType): def __init__(cls, clsname, bases, clsdict) -> None: ... -class GenericFunction: +class GenericFunction(object): coerce_arguments = ... # type: bool packagenames = ... # type: Any clause_expr = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/naming.pyi b/third_party/2and3/sqlalchemy/sql/naming.pyi index 5aa358c41c79..aa206490a65a 100644 --- a/third_party/2and3/sqlalchemy/sql/naming.pyi +++ b/third_party/2and3/sqlalchemy/sql/naming.pyi @@ -6,7 +6,7 @@ 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: +class ConventionDict(object): const = ... # type: Any table = ... # type: Any convention = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/operators.pyi b/third_party/2and3/sqlalchemy/sql/operators.pyi index 5465f9be9603..d3d20c5a6ceb 100644 --- a/third_party/2and3/sqlalchemy/sql/operators.pyi +++ b/third_party/2and3/sqlalchemy/sql/operators.pyi @@ -6,7 +6,7 @@ from typing import Any, Optional div = ... # type: Any -class Operators: +class Operators(object): def __and__(self, other): ... def __or__(self, other): ... def __invert__(self): ... @@ -14,7 +14,7 @@ class Operators: def operate(self, op, *other, **kwargs): ... def reverse_operate(self, op, other, **kwargs): ... -class custom_op: +class custom_op(object): __name__ = ... # type: str opstring = ... # type: Any precedence = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/schema.pyi b/third_party/2and3/sqlalchemy/sql/schema.pyi index b71eb5b6f139..123c17c46f84 100644 --- a/third_party/2and3/sqlalchemy/sql/schema.pyi +++ b/third_party/2and3/sqlalchemy/sql/schema.pyi @@ -84,7 +84,7 @@ class ForeignKey(DialectKWArgs, SchemaItem): def get_referent(self, table): ... def column(self): ... -class _NotAColumnExpr: +class _NotAColumnExpr(object): __clause_element__ = ... # type: Any self_group = ... # type: Any @@ -157,7 +157,7 @@ class Constraint(DialectKWArgs, SchemaItem): def table(self): ... def copy(self, **kw): ... -class ColumnCollectionMixin: +class ColumnCollectionMixin(object): columns = ... # type: Any def __init__(self, *columns, **kw) -> None: ... @@ -241,7 +241,7 @@ class ThreadLocalMetaData(MetaData): def is_bound(self): ... def dispose(self): ... -class _SchemaTranslateMap: +class _SchemaTranslateMap(object): map_ = ... # type: Any __call__ = ... # type: Any hash_key = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/selectable.pyi b/third_party/2and3/sqlalchemy/sql/selectable.pyi index e1be31202182..4469f2faa035 100644 --- a/third_party/2and3/sqlalchemy/sql/selectable.pyi +++ b/third_party/2and3/sqlalchemy/sql/selectable.pyi @@ -20,10 +20,10 @@ class Selectable(ClauseElement): @property def selectable(self): ... -class HasPrefixes: +class HasPrefixes(object): def prefix_with(self, *expr, **kw): ... -class HasSuffixes: +class HasSuffixes(object): def suffix_with(self, *expr, **kw): ... class FromClause(Selectable): @@ -101,7 +101,7 @@ class CTE(Generative, HasSuffixes, Alias): def union(self, other): ... def union_all(self, other): ... -class HasCTE: +class HasCTE(object): def cte(self, name: Optional[Any] = ..., recursive: bool = ...): ... class FromGrouping(FromClause): diff --git a/third_party/2and3/sqlalchemy/sql/sqltypes.pyi b/third_party/2and3/sqlalchemy/sql/sqltypes.pyi index 053da027aadd..9cd1a2d51b28 100644 --- a/third_party/2and3/sqlalchemy/sql/sqltypes.pyi +++ b/third_party/2and3/sqlalchemy/sql/sqltypes.pyi @@ -10,13 +10,13 @@ from .base import SchemaEventTarget as SchemaEventTarget from ..util import pickle as pickle from ..util import compat as compat -class _DateAffinity: +class _DateAffinity(object): comparator_factory = ... # type: Any -class Concatenable: +class Concatenable(object): comparator_factory = ... # type: Any -class Indexable: +class Indexable(object): comparator_factory = ... # type: Any class String(Concatenable, TypeEngine): diff --git a/third_party/2and3/sqlalchemy/sql/type_api.pyi b/third_party/2and3/sqlalchemy/sql/type_api.pyi index b6db903ddb33..8cf2f9a67c97 100644 --- a/third_party/2and3/sqlalchemy/sql/type_api.pyi +++ b/third_party/2and3/sqlalchemy/sql/type_api.pyi @@ -48,7 +48,7 @@ class TypeEngine(Visitable): class VisitableCheckKWArg(util.EnsureKWArgType, VisitableType): ... -class UserDefinedType: +class UserDefinedType(object): __visit_name__ = ... # type: str ensure_kwarg = ... # type: str class Comparator(TypeEngine.Comparator): ... diff --git a/third_party/2and3/sqlalchemy/sql/util.pyi b/third_party/2and3/sqlalchemy/sql/util.pyi index 09105776a7d9..b3101f49a431 100644 --- a/third_party/2and3/sqlalchemy/sql/util.pyi +++ b/third_party/2and3/sqlalchemy/sql/util.pyi @@ -24,7 +24,7 @@ def surface_column_elements(clause): ... def selectables_overlap(left, right): ... def bind_values(clause): ... -class _repr_base: +class _repr_base(object): def trunc(self, value): ... class _repr_row(_repr_base): @@ -58,7 +58,7 @@ class ColumnAdapter(ClauseAdapter): 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: + class _IncludeExcludeMapping(object): parent = ... # type: Any columns = ... # type: Any def __init__(self, parent, columns) -> None: ... diff --git a/third_party/2and3/sqlalchemy/sql/visitors.pyi b/third_party/2and3/sqlalchemy/sql/visitors.pyi index e7c100344401..b326778ceba5 100644 --- a/third_party/2and3/sqlalchemy/sql/visitors.pyi +++ b/third_party/2and3/sqlalchemy/sql/visitors.pyi @@ -7,9 +7,9 @@ from typing import Any class VisitableType(type): def __init__(cls, clsname, bases, clsdict) -> None: ... -class Visitable: ... +class Visitable(object): ... -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/util/_collections.pyi b/third_party/2and3/sqlalchemy/util/_collections.pyi index 0b438decd1a7..d99a8f6e7015 100644 --- a/third_party/2and3/sqlalchemy/util/_collections.pyi +++ b/third_party/2and3/sqlalchemy/util/_collections.pyi @@ -18,7 +18,7 @@ class _LW(AbstractKeyedTuple): def __new__(cls, vals): ... def __reduce__(self): ... -class ImmutableContainer: +class ImmutableContainer(object): __delitem__ = ... # type: Any __setitem__ = ... # type: Any __setattr__ = ... # type: Any @@ -34,7 +34,7 @@ class immutabledict(ImmutableContainer, dict): def __reduce__(self): ... def union(self, d): ... -class Properties: +class Properties(object): def __init__(self, data) -> None: ... def __len__(self): ... def __iter__(self): ... @@ -107,7 +107,7 @@ class OrderedSet(set): def difference_update(self, other): ... __isub__ = ... # type: Any -class IdentitySet: +class IdentitySet(object): def __init__(self, iterable: Optional[Any] = ...) -> None: ... def add(self, value): ... def __contains__(self, value): ... @@ -146,7 +146,7 @@ class IdentitySet: def __iter__(self): ... def __hash__(self): ... -class WeakSequence: +class WeakSequence(object): def __init__(self, __elements: Any = ...) -> None: ... def append(self, item): ... def __len__(self): ... @@ -170,7 +170,7 @@ populate_column_dict = PopulateDict def unique_list(seq, hashfunc: Optional[Any] = ...): ... -class UniqueAppender: +class UniqueAppender(object): data = ... # type: Any def __init__(self, data, via: Optional[Any] = ...) -> None: ... def append(self, item): ... @@ -196,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/langhelpers.pyi b/third_party/2and3/sqlalchemy/util/langhelpers.pyi index 44b9b31d7529..0a7d4c07e214 100644 --- a/third_party/2and3/sqlalchemy/util/langhelpers.pyi +++ b/third_party/2and3/sqlalchemy/util/langhelpers.pyi @@ -7,7 +7,7 @@ from . import compat def md5_hex(x): ... -class safe_reraise: +class safe_reraise(object): def __enter__(self): ... def __exit__(self, type_, value, traceback): ... @@ -16,7 +16,7 @@ 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 @@ -34,7 +34,7 @@ def getargspec_init(method): ... def unbound_method_to_callable(func_or_cls): ... 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: ... @@ -46,7 +46,7 @@ def monkeypatch_proxied_specials(into_cls, from_cls, skip: Optional[Any] = ..., def methods_equivalent(meth1, meth2): ... 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 @@ -57,25 +57,25 @@ class memoized_property: def memoized_instancemethod(fn): ... -class group_expirable_memoized_property: +class group_expirable_memoized_property(object): attributes = ... # type: Any 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): ... @@ -96,12 +96,12 @@ class classproperty(property): 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): ... @@ -110,7 +110,7 @@ class _symbol(int): 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: Optional[Any] = ..., canonical: Optional[Any] = ...): ... diff --git a/third_party/2and3/sqlalchemy/util/queue.pyi b/third_party/2and3/sqlalchemy/util/queue.pyi index 1cb4fc6d47fb..277bcfe44060 100644 --- a/third_party/2and3/sqlalchemy/util/queue.pyi +++ b/third_party/2and3/sqlalchemy/util/queue.pyi @@ -8,7 +8,7 @@ from time import time as _time class Empty(Exception): ... class Full(Exception): ... -class Queue: +class Queue(object): mutex = ... # type: Any not_empty = ... # type: Any not_full = ... # type: Any From a4b21291a695ebe96ebba45733c824ded652a80d Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 24 Mar 2017 19:56:33 -0700 Subject: [PATCH 10/16] ignore E251 in flake8 Not sure why, but I started getting this error in a single file in sqlalchemy, although we have numerous violations across typeshed. --- .flake8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. From 00c8608a7225fc5bfa4211a2bd89dfcd4959a87e Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 25 Mar 2017 09:38:07 -0700 Subject: [PATCH 11/16] add some imports based on Stiivi's tests --- third_party/2and3/sqlalchemy/__init__.pyi | 22 +++++++++++++++++++ .../2and3/sqlalchemy/connectors/__init__.pyi | 4 ++++ .../2and3/sqlalchemy/dialects/__init__.pyi | 2 ++ third_party/2and3/sqlalchemy/ext/__init__.pyi | 2 ++ .../2and3/sqlalchemy/sql/operators.pyi | 11 +++++++++- 5 files changed, 40 insertions(+), 1 deletion(-) diff --git a/third_party/2and3/sqlalchemy/__init__.pyi b/third_party/2and3/sqlalchemy/__init__.pyi index 527fd764afc4..403b1c9b4cff 100644 --- a/third_party/2and3/sqlalchemy/__init__.pyi +++ b/third_party/2and3/sqlalchemy/__init__.pyi @@ -125,3 +125,25 @@ 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 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 inspection as inspection +from . import interfaces as interfaces +from . import log as log +from . import pool as pool +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 index 8eee07e7454e..e1bc9ca8c540 100644 --- a/third_party/2and3/sqlalchemy/connectors/__init__.pyi +++ b/third_party/2and3/sqlalchemy/connectors/__init__.pyi @@ -3,3 +3,7 @@ # NOTE: This dynamically typed stub was automatically generated by stubgen. class Connector(object): ... + +from . import mxodbc as mxodbc +from . import pyodbc as pyodbc +from . import zxJDBC as zxJDBC diff --git a/third_party/2and3/sqlalchemy/dialects/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/__init__.pyi index 2574a8d5a5e4..c25ea799e39b 100644 --- a/third_party/2and3/sqlalchemy/dialects/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/__init__.pyi @@ -14,3 +14,5 @@ from .. import util registry = ... # type: util.PluginLoader plugins = ... # type: util.PluginLoader + +from . import firebird as firebird, mssql as mssql, mysql as mysql, oracle as oracle, postgresql as postgresql, sqlite as sqlite, sybase as sybase diff --git a/third_party/2and3/sqlalchemy/ext/__init__.pyi b/third_party/2and3/sqlalchemy/ext/__init__.pyi index 9d13f3e2fe5e..c6442a865d22 100644 --- a/third_party/2and3/sqlalchemy/ext/__init__.pyi +++ b/third_party/2and3/sqlalchemy/ext/__init__.pyi @@ -3,3 +3,5 @@ # 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/sql/operators.pyi b/third_party/2and3/sqlalchemy/sql/operators.pyi index d3d20c5a6ceb..8f0990383b35 100644 --- a/third_party/2and3/sqlalchemy/sql/operators.pyi +++ b/third_party/2and3/sqlalchemy/sql/operators.pyi @@ -2,9 +2,18 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. +import sys from typing import Any, Optional -div = ... # type: Any +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 __and__(self, other): ... From 4615c0a8fe0d6765efe209350967f2ba30a524aa Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sat, 25 Mar 2017 09:41:42 -0700 Subject: [PATCH 12/16] fix lint --- third_party/2and3/sqlalchemy/connectors/__init__.pyi | 4 ++-- third_party/2and3/sqlalchemy/dialects/__init__.pyi | 11 +---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/third_party/2and3/sqlalchemy/connectors/__init__.pyi b/third_party/2and3/sqlalchemy/connectors/__init__.pyi index e1bc9ca8c540..3141ed78c9b2 100644 --- a/third_party/2and3/sqlalchemy/connectors/__init__.pyi +++ b/third_party/2and3/sqlalchemy/connectors/__init__.pyi @@ -2,8 +2,8 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -class Connector(object): ... - 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/dialects/__init__.pyi b/third_party/2and3/sqlalchemy/dialects/__init__.pyi index c25ea799e39b..7408c700e89b 100644 --- a/third_party/2and3/sqlalchemy/dialects/__init__.pyi +++ b/third_party/2and3/sqlalchemy/dialects/__init__.pyi @@ -2,17 +2,8 @@ # # 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 - -from . import firebird as firebird, mssql as mssql, mysql as mysql, oracle as oracle, postgresql as postgresql, sqlite as sqlite, sybase as sybase From c96d811b9e99139381d7449ad8bcc1a145080ac2 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 26 Mar 2017 15:23:11 -0700 Subject: [PATCH 13/16] fix a few base classes Grepped for with_metaclass in SQLAlchemy source code. There are already a number of usages of metaclass= in the Python 2 parts of typeshed, so I assume that it's OK. --- third_party/2and3/sqlalchemy/event/base.pyi | 2 +- third_party/2and3/sqlalchemy/sql/compiler.pyi | 3 ++- third_party/2and3/sqlalchemy/sql/functions.pyi | 2 +- third_party/2and3/sqlalchemy/sql/type_api.pyi | 2 +- third_party/2and3/sqlalchemy/sql/visitors.pyi | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/third_party/2and3/sqlalchemy/event/base.pyi b/third_party/2and3/sqlalchemy/event/base.pyi index 0cf00ab1be76..6064dfdfb53e 100644 --- a/third_party/2and3/sqlalchemy/event/base.pyi +++ b/third_party/2and3/sqlalchemy/event/base.pyi @@ -16,7 +16,7 @@ class _Dispatch(object): class _EventMeta(type): def __init__(cls, classname, bases, dict_) -> None: ... -class Events(object): ... +class Events(metaclass=_EventMeta): ... class _JoinedDispatcher(object): local = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/compiler.pyi b/third_party/2and3/sqlalchemy/sql/compiler.pyi index 58a7a72762e3..fce9c08b67f8 100644 --- a/third_party/2and3/sqlalchemy/sql/compiler.pyi +++ b/third_party/2and3/sqlalchemy/sql/compiler.pyi @@ -4,6 +4,7 @@ from typing import Any, Optional from . import visitors +from .. import util RESERVED_WORDS = ... # type: Any LEGAL_CHARACTERS = ... # type: Any @@ -35,7 +36,7 @@ class Compiled(object): def execute(self, *multiparams, **params): ... def scalar(self, *multiparams, **params): ... -class TypeCompiler(object): +class TypeCompiler(metaclass=util.EnsureKWArgType): ensure_kwarg = ... # type: str dialect = ... # type: Any def __init__(self, dialect) -> None: ... diff --git a/third_party/2and3/sqlalchemy/sql/functions.pyi b/third_party/2and3/sqlalchemy/sql/functions.pyi index 51b0103595cd..7fb0ce8d9915 100644 --- a/third_party/2and3/sqlalchemy/sql/functions.pyi +++ b/third_party/2and3/sqlalchemy/sql/functions.pyi @@ -48,7 +48,7 @@ class Function(FunctionElement): class _GenericMeta(VisitableType): def __init__(cls, clsname, bases, clsdict) -> None: ... -class GenericFunction(object): +class GenericFunction(Function, metaclass=_GenericMeta): coerce_arguments = ... # type: bool packagenames = ... # type: Any clause_expr = ... # type: Any diff --git a/third_party/2and3/sqlalchemy/sql/type_api.pyi b/third_party/2and3/sqlalchemy/sql/type_api.pyi index 8cf2f9a67c97..606de3b0abd7 100644 --- a/third_party/2and3/sqlalchemy/sql/type_api.pyi +++ b/third_party/2and3/sqlalchemy/sql/type_api.pyi @@ -48,7 +48,7 @@ class TypeEngine(Visitable): class VisitableCheckKWArg(util.EnsureKWArgType, VisitableType): ... -class UserDefinedType(object): +class UserDefinedType(TypeEngine, metaclass=VisitableCheckKWArg): __visit_name__ = ... # type: str ensure_kwarg = ... # type: str class Comparator(TypeEngine.Comparator): ... diff --git a/third_party/2and3/sqlalchemy/sql/visitors.pyi b/third_party/2and3/sqlalchemy/sql/visitors.pyi index b326778ceba5..eb4b7be72614 100644 --- a/third_party/2and3/sqlalchemy/sql/visitors.pyi +++ b/third_party/2and3/sqlalchemy/sql/visitors.pyi @@ -7,7 +7,7 @@ from typing import Any class VisitableType(type): def __init__(cls, clsname, bases, clsdict) -> None: ... -class Visitable(object): ... +class Visitable(object, metaclass=VisitableType): ... class ClauseVisitor(object): __traverse_options__ = ... # type: Any From e4c0adc82c505a2e24585f0a2659833d551580be Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Sun, 26 Mar 2017 15:47:17 -0700 Subject: [PATCH 14/16] add numerous @property decorators From grepping for memoized_property in sqlalchemy. --- .../sqlalchemy/dialects/mysql/mysqlconnector.pyi | 1 + .../2and3/sqlalchemy/dialects/postgresql/dml.pyi | 1 + .../dialects/postgresql/pypostgresql.pyi | 1 + third_party/2and3/sqlalchemy/engine/default.pyi | 6 ++++++ third_party/2and3/sqlalchemy/engine/result.pyi | 2 ++ .../2and3/sqlalchemy/ext/associationproxy.pyi | 2 ++ third_party/2and3/sqlalchemy/orm/attributes.pyi | 3 +++ third_party/2and3/sqlalchemy/orm/base.pyi | 1 + .../2and3/sqlalchemy/orm/descriptor_props.pyi | 1 + .../2and3/sqlalchemy/orm/path_registry.pyi | 2 ++ .../2and3/sqlalchemy/orm/relationships.pyi | 6 ++++++ third_party/2and3/sqlalchemy/orm/session.pyi | 1 + third_party/2and3/sqlalchemy/orm/state.pyi | 3 +++ third_party/2and3/sqlalchemy/pool.pyi | 2 ++ third_party/2and3/sqlalchemy/sql/base.pyi | 2 ++ third_party/2and3/sqlalchemy/sql/compiler.pyi | 2 ++ third_party/2and3/sqlalchemy/sql/elements.pyi | 16 ++++++++++++++++ third_party/2and3/sqlalchemy/sql/functions.pyi | 1 + third_party/2and3/sqlalchemy/sql/schema.pyi | 7 +++++++ third_party/2and3/sqlalchemy/sql/selectable.pyi | 4 ++++ 20 files changed, 64 insertions(+) diff --git a/third_party/2and3/sqlalchemy/dialects/mysql/mysqlconnector.pyi b/third_party/2and3/sqlalchemy/dialects/mysql/mysqlconnector.pyi index 9e9954f0e465..a95c300e504e 100644 --- a/third_party/2and3/sqlalchemy/dialects/mysql/mysqlconnector.pyi +++ b/third_party/2and3/sqlalchemy/dialects/mysql/mysqlconnector.pyi @@ -29,6 +29,7 @@ class MySQLDialect_mysqlconnector(MySQLDialect): statement_compiler = ... # type: Any preparer = ... # type: Any colspecs = ... # type: Any + @property def supports_unicode_statements(self): ... @classmethod def dbapi(cls): ... diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/dml.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/dml.pyi index 9dce6771ab4f..e97ec99d1a5c 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/dml.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/dml.pyi @@ -7,6 +7,7 @@ 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] = ...): ... diff --git a/third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi b/third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi index 8e411b7dcf39..20889e53374f 100644 --- a/third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi +++ b/third_party/2and3/sqlalchemy/dialects/postgresql/pypostgresql.pyi @@ -24,6 +24,7 @@ class PGDialect_pypostgresql(PGDialect): 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): ... diff --git a/third_party/2and3/sqlalchemy/engine/default.pyi b/third_party/2and3/sqlalchemy/engine/default.pyi index 11c67d45d28c..d999ade7154c 100644 --- a/third_party/2and3/sqlalchemy/engine/default.pyi +++ b/third_party/2and3/sqlalchemy/engine/default.pyi @@ -115,11 +115,17 @@ class DefaultExecutionContext(interfaces.ExecutionContext): 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): ... diff --git a/third_party/2and3/sqlalchemy/engine/result.pyi b/third_party/2and3/sqlalchemy/engine/result.pyi index 3e2acf60d0c5..e317a5bcaba5 100644 --- a/third_party/2and3/sqlalchemy/engine/result.pyi +++ b/third_party/2and3/sqlalchemy/engine/result.pyi @@ -49,6 +49,7 @@ class ResultProxy(Mapping[str, Any]): connection = ... # type: Any def __init__(self, context) -> None: ... def keys(self): ... + @property def rowcount(self) -> int: ... @property def lastrowid(self): ... @@ -58,6 +59,7 @@ class ResultProxy(Mapping[str, Any]): def is_insert(self): ... def close(self) -> None: ... def __iter__(self): ... + @property def inserted_primary_key(self): ... def last_updated_params(self): ... def last_inserted_params(self): ... diff --git a/third_party/2and3/sqlalchemy/ext/associationproxy.pyi b/third_party/2and3/sqlalchemy/ext/associationproxy.pyi index f71f7cce0673..5ddce10fc07d 100644 --- a/third_party/2and3/sqlalchemy/ext/associationproxy.pyi +++ b/third_party/2and3/sqlalchemy/ext/associationproxy.pyi @@ -30,7 +30,9 @@ class AssociationProxy(interfaces.InspectionAttrInfo): 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): ... diff --git a/third_party/2and3/sqlalchemy/orm/attributes.pyi b/third_party/2and3/sqlalchemy/orm/attributes.pyi index 3cb41757fcf8..df6ffd581419 100644 --- a/third_party/2and3/sqlalchemy/orm/attributes.pyi +++ b/third_party/2and3/sqlalchemy/orm/attributes.pyi @@ -19,7 +19,9 @@ class QueryableAttribute(interfaces._MappedAttribute, interfaces.InspectionAttr, 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): ... @@ -31,6 +33,7 @@ class QueryableAttribute(interfaces._MappedAttribute, interfaces.InspectionAttr, def reverse_operate(self, op, other, **kwargs): ... def hasparent(self, state, optimistic: bool = ...): ... def __getattr__(self, key): ... + @property def property(self): ... class InstrumentedAttribute(QueryableAttribute): diff --git a/third_party/2and3/sqlalchemy/orm/base.pyi b/third_party/2and3/sqlalchemy/orm/base.pyi index 01d55c2473cf..1a6252f98032 100644 --- a/third_party/2and3/sqlalchemy/orm/base.pyi +++ b/third_party/2and3/sqlalchemy/orm/base.pyi @@ -59,6 +59,7 @@ class InspectionAttr(object): extension_type = ... # type: Any class InspectionAttrInfo(InspectionAttr): + @property def info(self): ... class _MappedAttribute(object): ... diff --git a/third_party/2and3/sqlalchemy/orm/descriptor_props.pyi b/third_party/2and3/sqlalchemy/orm/descriptor_props.pyi index 23d43733166a..44d27dea8b12 100644 --- a/third_party/2and3/sqlalchemy/orm/descriptor_props.pyi +++ b/third_party/2and3/sqlalchemy/orm/descriptor_props.pyi @@ -25,6 +25,7 @@ class CompositeProperty(DescriptorProperty): def __init__(self, class_, *attrs, **kwargs) -> None: ... def instrument_class(self, mapper): ... def do_init(self): ... + @property def props(self): ... @property def columns(self): ... diff --git a/third_party/2and3/sqlalchemy/orm/path_registry.pyi b/third_party/2and3/sqlalchemy/orm/path_registry.pyi index f25f5a308f32..f8224af89c70 100644 --- a/third_party/2and3/sqlalchemy/orm/path_registry.pyi +++ b/third_party/2and3/sqlalchemy/orm/path_registry.pyi @@ -53,7 +53,9 @@ class PropRegistry(PathRegistry): 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): ... diff --git a/third_party/2and3/sqlalchemy/orm/relationships.pyi b/third_party/2and3/sqlalchemy/orm/relationships.pyi index 64416aab19d3..445865d59359 100644 --- a/third_party/2and3/sqlalchemy/orm/relationships.pyi +++ b/third_party/2and3/sqlalchemy/orm/relationships.pyi @@ -66,9 +66,11 @@ class RelationshipProperty(StrategizedProperty): 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): ... @@ -93,9 +95,13 @@ class JoinCondition(object): 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): ... diff --git a/third_party/2and3/sqlalchemy/orm/session.pyi b/third_party/2and3/sqlalchemy/orm/session.pyi index 132935b964b2..293a778d310c 100644 --- a/third_party/2and3/sqlalchemy/orm/session.pyi +++ b/third_party/2and3/sqlalchemy/orm/session.pyi @@ -43,6 +43,7 @@ class Session(_SessionClassMethods): twophase = ... # type: Any 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: bool = ..., nested: bool = ...): ... def begin_nested(self): ... diff --git a/third_party/2and3/sqlalchemy/orm/state.pyi b/third_party/2and3/sqlalchemy/orm/state.pyi index 4d74fb74b80d..7855bf4fc3a7 100644 --- a/third_party/2and3/sqlalchemy/orm/state.pyi +++ b/third_party/2and3/sqlalchemy/orm/state.pyi @@ -25,6 +25,7 @@ class InstanceState(interfaces.InspectionAttr): committed_state = ... # type: Any expired_attributes = ... # type: Any def __init__(self, obj, manager) -> None: ... + @property def attrs(self): ... @property def transient(self): ... @@ -45,7 +46,9 @@ class InstanceState(interfaces.InspectionAttr): def identity(self): ... @property def identity_key(self): ... + @property def parents(self): ... + @property def mapper(self): ... @property def has_identity(self): ... diff --git a/third_party/2and3/sqlalchemy/pool.pyi b/third_party/2and3/sqlalchemy/pool.pyi index ecb05b5b6fe7..d329247ee3f4 100644 --- a/third_party/2and3/sqlalchemy/pool.pyi +++ b/third_party/2and3/sqlalchemy/pool.pyi @@ -38,7 +38,9 @@ class _ConnectionRecord(object): fairy_ref = ... # type: Any starttime = ... # type: Any connection = ... # type: Any + @property def info(self): ... + @property def record_info(self): ... @classmethod def checkout(cls, pool): ... diff --git a/third_party/2and3/sqlalchemy/sql/base.pyi b/third_party/2and3/sqlalchemy/sql/base.pyi index 130abae1cae3..df07908ab385 100644 --- a/third_party/2and3/sqlalchemy/sql/base.pyi +++ b/third_party/2and3/sqlalchemy/sql/base.pyi @@ -35,9 +35,11 @@ class _DialectArgDict(collections.MutableMapping): 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): ... diff --git a/third_party/2and3/sqlalchemy/sql/compiler.pyi b/third_party/2and3/sqlalchemy/sql/compiler.pyi index fce9c08b67f8..8801180d62f1 100644 --- a/third_party/2and3/sqlalchemy/sql/compiler.pyi +++ b/third_party/2and3/sqlalchemy/sql/compiler.pyi @@ -178,7 +178,9 @@ class StrSQLCompiler(SQLCompiler): 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): ... diff --git a/third_party/2and3/sqlalchemy/sql/elements.pyi b/third_party/2and3/sqlalchemy/sql/elements.pyi index 80cbe2535058..f362f60de4f7 100644 --- a/third_party/2and3/sqlalchemy/sql/elements.pyi +++ b/third_party/2and3/sqlalchemy/sql/elements.pyi @@ -40,6 +40,7 @@ class ColumnElement(operators.ColumnOperators, ClauseElement): foreign_keys = ... # type: Any key = ... # type: Any def self_group(self, against: Optional[Any] = ...): ... + @property def type(self): ... def comparator(self): ... def __getattr__(self, key): ... @@ -93,16 +94,19 @@ class TextClause(Executable, ClauseElement): 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): ... @@ -161,6 +165,7 @@ class TypeCoerce(ColumnElement): clause = ... # type: Any def __init__(self, expression, type_) -> None: ... def get_children(self, **kwargs): ... + @property def typed_expression(self): ... class Extract(ColumnElement): @@ -259,6 +264,7 @@ class Over(ColumnElement): 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): ... @@ -268,6 +274,7 @@ class WithinGroup(ColumnElement): 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): ... @@ -278,6 +285,7 @@ class FunctionFilter(ColumnElement): 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): ... @@ -287,7 +295,9 @@ class Label(ColumnElement): 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 @@ -307,6 +317,7 @@ class ColumnClause(Immutable, ColumnElement): 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): @@ -348,8 +359,13 @@ class _anonymous_label(_truncated_label): 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/functions.pyi b/third_party/2and3/sqlalchemy/sql/functions.pyi index 7fb0ce8d9915..9a55026ead50 100644 --- a/third_party/2and3/sqlalchemy/sql/functions.pyi +++ b/third_party/2and3/sqlalchemy/sql/functions.pyi @@ -17,6 +17,7 @@ class FunctionElement(Executable, ColumnElement, FromClause): 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): ... diff --git a/third_party/2and3/sqlalchemy/sql/schema.pyi b/third_party/2and3/sqlalchemy/sql/schema.pyi index 123c17c46f84..441511c27189 100644 --- a/third_party/2and3/sqlalchemy/sql/schema.pyi +++ b/third_party/2and3/sqlalchemy/sql/schema.pyi @@ -17,6 +17,7 @@ class SchemaItem(SchemaEventTarget, visitors.Visitable): def get_children(self, **kwargs): ... @property def quote(self): ... + @property def info(self): ... class Table(DialectKWArgs, SchemaItem, TableClause): @@ -82,6 +83,7 @@ class ForeignKey(DialectKWArgs, SchemaItem): target_fullname = ... # type: Any def references(self, table): ... def get_referent(self, table): ... + @property def column(self): ... class _NotAColumnExpr(object): @@ -102,8 +104,11 @@ class DefaultGenerator(_NotAColumnExpr, SchemaItem): 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 @@ -122,7 +127,9 @@ class Sequence(DefaultGenerator): 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, func): ... @property diff --git a/third_party/2and3/sqlalchemy/sql/selectable.pyi b/third_party/2and3/sqlalchemy/sql/selectable.pyi index 4469f2faa035..d6b873faf1ed 100644 --- a/third_party/2and3/sqlalchemy/sql/selectable.pyi +++ b/third_party/2and3/sqlalchemy/sql/selectable.pyi @@ -43,9 +43,11 @@ class FromClause(Selectable): def corresponding_column(self, column, require_embedded: bool = ...): ... @property def description(self): ... + @property def columns(self): ... @property def primary_key(self): ... + @property def foreign_keys(self): ... c = ... # type: Any @@ -127,6 +129,7 @@ class TableClause(Immutable, FromClause): 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): ... @@ -192,6 +195,7 @@ class Select(HasPrefixes, HasSuffixes, GenerativeSelect): def with_hint(self, selectable, text, dialect_name: str = ...): ... @property def type(self): ... + @property def locate_all_froms(self): ... @property def inner_columns(self): ... From 6b6e51d1cf3c02f06c9b5a47b1876139b4b62a4a Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 27 Mar 2017 22:34:17 -0700 Subject: [PATCH 15/16] remove spurious arguments injected by @sqlalchemy.util.dependencies --- third_party/2and3/sqlalchemy/orm/exc.pyi | 4 ++-- third_party/2and3/sqlalchemy/orm/loading.pyi | 2 +- third_party/2and3/sqlalchemy/orm/session.pyi | 2 +- third_party/2and3/sqlalchemy/orm/state.pyi | 3 ++- third_party/2and3/sqlalchemy/sql/base.pyi | 4 ++-- third_party/2and3/sqlalchemy/sql/compiler.pyi | 2 +- third_party/2and3/sqlalchemy/sql/elements.pyi | 4 ++-- third_party/2and3/sqlalchemy/sql/schema.pyi | 2 +- third_party/2and3/sqlalchemy/sql/selectable.pyi | 12 ++++++------ third_party/2and3/sqlalchemy/sql/type_api.pyi | 4 ++-- 10 files changed, 20 insertions(+), 19 deletions(-) diff --git a/third_party/2and3/sqlalchemy/orm/exc.pyi b/third_party/2and3/sqlalchemy/orm/exc.pyi index 667174829645..cdfef480efa3 100644 --- a/third_party/2and3/sqlalchemy/orm/exc.pyi +++ b/third_party/2and3/sqlalchemy/orm/exc.pyi @@ -17,7 +17,7 @@ class ObjectDereferencedError(sa_exc.SQLAlchemyError): ... class DetachedInstanceError(sa_exc.SQLAlchemyError): ... class UnmappedInstanceError(UnmappedError): - def __init__(self, base, obj, msg: Optional[Any] = ...) -> None: ... + def __init__(self, obj, msg: Optional[Any] = ...) -> None: ... def __reduce__(self): ... class UnmappedClassError(UnmappedError): @@ -25,7 +25,7 @@ class UnmappedClassError(UnmappedError): def __reduce__(self): ... class ObjectDeletedError(sa_exc.InvalidRequestError): - def __init__(self, base, state, msg: Optional[Any] = ...) -> None: ... + def __init__(self, state, msg: Optional[Any] = ...) -> None: ... def __reduce__(self): ... class UnmappedColumnError(sa_exc.InvalidRequestError): ... diff --git a/third_party/2and3/sqlalchemy/orm/loading.pyi b/third_party/2and3/sqlalchemy/orm/loading.pyi index e952882ab5d5..51f0738b9e9f 100644 --- a/third_party/2and3/sqlalchemy/orm/loading.pyi +++ b/third_party/2and3/sqlalchemy/orm/loading.pyi @@ -9,7 +9,7 @@ from .util import state_str as state_str from .. import exc as sa_exc def instances(query, cursor, context): ... -def merge_result(querylib, query, iterator, load: bool = ...): ... +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/session.pyi b/third_party/2and3/sqlalchemy/orm/session.pyi index 293a778d310c..0504ccd1d66e 100644 --- a/third_party/2and3/sqlalchemy/orm/session.pyi +++ b/third_party/2and3/sqlalchemy/orm/session.pyi @@ -11,7 +11,7 @@ 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): ... diff --git a/third_party/2and3/sqlalchemy/orm/state.pyi b/third_party/2and3/sqlalchemy/orm/state.pyi index 7855bf4fc3a7..88b2122a481b 100644 --- a/third_party/2and3/sqlalchemy/orm/state.pyi +++ b/third_party/2and3/sqlalchemy/orm/state.pyi @@ -39,7 +39,8 @@ class InstanceState(interfaces.InspectionAttr): def persistent(self): ... @property def detached(self): ... - session = ... # type: Any + @property + def session(self): ... @property def object(self): ... @property diff --git a/third_party/2and3/sqlalchemy/sql/base.pyi b/third_party/2and3/sqlalchemy/sql/base.pyi index df07908ab385..a34161bd8eb1 100644 --- a/third_party/2and3/sqlalchemy/sql/base.pyi +++ b/third_party/2and3/sqlalchemy/sql/base.pyi @@ -69,7 +69,7 @@ class ColumnCollection(util.OrderedProperties): def update(self, iter): ... def extend(self, iter): ... __hash__ = ... # type: Any - def __eq__(self, elements, other): ... + def __eq__(self, other): ... def __contains__(self, other): ... def contains_column(self, col): ... def as_immutable(self): ... @@ -83,5 +83,5 @@ class ColumnSet(util.ordered_column_set): def contains_column(self, col): ... def extend(self, cols): ... def __add__(self, other): ... - def __eq__(self, elements, 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 index 8801180d62f1..80d73ef23bb1 100644 --- a/third_party/2and3/sqlalchemy/sql/compiler.pyi +++ b/third_party/2and3/sqlalchemy/sql/compiler.pyi @@ -276,7 +276,7 @@ class IdentifierPreparer(object): 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, naming, constraint): ... + 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] = ...): ... diff --git a/third_party/2and3/sqlalchemy/sql/elements.pyi b/third_party/2and3/sqlalchemy/sql/elements.pyi index f362f60de4f7..8a94af8ecae2 100644 --- a/third_party/2and3/sqlalchemy/sql/elements.pyi +++ b/third_party/2and3/sqlalchemy/sql/elements.pyi @@ -27,7 +27,7 @@ class ClauseElement(Visitable): def compare(self, other, **kw): ... def get_children(self, **kwargs): ... def self_group(self, against: Optional[Any] = ...): ... - def compile(self, default, bind: Optional[Any] = ..., dialect: Optional[Any] = ..., **kw): ... + def compile(self, bind: Optional[Any] = ..., dialect: Optional[Any] = ..., **kw): ... def __and__(self, other): ... def __or__(self, other): ... def __invert__(self): ... @@ -83,7 +83,7 @@ class TextClause(Executable, ClauseElement): text = ... # type: Any def __init__(self, text, bind: Optional[Any] = ...) -> None: ... def bindparams(self, *binds, **names_to_values): ... - def columns(self, selectable, *cols, **types): ... + def columns(self, *cols, **types): ... @property def type(self): ... @property diff --git a/third_party/2and3/sqlalchemy/sql/schema.pyi b/third_party/2and3/sqlalchemy/sql/schema.pyi index 441511c27189..c789efa38649 100644 --- a/third_party/2and3/sqlalchemy/sql/schema.pyi +++ b/third_party/2and3/sqlalchemy/sql/schema.pyi @@ -131,7 +131,7 @@ class Sequence(DefaultGenerator): def is_callable(self): ... @property def is_clause_element(self): ... - def next_value(self, func): ... + def next_value(self): ... @property def bind(self): ... def create(self, bind: Optional[Any] = ..., checkfirst: bool = ...): ... diff --git a/third_party/2and3/sqlalchemy/sql/selectable.pyi b/third_party/2and3/sqlalchemy/sql/selectable.pyi index d6b873faf1ed..7fcd104e5b1a 100644 --- a/third_party/2and3/sqlalchemy/sql/selectable.pyi +++ b/third_party/2and3/sqlalchemy/sql/selectable.pyi @@ -30,7 +30,7 @@ class FromClause(Selectable): __visit_name__ = ... # type: str named_with_column = ... # type: bool schema = ... # type: Any - def count(self, functions, whereclause: Optional[Any] = ..., **params): ... + 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 = ...): ... @@ -38,7 +38,7 @@ class FromClause(Selectable): def lateral(self, name: Optional[Any] = ...): ... def tablesample(self, sampling, name: Optional[Any] = ..., seed: Optional[Any] = ...): ... def is_derived_from(self, fromclause): ... - 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 = ...): ... @property @@ -133,9 +133,9 @@ class TableClause(Immutable, FromClause): def description(self): ... def append_column(self, c): ... def get_children(self, **kwargs): ... - def insert(self, dml, values: Optional[Any] = ..., inline: bool = ..., **kwargs): ... - def update(self, dml, whereclause: Optional[Any] = ..., values: Optional[Any] = ..., inline: bool = ..., **kwargs): ... - def delete(self, dml, whereclause: Optional[Any] = ..., **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 @@ -202,7 +202,7 @@ class Select(HasPrefixes, HasSuffixes, GenerativeSelect): def is_derived_from(self, fromclause): ... def get_children(self, column_collections: bool = ..., **kwargs): ... def column(self, column): ... - def reduce_columns(self, sqlutil, only_synonyms: bool = ...): ... + def reduce_columns(self, only_synonyms: bool = ...): ... def with_only_columns(self, columns): ... def where(self, whereclause): ... def having(self, having): ... diff --git a/third_party/2and3/sqlalchemy/sql/type_api.pyi b/third_party/2and3/sqlalchemy/sql/type_api.pyi index 606de3b0abd7..c88668e76fc7 100644 --- a/third_party/2and3/sqlalchemy/sql/type_api.pyi +++ b/third_party/2and3/sqlalchemy/sql/type_api.pyi @@ -21,8 +21,8 @@ class TypeEngine(Visitable): expr = ... # type: Any type = ... # type: Any def __init__(self, expr) -> None: ... - def operate(self, default_comparator, op, *other, **kwargs): ... - def reverse_operate(self, default_comparator, op, other, **kwargs): ... + def operate(self, op, *other, **kwargs): ... + def reverse_operate(self, op, other, **kwargs): ... def __reduce__(self): ... hashable = ... # type: bool comparator_factory = ... # type: Any From 482363f0f625e4dadc6e178de7bcd6f2e1abe000 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Mon, 27 Mar 2017 22:44:24 -0700 Subject: [PATCH 16/16] fix some missing attributes set in _init methods --- third_party/2and3/sqlalchemy/sql/schema.pyi | 12 ++++++++++-- third_party/2and3/sqlalchemy/util/queue.pyi | 11 +++++++---- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/third_party/2and3/sqlalchemy/sql/schema.pyi b/third_party/2and3/sqlalchemy/sql/schema.pyi index c789efa38649..a71805898611 100644 --- a/third_party/2and3/sqlalchemy/sql/schema.pyi +++ b/third_party/2and3/sqlalchemy/sql/schema.pyi @@ -2,7 +2,7 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any, Optional +from typing import Any, Optional, Set from . import visitors from .base import SchemaEventTarget as SchemaEventTarget, DialectKWArgs as DialectKWArgs from .base import ColumnCollection as ColumnCollection @@ -21,7 +21,15 @@ class SchemaItem(SchemaEventTarget, visitors.Visitable): def info(self): ... class Table(DialectKWArgs, SchemaItem, TableClause): - __visit_name__ = ... # type: str + __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): ... diff --git a/third_party/2and3/sqlalchemy/util/queue.pyi b/third_party/2and3/sqlalchemy/util/queue.pyi index 277bcfe44060..2da0bdae7873 100644 --- a/third_party/2and3/sqlalchemy/util/queue.pyi +++ b/third_party/2and3/sqlalchemy/util/queue.pyi @@ -2,16 +2,19 @@ # # NOTE: This dynamically typed stub was automatically generated by stubgen. -from typing import Any, Optional +from typing import Any, Deque, Optional +import threading from time import time as _time class Empty(Exception): ... class Full(Exception): ... class Queue(object): - mutex = ... # type: Any - not_empty = ... # type: Any - not_full = ... # type: Any + 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): ...